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 #include #include +#include /* 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 \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 #include +#include #include #include +#include #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 2007-05-08 19:48:32 niro 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);