home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / unixtex-6.1b-src.lha / unixtex-6.1b / web2c / lib / uexit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-25  |  420 b   |  22 lines

  1. /* uexit.c: define uexit to do an exit with the right status.  We can't
  2.    just call `exit' from the web files, since the webs use `exit' as a
  3.    loop label.  */
  4.  
  5. #include "config.h"
  6.  
  7. void
  8. uexit (unix_code)
  9.   int unix_code;
  10. {
  11.   int final_code;
  12.   
  13.   if (unix_code == 0)
  14.     final_code = EXIT_SUCCESS;
  15.   else if (unix_code == 1)
  16.     final_code = !EXIT_SUCCESS;
  17.   else
  18.     final_code = unix_code;
  19.   
  20.   exit (final_code);
  21. }
  22.