Download raw body.
fixes for net/ytalk with llvm 22
I've fixed all the prototypes issues, even the warnings. This does compile
cleanly with llvm v2, at least on amd64
Basic program appears to work, I've successfully opened a connection
with myself on several machines, and the menus are also functional.
(yes, it's a truckload of diffs)
I had a bit of "fun" with the generic function pointers of the menu system,
and also the BSD42_SOCK typedef, which is subtly different from our
sockaddr_in, but removing it led to connection errors, so I've decided to
leave it as-in for now.
Some of the comments about spending hours debugging the talk connection
protocols scared me away from digging further ;)
Index: Makefile
===================================================================
RCS file: /vide/cvs/ports/net/ytalk/Makefile,v
diff -u -p -r1.39 Makefile
--- Makefile 27 Sep 2023 14:18:41 -0000 1.39
+++ Makefile 2 Jun 2026 14:36:31 -0000
@@ -1,7 +1,7 @@
COMMENT= enhanced talk that allows for multiple parties
DISTNAME= ytalk-3.1.1
-REVISION= 4
+REVISION= 5
CATEGORIES= net
SITES= https://distfiles.sigtrap.nl/
@@ -9,6 +9,7 @@ SITES= https://distfiles.sigtrap.nl/
MAINTAINER= Marc Espie <espie@openbsd.org>
PERMIT_PACKAGE= Yes
+DEBUG_PACKAGES = ${BUILD_PACKAGES}
WANTLIB= c curses
Index: patches/patch-comm_c
===================================================================
RCS file: patches/patch-comm_c
diff -N patches/patch-comm_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-comm_c 2 Jun 2026 11:34:04 -0000
@@ -0,0 +1,234 @@
+Index: comm.c
+--- comm.c.orig
++++ comm.c
+@@ -58,10 +58,7 @@ static v3_winch v3w;
+ /* Set up a drain of out-of-band data.
+ */
+ static void
+-drain_user(user, len, func)
+- yuser *user;
+- int len;
+- void (*func)();
++drain_user(yuser *user, int len, void (*func)())
+ {
+ if(len > user->dbuf_size)
+ {
+@@ -76,10 +73,7 @@ drain_user(user, len, func)
+ /* Send out-of-band data.
+ */
+ static void
+-send_oob(fd, ptr, len)
+- int fd;
+- yaddr ptr;
+- int len;
++send_oob(int fd, yaddr ptr, int len)
+ {
+ ychar oob, size;
+ static struct iovec iov[3];
+@@ -114,8 +108,7 @@ send_oob(fd, ptr, len)
+ * just now connected to.
+ */
+ static void
+-send_import(to, from)
+- yuser *to, *from;
++send_import(yuser *to, yuser *from)
+ {
+ if(to->remote.vmajor > 2)
+ {
+@@ -138,8 +131,7 @@ send_import(to, from)
+ /* Tell another ytalk connection to connect to a user.
+ */
+ static void
+-send_accept(to, from)
+- yuser *to, *from;
++send_accept(yuser *to, yuser *from)
+ {
+ if(to->remote.vmajor > 2)
+ {
+@@ -162,9 +154,7 @@ send_accept(to, from)
+ /* Process a Ytalk version 2.? data packet.
+ */
+ static void
+-v2_process(user, pack)
+- yuser *user;
+- v2_pack *pack;
++v2_process(yuser *user, v2_pack *pack)
+ {
+ register yuser *u;
+ ylong host_addr;
+@@ -232,9 +222,7 @@ v2_process(user, pack)
+ /* Process a Ytalk version 3.? data packet.
+ */
+ static void
+-v3_process_pack(user, pack)
+- yuser *user;
+- v3_pack *pack;
++v3_process_pack(yuser *user, v3_pack *pack)
+ {
+ register yuser *u, *u2;
+ ylong host_addr, pid;
+@@ -306,9 +294,7 @@ v3_process_pack(user, pack)
+ * them later.
+ */
+ static void
+-v3_process_flags(user, pack)
+- yuser *user;
+- v3_flags *pack;
++v3_process_flags(yuser *user, v3_flags *pack)
+ {
+ switch(pack->code)
+ {
+@@ -324,9 +310,7 @@ v3_process_flags(user, pack)
+ /* Process a Ytalk version 3.? winch packet.
+ */
+ static void
+-v3_process_winch(user, pack)
+- yuser *user;
+- v3_winch *pack;
++v3_process_winch(yuser *user, v3_winch *pack)
+ {
+ switch(pack->code)
+ {
+@@ -355,9 +339,7 @@ v3_process_winch(user, pack)
+ * function based on the type of packet.
+ */
+ static void
+-v3_process(user, ptr)
+- yuser *user;
+- yaddr ptr;
++v3_process(yuser *user, yaddr ptr)
+ {
+ ychar *str;
+
+@@ -387,8 +369,7 @@ v3_process(user, ptr)
+ * data from the canonical input stream.
+ */
+ static void
+-read_user(fd)
+- int fd;
++read_user(int fd)
+ {
+ register ychar *c, *p;
+ register int rc;
+@@ -521,8 +502,7 @@ read_user(fd)
+ /* Initial Handshaking: read the parameter pack from another ytalk user.
+ */
+ static void
+-ytalk_user(fd)
+- int fd;
++ytalk_user(int fd)
+ {
+ register yuser *user, *u;
+ u_short cols;
+@@ -617,8 +597,7 @@ ytalk_user(fd)
+ * this is another ytalk user.
+ */
+ static void
+-connect_user(fd)
+- int fd;
++connect_user(int fd)
+ {
+ register yuser *user, *u;
+
+@@ -685,12 +664,11 @@ connect_user(fd)
+ * my edit keys.
+ */
+ static void
+-contact_user(fd)
+- int fd;
++contact_user(int fd)
+ {
+ register yuser *user;
+ register int n;
+- size_t socklen;
++ socklen_t socklen;
+ struct sockaddr_in peer;
+ char *hname;
+
+@@ -742,8 +720,7 @@ contact_user(fd)
+ /* Do a word wrap.
+ */
+ static int
+-word_wrap(user)
+- register yuser *user;
++word_wrap(yuser *user)
+ {
+ register int i, x, bound;
+ static ychar temp[20];
+@@ -767,8 +744,7 @@ word_wrap(user)
+ * to that instead of messing up his screen.
+ */
+ static int
+-announce(user)
+- yuser *user;
++announce(yuser *user)
+ {
+ register int rc, fd;
+
+@@ -818,9 +794,7 @@ announce(user)
+ /* Invite a user into the conversation.
+ */
+ yuser *
+-invite(name, send_announce)
+- register char *name;
+- int send_announce;
++invite(char *name, int send_announce)
+ {
+ register int rc;
+ char *hisname, *hishost, *histty;
+@@ -1012,8 +986,7 @@ house_clean()
+ }
+
+ void
+-send_winch(user)
+- yuser *user;
++send_winch(yuser *user)
+ {
+ register yuser *u;
+
+@@ -1067,10 +1040,7 @@ send_end_region()
+ * users if the given user is either "me" or NULL.
+ */
+ void
+-send_users(user, buf, len)
+- yuser *user;
+- ychar *buf;
+- register int len;
++send_users(yuser *user, ychar *buf, int len)
+ {
+ register ychar *o, *b;
+ register yuser *u;
+@@ -1112,10 +1082,7 @@ send_users(user, buf, len)
+ /* Display user input. Emulate ANSI.
+ */
+ void
+-show_input(user, buf, len)
+- yuser *user;
+- register ychar *buf;
+- register int len;
++show_input(yuser *user, ychar *buf, int len)
+ {
+ if(user->got_esc)
+ {
+@@ -1341,10 +1308,7 @@ process_esc:
+ /* Process keyboard input.
+ */
+ void
+-my_input(user, buf, len)
+- yuser *user;
+- register ychar *buf;
+- int len;
++my_input(yuser *user, ychar *buf, int len)
+ {
+ register ychar *c;
+ register int i;
+@@ -1441,8 +1405,7 @@ my_input(user, buf, len)
+ }
+
+ void
+-lock_flags(flags)
+- ylong flags;
++lock_flags(ylong flags)
+ {
+ register yuser *u;
+
Index: patches/patch-cwin_c
===================================================================
RCS file: patches/patch-cwin_c
diff -N patches/patch-cwin_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cwin_c 2 Jun 2026 09:29:15 -0000
@@ -0,0 +1,147 @@
+Index: cwin.c
+--- cwin.c.orig
++++ cwin.c
+@@ -43,8 +43,7 @@ static ywin *head; /* head of linked list */
+ /* Take input from the user.
+ */
+ static void
+-curses_input(fd)
+- int fd;
++curses_input(int fd)
+ {
+ register int rc;
+ static ychar buf[MAXBUF];
+@@ -59,9 +58,7 @@ curses_input(fd)
+ }
+
+ static ywin *
+-new_ywin(user, title)
+- yuser *user;
+- char *title;
++new_ywin(yuser *user, char *title)
+ {
+ register ywin *out;
+ register int len;
+@@ -76,9 +73,7 @@ new_ywin(user, title)
+ }
+
+ static void
+-make_win(w, height, width, row, col)
+- ywin *w;
+- int height, width, row, col;
++make_win(ywin *w, int height, int width, int row, int col)
+ {
+ if((w->win = newwin(height, width, row, col)) == NULL)
+ {
+@@ -97,8 +92,7 @@ make_win(w, height, width, row, col)
+ }
+
+ static void
+-draw_title(w)
+- ywin *w;
++draw_title(ywin *w)
+ {
+ register int pad, x;
+ register char *t;
+@@ -129,8 +123,7 @@ draw_title(w)
+ /* Return number of lines per window, given "wins" windows.
+ */
+ static int
+-win_size(wins)
+- int wins;
++win_size(int wins)
+ {
+ return (LINES - 1) / wins;
+ }
+@@ -138,7 +131,7 @@ win_size(wins)
+ /* Break down and redraw all user windows.
+ */
+ static void
+-curses_redraw()
++curses_redraw(void)
+ {
+ register ywin *w;
+ register int row, wins, wsize;
+@@ -261,9 +254,7 @@ end_curses()
+ /* Open a new window.
+ */
+ int
+-open_curses(user, title)
+- yuser *user;
+- char *title;
++open_curses(yuser *user, char *title)
+ {
+ register ywin *w;
+ register int wins;
+@@ -300,8 +291,7 @@ open_curses(user, title)
+ /* Close a window.
+ */
+ void
+-close_curses(user)
+- yuser *user;
++close_curses(yuser *user)
+ {
+ register ywin *w, *p;
+
+@@ -330,9 +320,7 @@ close_curses(user)
+ }
+
+ void
+-addch_curses(user, c)
+- yuser *user;
+- register ychar c;
++addch_curses(yuser *user, ychar c)
+ {
+ register ywin *w;
+ register int x, y;
+@@ -345,9 +333,7 @@ addch_curses(user, c)
+ }
+
+ void
+-move_curses(user, y, x)
+- yuser *user;
+- register int y, x;
++move_curses(yuser *user, int y, int x)
+ {
+ register ywin *w;
+
+@@ -356,8 +342,7 @@ move_curses(user, y, x)
+ }
+
+ void
+-clreol_curses(user)
+- register yuser *user;
++clreol_curses(yuser *user)
+ {
+ register ywin *w;
+
+@@ -366,8 +351,7 @@ clreol_curses(user)
+ }
+
+ void
+-clreos_curses(user)
+- register yuser *user;
++clreos_curses(yuser *user)
+ {
+ register ywin *w;
+
+@@ -376,8 +360,7 @@ clreos_curses(user)
+ }
+
+ void
+-scroll_curses(user)
+- register yuser *user;
++scroll_curses(yuser *user)
+ {
+ register ywin *w;
+
+@@ -400,8 +383,7 @@ scroll_curses(user)
+ }
+
+ void
+-flush_curses(user)
+- register yuser *user;
++flush_curses(yuser *user)
+ {
+ register ywin *w;
+
Index: patches/patch-cwin_h
===================================================================
RCS file: patches/patch-cwin_h
diff -N patches/patch-cwin_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cwin_h 2 Jun 2026 09:28:33 -0000
@@ -0,0 +1,36 @@
+Index: cwin.h
+--- cwin.h.orig
++++ cwin.h
+@@ -16,19 +16,19 @@
+
+ /* Mail comments or questions to ytalk@austin.eds.com */
+
+-extern void init_curses ();
+-extern void end_curses ();
+-extern int open_curses ( /* yuser, title */ );
+-extern void close_curses ( /* yuser */ );
+-extern void addch_curses ( /* yuser, char */ );
+-extern void move_curses ( /* yuser, y, x */ );
+-extern void clreol_curses ( /* yuser */ );
+-extern void clreos_curses ( /* yuser */ );
+-extern void scroll_curses ( /* yuser */ );
+-extern void flush_curses ( /* yuser */ );
+-extern void redisplay_curses();
+-extern void set_raw_curses();
+-extern void set_cooked_curses();
++extern void init_curses (void);
++extern void end_curses (void);
++extern int open_curses (yuser *, char *);
++extern void close_curses (yuser *);
++extern void addch_curses (yuser *, ychar);
++extern void move_curses (yuser *, int, int);
++extern void clreol_curses (yuser *);
++extern void clreos_curses (yuser *);
++extern void scroll_curses (yuser *);
++extern void flush_curses (yuser *);
++extern void redisplay_curses(void);
++extern void set_raw_curses(void);
++extern void set_cooked_curses(void);
+
+ #ifndef getyx
+ # define getyx(w,y,x) y = w->_cury, x = w->_curx
Index: patches/patch-exec_c
===================================================================
RCS file: /vide/cvs/ports/net/ytalk/patches/patch-exec_c,v
diff -u -p -r1.2 patch-exec_c
--- patches/patch-exec_c 11 Mar 2022 19:48:19 -0000 1.2
+++ patches/patch-exec_c 2 Jun 2026 12:05:23 -0000
@@ -1,6 +1,29 @@
---- exec.c.orig Fri Dec 7 22:54:16 2012
-+++ exec.c Fri Dec 7 22:57:00 2012
-@@ -100,7 +100,11 @@ getpty(name)
+Index: exec.c
+--- exec.c.orig
++++ exec.c
+@@ -47,6 +47,7 @@
+ # endif
+ # endif
+ #endif
++#include <unistd.h>
+
+ #if defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT)
+ # define USE_DEV_PTMX
+@@ -85,12 +86,10 @@ int needtopush=0;
+ #endif
+
+ static int
+-getpty(name)
+- char *name;
++getpty(char *name)
+ {
+ register int pty, tty;
+ char *tt;
+- extern char *ttyname();
+
+ #ifdef USE_DEV_PTMX
+ RETSIGTYPE (*sigchld)();
+@@ -100,7 +99,11 @@ getpty(name)
/* look for a Solaris/UNIX98-type pseudo-device */
#ifdef USE_DEV_PTMX
@@ -12,3 +35,33 @@
{
/* grantpt() might want to fork/exec! */
sigchld = signal(SIGCHLD, SIG_DFL);
+@@ -167,8 +170,7 @@ getpty(name)
+ }
+
+ static void
+-exec_input(fd)
+- int fd;
++exec_input(int fd)
+ {
+ register int rc;
+ static ychar buf[MAXBUF];
+@@ -185,8 +187,7 @@ exec_input(fd)
+ }
+
+ static void
+-calculate_size(rows, cols)
+- int *rows, *cols;
++calculate_size(int *rows, int *cols)
+ {
+ register yuser *u;
+
+@@ -209,8 +210,7 @@ calculate_size(rows, cols)
+ * a shell.
+ */
+ void
+-execute(command)
+- char *command;
++execute(char *command)
+ {
+ int fd;
+ char name[20], *shell;
Index: patches/patch-fd_c
===================================================================
RCS file: patches/patch-fd_c
diff -N patches/patch-fd_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-fd_c 2 Jun 2026 11:49:38 -0000
@@ -0,0 +1,45 @@
+Index: fd.c
+--- fd.c.orig
++++ fd.c
+@@ -44,7 +44,7 @@ int input_flag = 0; /* flag: waiting for user input *
+ int user_winch = 0; /* flag: user window/status changed */
+
+ struct fd_func {
+- void (*func)(); /* user function */
++ void (*func)(int); /* user function */
+ };
+ static struct fd_func tag[MAX_FILES]; /* one function per file descriptor */
+
+@@ -61,9 +61,7 @@ init_fd()
+ * waiting.
+ */
+ void
+-add_fd(fd, user_func)
+- int fd;
+- void (*user_func)();
++add_fd(int fd, void (*user_func)(int))
+ {
+ if(fd < 0 || fd >= MAX_FILES)
+ {
+@@ -79,8 +77,7 @@ add_fd(fd, user_func)
+ /* Remove a file descriptor from the checklist.
+ */
+ void
+-remove_fd(fd)
+- int fd;
++remove_fd(int fd)
+ {
+ if(fd < 0 || fd >= MAX_FILES)
+ {
+@@ -96,10 +93,7 @@ remove_fd(fd)
+ * Returns 0 on success, -1 on error.
+ */
+ int
+-full_read(fd, buf, len)
+- int fd;
+- register char *buf;
+- register int len;
++full_read(int fd, void *buf, int len)
+ {
+ register int rc;
+
Index: patches/patch-header_h
===================================================================
RCS file: patches/patch-header_h
diff -N patches/patch-header_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-header_h 2 Jun 2026 15:48:00 -0000
@@ -0,0 +1,181 @@
+Index: header.h
+--- header.h.orig
++++ header.h
+@@ -127,7 +127,8 @@ typedef struct _yuser {
+ int dbuf_size; /* current buffer size */
+ ychar *dbuf, *dptr; /* buffer base and current pointer */
+ int drain; /* remaining bytes to drain */
+- void (*dfunc)(); /* function to call with drained data */
++ void (*dfunc)(struct _yuser *, ychar *);
++ /* function to call with drained data */
+ int got_oob; /* got OOB flag */
+
+ /* anything below this is available for the terminal interface */
+@@ -280,89 +281,90 @@ struct alias {
+
+ /* ---- global functions ---- */
+
+-extern void bail ( /* int */ ); /* main.c */
+-extern yaddr get_mem ( /* int */ ); /* main.c */
+-extern char *str_copy ( /* string */ ); /* main.c */
+-extern yaddr realloc_mem ( /* pointer, int */ ); /* main.c */
+-extern void show_error ( /* str */ ); /* main.c */
++extern void bail (int); /* main.c */
++extern yaddr get_mem (int); /* main.c */
++extern char *str_copy (const char *); /* main.c */
++extern yaddr realloc_mem (void *, int ); /* main.c */
++extern void show_error (const char *); /* main.c */
+
+-extern void init_term (); /* term.c */
+-extern void set_terminal_size ( /* fd, rows, cols */ ); /* term.c */
+-extern void set_terminal_flags ( /* fd */ ); /* term.c */
+-extern int what_term (); /* term.c */
+-extern void end_term (); /* term.c */
+-extern int open_term ( /* yuser, title */ ); /* term.c */
+-extern void close_term ( /* yuser */ ); /* term.c */
+-extern void addch_term ( /* yuser, ch */ ); /* term.c */
+-extern void move_term ( /* yuser, y, x */ ); /* term.c */
+-extern void clreol_term ( /* yuser */ ); /* term.c */
+-extern void clreos_term ( /* yuser */ ); /* term.c */
+-extern void scroll_term ( /* yuser */ ); /* term.c */
+-extern void rev_scroll_term ( /* yuser */ ); /* term.c */
+-extern void flush_term ( /* yuser */ ); /* term.c */
+-extern void rub_term ( /* yuser */ ); /* term.c */
+-extern int word_term ( /* yuser */ ); /* term.c */
+-extern void kill_term ( /* yuser */ ); /* term.c */
+-extern void tab_term ( /* yuser */ ); /* term.c */
+-extern void newline_term ( /* yuser */ ); /* term.c */
+-extern void add_line_term ( /* yuser, num */ ); /* term.c */
+-extern void del_line_term ( /* yuser, num */ ); /* term.c */
+-extern void add_char_term ( /* yuser, num */ ); /* term.c */
+-extern void del_char_term ( /* yuser, num */ ); /* term.c */
+-extern void redraw_term ( /* yuser, start_row */ ); /* term.c */
+-extern void resize_win ( /* yuser, h, w */ ); /* term.c */
+-extern void set_win_region ( /* yuser, h, w */ ); /* term.c */
+-extern void end_win_region ( /* yuser */ ); /* term.c */
+-extern void set_scroll_region( /* yuser, top, bottom */ ); /* term.c */
+-extern void msg_term ( /* yuser, str */ ); /* term.c */
+-extern void spew_term ( /* yuser, fd, rows, cols */ ); /* term.c */
+-extern int center ( /* width, n */ ); /* term.c */
+-extern void redraw_all_terms(); /* term.c */
+-extern void set_raw_term (); /* term.c */
+-extern void set_cooked_term (); /* term.c */
+-extern int term_does_asides(); /* term.c */
++extern void init_term (void); /* term.c */
++extern void set_terminal_size (int, int, int); /* term.c */
++extern void set_terminal_flags (int); /* term.c */
++extern int what_term (void); /* term.c */
++extern void end_term (void); /* term.c */
++extern int open_term (yuser *, char *); /* term.c */
++extern void close_term (yuser *); /* term.c */
++extern void addch_term (yuser *, ychar); /* term.c */
++extern void move_term (yuser *, int, int); /* term.c */
++extern void clreol_term (yuser *); /* term.c */
++extern void clreos_term (yuser *); /* term.c */
++extern void scroll_term (yuser *); /* term.c */
++extern void rev_scroll_term (yuser *); /* term.c */
++extern void flush_term (yuser *); /* term.c */
++extern void rub_term (yuser *); /* term.c */
++extern int word_term (yuser *); /* term.c */
++extern void kill_term (yuser *); /* term.c */
++extern void tab_term (yuser *); /* term.c */
++extern void newline_term (yuser *); /* term.c */
++extern void add_line_term (yuser *, int); /* term.c */
++extern void del_line_term (yuser *, int); /* term.c */
++extern void add_char_term (yuser *, int); /* term.c */
++extern void del_char_term (yuser *, int); /* term.c */
++extern void redraw_term (yuser *, int); /* term.c */
++extern void resize_win (yuser *, int, int); /* term.c */
++extern void set_win_region (yuser *, int, int); /* term.c */
++extern void end_win_region (yuser *); /* term.c */
++extern void set_scroll_region(yuser *, int, int); /* term.c */
++extern void msg_term (yuser *, char *); /* term.c */
++extern void spew_term (yuser *, int, int, int); /* term.c */
++extern int center (int, int); /* term.c */
++extern void raw_term (yuser *, int, int, ychar *, int); /* term.c */
++extern void redraw_all_terms(void); /* term.c */
++extern void set_raw_term (void); /* term.c */
++extern void set_cooked_term (void); /* term.c */
++extern int term_does_asides(void); /* term.c */
+
+-extern void init_user (); /* user.c */
+-extern yuser *new_user ( /* name, host, tty */ ); /* user.c */
+-extern void free_user ( /* yuser */ ); /* user.c */
+-extern yuser *find_user ( /* name, host_addr, pid */ ); /* user.c */
+-extern void generate_full_name ( /* yuser */ ); /* user.c */
++extern void init_user (char *); /* user.c */
++extern yuser *new_user (char *, char *, char *); /* user.c */
++extern void free_user (yuser *); /* user.c */
++extern yuser *find_user (char *, ylong, ylong); /* user.c */
++extern void generate_full_name (yuser *); /* user.c */
+
+-extern void init_fd (); /* fd.c */
+-extern void add_fd ( /* fd, func */ ); /* fd.c */
+-extern void remove_fd ( /* fd */ ); /* fd.c */
+-extern int full_read ( /* fd, buf, len */ ); /* fd.c */
+-extern void main_loop (); /* fd.c */
+-extern void input_loop (); /* fd.c */
++extern void init_fd (void); /* fd.c */
++extern void add_fd (int , void (*)()); /* fd.c */
++extern void remove_fd (int); /* fd.c */
++extern int full_read (int, void *, int); /* fd.c */
++extern void main_loop (void); /* fd.c */
++extern void input_loop (void); /* fd.c */
+
+-extern yuser *invite ( /* username, announce */ ); /* comm.c */
+-extern void house_clean (); /* comm.c */
+-extern void send_winch ( /* yuser */ ); /* comm.c */
+-extern void send_region (); /* comm.c */
+-extern void send_end_region (); /* comm.c */
+-extern void send_users ( /* buf, len */ ); /* comm.c */
+-extern void show_input ( /* user, buf, len */ ); /* comm.c */
+-extern void my_input ( /* buf, len */ ); /* comm.c */
+-extern void lock_flags ( /* flags */ ); /* comm.c */
+-extern void unlock_flags (); /* comm.c */
++extern yuser *invite (char *, int); /* comm.c */
++extern void house_clean (void); /* comm.c */
++extern void send_winch (yuser *); /* comm.c */
++extern void send_region (void); /* comm.c */
++extern void send_end_region (void); /* comm.c */
++extern void send_users (yuser *, ychar *, int);/* comm.c */
++extern void show_input (yuser *, ychar *, int);/* comm.c */
++extern void my_input (yuser *, ychar *, int ); /* comm.c */
++extern void lock_flags (ylong); /* comm.c */
++extern void unlock_flags (void); /* comm.c */
+
+-extern void init_socket (); /* socket.c */
+-extern void close_all (); /* socket.c */
+-extern int send_dgram ( /* user, type */ ); /* socket.c */
+-extern int send_auto ( /* type */ ); /* socket.c */
+-extern void kill_auto (); /* socket.c */
+-extern int newsock ( /* yuser */ ); /* socket.c */
+-extern int connect_to ( /* yuser */ ); /* socket.c */
+-extern ylong get_host_addr ( /* hostname */ ); /* socket.c */
+-extern char *host_name ( /* addr */ ); /* socket.c */
+-extern void readdress_host ( /* from, to, on */ ); /* socket.c */
++extern void init_socket (void); /* socket.c */
++extern void close_all (void); /* socket.c */
++extern int send_dgram (yuser *, u_char); /* socket.c */
++extern int send_auto (u_char); /* socket.c */
++extern void kill_auto (void); /* socket.c */
++extern int newsock (yuser *); /* socket.c */
++extern int connect_to (yuser *); /* socket.c */
++extern ylong get_host_addr (char *); /* socket.c */
++extern char *host_name (ylong); /* socket.c */
++extern void readdress_host (char *, char *, char *); /* socket.c */
+
+-extern void read_ytalkrc (); /* rc.c */
+-extern char *resolve_alias ( /* uh */ ); /* rc.c */
++extern void read_ytalkrc (void); /* rc.c */
++extern char *resolve_alias (char *); /* rc.c */
+
+-extern void execute ( /* command */ ); /* exec.c */
+-extern void update_exec (); /* exec.c */
+-extern void kill_exec (); /* exec.c */
+-extern void winch_exec (); /* exec.c */
++extern void execute (char *); /* exec.c */
++extern void update_exec (void); /* exec.c */
++extern void kill_exec (void); /* exec.c */
++extern void winch_exec (void); /* exec.c */
+
+ /* EOF */
Index: patches/patch-main_c
===================================================================
RCS file: patches/patch-main_c
diff -N patches/patch-main_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-main_c 2 Jun 2026 09:28:33 -0000
@@ -0,0 +1,75 @@
+Index: main.c
+--- main.c.orig
++++ main.c
+@@ -26,8 +26,7 @@ char *vhost = NULL; /* specified virtual host */
+ /* Clean up and exit.
+ */
+ void
+-bail(n)
+- int n;
++bail(int n)
+ {
+ end_term();
+ kill_auto();
+@@ -41,8 +40,7 @@ bail(n)
+ /* Display an error.
+ */
+ void
+-show_error(str)
+- register char *str;
++show_error(const char *str)
+ {
+ register char *syserr;
+ static int in_error = 0;
+@@ -75,8 +73,7 @@ show_error(str)
+ /* Allocate memory.
+ */
+ yaddr
+-get_mem(n)
+- int n;
++get_mem(int n)
+ {
+ register yaddr out;
+ if((out = (yaddr)malloc(n)) == NULL)
+@@ -90,8 +87,7 @@ get_mem(n)
+ /* Copy a string.
+ */
+ char *
+-str_copy(str)
+- register char *str;
++str_copy(const char *str)
+ {
+ register char *out;
+ register int len;
+@@ -107,9 +103,7 @@ str_copy(str)
+ /* Reallocate memory.
+ */
+ yaddr
+-realloc_mem(p, n)
+- char *p;
+- int n;
++realloc_mem(void *p, int n)
+ {
+ register yaddr out;
+ if(p == NULL)
+@@ -125,8 +119,7 @@ realloc_mem(p, n)
+ /* Process signals.
+ */
+ static RETSIGTYPE
+-got_sig(n)
+- int n;
++got_sig(int n)
+ {
+ if(n == SIGINT)
+ bail(0);
+@@ -135,9 +128,7 @@ got_sig(n)
+
+ /* MAIN */
+ int
+-main(argc, argv)
+- int argc;
+- char **argv;
++main(int argc, char **argv)
+ {
+ int xflg = 0, sflg = 0, yflg = 0, iflg = 0;
+ char *prog;
Index: patches/patch-menu_c
===================================================================
RCS file: patches/patch-menu_c
diff -N patches/patch-menu_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-menu_c 2 Jun 2026 14:34:24 -0000
@@ -0,0 +1,242 @@
+Index: menu.c
+--- menu.c.orig
++++ menu.c
+@@ -24,7 +24,7 @@
+
+ #include "menu.h"
+
+-int show_user_list();
++int show_user_list(void);
+
+ /* This particular file was written real early one night (morning?)
+ * while trying to stay awake long enough to do laundry. I hereby take
+@@ -32,7 +32,7 @@ int show_user_list();
+ * for this source.
+ */
+
+-static void main_menu_sel();
++static void main_menu_sel(void *);
+ menu_item *menu_ptr = NULL; /* current menu in processing */
+ static int menu_len; /* number of items in current menu */
+ static int menu_long; /* longest item of current menu */
+@@ -40,7 +40,11 @@ static int menu_line; /* current line number of menu
+ static int text_pos = -1; /* text offset if non-negative */
+ static int text_ypos = -1, text_xpos = -1; /* text coord if non-negative */
+
+-extern void raw_term(); /* our raw interface to the terminal */
++static void
++show_error2(void *a)
++{
++ show_error(a);
++}
+
+ /* some menus... */
+
+@@ -75,17 +79,17 @@ static char err_str[8][MAXERR];
+ static menu_item error_menu[] = {
+ { "Ytalk Error", NULL, ' ' },
+ { "", NULL, ' ' },
+- { NULL, show_error, ' ' },
+- { NULL, show_error, ' ' },
++ { NULL, show_error2, ' ' },
++ { NULL, show_error2, ' ' },
+ { "", NULL, ' ' },
+- { NULL, show_error, ' ' },
+- { NULL, show_error, ' ' },
++ { NULL, show_error2, ' ' },
++ { NULL, show_error2, ' ' },
+ { "", NULL, ' ' },
+- { NULL, show_error, ' ' },
+- { NULL, show_error, ' ' },
++ { NULL, show_error2, ' ' },
++ { NULL, show_error2, ' ' },
+ { "", NULL, ' ' },
+- { NULL, show_error, ' ' },
+- { NULL, show_error, ' ' },
++ { NULL, show_error2, ' ' },
++ { NULL, show_error2, ' ' },
+ { "", NULL, '\0'} /* MUST BE LAST */
+ };
+
+@@ -94,8 +98,7 @@ static menu_item error_menu[] = {
+ static yuser *output_user = NULL;
+
+ static void
+-do_output(filename)
+- char *filename;
++do_output(char *filename)
+ {
+ int fd;
+
+@@ -112,8 +115,7 @@ do_output(filename)
+ }
+
+ static void
+-do_output_user(user)
+- yuser *user;
++do_output_user(yuser *user)
+ {
+ /* if he has an open descriptor, close it */
+
+@@ -136,8 +138,7 @@ do_output_user(user)
+ }
+
+ static void
+-do_invite(name)
+- char *name;
++do_invite(char *name)
+ {
+ invite(name, 1);
+ }
+@@ -149,10 +150,11 @@ kill_all_unconnected()
+ }
+
+ static void
+-main_menu_sel(key)
+- ychar key;
++main_menu_sel(void *p)
+ {
+- switch(key)
++ ychar *key = p;
++
++ switch(*key)
+ {
+ case 'a': /* add a user */
+ if(show_text("Add Which User?", do_invite) >= 0)
+@@ -188,14 +190,14 @@ main_menu_sel(key)
+ }
+
+ static void
+-option_menu_sel(key)
+- ychar key;
++option_menu_sel(void *p)
+ {
++ ychar *key = p;
+ register yuser *u;
+ ylong old_flags;
+
+ old_flags = def_flags;
+- switch(key)
++ switch(*key)
+ {
+ case 'a': /* toggle asides */
+ def_flags ^= FL_ASIDE;
+@@ -234,9 +236,9 @@ option_menu_sel(key)
+ }
+
+ static void
+-user_menu_sel(key)
+- ychar key;
++user_menu_sel(void *p)
+ {
++ ychar *key = p;
+ register int i;
+ register yuser *u;
+
+@@ -245,10 +247,10 @@ user_menu_sel(key)
+ * of the users from it.
+ */
+ for(i = 0; i < menu_len; i++)
+- if(user_menu[i].key == key)
++ if(user_menu[i].key == *key)
+ {
+ for(u = user_list; u; u = u->unext)
+- if(u->key == key &&
++ if(u->key == *key &&
+ strcmp(u->full_name, user_menu[i].item) == 0)
+ {
+ user_menu[0].func(u);
+@@ -277,9 +279,7 @@ generate_yes_no_length()
+ }
+
+ static void
+-pad_str(from, len, to)
+- char *from, *to;
+- int len;
++pad_str(char *from, int len, char *to)
+ {
+ for(; len > 0 && *from; len--, from++)
+ *(to++) = *from;
+@@ -410,7 +410,7 @@ update_menu()
+ io_len--;
+ kill_menu();
+ if(mesg_menu[0].func)
+- mesg_menu[0].func(ic);
++ mesg_menu[0].func(&ic);
+ return;
+ }
+ else
+@@ -436,7 +436,7 @@ update_menu()
+ for(i = 0; i < menu_len; i++)
+ if(menu_ptr[i].key == ic && menu_ptr[i].func != NULL)
+ {
+- menu_ptr[i].func(ic);
++ menu_ptr[i].func(&ic);
+ /*
+ * THE WHOLE WORLD COULD BE DIFFERENT NOW.
+ */
+@@ -576,9 +576,7 @@ update_menu()
+ /* Show a menu, overriding any existing menu.
+ */
+ int
+-show_menu(menu, len)
+- menu_item *menu;
+- int len;
++show_menu(menu_item *menu, int len)
+ {
+ register int i, j;
+
+@@ -621,9 +619,7 @@ show_menu(menu, len)
+ /* Show a text entry menu, overriding any existing menu.
+ */
+ int
+-show_text(prompt, func)
+- char *prompt;
+- void (*func)();
++show_text(char *prompt, menu_funcp func)
+ {
+ if(me->t_rows < 3)
+ {
+@@ -656,9 +652,7 @@ show_text(prompt, func)
+ /* Show a message in a menu.
+ */
+ int
+-show_mesg(mesg, func)
+- char *mesg;
+- void (*func)();
++show_mesg(char *mesg, void (*func)())
+ {
+ /* set up the menu for display */
+
+@@ -760,10 +754,7 @@ show_option_menu()
+ }
+
+ int
+-show_user_menu(title, func, metoo)
+- char *title;
+- void (*func)();
+- int metoo;
++show_user_menu(char *title, menu_funcp func, int metoo)
+ {
+ register int i;
+ register yuser *u;
+@@ -861,8 +852,7 @@ show_user_list()
+ }
+
+ int
+-show_error_menu(str1, str2)
+- char *str1, *str2;
++show_error_menu(const char *str1, char *str2)
+ {
+ register int i;
+
+@@ -886,8 +876,7 @@ show_error_menu(str1, str2)
+ * necessary for this function to hang until an answer is received.
+ */
+ int
+-yes_no(prompt)
+- char *prompt;
++yes_no(char *prompt)
+ {
+ int out = 0;
+
Index: patches/patch-menu_h
===================================================================
RCS file: patches/patch-menu_h
diff -N patches/patch-menu_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-menu_h 2 Jun 2026 15:48:00 -0000
@@ -0,0 +1,44 @@
+Index: menu.h
+--- menu.h.orig
++++ menu.h
+@@ -21,9 +21,11 @@
+ * is pressed, the _func_ for that item is called with one argument:
+ * the _key_ pressed.
+ */
++typedef void (*menu_funcp)(void *);
++
+ typedef struct {
+ char *item; /* item string, ie: "add a user" */
+- void (*func)(); /* function to call */
++ menu_funcp func; /* function to call */
+ ychar key; /* activating keypress, ie: "a" */
+ } menu_item;
+
+@@ -31,16 +33,16 @@ extern menu_item *menu_ptr; /* if non-NULL, current me
+
+ /* global functions */
+
+-extern void kill_menu (); /* menu.c */
+-extern void update_menu (); /* menu.c */
+-extern int show_menu ( /* menuptr, len */ ); /* menu.c */
+-extern int show_text ( /* prompt, func */ ); /* menu.c */
+-extern int show_mesg (); /* menu.c */
+-extern int show_main_menu (); /* menu.c */
+-extern int show_option_menu(); /* menu.c */
+-extern int show_user_menu ( /* title, func */ ); /* menu.c */
+-extern int show_error_menu ( /* str1, str2 */ ); /* menu.c */
+-extern int yes_no ( /* prompt */ ); /* menu.c */
+-extern void update_user_menu(); /* menu.c */
++extern void kill_menu (void); /* menu.c */
++extern void update_menu (void); /* menu.c */
++extern int show_menu (menu_item *, int); /* menu.c */
++extern int show_text (char *, void (*)()); /* menu.c */
++extern int show_mesg (char *, void (*)()); /* menu.c */
++extern int show_main_menu (void); /* menu.c */
++extern int show_option_menu(void); /* menu.c */
++extern int show_user_menu (char *, void (*)(), int); /* menu.c */
++extern int show_error_menu (const char *, char *); /* menu.c */
++extern int yes_no (char *); /* menu.c */
++extern void update_user_menu(void); /* menu.c */
+
+ /* EOF */
Index: patches/patch-rc_c
===================================================================
RCS file: patches/patch-rc_c
diff -N patches/patch-rc_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-rc_c 2 Jun 2026 11:34:04 -0000
@@ -0,0 +1,43 @@
+Index: rc.c
+--- rc.c.orig
++++ rc.c
+@@ -27,8 +27,7 @@ static struct alias *alias0 = NULL;
+ /* ---- local functions ---- */
+
+ static char *
+-get_word(p)
+- char **p;
++get_word(char **p)
+ {
+ register char *c, *out;
+
+@@ -47,8 +46,7 @@ get_word(p)
+ }
+
+ static int
+-set_option(opt, value)
+- char *opt, *value;
++set_option(char *opt, char *value)
+ {
+ ylong mask = 0;
+ int set_it;
+@@ -136,8 +134,7 @@ set_option(opt, value)
+ }
+
+ static void
+-read_rcfile(fname)
+- char *fname;
++read_rcfile(char *fname)
+ {
+ FILE *fp;
+ char *buf, *ptr;
+@@ -260,8 +257,7 @@ read_rcfile(fname)
+ /* ---- global functions ---- */
+
+ char *
+-resolve_alias(uh)
+- char *uh;
++resolve_alias(char *uh)
+ {
+ struct alias *a;
+ static char uh1[256], *at;
Index: patches/patch-socket_c
===================================================================
RCS file: patches/patch-socket_c
diff -N patches/patch-socket_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-socket_c 2 Jun 2026 15:42:19 -0000
@@ -0,0 +1,222 @@
+Index: socket.c
+--- socket.c.orig
++++ socket.c
+@@ -34,6 +34,7 @@
+ #ifdef _AIX
+ # include <sys/select.h>
+ #endif
++#include <arpa/inet.h>
+
+ struct _talkd talkd[MAXDAEMON+1];
+ int daemons = 0;
+@@ -59,11 +60,10 @@ static readdr *readdr_list = NULL; /* list of re-addre
+ /* Create a datagram socket.
+ */
+ static int
+-init_dgram(sock)
+- struct sockaddr_in *sock;
++init_dgram(struct sockaddr_in *sock)
+ {
+ int fd;
+- size_t socklen;
++ socklen_t socklen;
+
+ sock->sin_family = AF_INET;
+ IN_ADDR(*sock) = INADDR_ANY;
+@@ -93,11 +93,7 @@ init_dgram(sock)
+ /* Initialize a new daemon structure.
+ */
+ static int
+-init_daemon(name, port, mptr, mlen, rptr, rlen)
+- char *name;
+- short port;
+- yaddr mptr, rptr;
+- int mlen, rlen;
++init_daemon(char *name, short port, yaddr mptr, int mlen, yaddr rptr, int rlen)
+ {
+ struct servent *serv;
+ int d;
+@@ -123,10 +119,9 @@ init_daemon(name, port, mptr, mlen, rptr, rlen)
+ }
+
+ static void
+-read_autoport(fd)
+- int fd;
++read_autoport(int fd)
+ {
+- size_t socklen;
++ socklen_t socklen;
+ static v2_pack pack;
+ static char estr[V2_NAMELEN + V2_HOSTLEN + 20];
+ static struct sockaddr_in temp;
+@@ -166,7 +161,7 @@ read_autoport(fd)
+ static void
+ init_autoport()
+ {
+- size_t socklen;
++ socklen_t socklen;
+
+ autosock.sin_family = AF_INET;
+ IN_ADDR(autosock) = INADDR_ANY;
+@@ -208,9 +203,7 @@ init_autoport()
+ * the host I'm sending to.
+ */
+ static void
+-place_my_address(sock, addr)
+- BSD42_SOCK *sock;
+- register ylong addr;
++place_my_address(BSD42_SOCK *sock, ylong addr)
+ {
+ register readdr *r;
+
+@@ -233,9 +226,8 @@ place_my_address(sock, addr)
+ * hostname, then reads a response packet.
+ */
+ static int
+-sendit(addr, d)
+- ylong addr; /* host internet address */
+- int d; /* daemon number */
++sendit(ylong addr, /* host internet address */
++ int d) /* daemon number */
+ {
+ int n;
+ struct sockaddr_in daemon;
+@@ -392,8 +384,7 @@ sendit(addr, d)
+ * what version(s) of the daemon are running.
+ */
+ static int
+-find_daemon(addr)
+- ylong addr;
++find_daemon(ylong addr)
+ {
+ register hostinfo *h;
+ register int n, i, d;
+@@ -504,8 +495,7 @@ find_daemon(addr)
+ }
+
+ static ylong
+-make_net_mask(addr)
+- ylong addr;
++make_net_mask(ylong addr)
+ {
+ if(addr & (ylong)0xff)
+ return (ylong)0xffffffff;
+@@ -576,9 +566,7 @@ close_all()
+ /* First, a quick and easy interface for the user sockets.
+ */
+ int
+-send_dgram(user, type)
+- yuser *user;
+- u_char type;
++send_dgram(yuser *user, u_char type)
+ {
+ ylong addr;
+ int d;
+@@ -723,8 +711,7 @@ send_dgram(user, type)
+ * always sends to the caller's host, and always does just an invite.
+ */
+ int
+-send_auto(type)
+- u_char type;
++send_auto(u_char type)
+ {
+ int dtype, d, rc;
+
+@@ -773,11 +760,10 @@ kill_auto()
+ /* Create a TCP socket for communication with other talk users.
+ */
+ int
+-newsock(user)
+- yuser *user;
++newsock(yuser *user)
+ {
+ int fd;
+- size_t socklen;
++ socklen_t socklen;
+
+ user->sock.sin_family = AF_INET;
+ IN_ADDR(user->sock) = INADDR_ANY;
+@@ -800,7 +786,7 @@ newsock(user)
+ show_error("newsock: getsockname() failed");
+ return -1;
+ }
+- place_my_address(&(user->sock), user->host_addr);
++ place_my_address((BSD42_SOCK *)&(user->sock), user->host_addr);
+ if(listen(fd, 5) < 0)
+ {
+ close(fd);
+@@ -816,12 +802,11 @@ newsock(user)
+ /* Connect to another user's communication socket.
+ */
+ int
+-connect_to(user)
+- yuser *user;
++connect_to(yuser *user)
+ {
+ register yuser *u;
+ int fd;
+- size_t socklen;
++ socklen_t socklen;
+ struct sockaddr_in sock, orig_sock;
+
+ orig_sock = *(struct sockaddr_in *)&nrsp.addr;
+@@ -871,15 +856,13 @@ connect_to(user)
+ /* Find a host's address.
+ */
+ ylong
+-get_host_addr(hostname)
+- char *hostname;
++get_host_addr(char *hostname)
+ {
+ struct hostent *host;
+ ylong addr;
+- ylong inet_addr();
+
+ errno = 0;
+- if((host = (struct hostent *) gethostbyname(hostname)) != NULL)
++ if((host = gethostbyname(hostname)) != NULL)
+ {
+ if(host->h_length != sizeof(addr))
+ {
+@@ -898,27 +881,25 @@ get_host_addr(hostname)
+ [19NOV96 Roger]: try to find the fqdn (1st alias with a dot)
+ */
+ char *
+-host_name(addr)
+- ylong addr;
++host_name(ylong addr)
+ {
+ struct hostent *host;
+- char *inet_ntoa();
+ char **s;
+
+- if((host = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET)) == NULL)
++ if((host = gethostbyaddr(&addr, sizeof(addr), AF_INET)) == NULL)
+ {
+ struct in_addr tmp;
+ tmp.s_addr = addr;
+ return inet_ntoa(tmp);
+ }
+ if (strchr(host->h_name, '.'))
+- return (char *)host->h_name;
++ return host->h_name;
+ s = host->h_aliases;
+ if (s && *s)
+ for (; *s; s++)
+ if (strchr(*s, '.'))
+ return *s;
+- return (char *)host->h_name;
++ return host->h_name;
+ }
+
+ /* Re-address a given host ("from_id") to the given address or host
+@@ -927,8 +908,7 @@ host_name(addr)
+ * as the differently-addressed "bar.com" to host "xyzzy.com".
+ */
+ void
+-readdress_host(from_id, to_id, on_id)
+- char *from_id, *to_id, *on_id;
++readdress_host(char *from_id, char *to_id, char *on_id)
+ {
+ register readdr *new;
+ ylong from_addr, to_addr, on_addr;
Index: patches/patch-term_c
===================================================================
RCS file: patches/patch-term_c
diff -N patches/patch-term_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-term_c 2 Jun 2026 09:53:41 -0000
@@ -0,0 +1,368 @@
+Index: term.c
+--- term.c.orig
++++ term.c
+@@ -38,15 +38,15 @@
+ #include "xwin.h"
+ #include "menu.h"
+
+-static int (*_open_term)(); /* open a new terminal */
+-static void (*_close_term)(); /* close a terminal */
+-static void (*_addch_term)(); /* write a char to a terminal */
+-static void (*_move_term)(); /* move cursor to Y,X position */
+-static void (*_clreol_term)(); /* clear to end of line */
+-static void (*_clreos_term)(); /* clear to end of screen */
+-static void (*_scroll_term)(); /* scroll up one line */
+-static void (*_rev_scroll_term)(); /* scroll down one line */
+-static void (*_flush_term)(); /* flush pending output */
++static int (*_open_term)(yuser *, char *); /* open a new terminal */
++static void (*_close_term)(yuser *); /* close a terminal */
++static void (*_addch_term)(yuser *, ychar);/* write a char to a terminal */
++static void (*_move_term)(yuser *, int, int);/* move cursor to Y,X position */
++static void (*_clreol_term)(yuser *); /* clear to end of line */
++static void (*_clreos_term)(yuser *); /* clear to end of screen */
++static void (*_scroll_term)(yuser *); /* scroll up one line */
++static void (*_rev_scroll_term)(yuser *); /* scroll down one line */
++static void (*_flush_term)(yuser *); /* flush pending output */
+
+ static int term_type = 0;
+
+@@ -191,8 +191,7 @@ init_term()
+ /* Set terminal size.
+ */
+ void
+-set_terminal_size(fd, rows, cols)
+- int fd, rows, cols;
++set_terminal_size(int fd, int rows, int cols)
+ {
+ #ifdef TIOCSWINSZ
+ struct winsize winsize;
+@@ -206,8 +205,7 @@ set_terminal_size(fd, rows, cols)
+ /* Set terminal and input characteristics for slave terminals.
+ */
+ void
+-set_terminal_flags(fd)
+- int fd;
++set_terminal_flags(int fd)
+ {
+ #ifdef USE_SGTTY
+ (void)ioctl(fd, TIOCSETD, &line_discipline);
+@@ -249,9 +247,7 @@ end_term()
+ /* Open a new user window.
+ */
+ int
+-open_term(user, title)
+- register yuser *user;
+- register char *title;
++open_term(yuser *user, char *title)
+ {
+ if(_open_term(user, title) != 0)
+ return -1;
+@@ -264,8 +260,7 @@ open_term(user, title)
+ /* Close a user window.
+ */
+ void
+-close_term(user)
+- register yuser *user;
++close_term(yuser *user)
+ {
+ register int i;
+
+@@ -284,9 +279,7 @@ close_term(user)
+ /* Place a character.
+ */
+ void
+-addch_term(user, c)
+- register yuser *user;
+- register ychar c;
++addch_term(yuser *user, ychar c)
+ {
+ if (is_printable(c))
+ {
+@@ -305,9 +298,7 @@ addch_term(user, c)
+ /* Move the cursor.
+ */
+ void
+-move_term(user, y, x)
+- register yuser *user;
+- register int y, x;
++move_term(yuser *user, int y, int x)
+ {
+ if(y < 0 || y > user->sc_bot)
+ y = user->sc_bot;
+@@ -326,8 +317,7 @@ move_term(user, y, x)
+ /* Clear to EOL.
+ */
+ void
+-clreol_term(user)
+- register yuser *user;
++clreol_term(yuser *user)
+ {
+ register int j;
+ register ychar *c;
+@@ -354,8 +344,7 @@ clreol_term(user)
+ /* Clear to EOS.
+ */
+ void
+-clreos_term(user)
+- register yuser *user;
++clreos_term(yuser *user)
+ {
+ register int j, i;
+ register ychar *c;
+@@ -390,8 +379,7 @@ clreos_term(user)
+ /* Scroll window.
+ */
+ void
+-scroll_term(user)
+- register yuser *user;
++scroll_term(yuser *user)
+ {
+ register int i;
+ register ychar *c;
+@@ -427,8 +415,7 @@ scroll_term(user)
+ /* Reverse-scroll window.
+ */
+ void
+-rev_scroll_term(user)
+- register yuser *user;
++rev_scroll_term(yuser *user)
+ {
+ register int i;
+ register ychar *c;
+@@ -464,8 +451,7 @@ rev_scroll_term(user)
+ /* Flush window output.
+ */
+ void
+-flush_term(user)
+- register yuser *user;
++flush_term(yuser *user)
+ {
+ _flush_term(user);
+ }
+@@ -473,8 +459,7 @@ flush_term(user)
+ /* Rub one character.
+ */
+ void
+-rub_term(user)
+- register yuser *user;
++rub_term(yuser *user)
+ {
+ if(user->x > 0)
+ {
+@@ -496,8 +481,7 @@ rub_term(user)
+ /* Rub one word.
+ */
+ int
+-word_term(user)
+- register yuser *user;
++word_term(yuser *user)
+ {
+ register int x, out;
+
+@@ -516,8 +500,7 @@ word_term(user)
+ /* Kill current line.
+ */
+ void
+-kill_term(user)
+- register yuser *user;
++kill_term(yuser *user)
+ {
+ if(user->x > 0)
+ {
+@@ -529,8 +512,7 @@ kill_term(user)
+ /* Expand a tab. We use non-destructive tabs.
+ */
+ void
+-tab_term(user)
+- register yuser *user;
++tab_term(yuser *user)
+ {
+ move_term(user, user->y, (user->x + 8) & 0xfff8);
+ }
+@@ -538,8 +520,7 @@ tab_term(user)
+ /* Process a newline.
+ */
+ void
+-newline_term(user)
+- register yuser *user;
++newline_term(yuser *user)
+ {
+ register int new_y, next_y;
+
+@@ -581,9 +562,7 @@ newline_term(user)
+ /* Insert lines.
+ */
+ void
+-add_line_term(user, num)
+- register yuser *user;
+- int num;
++add_line_term(yuser *user, int num)
+ {
+ register ychar *c;
+ register int i;
+@@ -628,9 +607,7 @@ add_line_term(user, num)
+ /* Delete lines.
+ */
+ void
+-del_line_term(user, num)
+- register yuser *user;
+- int num;
++del_line_term(yuser *user, int num)
+ {
+ register ychar *c;
+ register int i;
+@@ -673,9 +650,7 @@ del_line_term(user, num)
+ }
+
+ static void
+-copy_text(fr, to, count)
+- register ychar *fr, *to;
+- register int count;
++copy_text(ychar *fr, ychar *to, int count)
+ {
+ if(to < fr)
+ {
+@@ -694,9 +669,7 @@ copy_text(fr, to, count)
+ /* Add chars.
+ */
+ void
+-add_char_term(user, num)
+- register yuser *user;
+- int num;
++add_char_term(yuser *user, int num)
+ {
+ register ychar *c;
+ register int i;
+@@ -730,9 +703,7 @@ add_char_term(user, num)
+ /* Delete chars.
+ */
+ void
+-del_char_term(user, num)
+- register yuser *user;
+- int num;
++del_char_term(yuser *user, int num)
+ {
+ register ychar *c;
+ register int i;
+@@ -766,9 +737,7 @@ del_char_term(user, num)
+ /* Redraw a user's window.
+ */
+ void
+-redraw_term(user, y)
+- register yuser *user;
+- register int y;
++redraw_term(yuser *user, int y)
+ {
+ register int x, spaces;
+ register ychar *c;
+@@ -815,9 +784,7 @@ redraw_term(user, y)
+ * the given height and width.
+ */
+ static int
+-first_interesting_row(user, height, width)
+- yuser *user;
+- int height, width;
++first_interesting_row(yuser *user, int height, int width)
+ {
+ register int j, i;
+ register ychar *c;
+@@ -851,9 +818,7 @@ first_interesting_row(user, height, width)
+ /* Called when a user's window has been resized.
+ */
+ void
+-resize_win(user, height, width)
+- yuser *user;
+- int height, width;
++resize_win(yuser *user, int height, int width)
+ {
+ register int j, i;
+ register ychar *c, **newscr;
+@@ -939,10 +904,7 @@ resize_win(user, height, width)
+ /* Draw a nice box.
+ */
+ static void
+-draw_box(user, height, width, c)
+- yuser *user;
+- int height, width;
+- char c;
++draw_box(yuser *user, int height, int width, char c)
+ {
+ register int i;
+
+@@ -976,9 +938,7 @@ draw_box(user, height, width, c)
+ /* Set the virtual terminal size, ie: the display region.
+ */
+ void
+-set_win_region(user, height, width)
+- yuser *user;
+- int height, width;
++set_win_region(yuser *user, int height, int width)
+ {
+ register int x, y;
+ int old_height, old_width;
+@@ -1029,8 +989,7 @@ set_win_region(user, height, width)
+ /* Set the virtual terminal size, ie: the display region.
+ */
+ void
+-end_win_region(user)
+- yuser *user;
++end_win_region(yuser *user)
+ {
+ int old_height, old_width;
+
+@@ -1050,9 +1009,7 @@ end_win_region(user)
+ /* Set the scrolling region.
+ */
+ void
+-set_scroll_region(user, top, bottom)
+- yuser *user;
+- int top, bottom;
++set_scroll_region(yuser *user, int top, int bottom)
+ {
+ if(top < 0 || top >= user->rows || bottom >= user->rows || bottom < top
+ || (bottom <= 0 && top <= 0))
+@@ -1069,9 +1026,7 @@ set_scroll_region(user, top, bottom)
+ /* Send a message to the terminal.
+ */
+ void
+-msg_term(user, str)
+- yuser *user;
+- char *str;
++msg_term(yuser *user, char *str)
+ {
+ int y;
+
+@@ -1090,9 +1045,7 @@ msg_term(user, str)
+ /* Spew terminal contents to a file descriptor.
+ */
+ void
+-spew_term(user, fd, rows, cols)
+- yuser *user;
+- int fd, rows, cols;
++spew_term(yuser *user, int fd, int rows, int cols)
+ {
+ register ychar *c, *e;
+ register int len;
+@@ -1157,11 +1110,7 @@ spew_term(user, fd, rows, cols)
+ * This is an unadvertised function.
+ */
+ void
+-raw_term(user, y, x, str, len)
+- yuser *user;
+- int y, x;
+- ychar *str;
+- int len;
++raw_term(yuser *user, int y, int x, ychar *str, int len)
+ {
+ register ychar *c;
+
+@@ -1182,8 +1131,7 @@ raw_term(user, y, x, str, len)
+ }
+
+ int
+-center(width, n)
+- int width, n;
++center(int width, int n)
+ {
+ if(n >= width)
+ return 0;
Index: patches/patch-user_c
===================================================================
RCS file: patches/patch-user_c
diff -N patches/patch-user_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-user_c 2 Jun 2026 09:56:49 -0000
@@ -0,0 +1,74 @@
+Index: user.c
+--- user.c.orig
++++ user.c
+@@ -38,8 +38,7 @@ static ylong daemon_id; /* running daemon ID counter *
+ static int passwd_opened = 0;
+
+ static char *
+-user_name(uid)
+- int uid;
++user_name(int uid)
+ {
+ register struct passwd *pw;
+ passwd_opened = 1;
+@@ -59,8 +58,7 @@ close_passwd()
+ }
+
+ void
+-generate_full_name(user)
+- yuser *user;
++generate_full_name(yuser *user)
+ {
+ register char *c, *d, *ce;
+
+@@ -88,8 +86,7 @@ generate_full_name(user)
+ }
+
+ static void
+-assign_key(user)
+- yuser *user;
++assign_key(yuser *user)
+ {
+ register ychar old;
+ static ychar key = 'a';
+@@ -120,8 +117,7 @@ assign_key(user)
+ /* Initialize user data structures.
+ */
+ void
+-init_user(vhost)
+-char *vhost;
++init_user(char *vhost)
+ {
+ int my_uid;
+ char *my_name, *my_vhost;
+@@ -196,8 +192,7 @@ char *vhost;
+ /* Create a new user record.
+ */
+ yuser *
+-new_user(name, hostname, tty)
+- char *name, *hostname, *tty;
++new_user(char *name, char *hostname, char *tty)
+ {
+ register yuser *out, *u;
+ ylong addr;
+@@ -255,8 +250,7 @@ new_user(name, hostname, tty)
+ }
+
+ void
+-free_user(user)
+- yuser *user;
++free_user(yuser *user)
+ {
+ register yuser *u;
+
+@@ -328,9 +322,7 @@ free_user(user)
+ * then it is not checked.
+ */
+ yuser *
+-find_user(name, host_addr, pid)
+- char *name;
+- ylong host_addr, pid;
++find_user(char *name, ylong host_addr, ylong pid)
+ {
+ register yuser *u;
+
Index: patches/patch-xwin_c
===================================================================
RCS file: patches/patch-xwin_c
diff -N patches/patch-xwin_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-xwin_c 2 Jun 2026 09:37:08 -0000
@@ -0,0 +1,161 @@
+Index: xwin.c
+--- xwin.c.orig
++++ xwin.c
+@@ -43,8 +43,7 @@ static int font_width, /* font width */
+ /* ----- local functions ----- */
+
+ static XTextProperty *
+-strToTP(s)
+- char *s;
++strToTP(char *s)
+ {
+ XTextProperty *tp = (XTextProperty *)get_mem(sizeof(XTextProperty));
+ XStringListToTextProperty(&s, 1, tp);
+@@ -52,8 +51,7 @@ strToTP(s)
+ }
+
+ static char *
+-getOption(o)
+- char *o;
++getOption(char *o)
+ {
+ XrmValue value;
+ char *type;
+@@ -73,9 +71,7 @@ getOption(o)
+ }
+
+ static void
+-load_font(name, font)
+- char *name;
+- XFontStruct **font;
++load_font(char *name, XFontStruct **font)
+ {
+ if((*font = XLoadQueryFont(display, name)) == NULL)
+ {
+@@ -86,11 +82,8 @@ load_font(name, font)
+ }
+
+ static void
+-make_GC(gc, font, fgpixel, bgpixel, l_width, l_style, l_cap, l_join, gcfunc)
+- GC *gc;
+- XFontStruct *font;
+- ylong fgpixel, bgpixel;
+- int l_width, l_style, l_cap, l_join, gcfunc;
++make_GC(GC *gc, XFontStruct *font, ylong fgpixel, ylong bgpixel,
++ int l_width, int l_style, int l_cap, int l_join, int gcfunc)
+ {
+ ylong mask = 0;
+ XGCValues values;
+@@ -119,8 +112,7 @@ make_GC(gc, font, fgpixel, bgpixel, l_width, l_style,
+ /* Find the user who owns a given Window.
+ */
+ static yuser *
+-win_user(win)
+- Window win;
++win_user(Window win)
+ {
+ register yuser *u;
+
+@@ -169,9 +161,7 @@ process_event()
+ }
+
+ static void
+-place_cursor(win, y, x)
+- Window win;
+- int y, x;
++place_cursor(Window win, int y, int x)
+ {
+ XFillRectangle(display, win, invertGC,
+ XPOS(x), YPOS(y),
+@@ -262,9 +252,7 @@ end_xwin()
+ /* Open a new window.
+ */
+ int
+-open_xwin(user, title)
+- yuser *user;
+- char *title;
++open_xwin(yuser *user, char *title)
+ {
+ XWMHints WMhints;
+ XClassHint ClassHints;
+@@ -320,17 +308,14 @@ open_xwin(user, title)
+ }
+
+ void
+-close_xwin(user)
+- yuser *user;
++close_xwin(yuser *user)
+ {
+ XDestroyWindow(display, user->win);
+ user->win = (Window)0;
+ }
+
+ void
+-addch_xwin(user, ch)
+- yuser *user;
+- ychar ch;
++addch_xwin(yuser *user, ychar ch)
+ {
+ XClearArea(display, user->win,
+ XPOS(user->tx), YPOS(user->ty),
+@@ -346,9 +331,7 @@ addch_xwin(user, ch)
+ }
+
+ void
+-move_xwin(user, y, x)
+- yuser *user;
+- int y, x;
++move_xwin(yuser *user, int y, int x)
+ {
+ place_cursor(user->win, user->ty, user->tx);
+ user->ty = y;
+@@ -357,8 +340,7 @@ move_xwin(user, y, x)
+ }
+
+ void
+-clreol_xwin(user)
+- yuser *user;
++clreol_xwin(yuser *user)
+ {
+ XClearArea(display, user->win,
+ XPOS(user->tx), YPOS(user->ty),
+@@ -368,8 +350,7 @@ clreol_xwin(user)
+ }
+
+ void
+-clreos_xwin(user)
+- yuser *user;
++clreos_xwin(yuser *user)
+ {
+ XClearArea(display, user->win,
+ XPOS(user->tx), YPOS(user->ty),
+@@ -383,8 +364,7 @@ clreos_xwin(user)
+ }
+
+ void
+-scroll_xwin(user)
+- yuser *user;
++scroll_xwin(yuser *user)
+ {
+ place_cursor(user->win, user->ty, user->tx);
+ XCopyArea(display, user->win, user->win, textGC,
+@@ -399,8 +379,7 @@ scroll_xwin(user)
+ }
+
+ void
+-rev_scroll_xwin(user)
+- yuser *user;
++rev_scroll_xwin(yuser *user)
+ {
+ place_cursor(user->win, user->ty, user->tx);
+ XCopyArea(display, user->win, user->win, textGC,
+@@ -415,8 +394,7 @@ rev_scroll_xwin(user)
+ }
+
+ void
+-flush_xwin(user)
+- yuser *user;
++flush_xwin(yuser *user)
+ {
+ /* "user" is unused -- sorry, lint :-) */
+ XFlush(display);
Index: patches/patch-xwin_h
===================================================================
RCS file: patches/patch-xwin_h
diff -N patches/patch-xwin_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-xwin_h 2 Jun 2026 09:36:29 -0000
@@ -0,0 +1,32 @@
+Index: xwin.h
+--- xwin.h.orig
++++ xwin.h
+@@ -18,17 +18,17 @@
+
+ #ifdef USE_X11
+
+-extern void init_xwin ();
+-extern void end_xwin ();
+-extern int open_xwin ( /* yuser, title */ );
+-extern void close_xwin ( /* yuser */ );
+-extern void addch_xwin ( /* yuser, char */ );
+-extern void move_xwin ( /* yuser, y, x */ );
+-extern void clreol_xwin ( /* yuser */ );
+-extern void clreos_xwin ( /* yuser */ );
+-extern void scroll_xwin ( /* yuser */ );
+-extern void rev_scroll_xwin ( /* yuser */ );
+-extern void flush_xwin ( /* yuser */ );
++extern void init_xwin (void);
++extern void end_xwin (void);
++extern int open_xwin (yuser *, char *);
++extern void close_xwin (yuser *);
++extern void addch_xwin (yuser *, ychar);
++extern void move_xwin (yuser *, int, int);
++extern void clreol_xwin (yuser *);
++extern void clreos_xwin (yuser *);
++extern void scroll_xwin (yuser *);
++extern void rev_scroll_xwin (yuser *);
++extern void flush_xwin (yuser *);
+
+ #endif
+
fixes for net/ytalk with llvm 22