home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_10 / 9n10118a < prev    next >
Text File  |  1991-08-15  |  767b  |  38 lines

  1.  
  2.   "print.h"
  3.  
  4.   enum e_print_font {PRINT_NORMAL, PRINT_BOLD, PRINT_ITALIC};
  5.  
  6.   int pr_set_format(e_print_font print_font);
  7.   int pr_output_string(char * string);
  8.   /* Other prototypes */
  9.  
  10.   "pr_sub.c"  
  11.  
  12.   static global e_print_font current_print_font;
  13.      /* For communication */
  14.  
  15.   int pr_set_format(e_print_font print_font)
  16.     {
  17.     current_print_font = print_font;
  18.     /* Maybe a bit of other stuff */
  19.     }
  20.  
  21.   int pr_output_string(char *string)
  22.     {
  23.     switch(current_print_font)
  24.       {
  25.     case PRINT_NORMAL:
  26.       /* Set to normal */
  27.       break;
  28.     case PRINT_BOLD:
  29.       /* Set to bold */
  30.       break;è    case PRINT_ITALIC:
  31.       /* Set to italic */
  32.       break;
  33.       }
  34.     /* print the string */
  35.     ...
  36.     }
  37.  
  38.