-
+ 85D1DE1E79681B0CECE4CAEA7CA324374FB41317C449585E8CD4D23FAE4EF10923285545645FAC2921D3C53A0C897E33DA32D895B9BD0B761F696D0D8E036479
mpi/include/ttyio.h
(0 . 0)(1 . 58)
2234 /* ttyio.h
2235 * Copyright (C) 1998, 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
2236 *
2237 * This file is part of GNUPG.
2238 *
2239 * GNUPG is free software; you can redistribute it and/or modify
2240 * it under the terms of the GNU General Public License as published by
2241 * the Free Software Foundation; either version 3 of the License, or
2242 * (at your option) any later version.
2243 *
2244 * GNUPG is distributed in the hope that it will be useful,
2245 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2246 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2247 * GNU General Public License for more details.
2248 *
2249 * You should have received a copy of the GNU General Public License
2250 * along with this program; if not, see <http://www.gnu.org/licenses/>.
2251 */
2252 #ifndef G10_TTYIO_H
2253 #define G10_TTYIO_H
2254
2255 #ifdef HAVE_LIBREADLINE
2256 #include <stdio.h>
2257 #include <readline/readline.h>
2258 #endif
2259
2260 const char *tty_get_ttyname (void);
2261 int tty_batchmode( int onoff );
2262 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
2263 void tty_printf (const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
2264 void tty_fprintf (FILE *fp, const char *fmt, ... )
2265 __attribute__ ((format (printf,2,3)));
2266 #else
2267 void tty_printf (const char *fmt, ... );
2268 void tty_fprintf (FILE *fp, const char *fmt, ... );
2269 #endif
2270 void tty_print_string( const byte *p, size_t n );
2271 void tty_print_utf8_string( const byte *p, size_t n );
2272 void tty_print_utf8_string2( const byte *p, size_t n, size_t max_n );
2273 char *tty_get( const char *prompt );
2274 char *tty_get_hidden( const char *prompt );
2275 void tty_kill_prompt(void);
2276 int tty_get_answer_is_yes( const char *prompt );
2277 int tty_no_terminal(int onoff);
2278
2279 #ifdef HAVE_LIBREADLINE
2280 void tty_enable_completion(rl_completion_func_t *completer);
2281 void tty_disable_completion(void);
2282 #else
2283 /* Use a macro to stub out these functions since a macro has no need
2284 to typedef a "rl_completion_func_t" which would be undefined
2285 without readline. */
2286 #define tty_enable_completion(x)
2287 #define tty_disable_completion()
2288 #endif
2289 void tty_cleanup_after_signal (void);
2290
2291 #endif /*G10_TTYIO_H*/