[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Sun Oct 2 20:52:01 EDT 2005)
From: |
Karl Berry |
Subject: |
texinfo update (Sun Oct 2 20:52:01 EDT 2005) |
Date: |
Sun, 02 Oct 2005 20:52:09 -0400 |
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.538
retrieving revision 1.539
diff -c -r1.538 -r1.539
*** ChangeLog 23 Sep 2005 00:05:44 -0000 1.538
--- ChangeLog 3 Oct 2005 00:41:26 -0000 1.539
***************
*** 1,3 ****
--- 1,35 ----
+ 2005-10-02 Karl Berry <address@hidden>
+
+ * util/texindex.c (maketempname): avoid race condition.
+ (concat): now take three args, so rename to concat3.
+ Debian bug 328365.
+
+ 2005-09-30 Karl Berry <address@hidden>
+
+ * configure.ac: reenable utils/defs generation, now that we have
+ the files below.
+
+ 2005-09-29 Akim Demaille <address@hidden>
+
+ * doc/texinfo.txi: Document pdftexi2dvi.
+ * doc/Makefile.am (common_texi2dvi_deps): New.
+ Handle texi2pdf and pdftexi2dvi.
+ * util/texi2dvi: Stop supporting shortened long options, as it's
+ causing troubles. Short options are here anyway.
+ (local): Provide a default implementation if not supported by the
+ shell.
+ (findprog): Use return.
+ (get_xref_files): Rename as...
+ (xref_files_get): this.
+ (xref_files_changed, xref_files_save): New.
+ (run_tex_suite): New.
+ (move_to_dest): Use `local'.
+ ($textra_cmd): Compute it in...
+ (insert_commands): here.
+
+ * tests/defs.in, tests/texi2dvi.test, tests/local.test: New.
+ * configure.ac, tests/Makefile.am: Adjust.
+
2005-09-22 Akim Demaille <address@hidden>
* util/texi2dvi ($build_dir): New.
Index: util/texindex.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texindex.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -c -r1.13 -r1.14
*** util/texindex.c 19 Aug 2005 22:23:54 -0000 1.13
--- util/texindex.c 3 Oct 2005 00:41:26 -0000 1.14
***************
*** 1,5 ****
/* texindex -- sort TeX index dribble output into an actual index.
! $Id: texindex.c,v 1.13 2005/08/19 22:23:54 karl Exp $
Copyright (C) 1987, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,5 ----
/* texindex -- sort TeX index dribble output into an actual index.
! $Id: texindex.c,v 1.14 2005/10/03 00:41:26 karl Exp $
Copyright (C) 1987, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 99,104 ****
--- 99,107 ----
/* Directory to use for temporary files. On Unix, it ends with a slash. */
char *tempdir;
+ /* Start of filename to use for temporary files. */
+ char *tempbase;
+
/* Number of last temporary file. */
int tempcount;
***************
*** 144,150 ****
void fatal (const char *format, const char *arg);
void error (const char *format, const char *arg);
void *xmalloc (), *xrealloc ();
! char *concat (char *s1, char *s2);
void flush_tempfiles (int to_count);
#define MAX_IN_CORE_SORT 500000
--- 147,153 ----
void fatal (const char *format, const char *arg);
void error (const char *format, const char *arg);
void *xmalloc (), *xrealloc ();
! static char *concat3 (const char *, const char *, const char *);
void flush_tempfiles (int to_count);
#define MAX_IN_CORE_SORT 500000
***************
*** 190,195 ****
--- 193,203 ----
decode_command (argc, argv);
+ /* XXX mkstemp not appropriate, as we need to have somewhat predictable
+ * names. But race condition was fixed, see maketempname.
+ */
+ tempbase = mktemp (concat3 ("txiXXXXXX", "", ""));
+
/* Process input files completely, one by one. */
for (i = 0; i < num_infiles; i++)
***************
*** 220,226 ****
outfile = outfiles[i];
if (!outfile)
! outfile = concat (infiles[i], "s");
need_initials = 0;
first_initial = '\0';
--- 228,234 ----
outfile = outfiles[i];
if (!outfile)
! outfile = concat3 (infiles[i], "s", "");
need_initials = 0;
first_initial = '\0';
***************
*** 318,324 ****
if (tempdir == NULL)
tempdir = DEFAULT_TMPDIR;
else
! tempdir = concat (tempdir, "/");
keep_tempfiles = 0;
--- 326,332 ----
if (tempdir == NULL)
tempdir = DEFAULT_TMPDIR;
else
! tempdir = concat3 (tempdir, "/", "");
keep_tempfiles = 0;
***************
*** 387,412 ****
usage (1);
}
! /* Return a name for temporary file COUNT. */
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);
}
--- 395,419 ----
usage (1);
}
! /* Return a name for temporary file COUNT, or NULL if failure. */
static char *
maketempname (int count)
{
char tempsuffix[10];
+ char *name;
+ int fd;
! sprintf (tempsuffix, ".%d", count);
! name = concat3 (tempdir, tempbase, tempsuffix);
! fd = open (name, O_CREAT|O_EXCL|O_WRONLY, 0666);
! if (fd == -1)
! return NULL;
! else
{
! close(fd);
! return(name);
}
}
***************
*** 934,939 ****
--- 941,948 ----
for (i = 0; i < ntemps; i++)
{
char *newtemp = maketempname (++tempcount);
+ if (!newtemp)
+ pfatal_with_name("temp file");
sort_in_core (tempfiles[i], MAX_IN_CORE_SORT, newtemp);
if (!keep_tempfiles)
unlink (tempfiles[i]);
***************
*** 1404,1409 ****
--- 1413,1420 ----
if (i + 1 == ntemps)
nf = nfiles - i * MAX_DIRECT_MERGE;
tempfiles[i] = maketempname (++tempcount);
+ if (!tempfiles[i])
+ pfatal_with_name("temp file");
value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf,
tempfiles[i]);
}
***************
*** 1615,1631 ****
}
! /* Return a newly-allocated string concatenating S1 and S2. */
! char *
! concat (char *s1, char *s2)
{
! int len1 = strlen (s1), len2 = strlen (s2);
! char *result = (char *) xmalloc (len1 + len2 + 1);
strcpy (result, s1);
strcpy (result + len1, s2);
! *(result + len1 + len2) = 0;
return result;
}
--- 1626,1643 ----
}
! /* Return a newly-allocated string concatenating S1, S2, and S3. */
! static char *
! concat3 (const char *s1, const char *s2, const char *s3)
{
! int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
! char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
strcpy (result, s1);
strcpy (result + len1, s2);
! strcpy (result + len1 + len2, s3);
! *(result + len1 + len2 + len3) = 0;
return result;
}
P ChangeLog
P util/texindex.c
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Sun Oct 2 20:52:01 EDT 2005),
Karl Berry <=