X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6ba5b855ebc737cc46cabfbe799b0c7706f437f4..33d422c45419bacc9e3042c508c443815271053d:/h/prototypes.h diff --git a/h/prototypes.h b/h/prototypes.h index 3797fecc..adedd6a2 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -6,18 +6,6 @@ * as much as practical. */ -/* - * missing system prototypes - */ -#if ! defined(HAVE_TERMCAP_H) && ! defined (HAVE_NCURSES_TERMCAP_H) - extern int tgetent (char *bp, char *name); - extern int tgetnum (char *id); - extern int tgetflag (char *id); - extern char *tgetstr (char *id, char **area); - extern char *tgoto (char *cm, int destcol, int destline); - extern int tputs (char *cp, int affcnt, int (*outc) (int)); -#endif - /* * prototype from config.h */ @@ -113,6 +101,24 @@ char *get_charset(void); char *getcpy (const char *); char *get_default_editor(void); char *getfolder(int); + +/* + * Get a string from the terminfo database for the current terminal. + * + * Retrieve the specified terminfo capability and return a string that + * can be output to the terminal. The string returned has already been + * processed by tputs(), so it is safe to output directly. The return + * value of this function is valid until the next call. + * + * Arguments: + * + * capability - The name of a terminfo capability (see terminfo(5)). + * + * Returns a tputs-processed string, or NULL if terminal initialization failed + * or the capability wasn't found. + */ +char *get_term_stringcap(char *capability); + /* * Lock open/close routines. * @@ -154,6 +160,11 @@ char *m_mktemp2(const char *, const char *, int *, FILE **); void m_unknown(m_getfld_state_t *, FILE *); int makedir (char *); char *message_id (time_t, int); + +/* + * Clear the screen, using the appropriate entry from the terminfo database + */ +void nmh_clear_screen(void); char *nmh_getpass(const char *); char *norm_charmap(char *); char *new_fs (char *, char *, char *); @@ -280,7 +291,6 @@ char *SystemName(void); int annotate (char *, char *, char *, int, int, int, int); void annolist(char *, char *, char *, int); void annopreserve(int); -void clear_screen(void); void m_pclose(void); int make_intermediates(char *); int mhl(int, char **); @@ -288,7 +298,6 @@ int mhlsbr(int, char **, FILE *(*)(char *)); int distout (char *, char *, char *); void replout (FILE *, char *, char *, struct msgs *, int, int, char *, char *, char *, int); -int sc_hardcopy(void); int sc_length(void); int sc_width(void); int build_form (char *, char *, int *, char *, char *, char *, char *,