summaryrefslogtreecommitdiff
path: root/textproc/vis/patches/patch-aa
blob: 9907b29618a67204700d8c4aedc763b6237b5568 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$NetBSD: patch-aa,v 1.1 2006/01/25 14:41:31 joerg Exp $

--- unvis/libunvis.c.orig	2006-01-25 14:33:51.000000000 +0000
+++ unvis/libunvis.c
@@ -40,11 +40,6 @@ __RCSID("$NetBSD: unvis.c,v 1.24 2003/08
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#ifdef notdef
-#define __LIBC12_SOURCE__
-
-#include "namespace.h"
-#endif
 #include <sys/types.h>
 
 #include <assert.h>
@@ -52,20 +47,11 @@ __RCSID("$NetBSD: unvis.c,v 1.24 2003/08
 #include <stdio.h>
 #include <vis.h>
 
-#ifdef __weak_alias
-__weak_alias(strunvis,_strunvis)
-__weak_alias(unvis,_unvis)
-#endif
 #ifndef _DIAGASSERT
 #define _DIAGASSERT(a)
 #endif
 
-#ifdef __warn_references
-__warn_references(unvis,
-    "warning: reference to compatibility unvis(); include <vis.h> for correct reference")
-#endif
-
-#if !HAVE_VIS
+#ifndef HAVE_VIS
 /*
  * decode driven by state machine
  */
@@ -82,6 +68,8 @@ __warn_references(unvis,
 #define	isoctal(c)	(((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
 #define xtod(c)		(isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10))
 
+static int __unvis13(char *cp, int c, int *astate, int flag);
+
 int
 unvis(cp, c, astate, flag)
 	char *cp;
@@ -94,7 +82,7 @@ unvis(cp, c, astate, flag)
 /*
  * unvis - decode characters previously encoded by vis
  */
-int
+static int
 __unvis13(cp, c, astate, flag)
 	char *cp;
 	int c;