home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum16.lzh / SOFTWARE / C / DIV_UTILITIES / misc.h < prev    next >
Text File  |  1991-03-24  |  1KB  |  42 lines

  1. /*********************************************************************
  2. Module description of misc.h:
  3.   Provides some useful macros and functions.
  4. ----------------------------------------------------------------------
  5. shorthand, name and address of authors:
  6.   MM       M. Moser, Jakob-Brucker-Str. 15, 8950 Kaufbeuren
  7. ----------------------------------------------------------------------
  8. version, author, date and report:
  9.   1.0    MM      27.01.91 initial version
  10. ----------------------------------------------------------------------
  11. pecularities:
  12.   none
  13. *********************************************************************/
  14.  
  15.  
  16. /********** include files **********/
  17. #include <errno.h>
  18.  
  19.  
  20. /********** global definitions **********/
  21. #define MaxStrLen 256
  22.  
  23.  
  24. /********** global macros **********/
  25.  
  26. /* abort program with error message */
  27. #define ErrorExit(s) \
  28.     exit(_errmsg(errno, (s)))
  29.  
  30. /* abort program with error message, control string s, parameter n */
  31. #define ErrExit(s, n) \
  32.     exit(_errmsg(errno, (s), (n)))
  33.  
  34. /* read line in buffer (char *) b and extract value p according to */
  35. /* control string c                                                */
  36. #define ScanLn(b, c, p) \
  37.     scanf("%s", (b)); \
  38.     sscanf((b), (c), (p));
  39.  
  40.  
  41. /*************************** end of file ****************************/
  42.