home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- subject: v10i049: siotools v09i044,045 patch 4
- from: wht%n4hgf@gatech.edu (Warren Tucker)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 10, Issue 49
- Submitted-by: wht%n4hgf@gatech.edu (Warren Tucker)
- Archive-name: siotools/patch04
-
- #!/bin/sh
- # This is siotools.PATCH.4, a shell archive (shar 3.04)
- # made 01/28/1990 00:49 UTC by gatech!kd4nc!n4hgf!wht (wht%n4hgf@gatech.edu)
- # Source directory /u4/src/uusnap/release
- #
- # siotools v09i044/v09i45 Patch 4
- # This patch corrects two bugs and adds a feature:
- # 1. siomon & uusnap - 600 baud previously would not be displayed
- # 2. uusnap - LAST and NEXT month were off by one
- # 3. uusnap - both input and output work queues now displayed
- #
- # Just unshar in the siotools source directory and type 'sh PATCH.4'
- #
- # existing files WILL be overwritten
- #
- # This shar contains:
- # PATCH.4
- #
- touch 2>&1 | fgrep '[-amc]' > /tmp/s3_touch$$
- if [ -s /tmp/s3_touch$$ ]
- then
- TOUCH=can
- else
- TOUCH=cannot
- fi
- rm -f /tmp/s3_touch$$
- echo "x - extracting PATCH.4 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > PATCH.4 &&
- X:
- X#----------------------------------------------------------------------
- X# siotools v09i044/v09i45 Patch 4
- X# 1. siomon & uusnap - 600 baud previously would not be displayed
- X# 2. uusnap - LAST and NEXT month were off by one
- X# 3. uusnap - both input and output work queues now displayed
- X#----------------------------------------------------------------------
- X#+:EDITS:
- X#:01-27-1990-19:42-wht-creation
- X
- Xsed -e 's/^P//' << DIFF_EOF | patch
- XP*** patched_to_3/siomon.c Sat Jan 27 19:33:18 1990
- XP--- siomon.c Thu Dec 28 13:37:55 1989
- XP***************
- XP*** 1,5
- XP! /* CHK=0x4E4E */
- XP! char *revision = "1.32";
- XP /*+-------------------------------------------------------------------------
- XP siomon.c -- watch XENIX/UNIX serial I/O
- XP ...!gatech!kd4nc!n4hgf!wht
- XP
- XP--- 1,5 -----
- XP! /* CHK=0x75B9 */
- XP! char *revision = "1.33";
- XP /*+-------------------------------------------------------------------------
- XP siomon.c -- watch XENIX/UNIX serial I/O
- XP ...!gatech!kd4nc!n4hgf!wht
- XP***************
- XP*** 51,56
- XP regarding screen and CPU efficiency in the original itpmon.c for Pyramid
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP /*:12-21-1989-15:20-wht-version number chg - CTSFLOW/RTSFLOW */
- XP /*:12-04-1989-16:45-wht-add more to detail */
- XP /*:11-28-1989-19:49-wht-no more sprintf and allow nap/rdchk in lieu of select */
- XP
- XP--- 51,57 -----
- XP regarding screen and CPU efficiency in the original itpmon.c for Pyramid
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP+ /*:12-28-1989-13:35-wht-change rev - B600 added to wintty */
- XP /*:12-21-1989-15:20-wht-version number chg - CTSFLOW/RTSFLOW */
- XP /*:12-04-1989-16:45-wht-add more to detail */
- XP /*:11-28-1989-19:49-wht-no more sprintf and allow nap/rdchk in lieu of select */
- XP*** patched_to_3/uusnap.c Sat Jan 27 19:33:12 1990
- XP--- uusnap.c Sat Jan 27 19:31:54 1990
- XP***************
- XP*** 1,5
- XP! /* CHK=0xD9CC */
- XP! char *revision = "1.62";
- XP /*+-------------------------------------------------------------------------
- XP uusnap.c - display UUCP communications status for HDB systems
- XP ...gatech!kd4nc!n4hgf!wht
- XP
- XP--- 1,5 -----
- XP! /* CHK=0xBF8D */
- XP! char *revision = "1.70";
- XP /*+-------------------------------------------------------------------------
- XP uusnap.c - display UUCP communications status for HDB systems
- XP ...gatech!kd4nc!n4hgf!wht
- XP***************
- XP*** 4,10
- XP uusnap.c - display UUCP communications status for HDB systems
- XP ...gatech!kd4nc!n4hgf!wht
- XP
- XP! Many ideas in this program came from uustatus.c by Ed Carp
- XP
- XP Defined functions:
- XP basename(fullname)
- XP
- XP--- 4,10 -----
- XP uusnap.c - display UUCP communications status for HDB systems
- XP ...gatech!kd4nc!n4hgf!wht
- XP
- XP! Many ideas in this program came from uustatus.c by Ed Carp
- XP
- XP Defined functions:
- XP basename(fullname)
- XP***************
- XP*** 30,35
- XP ...
- XP #endif
- XP
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP /*:12-07-1989-03:10-wht-make changes per email suggestions */
- XP
- XP--- 30,45 -----
- XP ...
- XP #endif
- XP
- XP+ Sample output:
- XP+
- XP+ uusnap 1.70 (UNIX V.3.2/i386) n4hgf 19:28:26
- XP+
- XP+ # SYSTEM CALLS OUTQ INPQ LAST NEXT PID STATUS
- XP+ -- ------ ----- ---- ---- ----- ----- ----- ------------------------
- XP+ 1 kd4nc 2 3 15:22 15:22 successful
- XP+ 2 n4vu 19:07 19:07 successful
- XP+ 3 tridom 1 19:17 19:17 TALKING (tty2e)
- XP+ 4 ki4xo 01/25 01/25 successful
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP /*:01-27-1990-19:11-wht-show input and output queues + cosmetics */
- XP***************
- XP*** 32,37
- XP
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP /*:12-07-1989-03:10-wht-make changes per email suggestions */
- XP /*:12-04-1989-16:45-wht-add detail in full */
- XP /*:12-01-1989-16:53-wht-XENIX 286 work: no beep()! */
- XP
- XP--- 42,50 -----
- XP 4 ki4xo 01/25 01/25 successful
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP+ /*:01-27-1990-19:11-wht-show input and output queues + cosmetics */
- XP+ /*:12-28-1989-13:35-wht-change rev - B600 added to wintty */
- XP+ /*:12-26-1989-14:53-wht-datetime5 month off by 1 */
- XP /*:12-07-1989-03:10-wht-make changes per email suggestions */
- XP /*:12-04-1989-16:45-wht-add detail in full */
- XP /*:12-01-1989-16:53-wht-XENIX 286 work: no beep()! */
- XP***************
- XP*** 55,66
- XP
- XP #define FIRSTSYS_Y 4
- XP #define NAME_X 4
- XP! #define RCNT_X 14
- XP! #define QCNT_X 19
- XP! #define LAST_X 24
- XP! #define NEXT_X 30
- XP! #define PID_X 36
- XP! #define STATUS_X 42
- XP
- XP /* display_tty x offsets */
- XP #define TX 0
- XP
- XP--- 68,80 -----
- XP
- XP #define FIRSTSYS_Y 4
- XP #define NAME_X 4
- XP! #define CALLS_X 14
- XP! #define OUTQ_X 19
- XP! #define INPQ_X 24
- XP! #define LAST_X 29
- XP! #define NEXT_X 35
- XP! #define PID_X 41
- XP! #define STATUS_X 47
- XP
- XP /* display_tty x offsets */
- XP #define TX 0
- XP***************
- XP*** 77,83
- XP #define DDIR FILE
- XP DDIR *stat_dp;
- XP DDIR *work_dp;
- XP! struct dent
- XP {
- XP unsigned short d_inode;
- XP char d_name[14];
- XP
- XP--- 91,97 -----
- XP #define DDIR FILE
- XP DDIR *stat_dp;
- XP DDIR *work_dp;
- XP! struct dent
- XP {
- XP unsigned short d_inode;
- XP char d_name[14];
- XP***************
- XP*** 188,195
- XP dir_read(dirp)
- XP DDIR *dirp;
- XP {
- XP! static struct dent_w_null {
- XP! struct dent dent;
- XP int null;
- XP } static_dent;
- XP
- XP
- XP--- 202,209 -----
- XP dir_read(dirp)
- XP DDIR *dirp;
- XP {
- XP! static struct dent_w_null {
- XP! struct dent dent;
- XP int null;
- XP } static_dent;
- XP
- XP***************
- XP*** 234,240
- XP
- XP if(delta > (12L * 3600))
- XP {
- XP! utoda_lz(dt5,2,lt->tm_mon);
- XP dt5[2] = '/';
- XP utoda_lz(dt5 + 3,2,lt->tm_mday);
- XP }
- XP
- XP--- 248,254 -----
- XP
- XP if(delta > (12L * 3600))
- XP {
- XP! utoda_lz(dt5,2,lt->tm_mon + 1);
- XP dt5[2] = '/';
- XP utoda_lz(dt5 + 3,2,lt->tm_mday);
- XP }
- XP***************
- XP*** 339,345
- XP utoda_lz(buf + 3,2,lt->tm_min);
- XP buf[5] = ':';
- XP utoda_lz(buf + 6,2,lt->tm_sec);
- XP! move(0,COLS - 13);
- XP addstr(buf);
- XP
- XP } /* end of display_tod */
- XP
- XP--- 353,359 -----
- XP utoda_lz(buf + 3,2,lt->tm_min);
- XP buf[5] = ':';
- XP utoda_lz(buf + 6,2,lt->tm_sec);
- XP! move(0,COLS - 18);
- XP addstr(buf);
- XP
- XP } /* end of display_tod */
- XP***************
- XP*** 458,464
- XP int itmp;
- XP int retry_count;
- XP int status;
- XP! int queue_count;
- XP char *stattxt;
- XP int locking_pid;
- XP char *ttyname;
- XP
- XP--- 472,479 -----
- XP int itmp;
- XP int retry_count;
- XP int status;
- XP! int input_queue_count;
- XP! int output_queue_count;
- XP char *stattxt;
- XP int locking_pid;
- XP char *ttyname;
- XP***************
- XP*** 485,491
- XP strcpy(work_dir,WORKDIR);
- XP strcat(work_dir,system_name);
- XP
- XP! queue_count = 0;
- XP if(work_dp = dir_open(work_dir))
- XP {
- XP /* count the number of C. queue_count */
- XP
- XP--- 500,507 -----
- XP strcpy(work_dir,WORKDIR);
- XP strcat(work_dir,system_name);
- XP
- XP! input_queue_count = 0;
- XP! output_queue_count = 0;
- XP if(work_dp = dir_open(work_dir))
- XP {
- XP /* count the number of C. output_queue_count */
- XP***************
- XP*** 488,494
- XP queue_count = 0;
- XP if(work_dp = dir_open(work_dir))
- XP {
- XP! /* count the number of C. queue_count */
- XP while(dp = dir_read(work_dp))
- XP {
- XP if(!strncmp(dp->d_name,"C.",2))
- XP
- XP--- 504,510 -----
- XP output_queue_count = 0;
- XP if(work_dp = dir_open(work_dir))
- XP {
- XP! /* count the number of C. output_queue_count */
- XP while(dp = dir_read(work_dp))
- XP {
- XP if(!strncmp(dp->d_name,"X.",2) && (input_queue_count <= 99))
- XP***************
- XP*** 491,499
- XP /* count the number of C. queue_count */
- XP while(dp = dir_read(work_dp))
- XP {
- XP! if(!strncmp(dp->d_name,"C.",2))
- XP! queue_count++;
- XP! if(queue_count > 99)
- XP break;
- XP }
- XP dir_close(work_dp);
- XP
- XP--- 507,517 -----
- XP /* count the number of C. output_queue_count */
- XP while(dp = dir_read(work_dp))
- XP {
- XP! if(!strncmp(dp->d_name,"X.",2) && (input_queue_count <= 99))
- XP! input_queue_count++;
- XP! if(!strncmp(dp->d_name,"C.",2) && (output_queue_count <= 99))
- XP! output_queue_count++;
- XP! if((input_queue_count > 99) && (output_queue_count > 99))
- XP break;
- XP }
- XP dir_close(work_dp);
- XP***************
- XP*** 518,524
- XP s32[10] = 0;
- XP addstr(s32);
- XP
- XP! move(y,RCNT_X);
- XP if(retry_count)
- XP {
- XP if(retry_count > 999)
- XP
- XP--- 536,542 -----
- XP s32[10] = 0;
- XP addstr(s32);
- XP
- XP! move(y,CALLS_X);
- XP if(retry_count)
- XP {
- XP if(retry_count > 999)
- XP***************
- XP*** 529,536
- XP else
- XP addstr(" ");
- XP
- XP! move(y,QCNT_X);
- XP! if(queue_count)
- XP {
- XP if(queue_count > 99)
- XP addstr(">99");
- XP
- XP--- 547,554 -----
- XP else
- XP addstr(" ");
- XP
- XP! move(y,OUTQ_X);
- XP! if(output_queue_count)
- XP {
- XP if(output_queue_count > 99)
- XP addstr(">99");
- XP***************
- XP*** 532,538
- XP move(y,QCNT_X);
- XP if(queue_count)
- XP {
- XP! if(queue_count > 99)
- XP addstr(">99");
- XP else
- XP {
- XP
- XP--- 550,556 -----
- XP move(y,OUTQ_X);
- XP if(output_queue_count)
- XP {
- XP! if(output_queue_count > 99)
- XP addstr(">99");
- XP else
- XP {
- XP***************
- XP*** 536,542
- XP addstr(">99");
- XP else
- XP {
- XP! utoda(s32,3,queue_count);
- XP addstr(s32);
- XP }
- XP }
- XP
- XP--- 554,560 -----
- XP addstr(">99");
- XP else
- XP {
- XP! utoda(s32,3,output_queue_count);
- XP addstr(s32);
- XP }
- XP }
- XP***************
- XP*** 543,548
- XP else
- XP addstr(" ");
- XP
- XP move(y,LAST_X);
- XP addstr(datetime5(secs_last_try));
- XP
- XP
- XP--- 561,580 -----
- XP else
- XP addstr(" ");
- XP
- XP+ move(y,INPQ_X);
- XP+ if(input_queue_count)
- XP+ {
- XP+ if(input_queue_count > 99)
- XP+ addstr(">99");
- XP+ else
- XP+ {
- XP+ utoda(s32,3,input_queue_count);
- XP+ addstr(s32);
- XP+ }
- XP+ }
- XP+ else
- XP+ addstr(" ");
- XP+
- XP move(y,LAST_X);
- XP addstr(datetime5(secs_last_try));
- XP
- XP***************
- XP*** 687,693
- XP char *sysname;
- XP char *cptr;
- XP
- XP! static char *header =
- XP "tty raw can out speed state iflag oflag cflag lflag pgrp";
- XP static char *hyphens =
- XP "--- --- --- ----- ----- ----- ------ ------ ------ ------ -----";
- XP
- XP--- 719,725 -----
- XP char *sysname;
- XP char *cptr;
- XP
- XP! static char *header =
- XP "tty raw can out speed state iflag oflag cflag lflag pgrp";
- XP static char *hyphens =
- XP "--- --- --- ----- ----- ----- ------ ------ ------ ------ -----";
- XP***************
- XP*** 881,887
- XP standend();
- XP
- XP move(2,0);
- XP! addstr(" # SYSTEM RCNT QCNT LAST NEXT PID STATUS");
- XP move(3,0);
- XP addstr("-- ------ ---- ---- ---- ---- --- ------");
- XP while(1)
- XP
- XP--- 913,920 -----
- XP standend();
- XP
- XP move(2,0);
- XP! addstr(
- XP! " # SYSTEM CALLS OUTQ INPQ LAST NEXT PID STATUS");
- XP move(3,0);
- XP addstr(
- XP "-- ------ ----- ---- ---- ----- ----- ----- ------------------------");
- XP***************
- XP*** 883,889
- XP move(2,0);
- XP addstr(" # SYSTEM RCNT QCNT LAST NEXT PID STATUS");
- XP move(3,0);
- XP! addstr("-- ------ ---- ---- ---- ---- --- ------");
- XP while(1)
- XP {
- XP uucico_active = 0; /* assume no uucico_active connections */
- XP
- XP--- 916,923 -----
- XP addstr(
- XP " # SYSTEM CALLS OUTQ INPQ LAST NEXT PID STATUS");
- XP move(3,0);
- XP! addstr(
- XP! "-- ------ ----- ---- ---- ----- ----- ----- ------------------------");
- XP while(1)
- XP {
- XP uucico_active = 0; /* assume no uucico_active connections */
- XP*** patched_to_3/wintty.c Sat Jan 27 19:33:18 1990
- XP--- wintty.c Thu Dec 28 13:37:58 1989
- XP***************
- XP*** 1,4
- XP! /* CHK=0xED50 */
- XP /*+-------------------------------------------------------------------------
- XP wintty.c
- XP ...!gatech!emory!tridom!wht
- XP
- XP--- 1,4 -----
- XP! /* CHK=0x957F */
- XP /*+-------------------------------------------------------------------------
- XP wintty.c
- XP ...!gatech!emory!tridom!wht
- XP***************
- XP*** 17,22
- XP
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP /*:12-21-1989-15:18-wht-display CTSFLOW and RTSFLOW if defined */
- XP /*:12-04-1989-15:40-wht-creation */
- XP
- XP
- XP--- 17,23 -----
- XP
- XP --------------------------------------------------------------------------*/
- XP /*+:EDITS:*/
- XP+ /*:12-28-1989-13:35-wht-B600 added */
- XP /*:12-21-1989-15:18-wht-display CTSFLOW and RTSFLOW if defined */
- XP /*:12-04-1989-15:40-wht-creation */
- XP
- XP***************
- XP*** 146,151
- XP " 4800", B4800,
- XP " 300", B300,
- XP " 110", B110,
- XP " 75", B75,
- XP " 50", B50,
- XP " HUP", B0,
- XP
- XP--- 147,153 -----
- XP " 4800", B4800,
- XP " 300", B300,
- XP " 110", B110,
- XP+ " 600", B600,
- XP " 75", B75,
- XP " 50", B50,
- XP " HUP", B0,
- XDIFF_EOF
- Xecho 'Patch 3 applied.'
- Xexit 0
- SHAR_EOF
- chmod 0755 PATCH.4 || echo "restore of PATCH.4 fails"
- if [ $TOUCH = can ]
- then
- touch -m 0127194790 PATCH.4
- fi
- exit 0
-
-