wall.c (83082) | wall.c (83242) |
---|---|
1/* 2 * Copyright (c) 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93"; 43#endif 44static const char rcsid[] = | 1/* 2 * Copyright (c) 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/usr.bin/wall/wall.c 83082 2001-09-05 15:31:07Z ru $"; | 45 "$FreeBSD: head/usr.bin/wall/wall.c 83242 2001-09-09 14:23:31Z dd $"; |
46#endif /* not lint */ 47 48/* 49 * This program is not related to David Wall, whose Stanford Ph.D. thesis 50 * is entitled "Mechanisms for Broadcast and Selective Broadcast". 51 */ 52 53#include <sys/param.h> --- 8 unchanged lines hidden (view full) --- 62#include <pwd.h> 63#include <stdio.h> 64#include <stdlib.h> 65#include <string.h> 66#include <time.h> 67#include <unistd.h> 68#include <utmp.h> 69 | 46#endif /* not lint */ 47 48/* 49 * This program is not related to David Wall, whose Stanford Ph.D. thesis 50 * is entitled "Mechanisms for Broadcast and Selective Broadcast". 51 */ 52 53#include <sys/param.h> --- 8 unchanged lines hidden (view full) --- 62#include <pwd.h> 63#include <stdio.h> 64#include <stdlib.h> 65#include <string.h> 66#include <time.h> 67#include <unistd.h> 68#include <utmp.h> 69 |
70#include "ttymsg.h" 71 |
|
70static void makemsg(char *); 71static void usage(void); | 72static void makemsg(char *); 73static void usage(void); |
72char *ttymsg(struct iovec *, int, const char *, int); | |
73 74#define IGNOREUSER "sleeper" 75 76struct wallgroup { 77 struct wallgroup *next; 78 char *name; 79 gid_t gid; 80} *grouplist; --- 6 unchanged lines hidden (view full) --- 87{ 88 struct iovec iov; 89 struct utmp utmp; 90 int ch; 91 int ingroup; 92 FILE *fp; 93 struct wallgroup *g; 94 struct group *grp; | 74 75#define IGNOREUSER "sleeper" 76 77struct wallgroup { 78 struct wallgroup *next; 79 char *name; 80 gid_t gid; 81} *grouplist; --- 6 unchanged lines hidden (view full) --- 88{ 89 struct iovec iov; 90 struct utmp utmp; 91 int ch; 92 int ingroup; 93 FILE *fp; 94 struct wallgroup *g; 95 struct group *grp; |
95 char *p, **np; | 96 char **np; 97 const char *p; |
96 struct passwd *pw; 97 char line[sizeof(utmp.ut_line) + 1]; 98 char username[sizeof(utmp.ut_name) + 1]; 99 100 (void)setlocale(LC_CTYPE, ""); 101 102 while ((ch = getopt(argc, argv, "g:n")) != -1) 103 switch (ch) { --- 191 unchanged lines hidden --- | 98 struct passwd *pw; 99 char line[sizeof(utmp.ut_line) + 1]; 100 char username[sizeof(utmp.ut_name) + 1]; 101 102 (void)setlocale(LC_CTYPE, ""); 103 104 while ((ch = getopt(argc, argv, "g:n")) != -1) 105 switch (ch) { --- 191 unchanged lines hidden --- |