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
57
58
59
60
61
62
63
|
$NetBSD: patch-bq,v 1.3 2013/02/26 11:07:26 joerg Exp $
* Use standard strdup(3).
--- conf/mhconfig.c.orig 2001-05-29 15:04:36.000000000 +0000
+++ conf/mhconfig.c
@@ -6,6 +6,8 @@ static char ident[] = "@(#)$Id: mhconfig
#include <ctype.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef hpux
#define SYS5
#endif
@@ -16,7 +18,6 @@ static char ident[] = "@(#)$Id: mhconfig
static void insopt(), mkopts();
-extern char *strcpy(), *malloc(), *index(), *rindex();
#ifdef notdef
extern char *sprintf(); /* rely on stdio.h to declare this */
#endif
@@ -266,9 +267,10 @@ static struct pair {
static do_sed(), do_sedfile(), do_files(), do_doc(), do_make();
-static shell(), arginit(), add_option(), trim();
+static shell(), arginit(), add_option();
+static void trim(char *);
-static char *stradd (), *strdup (), *tail ();
+static char *stradd (), *tail ();
/* */
@@ -959,8 +961,7 @@ end_myopt () {
/* */
-static trim (s)
-char *s;
+static void trim(char *s)
{
char *p;
@@ -1002,7 +1003,7 @@ char *s1,
return p;
}
-
+#if 0
static char *strdup (s)
char *s;
{
@@ -1014,6 +1015,7 @@ char *s;
(void) strcpy (p, s);
return p;
}
+#endif
/* */
|