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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
This patch is mostly from the debian indent_2.2.9-6.diff.
Also added a patch to check usage of `texinfo2man`.
http://bugs.gentoo.org/show_bug.cgi?id=71690
--- indent-2.2.9.orig/man/texinfo2man.c
+++ indent-2.2.9/man/texinfo2man.c
@@ -2,6 +2,7 @@
#include <malloc.h>
#include <string.h>
#include <ctype.h>
+#include <stdlib.h>
/* texinfo2man.
* Convert a texinfo document to man format.
@@ -162,7 +163,7 @@
static char value_updated[64], value_edition[64], value_version[64];
-process_texi (FILE * in)
+void process_texi (FILE * in)
{
char buf[1024];
int in_block = 0;
@@ -252,6 +254,12 @@
char buf[1024];
int line_no = 0;
+ if (argc != 3) {
+ fprintf(stderr, "Usage: %s <man template> <info file>\n", argv[0]);
+ fprintf(stderr, " The man page will be written to stdout.\n");
+ return -1;
+ }
+
texinfoname = argv[2];
in = fopen (argv[2], "r");
--- indent-2.2.9.orig/src/output.c
+++ indent-2.2.9/src/output.c
@@ -13,8 +13,10 @@
#include <stdio.h>
#include <sys/types.h>
+#include <time.h>
#include <utime.h>
#include <sys/stat.h>
+#include <stdlib.h>
#include "indent.h"
#include "sys.h"
@@ -1206,7 +1208,7 @@
}
}
-extern inhibit_indenting(
+extern void inhibit_indenting(
BOOLEAN flag)
{
inhibited = flag;
--- indent-2.2.9.orig/src/indent.h
+++ indent-2.2.9/src/indent.h
@@ -96,8 +96,6 @@
/* Size of the input program, not including the ' \n\0' we add at the end */
extern unsigned long in_prog_size;
-/* The output file. */
-extern FILE *output;
--- indent-2.2.9.orig/src/indent.c
+++ indent-2.2.9/src/indent.c
@@ -875,6 +875,7 @@
* imply we are in a stmt */
for (t_ptr = s_code; *t_ptr; ++t_ptr)
{
+ check_lab_size();
*e_lab++ = *t_ptr; /* turn everything so far into a label */
}
@@ -3062,8 +3063,8 @@
BOOLEAN using_stdin = false;
exit_values_ty exit_status;
-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
- setlocale (LC_MESSAGES, "");
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_ALL, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
--- indent-2.2.9.orig/src/comments.c
+++ indent-2.2.9/src/comments.c
@@ -20,6 +20,7 @@
#include "comments.h"
#include "globs.h"
#include "parse.h"
+#include "output.h"
RCSTAG_CC ("$Id: 2.2.9-deb-gentoo.patch,v 1.1 2005/01/04 03:21:26 vapier Exp $");
--- indent-2.2.9.orig/src/output.h
+++ indent-2.2.9/src/output.h
@@ -47,7 +47,7 @@
struct stat * file_stats,
const char * filename);
-extern inhibit_indenting(
+extern void inhibit_indenting(
BOOLEAN flag);
--- texinfo2man.c.orig 2002-01-17 14:28:51.000000000 -0500
+++ texinfo2man.c 2005-01-03 22:16:21.510887200 -0500
@@ -2,6 +2,7 @@
#include <malloc.h>
#include <string.h>
#include <ctype.h>
+#include <stdlib.h>
/* texinfo2man.
* Convert a texinfo document to man format.
@@ -162,6 +163,7 @@
static char value_updated[64], value_edition[64], value_version[64];
+void
process_texi (FILE * in)
{
char buf[1024];
|