summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-09-20 02:07:50 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-09-20 02:07:50 +0000
commit84a6bfba15e833a9b70de130f9427245fca89724 (patch)
tree851077a469e759473ada938ba5ff5507b6976aee
parent03598a1c230962db9befb8f8e5ccdab3d0449346 (diff)
- (bal) openbsd-compat/vis.[ch] is dead wood. Removed.
-rw-r--r--ChangeLog7
-rw-r--r--configure.in6
-rw-r--r--includes.h3
-rw-r--r--openbsd-compat/Makefile.in4
-rw-r--r--openbsd-compat/openbsd-compat.h3
-rw-r--r--openbsd-compat/vis.c139
-rw-r--r--openbsd-compat/vis.h34
7 files changed, 10 insertions, 186 deletions
diff --git a/ChangeLog b/ChangeLog
index e84947d61..ea448f21c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
120010919 120010919
2 - (bal) OpenbSD Sycn 2 - (bal) OpenBSD Sync
3 - markus@cvs.openbsd.org 2001/09/19 10:08:51 3 - markus@cvs.openbsd.org 2001/09/19 10:08:51
4 [sshd.8] 4 [sshd.8]
5 command=xxx applies to subsystem now, too 5 command=xxx applies to subsystem now, too
@@ -22,6 +22,7 @@
22 - stevesk@cvs.openbsd.org 2001/09/19 21:41:57 22 - stevesk@cvs.openbsd.org 2001/09/19 21:41:57
23 [sshd.8] 23 [sshd.8]
24 don't advertise -V in usage; ok markus@ 24 don't advertise -V in usage; ok markus@
25 - (bal) openbsd-compat/vis.[ch] is dead wood. Removed.
25 26
2620010918 2720010918
27 - (djm) Configure support for smartcards. Based on Ben's work. 28 - (djm) Configure support for smartcards. Based on Ben's work.
@@ -36,7 +37,7 @@
36 - (stevesk) nchan.c: we use X/Open Sockets on HP-UX now so shutdown(2) 37 - (stevesk) nchan.c: we use X/Open Sockets on HP-UX now so shutdown(2)
37 returns ENOTCONN vs. EINVAL for socket not connected; remove EINVAL 38 returns ENOTCONN vs. EINVAL for socket not connected; remove EINVAL
38 check. ok Lutz Jaenicke 39 check. ok Lutz Jaenicke
39 - OpenBSD CVS Sync 40 - (bal) OpenBSD CVS Sync
40 - stevesk@cvs.openbsd.org 2001/09/17 17:57:57 41 - stevesk@cvs.openbsd.org 2001/09/17 17:57:57
41 [scp.1 scp.c sftp.1 sftp.c] 42 [scp.1 scp.c sftp.1 sftp.c]
42 add -Fssh_config option; ok markus@ 43 add -Fssh_config option; ok markus@
@@ -6529,4 +6530,4 @@
6529 - Wrote replacements for strlcpy and mkdtemp 6530 - Wrote replacements for strlcpy and mkdtemp
6530 - Released 1.0pre1 6531 - Released 1.0pre1
6531 6532
6532$Id: ChangeLog,v 1.1547 2001/09/20 01:07:57 mouring Exp $ 6533$Id: ChangeLog,v 1.1548 2001/09/20 02:07:50 mouring Exp $
diff --git a/configure.in b/configure.in
index 94fbfc388..038569bee 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
1# $Id: configure.in,v 1.311 2001/09/18 05:06:22 djm Exp $ 1# $Id: configure.in,v 1.312 2001/09/20 02:07:51 mouring Exp $
2 2
3AC_INIT(ssh.c) 3AC_INIT(ssh.c)
4 4
@@ -373,7 +373,7 @@ AC_CHECK_FUNC(utimes,
373AC_FUNC_STRFTIME 373AC_FUNC_STRFTIME
374 374
375# Checks for header files. 375# Checks for header files.
376AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) 376AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h)
377 377
378# Check for ALTDIRFUNC glob() extension 378# Check for ALTDIRFUNC glob() extension
379AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) 379AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
@@ -477,7 +477,7 @@ AC_ARG_WITH(tcp-wrappers,
477) 477)
478 478
479dnl Checks for library functions. 479dnl Checks for library functions.
480AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop) 480AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop)
481dnl Checks for time functions 481dnl Checks for time functions
482AC_CHECK_FUNCS(gettimeofday time) 482AC_CHECK_FUNCS(gettimeofday time)
483dnl Checks for libutil functions 483dnl Checks for libutil functions
diff --git a/includes.h b/includes.h
index c73780d26..f9cf9c73e 100644
--- a/includes.h
+++ b/includes.h
@@ -98,9 +98,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
98#ifdef HAVE_UTIME_H 98#ifdef HAVE_UTIME_H
99# include <utime.h> 99# include <utime.h>
100#endif 100#endif
101#ifdef HAVE_VIS_H
102# include <vis.h>
103#endif
104#include "version.h" 101#include "version.h"
105#include "openbsd-compat/openbsd-compat.h" 102#include "openbsd-compat/openbsd-compat.h"
106#include "openbsd-compat/bsd-cygwin_util.h" 103#include "openbsd-compat/bsd-cygwin_util.h"
diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in
index c6b3c959e..103ecc312 100644
--- a/openbsd-compat/Makefile.in
+++ b/openbsd-compat/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.18 2001/08/07 22:29:09 tim Exp $ 1# $Id: Makefile.in,v 1.19 2001/09/20 02:07:51 mouring Exp $
2 2
3sysconfdir=@sysconfdir@ 3sysconfdir=@sysconfdir@
4piddir=@piddir@ 4piddir=@piddir@
@@ -16,7 +16,7 @@ RANLIB=@RANLIB@
16INSTALL=@INSTALL@ 16INSTALL=@INSTALL@
17LDFLAGS=-L. @LDFLAGS@ 17LDFLAGS=-L. @LDFLAGS@
18 18
19OPENBSD=base64.o bindresvport.o daemon.o dirname.o getcwd.o getgrouplist.o getopt.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o vis.o 19OPENBSD=base64.o bindresvport.o daemon.o dirname.o getcwd.o getgrouplist.o getopt.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o
20 20
21COMPAT=bsd-arc4random.o bsd-cray.o bsd-cygwin_util.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o 21COMPAT=bsd-arc4random.o bsd-cray.o bsd-cygwin_util.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o
22 22
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index eba9ca051..efa204dc3 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openbsd-compat.h,v 1.13 2001/08/07 22:29:09 tim Exp $ */ 1/* $Id: openbsd-compat.h,v 1.14 2001/09/20 02:07:51 mouring Exp $ */
2 2
3#ifndef _OPENBSD_H 3#ifndef _OPENBSD_H
4#define _OPENBSD_H 4#define _OPENBSD_H
@@ -21,7 +21,6 @@
21#include "inet_ntoa.h" 21#include "inet_ntoa.h"
22#include "inet_ntop.h" 22#include "inet_ntop.h"
23#include "strsep.h" 23#include "strsep.h"
24#include "vis.h"
25#include "setproctitle.h" 24#include "setproctitle.h"
26#include "getgrouplist.h" 25#include "getgrouplist.h"
27#include "glob.h" 26#include "glob.h"
diff --git a/openbsd-compat/vis.c b/openbsd-compat/vis.c
deleted file mode 100644
index 7eb2d6cd9..000000000
--- a/openbsd-compat/vis.c
+++ /dev/null
@@ -1,139 +0,0 @@
1/*-
2 * Copyright (c) 1989, 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
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: vis.c,v 1.6 2000/11/21 00:47:28 millert Exp $";
36#endif /* LIBC_SCCS and not lint */
37
38#include "includes.h"
39
40#ifndef HAVE_VIS
41
42#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
43#define isvisible(c) (((u_int)(c) <= UCHAR_MAX && isascii((u_char)(c)) && \
44 isgraph((u_char)(c))) || \
45 ((flag & VIS_SP) == 0 && (c) == ' ') || \
46 ((flag & VIS_TAB) == 0 && (c) == '\t') || \
47 ((flag & VIS_NL) == 0 && (c) == '\n') || \
48 ((flag & VIS_SAFE) && \
49 ((c) == '\b' || (c) == '\007' || (c) == '\r')))
50
51/*
52 * vis - visually encode characters
53 */
54char *vis(char *dst, int c, int flag, int nextc)
55{
56 if (isvisible(c)) {
57 *dst++ = c;
58 if (c == '\\' && (flag & VIS_NOSLASH) == 0)
59 *dst++ = '\\';
60 *dst = '\0';
61 return (dst);
62 }
63
64 if (flag & VIS_CSTYLE) {
65 switch(c) {
66 case '\n':
67 *dst++ = '\\';
68 *dst++ = 'n';
69 goto done;
70 case '\r':
71 *dst++ = '\\';
72 *dst++ = 'r';
73 goto done;
74 case '\b':
75 *dst++ = '\\';
76 *dst++ = 'b';
77 goto done;
78#ifdef __STDC__
79 case '\a':
80#else
81 case '\007':
82#endif
83 *dst++ = '\\';
84 *dst++ = 'a';
85 goto done;
86 case '\v':
87 *dst++ = '\\';
88 *dst++ = 'v';
89 goto done;
90 case '\t':
91 *dst++ = '\\';
92 *dst++ = 't';
93 goto done;
94 case '\f':
95 *dst++ = '\\';
96 *dst++ = 'f';
97 goto done;
98 case ' ':
99 *dst++ = '\\';
100 *dst++ = 's';
101 goto done;
102 case '\0':
103 *dst++ = '\\';
104 *dst++ = '0';
105 if (isoctal(nextc)) {
106 *dst++ = '0';
107 *dst++ = '0';
108 }
109 goto done;
110 }
111 }
112 if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) {
113 *dst++ = '\\';
114 *dst++ = ((u_char)c >> 6 & 07) + '0';
115 *dst++ = ((u_char)c >> 3 & 07) + '0';
116 *dst++ = ((u_char)c & 07) + '0';
117 goto done;
118 }
119 if ((flag & VIS_NOSLASH) == 0)
120 *dst++ = '\\';
121 if (c & 0200) {
122 c &= 0177;
123 *dst++ = 'M';
124 }
125 if (iscntrl(c)) {
126 *dst++ = '^';
127 if (c == 0177)
128 *dst++ = '?';
129 else
130 *dst++ = c + '@';
131 } else {
132 *dst++ = '-';
133 *dst++ = c;
134 }
135done:
136 *dst = '\0';
137 return (dst);
138}
139#endif /* HAVE_VIS */
diff --git a/openbsd-compat/vis.h b/openbsd-compat/vis.h
deleted file mode 100644
index 677fe959b..000000000
--- a/openbsd-compat/vis.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/* $Id: vis.h,v 1.2 2001/02/09 01:55:37 djm Exp $ */
2
3#ifndef _BSD_VIS_H
4#define _BSD_VIS_H
5
6#include "config.h"
7
8#ifndef HAVE_VIS
9
10/*
11 * to select alternate encoding format
12 */
13#define VIS_OCTAL 0x01 /* use octal \ddd format */
14#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */
15
16/*
17 * to alter set of characters encoded (default is to encode all
18 * non-graphic except space, tab, and newline).
19 */
20#define VIS_SP 0x04 /* also encode space */
21#define VIS_TAB 0x08 /* also encode tab */
22#define VIS_NL 0x10 /* also encode newline */
23#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL)
24#define VIS_SAFE 0x20 /* only encode "unsafe" characters */
25
26/*
27 * other
28 */
29#define VIS_NOSLASH 0x40 /* inhibit printing '\' */
30
31char *vis (char *, int, int, int);
32#endif /* HAVE_VIS */
33
34#endif /* _BSD_VIS_H */