home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / mawk11as.zip / VERSION.C < prev    next >
C/C++ Source or Header  |  1992-01-22  |  1KB  |  71 lines

  1.  
  2. /********************************************
  3. version.c
  4. copyright 1991, Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the AWK programming language.
  8.  
  9. Mawk is distributed without warranty under the terms of
  10. the GNU General Public License, version 2, 1991.
  11. ********************************************/
  12.  
  13. /*$Log:    version.c,v $
  14.  * Revision 5.2  92/01/22  05:34:10  brennan
  15.  * version 1.1
  16.  * 
  17.  * Revision 5.1  91/12/05  07:56:33  brennan
  18.  * 1.1 pre-release
  19.  * 
  20. */
  21.  
  22. #include "mawk.h"
  23. #include "patchlev.h"
  24.  
  25. #define  VERSION_STRING  \
  26.   "mawk 1.1%s%s Dec 1991, Copyright (C) Michael D. Brennan\n\n"
  27.  
  28. #define  DOS_STRING     ""
  29.  
  30. /* If use different command line syntax for MSDOS
  31.    mark that in VERSION  */
  32.  
  33. #if  MSDOS 
  34. #undef   DOS_STRING
  35.  
  36. #if  SM_DOS
  37.  
  38. #if  HAVE_REARGV
  39. #define  DOS_STRING     "SM"
  40. #else
  41. #define  DOS_STRING     "SMDOS"
  42. #endif  
  43.  
  44. #else  /* LM_DOS  */
  45.  
  46. #if  HAVE_REARGV
  47. #define  DOS_STRING     "LM"
  48. #else
  49. #define  DOS_STRING     "LMDOS"
  50. #endif  
  51.  
  52. #endif
  53. #endif  /* MSDOS */
  54.  
  55. #ifdef THINK_C
  56. #undef DOS_STRING
  57. #define DOS_STRING ":Mac"
  58. #endif
  59.  
  60. /* print VERSION and exit */
  61. void print_version()
  62. { static char fmt[] = "%-14s%10u\n" ;
  63.  
  64.   printf(VERSION_STRING, PATCH_STRING, DOS_STRING) ;
  65.   fflush(stdout) ;
  66.   fprintf(stderr, "compiled limits:\n") ;
  67.   fprintf(stderr, fmt,  "largest field", MAX_FIELD) ;
  68.   fprintf(stderr, fmt,  "sprintf buffer",SPRINTF_SZ) ;
  69.   exit(0) ;
  70. }
  71.