--- makeinfo/html.c.orig Sun Dec 5 17:13:06 2004
+++ makeinfo/html.c Fri Sep 1 01:19:03 2006
@@ -445,7 +445,7 @@
return 0;
/* Find the end of the previous tag. */
- while (output_paragraph[check_position-1] != '>' && check_position > 0)
+ while (check_position > 0 && output_paragraph[check_position-1] != '>')
check_position--;
/* Save stuff between tag's end to output_paragraph's end. */
@@ -462,7 +462,7 @@
}
/* Find the start of the previous tag. */
- while (output_paragraph[check_position-1] != '<' && check_position > 0)
+ while (check_position > 0 && output_paragraph[check_position-1] != '<')
check_position--;
/* Check to see if this is the tag. */
--- util/install-info.c.orig Sun Apr 11 10:56:47 2004
+++ util/install-info.c Fri Sep 1 01:19:03 2006
@@ -22,6 +22,8 @@
#include
static char *progname = "install-info";
+/* Added for compatibility with FreeBSD texinfo */
+static char *default_section = NULL;
struct spec_entry;
struct spec_section;
@@ -117,9 +119,13 @@
/* This table defines all the long-named options, says whether they
use an argument, and maps them into equivalent single-letter options. */
+/* defentry and defsection added for compatibility with FreeBSD texinfo */
+
struct option longopts[] =
{
{ "delete", no_argument, NULL, 'r' },
+ { "defentry", required_argument, NULL, 'E' },
+ { "defsection", required_argument, NULL, 'S' },
{ "dir-file", required_argument, NULL, 'd' },
{ "entry", required_argument, NULL, 'e' },
{ "help", no_argument, NULL, 'h' },
@@ -428,6 +434,7 @@
xexit (1);
}
+/* defentry and defsection added for compatibility with FreeBSD's texinfo */
void
print_help (void)
{
@@ -440,6 +447,10 @@
--delete delete existing entries for INFO-FILE from DIR-FILE;\n\
don't insert any new entries.\n\
--dir-file=NAME specify file name of Info directory file.\n\
+ --defentry=TEXT same as --entry, but only use TEXT if an entry is not\n\
+ present in INFO-FILE.\n\
+ --desection=SEC same as --section, but only use TEXT if an entry is not\n\
+ present in INFO-FILE.\n\
This is equivalent to using the DIR-FILE argument.\n\
--entry=TEXT insert TEXT as an Info directory entry.\n\
TEXT should have the form of an Info menu item line\n\
@@ -1143,6 +1154,10 @@
struct spec_entry *entries_to_add = NULL;
int n_entries_to_add = 0;
+ /* Added for compatibility w/ original texinfo in FBSD */
+ struct spec_entry *default_entries_to_add = NULL;
+ int n_default_entries_to_add = 0;
+
/* Record the old text of the dir file, as plain characters,
as lines, and as nodes. */
char *dir_data;
@@ -1205,6 +1220,7 @@
dirfile = concat (optarg, "", "/dir");
break;
+ case 'E':
case 'e':
{
struct spec_entry *next
@@ -1222,6 +1238,20 @@
next->next = entries_to_add;
entries_to_add = next;
n_entries_to_add++;
+
+ /* Added for compatibility with FreeBSD's texinfo */
+ if (opt == 'e')
+ {
+ next->next = entries_to_add;
+ entries_to_add = next;
+ n_entries_to_add++;
+ }
+ else
+ {
+ next->next = default_entries_to_add;
+ default_entries_to_add = next;
+ n_default_entries_to_add++;
+ }
}
break;
@@ -1259,6 +1289,11 @@
}
break;
+ /* Added for compatibility with FreeBSD's texinfo */
+ case 'S':
+ default_section = optarg;
+ break;
+
case 'V':
printf ("install-info (GNU %s) %s\n", PACKAGE, VERSION);
puts ("");
@@ -1332,7 +1367,9 @@
{
input_sections = (struct spec_section *)
xmalloc (sizeof (struct spec_section));
- input_sections->name = "Miscellaneous";
+ /* Modified for compatibility with FreeBSD's texinfo */
+ input_sections->name =
+ default_section ? default_section : "Miscellaneous";
input_sections->next = NULL;
input_sections->missing = 1;
}
--- util/texindex.c.orig Sun Apr 11 10:56:47 2004
+++ util/texindex.c Fri Sep 1 01:19:03 2006
@@ -20,6 +20,7 @@
#include "system.h"
#include
+#include
static char *program_name = "texindex";
@@ -37,8 +38,6 @@
#define memset(ptr, ignore, count) bzero (ptr, count)
#endif
-char *mktemp (char *);
-
#if !defined (SEEK_SET)
# define SEEK_SET 0
# define SEEK_CUR 1
@@ -146,6 +145,7 @@
void *xmalloc (), *xrealloc ();
char *concat (char *s1, char *s2);
void flush_tempfiles (int to_count);
+void flush_tempfiles_atexit ();
#define MAX_IN_CORE_SORT 500000
@@ -307,6 +307,7 @@
int arg_index = 1;
char **ip;
char **op;
+ int retries;
/* Store default values into parameter variables. */
@@ -320,8 +321,26 @@
else
tempdir = concat (tempdir, "/");
+ tempdir = concat (tempdir, "txidx.XXXXXX");
+ retries = 0x1000;
+
+ do
+ {
+ char *dot;
+ if (mktemp(tempdir) == NULL || !tempdir[0])
+ fatal("mktemp failed for '%s'", tempdir);
+ if (mkdir(tempdir, 0700) == 0) break;
+ if (errno != EEXIST || !--retries)
+ pfatal_with_name(tempdir);
+ if ((dot = strrchr (tempdir, ".")))
+ strcpy (dot, ".XXXXXX");
+ }
+ while (1);
+
keep_tempfiles = 0;
+ atexit(flush_tempfiles_atexit);
+
/* Allocate ARGC input files, which must be enough. */
infiles = (char **) xmalloc (argc * sizeof (char *));
@@ -389,21 +408,9 @@
static char *
maketempname (int count)
{
- static char *tempbase = NULL;
char tempsuffix[10];
-
- if (!tempbase)
- {
- int fd;
- tempbase = concat (tempdir, "txidxXXXXXX");
-
- fd = mkstemp (tempbase);
- if (fd == -1)
- pfatal_with_name (tempbase);
- }
-
- sprintf (tempsuffix, ".%d", count);
- return concat (tempbase, tempsuffix);
+ sprintf (tempsuffix, "/%d", count);
+ return concat (tempdir, tempsuffix);
}
@@ -416,6 +423,13 @@
return;
while (last_deleted_tempcount < to_count)
unlink (maketempname (++last_deleted_tempcount));
+ rmdir(tempdir);
+}
+
+void
+flush_tempfiles_atexit (void)
+{
+ flush_tempfiles (tempcount);
}
@@ -1622,7 +1636,7 @@
strcpy (result, s1);
strcpy (result + len1, s2);
- *(result + len1 + len2) = 0;
+ result[len1 + len2] = '\0';
return result;
}
--- doc/texinfo.txi.orig Wed Dec 29 07:06:41 2004
+++ doc/texinfo.txi Fri Sep 1 01:27:22 2006
@@ -12,7 +12,7 @@
@c
@c Ordinarily, the setfilename argument ends with .info. But
@c texinfo.info-13 is too long for 14-character filesystems.
-@setfilename texinfo
+@setfilename texinfo.info
@c Automake automatically updates version.texi to @set VERSION and
@c @set UPDATED to appropriate values.
@@ -14654,7 +14654,7 @@
@group
\input texinfo @@c -*-texinfo-*-
@@c %**start of header
-@@setfilename texinfo
+@@setfilename texinfo.info
@@settitle Texinfo
@@afourpaper
@@c %**end of header
--- doc/Makefile.in.orig Fri Dec 31 10:01:47 2004
+++ doc/Makefile.in Fri Sep 1 01:31:13 2006
@@ -76,7 +76,7 @@
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
-INFO_DEPS = texinfo info-stnd.info info.info
+INFO_DEPS = texinfo.info info-stnd.info info.info
am__TEXINFO_TEX_DIR = $(srcdir)
DVIS = texinfo.dvi info-stnd.dvi info.dvi
PDFS = texinfo.pdf info-stnd.pdf info.pdf
@@ -273,7 +273,7 @@
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-texinfo: texinfo.txi $(srcdir)/version.texi
+texinfo.info: texinfo.txi $(srcdir)/version.texi
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
rm -rf $$backupdir && mkdir $$backupdir && \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \