home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_12 / 9n12048b < prev    next >
Text File  |  1991-10-14  |  544b  |  19 lines

  1. #include "solid.h"
  2.  
  3. void quit(int msg_index, char filename[], int linenum)
  4. {
  5.     static char linenum_c[] = {", line       \n"};
  6.     static char *message[] = {
  7.         " at file ", /* 0 */
  8.         "insufficient memory", /* 1 */
  9.         "invalid solid object type", /* 2 */
  10.         "requires ega/vga graphics", /* 3 */
  11.     };
  12.  
  13.         sprintf(&linenum_c[7], "%6d", linenum);
  14.         perror((char *)strcat(strcat(strcat(message
  15.             [msg_index], message[0]), filename),
  16.             linenum_c));
  17.         exit(msg_index);
  18. }
  19.