home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / FLEX246 / PATCHES.OS2 < prev    next >
Encoding:
Text File  |  1994-01-10  |  2.3 KB  |  88 lines

  1. Only in new: Makefile.os2
  2. Only in new: parse.c
  3. Only in new: parse.h
  4. Only in new: patches.os2
  5. diff -cbr orig/flexdef.h new/flexdef.h
  6. *** orig/flexdef.h    Tue Jan 04 23:33:14 1994
  7. --- new/flexdef.h    Sun Jan 09 22:20:50 1994
  8. ***************
  9. *** 41,46 ****
  10. --- 41,50 ----
  11.   #include <stdlib.h>
  12.   #endif
  13.   
  14. + #ifdef __STDC__
  15. + #include <stdlib.h>
  16. + #endif
  17.   /* Always be prepared to generate an 8-bit scanner. */
  18.   #define CSIZE 256
  19.   #define Char unsigned char
  20. diff -cbr orig/main.c new/main.c
  21. *** orig/main.c    Tue Jan 04 23:33:12 1994
  22. --- new/main.c    Sun Jan 09 22:20:52 1994
  23. ***************
  24. *** 394,399 ****
  25. --- 394,405 ----
  26.            program_name[strlen( program_name ) - 1] == '+' )
  27.           C_plus_plus = true;
  28.   
  29. +     if ( (argc == 1) && isatty(fileno(stdin)) )
  30. +         {
  31. +         usage();
  32. +         exit(1);
  33. +             }
  34. +  
  35.       /* read flags */
  36.       for ( --argc, ++argv; argc ; --argc, ++argv )
  37.           {
  38. ***************
  39. *** 940,947 ****
  40.   
  41.   void usage()
  42.       {
  43.       fprintf( stderr,
  44. ! "%s [-bcdfhilnpstvwBFILTV78+ -C[aefFmr] -Pprefix -Sskeleton] [file ...]\n",
  45.           program_name );
  46.   
  47.       fprintf( stderr,
  48. --- 946,954 ----
  49.   
  50.   void usage()
  51.       {
  52. +     fprintf( stderr, "\n%s version %s\n", program_name, flex_version );
  53.       fprintf( stderr,
  54. ! "\n%s [-bcdfhilnpstvwBFILTV78+ -C[aefFmr] -Pprefix -Sskeleton] [file ...]\n\n",
  55.           program_name );
  56.   
  57.       fprintf( stderr,
  58. diff -cbr orig/misc.c new/misc.c
  59. *** orig/misc.c    Tue Jan 04 23:33:10 1994
  60. --- new/misc.c    Sun Jan 09 22:20:54 1994
  61. ***************
  62. *** 393,400 ****
  63.       if ( infilename && gen_line_dirs )
  64.           {
  65.           char directive[MAXLINE];
  66.           sprintf( directive, "# line %d \"%s\"\n", linenum, infilename );
  67.           /* If output_file is nil then we should put the directive in
  68.            * the accumulated actions.
  69.            */
  70. --- 393,407 ----
  71.       if ( infilename && gen_line_dirs )
  72.           {
  73.           char directive[MAXLINE];
  74. + #if defined(OS2) || defined(MS_DOS)
  75. +         char path[MAXLINE], *p, *w;
  76. +         for ( p = infilename, w = path; *p; p++, w++ )
  77. +           *w = (*p == '\\') ? '/' : *p;
  78. +         *w = 0;
  79. +         sprintf( directive, "# line %d \"%s\"\n", linenum, path );
  80. + #else
  81.           sprintf( directive, "# line %d \"%s\"\n", linenum, infilename );
  82. ! #endif
  83.           /* If output_file is nil then we should put the directive in
  84.            * the accumulated actions.
  85.            */
  86.