Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/libexec/talkd/print.c,v retrieving revision 1.8.28.1 retrieving revision 1.9 diff -u -p -r1.8.28.1 -r1.9 --- src/libexec/talkd/print.c 2009/05/13 19:18:43 1.8.28.1 +++ src/libexec/talkd/print.c 2009/03/16 01:04:32 1.9 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.8.28.1 2009/05/13 19:18:43 jym Exp $ */ +/* $NetBSD: print.c,v 1.9 2009/03/16 01:04:32 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: print.c,v 1.8.28.1 2009/05/13 19:18:43 jym Exp $"); +__RCSID("$NetBSD: print.c,v 1.9 2009/03/16 01:04:32 lukem Exp $"); #endif #endif /* not lint */ @@ -43,12 +43,11 @@ __RCSID("$NetBSD: print.c,v 1.8.28.1 200 #include #include #include -#include #include #include #include "extern.h" -static const char *types[] = { +static char *types[] = { "leave_invite", "look_up", "delete", @@ -56,7 +55,7 @@ static const char *types[] = { }; #define NTYPES (sizeof (types) / sizeof (types[0])) -static const char *answers[] = { +static char *answers[] = { "success", "not_here", "failed", @@ -70,10 +69,9 @@ static const char *answers[] = { #define NANSWERS (sizeof (answers) / sizeof (answers[0])) void -print_request(const char *cp, CTL_MSG *mp) +print_request(char *cp, CTL_MSG *mp) { - char tbuf[80]; - const char *tp; + char tbuf[80], *tp; if (mp->type >= NTYPES) { (void)snprintf(tbuf, sizeof tbuf, "type %d", mp->type); @@ -81,15 +79,14 @@ print_request(const char *cp, CTL_MSG *m } else tp = types[mp->type]; syslog(debug ? LOG_DEBUG : LOG_INFO, - "%s: %s: id %"PRIu32", l_user %s, r_user %s, r_tty %s", + "%s: %s: id %d, l_user %s, r_user %s, r_tty %s", cp, tp, mp->id_num, mp->l_name, mp->r_name, mp->r_tty); } void -print_response(const char *cp, CTL_RESPONSE *rp) +print_response(char *cp, CTL_RESPONSE *rp) { - char tbuf[80], abuf[80]; - const char *tp, *ap; + char tbuf[80], *tp, abuf[80], *ap; if (rp->type >= NTYPES) { (void)snprintf(tbuf, sizeof tbuf, "type %d", rp->type); @@ -101,6 +98,6 @@ print_response(const char *cp, CTL_RESPO ap = abuf; } else ap = answers[rp->answer]; - syslog(debug ? LOG_DEBUG : LOG_INFO, "%s: %s: %s, id %"PRIu32, + syslog(debug ? LOG_DEBUG : LOG_INFO, "%s: %s: %s, id %d", cp, tp, ap, ntohl(rp->id_num)); }