Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/write static + __dead
details: https://anonhg.NetBSD.org/src/rev/591c0cd27f7f
branches: trunk
changeset: 769350:591c0cd27f7f
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Sep 06 18:46:35 2011 +0000
description:
static + __dead
diffstat:
usr.bin/write/write.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diffs (82 lines):
diff -r 917d61877787 -r 591c0cd27f7f usr.bin/write/write.c
--- a/usr.bin/write/write.c Tue Sep 06 18:46:21 2011 +0000
+++ b/usr.bin/write/write.c Tue Sep 06 18:46:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: write.c,v 1.26 2011/08/31 16:24:58 plunky Exp $ */
+/* $NetBSD: write.c,v 1.27 2011/09/06 18:46:35 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)write.c 8.2 (Berkeley) 4/27/95";
#else
-__RCSID("$NetBSD: write.c,v 1.26 2011/08/31 16:24:58 plunky Exp $");
+__RCSID("$NetBSD: write.c,v 1.27 2011/09/06 18:46:35 joerg Exp $");
#endif
#endif /* not lint */
@@ -65,13 +65,11 @@
#include "utmpentry.h"
#include "term_chk.h"
-void done(int);
-void do_write(int, const char *, const uid_t);
-void wr_fputs(char *);
-int search_utmp(char *, char *, uid_t, gid_t);
-int utmp_chk(const char *, const char *);
-int main(int, char **);
-
+__dead static void done(int);
+static void do_write(int, const char *, const uid_t);
+static void wr_fputs(char *);
+static int search_utmp(char *, char *, uid_t, gid_t);
+static int utmp_chk(const char *, const char *);
int
main(int argc, char **argv)
@@ -127,7 +125,7 @@
* utmp_chk - checks that the given user is actually logged in on
* the given tty
*/
-int
+static int
utmp_chk(const char *user, const char *tty)
{
struct utmpentry *ep;
@@ -151,7 +149,7 @@
* Special case for writing to yourself - ignore the terminal you're
* writing from, unless that's the only terminal with messages enabled.
*/
-int
+static int
search_utmp(char *user, char *mytty, uid_t myuid, gid_t saved_egid)
{
char tty[MAXPATHLEN];
@@ -214,7 +212,7 @@
/*
* do_write - actually make the connection
*/
-void
+static void
do_write(int ttyfd, const char *mytty, const uid_t myuid)
{
const char *login;
@@ -255,7 +253,7 @@
/*
* done - cleanup and exit
*/
-void
+static void
done(int signo)
{
@@ -270,7 +268,7 @@
* wr_fputs - like fputs(), but makes control characters visible and
* turns \n into \r\n
*/
-void
+static void
wr_fputs(char *s)
{
unsigned char c;
Home |
Main Index |
Thread Index |
Old Index