home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / shellforms / part02 / option.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-09  |  1.3 KB  |  51 lines

  1. /* Last update: 01/13/88  11:17 AM  (Edition: 5) */
  2. #include    <stdio.h>
  3. #include    <strings.h>
  4. #include    "form.h"
  5. #include    "basic.h"
  6.  
  7. unsigned char    Rvideo;            /* reverse video */
  8. unsigned char    Undline;        /* under line */
  9. unsigned char    Hilite;            /* high light */
  10. unsigned char    Shell = CSH;        /* output script type */
  11.  
  12. extern    char    Varfile[];
  13. extern    char    Enter_mode[];
  14. extern    char    Exit_mode[];
  15.  
  16. /*-------------------------------------------------------------05/08/86-+
  17. |                                    |
  18. |           set_options : set form editor options            |
  19. |                                    |
  20. +----------------------------------------------------------------------*/
  21. set_options (hilite, rvideo, undline, fname)
  22. int    hilite;                /* highlight attribute */
  23. int    rvideo;                /* reverse video attribute */
  24. int    undline;            /* underline attribute */
  25. char    *fname;                /* output variable file name */
  26.     {
  27.     char        sbuf [80];    /* set mode */
  28.     char        ebuf [80];    /* exit mode */
  29.  
  30.     ENTER(set_options);
  31.  
  32.     sbuf[0] = ebuf[0] = EOS;
  33.     if (hilite) {
  34.         get_hilite (sbuf, ebuf);
  35.         strcat (Enter_mode, sbuf);
  36.         strcat (Exit_mode, ebuf);
  37.         }
  38.     if (undline) {
  39.         get_undline (sbuf, ebuf);
  40.         strcat (Enter_mode, sbuf);
  41.         strcat (Exit_mode, ebuf);
  42.         }
  43.     if (rvideo) {
  44.         get_rvideo (sbuf, ebuf);
  45.         strcat (Enter_mode, sbuf);
  46.         strcat (Exit_mode, ebuf);
  47.         }
  48.     if (fname) strncpy (Varfile, fname, MAXFNAME);
  49.     EXIT;
  50.     }
  51.