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

Diff for /src/usr.bin/rcs/rcsprog.c between version 1.114 and 1.115

version 1.114, 2006/04/24 08:10:41 version 1.115, 2006/04/25 13:36:35
Line 404 
Line 404 
                         char rev_str[16];                          char rev_str[16];
   
                         if ((username = getlogin()) == NULL)                          if ((username = getlogin()) == NULL)
                                 fatal("could not get username");                                  err(1, "getlogin");
                         if (lrev == NULL) {                          if (lrev == NULL) {
                                 rev = rcsnum_alloc();                                  rev = rcsnum_alloc();
                                 rcsnum_cpy(file->rf_head, rev, 0);                                  rcsnum_cpy(file->rf_head, rev, 0);
Line 416 
Line 416 
                         rcsnum_tostr(rev, rev_str, sizeof(rev_str));                          rcsnum_tostr(rev, rev_str, sizeof(rev_str));
                         /* Make sure revision exists. */                          /* Make sure revision exists. */
                         if (rcs_findrev(file, rev) == NULL)                          if (rcs_findrev(file, rev) == NULL)
                                 fatal("%s: can't lock nonexisting revision %s",                                  errx(1, "%s: cannot lock nonexisting "
                                     fpath, rev_str);                                      "revision %s", fpath, rev_str);
                         if (rcs_lock_add(file, username, rev) != -1 &&                          if (rcs_lock_add(file, username, rev) != -1 &&
                             !(rcsflags & QUIET))                              !(rcsflags & QUIET))
                                 printf("%s locked\n", rev_str);                                  printf("%s locked\n", rev_str);
Line 430 
Line 430 
                         char rev_str[16];                          char rev_str[16];
   
                         if ((username = getlogin()) == NULL)                          if ((username = getlogin()) == NULL)
                                 fatal("could not get username");                                  err(1, "getlogin");
                         if (urev == NULL) {                          if (urev == NULL) {
                                 rev = rcsnum_alloc();                                  rev = rcsnum_alloc();
                                 rcsnum_cpy(file->rf_head, rev, 0);                                  rcsnum_cpy(file->rf_head, rev, 0);
Line 442 
Line 442 
                         rcsnum_tostr(rev, rev_str, sizeof(rev_str));                          rcsnum_tostr(rev, rev_str, sizeof(rev_str));
                         /* Make sure revision exists. */                          /* Make sure revision exists. */
                         if (rcs_findrev(file, rev) == NULL)                          if (rcs_findrev(file, rev) == NULL)
                                 fatal("%s: can't unlock nonexisting revision %s",                                  errx(1, "%s: cannot unlock nonexisting "
                                     fpath, rev_str);                                      "revision %s", fpath, rev_str);
                         if (rcs_lock_remove(file, username, rev) == -1 &&                          if (rcs_lock_remove(file, username, rev) == -1 &&
                             !(rcsflags & QUIET))                              !(rcsflags & QUIET))
                                 warnx("%s: warning: No locks are set.", fpath);                                  warnx("%s: warning: No locks are set.", fpath);
Line 508 
Line 508 
   
         if (rev == NULL && rm != 1) {          if (rev == NULL && rm != 1) {
                 if ((rev = rcsnum_parse(rnum)) == NULL)                  if ((rev = rcsnum_parse(rnum)) == NULL)
                         fatal("bad revision %s", rnum);                          errx(1, "bad revision %s", rnum);
         }          }
   
         if (rcsflags & RCSPROG_NFLAG)          if (rcsflags & RCSPROG_NFLAG)
Line 518 
Line 518 
                 if (rcs_sym_remove(file, symname) < 0) {                  if (rcs_sym_remove(file, symname) < 0) {
                         if (rcs_errno == RCS_ERR_NOENT &&                          if (rcs_errno == RCS_ERR_NOENT &&
                             !(rcsflags & RCSPROG_NFLAG))                              !(rcsflags & RCSPROG_NFLAG))
                                 warnx("can't delete nonexisting symbol %s",                                  warnx("cannot delete nonexisting symbol %s",
                                     symname);                                      symname);
                 } else {                  } else {
                         if (rcsflags & RCSPROG_NFLAG)                          if (rcsflags & RCSPROG_NFLAG)
Line 531 
Line 531 
                     rcs_errno == RCS_ERR_DUPENT) {                      rcs_errno == RCS_ERR_DUPENT) {
                         rcsnum_tostr(rcs_sym_getrev(file, symname),                          rcsnum_tostr(rcs_sym_getrev(file, symname),
                             rbuf, sizeof(rbuf));                              rbuf, sizeof(rbuf));
                         fatal("symbolic name %s already bound to %s",                          errx(1, "symbolic name %s already bound to %s",
                             symname, rbuf);                              symname, rbuf);
                 }                  }
         }          }

Legend:
Removed from v.1.114  
changed lines
  Added in v.1.115