home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hcshdemo.zip / csh-os2.zip / SAMPLES / RCODE.C < prev    next >
C/C++ Source or Header  |  1993-09-28  |  702b  |  23 lines

  1. /***************************************************************************/
  2. /*                                                                                                    */
  3. /*                                                                                                    */
  4. /*                    Print & exit with the specified return code.                        */
  5. /*    Copyright (c) 1989-1992 by Hamilton Laboratories.  All rights reserved.    */
  6. /*                                                                                                    */
  7. /*                                                                                                    */
  8. /***************************************************************************/
  9.         
  10. #include <os2.h>
  11. #include <stdlib.h>
  12. #include <stdio.h>
  13.  
  14. void cdecl main ( int argc, char *argv[] )
  15.         {
  16.         unsigned return_code = 0;
  17.         if (argc > 1)
  18.             printf("%d\n", return_code = atoi(argv[1]));
  19.         else
  20.             printf("0\n");
  21.         DosExit(EXIT_PROCESS, return_code);
  22.         }
  23.