home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cweb28.zip / common-vms.ch < prev    next >
Text File  |  1992-04-05  |  2KB  |  82 lines

  1. This is the change file for CWEB's COMMON under VAX/VMS.
  2.  
  3. created:
  4.     1987 BL (Bjorn Larsen, University of Oslo)
  5.  
  6. modified:
  7.     01-FEB-1992 ST (Stephan Trebels <trebels@ams02.dnet.gwdg.de>)
  8.     > include ctype,stdio,ssdef from textlibrary SYS$SHARE:VAXCDEF.TLB
  9.     > change error return code to SS$_ABORT
  10.       (perhaps better than %NONAME-E-NOMSG, Message number 2 )
  11.  
  12. (also modified by Don Knuth to match changes in the master file)
  13. (only the two changes by BL are necessary for initial bootstrapping
  14.  via hand-editing of common.c)
  15.  
  16. @x l.97 (01-FEB-1992 ST)
  17. #include <ctype.h>
  18. @y
  19. #include ctype /* VMS searches Textlibraries faster */
  20. @z
  21.  
  22. @x l.154  (01-FEB-1992 ST)
  23. #include <stdio.h>
  24. @y
  25. #include stdio /* VMS searches Textlibraries faster */
  26. @z
  27.  
  28. @x l.900 (01-FEB-1992 ST)
  29. programs are started. Here, for instance, we pass the operating system
  30. a status of 0 if and only if only harmless messages were printed.
  31. @y
  32. programs are started. Here, for instance, we pass VAX/VMS
  33. a status of |SS$_NORMAL| if and only if only harmless
  34. messages have been printed.
  35. A suitable status to signal an error condition to VAX/VMS could be
  36. |SS$_ABORT|, telling the operating system to
  37. print |"%SYSTEM-F-ABORT, abort"|, if |history > harmless_message|.
  38. @z
  39.  
  40. @x l.911 (1987 BL) (01-FEB-1992 ST)
  41.   if (history > harmless_message) exit(1);
  42.   else exit(0);
  43. @y
  44. /*
  45.    VAX/VMS and UNIX have different error status conventions.
  46.    VAX/VMS uses odd values (for example |SS$_NORMAL|) to indicate success,
  47.    even values indicate errors, resulting in messages displayed
  48.    on the screen. |SS$_ABORT| has been chosen, to indicate an
  49.    error and display something that's not complete nonsense.
  50. */
  51.   if (history > harmless_message) exit(SS$_ABORT);
  52.   else exit(SS$_NORMAL);
  53. @z
  54.  
  55. @x l.962 (01-FEB-1992 ST)
  56. An omitted change file argument means that |"/dev/null"| should be used,
  57. when no changes are desired.
  58. @y
  59. An omitted change file argument means that the
  60. null device |"NL:"| should be used, when no changes are desired.
  61. @z
  62.  
  63. @x l.994 (1987 BL) (01-FEB-1992 ST) (05-APR-1992 DEK)
  64.   if (!found_change) strcpy(change_file_name,"/dev/null");
  65. @y
  66.   if (!found_change) strcpy(change_file_name,"NL:");
  67.     /* {\tt NL:} is the VAX/VMS notation for {\tt /dev/null} */
  68. @z
  69.  
  70. @x l.1095 (01-FEB-1992 ST)
  71. @* Index.
  72. @y
  73. @* VAX/VMS specific code.
  74. We have used |SS$_NORMAL| and |SS$_ABORT| as return codes,
  75. so we have to include the system message codes.
  76.  
  77. @<Include files@>=
  78. #include ssdef /* we need VAX/VMS system messages */
  79.  
  80. @* Index.
  81. @z
  82.