home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / fileutil / cawf / patches.os2 < prev    next >
Encoding:
Text File  |  1991-04-28  |  1.7 KB  |  65 lines

  1. diff -cbBw CAWF.DOS/cawf.c CAWF.OS2/cawf.c
  2. *** CAWF.DOS/cawf.c    Thu Feb 21 18:14:54 1991
  3. --- CAWF.OS2/cawf.c    Fri Apr 26 22:02:36 1991
  4. ***************
  5. *** 92,97 ****
  6. --- 92,106 ----
  7.           Error(FATAL, NOLINE, " no string space for device file name",
  8.               NULL);
  9.       (void) sprintf(np, "%s/%s.dev", lib, ep);
  10. +         if ( access(np, 0) )
  11. +         {
  12. +                 free(np);
  13. +             l = libl + 1 + strlen("dumb") + strlen(".dev") + 1;
  14. +             if ((np = malloc(l)) == NULL)
  15. +                 Error(FATAL, NOLINE, " no string space for device file name",
  16. +                     NULL);
  17. +               (void) sprintf(np, "%s/dumb.dev", lib, ep);
  18. +         }
  19.       files[nf++] = np;
  20.   /*
  21.    * Get common text file name.
  22. ***************
  23. *** 137,142 ****
  24. --- 146,153 ----
  25.    */
  26.       pc = nf;
  27.       if (ax >= argc) {
  28. +                 if ( isatty(1) )
  29. +                         usage(argv[0]);
  30.           files[nf++] = NULL;       /* STDIN */
  31.       } else {
  32.           while (ax < argc) {
  33. ***************
  34. *** 236,241 ****
  35. --- 247,262 ----
  36.       }
  37.       Macro(NULL);
  38.       exit(Err);
  39. + }
  40. + usage(name)
  41. + char *name;
  42. + {
  43. +         printf("\nCAWF - C version of the nroff-like, Amazingly Workable (text) Formatter\n"
  44. +                "\nUsage: %s [ -macros ] [ file ... ]\n"
  45. +                "\n       -macros may be -man or -ms, for example\n", name);
  46. +         exit(1);
  47.   }
  48.   
  49.   
  50. diff -cbBw CAWF.DOS/pass2.c CAWF.OS2/pass2.c
  51. *** CAWF.DOS/pass2.c    Thu Feb 21 18:14:58 1991
  52. --- CAWF.OS2/pass2.c    Fri Apr 26 22:37:00 1991
  53. ***************
  54. *** 75,80 ****
  55. --- 75,81 ----
  56.        * End of macro expansion.
  57.        */
  58.           Pass3(DOBREAK, "need", NULL, 999);    /* flush page */
  59. +         Pass3(DOBREAK, "flush", NULL, 0);
  60.           return;
  61.       }
  62.       /*
  63.