|
|
1.1 ! root 1: /* D.L.Buck and Associates, Inc. - May, 1984 ! 2: * ! 3: * COPYRIGHT NOTICE: ! 4: * Copyright c 1984 - An unpublished work by ! 5: * D.L.Buck and Associates, Inc. ! 6: * ! 7: * PROPRIETARY RIGHTS NOTICE: ! 8: * All rights reserved. This document and program contains ! 9: * proprietary information of D.L.Buck and Associates,Inc. ! 10: * of San Jose, California, U.S.A., embodying confidential ! 11: * information, ideas, and expressions, no part of which ! 12: * may be reproduced, or transmitted in any form or by any ! 13: * means, electronic, mechanical, or otherwise, without ! 14: * the written permission of D.L.Buck and Associates, Inc. ! 15: * ! 16: * NAME ! 17: * emreadbuf ! 18: * ! 19: * SYNOPSIS ! 20: * emreadbuf() ! 21: * ! 22: * DESCRIPTION ! 23: * ! 24: */ ! 25: #include <em.h> ! 26: #include "local.h" ! 27: #include <bsc/bscio.h> ! 28: ! 29: #define GOZINTA(x) x/64 ! 30: #define LEFTOVER(x) x%64 ! 31: #define SF 0x1d ! 32: #define YES 1 ! 33: #define NO 0 ! 34: ! 35: extern int ascii; ! 36: extern int pt_to_pt; ! 37: extern char aadr_tbl[]; /* ASCII hex cursor address encoding table */ ! 38: extern char eadr_tbl[]; /* EBCDIC hex cursor address encoding table */ ! 39: ! 40: extern int devfd; ! 41: extern int errno; ! 42: extern struct bscio p; ! 43: extern char aid_val; ! 44: extern int stationid; ! 45: extern char termid; ! 46: extern int xmitfd; ! 47: static char sccsid[] = "@(#)emreadbuf.c 1.4 REL"; ! 48: ! 49: emreadbuf() ! 50: { ! 51: register char *chrptr; ! 52: register int *xrefptr; ! 53: char x; ! 54: ! 55: if (pt_to_pt == BSCMPT) { /* multipoint - put in addr's */ ! 56: bput(termid); /* controller's poll addr */ ! 57: bput (stationid); /* subdevice address */ ! 58: } ! 59: /* Output `read header' */ ! 60: bput(aid_val); ! 61: bput((ascii?aadr_tbl:eadr_tbl)[GOZINTA(cursaddr)]); ! 62: bput((ascii?aadr_tbl:eadr_tbl)[LEFTOVER(cursaddr)]); ! 63: ! 64: for (chrptr = scrn_image, xrefptr = scrn_xref; ! 65: chrptr < &scrn_image[MAXSCREENSIZE]; ! 66: ++chrptr, ++xrefptr) { ! 67: if (*chrptr == ATTRCODE) { ! 68: bput(SF); ! 69: x = fldattr[*xrefptr]; ! 70: } else { ! 71: x = *chrptr; ! 72: if (!ascii) ! 73: ascebc(&x,1); ! 74: } ! 75: bput(x); ! 76: } ! 77: ! 78: ioctl(devfd,BSCLAST,0); ! 79: flushbuf(); ! 80: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.