home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume32 / ecu / part34 < prev    next >
Encoding:
Text File  |  1992-09-14  |  57.0 KB  |  1,461 lines

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