Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/finger Implement 8-bit pass-through.
details: https://anonhg.NetBSD.org/src/rev/bc2a71278442
branches: trunk
changeset: 536242:bc2a71278442
user: kim <kim%NetBSD.org@localhost>
date: Thu Sep 12 01:31:41 2002 +0000
description:
Implement 8-bit pass-through.
diffstat:
usr.bin/finger/extern.h | 3 ++-
usr.bin/finger/finger.1 | 11 +++++++++--
usr.bin/finger/finger.c | 13 ++++++++-----
usr.bin/finger/lprint.c | 6 +++---
usr.bin/finger/net.c | 6 +++---
5 files changed, 25 insertions(+), 14 deletions(-)
diffs (154 lines):
diff -r bc18f6e71b16 -r bc2a71278442 usr.bin/finger/extern.h
--- a/usr.bin/finger/extern.h Wed Sep 11 23:11:41 2002 +0000
+++ b/usr.bin/finger/extern.h Thu Sep 12 01:31:41 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.7 2002/08/02 00:10:40 christos Exp $ */
+/* $NetBSD: extern.h,v 1.8 2002/09/12 01:31:41 kim Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -42,6 +42,7 @@
extern int lflag;
extern int oflag;
extern int gflag;
+extern int eightflag;
extern int pplan;
void enter_lastlog __P((PERSON *));
diff -r bc18f6e71b16 -r bc2a71278442 usr.bin/finger/finger.1
--- a/usr.bin/finger/finger.1 Wed Sep 11 23:11:41 2002 +0000
+++ b/usr.bin/finger/finger.1 Thu Sep 12 01:31:41 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: finger.1,v 1.11 1999/03/22 18:16:37 garbled Exp $
+.\" $NetBSD: finger.1,v 1.12 2002/09/12 01:31:41 kim Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -41,7 +41,7 @@
.Nd user information lookup program
.Sh SYNOPSIS
.Nm
-.Op Fl lmpshog
+.Op Fl lmpshog8
.Op Ar user ...
.Op Ar user@host ...
.Sh DESCRIPTION
@@ -148,6 +148,13 @@
All name matching performed by
.Nm
is case insensitive.
+.It Fl 8
+Pass through 8-bit data. This option is intended for enabling 8-bit
+data output in the
+.Xr fingerd 8
+service. Using this from the command line is
+.Em dangerous ,
+as the output data may include control characters for your terminal.
.El
.Pp
If no options are specified,
diff -r bc18f6e71b16 -r bc2a71278442 usr.bin/finger/finger.c
--- a/usr.bin/finger/finger.c Wed Sep 11 23:11:41 2002 +0000
+++ b/usr.bin/finger/finger.c Thu Sep 12 01:31:41 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: finger.c,v 1.20 2002/09/10 03:02:40 kim Exp $ */
+/* $NetBSD: finger.c,v 1.21 2002/09/12 01:31:41 kim Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -56,7 +56,7 @@
#if 0
static char sccsid[] = "@(#)finger.c 8.5 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: finger.c,v 1.20 2002/09/10 03:02:40 kim Exp $");
+__RCSID("$NetBSD: finger.c,v 1.21 2002/09/12 01:31:41 kim Exp $");
#endif
#endif /* not lint */
@@ -97,7 +97,7 @@
DB *db;
time_t now;
-int entries, gflag, lflag, mflag, oflag, sflag, pplan;
+int entries, gflag, lflag, mflag, oflag, sflag, eightflag, pplan;
char tbuf[1024];
struct utmpentry *ehead;
@@ -124,7 +124,7 @@
oflag = 1; /* default to old "office" behavior */
- while ((ch = getopt(argc, argv, "lmpshog")) != -1)
+ while ((ch = getopt(argc, argv, "lmpshog8")) != -1)
switch(ch) {
case 'l':
lflag = 1; /* long format */
@@ -147,10 +147,13 @@
case 'g':
gflag = 1; /* no gecos info, besides name */
break;
+ case '8':
+ eightflag = 1; /* 8-bit pass-through */
+ break;
case '?':
default:
(void)fprintf(stderr,
- "usage: finger [-lmpshog] [login ...]\n");
+ "usage: finger [-lmpshog8] [login ...]\n");
exit(1);
}
argc -= optind;
diff -r bc18f6e71b16 -r bc2a71278442 usr.bin/finger/lprint.c
--- a/usr.bin/finger/lprint.c Wed Sep 11 23:11:41 2002 +0000
+++ b/usr.bin/finger/lprint.c Thu Sep 12 01:31:41 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lprint.c,v 1.17 2002/09/10 03:02:40 kim Exp $ */
+/* $NetBSD: lprint.c,v 1.18 2002/09/12 01:31:41 kim Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lprint.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID( "$NetBSD: lprint.c,v 1.17 2002/09/10 03:02:40 kim Exp $");
+__RCSID( "$NetBSD: lprint.c,v 1.18 2002/09/12 01:31:41 kim Exp $");
#endif
#endif /* not lint */
@@ -364,7 +364,7 @@
{
char visout[5], *s2;
- if ((isprint(ch)) || (isspace(ch))) {
+ if (eightflag || isprint(ch) || isspace(ch)) {
(void)putchar(ch);
return;
}
diff -r bc18f6e71b16 -r bc2a71278442 usr.bin/finger/net.c
--- a/usr.bin/finger/net.c Wed Sep 11 23:11:41 2002 +0000
+++ b/usr.bin/finger/net.c Thu Sep 12 01:31:41 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net.c,v 1.18 2002/09/10 03:02:40 kim Exp $ */
+/* $NetBSD: net.c,v 1.19 2002/09/12 01:31:41 kim Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)net.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: net.c,v 1.18 2002/09/10 03:02:40 kim Exp $");
+__RCSID("$NetBSD: net.c,v 1.19 2002/09/12 01:31:41 kim Exp $");
#endif
#endif /* not lint */
@@ -146,7 +146,7 @@
c = '\n';
lastc = '\r';
} else {
- if (!isprint(c) && !isspace(c)) {
+ if (!(eightflag || isprint(c) || isspace(c))) {
c &= 0x7f;
c |= 0x40;
}
Home |
Main Index |
Thread Index |
Old Index