home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include <sgtty.h>
- #include <sys/ioctl.h>
- #include "c_term.h"
-
- char get_erase()
- /*
- ---------------------------------------------------------------------------
-
- Last revision -
- 6 January 1985 - GWS
-
-
- NAME
- get_erase - get erase character for terminal
-
- SYNOPSIS
- char get_erase()
-
- DESCRIPTION
- The return character is the terminal's erase character.
-
- SEE ALSO
-
-
- DIAGNOSTICS
- Will exit(1) on any error.
-
- BUGS
- none known
-
- AUTHOR
- George W. Sherouse
- 3 January 1985
-
- ---------------------------------------------------------------------------
- */
-
- {
- struct sgttyb params;
- int ret;
- int ioctl();
-
- ret = ioctl(0, TIOCGETP, ¶ms);
- if (ret == -1)
- {
- fprintf(stderr, "ioctl fail\n");
- perror("get_erase");
- exit(1);
- }
-
- return(params.sg_erase);
- }
-