home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume22 / ecu / patch03c < prev    next >
Encoding:
Text File  |  1991-08-28  |  48.5 KB  |  1,818 lines

  1. Newsgroups: comp.sources.misc
  2. From: Warren Tucker <wht@n4hgf.GA.US>
  3. Subject:  v22i072:  ecu - ECU async comm package rev 3.10, Patch03c/3
  4. Message-ID: <1991Aug28.030221.19538@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 4daf3c58e8f1646f8d13733d53a857ca
  6. Date: Wed, 28 Aug 1991 03:02:21 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Warren Tucker <wht@n4hgf.GA.US>
  10. Posting-number: Volume 22, Issue 72
  11. Archive-name: ecu/patch03c
  12. Environment: SCO, XENIX, ISC, SUNOS4.1, SYSVR4
  13. Patch-To: ecu: Volume 21, Issue 53-89
  14.  
  15. #!/bin/sh
  16. # this is ecu/patch3c (ECU 3.10 patch 3 part 3)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file PATCH3.01 continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 3; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test ! -f _shar_wnt_.tmp; then
  33.     echo 'x - still skipping PATCH3.01'
  34. else
  35. echo 'x - continuing file PATCH3.01'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'PATCH3.01' &&
  37. diff -c /export/home/wht/src/ecu312/ecuwinutil.c ./ecuwinutil.c
  38. *** /export/home/wht/src/ecu312/ecuwinutil.c    Sun Aug 25 17:28:30 1991
  39. --- ./ecuwinutil.c    Sun Aug 25 14:39:30 1991
  40. ***************
  41. *** 16,21 ****
  42. --- 16,22 ----
  43. X  
  44. X  --------------------------------------------------------------------------*/
  45. X  /*+:EDITS:*/
  46. + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
  47. X  /*:08-01-1991-03:52-wht@n4hgf-when editing string, set cursor to end */
  48. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  49. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  50. ***************
  51. *** 55,60 ****
  52. --- 56,62 ----
  53. X  unsigned char sHR = at_HR;
  54. X  
  55. X  int windows_active = 0;
  56. X  int ttymode_before_window_start;
  57. X  
  58. X  /*+-------------------------------------------------------------------------
  59. ***************
  60. *** 176,186 ****
  61. --- 178,192 ----
  62. X  WINDOW *win;
  63. X  {
  64. X  
  65. + #ifdef SVR4
  66. +     box(win,(unsigned long)sVR,(unsigned long)sHR);
  67. + #else
  68. X      box(win,sVR,sHR);
  69. X      wmove(win,0,0); waddch(win,(unsigned)sTL);
  70. X      wmove(win,win->_maxy - 1,0); waddch(win,(unsigned)sBL);
  71. X      wmove(win,win->_maxy - 1,win->_maxx - 1); waddch(win,(unsigned)sBR);
  72. X      wmove(win,0,win->_maxx - 1); waddch(win,(unsigned)sTR);
  73. + #endif
  74. X  
  75. X  }    /* end of winbox */
  76. X  
  77. diff -c /export/home/wht/src/ecu312/ecuxenix.c ./ecuxenix.c
  78. *** /export/home/wht/src/ecu312/ecuxenix.c    Sun Aug 25 17:29:23 1991
  79. --- ./ecuxenix.c    Fri Aug 23 14:22:11 1991
  80. ***************
  81. *** 423,428 ****
  82. --- 423,472 ----
  83. X  }    /* end of xbell */
  84. X  
  85. X  /*+-------------------------------------------------------------------------
  86. +     audio_play(file) - play a sound file
  87. + --------------------------------------------------------------------------*/
  88. + #ifdef sun4
  89. + void
  90. + audio_play(file)
  91. + char *file;
  92. + {
  93. + char cmd[1024];
  94. +     strcpy(cmd,"!cat ")
  95. +     strcat(cmd,file);
  96. +     strcat(cmd," | /usr/demo/SOUND/play");
  97. +     shell(cmd);
  98. + }    /* end of audio_play */
  99. + #endif
  100. + /*+-------------------------------------------------------------------------
  101. +     audio_notify(type) - "bell_notify" with audio
  102. + --------------------------------------------------------------------------*/
  103. + #ifdef sun4
  104. + void
  105. + audio_notify(type)
  106. + register type;
  107. + {
  108. +     switch(type)
  109. +     {
  110. +     case XBELL_DONE:
  111. +         file = "/usr/demo/SOUND/sounds/gong.au";
  112. +         break;
  113. +     case XBELL_ATTENTION:
  114. +         file = "/usr/demo/SOUND/sounds/whistle.au";
  115. +         break;
  116. +     case XBELL_C:
  117. +         file = "/usr/demo/SOUND/sounds/whistle.au";
  118. +         break;
  119. +     case XBELL_3T:
  120. +         file = "/usr/demo/SOUND/sounds/doorbell.au";
  121. +         break;
  122. +     default:
  123. +         break;
  124. +     }
  125. + }    /* end of audio_notify */
  126. + #endif
  127. + /*+-------------------------------------------------------------------------
  128. X      bell_alarm(xbell_type)
  129. X    ring bell on multiscreens; if morse driver included, use it instead
  130. X  --------------------------------------------------------------------------*/
  131. ***************
  132. *** 430,435 ****
  133. --- 474,480 ----
  134. X  bell_alarm(xbell_type)
  135. X  int xbell_type;
  136. X  {
  137. + #if defined(M_SYSV)
  138. X  register notify_fd;
  139. X  register fork_pid;
  140. X  static long notify_time = 0L;
  141. ***************
  142. *** 439,445 ****
  143. X  int ttnum;
  144. X  long time();
  145. X  
  146. - #if defined(M_SYSV)
  147. X  #if !(defined(WHT) && defined(MORSE))
  148. X      if(!tty_is_multiscreen)
  149. X      {
  150. --- 484,489 ----
  151. ***************
  152. *** 509,514 ****
  153. --- 553,561 ----
  154. X          bell_alarm(xbell_type);
  155. X      }
  156. X  #endif
  157. + #if defined(sun4)
  158. +     audio_notify(xbell_type);
  159. + #endif
  160. X  }    /* end of bell_notify */
  161. X  
  162. X  /*+-------------------------------------------------------------------------
  163. ***************
  164. *** 546,552 ****
  165. --- 593,601 ----
  166. X          case SIGUSR1:    cptr = "SIGUSR1"; break;
  167. X          case SIGUSR2:    cptr = "SIGUSR2"; break;
  168. X          case SIGCLD:    cptr = "SIGCLD"; break;
  169. + #if    defined(SIGPWR)
  170. X          case SIGPWR:    cptr = "SIGPWR"; break;
  171. + #endif
  172. X  #if    defined(SIGSTOP)
  173. X          case SIGSTOP:   cptr = "SIGSTOP"; break;
  174. X  #endif
  175. ***************
  176. *** 644,650 ****
  177. X      lr.buffer = buf;
  178. X      lr.bufsize = sizeof(buf);
  179. X      lr.delim = (char *)0;
  180. !     lr.echo = 0;
  181. X      sigint = 0;
  182. X  
  183. X      /*
  184. --- 693,699 ----
  185. X      lr.buffer = buf;
  186. X      lr.bufsize = sizeof(buf);
  187. X      lr.delim = (char *)0;
  188. !     lr.echo_flag = 0;
  189. X      sigint = 0;
  190. X  
  191. X      /*
  192. diff -c /export/home/wht/src/ecu312/ecuxfer.c ./ecuxfer.c
  193. *** /export/home/wht/src/ecu312/ecuxfer.c    Sun Aug 25 17:29:24 1991
  194. --- ./ecuxfer.c    Sun Aug 25 14:39:31 1991
  195. ***************
  196. *** 35,40 ****
  197. --- 35,41 ----
  198. X  
  199. X  --------------------------------------------------------------------------*/
  200. X  /*+:EDITS:*/
  201. + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
  202. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  203. X  /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
  204. X  /*:07-14-1991-18:18-wht@n4hgf-new ttygets functions */
  205. ***************
  206. *** 171,178 ****
  207. --- 172,183 ----
  208. X      if((itmp = strlen(msg)) == 0)
  209. X      {
  210. X          itmp2 = last_msglen + 2;
  211. + #ifdef SVR4
  212. +         whline(xfrw, (unsigned long)(sHR & 0x00ff), itmp2);
  213. + #else
  214. X          for(itmp = 0; itmp < itmp2; itmp++)
  215. X              waddch(xfrw,(unsigned)sHR);
  216. + #endif
  217. X          last_msglen = 0;
  218. X      }
  219. X      else
  220. ***************
  221. *** 193,200 ****
  222. --- 198,209 ----
  223. X          waddch(xfrw,' ');
  224. X          if((itmp2 = last_msglen - itmp) > 0)
  225. X          {
  226. + #ifdef SVR4
  227. +             whline(xfrw, (unsigned long)(sHR & 0x00ff), itmp2);
  228. + #else
  229. X              while(itmp2--)
  230. X                  waddch(xfrw,(unsigned)sHR);
  231. + #endif
  232. X          }
  233. X          last_msglen = itmp;        /* remember last message length */
  234. X      }
  235. diff -c /export/home/wht/src/ecu312/esdutil.c ./esdutil.c
  236. *** /export/home/wht/src/ecu312/esdutil.c    Thu Jul 25 12:57:00 1991
  237. --- ./esdutil.c    Sun Aug 25 23:44:31 1991
  238. ***************
  239. *** 35,40 ****
  240. --- 35,41 ----
  241. X  This is old code; give me a break
  242. X  -----------------------------------------------------------------*/
  243. X  /*+:EDITS:*/
  244. + /*:08-25-1991-23:20-root@n4hgf2-get_switches could overflow result string */
  245. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  246. X  /*:05-02-1991-04:12-wht@n4hgf-how did esdrealloc ever work? */
  247. X  /*:04-23-1991-04:33-wht@n4hgf-function name reorganization */
  248. ***************
  249. *** 762,779 ****
  250. X  
  251. X      switches_max--;
  252. X      *switches++ = '-';
  253. X      index++;
  254. !     while((itmp < switches_max) && (index < cb))
  255. X      {
  256. !         schar = *(pb + index++);
  257. X          if(isspace(schar))
  258. X              break;
  259. -         *switches++ = schar;
  260. X      }
  261. X  
  262. X      tesd->index = index;
  263. X      *switches = 0;
  264. !     return(0);
  265. X  
  266. X  }   /* end of get_switches() */
  267. X  
  268. --- 763,784 ----
  269. X  
  270. X      switches_max--;
  271. X      *switches++ = '-';
  272. +     switches_max--;
  273. X      index++;
  274. !     while(index < cb)
  275. X      {
  276. !         schar = *(pb + index);
  277. !         index++;
  278. !         if(switches_max > 0)
  279. !             *switches++ = schar;
  280. !         switches_max--;
  281. X          if(isspace(schar))
  282. X              break;
  283. X      }
  284. X  
  285. X      tesd->index = index;
  286. X      *switches = 0;
  287. !     return((switches_max < 0) ? eSwitchesTooLong : 0);
  288. X  
  289. X  }   /* end of get_switches() */
  290. X  
  291. diff -c /export/home/wht/src/ecu312/expresp.c ./expresp.c
  292. *** /export/home/wht/src/ecu312/expresp.c    Sun Aug 25 17:29:25 1991
  293. --- ./expresp.c    Mon Aug 26 00:09:24 1991
  294. ***************
  295. *** 125,131 ****
  296. X              lr.buffer = last_Speed_result;
  297. X              lr.bufsize = sizeof(last_Speed_result);
  298. X              lr.delim = "\n";
  299. !             lr.echo = 0;
  300. X              lgets_timeout(&lr);
  301. X              ftime(&now_timeb);
  302. X              ms_now = (now_timeb.time * 1000) + now_timeb.millitm;
  303. --- 125,131 ----
  304. X              lr.buffer = last_Speed_result;
  305. X              lr.bufsize = sizeof(last_Speed_result);
  306. X              lr.delim = "\n";
  307. !             lr.echo_flag = 0;
  308. X              lgets_timeout(&lr);
  309. X              ftime(&now_timeb);
  310. X              ms_now = (now_timeb.time * 1000) + now_timeb.millitm;
  311. ***************
  312. *** 433,438 ****
  313. --- 433,440 ----
  314. X  RETURN:
  315. X      esdfree(tesd);
  316. X      iv[0] = !!erc;
  317. +     if(proctrace)
  318. +         pprintf("$i00 = %7ld (0x%08lx,0%lo)\n",iv[0],iv[0],iv[0]);
  319. X      if(erc == eExpectRespondFail)
  320. X          erc = 0;
  321. X      return(erc);
  322. Common subdirectories: /export/home/wht/src/ecu312/fasi and ./fasi
  323. Common subdirectories: /export/home/wht/src/ecu312/gendial and ./gendial
  324. diff -c /export/home/wht/src/ecu312/hdbintf.c ./hdbintf.c
  325. *** /export/home/wht/src/ecu312/hdbintf.c    Sun Aug 25 17:28:32 1991
  326. --- ./hdbintf.c    Tue Aug 27 04:55:07 1991
  327. ***************
  328. *** 4,9 ****
  329. --- 4,10 ----
  330. X  #endif
  331. X  
  332. X  /* #define CHOOSE_DEBUG */
  333. + /* #defined CALL_DIALER_BY_ECUDIAL */    /* gendial makes use of this */
  334. X  
  335. X  /*+-------------------------------------------------------------------------
  336. X      hdbintf.c - HDB UUCP database and /etc/utmp interface routines
  337. ***************
  338. *** 12,17 ****
  339. --- 13,19 ----
  340. X    Defined functions:
  341. X      choose_device(type,baud)
  342. X      choose_line(baud)
  343. +     dialcodes_translate(phone)
  344. X      dialstr_translate(translate_list,to_translate)
  345. X      dvtype_match(typespec,dvtype)
  346. X      enddlent()
  347. ***************
  348. *** 25,35 ****
  349. --- 27,47 ----
  350. X      hdb_dial(presult)
  351. X      hdb_dial_error_text(errcode)
  352. X      hdb_init()
  353. +     strip_phone_num(sptr)
  354. X      ungetty_get_line()
  355. X      ungetty_return_line()
  356. X  
  357. + Date: Fri, 23 Aug 91 18:30:06 +0300 (MSD)
  358. + From: emory!hq.demos.su!ache (Andrew A. Chernov, canton Uri's citizen)
  359. + 1) HDB dialers may return connect speed as return code (!= 0)
  360. + 2) Using HDB Dialcodes file for phone numbers translation now
  361. +    (\D,\T escape sequence)
  362. X  --------------------------------------------------------------------------*/
  363. X  /*+:EDITS:*/
  364. + /*:08-27-1991-03:08-ache@hq.demos.su-pass dial prog name in lieu of "ECUdial" */
  365. + /*:08-27-1991-03:08-ache@hq.demos.su-dialer enhancement */
  366. + /*:08-25-1991-13:07-wht@n4hgf-apply ache@hq.demos.su patches */
  367. X  /*:08-10-1991-17:39-wht@n4hgf-US_WEGOTIT handling */
  368. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  369. X  /*:06-02-1991-17:42-wht@n4hgf-add getdvtype */
  370. ***************
  371. *** 52,57 ****
  372. --- 64,71 ----
  373. X  
  374. X  char *arg_token();
  375. X  char *skip_ld_break();
  376. + char *dialcodes_translate();
  377. + char *strip_phone_num();
  378. X  
  379. X  extern int errno;
  380. X  extern char kbdintr;        /* current input INTR */
  381. ***************
  382. *** 66,71 ****
  383. --- 80,86 ----
  384. X  FILE *fpdl = NULL;
  385. X  char *Devices_file = "/usr/lib/uucp/Devices";
  386. X  char *Dialers_file = "/usr/lib/uucp/Dialers";
  387. + char *Dialcodes_file = "/usr/lib/uucp/Dialcodes";
  388. X  char ungetty_ttyname[64] = "";
  389. X  
  390. X  /*+-------------------------------------------------------------------------
  391. ***************
  392. *** 278,283 ****
  393. --- 293,299 ----
  394. X              dve.high_baud = atoi(cptr + 1);
  395. X      }
  396. X      dve.dialprog = tokens[4];
  397. +     dve.token = tokens[5];
  398. X      return(&dve);
  399. X  
  400. X  }    /* end of getdvent */
  401. ***************
  402. *** 377,383 ****
  403. X  you must make sure any supplied regexp is a valid one, for regexp
  404. X  compilation errors are indistinguishable from other seach failures
  405. X  
  406. ! uses optimized implimentation of dvtype_match functionality
  407. X  --------------------------------------------------------------------------*/
  408. X  struct dvent *
  409. X  getdvtype(type)
  410. --- 393,399 ----
  411. X  you must make sure any supplied regexp is a valid one, for regexp
  412. X  compilation errors are indistinguishable from other seach failures
  413. X  
  414. ! uses optimized implementation of dvtype_match functionality
  415. X  --------------------------------------------------------------------------*/
  416. X  struct dvent *
  417. X  getdvtype(type)
  418. ***************
  419. *** 620,626 ****
  420. X                  if(itmp = line_locked(s32))
  421. X                      continue;
  422. X              case US_WEGOTIT:
  423. ! #if defined(WHT) && defined(SHARE_DEBUG)
  424. X                  ecu_log_event(getpid(),"looking for line found we own it");
  425. X  #endif
  426. X              case US_LOGIN:        /* enabled for login, idle */
  427. --- 636,642 ----
  428. X                  if(itmp = line_locked(s32))
  429. X                      continue;
  430. X              case US_WEGOTIT:
  431. ! #if defined(SHARE_DEBUG)
  432. X                  ecu_log_event(getpid(),"looking for line found we own it");
  433. X  #endif
  434. X              case US_LOGIN:        /* enabled for login, idle */
  435. ***************
  436. *** 844,855 ****
  437. X  char baudstr[10];
  438. X  char dbgstr[10];
  439. X  char dial_log[100];
  440. ! char stripped_num[64];
  441. X  char *sptr;
  442. X  char *dptr;
  443. X  static char stat_s20[20];
  444. X  ulong colors_at_entry = colors_current;
  445. X  extern char *make_char_graphic();
  446. X  #ifdef WHT    /* hack for immediate need ... make a real feature later */
  447. X  FILE *fp;
  448. X  char credit_file[128];
  449. --- 860,872 ----
  450. X  char baudstr[10];
  451. X  char dbgstr[10];
  452. X  char dial_log[100];
  453. ! char *stripped_num;
  454. X  char *sptr;
  455. X  char *dptr;
  456. X  static char stat_s20[20];
  457. X  ulong colors_at_entry = colors_current;
  458. X  extern char *make_char_graphic();
  459. + char token[128];        /* translated dialer token */
  460. X  #ifdef WHT    /* hack for immediate need ... make a real feature later */
  461. X  FILE *fp;
  462. X  char credit_file[128];
  463. ***************
  464. *** 902,921 ****
  465. X          return(4);
  466. X      }
  467. X  
  468. !     sptr = shm->Ltelno;
  469. !     dptr = stripped_num;
  470. !     while(*sptr)
  471. !     {
  472. !         if(strchr("()-",*sptr))
  473. !         {
  474. !             sptr++;
  475. !             continue;
  476. !         }
  477. !         *dptr++ = *sptr++;
  478. !     }
  479. !     *dptr = 0;
  480. X  
  481. X  #ifdef WHT    /* hack for immediate need ... make a real feature later */
  482. X      if(*(dptr - 1) == '$')
  483. X      {
  484. X          *--dptr = 0;
  485. --- 919,928 ----
  486. X          return(4);
  487. X      }
  488. X  
  489. !     stripped_num = strip_phone_num(shm->Ltelno);
  490. X  
  491. X  #ifdef WHT    /* hack for immediate need ... make a real feature later */
  492. +     dptr = stripped_num;
  493. X      if(*(dptr - 1) == '$')
  494. X      {
  495. X          *--dptr = 0;
  496. ***************
  497. *** 942,947 ****
  498. --- 949,994 ----
  499. X      }
  500. X  #endif /* WHT */
  501. X  
  502. +   /* Translate Token now */
  503. +     if (dve->token == (char *)0 || !dve->token[0])
  504. +         strcpy(token, stripped_num);
  505. +     else {
  506. +         dptr = token;
  507. +         for (sptr = dve->token; *sptr; sptr++)
  508. +             if (*sptr != '\\')
  509. +                 *dptr++ = *sptr;
  510. +             else {
  511. +                 char *s, *t;
  512. +                 switch (*(sptr + 1)) {
  513. +                 /* Direct */
  514. +                 case 'D':
  515. +                     sptr++;
  516. +                     s = stripped_num;
  517. +                 Dir:
  518. +                     while (*s)
  519. +                         *dptr++ = *s++;
  520. +                     break;
  521. +                 /* Dialcodes Translate */
  522. +                 case 'T':
  523. +                     sptr++;
  524. +                     s = stripped_num;
  525. +                     t = dialcodes_translate(&s);
  526. +                     while(*t)
  527. +                         *dptr++ = *t++;
  528. +                     goto Dir;
  529. +                 default:
  530. +                     *dptr++ = '\\';
  531. +                     break;
  532. +                 }
  533. +             }
  534. +         *dptr = 0;
  535. +     }
  536. X      pprintf("Type %s to abort ... ",
  537. X          (kbdintr == 0x7F) ? "DEL" : make_char_graphic(kbdintr,0));
  538. X  
  539. ***************
  540. *** 967,974 ****
  541. X          if((dial_pid = smart_fork()) == 0)
  542. X          {
  543. X              signal(SIGINT,SIG_DFL);
  544. !             execl(dve->dialprog,"ECUdial",dbgstr,
  545. !                 shm->Lline,stripped_num,
  546. X                  baudstr,(char *)0);
  547. X              exit(-1);
  548. X          }
  549. --- 1014,1029 ----
  550. X          if((dial_pid = smart_fork()) == 0)
  551. X          {
  552. X              signal(SIGINT,SIG_DFL);
  553. !             execl(dve->dialprog,
  554. ! #if defined(WHT) || defined(CALL_DIALER_BY_ECUDIAL)
  555. !                 "ECUdial",        /* I want to know ECU is calling */
  556. ! #else
  557. !                 dve->dialprog,    /* other dialers need to know how they
  558. !                                  * are being called
  559. !                                  */
  560. ! #endif
  561. !                 dbgstr,
  562. !                 shm->Lline,token,
  563. X                  baudstr,(char *)0);
  564. X              exit(-1);
  565. X          }
  566. ***************
  567. *** 992,998 ****
  568. X          if(wait_status)
  569. X          {
  570. X              sprintf(dial_log,"UUCPDIAL %s %s 0x%04x",
  571. !                 dve->dialprog,stripped_num,wait_status);
  572. X              ecu_log_event(getpid(),dial_log);
  573. X          }
  574. X  #endif
  575. --- 1047,1053 ----
  576. X          if(wait_status)
  577. X          {
  578. X              sprintf(dial_log,"UUCPDIAL %s %s 0x%04x",
  579. !                 dve->dialprog,token,wait_status);
  580. X              ecu_log_event(getpid(),dial_log);
  581. X          }
  582. X  #endif
  583. ***************
  584. *** 1003,1021 ****
  585. X          if(wait_status & 0xFF)
  586. X              wait_status = (RC_FAIL | RCE_SIG) << 8;
  587. X  
  588. -         if(!wait_status)
  589. -         {
  590. -             sprintf(stat_s20,"CONNECT %u",shm->Lbaud);
  591. -             *presult = stat_s20;    /* DCE_dial will report result code */
  592. -             return(0);
  593. -         }
  594. X          if((wait_status & 0xFF00) == 0xFF00)
  595. X          {
  596. X              pputs("uucp dial failure (see ~/.ecu/log) ... trying ecu dialer\n");
  597. X              return(4);
  598. X          }
  599. !         *presult = hdb_dial_error_text((wait_status >> 8) & 0xFF);
  600. X          setcolor(colors_error);
  601. X          pputs(*presult);
  602. X          setcolor(colors_at_entry);
  603. --- 1058,1112 ----
  604. X          if(wait_status & 0xFF)
  605. X              wait_status = (RC_FAIL | RCE_SIG) << 8;
  606. X  
  607. X          if((wait_status & 0xFF00) == 0xFF00)
  608. X          {
  609. X              pputs("uucp dial failure (see ~/.ecu/log) ... trying ecu dialer\n");
  610. X              return(4);
  611. X          }
  612. !         wait_status = (wait_status >> 8) & 0xFF;
  613. !         if(!(wait_status & ~RC_BAUD))
  614. !         {
  615. !             char *cptr;
  616. !             wait_status &= RC_BAUD;
  617. !             switch (wait_status) 
  618. !             {
  619. !             case 0:         cptr = baudstr; break;  /* SAME */
  620. !             case B50:       cptr = "50"; break;
  621. !             case B75:       cptr = "75"; break;
  622. !             case B110:      cptr = "110"; break;
  623. !             case B134:      cptr = "134.5"; break;
  624. !             case B150:      cptr = "150"; break;
  625. !             case B200:      cptr = "200"; break;
  626. !             case B300:      cptr = "300"; break;
  627. !             case B600:      cptr = "600"; break;
  628. !             case B1200:     cptr = "1200"; break;
  629. !             case B1800:     cptr = "1800"; break;
  630. !             case B2400:     cptr = "2400"; break;
  631. !             case B4800:     cptr = "4800"; break;
  632. !             case B9600:     cptr = "9600"; break;
  633. ! #if defined(B19200)
  634. !             case B19200:    cptr = "19200"; break;
  635. ! #endif
  636. ! #if defined(B38400)
  637. !             case B38400:    cptr = "38400"; break;
  638. ! #endif
  639. !             default:
  640. !                 switch (wait_status) {
  641. !                 case EXTA:      cptr = "EXTA"; break;
  642. !                 case EXTB:      cptr = "EXTB"; break;
  643. !                 default:        cptr = "????"; break;
  644. !                 }
  645. !             }
  646. !             sprintf(stat_s20,"CONNECT %s",cptr);
  647. !             *presult = stat_s20;    /* DCE_dial will report result code */
  648. !             return(0);
  649. !         }
  650. !         *presult = hdb_dial_error_text(wait_status);
  651. X          setcolor(colors_error);
  652. X          pputs(*presult);
  653. X          setcolor(colors_at_entry);
  654. ***************
  655. *** 1064,1069 ****
  656. --- 1155,1226 ----
  657. X      there_is_hdb_on_this_machine = !access(Devices_file,4);
  658. X  
  659. X  }    /* end of hdb_init */
  660. + /*+-------------------------------------------------------------------------
  661. + dialcodes_translate(phone)  -  translate first part of phone using Dialcodes
  662. + --------------------------------------------------------------------------*/
  663. + char *
  664. + dialcodes_translate(phone)
  665. + char **phone;
  666. + {
  667. + FILE *f;
  668. + int itmp;
  669. + #define MAX_DLC_TOKENS 2
  670. + char *tokens[MAX_DLC_TOKENS];
  671. + static char dlstr[128];
  672. +     if ((f = fopen(Dialcodes_file, "r")) == NULL)
  673. +         return "";
  674. +     while(1) {
  675. +         if(fgets(dlstr,sizeof(dlstr),f) == NULL)
  676. +             break;
  677. +         if(((itmp = strlen(dlstr)) > 0) && (dlstr[itmp - 1] == '\n'))
  678. +             dlstr[--itmp] = 0;
  679. +         if((dlstr[0] == '#') || (dlstr[0] == ' ') || (!itmp))
  680. +             continue;
  681. +         if(tokens[0] = arg_token(dlstr," \t\r\n"))
  682. +         {
  683. +             if (!(tokens[1] = arg_token((char *)0," \t\r\n")))
  684. +                 tokens[1] = "";
  685. +             itmp = strlen(tokens[0]);
  686. +             if (strncmp(*phone, tokens[0], itmp))
  687. +                 continue;
  688. +             fclose(f);
  689. +             *phone += itmp;
  690. +             return tokens[1];
  691. +         }
  692. +         break;
  693. +     }
  694. +     fclose(f);
  695. +     return "";
  696. + }
  697. + /*+-------------------------------------------------------------------------
  698. +       strip_phone_num(sptr)   -  remove junk characters from phone
  699. + --------------------------------------------------------------------------*/
  700. + char *
  701. + strip_phone_num(sptr)
  702. + char *sptr;
  703. + {
  704. + static char stripped_num[64];
  705. + char *dptr;
  706. +     dptr = stripped_num;
  707. +     while(*sptr)
  708. +     {
  709. +         if(*sptr == '(' || *sptr == ')')
  710. +         {
  711. +             sptr++;
  712. +             continue;
  713. +         }
  714. +         *dptr++ = *sptr++;
  715. +     }
  716. +     *dptr = 0;
  717. +     return stripped_num;
  718. + }
  719. X  
  720. X  /* vi: set tabstop=4 shiftwidth=4: */
  721. X  /* end of hdbintf.c */
  722. Common subdirectories: /export/home/wht/src/ecu312/help and ./help
  723. diff -c /export/home/wht/src/ecu312/kbdtest.c ./kbdtest.c
  724. *** /export/home/wht/src/ecu312/kbdtest.c    Thu Jul 25 12:58:00 1991
  725. --- ./kbdtest.c    Fri Aug 23 14:22:22 1991
  726. ***************
  727. *** 57,62 ****
  728. --- 57,64 ----
  729. X      if(arg)
  730. X      {
  731. X          (void)ioctl(TTYIN,TCGETA,&tv);
  732. +         Ltermio.c_cflag &= ~(CS8 | PARENB | PARODD);
  733. +         Ltermio.c_cflag |= CS8;
  734. X          tv.c_iflag &= ~(INLCR | ICRNL | IGNCR | IXOFF | IUCLC | ISTRIP);
  735. X          tv.c_oflag |= OPOST;
  736. X          tv.c_oflag &= ~(OLCUC | ONLCR | OCRNL | ONOCR | ONLRET);
  737. diff -c /export/home/wht/src/ecu312/kbdtest3.c ./kbdtest3.c
  738. *** /export/home/wht/src/ecu312/kbdtest3.c    Sun Aug 25 17:28:34 1991
  739. --- ./kbdtest3.c    Mon Aug 26 05:01:40 1991
  740. ***************
  741. *** 1,5 ****
  742. X  /* CHK=0x2F4F */
  743. ! char *revision = "1.01";
  744. X  /*+-----------------------------------------------------------------------
  745. X      kbdtest3.c -- test keyboard values
  746. X      wht@n4hgf.Mt-Park.GA.US
  747. --- 1,5 ----
  748. X  /* CHK=0x2F4F */
  749. ! char *revision = "1.02";
  750. X  /*+-----------------------------------------------------------------------
  751. X      kbdtest3.c -- test keyboard values
  752. X      wht@n4hgf.Mt-Park.GA.US
  753. ***************
  754. *** 17,22 ****
  755. --- 17,23 ----
  756. X      k3ttymode(arg)
  757. X      main(argc,argv)
  758. X      read_kbd_string(buf,max)
  759. +     termio_parity_text(cflag)
  760. X      tputstrs(strs)
  761. X      write_nonansi_desc(fp,buf,buflen,name)
  762. X      xtoasc(ch,incl_3char)
  763. ***************
  764. *** 23,28 ****
  765. --- 24,30 ----
  766. X  
  767. X  ------------------------------------------------------------------------*/
  768. X  /*+:EDITS:*/
  769. + /*:08-17-1991-13:58-root@n4hgf-make kbd entirely raw */
  770. X  /*:08-06-1991-13:12-wht@n4hgf-add parity reporting */
  771. X  /*:08-06-1991-13:12-wht@n4hgf-some terminals reinvent parity bit's use */
  772. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  773. ***************
  774. *** 266,273 ****
  775. X    if incl_3char set true, then space + ASCII assignment (e.g. "NUL") is
  776. X    appended to the string for non-printable graphics
  777. X  ------------------------------------------------------------------------*/
  778. ! char *xtoasc(ch,incl_3char)
  779. ! register char ch;
  780. X  int incl_3char;
  781. X  {
  782. X  static char gg[8];
  783. --- 268,276 ----
  784. X    if incl_3char set true, then space + ASCII assignment (e.g. "NUL") is
  785. X    appended to the string for non-printable graphics
  786. X  ------------------------------------------------------------------------*/
  787. ! char *
  788. ! xtoasc(ch,incl_3char)
  789. ! register unsigned char ch;
  790. X  int incl_3char;
  791. X  {
  792. X  static char gg[8];
  793. ***************
  794. *** 276,281 ****
  795. --- 279,286 ----
  796. X  
  797. X      if(ch == 0x7F)
  798. X          strcpy(gg,"del");
  799. +     else if(ch == 0x9b)
  800. +         strcpy(gg,"csi");
  801. X      else if(ch > 0x7F)
  802. X          sprintf(gg,"0x%02x",(unsigned char)ch);
  803. X      else if(ch > 0x20)
  804. ***************
  805. *** 297,303 ****
  806. X  void
  807. X  write_nonansi_desc(fp,buf,buflen,name)
  808. X  FILE *fp;
  809. ! char *buf;
  810. X  int buflen;
  811. X  char *name;
  812. X  {
  813. --- 302,308 ----
  814. X  void
  815. X  write_nonansi_desc(fp,buf,buflen,name)
  816. X  FILE *fp;
  817. ! unsigned char *buf;
  818. X  int buflen;
  819. X  char *name;
  820. X  {
  821. ***************
  822. *** 344,349 ****
  823. --- 349,356 ----
  824. X      if(arg)
  825. X      {
  826. X          (void)ioctl(TTYIN,TCGETA,&tv);
  827. +         tv.c_cflag &= ~(CS8 | PARENB | PARODD);
  828. +         tv.c_cflag |= CS8;
  829. X          tv.c_iflag &= ~(INLCR | ICRNL | IGNCR | IXOFF | IUCLC | ISTRIP);
  830. X          tv.c_lflag &= ~(ICANON | ISIG | ECHO);
  831. X          tv.c_cc[VEOF] = '\01';
  832. ***************
  833. *** 438,445 ****
  834. X      }
  835. X  
  836. X      ioctl(TTYIN,TCGETA,&tv0);        /* get original status */
  837. !     k3ttymode(2);
  838. !     parity_text = termio_parity_text(tv.c_cflag);
  839. X  
  840. X      if(!hex_out)
  841. X      {
  842. --- 445,451 ----
  843. X      }
  844. X  
  845. X      ioctl(TTYIN,TCGETA,&tv0);        /* get original status */
  846. !     parity_text = termio_parity_text(tv0.c_cflag);
  847. X  
  848. X      if(!hex_out)
  849. X      {
  850. ***************
  851. *** 447,458 ****
  852. X          if(!(ttype = getenv("TERM")))
  853. X              ttype = "??";
  854. X          time(&now);
  855. !         fprintf(fpout,"# nonansikey definition for TERM='%s'\n",ttype);
  856. X          fprintf(fpout,"# built by kbdtest3 %s %s",revision,ctime(&now));
  857. X          fprintf(fpout,"# keyboard parity required = %s\n",parity_text);
  858. X          fprintf(fpout,"# stty -a at kbdtest3 execution time:\n");
  859. X          fclose(fpout);
  860. !         sprintf(s128,"/bin/stty -a | /bin/sed -e 's/^/# /' >> %s\n",outfile);
  861. X          system(s128);
  862. X          if(!(fpout = fopen(outfile,"a")))
  863. X          {
  864. --- 453,489 ----
  865. X          if(!(ttype = getenv("TERM")))
  866. X              ttype = "??";
  867. X          time(&now);
  868. !         fprintf(fpout,"# nonansikey for '%s' under ",ttype);
  869. ! #if defined(M_SYSV)
  870. !         fputs("SCO\n",fpout);
  871. ! #else
  872. ! #if defined(ISC)
  873. !         fputs("ISC\n",fpout);
  874. ! #else
  875. ! #if defined(sun)
  876. !         fputs("SunOS\n",fpout);
  877. ! #else
  878. !         fputs("??? OS\n",fpout);
  879. ! #endif /* sun */
  880. ! #endif /* ISC */
  881. ! #endif /* M_SYSV */
  882. X          fprintf(fpout,"# built by kbdtest3 %s %s",revision,ctime(&now));
  883. X          fprintf(fpout,"# keyboard parity required = %s\n",parity_text);
  884. + #if defined(sun)
  885. + #ifdef notdef /* system() uses sockets $#@$^!&%# */
  886. +         fprintf(fpout,"# stty everything at kbdtest3 execution time:\n");
  887. +         fclose(fpout);
  888. +         strcpy(s128,"/usr/bin/stty everything | ");
  889. +         strcat(s128,"/usr/bin/sed -e 's/^/# /' >> ");
  890. +         strcat(s128,outfile);
  891. + #endif
  892. + #else
  893. X          fprintf(fpout,"# stty -a at kbdtest3 execution time:\n");
  894. X          fclose(fpout);
  895. !         strcpy(s128,"/bin/stty -a | /bin/sed -e 's/^/# /' >> ");
  896. !         strcat(s128,outfile);
  897. ! #endif
  898. X          system(s128);
  899. X          if(!(fpout = fopen(outfile,"a")))
  900. X          {
  901. ***************
  902. *** 462,468 ****
  903. --- 493,501 ----
  904. X          fprintf(fpout,"%s\n",ttype);
  905. X      }
  906. X  
  907. +     printf("Your keyboard driver parity is set to %s\n",parity_text);
  908. X      printf("press ^D (0x04) to terminate program early\n\n");
  909. +     k3ttymode(1);
  910. X  
  911. X      while(need->ecuname)
  912. X      {
  913. ***************
  914. *** 498,504 ****
  915. X                      need->ecuname);
  916. X              }
  917. X              else
  918. !                 write_nonansi_desc(fpout,instr,count,need->ecuname);
  919. X          }
  920. X  
  921. X          if((count == 1) && ((instr[0] & 0x7F) == 4))
  922. --- 531,540 ----
  923. X                      need->ecuname);
  924. X              }
  925. X              else
  926. !             {
  927. !                 write_nonansi_desc(fpout,(unsigned char *)instr,count,
  928. !                     need->ecuname);
  929. !             }
  930. X          }
  931. X  
  932. X          if((count == 1) && ((instr[0] & 0x7F) == 4))
  933. diff -c /export/home/wht/src/ecu312/logevent.c ./logevent.c
  934. *** /export/home/wht/src/ecu312/logevent.c    Wed Aug  7 14:23:00 1991
  935. --- ./logevent.c    Fri Aug 23 14:22:25 1991
  936. ***************
  937. *** 3,8 ****
  938. --- 3,9 ----
  939. X      wht@n4hgf.Mt-Park.GA.US
  940. X  --------------------------------------------------------------------------*/
  941. X  /*+:EDITS:*/
  942. + /*:08-21-1991-02:00-wht@n4hgf-sun does not have xenix locking - fix later */
  943. X  /*:08-07-1991-14:23-wht@n4hgf-use static logname */
  944. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  945. X  /*:09-19-1990-19:36-wht@n4hgf-ecu_log_event now gets pid for log from caller */
  946. ***************
  947. *** 9,15 ****
  948. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  949. X  
  950. X  #include <stdio.h>
  951. ! #include <sys/locking.h>
  952. X  #include "stdio_lint.h"
  953. X  #include "lint_args.h"
  954. X  
  955. --- 10,18 ----
  956. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  957. X  
  958. X  #include <stdio.h>
  959. ! #if defined(USE_LOCKING)
  960. ! # include <sys/locking.h>
  961. ! #endif
  962. X  #include "stdio_lint.h"
  963. X  #include "lint_args.h"
  964. X  
  965. ***************
  966. *** 32,38 ****
  967. --- 35,43 ----
  968. X      }
  969. X      if((ecu_log_fp = fopen(logname,"a")) != NULL)
  970. X      {
  971. + #if defined(USE_LOCKING)
  972. X          locking(fileno(ecu_log_fp),LK_LOCK,0L);
  973. + #endif
  974. X          get_tod(2,tstr256);
  975. X          tstr256[10] = '-';
  976. X          fputs(tstr256,ecu_log_fp);
  977. ***************
  978. *** 39,50 ****
  979. X          fprintf(ecu_log_fp,"-%05d-",pid);
  980. X          fputs(event_note,ecu_log_fp);
  981. X          fputs("\n",ecu_log_fp);
  982. X          fflush(ecu_log_fp);
  983. X          locking(fileno(ecu_log_fp),LK_UNLCK,0L);
  984. X          fclose(ecu_log_fp);
  985. X      }
  986. X  }    /* end of ecu_log_event */
  987. X  
  988. X  /* vi: set tabstop=4 shiftwidth=4: */
  989. X  /* end of logevent.c */
  990. --- 44,56 ----
  991. X          fprintf(ecu_log_fp,"-%05d-",pid);
  992. X          fputs(event_note,ecu_log_fp);
  993. X          fputs("\n",ecu_log_fp);
  994. + #if defined(USE_LOCKING)
  995. X          fflush(ecu_log_fp);
  996. X          locking(fileno(ecu_log_fp),LK_UNLCK,0L);
  997. + #endif
  998. X          fclose(ecu_log_fp);
  999. X      }
  1000. X  }    /* end of ecu_log_event */
  1001. X  
  1002. X  /* vi: set tabstop=4 shiftwidth=4: */
  1003. X  /* end of logevent.c */
  1004. diff -c /export/home/wht/src/ecu312/makedirs.c ./makedirs.c
  1005. *** /export/home/wht/src/ecu312/makedirs.c    Sun Aug 25 17:28:37 1991
  1006. --- ./makedirs.c    Fri Aug 23 14:39:36 1991
  1007. ***************
  1008. *** 2,7 ****
  1009. --- 2,8 ----
  1010. X      makedirs.c
  1011. X  --------------------------------------------------------------------------*/
  1012. X  /*+:EDITS:*/
  1013. + /*:08-23-1991-14:38-wht@n4hgf-was not making last subdirectory in list */
  1014. X  /*:08-09-1991-02:13-root@n4hgf-need smart_fork for XENIX */
  1015. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  1016. X  /*:07-15-1991-14:24-wht@n4hgf-creation */
  1017. ***************
  1018. *** 25,30 ****
  1019. --- 26,32 ----
  1020. X      int dmode = 0755;
  1021. X      char *dname;
  1022. X      struct stat stat_buf,*st = &stat_buf;
  1023. +     char s512[512];
  1024. X      extern char *optarg;
  1025. X      extern int optind;
  1026. X  
  1027. ***************
  1028. *** 59,65 ****
  1029. X          else
  1030. X          {
  1031. X              errno = ENOENT;        /* fake make_dirs */
  1032. !             if(!make_dirs(dname,dmode))
  1033. X              {
  1034. X                  perror(dname);
  1035. X                  exit(1);
  1036. --- 61,69 ----
  1037. X          else
  1038. X          {
  1039. X              errno = ENOENT;        /* fake make_dirs */
  1040. !             strcpy(s512,dname);
  1041. !             strcat(s512,"/dummy");
  1042. !             if(!make_dirs(s512,dmode))
  1043. X              {
  1044. X                  perror(dname);
  1045. X                  exit(1);
  1046. Common subdirectories: /export/home/wht/src/ecu312/mapkey and ./mapkey
  1047. diff -c /export/home/wht/src/ecu312/mkdirs.c ./mkdirs.c
  1048. *** /export/home/wht/src/ecu312/mkdirs.c    Sun Aug 25 17:28:37 1991
  1049. --- ./mkdirs.c    Sun Aug 25 14:21:45 1991
  1050. ***************
  1051. *** 1,27 ****
  1052. X  /* CHK=0x9A80 */
  1053. X  /*+-------------------------------------------------------------------------
  1054. !     mkdirs.c
  1055. X      wht@n4hgf.Mt-Park.GA.US
  1056. X  --------------------------------------------------------------------------*/
  1057. X  /*+:EDITS:*/
  1058. X  /*:08-09-1991-00:30-wht@n4hgf-no need for sys/wait.h + XENIX doesn't have it */
  1059. X  /*:08-06-1991-02:37-root@n4hgf-how did compile succeed without signal.h? */
  1060. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  1061. X  /*:07-15-1991-14:20-wht@n4hgf-creation */
  1062. X  
  1063. - #include <signal.h>
  1064. X  #include <string.h>
  1065. ! #if defined(ISC22)
  1066. ! #define _POSIX_SOURCE    /* yetch - for crock in types.h to
  1067. !                          * get wait.h to work
  1068. !                          */
  1069. ! #endif
  1070. X  #include <sys/types.h>
  1071. X  #include <sys/stat.h>
  1072. ! #include <sys/errno.h>
  1073. X  
  1074. - extern int errno;
  1075. X  /*+-------------------------------------------------------------------------
  1076. X      mkdir(dpath,dmode)
  1077. X  
  1078. --- 1,26 ----
  1079. X  /* CHK=0x9A80 */
  1080. X  /*+-------------------------------------------------------------------------
  1081. !     mkdirs.c - make multiple directories
  1082. X      wht@n4hgf.Mt-Park.GA.US
  1083. + XENIX lacks mkdir() to use elegant PD bersion by John Gilmore
  1084. X  --------------------------------------------------------------------------*/
  1085. X  /*+:EDITS:*/
  1086. + /*:08-25-1991-14:21-wht@n4hgf-XENIX code hinges on M_XENIX not !sun&&!isc etc */
  1087. X  /*:08-09-1991-00:30-wht@n4hgf-no need for sys/wait.h + XENIX doesn't have it */
  1088. X  /*:08-06-1991-02:37-root@n4hgf-how did compile succeed without signal.h? */
  1089. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  1090. X  /*:07-15-1991-14:20-wht@n4hgf-creation */
  1091. X  
  1092. X  #include <string.h>
  1093. ! #include <errno.h>
  1094. ! #if defined(M_XENIX)
  1095. ! #include <signal.h>
  1096. X  #include <sys/types.h>
  1097. X  #include <sys/stat.h>
  1098. ! #endif
  1099. X  
  1100. X  /*+-------------------------------------------------------------------------
  1101. X      mkdir(dpath,dmode)
  1102. X  
  1103. ***************
  1104. *** 28,34 ****
  1105. X   Directory-creating routines from Public Domain TAR by John Gilmore
  1106. X   Make a directory.  Compatible with the mkdir() system call on 4.2BSD.
  1107. X  --------------------------------------------------------------------------*/
  1108. ! #if !defined(M_UNIX) && !defined(ISC22)
  1109. X  #define    TERM_SIGNAL(status)        ((status) & 0x7F)
  1110. X  #define TERM_COREDUMP(status)    (((status) & 0x80) != 0)
  1111. X  #define TERM_VALUE(status)        ((status) >> 8)
  1112. --- 27,33 ----
  1113. X   Directory-creating routines from Public Domain TAR by John Gilmore
  1114. X   Make a directory.  Compatible with the mkdir() system call on 4.2BSD.
  1115. X  --------------------------------------------------------------------------*/
  1116. ! #if defined(M_XENIX)
  1117. X  #define    TERM_SIGNAL(status)        ((status) & 0x7F)
  1118. X  #define TERM_COREDUMP(status)    (((status) & 0x80) != 0)
  1119. X  #define TERM_VALUE(status)        ((status) >> 8)
  1120. Common subdirectories: /export/home/wht/src/ecu312/models and ./models
  1121. diff -c /export/home/wht/src/ecu312/nonansikey.c ./nonansikey.c
  1122. *** /export/home/wht/src/ecu312/nonansikey.c    Sun Aug 25 17:28:39 1991
  1123. --- ./nonansikey.c    Mon Aug 26 05:46:56 1991
  1124. ***************
  1125. *** 11,16 ****
  1126. --- 11,17 ----
  1127. X  
  1128. X  ------------------------------------------------------------------*/
  1129. X  /*+:EDITS:*/
  1130. + /*:08-26-1991-05:45-wht@n4hgf2-# got included in key def */
  1131. X  /*:08-06-1991-13:19-wht@n4hgf-allow any code as first in key sequence */
  1132. X  /*:08-03-1991-14:44-wht@n4hgf-look for nonansikeys in ECULIBDIR too */
  1133. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  1134. ***************
  1135. *** 31,36 ****
  1136. --- 32,38 ----
  1137. X  
  1138. X  KDE nonansi_key_table[KDE_COUNT];
  1139. X  char nonansi_key_name[32] = "";
  1140. + static FILE *nadbg = (FILE *)0;
  1141. X  
  1142. X  /*+-------------------------------------------------------------------------
  1143. X      nonansi_key_init()
  1144. ***************
  1145. *** 68,74 ****
  1146. X  register token_number = 0;
  1147. X  KDE *tkde = (KDE *)0;
  1148. X  int KDEt = 0;
  1149. ! int done = 0;
  1150. X  char *token_separator = ":";
  1151. X  char *token;
  1152. X  char *arg_token();
  1153. --- 70,76 ----
  1154. X  register token_number = 0;
  1155. X  KDE *tkde = (KDE *)0;
  1156. X  int KDEt = 0;
  1157. ! int octothorpe = 0;
  1158. X  char *token_separator = ":";
  1159. X  char *token;
  1160. X  char *arg_token();
  1161. ***************
  1162. *** 75,82 ****
  1163. X  char *str_token();
  1164. X  char *skip_ld_break();
  1165. X  
  1166. !     while(!done && (token = (token_number < 2) ? str_token(bufptr,":")
  1167. !                                                : arg_token(bufptr," \t")))
  1168. X      {
  1169. X          bufptr = (char *)0;    /* further calls to arg_token need NULL */
  1170. X          token = skip_ld_break(token);
  1171. --- 77,85 ----
  1172. X  char *str_token();
  1173. X  char *skip_ld_break();
  1174. X  
  1175. !     while(!octothorpe &&
  1176. !        (token = (token_number < 2) ? str_token(bufptr,":")
  1177. !                                    : arg_token(bufptr," \t")))
  1178. X      {
  1179. X          bufptr = (char *)0;    /* further calls to arg_token need NULL */
  1180. X          token = skip_ld_break(token);
  1181. ***************
  1182. *** 106,124 ****
  1183. X              case 2:        /* third field is first token of sequence */
  1184. X                  if(*token == '#')
  1185. X                      goto MISSING_SEQUENCE;
  1186. - #ifdef notdef    /* allow any char as first */
  1187. -                 if(((itmp = ascii_to_hex(token)) < 1) || (itmp >= SPACE))
  1188. -                 {    /* make sure it is non-printable */
  1189. -                     ff(se,
  1190. - "  %s: first char in sequence must be in the range 0x01 to 0x1F not '%s'\r\n",
  1191. -                         keyset_idstr(KDEt),token);
  1192. -                     return(-1);
  1193. -                 }
  1194. - #endif
  1195. X  
  1196. X              default:    /* third and subsequent to define key */
  1197. X                  if(*token == '#')
  1198. !                     done = 1;
  1199. X                  if(tkde->count == sizeof(tkde->str))
  1200. X                  {
  1201. X                      ff(se,"  %s: output count too long",
  1202. --- 109,121 ----
  1203. X              case 2:        /* third field is first token of sequence */
  1204. X                  if(*token == '#')
  1205. X                      goto MISSING_SEQUENCE;
  1206. X  
  1207. X              default:    /* third and subsequent to define key */
  1208. X                  if(*token == '#')
  1209. !                 {
  1210. !                     octothorpe = 1;
  1211. !                     break;
  1212. !                 }
  1213. X                  if(tkde->count == sizeof(tkde->str))
  1214. X                  {
  1215. X                      ff(se,"  %s: output count too long",
  1216. ***************
  1217. *** 136,141 ****
  1218. --- 133,141 ----
  1219. X                  break;
  1220. X          }    /* end of switch(token_number) */
  1221. X  
  1222. +         if(octothorpe)
  1223. +             break;
  1224. X          token_number++;
  1225. X  
  1226. X      }        /* end while not end of record */
  1227. ***************
  1228. *** 158,163 ****
  1229. --- 158,167 ----
  1230. X              /* special init string entry */
  1231. X              if(KDEt == KDEk_InitStr)
  1232. X                  fwrite(tkde->str,1,tkde->count,se);
  1233. + #if defined(NONANSI_DEBUG)
  1234. +             else
  1235. +                 hex_dump_fp(nadbg,tkde->str,tkde->count,keyset_idstr(KDEt),0);
  1236. + #endif
  1237. X              return(0);
  1238. X      }
  1239. X  
  1240. ***************
  1241. *** 177,182 ****
  1242. --- 181,190 ----
  1243. X  FILE *fp_keys;
  1244. X  int errstat = 0;
  1245. X  static char ecukeys_name[128];
  1246. + #if defined(NONANSI_DEBUG)
  1247. +     if(!nadbg)
  1248. +         nadbg = fopen("/tmp/nadbg.log","w");
  1249. + #endif
  1250. X  
  1251. X      nonansi_key_init();    /* clear any previous key defns */
  1252. X  
  1253. ***************
  1254. *** 213,219 ****
  1255. X      }
  1256. X      if(errstat)
  1257. X      {
  1258. !         ff(se,"terminal type '%s' not found in %s; unable to proceed\r\n",
  1259. X              name,ecukeys_name);
  1260. X          termecu(TERMECU_CONFIG_ERROR);
  1261. X      }
  1262. --- 221,227 ----
  1263. X      }
  1264. X      if(errstat)
  1265. X      {
  1266. !         ff(se,"terminal type '%s'\r\nnot found in %s; unable to proceed\r\n",
  1267. X              name,ecukeys_name);
  1268. X          termecu(TERMECU_CONFIG_ERROR);
  1269. X      }
  1270. ***************
  1271. *** 296,306 ****
  1272. X  register ikde;
  1273. X  register KDE *tkde;
  1274. X  int err_rtn = XF_no_way;
  1275. - #if defined(NONANSI_DEBUG)
  1276. - static FILE *nadbg = (FILE *)0;
  1277. -     if(!nadbg)
  1278. -         nadbg = fopen("/tmp/nadbg.log","w");
  1279. - #endif
  1280. X  
  1281. X      if(!buflen)
  1282. X          return(XF_not_yet);
  1283. --- 304,309 ----
  1284. ***************
  1285. *** 307,313 ****
  1286. X  
  1287. X  #if defined(NONANSI_DEBUG)
  1288. X      if(nadbg)
  1289. !         hex_dump_fp(nadbg,buf,buflen,"mapna",1);
  1290. X  #endif
  1291. X  
  1292. X      for(ikde = 0,tkde = nonansi_key_table; ikde < KDE_COUNT;
  1293. --- 310,316 ----
  1294. X  
  1295. X  #if defined(NONANSI_DEBUG)
  1296. X      if(nadbg)
  1297. !         hex_dump_fp(nadbg,buf,-buflen,"mapna",1);
  1298. X  #endif
  1299. X  
  1300. X      for(ikde = 0,tkde = nonansi_key_table; ikde < KDE_COUNT;
  1301. diff -c /export/home/wht/src/ecu312/patchlevel.h ./patchlevel.h
  1302. *** /export/home/wht/src/ecu312/patchlevel.h    Sun Aug 25 17:29:10 1991
  1303. --- ./patchlevel.h    Fri Aug 23 14:22:28 1991
  1304. ***************
  1305. *** 1 ****
  1306. ! #define PATCHLEVEL 12
  1307. --- 1 ----
  1308. ! #define PATCHLEVEL 13
  1309. diff -c /export/home/wht/src/ecu312/pc_scr.h ./pc_scr.h
  1310. *** /export/home/wht/src/ecu312/pc_scr.h    Thu Jul 25 12:58:00 1991
  1311. --- ./pc_scr.h    Sat Aug 24 22:07:04 1991
  1312. ***************
  1313. *** 18,24 ****
  1314. X  #define at_RT        0xB4    /* right hand T */
  1315. X  #define at_VR        0xB3    /* vertical rule */
  1316. X  #define at_HR        0xC4    /* horizontal rule */
  1317. X  /*
  1318. X   * non-ANSI equivalents
  1319. X   */
  1320. --- 18,23 ----
  1321. diff -c /export/home/wht/src/ecu312/pcmd.c ./pcmd.c
  1322. *** /export/home/wht/src/ecu312/pcmd.c    Sun Aug 25 17:29:26 1991
  1323. --- ./pcmd.c    Sun Aug 25 22:33:14 1991
  1324. ***************
  1325. *** 37,42 ****
  1326. --- 37,43 ----
  1327. X  
  1328. X  --------------------------------------------------------------------------*/
  1329. X  /*+:EDITS:*/
  1330. + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
  1331. X  /*:08-06-1991-21:18-wht@n4hgf-nap -m test wrong sense ... old bug! */
  1332. X  /*:08-05-1991-16:22-wht@n4hgf-add nap -1 return and proctrace */
  1333. X  /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  1334. ***************
  1335. *** 60,65 ****
  1336. --- 61,71 ----
  1337. X  
  1338. X  #define NAMED_VARIABLE_FLAG 0x1000L
  1339. X  
  1340. + #ifdef SVR4
  1341. + # include <sys/termiox.h>
  1342. + extern int hx_flag;
  1343. + #endif
  1344. X  extern int proctrace;
  1345. X  extern int rcvr_pid;
  1346. X  extern ulong colors_current;
  1347. ***************
  1348. *** 420,426 ****
  1349. X      lr.buffer = svptr->pb;
  1350. X      lr.bufsize = svptr->maxcb;
  1351. X      lr.delim = (tesd1) ? tesd1->pb : (char *)0;
  1352. !     lr.echo = (strchr(switches,'e') != (char *)0);
  1353. X      (void)lgets_timeout(&lr);
  1354. X      if(tesd1)
  1355. X          esdfree(tesd1);
  1356. --- 426,432 ----
  1357. X      lr.buffer = svptr->pb;
  1358. X      lr.bufsize = svptr->maxcb;
  1359. X      lr.delim = (tesd1) ? tesd1->pb : (char *)0;
  1360. !     lr.echo_flag = (strchr(switches,'e') != (char *)0);
  1361. X      (void)lgets_timeout(&lr);
  1362. X      if(tesd1)
  1363. X          esdfree(tesd1);
  1364. ***************
  1365. *** 1257,1270 ****
  1366. X      if(erc = get_alpha_zstr(param,new_rtscts,sizeof(new_rtscts)))
  1367. X          return(erc);
  1368. X  
  1369. ! #if defined(RTSFLOW)
  1370. X      lRTSCTS_control(yes_or_no(new_rtscts));
  1371. X  
  1372. X      if(proctrace)
  1373. X      {
  1374. X          pprintf("RTS %s CTS %s\n",
  1375. X              (Ltermio.c_cflag & RTSFLOW) ? "on" : "off",
  1376. X              (Ltermio.c_cflag & CTSFLOW) ? "on" : "off");
  1377. X      }
  1378. X  #else
  1379. X      if(proctrace)
  1380. --- 1263,1288 ----
  1381. X      if(erc = get_alpha_zstr(param,new_rtscts,sizeof(new_rtscts)))
  1382. X          return(erc);
  1383. X  
  1384. ! #if defined(RTSFLOW) || defined (SVR4) || defined(sun)
  1385. X      lRTSCTS_control(yes_or_no(new_rtscts));
  1386. X  
  1387. X      if(proctrace)
  1388. X      {
  1389. X          pprintf("RTS %s CTS %s\n",
  1390. + #ifdef SVR4
  1391. +             (hx_flag & RTSXOFF) ? "on" : "off",
  1392. +             (hx_flag & CTSXON) ? "on" : "off");
  1393. + #else
  1394. + #if defined(RTSFLOW)
  1395. X              (Ltermio.c_cflag & RTSFLOW) ? "on" : "off",
  1396. X              (Ltermio.c_cflag & CTSFLOW) ? "on" : "off");
  1397. + #else
  1398. + #if defined(sun)
  1399. +             "N/A",
  1400. +             (Ltermio.c_cflag & CRTSCTS) ? "on" : "off");
  1401. + #endif /* sun */
  1402. + #endif /* RTSFLOW */
  1403. + #endif /* SVR4 */
  1404. X      }
  1405. X  #else
  1406. X      if(proctrace)
  1407. diff -c /export/home/wht/src/ecu312/pprintf.c ./pprintf.c
  1408. *** /export/home/wht/src/ecu312/pprintf.c    Thu Jul 25 12:59:00 1991
  1409. --- ./pprintf.c    Fri Aug 23 14:22:38 1991
  1410. ***************
  1411. *** 9,14 ****
  1412. --- 9,15 ----
  1413. X    supplied too, in which case %p prints as a 16-bit segment offset.
  1414. X  --------------------------------------------------------------------------*/
  1415. X  /*+:EDITS:*/
  1416. + /*:08-21-1991-02:12-wht@n4hgf-handle char *sprintf */
  1417. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  1418. X  /*:01-09-1991-22:31-wht@n4hgf-ISC port */
  1419. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  1420. ***************
  1421. *** 82,88 ****
  1422. --- 83,94 ----
  1423. X              case 's':
  1424. X                  *tp++ = c;
  1425. X                  *tp = '\0';
  1426. + #if defined(INT_SPRINTF)
  1427. X                  dp += sprintf(dp,tempfmt,va_arg(args,char *));
  1428. + #else
  1429. +                 sprintf(dp,tempfmt,va_arg(args,char *));
  1430. +                 dp += strlen(dp);
  1431. + #endif
  1432. X                  break;
  1433. X              case 'u':
  1434. X              case 'x':
  1435. ***************
  1436. *** 93,102 ****
  1437. X                  *tp = '\0';
  1438. X  #if !defined(LONGINT)
  1439. X                  if(longflag)
  1440. X                      dp += sprintf(dp,tempfmt,va_arg(args,unsigned long));
  1441. !                 else
  1442. X  #endif
  1443. X                      dp += sprintf(dp,tempfmt,va_arg(args,unsigned));
  1444. X                  break;
  1445. X  #endif
  1446. X              case 'd':
  1447. --- 99,121 ----
  1448. X                  *tp = '\0';
  1449. X  #if !defined(LONGINT)
  1450. X                  if(longflag)
  1451. +                 {
  1452. + #if defined(INT_SPRINTF)
  1453. X                      dp += sprintf(dp,tempfmt,va_arg(args,unsigned long));
  1454. ! #else
  1455. !                     sprintf(dp,tempfmt,va_arg(args,unsigned long));
  1456. !                     dp += strlen(dp);
  1457. X  #endif
  1458. +                 }
  1459. +                 else
  1460. + #endif /* LONGINT */
  1461. +                 {
  1462. + #if defined(INT_SPRINTF)
  1463. X                      dp += sprintf(dp,tempfmt,va_arg(args,unsigned));
  1464. + #else
  1465. +                     sprintf(dp,tempfmt,va_arg(args,unsigned));
  1466. +                     dp += strlen(dp);
  1467. + #endif
  1468. X                  break;
  1469. X  #endif
  1470. X              case 'd':
  1471. ***************
  1472. *** 106,115 ****
  1473. --- 125,148 ----
  1474. X                  *tp = '\0';
  1475. X  #if !defined(LONGINT)
  1476. X                  if(longflag)
  1477. +                 {
  1478. + #if defined(INT_SPRINTF)
  1479. X                      dp += sprintf(dp,tempfmt,va_arg(args,long));
  1480. + #else
  1481. +                     sprintf(dp,tempfmt,va_arg(args,long));
  1482. +                     dp += strlen(dp);
  1483. + #endif
  1484. +                 }
  1485. X                  else
  1486. X  #endif
  1487. +                 {
  1488. + #if defined(INT_SPRINTF)
  1489. X                      dp += sprintf(dp,tempfmt,va_arg(args,int));
  1490. + #else
  1491. +                     sprintf(dp,tempfmt,va_arg(args,int));
  1492. +                     dp += strlen(dp);
  1493. + #endif
  1494. +                 }
  1495. X                  break;
  1496. X              case 'f':
  1497. X              case 'e':
  1498. ***************
  1499. *** 118,124 ****
  1500. --- 151,162 ----
  1501. X              case 'G':
  1502. X                  *tp++ = c;
  1503. X                  *tp = '\0';
  1504. + #if defined(INT_SPRINTF)
  1505. X                  dp += sprintf(dp,tempfmt,va_arg(args,double));
  1506. + #else
  1507. +                 sprintf(dp,tempfmt,va_arg(args,double));
  1508. +                 dp += strlen(dp);
  1509. + #endif
  1510. X                  break;
  1511. X              case 'p':
  1512. X  #if defined(M_I286)
  1513. ***************
  1514. *** 129,135 ****
  1515. --- 167,178 ----
  1516. X                  dp += sprintf(dp,"%04x:%04x",(int)tp,(int)((long)tp >> 16));
  1517. X  #endif /* M_SDATA */
  1518. X  #else
  1519. + #if defined(INT_SPRINTF)
  1520. X                  dp += sprintf(dp,"0x%08lx",va_arg(args,pointer));
  1521. + #else
  1522. +                 sprintf(dp,"0x%08lx",va_arg(args,pointer));
  1523. +                 dp += strlen(dp);
  1524. + #endif
  1525. X  #endif /* M_I286 */
  1526. X                  break;
  1527. X              case '-':
  1528. ***************
  1529. *** 157,163 ****
  1530. --- 200,211 ----
  1531. X  #endif
  1532. X                  goto continue_format;
  1533. X              case '*':
  1534. + #if defined(INT_SPRINTF)
  1535. X                  tp += sprintf(tp,"%d",va_arg(args,int));
  1536. + #else
  1537. +                 printf(tp,"%d",va_arg(args,int));
  1538. +                 tp += strlen(tp);
  1539. + #endif
  1540. X                  goto continue_format;
  1541. X              case '%':
  1542. X              default:
  1543. diff -c /export/home/wht/src/ecu312/proc.c ./proc.c
  1544. *** /export/home/wht/src/ecu312/proc.c    Thu Jul 25 12:59:00 1991
  1545. --- ./proc.c    Fri Aug 23 14:22:39 1991
  1546. ***************
  1547. *** 538,545 ****
  1548. --- 538,547 ----
  1549. X          }
  1550. X      }
  1551. X      pcb_stack[--proc_level] = (PCB *)0;
  1552. + #if 0
  1553. X      if(erc && !proc_level)
  1554. X          plog_control((char *)0);
  1555. + #endif
  1556. X      return(erc);
  1557. X  }    /* end of execute_proc */
  1558. X  
  1559. diff -c /export/home/wht/src/ecu312/proc_error.c ./proc_error.c
  1560. *** /export/home/wht/src/ecu312/proc_error.c    Thu Jul 25 12:59:00 1991
  1561. --- ./proc_error.c    Sun Aug 25 23:47:05 1991
  1562. ***************
  1563. *** 1,10 ****
  1564. ! /* CHK=0xD771 */
  1565. X  /*+-------------------------------------------------------------------------
  1566. X      proc_error.c - print ecu procedure error
  1567. X  --------------------------------------------------------------------------*/
  1568. X  /*+:EDITS:*/
  1569. ! /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  1570. ! /*:07-06-1991-22:58-build_err-creation from ecuerror.h */
  1571. X  
  1572. X  #include "ecu.h"
  1573. X  #include "ecuerror.h"
  1574. --- 1,9 ----
  1575. ! /* CHK=0xA7D5 */
  1576. X  /*+-------------------------------------------------------------------------
  1577. X      proc_error.c - print ecu procedure error
  1578. X  --------------------------------------------------------------------------*/
  1579. X  /*+:EDITS:*/
  1580. ! /*:08-25-1991-23:47-build_err-creation from ecuerror.h */
  1581. X  
  1582. X  #include "ecu.h"
  1583. X  #include "ecuerror.h"
  1584. ***************
  1585. *** 152,157 ****
  1586. --- 151,159 ----
  1587. X              break;
  1588. X          case eExpectRespondFail:
  1589. X              pputs("expect-respond failed\n");
  1590. +             break;
  1591. +         case eSwitchesTooLong:
  1592. +             pputs("switches too long\n");
  1593. X              break;
  1594. X          case eProcAttn_GOTO:
  1595. X              pputs("GOTO detected\n");
  1596. Common subdirectories: /export/home/wht/src/ecu312/sea and ./sea
  1597. Only in .: shar.fls
  1598. diff -c /export/home/wht/src/ecu312/smap.h ./smap.h
  1599. *** /export/home/wht/src/ecu312/smap.h    Thu Jul 25 12:59:00 1991
  1600. --- ./smap.h    Fri Aug 23 14:22:44 1991
  1601. ***************
  1602. *** 43,49 ****
  1603. --- 43,51 ----
  1604. X  VTYPE *malloc();
  1605. X  VTYPE *calloc();
  1606. X  VTYPE *realloc();
  1607. + #if !defined(sun)
  1608. X  void free();
  1609. + #endif
  1610. X  #else /* not NOMEMCHECK */
  1611. X  #ifndef malloc
  1612. X  #define malloc    _malloc
  1613. ***************
  1614. *** 53,59 ****
  1615. --- 55,63 ----
  1616. X  VTYPE *_malloc();
  1617. X  VTYPE *_calloc();
  1618. X  VTYPE *_realloc();
  1619. + #if !defined(sun)
  1620. X  void _free();
  1621. + #endif
  1622. X  #endif /* not malloc */
  1623. X  void    _blkstart();
  1624. X  void    _blkend();
  1625. diff -c /export/home/wht/src/ecu312/stdio_lint.h ./stdio_lint.h
  1626. *** /export/home/wht/src/ecu312/stdio_lint.h    Thu Jul 25 12:59:00 1991
  1627. --- ./stdio_lint.h    Sun Aug 25 14:39:31 1991
  1628. ***************
  1629. *** 3,8 ****
  1630. --- 3,9 ----
  1631. X      wht@n4hgf.Mt-Park.GA.US
  1632. X  --------------------------------------------------------------------------*/
  1633. X  /*+:EDITS:*/
  1634. + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
  1635. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  1636. X  /*:01-18-1991-11:55-wht@n4hgf-fix strchr/strrchr per steve@nshore.ncoast.org */
  1637. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  1638. ***************
  1639. *** 11,27 ****
  1640. X  char *gets(char *);
  1641. X  char *getenv(char *);
  1642. X  int access(char *,int);
  1643. X  int chmod(char *,int);
  1644. - int close(int);
  1645. X  int creat(char *,int);
  1646. X  int dup(int);
  1647. X  int fcloseall(void);
  1648. X  int isatty(int);
  1649. X  long lseek(int,long,int);
  1650. - int puts(char *);
  1651. X  int read(int,char *,unsigned int);
  1652. X  #ifndef __GNUC__
  1653. X  int stat(char *,struct stat *);
  1654. X  int fstat(int,struct stat *);
  1655. X  #endif
  1656. X  long time(long *);
  1657. --- 12,32 ----
  1658. X  char *gets(char *);
  1659. X  char *getenv(char *);
  1660. X  int access(char *,int);
  1661. + #ifndef SVR4
  1662. X  int chmod(char *,int);
  1663. X  int creat(char *,int);
  1664. + int puts(char *);
  1665. + #endif
  1666. + int close(int);
  1667. X  int dup(int);
  1668. X  int fcloseall(void);
  1669. X  int isatty(int);
  1670. X  long lseek(int,long,int);
  1671. X  int read(int,char *,unsigned int);
  1672. X  #ifndef __GNUC__
  1673. + #ifndef SVR4
  1674. X  int stat(char *,struct stat *);
  1675. + #endif
  1676. X  int fstat(int,struct stat *);
  1677. X  #endif
  1678. X  long time(long *);
  1679. ***************
  1680. *** 29,35 ****
  1681. X  int write(int,char *,unsigned int);
  1682. X  #else
  1683. X  char *fgets();
  1684. - void free();
  1685. X  char *getenv();
  1686. X  char *gets();
  1687. X  long ftell();
  1688. --- 34,39 ----
  1689. diff -c /export/home/wht/src/ecu312/utmpstat.c ./utmpstat.c
  1690. *** /export/home/wht/src/ecu312/utmpstat.c    Sun Aug 25 17:28:41 1991
  1691. --- ./utmpstat.c    Sun Aug 25 16:17:31 1991
  1692. ***************
  1693. *** 11,16 ****
  1694. --- 11,18 ----
  1695. X  
  1696. X  --------------------------------------------------------------------------*/
  1697. X  /*+:EDITS:*/
  1698. + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
  1699. + /*:08-21-1991-02:23-wht@n4hgf-sun port */
  1700. X  /*:08-10-1991-17:39-wht@n4hgf-US_WEGOTIT handling */
  1701. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  1702. X  /*:02-13-1991-02:00-ache@hq.demos.su-swap patch 5 US_ return values */
  1703. ***************
  1704. *** 28,40 ****
  1705. X  #include <errno.h>
  1706. X  #include <utmp.h>
  1707. X  
  1708. X  #if !defined(ut_name)        /* nobody can keep their mind made up; ... */
  1709. X  #define ut_name ut_user        /* ... this is getting verry difficult, very old */
  1710. X  #endif
  1711. X  
  1712. ! extern int errno;
  1713. X  char *utmp_file = "/etc/utmp";
  1714. X  struct utmp last_utmp;
  1715. X  
  1716. X  /*+-------------------------------------------------------------------------
  1717. --- 30,49 ----
  1718. X  #include <errno.h>
  1719. X  #include <utmp.h>
  1720. X  
  1721. + #if defined(sun)
  1722. + #define ut_id ut_host        //* fake debug info */
  1723. + #else
  1724. X  #if !defined(ut_name)        /* nobody can keep their mind made up; ... */
  1725. X  #define ut_name ut_user        /* ... this is getting verry difficult, very old */
  1726. X  #endif
  1727. + #endif /* sun */
  1728. X  
  1729. ! #if defined(SVR4)
  1730. ! char *utmp_file = "/var/adm/utmp";
  1731. ! #else
  1732. X  char *utmp_file = "/etc/utmp";
  1733. + #endif
  1734. X  struct utmp last_utmp;
  1735. X  
  1736. X  /*+-------------------------------------------------------------------------
  1737. ***************
  1738. *** 74,82 ****
  1739. X  utmp_status(line)
  1740. X  char *line;
  1741. X  {
  1742. X  register ufd;
  1743. X  int itmp;
  1744. - register status = US_NOTFOUND;
  1745. X  #if defined(LOG_UTMP)
  1746. X  char logstr[128];
  1747. X  #endif
  1748. --- 83,92 ----
  1749. X  utmp_status(line)
  1750. X  char *line;
  1751. X  {
  1752. + register status = US_NOTFOUND;
  1753. + #if !defined(sun)
  1754. X  register ufd;
  1755. X  int itmp;
  1756. X  #if defined(LOG_UTMP)
  1757. X  char logstr[128];
  1758. X  #endif
  1759. ***************
  1760. *** 142,147 ****
  1761. --- 152,158 ----
  1762. X  #endif
  1763. X  
  1764. X      close(ufd);
  1765. + #endif  /* sun */
  1766. X      return(status);
  1767. X  
  1768. X  }    /* end of utmp_status */
  1769. Common subdirectories: /export/home/wht/src/ecu312/xsel386 and ./xsel386
  1770. Common subdirectories: /export/home/wht/src/ecu312/z and ./z
  1771. SHAR_EOF
  1772. echo 'File PATCH3.01 is complete' &&
  1773. chmod 0664 PATCH3.01 ||
  1774. echo 'restore of PATCH3.01 failed'
  1775. Wc_c="`wc -c < 'PATCH3.01'`"
  1776. test 135045 -eq "$Wc_c" ||
  1777.     echo 'PATCH3.01: original size 135045, current size' "$Wc_c"
  1778. rm -f _shar_wnt_.tmp
  1779. fi
  1780. rm -f _shar_seq_.tmp
  1781. echo You have unpacked the last part
  1782. exit 0
  1783.  
  1784. exit 0 # Just in case...
  1785.