home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sources / misc / 3961 < prev    next >
Encoding:
Text File  |  1992-09-15  |  57.2 KB  |  1,467 lines

  1. Newsgroups: comp.sources.misc
  2. Path: sparky!kent
  3. From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  4. Subject:  v32i069:  ecu - ECU Asynchronous Communications v3.20, Part34/40
  5. Message-ID: <1992Sep15.153357.20235@sparky.imd.sterling.com>
  6. Followup-To: comp.sources.d
  7. X-Md4-Signature: a90259bc807d9be058c2e318529edca1
  8. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  9. Organization: Sterling Software
  10. References: <csm-v32i036=ecu.141245@sparky.IMD.Sterling.COM>
  11. Date: Tue, 15 Sep 1992 15:33:57 GMT
  12. Approved: kent@sparky.imd.sterling.com
  13. Lines: 1452
  14.  
  15. Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  16. Posting-number: Volume 32, Issue 69
  17. Archive-name: ecu/part34
  18. Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
  19. Supersedes: ecu: Volume 21, Issue 53-89
  20.  
  21. ---- Cut Here and feed the following to sh ----
  22. #!/bin/sh
  23. # this is ecu320.34 (part 34 of ecu320)
  24. # do not concatenate these parts, unpack them in order with /bin/sh
  25. # file fasi/fas.h continued
  26. #
  27. if test ! -r _shar_seq_.tmp; then
  28.     echo 'Please unpack part 1 first!'
  29.     exit 1
  30. fi
  31. (read Scheck
  32.  if test "$Scheck" != 34; then
  33.     echo Please unpack part "$Scheck" next!
  34.     exit 1
  35.  else
  36.     exit 0
  37.  fi
  38. ) < _shar_seq_.tmp || exit 1
  39. if test ! -f _shar_wnt_.tmp; then
  40.     echo 'x - still skipping fasi/fas.h'
  41. else
  42. echo 'x - continuing file fasi/fas.h'
  43. sed 's/^X//' << 'SHAR_EOF' >> 'fasi/fas.h' &&
  44. X#define DF_DEVICE_OPEN        0x0020    /* physical device is open */
  45. X#define DF_DEVICE_LOCKED    0x0040    /* physical device locked */
  46. X#define DF_MODEM_ENABLED    0x0080    /* modem enabled */
  47. X#define DF_XMIT_BUSY        0x0100    /* transmitter busy */
  48. X#define DF_XMIT_BREAK        0x0200    /* transmitter sends break */
  49. X#define DF_XMIT_LOCKED        0x0400    /* transmitter locked against output */
  50. X#define DF_DO_HANGUP        0x0800    /* delayed hangup request */
  51. X#define DF_DO_BREAK        0x1000    /* delayed break request */
  52. X#define DF_GUARD_TIMEOUT    0x2000    /* protect last char from corruption */
  53. X#define DF_NS16550A_DROP_MODE    0x4000    /* receiver trigger level is dropped */
  54. X
  55. X/* define the flow control status flags */
  56. X
  57. X#define FF_HWO_HANDSHAKE    0x0001    /* output hw handshake enabled */
  58. X#define FF_HWI_HANDSHAKE    0x0002    /* input hw handshake enabled */
  59. X#define FF_HDX_HANDSHAKE    0x0004    /* output hdx hw handshake enabled */
  60. X#define    FF_HWO_STOPPED        0x0008    /* output stopped by hw handshake */
  61. X#define FF_HWI_STOPPED        0x0010    /* input stopped by hw handshake */
  62. X#define FF_HDX_STARTED        0x0020    /* output buffer contains characters */
  63. X#define FF_SWO_STOPPED        0x0040    /* output stopped by sw flow control */
  64. X#define FF_SWI_STOPPED        0x0080    /* input stopped by sw flow control */
  65. X#define FF_SW_FC_REQ        0x0100    /* sw input flow control request */
  66. X#define FF_RXFER_STOPPED    0x0200    /* rxfer function stopped */
  67. X
  68. X/* define the scheduled events flags */
  69. X
  70. X#define EF_DO_RXFER        0x0001    /* rxfer function request */
  71. X#define EF_DO_XXFER        0x0002    /* xxfer function request */
  72. X#define EF_DO_BRKINT        0x0004    /* break int request */
  73. X#define EF_DO_MPROC        0x0008    /* mproc function request */
  74. X#define EF_SIGNAL_VPIX        0x0010    /* send pseudorupt to VP/ix */
  75. X
  76. X/* define an easy way to reference the port structures */
  77. X
  78. X#define RCV_DATA_PORT        (fip->port_0)
  79. X#define XMT_DATA_PORT        (fip->port_0)
  80. X#define INT_ENABLE_PORT        (fip->port_1)
  81. X#define INT_ID_PORT        (fip->port_2)
  82. X#define NS_FIFO_CTL_PORT    (fip->port_2)
  83. X#define I_BANK_PORT        (fip->port_2)
  84. X#define LINE_CTL_PORT        (fip->port_3)
  85. X#define MDM_CTL_PORT        (fip->port_4)
  86. X#define I_IDM_PORT        (fip->port_4)
  87. X#define LINE_STATUS_PORT    (fip->port_5)
  88. X#define I_RCM_PORT        (fip->port_5)
  89. X#define MDM_STATUS_PORT        (fip->port_6)
  90. X#define I_TCM_PORT        (fip->port_6)
  91. X#define DIVISOR_LSB_PORT    (fip->port_0)
  92. X#define DIVISOR_MSB_PORT    (fip->port_1)
  93. X#define CTL_PORT        (fip->ctl_port)
  94. X
  95. X/* modem control port */
  96. X
  97. X#define MC_SET_DTR        0x01
  98. X#define MC_SET_RTS        0x02
  99. X#define MC_SET_OUT1        0x04
  100. X#define MC_SET_OUT2        0x08    /* tristates int line when false */
  101. X#define MC_SET_LOOPBACK        0x10
  102. X
  103. X#define MC_ANY_CONTROL    (MC_SET_DTR | MC_SET_RTS)
  104. X
  105. X/* modem status port */
  106. X
  107. X#define MS_CTS_DELTA        0x01
  108. X#define MS_DSR_DELTA        0x02
  109. X#define MS_RING_TEDGE        0x04
  110. X#define MS_DCD_DELTA        0x08
  111. X#define MS_CTS_PRESENT        0x10
  112. X#define MS_DSR_PRESENT        0x20
  113. X#define MS_RING_PRESENT        0x40
  114. X#define MS_DCD_PRESENT        0x80
  115. X
  116. X#define MS_ANY_DELTA    (MS_CTS_DELTA | MS_DSR_DELTA | MS_RING_TEDGE \
  117. X                | MS_DCD_DELTA)
  118. X#define MS_ANY_PRESENT    (MS_CTS_PRESENT | MS_DSR_PRESENT | MS_RING_PRESENT \
  119. X                | MS_DCD_PRESENT)
  120. X
  121. X/* interrupt enable port */
  122. X
  123. X#define IE_NONE                0x00
  124. X#define    IE_RECV_DATA_AVAILABLE        0x01
  125. X#define    IE_XMIT_HOLDING_BUFFER_EMPTY    0x02
  126. X#define IE_LINE_STATUS            0x04
  127. X#define IE_MODEM_STATUS            0x08
  128. X
  129. X#define IE_INIT_MODE    (IE_RECV_DATA_AVAILABLE | IE_XMIT_HOLDING_BUFFER_EMPTY \
  130. X            | IE_LINE_STATUS | IE_MODEM_STATUS)
  131. X
  132. X/* interrupt id port */
  133. X
  134. X#define II_NO_INTS_PENDING    0x01
  135. X#define II_CODE_MASK        0x07
  136. X#define II_MODEM_STATE        0x00
  137. X#define II_XMTD_CHAR        0x02
  138. X#define II_RCVD_CHAR        0x04
  139. X#define II_RCV_ERROR        0x06
  140. X#define II_NS_FIFO_TIMEOUT    0x08
  141. X#define II_NS_FIFO_ENABLED    0xC0
  142. X
  143. X/* line control port */
  144. X
  145. X#define    LC_WORDLEN_MASK        0x03
  146. X#define    LC_WORDLEN_5        0x00
  147. X#define    LC_WORDLEN_6        0x01
  148. X#define    LC_WORDLEN_7        0x02
  149. X#define    LC_WORDLEN_8        0x03
  150. X#define LC_STOPBITS_LONG    0x04
  151. X#define LC_ENABLE_PARITY    0x08
  152. X#define LC_EVEN_PARITY        0x10
  153. X#define LC_STICK_PARITY        0x20
  154. X#define LC_SET_BREAK_LEVEL    0x40
  155. X#define LC_ENABLE_DIVISOR    0x80
  156. X
  157. X/* line status port */
  158. X
  159. X#define LS_RCV_AVAIL        0x01
  160. X#define LS_OVERRUN        0x02
  161. X#define LS_PARITY_ERROR        0x04
  162. X#define LS_FRAMING_ERROR    0x08
  163. X#define LS_BREAK_DETECTED    0x10
  164. X#define LS_XMIT_AVAIL        0x20
  165. X#define LS_XMIT_COMPLETE    0x40
  166. X#define LS_ERROR_IN_NS_FIFO    0x80    /* NS16550A only */
  167. X#define LS_RCV_INT    (LS_RCV_AVAIL | LS_OVERRUN | LS_PARITY_ERROR \
  168. X            | LS_FRAMING_ERROR | LS_BREAK_DETECTED)
  169. X
  170. X/* fifo control port (NS16550A only) */
  171. X
  172. X#define    NS_FIFO_ENABLE        0x01
  173. X#define    NS_FIFO_CLR_RECV    0x02
  174. X#define    NS_FIFO_CLR_XMIT    0x04
  175. X#define    NS_FIFO_START_DMA    0x08
  176. X#define NS_FIFO_SIZE_1        0x00
  177. X#define NS_FIFO_SIZE_4        0x40
  178. X#define NS_FIFO_SIZE_8        0x80
  179. X#define NS_FIFO_SIZE_14        0xC0
  180. X#define NS_FIFO_SIZE_MASK    0xC0
  181. X
  182. X#define NS_FIFO_CLEAR_CMD    0
  183. X#define NS_FIFO_DROP_CMD    (NS_FIFO_SIZE_1 | NS_FIFO_ENABLE)
  184. X#define NS_FIFO_SETUP_CMD    (NS_FIFO_SIZE_4 | NS_FIFO_ENABLE)
  185. X#define NS_FIFO_INIT_CMD    (NS_FIFO_SETUP_CMD | NS_FIFO_CLR_RECV \
  186. X                | NS_FIFO_CLR_XMIT)
  187. X
  188. X#define INPUT_NS_FIFO_SIZE    16
  189. X#define OUTPUT_NS_FIFO_SIZE    16
  190. X
  191. X/* fifo control ports (i82510 only) */
  192. X
  193. X#define I_BANK_0        0x00
  194. X#define I_BANK_1        0x20
  195. X#define I_BANK_2        0x40
  196. X#define I_BANK_3        0x60
  197. X#define I_FIFO_ENABLE        0x08
  198. X#define I_FIFO_CLR_RECV        0x30
  199. X#define I_FIFO_CLR_XMIT        0x0c
  200. X
  201. X#define I_FIFO_CLEAR_CMD    0
  202. X#define I_FIFO_SETUP_CMD    I_FIFO_ENABLE
  203. X
  204. X#define INPUT_I_FIFO_SIZE    4
  205. X#define OUTPUT_I_FIFO_SIZE    4
  206. X
  207. X/* defines for ioctl calls (VP/ix) */
  208. X
  209. X#define AIOC            ('A'<<8)
  210. X#define AIOCINTTYPE        (AIOC|60)    /* set interrupt type */
  211. X#define AIOCDOSMODE        (AIOC|61)    /* set DOS mode */
  212. X#define AIOCNONDOSMODE        (AIOC|62)    /* reset DOS mode */
  213. X#define AIOCSERIALOUT        (AIOC|63)    /* serial device data write */
  214. X#define AIOCSERIALIN        (AIOC|64)    /* serial device data read */
  215. X#define AIOCSETSS        (AIOC|65)    /* set start/stop chars */
  216. X#define AIOCINFO        (AIOC|66)    /* tell us what device we are */
  217. X
  218. X/* ioctl alternate names used by VP/ix */
  219. X
  220. X#define VPC_SERIAL_DOS        AIOCDOSMODE
  221. X#define VPC_SERIAL_NONDOS    AIOCNONDOSMODE
  222. X#define VPC_SERIAL_INFO        AIOCINFO
  223. X#define VPC_SERIAL_OUT        AIOCSERIALOUT
  224. X#define VPC_SERIAL_IN        AIOCSERIALIN
  225. X
  226. X#if defined(FASI)
  227. X#define FASIC            ('~' << 8)
  228. X#define FASIC_SIP        (FASIC | 16)    /* get entire fas_info struct */
  229. X#define FASIC_SIP_CHANGE    (FASIC | 17)    /* get entire fas_info struct
  230. X                         * after wait for change */
  231. X#define FASIC_MSR        (FASIC | 18)    /* get various registers */
  232. X#define FASIC_LCR        (FASIC | 19)
  233. X#define FASIC_IER        (FASIC | 20)
  234. X#define FASIC_MCR        (FASIC | 21)
  235. X#define FASIC_DVR_IDENT        (FASIC | 22)    /* get driver revision */
  236. X#define FASIC_SPACE_IDENT    (FASIC | 23)    /* get space.c revision */
  237. X#define FASIC_RESET_STAT    (FASIC | 24)    /* reset statistics */
  238. X#endif /* FASI */
  239. X
  240. X/* serial in/out requests */
  241. X
  242. X#define SO_DIVLLSB        1
  243. X#define SO_DIVLMSB        2
  244. X#define SO_LCR            3
  245. X#define SO_MCR            4
  246. X#define SI_MSR            1
  247. X#define SIO_MASK(x)        (1<<((x)-1))
  248. X
  249. X
  250. X/* This structure contains everything one would like to know about
  251. X   an open device.  There is one of it for each physical unit.
  252. X
  253. X   We use several unions to eliminate most integer type conversions
  254. X   at run-time. The standard UNIX V 3.X/386 C compiler forces all
  255. X   operands in expressions and all function parameters to type int.
  256. X   To save some time, with the means of unions we deliver type int
  257. X   at the proper locations while dealing with the original type
  258. X   wherever int would be slower.
  259. X
  260. X   This is highly compiler implementation specific. But for the sake
  261. X   of speed the end justifies the means.
  262. X
  263. X   Take care that the size of the area that contains the various
  264. X   structure fields (up to, but excluding the ring buffers)
  265. X   is <= 128 bytes. Otherwise a 4-byte offset is used to access
  266. X   some of the structure fields. For the first 128 bytes a 1-byte
  267. X   offset is used, which is faster.
  268. X*/
  269. X
  270. Xstruct    fas_info
  271. X{
  272. X    struct    tty    *tty;    /* the tty structure */
  273. X    struct    fas_info *prev_int_user;/* link to previous fas_info struct */
  274. X    struct    fas_info *next_int_user;/* link to next fas_info struct */
  275. X    int    timeout_idx;    /* timeout index for untimeout () */
  276. X    uint    iflag;        /* current terminal input flags */
  277. X    uint    cflag;        /* current terminal hardware control flags */
  278. X    union {            /* flags about the device state */
  279. X        ushort    s;
  280. X        uint    i;
  281. X    } device_flags;
  282. X    union {            /* flags about the flow control state */
  283. X        ushort    s;
  284. X        uint    i;
  285. X    } flow_flags;
  286. X    union {            /* flags about the scheduled events */
  287. X        ushort    s;
  288. X        uint    i;
  289. X    } event_flags;
  290. X    uint    o_state;    /* current open state */
  291. X    uint    po_state;    /* previous open state */
  292. X    union {            /* modem control masks */
  293. X        struct {
  294. X            unchar    di;    /* mask for modem disable */
  295. X            unchar    eo;    /* mask for modem enable (dialout) */
  296. X            unchar    ei;    /* mask for modem enable (dialin) */
  297. X            unchar    ca;    /* mask for carrier detect */
  298. X        } m;
  299. X        ulong    l;
  300. X    } modem;
  301. X    union {            /* hardware flow control masks */
  302. X        struct {
  303. X            unchar    ic;    /* control mask for inp. flow ctrl */
  304. X            unchar    oc;    /* control mask for outp. flow ctrl */
  305. X            unchar    oe;    /* enable mask for outp. flow ctrl */
  306. X            unchar    hc;    /* control mask for hdx flow ctrl */
  307. X        } m;
  308. X        ulong    l;
  309. X    } flow;
  310. X    unchar    msr;        /* modem status register value */
  311. X    unchar    new_msr;    /* new modem status register value */
  312. X    unchar    mcr;        /* modem control register value */
  313. X    unchar    lcr;        /* line control register value */
  314. X    unchar    ier;        /* interrupt enable register value */
  315. X    unchar    vec;        /* interrupt vector for this struct */
  316. X    unchar    msi_cnt;    /* modem status interrupt counter */
  317. X#if defined (HAVE_VPIX)
  318. X    unchar    v86_intmask;    /* VP/ix pseudorupt mask */
  319. X    v86_t    *v86_proc;    /* VP/ix v86proc pointer for pseudorupts */
  320. X    struct termss    v86_ss;    /* VP/ix start/stop characters */
  321. X#endif
  322. X    uint    ctl_port;    /* muliplexer control port */
  323. X    union {            /* uart port addresses and control values */
  324. X        uint    addr;
  325. X        struct {
  326. X            ushort    addr;
  327. X            unchar    ctl;
  328. X        } p;
  329. X    } port_0, port_1, port_2, port_3, port_4, port_5, port_6;
  330. X    uint    recv_ring_cnt;    /* receiver ring buffer counter */
  331. X    unchar    *recv_ring_put_ptr;    /* recv ring buf put ptr */
  332. X    unchar    *recv_ring_take_ptr;    /* recv ring buf take ptr */
  333. X    ushort    xmit_fifo_size;    /* transmitter FIFO size */
  334. X    ushort    xmit_ring_size;    /* transmitter ring buffer size */
  335. X    uint    xmit_ring_cnt;    /* transmitter ring buffer counter */
  336. X    unchar    *xmit_ring_put_ptr;    /* xmit ring buf put ptr */
  337. X    unchar    *xmit_ring_take_ptr;    /* xmit ring buf take ptr */
  338. X#if defined(FASI)
  339. X    unsigned long characters_received;
  340. X    unsigned long characters_transmitted;
  341. X    unsigned long modem_status_events;
  342. X    unsigned long overrun_errors;
  343. X    unsigned long framing_errors;
  344. X    unsigned long parity_errors;
  345. X    unsigned long rings_detected;
  346. X    unsigned long breaks_detected;
  347. X    unsigned long xmtr_hw_flow_count;
  348. X    unsigned long xmtr_sw_flow_count;
  349. X    unsigned long rcvr_hw_flow_count;
  350. X    unsigned long rcvr_sw_flow_count;
  351. X#endif /* FASI */
  352. X    unchar    recv_buffer [RECV_BUFF_SIZE];    /* recv ring buf */
  353. X    unchar    xmit_buffer [XMIT_BUFF_SIZE];    /* xmit ring buf */
  354. X};
  355. X
  356. X#if defined(FASI)
  357. Xstruct fas_name
  358. X{
  359. X    char name[8];
  360. X};
  361. X#endif
  362. SHAR_EOF
  363. echo 'File fasi/fas.h is complete' &&
  364. chmod 0644 fasi/fas.h ||
  365. echo 'restore of fasi/fas.h failed'
  366. Wc_c="`wc -c < 'fasi/fas.h'`"
  367. test 21979 -eq "$Wc_c" ||
  368.     echo 'fasi/fas.h: original size 21979, current size' "$Wc_c"
  369. rm -f _shar_wnt_.tmp
  370. fi
  371. # ============= fasi/idfasi ==============
  372. if test -f 'fasi/idfasi' -a X"$1" != X"-c"; then
  373.     echo 'x - skipping fasi/idfasi (File already exists)'
  374.     rm -f _shar_wnt_.tmp
  375. else
  376. > _shar_wnt_.tmp
  377. echo 'x - extracting fasi/idfasi (Text)'
  378. sed 's/^X//' << 'SHAR_EOF' > 'fasi/idfasi' &&
  379. X:
  380. X#+---------------------------------------------------------------
  381. X# idefas - ECU FASI/FAS Installation
  382. X# Alas, SCO idinstall has no -z (Define) option like ISC does
  383. X#----------------------------------------------------------------
  384. X/etc/conf/bin/idcheck -p fas
  385. Xif [ $? -lt 16 ] ; then
  386. X    /etc/conf/bin/idinstall -a -e -k fas
  387. Xelse
  388. X    /etc/conf/bin/idinstall -u -e -k fas
  389. Xfi
  390. SHAR_EOF
  391. chmod 0744 fasi/idfasi ||
  392. echo 'restore of fasi/idfasi failed'
  393. Wc_c="`wc -c < 'fasi/idfasi'`"
  394. test 370 -eq "$Wc_c" ||
  395.     echo 'fasi/idfasi: original size 370, current size' "$Wc_c"
  396. rm -f _shar_wnt_.tmp
  397. fi
  398. # ============= ecufriend/ecufriend.c ==============
  399. if test -f 'ecufriend/ecufriend.c' -a X"$1" != X"-c"; then
  400.     echo 'x - skipping ecufriend/ecufriend.c (File already exists)'
  401.     rm -f _shar_wnt_.tmp
  402. else
  403. > _shar_wnt_.tmp
  404. echo 'x - extracting ecufriend/ecufriend.c (Text)'
  405. sed 's/^X//' << 'SHAR_EOF' > 'ecufriend/ecufriend.c' &&
  406. X#define DUMP_SCREEN
  407. X/*+-------------------------------------------------------------------------
  408. X    ecufriend.c -- example of using ecu shared memory access
  409. X    wht@n4hgf.Mt-Park.GA.US
  410. X
  411. XExecute by ecu procedure command:  system -s 'ecufriend '+%itos(%shmid)
  412. XTo manually execute for perusal, do an ipcs command to find the
  413. Xshared memory id or HOME pc echo 'shmid='+%itos(%shmid)
  414. XThen HOME >ecufriend # where # is replaced by the shmid
  415. X--------------------------------------------------------------------------*/
  416. X/*+:EDITS:*/
  417. X/*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  418. X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
  419. X/*:07-25-1991-12:56-wht@n4hgf-ECU release 3.10 */
  420. X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  421. X
  422. X#include <stdio.h>
  423. X#include <signal.h>
  424. X#include <termio.h>
  425. X#include <sys/errno.h>
  426. X#include "../ecu_types.h"
  427. X#include "../ecu_stat.h"
  428. X#include <time.h>
  429. X#include <sys/ipc.h>
  430. X#include <sys/msg.h>
  431. X#include <sys/shm.h>
  432. X#include "../ecushm.h"
  433. X
  434. XECU_SDS FAR *shm;        /* shared segment pointer */
  435. Xint shmid;                /* sharged segment id */
  436. X
  437. X/*+-------------------------------------------------------------------------
  438. X    main(argc,argv,envp)
  439. X--------------------------------------------------------------------------*/
  440. Xmain(argc,argv,envp)
  441. Xint argc;
  442. Xchar **argv;
  443. Xchar **envp;
  444. X{
  445. Xregister itmp;
  446. X#ifdef DUMP_SCREEN
  447. Xint row,col;
  448. Xunsigned char sch;
  449. X#endif
  450. X
  451. X    if(argc < 2)
  452. X    {
  453. X        printf("usage: ecufriend <ecu-shmid>\n");
  454. X            exit(255);
  455. X    }
  456. X    shmid = atoi(argv[1]);
  457. X
  458. X    if((shm = (ECU_SDS FAR *)shmat(shmid,(char FAR *)0,SHM_RDONLY))
  459. X            == (ECU_SDS FAR *)-1)
  460. X    {
  461. X        perror("shmat");
  462. X        exit(1);
  463. X    }
  464. X
  465. X    printf("ecu shm address = %08lx shmid=%d revision=%08lx\n",
  466. X        shm,shmid,shm->shm_revision);
  467. X
  468. X    if(shm->shm_revision != SHM_REV)
  469. X    {
  470. X        printf("incompatible shared memory revision (compiled with %08lx)\n",
  471. X            SHM_REV);
  472. X        exit(1);
  473. X    }
  474. X
  475. X    printf("xmit chars=%lu rcvd chars=%lu\n",
  476. X        shm->xmit_chars,shm->rcvd_chars);
  477. X    printf("The receive cursor position is at column %d row %d\n",
  478. X        shm->cursor_y,shm->cursor_x);
  479. X
  480. X    printf("If this program was not executed by a shell that closed it,\n");
  481. X    printf("then fd %d is available to us to write and read from the line.\n",
  482. X        shm->Liofd);
  483. X
  484. X    if(isatty(shm->Liofd))
  485. X        printf("It is available.\n");
  486. X    else
  487. X        printf("It is not available. Even so, we could re-open %s here\n",
  488. X            shm->Lline);
  489. X
  490. X    if(shm->Lmodem_off_hook)
  491. X        printf("Hmmm.. we seem to be connected to %s at %s\n",
  492. X            shm->Ldescr,shm->Ltelno);
  493. X
  494. X#ifdef DUMP_SCREEN
  495. X    printf("screen dump\n");
  496. X    printf("-----------\n");
  497. X    for(row = 0; row < 43; row++)
  498. X    {
  499. X        for(col = 0; col < 79; col++)
  500. X        {
  501. X            sch = shm->screen[row][col];
  502. X            if((sch < 0x20) && (sch > 0x7E))
  503. X                putc('.',stdout);
  504. X            else
  505. X                putc(sch,stdout);
  506. X        }
  507. X        putc('\n',stdout);
  508. X    }
  509. X#endif
  510. X
  511. X    exit(0);
  512. X}    /* end of main */
  513. X
  514. X/* vi: set tabstop=4 shiftwidth=4: */
  515. X/* end of ecufriend.c */
  516. SHAR_EOF
  517. chmod 0644 ecufriend/ecufriend.c ||
  518. echo 'restore of ecufriend/ecufriend.c failed'
  519. Wc_c="`wc -c < 'ecufriend/ecufriend.c'`"
  520. test 2829 -eq "$Wc_c" ||
  521.     echo 'ecufriend/ecufriend.c: original size 2829, current size' "$Wc_c"
  522. rm -f _shar_wnt_.tmp
  523. fi
  524. # ============= mapkey/README ==============
  525. if test ! -d 'mapkey'; then
  526.     echo 'x - creating directory mapkey'
  527.     mkdir 'mapkey'
  528. fi
  529. if test -f 'mapkey/README' -a X"$1" != X"-c"; then
  530.     echo 'x - skipping mapkey/README (File already exists)'
  531.     rm -f _shar_wnt_.tmp
  532. else
  533. > _shar_wnt_.tmp
  534. echo 'x - extracting mapkey/README (Text)'
  535. sed 's/^X//' << 'SHAR_EOF' > 'mapkey/README' &&
  536. X
  537. X#+:EDITS:*/
  538. X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
  539. X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
  540. X#:05-02-1991-01:57-wht@n4hgf-alt-[a-z] range moved from 0x80-0x99 to 0xe0-0xf9
  541. X
  542. XThis file contains information necessary to map ALT-A through ALT-Z
  543. Xin accordance with ecuxkey.h to produce unique codes so that
  544. XALT-[a-z] can cause ECU to execute procedures with a single keystroke.
  545. X
  546. XBeginning with ECU 3.10, the key code range changed:
  547. X      128 through 153 (0x80 through 0x99)     to
  548. X      229 through 249 (0xE0 through 0xF9)
  549. X
  550. XModify your /usr/lib/keyboard/keys value for the ALT values for
  551. Xkey codes matching keys [a-z] as follows.  If you have made no 
  552. Xother changes to your key file, use the supplied keys.usa.ecu
  553. X
  554. XMy apologies to those caught by having already done something
  555. Xsimilar for EMACS or CRISP.
  556. X
  557. XThese are the necessary differences:
  558. X
  559. X                                ALT-unshifted
  560. X                                     |
  561. X                                     V
  562. X    16  'q'    'Q'    dc1    dc1    0xf0   'Q'    dc1    dc1     C
  563. X    17  'w'    'W'    etb    etb    0xf6   'W'    etb    etb     C
  564. X    18  'e'    'E'    enq    enq    0xe4   'E'    enq    enq     C
  565. X    19  'r'    'R'    dc2    dc2    0xf1   'R'    dc2    dc2     C
  566. X    20  't'    'T'    dc4    dc4    0xf3   'T'    dc4    dc4     C
  567. X    21  'y'    'Y'    em     em     0xf8   'Y'    em     em      C
  568. X    22  'u'    'U'    nak    nak    0xf4   'U'    nak    nak     C
  569. X    23  'i'    'I'    ht     ht     0xe8   'I'    ht     ht      C
  570. X    24  'o'    'O'    si     si     0xee   'O'    si     si      C
  571. X    25  'p'    'P'    dle    dle    0xef   'P'    dle    dle     C
  572. X    30  'a'    'A'    soh    soh    0xe0   'A'    soh    soh     C
  573. X    31  's'    'S'    dc3    dc3    0xf2   'S'    dc3    dc3     C
  574. X    32  'd'    'D'    eot    eot    0xe3   'D'    eot    eot     C
  575. X    33  'f'    'F'    ack    ack    0xe5   'F'    ack    ack     C
  576. X    34  'g'    'G'    bel    bel    0xe6   'G'    bel    bel     C
  577. X    35  'h'    'H'    bs     bs     0xe7   'H'    bs     bs      C
  578. X    36  'j'    'J'    nl     nl     0xe9   'J'    nl     nl      C
  579. X    37  'k'    'K'    vt     vt     0xea   'K'    vt     vt      C
  580. X    38  'l'    'L'    np     np     0xeb   'L'    np     np      C
  581. X    44  'z'    'Z'    sub    sub    0xf9   'Z'    sub    sub     C
  582. X    45  'x'    'X'    can    can    0xf7   'X'    can    can     C
  583. X    46  'c'    'C'    etx    etx    0xe2   'C'    etx    etx     C
  584. X    47  'v'    'V'    syn    syn    0xf5   'V'    syn    syn     C
  585. X    48  'b'    'B'    stx    stx    0xe1   'B'    stx    stx     C
  586. X    49  'n'    'N'    so     so     0xed   'N'    so     so      C
  587. X    50  'm'    'M'    cr     cr     0xec   'M'    cr     cr      C
  588. X
  589. SHAR_EOF
  590. chmod 0644 mapkey/README ||
  591. echo 'restore of mapkey/README failed'
  592. Wc_c="`wc -c < 'mapkey/README'`"
  593. test 2723 -eq "$Wc_c" ||
  594.     echo 'mapkey/README: original size 2723, current size' "$Wc_c"
  595. rm -f _shar_wnt_.tmp
  596. fi
  597. # ============= mapkey/keys.usa.ecu ==============
  598. if test -f 'mapkey/keys.usa.ecu' -a X"$1" != X"-c"; then
  599.     echo 'x - skipping mapkey/keys.usa.ecu (File already exists)'
  600.     rm -f _shar_wnt_.tmp
  601. else
  602. > _shar_wnt_.tmp
  603. echo 'x - extracting mapkey/keys.usa.ecu (Text)'
  604. sed 's/^X//' << 'SHAR_EOF' > 'mapkey/keys.usa.ecu' &&
  605. X#+----------------------------------------------------------------------------
  606. X# keys.usa.ecu
  607. X# SCO keys file for ECU alt-[a-z] support
  608. X#-----------------------------------------------------------------------------
  609. X#+:EDITS:*/
  610. X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
  611. X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
  612. X#:05-02-1991-01:57-wht@n4hgf-alt-[a-z] range moved from 0x80-0x99 to 0xe0-0xf9
  613. X
  614. X# scan                      cntrl          alt    alt   cntrl  lock
  615. X# code  base  shift  cntrl  shift   alt   shift  cntrl  shift  state
  616. X     0  nop    nop    nop    nop    nop    nop    nop    nop     O
  617. X     1  esc    esc    esc    esc    esc    esc    esc    esc     O
  618. X     2  '1'    '!'    nop    nop    '1'    '!'    nop    nop     O
  619. X     3  '2'    '@'    nul    nul    '2'    '@'    nul    nul     O
  620. X     4  '3'    '#'    nop    nop    '3'    '#'    nop    nop     O
  621. X     5  '4'    '$'    nop    nop    '4'    '$'    nop    nop     O
  622. X     6  '5'    '%'    nop    nop    '5'    '%'    nop    nop     O
  623. X     7  '6'    '^'    rs     rs     '6'    '^'    rs     rs      O
  624. X     8  '7'    '&'    nop    nop    '7'    '&'    nop    nop     O
  625. X     9  '8'    '*'    nop    nop    '8'    '*'    nop    nop     O
  626. X    10  '9'    '('    nop    nop    '9'    '('    nop    nop     O
  627. X    11  '0'    ')'    nop    nop    '0'    ')'    nop    nop     O
  628. X    12  '-'    '_'    ns     ns     '-'    '_'    ns     ns      O
  629. X    13  '='    '+'    nop    nop    '='    '+'    nop    nop     O
  630. X    14  bs     bs     del    del    bs     bs     del    del     O
  631. X    15  ht     btab   nop    nop    ht     btab   nop    nop     O
  632. X    16  'q'    'Q'    dc1    dc1    0xf1   'Q'    dc1    dc1     C
  633. X    17  'w'    'W'    etb    etb    0xf7   'W'    etb    etb     C
  634. X    18  'e'    'E'    enq    enq    0xe5   'E'    enq    enq     C
  635. X    19  'r'    'R'    dc2    dc2    0xf2   'R'    dc2    dc2     C
  636. X    20  't'    'T'    dc4    dc4    0xf4   'T'    dc4    dc4     C
  637. X    21  'y'    'Y'    em     em     0xf9   'Y'    em     em      C
  638. X    22  'u'    'U'    nak    nak    0xf5   'U'    nak    nak     C
  639. X    23  'i'    'I'    ht     ht     0xe9   'I'    ht     ht      C
  640. X    24  'o'    'O'    si     si     0xef   'O'    si     si      C
  641. X    25  'p'    'P'    dle    dle    0xf0   'P'    dle    dle     C
  642. X    26  '['    '{'    esc    esc    '['    '{'    esc    esc     O
  643. X    27  ']'    '}'    gs     gs     ']'    '}'    gs     gs      O
  644. X    28  cr     cr     nl     nl     cr     cr     nl     nl      O
  645. X    29  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
  646. X    30  'a'    'A'    soh    soh    0xe1   'A'    soh    soh     C
  647. X    31  's'    'S'    dc3    dc3    0xf3   'S'    dc3    dc3     C
  648. X    32  'd'    'D'    eot    eot    0xe4   'D'    eot    eot     C
  649. X    33  'f'    'F'    ack    ack    0xe6   'F'    ack    ack     C
  650. X    34  'g'    'G'    bel    bel    0xe7   'G'    bel    bel     C
  651. X    35  'h'    'H'    bs     bs     0xe8   'H'    bs     bs      C
  652. X    36  'j'    'J'    nl     nl     0xea   'J'    nl     nl      C
  653. X    37  'k'    'K'    vt     vt     0xeb   'K'    vt     vt      C
  654. X    38  'l'    'L'    np     np     0xec   'L'    np     np      C
  655. X    39  ';'    ':'    nop    nop    ';'    ':'    nop    nop     O
  656. X    40  '\''   '"'    nop    nop    '\''   '"'    nop    nop     O
  657. X    41  '`'    '~'    nop    nop    '`'    '~'    nop    nop     O
  658. X    42  lshift lshift lshift lshift lshift lshift lshift lshift  O
  659. X    43  '\\'   '|'    fs     fs     '\\'   '|'    fs     fs      O
  660. X    44  'z'    'Z'    sub    sub    0xfa   'Z'    sub    sub     C
  661. X    45  'x'    'X'    can    can    0xf8   'X'    can    can     C
  662. X    46  'c'    'C'    etx    etx    0xe3   'C'    etx    etx     C
  663. X    47  'v'    'V'    syn    syn    0xf6   'V'    syn    syn     C
  664. X    48  'b'    'B'    stx    stx    0xe2   'B'    stx    stx     C
  665. X    49  'n'    'N'    so     so     0xee   'N'    so     so      C
  666. X    50  'm'    'M'    cr     cr     0xed   'M'    cr     cr      C
  667. X    51  ','    '<'    nop    nop    ','    '<'    nop    nop     O
  668. X    52  '.'    '>'    nop    nop    '.'    '>'    nop    nop     O
  669. X    53  '/'    '?'    nop    nop    '/'    '?'    nop    nop     O
  670. X    54  rshift rshift rshift rshift rshift rshift rshift rshift  O
  671. X    55  '*'    '*'    nscr   nscr   '*'    '*'    nscr   nscr    O
  672. X    56  lalt   lalt   lalt   lalt   lalt   lalt   lalt   lalt    O
  673. X    57  ' '    ' '    ' '    ' '    ' '    ' '    ' '    ' '     O
  674. X    58  clock  clock  clock  clock  clock  clock  clock  clock   O
  675. X    59  fkey1  fkey13 fkey25 fkey37 scr1   scr11  scr1   scr11   O
  676. X    60  fkey2  fkey14 fkey26 fkey38 scr2   scr12  scr2   scr12   O
  677. X    61  fkey3  fkey15 fkey27 fkey39 scr3   scr13  scr3   scr13   O
  678. X    62  fkey4  fkey16 fkey28 fkey40 scr4   scr14  scr4   scr14   O
  679. X    63  fkey5  fkey17 fkey29 fkey41 scr5   scr15  scr5   scr15   O
  680. X    64  fkey6  fkey18 fkey30 fkey42 scr6   scr16  scr6   scr16   O
  681. X    65  fkey7  fkey19 fkey31 fkey43 scr7   scr7   scr7   scr7    O
  682. X    66  fkey8  fkey20 fkey32 fkey44 scr8   scr8   scr8   scr8    O
  683. X    67  fkey9  fkey21 fkey33 fkey45 scr9   scr9   scr9   scr9    O
  684. X    68  fkey10 fkey22 fkey34 fkey46 scr10  scr10  scr10  scr10   O
  685. X    69  nlock  nlock  dc3    dc3    nlock  nlock  dc3    dc3     O
  686. X    70  slock  slock  del    del    slock  slock  del    del     O
  687. X    71  fkey49 '7'    '7'    '7'    '7'    '7'    '7'    '7'     N
  688. X    72  fkey50 '8'    '8'    '8'    '8'    '8'    '8'    '8'     N
  689. X    73  fkey51 '9'    '9'    '9'    '9'    '9'    '9'    '9'     N
  690. X    74  fkey52 '-'    '-'    '-'    '-'    '-'    '-'    '-'     N
  691. X    75  fkey53 '4'    '4'    '4'    '4'    '4'    '4'    '4'     N
  692. X    76  fkey54 '5'    '5'    '5'    '5'    '5'    '5'    '5'     N
  693. X    77  fkey55 '6'    '6'    '6'    '6'    '6'    '6'    '6'     N
  694. X    78  fkey56 '+'    '+'    '+'    '+'    '+'    '+'    '+'     N
  695. X    79  fkey57 '1'    '1'    '1'    '1'    '1'    '1'    '1'     N
  696. X    80  fkey58 '2'    '2'    '2'    '2'    '2'    '2'    '2'     N
  697. X    81  fkey59 '3'    '3'    '3'    '3'    '3'    '3'    '3'     N
  698. X    82  fkey60 '0'    '0'    '0'    '0'    '0'    '0'    '0'     N
  699. X    83  del    '.'    del    del    del    del    del    del     N
  700. X    84  0x1f   0x1f   0x1f   0x1f   0x1f   0x1f   0x1f   0x1f    O
  701. X    85  nop    nop    nop    nop    nop    nop    nop    nop     O
  702. X    86  nop    nop    nop    nop    nop    nop    nop    nop     O
  703. X    87  fkey11 fkey23 fkey35 fkey47 scr11  scr11  scr11  scr11   O
  704. X    88  fkey12 fkey24 fkey36 fkey48 scr12  scr12  scr12  scr12   O
  705. X    89  nop    nop    nop    nop    nop    nop    nop    nop     O
  706. X    90  nop    nop    nop    nop    nop    nop    nop    nop     O
  707. X    91  nop    nop    nop    nop    nop    nop    nop    nop     O
  708. X    92  nop    nop    nop    nop    nop    nop    nop    nop     O
  709. X    93  nop    nop    nop    nop    nop    nop    nop    nop     O
  710. X    94  nop    nop    nop    nop    nop    nop    nop    nop     O
  711. X    95  nop    nop    nop    nop    nop    nop    nop    nop     O
  712. X    96  fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50  O
  713. X    97  fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53  O
  714. X    98  fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58  O
  715. X    99  fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55  O
  716. X   100  fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49  O
  717. X   102  fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57  O
  718. X   103  fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59  O
  719. X   104  fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
  720. X   105  del    del    del    del    del    del    del    del     N
  721. X   106  fkey54 fkey54 fkey54 fkey54 fkey54 fkey54 fkey54 fkey54  O
  722. X   107  nop    nop    nop    nop    nop    nop    nop    nop     O
  723. X   108  nop    nop    nop    nop    nop    nop    nop    nop     O
  724. X   109  nop    nop    nop    nop    nop    nop    nop    nop     O
  725. X   110  nop    nop    nop    nop    nop    nop    nop    nop     O
  726. X   111  fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51  O
  727. X   111  nop    nop    nop    nop    nop    nop    nop    nop     O
  728. X   112  nop    nop    nop    nop    nop    nop    nop    nop     O
  729. X   113  nop    nop    nop    nop    nop    nop    nop    nop     O
  730. X   114  nop    nop    nop    nop    nop    nop    nop    nop     O
  731. X   116  nop    nop    nop    nop    nop    nop    nop    nop     O
  732. X   117  nop    nop    nop    nop    nop    nop    nop    nop     O
  733. X   118  nop    nop    nop    nop    nop    nop    nop    nop     O
  734. X   119  nop    nop    nop    nop    nop    nop    nop    nop     O
  735. X   120  nop    nop    nop    nop    nop    nop    nop    nop     O
  736. X   121  nop    nop    nop    nop    nop    nop    nop    nop     O
  737. X   122  nop    nop    nop    nop    nop    nop    nop    nop     O
  738. X   123  nop    nop    nop    nop    nop    nop    nop    nop     O
  739. X   124  nop    nop    nop    nop    nop    nop    nop    nop     O
  740. X   125  nop    nop    nop    nop    nop    nop    nop    nop     O
  741. X   126  nop    nop    nop    nop    nop    nop    nop    nop     O
  742. X   127  nop    nop    nop    nop    nop    nop    nop    nop     O
  743. X   128  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl   O
  744. X   129  ralt   ralt   ralt   ralt   ralt   ralt   ralt   ralt    O
  745. X   130  fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
  746. X   131  del    del    del    del    del    del    del    del     N
  747. X   132  fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49  O
  748. X   133  fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57  O
  749. X   134  fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51  O
  750. X   135  fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59  O
  751. X   136  fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55  O
  752. X   137  fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53  O
  753. X   138  fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50  O
  754. X   139  fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58  O
  755. X   140  '/'    nop    nop    nop    '/'    nop    nop    nop     O
  756. X   141  cr     cr     nl     nl     cr     cr     nl     nl      O
  757. SHAR_EOF
  758. chmod 0644 mapkey/keys.usa.ecu ||
  759. echo 'restore of mapkey/keys.usa.ecu failed'
  760. Wc_c="`wc -c < 'mapkey/keys.usa.ecu'`"
  761. test 9988 -eq "$Wc_c" ||
  762.     echo 'mapkey/keys.usa.ecu: original size 9988, current size' "$Wc_c"
  763. rm -f _shar_wnt_.tmp
  764. fi
  765. # ============= xsel386/fixttiocom.c ==============
  766. if test ! -d 'xsel386'; then
  767.     echo 'x - creating directory xsel386'
  768.     mkdir 'xsel386'
  769. fi
  770. if test -f 'xsel386/fixttiocom.c' -a X"$1" != X"-c"; then
  771.     echo 'x - skipping xsel386/fixttiocom.c (File already exists)'
  772.     rm -f _shar_wnt_.tmp
  773. else
  774. > _shar_wnt_.tmp
  775. echo 'x - extracting xsel386/fixttiocom.c (Text)'
  776. sed 's/^X//' << 'SHAR_EOF' > 'xsel386/fixttiocom.c' &&
  777. X/*+-------------------------------------------------------------------------
  778. X    fixttiocom.c - change ttiocom to Ttiocom calls in /usr/sys/sys/libsys.a
  779. XThis program patched my Xenix 386 2.3.1 system library (a copy of which
  780. Xhad been named libfix.a, fixed, verified, then moved to libsys.a)
  781. X--------------------------------------------------------------------------*/
  782. X/*+:EDITS:*/
  783. X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
  784. X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
  785. X/*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  786. X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  787. X
  788. X#include <stdio.h>
  789. X#include <sys/types.h>
  790. X#include <fcntl.h>
  791. X
  792. Xchar *lib = "libfix.a";
  793. X
  794. X/* file positions where names needed changing */
  795. X#define PLACE1 0xdcaL
  796. X#define PLACE2 0x1b1cbL
  797. X#define PLACE3 0x1c41bL
  798. X
  799. X/*+-------------------------------------------------------------------------
  800. X    main(argc,argv,envp)
  801. X--------------------------------------------------------------------------*/
  802. Xmain(argc,argv,envp)
  803. Xint argc;
  804. Xchar **argv;
  805. Xchar **envp;
  806. X{
  807. Xint fd = open(lib,O_RDWR,0);
  808. Xunsigned char ch1,ch2,ch3;
  809. Xlong lseek();
  810. X
  811. X    if(fd < 0)
  812. X    {
  813. X        perror(lib);
  814. X        exit(9);
  815. X    }
  816. X
  817. X    if(lseek(fd,PLACE1,0) != PLACE1)
  818. X    {
  819. X        perror("seek1");
  820. X        exit(1);
  821. X    }
  822. X    if(read(fd,&ch1,1) != 1)
  823. X    {
  824. X        perror("read1");
  825. X        exit(1);
  826. X    }
  827. X    printf("char 1 = %02x\n",ch1);
  828. X
  829. X    if(lseek(fd,PLACE2,0) != PLACE2)
  830. X    {
  831. X        perror("seek2");
  832. X        exit(2);
  833. X    }
  834. X    if(read(fd,&ch2,2) != 2)
  835. X    {
  836. X        perror("read2");
  837. X        exit(2);
  838. X    }
  839. X    printf("char 2 = %02x\n",ch2);
  840. X
  841. X
  842. X    if(lseek(fd,PLACE3,0) != PLACE3)
  843. X    {
  844. X        perror("seek3");
  845. X        exit(3);
  846. X    }
  847. X    if(read(fd,&ch3,1) != 1)
  848. X    {
  849. X        perror("read3");
  850. X        exit(3);
  851. X    }
  852. X    printf("char 3 = %02x\n",ch3);
  853. X
  854. X    if((ch1 != 't') || (ch2 != 't') || (ch3 != 't'))
  855. X        exit(8);
  856. X    if(lseek(fd,PLACE1,0) != PLACE1)
  857. X    {
  858. X        perror("seek1");
  859. X        exit(1);
  860. X    }
  861. X    write(fd,"T",1);
  862. X    if(lseek(fd,PLACE2,0) != PLACE2)
  863. X    {
  864. X        perror("seek1");
  865. X        exit(1);
  866. X    }
  867. X    write(fd,"T",1);
  868. X    if(lseek(fd,PLACE3,0) != PLACE3)
  869. X    {
  870. X        perror("seek1");
  871. X        exit(1);
  872. X    }
  873. X    write(fd,"T",1);
  874. X    printf("done\n");
  875. X    close(fd);
  876. X
  877. X    exit(0);
  878. X}    /* end of main */
  879. X
  880. X/* vi: set tabstop=4 shiftwidth=4: */
  881. X/* end of fixttiocom.c */
  882. SHAR_EOF
  883. chmod 0644 xsel386/fixttiocom.c ||
  884. echo 'restore of xsel386/fixttiocom.c failed'
  885. Wc_c="`wc -c < 'xsel386/fixttiocom.c'`"
  886. test 2104 -eq "$Wc_c" ||
  887.     echo 'xsel386/fixttiocom.c: original size 2104, current size' "$Wc_c"
  888. rm -f _shar_wnt_.tmp
  889. fi
  890. # ============= xsel386/select-update ==============
  891. if test -f 'xsel386/select-update' -a X"$1" != X"-c"; then
  892.     echo 'x - skipping xsel386/select-update (File already exists)'
  893.     rm -f _shar_wnt_.tmp
  894. else
  895. > _shar_wnt_.tmp
  896. echo 'x - extracting xsel386/select-update (Text)'
  897. sed 's/^X//' << 'SHAR_EOF' > 'xsel386/select-update' &&
  898. XSubject: Re: Select(S) in Xenix 386 2.3.2
  899. XNewsgroups: comp.unix.xenix
  900. XKeywords: select, serial, pipes
  901. XReferences: <117@accsys.acc.uu.no> <172@prmmbx.UUCP>
  902. X
  903. XIn article <172@prmmbx.UUCP>, csch@netcs.UUCP (Clemens Schrimpe) writes:
  904. X> ivar@acc.uu.no (Ivar Hosteng) writes:
  905. X> <> I have experienced some problems using the select call in Xenix 386 V2.3.2.
  906. X> <> It does not seems to detect when a pipe gets ready to been read from.
  907. X> This is, because there is no provision to select on pipes!
  908. X> Why? The stuff is almost totally ported 1:1 from the Berkeley code and
  909. X> in BSD pipes should consist of AF_UNIX sockets, on which you can naturally
  910. X> select.
  911. X> I was very angry, when I found this out after hours of digging with adb in
  912. X> the kernel. But I also tried the same on a SUN under SunOS 4.0 and it doesn't
  913. X> work either ... seems to be a common illness ???
  914. X> (I wonder, because the code for that is very simple ... ??? ...)
  915. X> 
  916. X> <> I also 
  917. X> <> have trouble using select on a serial port.  When I do that the input
  918. X> <> turns into garbage.  This does not occur when I use select on the
  919. X> <> multiscreen ttys (tty01-tty12).
  920. X> Hehe - we had just the same!
  921. X> Here is the solution (thanks to my colleague Stefan Koehler, who took one
  922. X> look at my screen, into which I had starred for hours, to find it ...)
  923. X> 
  924. X> Select is implemented by an undocumented ioctl
  925. X>     (0xFFFF == IOC_SELECT -> [sys/slect.h])
  926. X> which is handled by ttiocom() for all devices using the standard
  927. X> SYS-V linediscipline!
  928. X> 
  929. X> The ioctl-routine for the serial devices [sioioctl()] just calls 
  930. X> ttiocom() [after some undefinable VPIX stuff ???] and
  931. X> if it returns NON-ZERO it calls sioparam(), which adjusts certain
  932. X> parameters and garbles the output!
  933. X> OK so far. Now: The Bug lies in the ttiocom-code within the check
  934. X> for IOC_SELECT. After detecting the IOC_SELECT, the ttiocom calls
  935. X> the select-code and returns NOTHING, which means that if EAX is
  936. X> non-zero (randomly) sioparam() is called and garbles the output.
  937. X> 
  938. X> The Fix: (quick and dirty)
  939. X> Write a routine called "ttiocom", which might look like this:
  940. X> 
  941. X> ttiocom(ttyp, com, arg, flag)
  942. X> struct tty *ttyp;
  943. X> int com, arg, flag;    /* there should be better types for this :-) */
  944. X> {
  945. X>     if (com == IOC_SELECT)
  946. X>     {
  947. X>         ttselect(ttyp, flag);
  948. X>         return(0);    /*** THIS IS IMPORTANT ***/
  949. X>     }
  950. X>     return(Ttiocom(ttyp, com ,arg, flag));
  951. X> }
  952. X> 
  953. X> Compile something like this, then use whatever you have (GNU-Emacs is
  954. X> great in patching strings in binaries) to patch /usr/sys/sys/libsys.a
  955. X> to change the original ttiocom into Ttiocom !
  956. X> Link in your code and -by some magic reason- experience a full blown
  957. X> select on your System V / Xenix machine!!!
  958. X> 
  959. X> Have fun playing around with it -
  960. X> 
  961. X>     Clemens Schrimpe, netCS Informationstechnik GmbH Berlin
  962. X> --
  963. X> UUCP:        csch@netcs        BITNET:    csch@db0tui6.BITNET
  964. X> ARPA/NSF:    csch@garp.mit.edu    PSI: PSI%45300033047::CSCH
  965. X> PHONE:        +49-30-24 42 37        FAX: +49-30-24 38 00
  966. X> BTX:        0303325016-0003        TELEX: 186672 net d
  967. X
  968. X
  969. SHAR_EOF
  970. chmod 0644 xsel386/select-update ||
  971. echo 'restore of xsel386/select-update failed'
  972. Wc_c="`wc -c < 'xsel386/select-update'`"
  973. test 2981 -eq "$Wc_c" ||
  974.     echo 'xsel386/select-update: original size 2981, current size' "$Wc_c"
  975. rm -f _shar_wnt_.tmp
  976. fi
  977. # ============= xsel386/select.asm ==============
  978. if test -f 'xsel386/select.asm' -a X"$1" != X"-c"; then
  979.     echo 'x - skipping xsel386/select.asm (File already exists)'
  980.     rm -f _shar_wnt_.tmp
  981. else
  982. > _shar_wnt_.tmp
  983. echo 'x - extracting xsel386/select.asm (Text)'
  984. sed 's/^X//' << 'SHAR_EOF' > 'xsel386/select.asm' &&
  985. X;  CHK=0x1E37
  986. X;+----------------------------------------------------------
  987. X; select(S)
  988. X;
  989. X;#include <stdio.h>
  990. X;#include <sys/select.h>
  991. X;#include <fcntl.h>
  992. X;
  993. X;main(argc,argv,envp)
  994. X;int argc;
  995. X;char **argv;
  996. X;char **envp;
  997. X;{
  998. X;struct timeval t;
  999. X;int readfds;
  1000. X;int fd = open("/dev/null",O_RDONLY,0);
  1001. X;
  1002. X;    readfds = 1<<fd | 1<<0;
  1003. X;
  1004. X;    t.tv_sec = 5;
  1005. X;    t.tv_usec = 0;
  1006. X;
  1007. X;    printf("%d\n",select(32,&readfds,0,0,&t));
  1008. X;    printf("%08x\n",readfds);
  1009. X;    exit(0);
  1010. X;}    /* end of main */
  1011. X;
  1012. X;-----------------------------------------------------------
  1013. X
  1014. X    title    select
  1015. X
  1016. X    .386
  1017. X
  1018. XSYSNUM    equ     2428h
  1019. X
  1020. Xextrn    _errno:dword
  1021. X
  1022. Xpublic  _select
  1023. X
  1024. X_TEXT    segment  dword use32 public 'CODE'
  1025. X    assume   cs: _TEXT
  1026. X_select    proc near
  1027. X    mov    eax, SYSNUM        ; Get system call number.
  1028. X
  1029. X    ;
  1030. X    ; I don't even pretend to understand masm syntax.  I tried
  1031. X    ; the following line (and variations) without any success.
  1032. X    ;
  1033. X
  1034. X;    call    far 7:0            ; Switch to kernel and call SYSNUM.
  1035. X
  1036. X    ;
  1037. X    ; Don't laugh, it works.
  1038. X    ;
  1039. X
  1040. X    db 9ah
  1041. X    dw 0,0
  1042. X    dw 7
  1043. X
  1044. X    jb    short _cerror        ; below == error.
  1045. X
  1046. X;    xor    eax, eax        ; zero return value (no error).
  1047. X    ret                ; done.
  1048. X
  1049. X_cerror:
  1050. X    mov    _errno, eax        ; Save error code in _errno.
  1051. X    mov    eax, -1            ; Return -1 (as error).
  1052. X    ret                ; done.
  1053. X
  1054. X_select    endp
  1055. X
  1056. X_TEXT    ends
  1057. X
  1058. X    end
  1059. X; vi: set tabstop=8 :
  1060. SHAR_EOF
  1061. chmod 0644 xsel386/select.asm ||
  1062. echo 'restore of xsel386/select.asm failed'
  1063. Wc_c="`wc -c < 'xsel386/select.asm'`"
  1064. test 1237 -eq "$Wc_c" ||
  1065.     echo 'xsel386/select.asm: original size 1237, current size' "$Wc_c"
  1066. rm -f _shar_wnt_.tmp
  1067. fi
  1068. # ============= xsel386/select.txt ==============
  1069. if test -f 'xsel386/select.txt' -a X"$1" != X"-c"; then
  1070.     echo 'x - skipping xsel386/select.txt (File already exists)'
  1071.     rm -f _shar_wnt_.tmp
  1072. else
  1073. > _shar_wnt_.tmp
  1074. echo 'x - extracting xsel386/select.txt (Text)'
  1075. sed 's/^X//' << 'SHAR_EOF' > 'xsel386/select.txt' &&
  1076. XNOTE from ...!gatech!emory!tridom!wht:
  1077. Xthe following is the mail message I originally received; with
  1078. Xa little tinkering, i got the select call to behave as advertised
  1079. Xin the BSD manual (my xenix is 386 2.3).  Added it to /lib/386/Slibx.a
  1080. Xand all is well for me.  Good luck.
  1081. X
  1082. X
  1083. XFrom emory!gatech!hubcap!ncrcae!ncr-sd!crash!elgar!ag Thu Feb  2 13:04:07 EST 1989
  1084. XArticle 4851 of comp.unix.xenix:
  1085. XPath: tridom!emory!gatech!hubcap!ncrcae!ncr-sd!crash!elgar!ag
  1086. X>From: ag@elgar.UUCP (Keith Gabryelski)
  1087. XNewsgroups: comp.unix.xenix
  1088. XSubject: select() on SCO XENIX 2.3.
  1089. XMessage-ID: <38@elgar.UUCP>
  1090. XDate: 24 Jan 89 04:54:17 GMT
  1091. XReply-To: ag@elgar.UUCP (Keith Gabryelski)
  1092. XOrganization: Elgar Corporation, San Diego, CA
  1093. XLines: 474
  1094. X
  1095. XA few days ago I was paging through my SCO XENIX 2.3.1 Release Notes
  1096. Xand found, on page 44 (section 16), a section describing 4BSD
  1097. Xenhancements to the current release of SCO XENIX.
  1098. X
  1099. Xselect(S) was mentioned specifically.
  1100. X
  1101. XI checked the rest of the 2.3 manuals to see if there was a clue on
  1102. Xhow to access select(); no dice.  I tried my 2.2 dev sys libraries to
  1103. Xsee if it had been supported in previous releases and just not
  1104. Xmentioned; negative.
  1105. X
  1106. XI decided to see if I could get select() to work on my system.  And
  1107. Xthat is what this article is about.
  1108. X
  1109. XI checked /xenix and found:
  1110. X
  1111. X    % nm xenix | grep select
  1112. X    nm: xenix: too many symbols to sort        # chuckle
  1113. X    0020:00015bec  T _select
  1114. X
  1115. XBingo!  I also found <sys/select.h> (which has a comment about
  1116. Xthe select(2) system call. :-) ).
  1117. X
  1118. XWhen a system call is made in a C program on a Unix system (eg
  1119. Xopen(2)), it actually links in a file from libc.a (/lib/libc.a) (in
  1120. Xthis case `open.o') written in assembly that loads a register with a
  1121. Xsystem call number and causes an exception to occur.  The `trap'
  1122. Xinstruction is used on the 68000, on a vax it's `chmk', and on a 370
  1123. Xit's `svc'.  Control is transfered to the kernel which (in the case of
  1124. Xthis particular exception) will index the register into a table
  1125. X(called the sysent table) to get the address of the actual routine in
  1126. Xkernel memory to call (_open).
  1127. X
  1128. XAt least under SCO XENIX this algorithm is modified somewhat.
  1129. X
  1130. XWhen a system call is made in a C program on a SCO XENIX system (eg
  1131. Xopen(S)), it links in a file from libc.a (/lib/386/Slibc.a) (in this
  1132. Xcase `open.o') written in assembly that loads the register `eax' with
  1133. Xa system call number and jumps to 7:0 which (a guess) is mapped to an
  1134. Xinstruction that switches into supervisory mode and jumps to the
  1135. Xroutine ioint (??) in the kernel address space.  The interrupt routine
  1136. Xhands the system call number (along with the user given arguments) to
  1137. X_trap with figures out what to sysent table to use (there are a few
  1138. Xunder SCO XENIX) and does the right thing.
  1139. X
  1140. XThe _open routine (in libc.a's open.o) would probably look something
  1141. Xlike:
  1142. X
  1143. X;
  1144. X; open - open a file for reading or writing
  1145. X;
  1146. X
  1147. X    title    open
  1148. X
  1149. X    .386
  1150. X
  1151. XSYSNUM    equ     5            ; open's system call number is `5'.
  1152. Xextrn    _errno:dword
  1153. X
  1154. Xpublic  _open
  1155. X
  1156. X_TEXT    segment  dword use32 public 'CODE'
  1157. X    assume   cs: _TEXT
  1158. X_open    proc near
  1159. X    mov    eax, SYSNUM        ; Get system call number.
  1160. X
  1161. X    ;
  1162. X    ; I don't even pretend to understand masm syntax.  I tried
  1163. X    ; the following line (and variations) without any success.
  1164. X    ;
  1165. X
  1166. X;    call    far 7:0            ; Switch to kernel and call SYSNUM.
  1167. X
  1168. X    ;
  1169. X    ; Don't laugh, it works.
  1170. X    ;
  1171. X
  1172. X    db 9ah
  1173. X    dw 0,0
  1174. X    dw 7
  1175. X
  1176. X    jb    short _cerror        ; below == error.
  1177. X
  1178. X    xor    eax, eax        ; zero return value (no error).
  1179. X    ret                ; done.
  1180. X
  1181. X_cerror:
  1182. X    mov    _errno, eax        ; Save error code in _errno.
  1183. X    mov    eax, -1            ; Return -1 (as error).
  1184. X    ret                ; done.
  1185. X
  1186. X_open    endp
  1187. X
  1188. X_TEXT    ends
  1189. X
  1190. X    end
  1191. X
  1192. XUnder SCO XENIX the sysent table (struct sysent in <sys/systm.h>) looks
  1193. Xsomething like:
  1194. X
  1195. Xstruct sysent
  1196. X{
  1197. X    unsigned char  sy_ret;     /* Type of return value (int, void ...) */
  1198. X    unsigned char  sy_arg386;     /* Number of 386 words args on stack */
  1199. X    unsigned char  sy_nlarg286;     /* # of 286 large model word args on stack */
  1200. X    unsigned char  sy_nmarg286;     /* 286 Small Middle: max # of args */
  1201. X    unsigned       sy_argmask;     /* Argument types on stack. */
  1202. X         int   (*sy_call)(); /* System call address in kernel */
  1203. X}
  1204. X
  1205. Xsy_ret is the type return of the value this system call returns.  `0'
  1206. Xseems to be INT and `6' is probably void.
  1207. X
  1208. Xsy_arg386 is the number of words the arguments for this system call
  1209. Xtake on the stack.
  1210. X
  1211. Xsy_nlarg286 and sy_nmarg286 are similar to sy_arg386 but used for
  1212. Xdoing 286 stuff.  I don't plan on mentioning the 286 stuff in this
  1213. Xarticle that much, it just isn't interesting to me.
  1214. X
  1215. Xsy_argmask is the type of args on the stack using the following table:
  1216. X
  1217. XNUM | SYMBOL  | 386 | 286L | EXPLANATION
  1218. X 0  |         |     |      | Arg not used.
  1219. X 1  | DATAP   |     2  |  1   | Arg is a data pointer; seg + address
  1220. X 2  | TEXTP   |     2  |  1   | Arg is a text pointer; seg + address
  1221. X 3  | CONST   |     1  |  1   | Arg is an int-sized constant 
  1222. X 4  | UCONST  |     1  |  1   | Arg is an unsigned int-sized constant
  1223. X 5  | LCONST  |  1  |  1   | Arg is a long-sized constant
  1224. X 6  | FDATAP  |     1  |  1   | Arg is FAR data pointer.
  1225. X 7  | SODATAP |  2  |      | 386: 32-bit offset.
  1226. X    |         |     |  1   | 286: low word is 16 bit data pointer offset,
  1227. X    |         |        |      |      high word is 16 bit selector.
  1228. X 8  | SOTEXTP |  2  |      | 386: 32-bit offset.
  1229. X    |         |     |  1   | 286: low word is 16 bit text pointer offset,
  1230. X    |         |        |      |      high word is 16 bit selector.
  1231. X
  1232. XEach nybble in sy_argmask represents one argument passed to the system
  1233. Xcall.  Bits 0-3 represent arg one; 4-7 arg two; 8-12 arg three; etc.
  1234. XA total of eight arguments (4 bits times 8 args = 32 bits in an int)
  1235. Xcan be passed to a function (although MASK, a macro used to make
  1236. Xsysent's sy_argmask field is limited to six arguments).
  1237. X
  1238. XNUM is the number (put in each nybble) represented by the SYMBOL (in
  1239. X<sys/systm.h>) that corresponds to the arg type EXPLANATION and takes
  1240. X[386|286] (depending on the model you are using) words on the user
  1241. Xstack.
  1242. X
  1243. XSo, for the open() system call: sy_argmask is 0x00000331 and sy_arg386
  1244. Xis 0x04.
  1245. X
  1246. X    open(char *path, int oflag, int mode);
  1247. X             ^^^^^^      ^^^        ^^^
  1248. X             DATAP       CONST      CONST
  1249. X
  1250. Xsy_call is the pointer to the function in kernel memory that should
  1251. Xhandle this system call request.
  1252. X
  1253. XThe sysent table on my system looks something like:
  1254. X
  1255. XSyscal Num | ret| 386| L  | SM |    Arg Types    | System Call 
  1256. Xsysent:
  1257. X    00     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _nosys
  1258. X    01     | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 1 | _rexit
  1259. X    02     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _fork    
  1260. X    03     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _read    
  1261. X    04     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _write
  1262. X    05     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 1 | _open    
  1263. X    06     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _close
  1264. X    07     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _wait    
  1265. X    08     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _creat    
  1266. X    09     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _link    
  1267. X    0a     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _unlink    
  1268. X    0b     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _exec
  1269. X    0c     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _chdir    
  1270. X    0d     | 00 | 00 | 00 | 05 | 0 0 0 0 0 0 0 0 | _gtime
  1271. X    0e     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 1 | _mknod       
  1272. X    0f     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _chmod       
  1273. X    10     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 1 | _chown       
  1274. X    11     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _brk
  1275. X    12     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _stat
  1276. X    13     | 00 | 04 | 03 | 05 | 0 0 0 0 0 3 5 3 | _seek 
  1277. X    14     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _getpid      
  1278. X    15     | 00 | 05 | 03 | 03 | 0 0 0 0 0 3 1 1 | _smount      
  1279. X    16     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _sumount     
  1280. X    17     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _setuid      
  1281. X    18     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _getuid      
  1282. X    19     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 5 | _stime       
  1283. X    1a     | 00 | 05 | 04 | 03 | 0 0 0 0 3 1 3 3 | _ptrace      
  1284. X    1b     | 00 | 01 | 01 | 04 | 0 0 0 0 0 0 0 3 | _alarm       
  1285. X    1c     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _fstat       
  1286. X    1d     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _pause       
  1287. X    1e     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _utime       
  1288. X    1f     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _stty        
  1289. X    20     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _gtty        
  1290. X    21     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _saccess     
  1291. X    22     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _nice        
  1292. X    23     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
  1293. X    24     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _sync        
  1294. X    25     | 00 | 02 | 02 | 03 | 0 0 0 0 0 0 3 3 | _kill        
  1295. X    26     | 00 | 00 | 01 | 00 | 0 0 0 0 0 0 0 0 |              
  1296. X    27     | 00 | 00 | 02 | 00 | 0 0 0 0 0 0 0 0 |              
  1297. X    28     | 00 | 00 | 03 | 00 | 0 0 0 0 0 0 0 0 |              
  1298. X    29     | 00 | 02 | 02 | 03 | 0 0 0 0 0 0 3 3 | _dup         
  1299. X    2a     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _pipe        
  1300. X    2b     | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 1 | _times       
  1301. X    2c     | 06 | 08 | 05 | 03 | 0 0 0 1 4 8 4 1 | _profil      
  1302. X    2d     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _lock        
  1303. X    2e     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _setgid      
  1304. X    2f     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _getgid      
  1305. X    30     | 00 | 03 | 02 | 02 | 0 0 0 0 0 0 2 3 | _ssig        
  1306. X    31     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _msgsys      
  1307. X    32     | 06 | 07 | 04 | 03 | 0 0 0 0 5 5 1 3 | _sysi86      
  1308. X    33     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _sysacct     
  1309. X    34     | 00 | 00 | 01 | 06 | 0 0 0 0 0 0 0 3 | _shmsys      
  1310. X    35     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _semsys      
  1311. X    36     | 00 | 04 | 03 | 03 | 0 0 0 0 0 7 3 3 | _ioctl       
  1312. X    37     | 00 | 00 | 04 | 00 | 0 0 0 0 0 0 0 0 |              
  1313. X    38     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1314. X    39     | 00 | 00 | 05 | 00 | 0 0 0 0 0 0 0 0 |              
  1315. X    3a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1316. X    3b     | 00 | 06 | 03 | 03 | 0 0 0 0 0 1 1 1 | _exece       
  1317. X    3c     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _umask       
  1318. X    3d     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _chroot      
  1319. X    3e     | 00 | 00 | 06 | 00 | 0 0 0 0 0 0 0 0 |              
  1320. X    3f     | 00 | 00 | 07 | 00 | 0 0 0 0 0 0 0 0 |              
  1321. X    40     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1322. X    41     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1323. X    42     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1324. X    43     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1325. X    44     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1326. X    45     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1327. X    46     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1328. X    47     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1329. X    48     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1330. X    49     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1331. X    4a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1332. X    4b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1333. X    4c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1334. X    4d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1335. X    4e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1336. X    4f     | 00 | 00 | 08 | 00 | 0 0 0 0 0 0 0 0 |              
  1337. X    50     | 00 | 00 | 09 | 00 | 0 0 0 0 0 0 0 0 |              
  1338. X    51     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _getdents    
  1339. X    52     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1340. X    53     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1341. X    54     | 00 | 00 | 0a | 00 | 0 0 0 0 0 0 0 0 |              
  1342. X    55     | 00 | 06 | 04 | 03 | 0 0 0 0 3 1 1 3 | _getmsg      
  1343. X    56     | 00 | 06 | 04 | 03 | 0 0 0 0 3 1 1 3 | _putmsg      
  1344. X    57     | 00 | 05 | 03 | 03 | 0 0 0 0 0 3 5 1 | _poll        
  1345. X    58     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1346. X    59     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1347. X    5a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1348. X    5b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1349. X    5c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1350. X    5d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1351. X    5e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1352. X    5f     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1353. X    60     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1354. X    61     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1355. X    62     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1356. X    63     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
  1357. X    64     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys
  1358. X    65     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1359. X    66     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1360. X    67     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1361. X    68     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1362. X    69     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1363. X    6a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1364. X    6b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1365. X    6c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1366. X    6d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1367. X    6e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1368. X    6f     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1369. X    70     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1370. X    71     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1371. X    72     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1372. X    73     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1373. X    74     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1374. X    75     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1375. X    76     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1376. X    77     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1377. X    78     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1378. X    79     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1379. X    7a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1380. X    7b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1381. X    7c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1382. X    7d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1383. X    7e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
  1384. X    7f     | 00 | 05 | 05 | 0a | 0 0 0 0 0 0 0 0 | _clocal     
  1385. X
  1386. X_v7sysent:
  1387. X
  1388. X    00     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
  1389. X    01     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _ftime   
  1390. X    02     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1391. X    03     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nullsys 
  1392. X    04     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1393. X    05     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1394. X    06     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1395. X    07     | 00 | 05 | 05 | 0a | 0 0 0 0 0 0 0 0 | _clocal  
  1396. X    08     | 00 | 00 | 00 | 08 | 0 0 0 0 0 0 0 0 | _cxenix  
  1397. X    09     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1398. X    0a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1399. X    0b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1400. X    
  1401. X_s3sysent:
  1402. X    01     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
  1403. X    02     | 00 | 06 | 04 | 03 | 0 0 0 0 3 3 1 1 | _statfs   
  1404. X    03     | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _fstatfs  
  1405. X    04     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _setpgrp  
  1406. X    05     | 00 | 00 | 00 | 08 | 0 0 0 0 0 0 0 0 | _cxenix   
  1407. X    06     | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _uadmin   
  1408. X    07     | 00 | 00 | 00 | 09 | 0 0 0 0 0 0 0 0 | _utssys   
  1409. X    08     | 00 | 03 | 03 | 03 | 0 0 0 0 0 3 3 3 | _fcntl    
  1410. X    09     | 00 | 03 | 02 | 05 | 0 0 0 0 0 0 5 3 | _ulimit   
  1411. X    0a     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 1 | _rmdir    
  1412. X    0b     | 00 | 00 | 02 | 03 | 0 0 0 0 0 0 3 1 | _mkdir    
  1413. X    0c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys    
  1414. X    
  1415. X_svidsysent:
  1416. X
  1417. X    01     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
  1418. X    02     | 00 | 06 | 04 | 03 | 0 0 0 0 3 3 1 1 | _statfs  
  1419. X    03     | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _fstatfs 
  1420. X    04     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _setpgrp 
  1421. X    05     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
  1422. X    06     | 00 | 00 | 03 | 03 | 0 0 0 0 0 1 3 3 | _uadmin  
  1423. X    07     | 00 | 00 | 00 | 09 | 0 0 0 0 0 0 0 0 | _utssys  
  1424. X    08     | 00 | 00 | 03 | 03 | 0 0 0 0 0 3 3 3 | _fcntl   
  1425. X    09     | 00 | 00 | 02 | 05 | 0 0 0 0 0 0 5 3 | _ulimit  
  1426. X    0a     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 1 | _rmdir   
  1427. X    0b     | 00 | 00 | 02 | 03 | 0 0 0 0 0 0 3 1 | _mkdir   
  1428. X    0c     | 00 | 00 | 03 | 03 | 0 0 0 0 0 0 0 0 | _nosys   
  1429. X
  1430. X_clentry: used for oem CLOCAL routines.  Empty on my system.
  1431. X
  1432. X_cxentry: used for SCO added stuff.
  1433. X
  1434. X    00     | 00 | 05 | 03 | 03 | 0 0 0 0 0 4 7 1 | _shutdown
  1435. X    01     | 00 | 04 | 03 | 03 | 0 0 0 0 0 7 3 3 | _locking
  1436. X    02     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _creatsem
  1437. X    03     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _opensem
  1438. X    04     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _sigsem
  1439. X    05     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _waitsem
  1440. X    06     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _nbwaitsem
  1441. X    07     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _rdchk
  1442. X    08     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _stkgrow
  1443. X    09     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys
  1444. X    0a     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 5 3 | _chsize
  1445. X    0b     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _ftime
  1446. X    0c     | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 5 | _nap
  1447. X    0d     | 00 | 05 | 04 | 01 | 0 0 0 0 3 4 3 1 | _sdget
  1448. X    0e     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdfree
  1449. X    0f     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 7 | _sdenter
  1450. X    10     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdleave
  1451. X    11     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdgetv
  1452. X    12     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 7 | _sdwaitv
  1453. X    13     | 00 | 05 | 03 | 01 | 0 0 0 0 0 7 5 3 | _brkctl
  1454. X    14     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys
  1455. X    15     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _nfs_sys
  1456. X    16     | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _msgctl
  1457. SHAR_EOF
  1458. true || echo 'restore of xsel386/select.txt failed'
  1459. fi
  1460. echo 'End of ecu320 part 34'
  1461. echo 'File xsel386/select.txt is continued in part 35'
  1462. echo 35 > _shar_seq_.tmp
  1463. exit 0
  1464.  
  1465. exit 0 # Just in case...
  1466.