home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / rcs567s.zip / rcs / src / ms / patches < prev    next >
Text File  |  1994-08-04  |  7KB  |  243 lines

  1. diff -cbr rcs-orig/src/conf.heg rcs/src/conf.heg
  2. *** rcs-orig/src/conf.heg    Mon Aug 01 15:32:16 1994
  3. --- rcs/src/conf.heg    Mon Aug 01 15:20:30 1994
  4. ***************
  5. *** 140,145 ****
  6. --- 140,146 ----
  7.   /* This may need changing on non-Unix systems (notably DOS).  */
  8.   #define OPEN_CREAT_READONLY (S_IRUSR|S_IRGRP|S_IROTH) /* lock file mode */
  9.   #define OPEN_O_LOCK 0 /* extra open flags for creating lock file */
  10. + #define OPEN_O_WRONLY O_WRONLY
  11.   
  12.   /* Define or comment out the following symbols as needed.  */
  13.   #define bad_chmod_close 0 /* Can chmod() close file descriptors?  */
  14. diff -cbr rcs-orig/src/conf.sh rcs/src/conf.sh
  15. *** rcs-orig/src/conf.sh    Thu Apr 14 16:14:32 1994
  16. --- rcs/src/conf.sh    Thu Aug 04 19:39:16 1994
  17. ***************
  18. *** 590,595 ****
  19. --- 590,596 ----
  20.   /* This may need changing on non-Unix systems (notably DOS).  */
  21.   #define OPEN_CREAT_READONLY (S_IRUSR|S_IRGRP|S_IROTH) /* lock file mode */
  22.   #define OPEN_O_LOCK 0 /* extra open flags for creating lock file */
  23. + #define OPEN_O_WRONLY O_WRONLY
  24.   
  25.   /* Define or comment out the following symbols as needed.  */
  26.   EOF
  27. diff -cbr rcs-orig/src/ident.c rcs/src/ident.c
  28. *** rcs-orig/src/ident.c    Sun Mar 20 05:52:58 1994
  29. --- rcs/src/ident.c    Tue Mar 22 21:33:28 1994
  30. ***************
  31. *** 239,241 ****
  32. --- 239,247 ----
  33.      VOID fprintf(stdout, "     %c%s\n", KDELIM, line);
  34.      return 0;
  35.   }
  36. +     void 
  37. + exiterr()
  38. + {
  39. +     _exit(EXIT_FAILURE);
  40. + }
  41. diff -cbr rcs-orig/src/rcs.c rcs/src/rcs.c
  42. *** rcs-orig/src/rcs.c    Thu Mar 17 15:05:48 1994
  43. --- rcs/src/rcs.c    Tue Mar 22 21:00:02 1994
  44. ***************
  45. *** 1052,1058 ****
  46. --- 1052,1060 ----
  47.           warn("Mail notification of broken locks is not available."),
  48.   #endif
  49.           warn("Please tell `%s' why you broke the lock.", who);
  50. + #ifdef SENDMAIL
  51.       Ozclose(&mailmess);
  52. + #endif
  53.       return(true);
  54.   }
  55.   
  56. diff -cbr rcs-orig/src/rcsedit.c rcs/src/rcsedit.c
  57. *** rcs-orig/src/rcsedit.c    Sun Mar 20 05:52:58 1994
  58. --- rcs/src/rcsedit.c    Tue Jul 26 20:46:50 1994
  59. ***************
  60. *** 1371,1377 ****
  61.   #    if !open_can_creat
  62.   #        define create(f) creat(f, OPEN_CREAT_READONLY)
  63.   #    else
  64. ! #        define create(f) open(f, OPEN_O_BINARY|OPEN_O_LOCK|O_CREAT|O_EXCL|O_TRUNC|O_WRONLY, OPEN_CREAT_READONLY)
  65.   #    endif
  66.   
  67.       catchints();
  68. --- 1371,1377 ----
  69.   #    if !open_can_creat
  70.   #        define create(f) creat(f, OPEN_CREAT_READONLY)
  71.   #    else
  72. ! #        define create(f) open(f, OPEN_O_BINARY|OPEN_O_LOCK|O_CREAT|O_EXCL|O_TRUNC|OPEN_O_WRONLY, OPEN_CREAT_READONLY)
  73.   #    endif
  74.   
  75.       catchints();
  76. diff -cbr rcs-orig/src/rlog.c rcs/src/rlog.c
  77. *** rcs-orig/src/rlog.c    Thu Apr 14 16:14:06 1994
  78. --- rcs/src/rlog.c    Thu Apr 14 16:14:34 1994
  79. ***************
  80. *** 208,218 ****
  81.   static struct lockers *lockerlist;
  82.   static struct stateattri *statelist;
  83.   
  84.   
  85.   mainProg(rlogId, "rlog", "$Id: rlog.c,v 5.16 1994/04/13 16:30:34 eggert Exp $")
  86.   {
  87.       static char const cmdusage[] =
  88. !         "\nrlog usage: rlog -{bhLNRt} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ...";
  89.   
  90.       register FILE *out;
  91.       char *a, **newargv;
  92. --- 208,221 ----
  93.   static struct lockers *lockerlist;
  94.   static struct stateattri *statelist;
  95.   
  96. + static int onlyid;
  97. + static char const *numrev2symbrev P((char const *numrev));
  98.   
  99.   mainProg(rlogId, "rlog", "$Id: rlog.c,v 5.16 1994/04/13 16:30:34 eggert Exp $")
  100.   {
  101.       static char const cmdusage[] =
  102. !         "\nrlog usage: rlog -{bhLNRtIZ} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ...";
  103.   
  104.       register FILE *out;
  105.       char *a, **newargv;
  106. ***************
  107. *** 226,231 ****
  108. --- 229,235 ----
  109.       int descflag, selectflag;
  110.       int onlylockflag;  /* print only files with locks */
  111.       int onlyRCSflag;  /* print only RCS pathname */
  112. +     int onlylockers = 0;
  113.       int pre5;
  114.       int shownames;
  115.       int revno;
  116. ***************
  117. *** 252,257 ****
  118. --- 256,269 ----
  119.               onlyRCSflag =true;
  120.               break;
  121.   
  122. +         case 'I':
  123. +             onlyid = (*a == 'I') ? 2 : 1;
  124. +             break;
  125. +         case 'Z':
  126. +             onlylockers = (*a == 'Z') ? 2 : 1;
  127. +             break;
  128.                   case 'l':
  129.                           lockflag = true;
  130.               getlocker(a);
  131. ***************
  132. *** 353,358 ****
  133. --- 365,431 ----
  134.            * workname contains the name of the working file.
  135.                */
  136.   
  137. +         /* Options 'Z' and 'ZZ' added to quickly get the relevant Data
  138. +          * for locked File(s)/Revisions.
  139. +          * Options 'I' and 'II' added to easily get Information about
  140. +          * unlocked File(s) of the specified Revision(s). These Records
  141. +          * could be used as an Entry of an Revision-List.
  142. +          * The single-option Version prints Basenames, the double-option
  143. +          * Version prints Filenames with the full path.
  144. +          */
  145. +         if (onlyid) {
  146. +           if (Locks) {         /* Issue Warnings for locked Versions */
  147. +         currlock = Locks;
  148. +         aprintf (stderr, "Warning: there are Locks for File %s:\n",
  149. +              onlyid == 1 ? RCSname : getfullRCSname());
  150. +         while (currlock) {
  151. +           aprintf (stderr, 
  152. +                "\tFile: %s   Revision: %s [%s]  locked by: %s\n",
  153. +                onlyid == 1 ? RCSname : getfullRCSname(), 
  154. +                currlock->delta->num, 
  155. +                numrev2symbrev (currlock->delta->num),
  156. +                currlock->login);
  157. +           currlock = currlock->nextlock;
  158. +         }
  159. +           }
  160. +           if (! Head) continue;
  161. +           gettree ();
  162. +           revno = 0;
  163. +           getnumericrev ();
  164. +           exttree (Head);
  165. +           currdate = duelst;
  166. +           while (currdate) {
  167. +         VOID sprintf (currdate->strtdate,dateform,0,0,0,0,0,0);
  168. +         recentdate (Head, currdate);
  169. +         currdate = currdate->dnext;
  170. +           }
  171. +           revno = extdate (Head);
  172. +           getdesc (false);
  173. +           if (revno) {
  174. +         while (! (delta = readdeltalog())->selector  ||  --revno) ;
  175. +         if (delta->next && countnumflds(delta->num)==2) {
  176. +           while (readdeltalog() != delta->next) ;
  177. +         }
  178. +         putrunk ();
  179. +         putree (Head);
  180. +           }
  181. +           continue;
  182. +         }
  183. +         if (onlylockers) {
  184. +           currlock = Locks;
  185. +           while (currlock) {
  186. +         aprintf (out, "File: %s   Revision: %s [%s]  locked by: %s\n",
  187. +              onlylockers == 1 ? RCSname : getfullRCSname(), 
  188. +              currlock->delta->num, 
  189. +              numrev2symbrev (currlock->delta->num),
  190. +              currlock->login);
  191. +         currlock = currlock->nextlock;
  192. +           }
  193. +           continue;
  194. +         }
  195.           /* Keep only those locks given by -l.  */
  196.           if (lockflag)
  197.           trunclocks();
  198. ***************
  199. *** 560,565 ****
  200. --- 633,648 ----
  201.               return;
  202.   
  203.       out = stdout;
  204. +     if (onlyid) {
  205. +       aprintf (out, 
  206. +            "File: %s   Revision: %s [%s]  Date: %s   Author: %s  State: %s\n",
  207. +            onlyid == 1 ? workname : getfullRCSname(),
  208. +            node->num, numrev2symbrev (node->num),
  209. +            date2str (node->date, datebuf), node->author, node->state);
  210. +       return;
  211. +     }
  212.       aprintf(out,
  213.           "----------------------------\nrevision %s%s",
  214.           node->num,  pre5 ? "        " : ""
  215. ***************
  216. *** 1254,1257 ****
  217. --- 1337,1352 ----
  218.           else
  219.           error("missing `,' near `%c%s'", c, argv+1);
  220.       }
  221. + }
  222. + static char const *numrev2symbrev (numrev)
  223. + char const *numrev;
  224. + {
  225. +     struct assoc const *p;
  226. +     for (p = Symbols; p; p = p->nextassoc) {
  227. +         if (! strcmp (numrev, p->num)) return (p->symbol);
  228. +     }
  229. +     return ("");
  230.   }
  231.