[BACK]Return to cmds.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tip

Diff for /src/usr.bin/tip/Attic/cmds.c between version 1.5 and 1.6

version 1.5, 1997/04/02 01:47:01 version 1.6, 1997/08/22 22:42:07
Line 73 
Line 73 
         /*          /*
          * get the UNIX receiving file's name           * get the UNIX receiving file's name
          */           */
         if (prompt("Local file name? ", copyname))          if (prompt("Local file name? ", copyname, sizeof(copyname)))
                 return;                  return;
         cp = expand(copyname);          cp = expand(copyname);
         if ((sfd = creat(cp, 0666)) < 0) {          if ((sfd = creat(cp, 0666)) < 0) {
Line 84 
Line 84 
         /*          /*
          * collect parameters           * collect parameters
          */           */
         if (prompt("List command for remote system? ", buf)) {          if (prompt("List command for remote system? ", buf, sizeof(buf))) {
                 unlink(copyname);                  unlink(copyname);
                 return;                  return;
         }          }
Line 100 
Line 100 
         int fd, argc;          int fd, argc;
         char line[BUFSIZ], *expand(), *cp;          char line[BUFSIZ], *expand(), *cp;
   
         if (prompt("[take] ", copyname))          if (prompt("[take] ", copyname, sizeof(copyname)))
                 return;                  return;
         if ((argc = args(copyname, argv)) < 1 || argc > 2) {          if ((argc = args(copyname, argv)) < 1 || argc > 2) {
                 printf("usage: <take> from [to]\r\n");                  printf("usage: <take> from [to]\r\n");
Line 197 
Line 197 
         int status, p;          int status, p;
         extern int errno;          extern int errno;
   
         if (prompt("Local command? ", buf))          if (prompt("Local command? ", buf, sizeof(buf)))
                 return;                  return;
   
         if (pipe(pdes)) {          if (pipe(pdes)) {
Line 209 
Line 209 
                 printf("can't fork!\r\n");                  printf("can't fork!\r\n");
                 return;                  return;
         } else if (cpid) {          } else if (cpid) {
                 if (prompt("List command for remote system? ", buf)) {                  if (prompt("List command for remote system? ", buf, sizeof(buf))) {
                         close(pdes[0]), close(pdes[1]);                          close(pdes[0]), close(pdes[1]);
                         kill (cpid, SIGKILL);                          kill (cpid, SIGKILL);
                 } else {                  } else {
Line 260 
Line 260 
         /*          /*
          * get file name           * get file name
          */           */
         if (prompt("Local file name? ", fname))          if (prompt("Local file name? ", fname, sizeof(fname)))
                 return;                  return;
   
         /*          /*
Line 386 
Line 386 
         char *expand();          char *expand();
         char *copynamex;          char *copynamex;
   
         if (prompt("[put] ", copyname))          if (prompt("[put] ", copyname, sizeof(copyname)))
                 return;                  return;
         if ((argc = args(copyname, argv)) < 1 || argc > 2) {          if ((argc = args(copyname, argv)) < 1 || argc > 2) {
                 printf("usage: <put> from [to]\r\n");                  printf("usage: <put> from [to]\r\n");
Line 462 
Line 462 
         time_t start;          time_t start;
   
         putchar(c);          putchar(c);
         if (prompt("Local command? ", buf))          if (prompt("Local command? ", buf, sizeof(buf)))
                 return;                  return;
         kill(pid, SIGIOT);      /* put TIPOUT into a wait state */          kill(pid, SIGIOT);      /* put TIPOUT into a wait state */
         signal(SIGINT, SIG_IGN);          signal(SIGINT, SIG_IGN);
Line 513 
Line 513 
         time_t start;          time_t start;
   
         putchar(c);          putchar(c);
         if (prompt("Local command? ", buf))          if (prompt("Local command? ", buf, sizeof(buf)))
                 return;                  return;
         kill(pid, SIGIOT);      /* put TIPOUT into a wait state */          kill(pid, SIGIOT);      /* put TIPOUT into a wait state */
         signal(SIGINT, SIG_IGN);          signal(SIGINT, SIG_IGN);
Line 614 
Line 614 
  */   */
 chdirectory()  chdirectory()
 {  {
         char dirname[80];          char dirname[PATH_MAX];
         register char *cp = dirname;          register char *cp = dirname;
   
         if (prompt("[cd] ", dirname)) {          if (prompt("[cd] ", dirname, sizeof(dirname))) {
                 if (stoprompt)                  if (stoprompt)
                         return;                          return;
                 cp = value(HOME);                  cp = value(HOME);
Line 721 
Line 721 
 {  {
         char    buf[256];          char    buf[256];
   
         if (prompt("[set] ", buf))          if (prompt("[set] ", buf, sizeof(buf)))
                 return;                  return;
         vlex(buf);          vlex(buf);
         if (vtable[BEAUTIFY].v_access&CHANGED) {          if (vtable[BEAUTIFY].v_access&CHANGED) {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6