-
+ 85D1DE1E79681B0CECE4CAEA7CA324374FB41317C449585E8CD4D23FAE4EF10923285545645FAC2921D3C53A0C897E33DA32D895B9BD0B761F696D0D8E036479
mpi/include/ttyio.h
(0 . 0)(1 . 58)
2130 /* ttyio.h
2131 * Copyright (C) 1998, 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
2132 *
2133 * This file is part of GNUPG.
2134 *
2135 * GNUPG is free software; you can redistribute it and/or modify
2136 * it under the terms of the GNU General Public License as published by
2137 * the Free Software Foundation; either version 3 of the License, or
2138 * (at your option) any later version.
2139 *
2140 * GNUPG is distributed in the hope that it will be useful,
2141 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2142 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2143 * GNU General Public License for more details.
2144 *
2145 * You should have received a copy of the GNU General Public License
2146 * along with this program; if not, see <http://www.gnu.org/licenses/>.
2147 */
2148 #ifndef G10_TTYIO_H
2149 #define G10_TTYIO_H
2150
2151 #ifdef HAVE_LIBREADLINE
2152 #include <stdio.h>
2153 #include <readline/readline.h>
2154 #endif
2155
2156 const char *tty_get_ttyname (void);
2157 int tty_batchmode( int onoff );
2158 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
2159 void tty_printf (const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
2160 void tty_fprintf (FILE *fp, const char *fmt, ... )
2161 __attribute__ ((format (printf,2,3)));
2162 #else
2163 void tty_printf (const char *fmt, ... );
2164 void tty_fprintf (FILE *fp, const char *fmt, ... );
2165 #endif
2166 void tty_print_string( const byte *p, size_t n );
2167 void tty_print_utf8_string( const byte *p, size_t n );
2168 void tty_print_utf8_string2( const byte *p, size_t n, size_t max_n );
2169 char *tty_get( const char *prompt );
2170 char *tty_get_hidden( const char *prompt );
2171 void tty_kill_prompt(void);
2172 int tty_get_answer_is_yes( const char *prompt );
2173 int tty_no_terminal(int onoff);
2174
2175 #ifdef HAVE_LIBREADLINE
2176 void tty_enable_completion(rl_completion_func_t *completer);
2177 void tty_disable_completion(void);
2178 #else
2179 /* Use a macro to stub out these functions since a macro has no need
2180 to typedef a "rl_completion_func_t" which would be undefined
2181 without readline. */
2182 #define tty_enable_completion(x)
2183 #define tty_disable_completion()
2184 #endif
2185 void tty_cleanup_after_signal (void);
2186
2187 #endif /*G10_TTYIO_H*/