- char *term;
-
- switch (t_getent(&info, term = getenv("TERM"))) {
- case -1:
- write(2, "Cannot open termcap file.\n", 26);
- exit(1);
- case 0:
- write(2, "Cannot find entry of ", 21);
- write(2, term, strlen(term));
- write(2, " in termcap\n", 12);
- exit(1);
- };
-
- CM = t_agetstr(info, "cm"); /* Cursor motion */
- CE = t_agetstr(info, "ce"); /* Clear to eoln */
- CL = t_agetstr(info, "cl"); /* Clear screen */
-
- /* OPTIONAL */
- AL = t_agetstr(info, "al"); /* Insert line */
- DL = t_agetstr(info, "dl"); /* Delete line */
- SO = t_agetstr(info, "so"); /* Begin standout mode */
- SE = t_agetstr(info, "se"); /* End standout mode */
- CD = t_agetstr(info, "cd"); /* Clear to end of display */
-
- if (!CM) { /* can't find cursor motion entry */
- write(2, "Sorry, for a ", 13);
- write(2, term, strlen(term));
- write(2, ", I can't find the cursor motion entry in termcap\n", 50);