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

Diff for /src/usr.bin/rcs/ci.c between version 1.118 and 1.119

version 1.118, 2006/03/15 05:05:35 version 1.119, 2006/03/15 16:04:08
Line 29 
Line 29 
 #include "rcsprog.h"  #include "rcsprog.h"
 #include "diff.h"  #include "diff.h"
   
 #define CI_OPTSTRING    "d::f::i::j::k::l::m:M::N:n:qr::s:Tt:u::Vw:x:z:"  #define CI_OPTSTRING    "d::f::I::i::j::k::l::m:M::N:n:qr::s:Tt:u::Vw:x:z:"
 #define DATE_NOW        -1  #define DATE_NOW        -1
 #define DATE_MTIME      -2  #define DATE_MTIME      -2
   
Line 86 
Line 86 
 checkin_usage(void)  checkin_usage(void)
 {  {
         fprintf(stderr,          fprintf(stderr,
             "usage: ci [-jMNqV] [-d[date]] [-f[rev]] [-i[rev]] [-j[rev]]\n"              "usage: ci [-jMNqV] [-d[date]] [-f[rev]] [-I[rev]] [-i[rev]]\n"
             "     [-k[rev]] [-l[rev]] [-M[rev]] [-mmsg] [-Nsymbol]\n"              "     [-j[rev]] [-k[rev]] [-l[rev]] [-M[rev]] [-mmsg]\n"
             "     [-nsymbol] [-r[rev]] [-sstate] [-tfile|str] [-u[rev]]\n"              "     [-Nsymbol] [-nsymbol] [-r[rev]] [-sstate] [-tfile|str]\n"
             "     [-wusername] [-xsuffixes] [-ztz] file ...\n");              "     [-u[rev]] [-wusername] [-xsuffixes] [-ztz] file ...\n");
 }  }
   
   
Line 113 
Line 113 
         pb.newrev =  NULL;          pb.newrev =  NULL;
         pb.fmode = pb.flags = status = 0;          pb.fmode = pb.flags = status = 0;
   
         pb.flags = INTERACTIVE;  
         pb.openflags = RCS_RDWR|RCS_CREATE|RCS_PARSE_FULLY;          pb.openflags = RCS_RDWR|RCS_CREATE|RCS_PARSE_FULLY;
   
         while ((ch = rcs_getopt(argc, argv, CI_OPTSTRING)) != -1) {          while ((ch = rcs_getopt(argc, argv, CI_OPTSTRING)) != -1) {
Line 131 
Line 130 
                 case 'h':                  case 'h':
                         (usage)();                          (usage)();
                         exit(0);                          exit(0);
                   case 'I':
                           rcs_set_rev(rcs_optarg, &pb.newrev);
                           pb.flags |= INTERACTIVE;
                           break;
                 case 'i':                  case 'i':
                         rcs_set_rev(rcs_optarg, &pb.newrev);                          rcs_set_rev(rcs_optarg, &pb.newrev);
                         pb.openflags |= RCS_CREATE;                          pb.openflags |= RCS_CREATE;
Line 419 
Line 422 
                 return (NULL);                  return (NULL);
         }          }
   
         printf(prompt);          if (isatty(STDIN_FILENO))
                   fprintf(stderr, "%s", prompt);
   
         for (;;) {          for (;;) {
                 fgets(buf, (int)sizeof(buf), stdin);                  fgets(buf, (int)sizeof(buf), stdin);
                 if (feof(stdin) || ferror(stdin) || buf[0] == '.')                  if (feof(stdin) || ferror(stdin) || buf[0] == '.')
                         break;                          break;
                 cvs_buf_append(inputbuf, buf, strlen(buf));                  cvs_buf_append(inputbuf, buf, strlen(buf));
                 printf(">> ");  
                   if (isatty(STDIN_FILENO))
                           fprintf(stderr, ">> ");
         }          }
   
         cvs_buf_putc(inputbuf, '\0');          cvs_buf_putc(inputbuf, '\0');
Line 725 
Line 732 
                 checkout_rev(pb->file, pb->newrev, pb->filename, pb->flags,                  checkout_rev(pb->file, pb->newrev, pb->filename, pb->flags,
                     pb->username, pb->author, NULL, NULL);                      pb->username, pb->author, NULL, NULL);
   
         printf("initial revision: %s\n",          if (verbose == 1) {
             rcsnum_tostr(pb->newrev, numb, sizeof(numb)));                  fprintf(stderr, "initial revision: %s\n",
                       rcsnum_tostr(pb->newrev, numb, sizeof(numb)));
           }
   
         /* File will NOW be synced */          /* File will NOW be synced */
         rcs_close(pb->file);          rcs_close(pb->file);

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119