home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / patches < prev    next >
Text File  |  1992-03-06  |  5KB  |  178 lines

  1. diff -cbr orig/src/ident.c rcs/src/ident.c
  2. *** orig/src/ident.c    Thu Jan 30 18:51:18 1992
  3. --- rcs/src/ident.c    Thu Jan 30 18:47:40 1992
  4. ***************
  5. *** 86,91 ****
  6. --- 86,94 ----
  7.   static int match P((FILE*));
  8.   static void scanfile P((FILE*,char const*,int));
  9.   
  10. + static char const cmdusage[] =
  11. +     "\nident usage: ident -{q} file ...";
  12. +     
  13.   mainProg(identId, "ident", "$Id: ident.c,v 5.4 1992/01/24 18:44:19 eggert Exp $")
  14.   /*  Ident searches the named files for all occurrences
  15.    *  of the pattern $keyword:...$, where the keywords are
  16. ***************
  17. *** 101,108 ****
  18.           argc--; argv++;
  19.      }
  20.   
  21. !    if (argc<2)
  22.       scanfile(stdin, (char*)0, quiet);
  23.   
  24.      while ( --argc > 0 ) {
  25.         if (!(fp = fopen(*++argv, FOPEN_R))) {
  26. --- 104,116 ----
  27.           argc--; argv++;
  28.      }
  29.   
  30. !    if (argc<2) {
  31. !     if (isatty(0)) {
  32. !             fprintf(stderr,"ident error: no input file%s\nident aborted\n", cmdusage);
  33. !         exit(EXIT_FAILURE);
  34. !         }
  35.       scanfile(stdin, (char*)0, quiet);
  36. +    }
  37.   
  38.      while ( --argc > 0 ) {
  39.         if (!(fp = fopen(*++argv, FOPEN_R))) {
  40. diff -cb orig/dirent.c ms/dirent.c
  41. *** orig/dirent.c    Fri Mar 06 10:25:18 1992
  42. --- ms/dirent.c    Fri Mar 06 12:00:24 1992
  43. ***************
  44. *** 56,61 ****
  45. --- 56,62 ----
  46.   #include <stdio.h>
  47.   #include <stdlib.h>
  48.   #include <string.h>
  49. + #include <sys/types.h>
  50.   #include <sys/stat.h>
  51.   
  52.   #ifdef __TURBOC__
  53. ***************
  54. *** 209,215 ****
  55.       /* Is it a directory?  */
  56.       if (stat(path, &statb) != 0)
  57.           return -1;
  58. !     if (! S_ISDIR(statb.st_mode)) {
  59.           errno = ENOTDIR;
  60.           return -1;
  61.       }
  62. --- 210,216 ----
  63.       /* Is it a directory?  */
  64.       if (stat(path, &statb) != 0)
  65.           return -1;
  66. !         if ((statb.st_mode & S_IFMT) != S_IFDIR) {
  67.           errno = ENOTDIR;
  68.           return -1;
  69.       }
  70. ***************
  71. *** 225,231 ****
  72.                   ff.ff_name[1] && (ff.ff_name[1]!='.'||ff.ff_name[2])
  73.               ) {
  74.                   struct dirnames *p = malloc(
  75. !                     sizeof(struct name)+strlen(ff.ff_name)
  76.                   );
  77.                   if (!p) {
  78.                       freenames(dir);
  79. --- 226,232 ----
  80.                   ff.ff_name[1] && (ff.ff_name[1]!='.'||ff.ff_name[2])
  81.               ) {
  82.                   struct dirnames *p = malloc(
  83. !                     sizeof(struct dirnames)+strlen(ff.ff_name)
  84.                   );
  85.                   if (!p) {
  86.                       freenames(dir);
  87. ***************
  88. *** 233,239 ****
  89.                       *pathend = 0;
  90.                       return -1;
  91.                   }
  92. !                 strcpy(*p->name, ff.ff_name);
  93.                   p->next = 0;
  94.                   *np = p;
  95.                   np = &p->next;
  96. --- 234,240 ----
  97.                       *pathend = 0;
  98.                       return -1;
  99.                   }
  100. !                 strcpy(p->name, ff.ff_name);
  101.                   p->next = 0;
  102.                   *np = p;
  103.                   np = &p->next;
  104. ***************
  105. *** 250,256 ****
  106.       static void
  107.   freenames(DIR *dir)
  108.   {
  109. !     struct name *o = dir->names, *n;
  110.       for (o = dir->names;  o;  o = n) {
  111.           n = o->next;
  112.           free(o);
  113. --- 251,257 ----
  114.       static void
  115.   freenames(DIR *dir)
  116.   {
  117. !     struct dirnames *o = dir->names, *n;
  118.       for (o = dir->names;  o;  o = n) {
  119.           n = o->next;
  120.           free(o);
  121. diff -cb orig/makefile.mk ms/makefile.mk
  122. *** orig/makefile.mk    Fri Mar 06 10:32:52 1992
  123. --- ms/makefile.mk    Fri Mar 06 11:41:30 1992
  124. ***************
  125. *** 29,35 ****
  126.   
  127.   nmake.mk : ../Makefile ms.mkh nmake.mkh rlog.rsp
  128.       $(EDIT) >$@ -e \
  129. !         '/$(linksource)/{s|.*|!IF "$$(OS)" == "os2"|; p; s|.*|    $$(LINK) $$($$@) $$(LDLIBS)|; p; s|.*|    $$(BIND) $$@ $$(BINDN)|; p; s|.*|!ELSE|; p; s|.*|    $(linktarget)|; p; s|.*|!ENDIF|; }'
  130.   
  131.   rcstest : ../rcstest
  132.       sed \
  133. --- 29,35 ----
  134.   
  135.   nmake.mk : ../Makefile ms.mkh nmake.mkh rlog.rsp
  136.       $(EDIT) >$@ -e \
  137. !         '/$(linksource)/{h; s|.*|!IF "$$(OS)" == "os2"|; p; g; p; s|.*|    $$(BIND) $$@ $$(BINDN)|; p; s|.*|!ELSE|; p; s|.*|    $(linktarget)|; p; s|.*|!ENDIF|; }'
  138.   
  139.   rcstest : ../rcstest
  140.       sed \
  141. diff -cb orig/nmake.mkh ms/nmake.mkh
  142. *** orig/nmake.mkh    Fri Mar 06 10:32:56 1992
  143. --- ms/nmake.mkh    Fri Mar 06 11:47:26 1992
  144. ***************
  145. *** 8,14 ****
  146.   
  147.   !IF "$(OS)" == "os2"
  148.   CC_286 = -G2
  149. ! CC_D = -D__OS2__=1
  150.   LDLIBS = ms\rcs.def -Lp -link $(LDFLAGS)
  151.   LINK = cl -nologo
  152.   !ELSE
  153. --- 8,14 ----
  154.   
  155.   !IF "$(OS)" == "os2"
  156.   CC_286 = -G2
  157. ! CC_D = -D__OS2__=1 -Dbad_creat0=0 -Dbad_chmod_close=0
  158.   LDLIBS = ms\rcs.def -Lp -link $(LDFLAGS)
  159.   LINK = cl -nologo
  160.   !ELSE
  161. ***************
  162. *** 42,48 ****
  163.   
  164.   INSTALL = copy
  165.   
  166. ! LDFLAGS = $(LD_DEBUG)/ST:16384
  167.   
  168.   # You may have to change the following line; there's no standard.
  169.   LIB = \msc\lib\$(s)
  170. --- 42,48 ----
  171.   
  172.   INSTALL = copy
  173.   
  174. ! LDFLAGS = $(LD_DEBUG)/ST:16384 /NOE
  175.   
  176.   # You may have to change the following line; there's no standard.
  177.   LIB = \msc\lib\$(s)
  178.