Module Name:    src
Committed By:   joerg
Date:           Tue Sep  6 18:46:36 UTC 2011

Modified Files:
        src/usr.bin/write: write.c

Log Message:
static + __dead


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/write/write.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/write/write.c
diff -u src/usr.bin/write/write.c:1.26 src/usr.bin/write/write.c:1.27
--- src/usr.bin/write/write.c:1.26	Wed Aug 31 16:24:58 2011
+++ src/usr.bin/write/write.c	Tue Sep  6 18:46:35 2011
@@ -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;

Reply via email to