=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/finger/lprint.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/finger/lprint.c 1996/06/26 05:33:17 1.2 --- src/usr.bin/finger/lprint.c 1996/08/27 22:38:23 1.3 *************** *** 1,4 **** ! /* $OpenBSD: lprint.c,v 1.2 1996/06/26 05:33:17 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: lprint.c,v 1.3 1996/08/27 22:38:23 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. *************** *** 38,44 **** #ifndef lint /*static char sccsid[] = "from: @(#)lprint.c 5.13 (Berkeley) 10/31/90";*/ ! static char rcsid[] = "$OpenBSD: lprint.c,v 1.2 1996/06/26 05:33:17 deraadt Exp $"; #endif /* not lint */ #include --- 38,44 ---- #ifndef lint /*static char sccsid[] = "from: @(#)lprint.c 5.13 (Berkeley) 10/31/90";*/ ! static char rcsid[] = "$OpenBSD: lprint.c,v 1.3 1996/08/27 22:38:23 deraadt Exp $"; #endif /* not lint */ #include *************** *** 50,55 **** --- 50,56 ---- #include #include #include + #include #include "finger.h" #define LINE_LEN 80 *************** *** 280,298 **** vputc(ch) register int ch; { ! int meta; ! if (!isascii(ch)) { ! (void)putchar('M'); ! (void)putchar('-'); ! ch = toascii(ch); ! meta = 1; ! } else ! meta = 0; ! if (isprint(ch) || !meta && (ch == ' ' || ch == '\t' || ch == '\n')) ! (void)putchar(ch); ! else { ! (void)putchar('^'); ! (void)putchar(ch == '\177' ? '?' : ch | 0100); ! } } --- 281,290 ---- vputc(ch) register int ch; { ! char visout[4], *s2; ! ch = toascii(ch); ! vis(visout, ch, VIS_SAFE|VIS_NOSLASH, 0); ! for (s2 = visout; *s2; s2++) ! (void)putchar(*s2); }