Common subdirectories: term/Archive and term.kr/Archive
Common subdirectories: term/Doc and term.kr/Doc
diff -c term/Makefile term.kr/Makefile
*** term/Makefile	Sun Feb 21 22:03:33 1993
--- term.kr/Makefile	Sun Feb 21 20:03:51 1993
***************
*** 3,9 ****
  # valids targets are:
  #	all term linecheck test tags clean install realclean ${PROGS}
  PROG=term
! CC=gcc
  SHELL=/bin/sh
  # if use a NeXT machine, then replace CC with this line...
  # CC=gcc -DNeXT
--- 3,10 ----
  # valids targets are:
  #	all term linecheck test tags clean install realclean ${PROGS}
  PROG=term
! # CC=gcc
! CC=cc
  SHELL=/bin/sh
  # if use a NeXT machine, then replace CC with this line...
  # CC=gcc -DNeXT
***************
*** 24,31 ****
  INSTALL= install
  INSTPGMFLAGS = -s
  MKDIR= mkdir
! BINDIR=/usr/local/bin
! MANDIR=/usr/man/man1
  #
  # Change this if yours is different.
  #
--- 25,33 ----
  INSTALL= install
  INSTPGMFLAGS = -s
  MKDIR= mkdir
! TOP=/home/usr/its/ray
! BINDIR=$(TOP)/bin
! MANDIR=$(TOP)/man
  #
  # Change this if yours is different.
  #
diff -c term/client.c term.kr/client.c
*** term/client.c	Sun Feb 21 22:06:16 1993
--- term.kr/client.c	Sun Feb 21 21:45:10 1993
***************
*** 69,75 ****
  				/* process.*/ 
  #ifdef USE_VARARGS
  int 
! send_command(sock, comm, local, fmt, va_alist)  sock ; comm; local ; fmt; va_alist;
  int sock , comm, local;
  char *fmt;
  va_dcl {
--- 69,75 ----
  				/* process.*/ 
  #ifdef USE_VARARGS
  int 
! send_command(sock, comm, local, fmt, va_alist)
  int sock , comm, local;
  char *fmt;
  va_dcl {
diff -c term/client.h term.kr/client.h
*** term/client.h	Sun Feb 21 22:06:17 1993
--- term.kr/client.h	Sun Feb 21 21:27:59 1993
***************
*** 72,78 ****
  void set_ttyraw();
  void set_ttynormal();
  
! typedef int ();
  int client_options();
  int send_command();
  char * build_arg();
--- 72,78 ----
  void set_ttyraw();
  void set_ttynormal();
  
! typedef int (*Callback) ();
  int client_options();
  int send_command();
  char * build_arg();
diff -c term/compress.c term.kr/compress.c
*** term/compress.c	Sun Feb 21 22:06:18 1993
--- term.kr/compress.c	Sun Feb 21 21:40:10 1993
***************
*** 167,173 ****
  /* Add a node to the list of free node's */
  NODE * node_list = NULL;
  void 
! free_node (n)  n;
  NODE * n;
  {
      n -> next_node = node_list;
--- 167,173 ----
  /* Add a node to the list of free node's */
  NODE * node_list = NULL;
  void 
! free_node (n)
  NODE * n;
  {
      n -> next_node = node_list;
***************
*** 177,183 ****
  /* Take a node of the list of free nodes, creating more nodes if there */
  /* aren't enough to spare.. */
  NODE * 
! NODE * get_node ()
  {
      NODE * n;
      if (!node_list) {
--- 177,183 ----
  /* Take a node of the list of free nodes, creating more nodes if there */
  /* aren't enough to spare.. */
  NODE * 
! get_node ()
  {
      NODE * n;
      if (!node_list) {
***************
*** 211,217 ****
   /* untill the first character is matched, and then following the 'l' */
   /* link. Then running down the 'n' again, and so on. */
  void 
! clear_table (dict, limit)  dict; limit;
  NODE * dict;
  int     limit;
  {
--- 211,217 ----
   /* untill the first character is matched, and then following the 'l' */
   /* link. Then running down the 'n' again, and so on. */
  void 
! clear_table (dict, limit)
  NODE * dict;
  int     limit;
  {
diff -c term/config.h term.kr/config.h
*** term/config.h	Sun Feb 21 22:06:19 1993
--- term.kr/config.h	Sun Feb 21 21:44:00 1993
***************
*** 61,70 ****
--- 61,73 ----
  #define USE_TERMIOS
  #define USE_FCNTL
  #define USE_NONBLOCK
+ /*
  #define USE_TCATTR
+ */
  #define ERR_BLOCK EAGAIN
  #define USE_SETPGRP
  #ifdef sun
+ #define USE_VARARGS
  #define USE_WINCHKILL
  #endif
  #endif
diff -c term/connect.c term.kr/connect.c
*** term/connect.c	Sun Feb 21 22:06:20 1993
--- term.kr/connect.c	Sun Feb 21 21:49:22 1993
***************
*** 22,28 ****
  }
  
  void 
! do_connect(num, svs, get_server)  int num; int *svs; int (*get_server)(void);
  {
    int max, num_cons = 0;
    int serv;
--- 22,28 ----
  }
  
  void 
! do_connect(num, svs, get_server)  int num; int *svs; int (*get_server)();
  {
    int max, num_cons = 0;
    int serv;
diff -c term/lib.c term.kr/lib.c
*** term/lib.c	Sun Feb 21 22:06:23 1993
--- term.kr/lib.c	Sun Feb 21 21:42:09 1993
***************
*** 27,33 ****
  #endif
  }
  
! void set_block(int fd) { 
  #ifdef USE_FCNTL
  #ifdef USE_NONBLOCK
    fcntl (fd, F_SETFL, (fcntl(fd, F_GETFL) & ~O_NONBLOCK));
--- 27,34 ----
  #endif
  }
  
! void set_block(fd)  int fd;
! { 
  #ifdef USE_FCNTL
  #ifdef USE_NONBLOCK
    fcntl (fd, F_SETFL, (fcntl(fd, F_GETFL) & ~O_NONBLOCK));
diff -c term/link.c term.kr/link.c
*** term/link.c	Sun Feb 21 22:06:26 1993
--- term.kr/link.c	Sun Feb 21 21:29:16 1993
***************
*** 603,609 ****
    case C_RESIZE:
      DEBUG_FP(stderr, "%s:C_RESIZE %s\n", term_server, c+1);
      {
!       void do_resize(int number, int rows, int cols);
        int number;
        int rows, cols;
        sscanf((char *) c+1, "%d %d %d", &number, &rows, &cols);
--- 603,609 ----
    case C_RESIZE:
      DEBUG_FP(stderr, "%s:C_RESIZE %s\n", term_server, c+1);
      {
!       void do_resize();
        int number;
        int rows, cols;
        sscanf((char *) c+1, "%d %d %d", &number, &rows, &cols);
***************
*** 638,644 ****
  /* A client with a priority of n will get n/(sum) of the packets available   */
  /* maybe :) */
  
! struct Client * get_next_client(void) { 
    int i, h = -10000, j=0;
    static int c = 0;
  				/* Check to see if any of the clients */
--- 638,644 ----
  /* A client with a priority of n will get n/(sum) of the packets available   */
  /* maybe :) */
  
! struct Client * get_next_client() { 
    int i, h = -10000, j=0;
    static int c = 0;
  				/* Check to see if any of the clients */
diff -c term/select.c term.kr/select.c
*** term/select.c	Sun Feb 21 22:06:34 1993
--- term.kr/select.c	Sun Feb 21 21:48:23 1993
***************
*** 6,14 ****
  void 
  do_select_loop(sock, in_f, out_f)  int sock; int in_f; int out_f;
  {
!   struct Buffer in = {{0},0,0,0}, out = {{0},0,0,0};
    int i;
  
    in.start = in.end = in.size = 0;
    out.start = out.end = out.size = 0;
    
--- 6,17 ----
  void 
  do_select_loop(sock, in_f, out_f)  int sock; int in_f; int out_f;
  {
!   /*struct Buffer in = {{0},0,0,0}, out = {{0},0,0,0};*/
!   struct Buffer in , out ;
    int i;
  
+   bzero((char *)in.data, sizeof(struct Buffer));
+   bzero((char *)out.data, sizeof(struct Buffer));
    in.start = in.end = in.size = 0;
    out.start = out.end = out.size = 0;
    
diff -c term/tmon.c term.kr/tmon.c
*** term/tmon.c	Sun Feb 21 22:06:45 1993
--- term.kr/tmon.c	Sun Feb 21 21:58:29 1993
***************
*** 96,102 ****
  }
  
  void 
! putchr (c)   c ;
  char c;
  {
  	fputc ( c, stdout );
--- 96,102 ----
  }
  
  void 
! putchr (c)
  char c;
  {
  	fputc ( c, stdout );
***************
*** 114,120 ****
  void cl_end()	{ tputs(CD,LI,putchr); }
  
  void 
! ttgoto(row, col)  row; col;
  int row, col;
  {
  	tputs(tgoto(CM, col, row),1,putchr);
--- 114,120 ----
  void cl_end()	{ tputs(CD,LI,putchr); }
  
  void 
! ttgoto(row, col)
  int row, col;
  {
  	tputs(tgoto(CM, col, row),1,putchr);
***************
*** 121,127 ****
  }
  
  void 
! drawline(row, col, len)  row; col; len;
  int row, col, len;
  {
  
--- 121,127 ----
  }
  
  void 
! drawline(row, col, len)
  int row, col, len;
  {
  
diff -c term/upload.c term.kr/upload.c
*** term/upload.c	Sun Feb 21 22:06:47 1993
--- term.kr/upload.c	Sun Feb 21 21:56:41 1993
***************
*** 56,62 ****
  				/* From client.c */
    extern int lcompression, rcompression;
  				/* locals for upload. */
!   struct Buffer buffer = {{0},0,0,0};
    char *cutpath, *file, *remote, path[255], filename[255];
    int term, fd, first, remote_size, stdin_used, type, perms, i, perc;
    int ret, bytesent, total_bytesent, filesent;
--- 56,63 ----
  				/* From client.c */
    extern int lcompression, rcompression;
  				/* locals for upload. */
!   /* struct Buffer buffer = {{0},0,0,0}; */
!   struct Buffer buffer ;
    char *cutpath, *file, *remote, path[255], filename[255];
    int term, fd, first, remote_size, stdin_used, type, perms, i, perc;
    int ret, bytesent, total_bytesent, filesent;
***************
*** 63,68 ****
--- 64,70 ----
    double cps;
    time_t total_starttime, total_stoptime, starttime, stoptime, etime;
  
+   bzero((char *)buffer.data, sizeof(struct Buffer));
    term = -1;
    fd = -1;
    first = -1;
***************
*** 82,88 ****
    if ( ((first = client_options(argc,argv,"fquv",local_options)) == -1)
        || (first >= argc) ) {
      fprintf(stderr, 
! 	    "Usage: upload [-f] [-q] [-u] [-v] [-r] [-c] [-p <num>] <file>"
  	    " [... <file>] [remote dir]\n"); 
      exit(1);
    }
--- 84,90 ----
    if ( ((first = client_options(argc,argv,"fquv",local_options)) == -1)
        || (first >= argc) ) {
      fprintf(stderr, 
! 	    "Usage: upload [-f] [-q] [-u] [-v] [-r] [-c] [-p <num>] <file>%s",
  	    " [... <file>] [remote dir]\n"); 
      exit(1);
    }
***************
*** 256,263 ****
  	if (ret <=0 && term_errno) break;
  	if (!buffer.size) continue;
  	if (send_command(term, C_DUMP, 1, "%d", buffer.size) < 0) {
! 	  fprintf(stderr, "\taborted, couldn't turn off command"
! 		  " processing, %s\n", command_result );
  	  continue;
  	}
        } 
--- 258,266 ----
  	if (ret <=0 && term_errno) break;
  	if (!buffer.size) continue;
  	if (send_command(term, C_DUMP, 1, "%d", buffer.size) < 0) {
! 	  fprintf(stderr,
! 	    "\taborted, couldn't turn off command processing, %s\n",
! 	    command_result );
  	  continue;
  	}
        } 
***************
*** 300,306 ****
      if ((send_command(term, C_STAT, 0, "%s", remote)) >= 0) {
        if (( fd && (atoi(command_result) != st.st_size) ) ||
  	  ( (!fd) && (atoi(command_result) != bytesent) ))
!  	fprintf(stderr, "\tremote file is a different size from local after"
  		" upload!\n"); 
        else 
  	/* unlink files if we wanna remove them after *sucessful* send */
--- 303,309 ----
      if ((send_command(term, C_STAT, 0, "%s", remote)) >= 0) {
        if (( fd && (atoi(command_result) != st.st_size) ) ||
  	  ( (!fd) && (atoi(command_result) != bytesent) ))
!  	fprintf(stderr, "\tremote file is a different size from local after%s",
  		" upload!\n"); 
        else 
  	/* unlink files if we wanna remove them after *sucessful* send */
***************
*** 312,318 ****
  	}
      }
      else
!       fprintf(stderr,"\tcouldn't stat remote file after upload. Please"
  	      " check it.\n"); 
      
      /* give them cps ratings */
--- 315,321 ----
  	}
      }
      else
!       fprintf(stderr,"\tcouldn't stat remote file after upload. Please%s",
  	      " check it.\n"); 
      
      /* give them cps ratings */
***************
*** 344,351 ****
        cps = (double)total_bytesent / (double)etime;
      else
        cps = (double)total_bytesent;
!     fprintf(stderr, "%d total bytes sent in %ld seconds, cps ="
! 	    " %.2f\n", total_bytesent, etime, cps ); 
    }
  }
  
--- 347,354 ----
        cps = (double)total_bytesent / (double)etime;
      else
        cps = (double)total_bytesent;
!     fprintf(stderr, "%d total bytes sent in %ld seconds, cps = %.2f\n",
! 	total_bytesent, etime, cps ); 
    }
  }
  
