home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-16 | 28.4 KB | 1,275 lines |
- :
- #-------------------------------------------------------
- # PATCH2.01
- # UNIX & ISC nap bug fix
- # created by gendiff x1.03 on 13 Aug 1991 20:04 UTC
- #-------------------------------------------------------
- *** /u1/src/ecu311/patchlevel.h Tue Aug 6 15:05:00 1991
- --- patchlevel.h Tue Aug 13 16:07:17 1991
- Prereq: 11
- ***************
- *** 1,1
- ! #define PATCHLEVEL 11
-
- --- 1,1 -----
- ! #define PATCHLEVEL 12
- *** /u1/src/ecu311/ecu.c Tue Aug 13 15:53:05 1991
- --- ecu.c Tue Aug 13 13:50:42 1991
- ***************
- *** 186,192
- hz = atoi(getenv("HZ"));
- else
- hz = HZ;
- ! hzmsec = (ulong)(1000 / hz) + 1;
-
- /*
- * if we are root (or setuid to root as we should be on 286 versions),
-
- --- 186,192 -----
- hz = atoi(getenv("HZ"));
- else
- hz = HZ;
- ! hzmsec = (ulong)(1000 / hz) + 2;
-
- /*
- * if we are root (or setuid to root as we should be on 286 versions),
- ***************
- *** 324,330
- */
- ff(se,
- "No problem, but just to warn you, the keyboard has parity enabled\r\n");
- ! nap(500L);
- }
-
- /* check out line */
-
- --- 324,330 -----
- */
- ff(se,
- "No problem, but just to warn you, the keyboard has parity enabled\r\n");
- ! Nap(500L);
- }
-
- /* check out line */
- ***************
- *** 343,349
- tcap_stand_end();
- ff(se,"\r\n");
- strcpy(shm->Lline,default_tty);
- ! nap(1000L);
- }
- }
- }
-
- --- 343,349 -----
- tcap_stand_end();
- ff(se,"\r\n");
- strcpy(shm->Lline,default_tty);
- ! Nap(1000L);
- }
- }
- }
- *** /u1/src/ecu311/ecu.h Tue Aug 13 15:53:05 1991
- --- ecu.h Tue Aug 13 13:58:20 1991
- ***************
- *** 3,8
- wht@n4hgf.Mt-Park.GA.US
- ------------------------------------------------------------------------*/
- /*+:EDITS:*/
- /*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
- /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- /*:01-25-1991-06:08-wht@n4hgf-mulltiple #define of ECULIBDIR */
-
- --- 3,9 -----
- wht@n4hgf.Mt-Park.GA.US
- ------------------------------------------------------------------------*/
- /*+:EDITS:*/
- + /*:08-13-1991-13:53-wht@n4hgf-UNIX and ISC nap() broken; XENIX still wins */
- /*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
- /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- /*:01-25-1991-06:08-wht@n4hgf-mulltiple #define of ECULIBDIR */
- ***************
- *** 88,93
- #if defined(MALLOC_3X)
- #include <malloc.h>
- #endif
-
- /*
- * prototyes or external declarations
-
- --- 89,96 -----
- #if defined(MALLOC_3X)
- #include <malloc.h>
- #endif
- +
- + long Nap();
-
- /*
- * prototyes or external declarations
- *** /u1/src/ecu311/ecuDCE.c Thu Jul 25 12:55:00 1991
- --- ecuDCE.c Tue Aug 13 13:50:42 1991
- ***************
- *** 43,49
- #include "relop.h"
-
- long time();
- ! long nap();
-
- char *make_char_graphic();
- void DCE_hangup();
-
- --- 43,49 -----
- #include "relop.h"
-
- long time();
- ! long Nap();
-
- char *make_char_graphic();
- void DCE_hangup();
- ***************
- *** 345,351
- DCE_read_modem_init();
-
- lputs_paced(0,"\b\b\b\b\b\b\b\b\b\r");
- ! (void)nap(200L);
- lflush(0);
-
- while(!shm->Lmodem_already_init)
-
- --- 345,351 -----
- DCE_read_modem_init();
-
- lputs_paced(0,"\b\b\b\b\b\b\b\b\b\r");
- ! (void)Nap(200L);
- lflush(0);
-
- while(!shm->Lmodem_already_init)
- ***************
- *** 361,367
- {
- ltoggle_dtr();
- lputs_paced(0,"AT\r");
- ! (void)nap(400L);
- lputs_paced(0,"ATQ0V1E1\r");
- (void)nap(400L);
- }
-
- --- 361,367 -----
- {
- ltoggle_dtr();
- lputs_paced(0,"AT\r");
- ! (void)Nap(400L);
- lputs_paced(0,"ATQ0V1E1\r");
- (void)Nap(400L);
- }
- ***************
- *** 363,369
- lputs_paced(0,"AT\r");
- (void)nap(400L);
- lputs_paced(0,"ATQ0V1E1\r");
- ! (void)nap(400L);
- }
-
- lflush(0);
-
- --- 363,369 -----
- lputs_paced(0,"AT\r");
- (void)Nap(400L);
- lputs_paced(0,"ATQ0V1E1\r");
- ! (void)Nap(400L);
- }
-
- lflush(0);
- ***************
- *** 374,380
- {
- lputc_paced(0,*cmd++);
- if(++itmp < 2)
- ! (void)nap(40L);
- if((itmp = lgetc_timeout(500L)) < 0)
- {
- if(sigint)
-
- --- 374,380 -----
- {
- lputc_paced(0,*cmd++);
- if(++itmp < 2)
- ! (void)Nap(40L);
- if((itmp = lgetc_timeout(500L)) < 0)
- {
- if(sigint)
- ***************
- *** 438,444
- register itmp;
-
- DCE_modem_init();
- ! (void)nap(600L);
-
- lflush(0);
- #ifdef NEUROTIC
-
- --- 438,444 -----
- register itmp;
-
- DCE_modem_init();
- ! (void)Nap(600L);
-
- lflush(0);
- #ifdef NEUROTIC
- ***************
- *** 446,452
- {
- lputc_paced(20,*cmd++);
- if(++char_count < 2)
- ! (void)nap(40L);
- if((itmp = lgetc_timeout(500L)) < 0)
- return(-1);
- pputc(itmp);
-
- --- 446,452 -----
- {
- lputc_paced(20,*cmd++);
- if(++char_count < 2)
- ! (void)Nap(40L);
- if((itmp = lgetc_timeout(500L)) < 0)
- return(-1);
- pputc(itmp);
- ***************
- *** 624,630
- setcolor(colors_error);
- pprintf("%s\n",result);
- lputc(0); /* make modem go on hook */
- ! (void)nap(40L);
- lputc(0);
- sigint = 0;
- (void)DCE_get_result(2000L); /* wait for NO CARRIER */
-
- --- 624,630 -----
- setcolor(colors_error);
- pprintf("%s\n",result);
- lputc(0); /* make modem go on hook */
- ! (void)Nap(40L);
- lputc(0);
- sigint = 0;
- (void)DCE_get_result(2000L); /* wait for NO CARRIER */
- ***************
- *** 849,855
- delay,(kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
- while(nap_msec > 0)
- {
- ! nap_msec -= nap(100L);
- while(rdchk(0))
- {
- ans = to_lower(ttygetc(1));
-
- --- 849,855 -----
- delay,(kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
- while(nap_msec > 0)
- {
- ! nap_msec -= Nap(100L);
- while(rdchk(0))
- {
- ans = to_lower(ttygetc(1));
- ***************
- *** 1014,1020
- {
- if(!Lmodem_autoans[0])
- return;
- ! (void)nap(200L);
- lputs_paced(20,"AT\r");
- (void)nap(100L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
-
- --- 1014,1020 -----
- {
- if(!Lmodem_autoans[0])
- return;
- ! (void)Nap(200L);
- lputs_paced(20,"AT\r");
- (void)Nap(100L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- ***************
- *** 1016,1022
- return;
- (void)nap(200L);
- lputs_paced(20,"AT\r");
- ! (void)nap(100L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- (void)nap(200L);
-
- --- 1016,1022 -----
- return;
- (void)Nap(200L);
- lputs_paced(20,"AT\r");
- ! (void)Nap(100L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- (void)Nap(200L);
- ***************
- *** 1019,1025
- (void)nap(100L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- ! (void)nap(200L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- (void)nap(200L);
-
- --- 1019,1025 -----
- (void)Nap(100L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- ! (void)Nap(200L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- (void)Nap(200L);
- ***************
- *** 1022,1028
- (void)nap(200L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- ! (void)nap(200L);
- lflush(0);
- } /* end of DCE_autoanswer */
-
-
- --- 1022,1028 -----
- (void)Nap(200L);
- lputs_paced(20,Lmodem_autoans); /* quiet modem */
- lputs_paced(20,"\r");
- ! (void)Nap(200L);
- lflush(0);
- } /* end of DCE_autoanswer */
-
- *** /u1/src/ecu311/ecufinsert.c Thu Jul 25 12:55:00 1991
- --- ecufinsert.c Tue Aug 13 13:50:42 1991
- ***************
- *** 220,226
- while(*cptr)
- {
- lputc(*cptr++);
- ! nap(20L);
- while(rdchk(shm->Liofd))
- {
- rchar = lgetc_xmtr();
-
- --- 220,226 -----
- while(*cptr)
- {
- lputc(*cptr++);
- ! Nap(20L);
- while(rdchk(shm->Liofd))
- {
- rchar = lgetc_xmtr();
- ***************
- *** 233,239
- if(xmit_cr)
- {
- if(xmit_mode == 'p')
- ! nap(20L);
- lputc('\r');
- xmit_len++;
- }
-
- --- 233,239 -----
- if(xmit_cr)
- {
- if(xmit_mode == 'p')
- ! Nap(20L);
- lputc('\r');
- xmit_len++;
- }
- *** /u1/src/ecu311/ecufork.c Thu Jul 25 12:55:00 1991
- --- ecufork.c Tue Aug 13 13:50:43 1991
- ***************
- *** 38,44
- if((pid = fork()) >= 0)
- return(pid);
- if(count)
- ! nap(40L);
- }
- return(-1);
- } /* end of smart_fork */
-
- --- 38,44 -----
- if((pid = fork()) >= 0)
- return(pid);
- if(count)
- ! Nap(40L);
- }
- return(-1);
- } /* end of smart_fork */
- *** /u1/src/ecu311/ecuicmhist.c Tue Aug 13 15:53:09 1991
- --- ecuicmhist.c Tue Aug 13 15:25:25 1991
- ***************
- *** 106,117
- register ICMDH *icmdh = icmdh_tail;
- uchar delim;
-
- - if((func != XFcurup) && (func != XFhome))
- - {
- - ring_bell();
- - return(1);
- - }
- -
- if(!icmdh)
- {
- ff(se,"no interactive commands saved\r\n");
-
- --- 106,111 -----
- register ICMDH *icmdh = icmdh_tail;
- uchar delim;
-
- if(!icmdh)
- {
- ff(se," no interactive commands saved\r\n");
- ***************
- *** 114,120
-
- if(!icmdh)
- {
- ! ff(se,"no interactive commands saved\r\n");
- return(1);
- }
- while(1)
-
- --- 108,114 -----
-
- if(!icmdh)
- {
- ! ff(se," no interactive commands saved\r\n");
- return(1);
- }
- while(1)
- *** /u1/src/ecu311/eculine.c Tue Aug 13 15:53:10 1991
- --- eculine.c Tue Aug 13 13:50:44 1991
- ***************
- *** 192,198
- int delim_len;
- long quantum;
- long ltmp;
- ! long nap();
-
- delim_len = (lrwt->delim) ? strlen(lrwt->delim) : 0;
-
-
- --- 192,198 -----
- int delim_len;
- long quantum;
- long ltmp;
- ! long Nap();
-
- delim_len = (lrwt->delim) ? strlen(lrwt->delim) : 0;
-
- ***************
- *** 239,245
- *cptr = 0; /* init result string */
- while(timeout_counter--)
- {
- ! nap(quantum);
-
- if(check_sigint && sigint)
- goto INTERRUPTED;
-
- --- 239,245 -----
- *cptr = 0; /* init result string */
- while(timeout_counter--)
- {
- ! Nap(quantum);
-
- if(check_sigint && sigint)
- goto INTERRUPTED;
- ***************
- *** 410,416
- {
- uchar rtn_char;
- #if defined(NO_SELECT)
- ! long nap();
- long timeout;
-
- AGAIN:
-
- --- 410,416 -----
- {
- uchar rtn_char;
- #if defined(NO_SELECT)
- ! long Nap();
- long timeout;
-
- AGAIN:
- ***************
- *** 419,425
- {
- if(sigint)
- return(-1);
- ! if((timeout -= nap(hzmsec)) <= 0)
- return(-1);
- }
-
-
- --- 419,425 -----
- {
- if(sigint)
- return(-1);
- ! if((timeout -= Nap(hzmsec)) <= 0)
- return(-1);
- }
-
- ***************
- *** 595,601
- {
-
- lputc(lchar);
- ! nap((long)(pace_msec ? pace_msec : LPUTS_NAP_COUNT));
-
- } /* end of lputc_paced */
-
-
- --- 595,601 -----
- {
-
- lputc(lchar);
- ! Nap((long)(pace_msec ? pace_msec : LPUTS_NAP_COUNT));
-
- } /* end of lputc_paced */
-
- ***************
- *** 937,943
- b0t.c_cflag &= ~CBAUD;
-
- ioctl(shm->Liofd,TCSETA,(char *)&b0t); /* drop DTR */
- ! nap(1000L);
- ioctl(shm->Liofd,TCSETA,(char *)&Ltermio); /* raise DTR */
- nap(300L);
-
-
- --- 937,943 -----
- b0t.c_cflag &= ~CBAUD;
-
- ioctl(shm->Liofd,TCSETA,(char *)&b0t); /* drop DTR */
- ! Nap(1000L);
- ioctl(shm->Liofd,TCSETA,(char *)&Ltermio); /* raise DTR */
- Nap(300L);
-
- ***************
- *** 939,945
- ioctl(shm->Liofd,TCSETA,(char *)&b0t); /* drop DTR */
- nap(1000L);
- ioctl(shm->Liofd,TCSETA,(char *)&Ltermio); /* raise DTR */
- ! nap(300L);
-
- } /* end of ltoggle_dtr */
-
-
- --- 939,945 -----
- ioctl(shm->Liofd,TCSETA,(char *)&b0t); /* drop DTR */
- Nap(1000L);
- ioctl(shm->Liofd,TCSETA,(char *)&Ltermio); /* raise DTR */
- ! Nap(300L);
-
- } /* end of ltoggle_dtr */
-
- *** /u1/src/ecu311/ecuphone.c Tue Aug 13 15:53:12 1991
- --- ecuphone.c Tue Aug 13 13:50:44 1991
- ***************
- *** 491,497
- {
- dirw_bot_msg("created new (empty) directory file");
- ring_bell();
- ! nap(1000L);
- }
- goto TRY_OPEN;
- }
-
- --- 491,497 -----
- {
- dirw_bot_msg("created new (empty) directory file");
- ring_bell();
- ! Nap(1000L);
- }
- goto TRY_OPEN;
- }
- ***************
- *** 1700,1706
- close(itmp);
- dirw_bot_msg("created new (empty) directory file");
- ring_bell();
- ! nap(1000L);
- goto READ_LIST;
- }
- if(errno == ENOENT)
-
- --- 1700,1706 -----
- close(itmp);
- dirw_bot_msg("created new (empty) directory file");
- ring_bell();
- ! Nap(1000L);
- goto READ_LIST;
- }
- if(errno == ENOENT)
- ***************
- *** 1836,1842
- (kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
- while(nap_decisec--)
- {
- ! nap(100L);
- if(rdchk(0))
- {
- ans = to_lower(ttygetc(1));
-
- --- 1836,1842 -----
- (kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
- while(nap_decisec--)
- {
- ! Nap(100L);
- if(rdchk(0))
- {
- ans = to_lower(ttygetc(1));
- *** /u1/src/ecu311/ecuphrase.c Thu Jul 25 12:56:00 1991
- --- ecuphrase.c Tue Aug 13 13:50:45 1991
- ***************
- *** 196,202
- cptr++;
- if(!itmp)
- itmp = 1;
- ! nap((long)itmp * 100L);
- break;
- case 'a':
- itmp = atoi(cptr);
-
- --- 196,202 -----
- cptr++;
- if(!itmp)
- itmp = 1;
- ! Nap((long)itmp * 100L);
- break;
- case 'a':
- itmp = atoi(cptr);
- *** /u1/src/ecu311/ecuscrdump.c Thu Jul 25 12:56:00 1991
- --- ecuscrdump.c Tue Aug 13 13:50:45 1991
- ***************
- *** 85,91
- xbell(XBELL_DONE,1);
- #else
- ring_bell();
- ! nap(50L);
- ring_bell();
- #endif
- return;
-
- --- 85,91 -----
- xbell(XBELL_DONE,1);
- #else
- ring_bell();
- ! Nap(50L);
- ring_bell();
- #endif
- return;
- ***************
- *** 104,110
- {
- if(!rdchk(0))
- {
- ! nap(hzmsec * 3);
- if(!rdchk(0))
- break;
- }
-
- --- 104,110 -----
- {
- if(!rdchk(0))
- {
- ! Nap(hzmsec * 3);
- if(!rdchk(0))
- break;
- }
- *** /u1/src/ecu311/ecusetup.c Tue Aug 13 15:53:14 1991
- --- ecusetup.c Tue Aug 13 13:50:45 1991
- ***************
- *** 387,393
- setw_err_msg(cptr);
- if(!retries--)
- break;
- ! nap(1000L);
- setw_err_msg("");
- }
- setup_open_status();
-
- --- 387,393 -----
- setw_err_msg(cptr);
- if(!retries--)
- break;
- ! Nap(1000L);
- setw_err_msg("");
- }
- setup_open_status();
- *** /u1/src/ecu311/ecusighdl.c Thu Jul 25 12:56:00 1991
- --- ecusighdl.c Tue Aug 13 13:50:46 1991
- ***************
- *** 153,159
- if(kill(rcvr_pid,0) && (errno == ESRCH))
- break;
- errno = 0;
- ! nap(40L);
- wait_count--;
- }
- if(!wait_count)
-
- --- 153,159 -----
- if(kill(rcvr_pid,0) && (errno == ESRCH))
- break;
- errno = 0;
- ! Nap(40L);
- wait_count--;
- }
- if(!wait_count)
- ***************
- *** 161,167
- while(!kill(rcvr_pid,SIGKILL))
- {
- wait((int *)0);
- ! nap(40L);
- }
- }
- rcvr_pid = -1;
-
- --- 161,167 -----
- while(!kill(rcvr_pid,SIGKILL))
- {
- wait((int *)0);
- ! Nap(40L);
- }
- }
- rcvr_pid = -1;
- *** /u1/src/ecu311/ecutty.c Thu Jul 25 12:57:00 1991
- --- ecutty.c Tue Aug 13 14:55:55 1991
- ***************
- *** 797,802
- {
- itmp = 0;
- timeout_remaining = tty_escape_timeout;
- while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
- (timeout_remaining > 0))
- {
-
- --- 797,806 -----
- {
- itmp = 0;
- timeout_remaining = tty_escape_timeout;
- + #if defined(NAP_DEBUG)
- + ff(se,"timeout_remaining = %ld hzmsec=%ld\r\n",
- + timeout_remaining,hzmsec);
- + #endif
- while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
- (timeout_remaining > 0))
- {
- ***************
- *** 800,806
- while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
- (timeout_remaining > 0))
- {
- ! timeout_remaining -= nap(hzmsec);
- if(!rdchk(TTYIN))
- continue;
- read(TTYIN,(char *)&ctmp,1);
-
- --- 804,813 -----
- while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
- (timeout_remaining > 0))
- {
- ! timeout_remaining -= Nap(hzmsec);
- ! #if defined(NAP_DEBUG)
- ! ff(se,"timeout_remaining = %ld\r\n",timeout_remaining);
- ! #endif
- if(!rdchk(TTYIN))
- continue;
- read(TTYIN,(char *)&ctmp,1);
- ***************
- *** 849,854
- tgc_accum[0] = ctmp;
- tgc_accum[itmp = 1] = 0;
- timeout_remaining = tty_escape_timeout;
- while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
- (timeout_remaining > 0))
- {
-
- --- 856,865 -----
- tgc_accum[0] = ctmp;
- tgc_accum[itmp = 1] = 0;
- timeout_remaining = tty_escape_timeout;
- + #if defined(NAP_DEBUG)
- + ff(se,"timeout_remaining = %ld hzmsec=%ld\r\n",
- + timeout_remaining,hzmsec);
- + #endif
- while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
- (timeout_remaining > 0))
- {
- ***************
- *** 852,858
- while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
- (timeout_remaining > 0))
- {
- ! timeout_remaining -= nap(hzmsec);
- if(!rdchk(TTYIN))
- continue;
- read(TTYIN,(char *)&ctmp,1);
-
- --- 863,872 -----
- while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
- (timeout_remaining > 0))
- {
- ! timeout_remaining -= Nap(hzmsec);
- ! #if defined(NAP_DEBUG)
- ! ff(se,"timeout_remaining = %ld\r\n",timeout_remaining);
- ! #endif
- if(!rdchk(TTYIN))
- continue;
- read(TTYIN,(char *)&ctmp,1);
- *** /u1/src/ecu311/ecuutil.c Tue Aug 13 15:53:15 1991
- --- ecuutil.c Tue Aug 13 15:04:29 1991
- ***************
- *** 3,8
- wht@n4hgf.Mt-Park.GA.US
-
- Defined functions:
- arg_token(parsestr,termchars)
- ascii_name_to_hex(str3char)
- ascii_to_hex(ascii)
-
- --- 3,9 -----
- wht@n4hgf.Mt-Park.GA.US
-
- Defined functions:
- + Nap(msec)
- arg_token(parsestr,termchars)
- ascii_name_to_hex(str3char)
- ascii_to_hex(ascii)
- ***************
- *** 8,13
- ascii_to_hex(ascii)
- build_arg_array(cmd,arg,arg_max_quan,narg_rtn)
- build_str_array(str,arg,str_max_quan,nstr_rtn)
- disp_line_termio(fd,text)
- disp_stat(st)
- disp_termio(ttt,text)
-
- --- 9,16 -----
- ascii_to_hex(ascii)
- build_arg_array(cmd,arg,arg_max_quan,narg_rtn)
- build_str_array(str,arg,str_max_quan,nstr_rtn)
- + cfree(p,num,size)
- + defeat_optimize_to_work_around_bug(would_be_optimized)
- disp_line_termio(fd,text)
- disp_stat(st)
- disp_termio(ttt,text)
- ***************
- *** 11,17
- disp_line_termio(fd,text)
- disp_stat(st)
- disp_termio(ttt,text)
- ! errno_text(errno)
- find_shell_chars(command)
- get_curr_dir(cdir,cdir_max)
- get_home_dir(home_dir)
-
- --- 14,20 -----
- disp_line_termio(fd,text)
- disp_stat(st)
- disp_termio(ttt,text)
- ! errno_text(err_no)
- find_shell_chars(command)
- get_curr_dir(cdir,cdir_max)
- get_home_dir(home_dir)
- ***************
- *** 17,23
- get_home_dir(home_dir)
- hex_to_ascii_name(char_val)
- make_char_graphic(ch,incl_3char)
- - make_dirs(pathname)
- make_ecu_subdir()
- mem_cpy(dest,src,len);
- mkdir(dpath,dmode)
-
- --- 20,25 -----
- get_home_dir(home_dir)
- hex_to_ascii_name(char_val)
- make_char_graphic(ch,incl_3char)
- make_ecu_subdir()
- mem_cpy(dest,src,len)
- mode_map(mode,mode_str)
- ***************
- *** 19,26
- make_char_graphic(ch,incl_3char)
- make_dirs(pathname)
- make_ecu_subdir()
- ! mem_cpy(dest,src,len);
- ! mkdir(dpath,dmode)
- mode_map(mode,mode_str)
- pad_zstr_to_len(zstr,len)
- perror_errmsg(str)
-
- --- 21,27 -----
- hex_to_ascii_name(char_val)
- make_char_graphic(ch,incl_3char)
- make_ecu_subdir()
- ! mem_cpy(dest,src,len)
- mode_map(mode,mode_str)
- pad_zstr_to_len(zstr,len)
- perror_errmsg(str)
- ***************
- *** 27,32
- print_cwd(curdir,buf_size)
- skip_ld_break(zstr)
- str_token(parsestr,termchars)
- yes_or_no(strarg)
-
- ------------------------------------------------------------------------*/
-
- --- 28,34 -----
- print_cwd(curdir,buf_size)
- skip_ld_break(zstr)
- str_token(parsestr,termchars)
- + strip_trail_break(zstr)
- yes_or_no(strarg)
-
- ------------------------------------------------------------------------*/
- ***************
- *** 31,36
-
- ------------------------------------------------------------------------*/
- /*+:EDITS:*/
- /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- /*:04-16-1991-15:45-wht@n4hgf-gcc cannot use memmove */
- /*:03-18-1991-22:31-wht@n4hgf-ISC 2.2 has mkdir() */
-
- --- 33,39 -----
-
- ------------------------------------------------------------------------*/
- /*+:EDITS:*/
- + /*:08-13-1991-13:53-wht@n4hgf-UNIX and ISC nap() broken; XENIX still wins */
- /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- /*:04-16-1991-15:45-wht@n4hgf-gcc cannot use memmove */
- /*:03-18-1991-22:31-wht@n4hgf-ISC 2.2 has mkdir() */
- ***************
- *** 980,984
- } /* end of defeat_optimize_to_work_around_bug */
-
- #endif /* __GNUC__ */
- /* end of ecuutil.c */
- /* vi: set tabstop=4 shiftwidth=4: */
-
- --- 983,1056 -----
- } /* end of defeat_optimize_to_work_around_bug */
-
- #endif /* __GNUC__ */
- +
- + /*+-------------------------------------------------------------------------
- + Nap(msec) - wrapper for nap()
- +
- + ISC and SCO UNIX nap() misbehave. This kludge doesn't return the
- + proper value (the actual time slept), but at least it does not make
- + a mockery of the manual page. It says:
- +
- + NAP(S) UNIX System V NAP(S)
- +
- + Name
- + nap - suspends execution for a short interval
- +
- + Syntax
- + long nap(period)
- + long period;
- +
- + Description
- + The current process is suspended from execution for at least
- + the number of milliseconds specified by period, or until a
- + signal is received.
- +
- + Return Value
- + On successful completion, a long integer indicating the
- + number of milliseconds actually slept is returned. If the
- + process received a signal while napping, the return value
- + will be -1, and errno will be set to EINTR.
- +
- + See Also
- + sleep(S)
- +
- + Notes
- + This function is driven by the system clock, which in most
- + cases has a granularity of tens of milliseconds. This
- + function must be linked with the linker option -lx.
- +
- + It appears nap() under UNIX 3.2.x has departed virtually entirely from
- + the manual page. I'm beginning to look rather silly in several
- + milleus since I keep telling people SCO UNIX is a viable upgrade from
- + XENIX. But process control people need some kind of timing capability
- + less than one second and we can't do it with nap or select.
- +
- + nap(msec) is supposed to nap *at least* msec milliseconds. However,
- + if msec is specified less than 1000/HZ + 1, it will not nap at all.
- + This was true for 3.2.0 and 3.2.1.
- +
- + It is supposed to return the number of milliseconds it actually
- + slept. Instead, it appears to "save up" the values and return them in
- + lots of 1000. This behavior is true for 3.2.2.
- +
- + As it is nap() is nearly useless. I believe select() suffers
- + from the same deficiency (< 1000 msec timeout becomes 1000 msec) but
- + I haven't "proven" it yet.
- + --------------------------------------------------------------------------*/
- + long
- + Nap(msec)
- + long msec;
- + {
- + #if defined(M_XENIX) || defined(WORKING_UNIX_NAP)
- + return(nap(msec));
- + #else
- + if(msec < hzmsec)
- + msec = hzmsec;
- + if(nap(msec) < 0)
- + return(-1);
- + return(msec);
- + #endif
- + } /* end of Nap */
- +
- /* end of ecuutil.c */
- /* vi: set tabstop=4 shiftwidth=4: */
- *** /u1/src/ecu311/ecuxenix.c Thu Jul 25 12:57:00 1991
- --- ecuxenix.c Tue Aug 13 15:28:52 1991
- ***************
- *** 20,25
- This module is a grab bag for historical reasons. Needs reorg.
- ------------------------------------------------------------------*/
- /*+:EDITS:*/
- /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
- /*:07-14-1991-18:18-wht@n4hgf-new ttygets functions */
-
- --- 20,26 -----
- This module is a grab bag for historical reasons. Needs reorg.
- ------------------------------------------------------------------*/
- /*+:EDITS:*/
- + /*:08-13-1991-15:28-wht@n4hgf-more problems with history manager */
- /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
- /*:07-14-1991-18:18-wht@n4hgf-new ttygets functions */
- ***************
- *** 163,169
- switch(delim)
- {
- case XFhome:
- - case XFend:
- case XFpgup:
- case XFpgdn:
- case XFcurup:
-
- --- 164,169 -----
- switch(delim)
- {
- case XFhome:
- case XFpgup:
- case XFcurup:
- if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
- ***************
- *** 165,171
- case XFhome:
- case XFend:
- case XFpgup:
- - case XFpgdn:
- case XFcurup:
- case XFcurdn:
- if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
-
- --- 165,170 -----
- {
- case XFhome:
- case XFpgup:
- case XFcurup:
- if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
- {
- ***************
- *** 167,173
- case XFpgup:
- case XFpgdn:
- case XFcurup:
- - case XFcurdn:
- if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
- {
- ring_bell();
-
- --- 166,171 -----
- case XFhome:
- case XFpgup:
- case XFcurup:
- if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
- {
- ring_bell();
- ***************
- *** 174,179
- ttygets_flags |= 4;
- goto GET_ICMD;
- }
- case ESC:
- case NL:
- break;
-
- --- 172,178 -----
- ttygets_flags |= 4;
- goto GET_ICMD;
- }
- + break;
- case ESC:
- case NL:
- break;
- ***************
- *** 179,184
- break;
- default:
- ring_bell();
- ttygets_flags |= 4;
- goto GET_ICMD;
- }
-
- --- 178,186 -----
- break;
- default:
- ring_bell();
- + itmp = strlen((char *)icmd_buf);
- + while(itmp--)
- + ff(se,"\b \b");
- ttygets_flags |= 4;
- goto GET_ICMD;
- }
- ***************
- *** 265,271
- while(count--)
- {
- write(fd,&bellch,1);
- ! nap((long)nap_msec);
- }
- }
- } /* end of send_bell_fd */
-
- --- 267,273 -----
- while(count--)
- {
- write(fd,&bellch,1);
- ! Nap((long)nap_msec);
- }
- }
- } /* end of send_bell_fd */
- *** /u1/src/ecu311/ecuxfer.c Thu Jul 25 12:57:00 1991
- --- ecuxfer.c Tue Aug 13 13:50:47 1991
- ***************
- *** 988,994
- }
- lreset_ksr();
- file_xfer_done_bell();
- ! nap(20L);
- start_rcvr_process(1);
- } /* end of receive_files_from_remote */
- /* end of ecuxfer.c */
-
- --- 988,994 -----
- }
- lreset_ksr();
- file_xfer_done_bell();
- ! Nap(20L);
- start_rcvr_process(1);
- } /* end of receive_files_from_remote */
- /* end of ecuxfer.c */
- *** /u1/src/ecu311/expresp.c Tue Aug 13 15:53:17 1991
- --- expresp.c Tue Aug 13 13:50:48 1991
- ***************
- *** 247,253
- {
- case 'p': /* pause (approximately 1/4-1/2 second delay) */
- ldraino(0); /* wait for output to drain */
- ! nap(400L);
- break;
- case 'm': /* nap a while (non-standard) */
- ltmp = atol(str + 1);
-
- --- 247,253 -----
- {
- case 'p': /* pause (approximately 1/4-1/2 second delay) */
- ldraino(0); /* wait for output to drain */
- ! Nap(400L);
- break;
- case 'm': /* nap a while (non-standard) */
- ltmp = atol(str + 1);
- ***************
- *** 253,259
- ltmp = atol(str + 1);
- str += strspn(str + 1,"0123456789");
- ldraino(0); /* wait for output to drain */
- ! nap((ltmp < hzmsec) ? hzmsec : ltmp);
- break;
- case 'd': /* delay (2 seconds) */
- ldraino(0); /* wait for output to drain */
-
- --- 253,259 -----
- ltmp = atol(str + 1);
- str += strspn(str + 1,"0123456789");
- ldraino(0); /* wait for output to drain */
- ! Nap((ltmp < hzmsec) ? hzmsec : ltmp);
- break;
- case 'd': /* delay (2 seconds) */
- ldraino(0); /* wait for output to drain */
- ***************
- *** 257,263
- break;
- case 'd': /* delay (2 seconds) */
- ldraino(0); /* wait for output to drain */
- ! nap(2000L);
- break;
- case 'D': /* phone number/token */
- if(expresp_echo_check)
-
- --- 257,263 -----
- break;
- case 'd': /* delay (2 seconds) */
- ldraino(0); /* wait for output to drain */
- ! Nap(2000L);
- break;
- case 'D': /* phone number/token */
- if(expresp_echo_check)
- ***************
- *** 302,308
- if(expresp_echo_check)
- {
- ldraino(1); /* wait for output to drain, then flush input */
- ! nap(40L); /* fake it */
- }
- str++;
- }
-
- --- 302,308 -----
- if(expresp_echo_check)
- {
- ldraino(1); /* wait for output to drain, then flush input */
- ! Nap(40L); /* fake it */
- }
- str++;
- }
- *** /u1/src/ecu311/pcmd.c Tue Aug 13 15:53:26 1991
- --- pcmd.c Tue Aug 13 13:50:49 1991
- ***************
- *** 692,698
- interval = hzmsec; /* SCO nap bug */
- if(proctrace && (interval > 100)) /* short naps hurt by pprintf */
- pprintf("nap %ld msec\n",interval);
- ! if(nap(interval) == -1) /* EINTR is the only error returned ... */
- { /* but check anyway */
- if(errno == EINTR)
- erc = eCONINT;
-
- --- 692,698 -----
- interval = hzmsec; /* SCO nap bug */
- if(proctrace && (interval > 100)) /* short naps hurt by pprintf */
- pprintf("nap %ld msec\n",interval);
- ! if(Nap(interval) == -1) /* EINTR is the only error returned ... */
- { /* but check anyway */
- if(errno == EINTR)
- erc = eCONINT;
-