talk.h revision 225736
117680Spst/* 217680Spst * Copyright (c) 1983, 1993 317680Spst * The Regents of the University of California. All rights reserved. 417680Spst * 517680Spst * Redistribution and use in source and binary forms, with or without 617680Spst * modification, are permitted provided that the following conditions 717680Spst * are met: 817680Spst * 1. Redistributions of source code must retain the above copyright 917680Spst * notice, this list of conditions and the following disclaimer. 1017680Spst * 2. Redistributions in binary form must reproduce the above copyright 1117680Spst * notice, this list of conditions and the following disclaimer in the 1217680Spst * documentation and/or other materials provided with the distribution. 1317680Spst * 4. Neither the name of the University nor the names of its contributors 1417680Spst * may be used to endorse or promote products derived from this software 1517680Spst * without specific prior written permission. 1617680Spst * 1717680Spst * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1817680Spst * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1917680Spst * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2026183Sfenner * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2117680Spst * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2217680Spst * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2356896Sfenner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2456896Sfenner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2517680Spst * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2626183Sfenner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2717680Spst * SUCH DAMAGE. 28127675Sbms * 29190207Srpaulo * @(#)talk.h 8.1 (Berkeley) 6/6/93 3017680Spst * $FreeBSD: stable/9/usr.bin/talk/talk.h 216370 2010-12-11 08:32:16Z joel $ 3117680Spst */ 3256896Sfenner 3356896Sfenner#include <sys/cdefs.h> 3456896Sfenner#include <sys/types.h> 3556896Sfenner#include <sys/time.h> 36127675Sbms#include <sys/socket.h> 3717680Spst#include <netinet/in.h> 3817680Spst#include <arpa/inet.h> 3917680Spst#include <protocols/talkd.h> 4017680Spst#include <curses.h> 4117680Spst 4217680Spstextern int sockt; 4317680Spstextern int curses_initialized; 4417680Spstextern int invitation_waiting; 4517680Spst 4617680Spstextern const char *current_state; 4717680Spstextern int current_line; 4817680Spst 4917680Spsttypedef struct xwin { 5017680Spst WINDOW *x_win; 5117680Spst int x_nlines; 5217680Spst int x_ncols; 5317680Spst int x_line; 5417680Spst int x_col; 5517680Spst char kill; 5617680Spst char cerase; 5717680Spst char werase; 5817680Spst} xwin_t; 5917680Spst 6017680Spstextern xwin_t my_win; 61146778Ssamextern xwin_t his_win; 62146778Ssamextern WINDOW *line_win; 63146778Ssam 6417680Spstextern void announce_invite(void); 65127675Sbmsextern int check_local(void); 6617680Spstextern void check_writeable(void); 6717680Spstextern void ctl_transact(struct in_addr,CTL_MSG,int,CTL_RESPONSE *); 6817680Spstextern void disp_msg(int); 69146778Ssamextern void display(xwin_t *, char *, int); 7017680Spstextern void end_msgs(void); 7117680Spstextern void get_addrs(const char *, const char *); 7217680Spstextern int get_iface(struct in_addr *, struct in_addr *); 7317680Spstextern void get_names(int, char **); 7417680Spstextern void init_display(void); 7517680Spstextern void invite_remote(void); 7617680Spstextern int look_for_invite(CTL_RESPONSE *); 7717680Spstextern int max(int, int); 7817680Spstextern void message(const char *); 7917680Spstextern void open_ctl(void); 8017680Spstextern void open_sockt(void); 8117680Spstextern void p_error(const char *); 8217680Spstextern void print_addr(struct sockaddr_in); 8317680Spstextern void quit(void); 8417680Spstextern int readwin(WINDOW *, int, int); 8517680Spstextern void re_invite(int); 8617680Spstextern void send_delete(void); 8717680Spstextern void set_edit_chars(void); 88127675Sbmsextern void sig_sent(int); 8917680Spstextern void sig_winch(int); 9017680Spstextern void start_msgs(void); 9117680Spstextern void talk(void); 9217680Spstextern void resize_display(void); 9317680Spst