SCCS-vsn: usr.bin/w/w.c 5.36
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)w.c 5.35 (Berkeley) %G%";
+static char sccsid[] = "@(#)w.c 5.36 (Berkeley) %G%";
*ttystat __P((char *));
static void usage __P((int));
*ttystat __P((char *));
static void usage __P((int));
+char *fmt_argv __P((char **, char *, int));
+
int
main(argc, argv)
int argc;
int
main(argc, argv)
int argc;
if (argwidth < 4)
argwidth = 8;
for (ep = ehead; ep != NULL; ep = ep->next) {
if (argwidth < 4)
argwidth = 8;
for (ep = ehead; ep != NULL; ep = ep->next) {
if (ep->kp == NULL) {
ep->args = "-";
continue;
if (ep->kp == NULL) {
ep->args = "-";
continue;
double avenrun[3];
time_t uptime;
int days, hrs, i, mins;
double avenrun[3];
time_t uptime;
int days, hrs, i, mins;
+ char buf[256], fmt[10];
- /* Print time of day. */
- (void)strftime(buf, sizeof(buf), "%l:w.cp", localtime(nowp));
+ /*
+ * Print time of day.
+ *
+ * Note, SCCS forces the string manipulation below, as it
+ * replaces w.c with file information.
+ */
+ (void)strcpy(fmt, "%l:%%%p");
+ fmt[4] = 'M';
+ (void)strftime(buf, sizeof(buf), fmt, localtime(nowp));
(void)printf("%s ", buf);
/*
(void)printf("%s ", buf);
/*