home *** CD-ROM | disk | FTP | other *** search
-
- void underline(on_or_off)
- int on_or_off;
-
-
- /*
- ---------------------------------------------------------------------------
-
- Last revision -
- 30 March 1984 - GWS
-
-
- NAME
- underline - set or clear terminal underline mode
-
- SYNOPSIS
- void underline(on_or_off)
- int on_or_off;
-
- DESCRIPTION
- Uses termcap(3x) routines to set terminal mode.
-
- SEE ALSO
- termcap(3)
-
- DIAGNOSTICS
- If the mode doesn't change, it didn't work.
-
- AUTHOR
- George W. Sherouse
- 30 March 1984
-
- ---------------------------------------------------------------------------
- */
-
- {
- static int called = 0;
- static char us_id[] = "us", ue_id[] = "ue", us_str[10], ue_str[10];
- static char *us_point = us_str, **us_point2 = &us_point;
- static char *ue_point = ue_str, **ue_point2 = &ue_point;
- extern char bp[1024];
- int tgetent(), tputs();
- int putchar();
-
- if (!called)
- {
- tgetstr(us_id, us_point2);
- tgetstr(ue_id, ue_point2);
- called++;
- }
-
- if (on_or_off)
- (void) tputs(us_str, 1, putchar);
- else
- (void) tputs(ue_str, 1, putchar);
- return;
- }
-