jcs's openbsd hax
openbsd
at jcs 54 lines 1.8 kB view raw
1/* $OpenBSD: cu.h,v 1.9 2019/03/22 07:03:23 nicm Exp $ */ 2 3/* 4 * Copyright (c) 2012 Nicholas Marriott <nicm@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER 15 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 16 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19#ifndef CU_H 20#define CU_H 21 22/* command.c */ 23void do_command(char); 24 25/* cu.c */ 26extern int escape_char; 27extern int restricted; 28extern FILE *record_file; 29extern struct termios saved_tio; 30extern int line_fd; 31extern struct bufferevent *line_ev; 32void set_blocking(int, int); 33int set_line(int); 34void set_termios(void); 35void restore_termios(void); 36char *tilde_expand(const char *); 37 38/* input.c */ 39const char *get_input(const char *); 40 41/* error.c */ 42void cu_warn(const char *, ...) 43 __attribute__ ((format (printf, 1, 2))); 44void cu_warnx(const char *, ...) 45 __attribute__ ((format (printf, 1, 2))); 46void cu_err(int, const char *, ...) 47 __attribute__ ((format (printf, 2, 3))); 48void cu_errx(int, const char *, ...) 49 __attribute__ ((format (printf, 2, 3))); 50 51/* xmodem.c */ 52void xmodem_send(const char *); 53 54#endif