From d58bbd890f081115ff75d4eb4539ea45b6634f3e Mon Sep 17 00:00:00 2001 From: wlemb Date: Sat, 14 Jul 2001 13:47:49 +0000 Subject: * src/preproc/html/pre-html.cc (makeTempFiles): Activate new code, removing the old one. * src/utils/indxbib/indxbib.cc (main): Remove compiler warning. * src/libs/libgroff/tmpfile.cc (xtmpfile): Fix guard for `namep'. --- ChangeLog | 10 ++++++++++ src/libs/libgroff/tmpfile.cc | 2 +- src/preproc/html/pre-html.cc | 20 -------------------- src/utils/indxbib/indxbib.cc | 2 +- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75206d6e..ed46b896 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-07-14 Werner LEMBERG + + * src/preproc/html/pre-html.cc (makeTempFiles): Activate new code, + removing the old one. + * src/utils/indxbib/indxbib.cc (main): Remove compiler warning. + +2001-07-14 Ralph Corderoy + + * src/libs/libgroff/tmpfile.cc (xtmpfile): Fix guard for `namep'. + 2001-07-12 Ruslan Ermilov Merge -xwidth into -width. Add -xwidth functionality to -column diff --git a/src/libs/libgroff/tmpfile.cc b/src/libs/libgroff/tmpfile.cc index 06090156..27550994 100644 --- a/src/libs/libgroff/tmpfile.cc +++ b/src/libs/libgroff/tmpfile.cc @@ -183,7 +183,7 @@ FILE *xtmpfile(char **namep, #endif /* not HAVE_MKSTEMP */ if (do_unlink) add_tmp_file(templ); - if ((namep != 0) && ((*namep) != 0)) + if (namep) *namep = templ; else a_delete templ; diff --git a/src/preproc/html/pre-html.cc b/src/preproc/html/pre-html.cc index 00ccd886..b4b3ea3d 100644 --- a/src/preproc/html/pre-html.cc +++ b/src/preproc/html/pre-html.cc @@ -1365,7 +1365,6 @@ static int makeTempFiles (void) htmlFileName = "/tmp/prehtml-html"; #else -#if 0 FILE *f; f = xtmpfile(&psFileName, @@ -1384,25 +1383,6 @@ static int makeTempFiles (void) return -1; } fclose(f); -#else - int fd; - - if ((fd = mkstemp(psFileName = - xtmptemplate(PS_TEMPLATE_LONG, - PS_TEMPLATE_SHORT))) == -1) { - sys_fatal("mkstemp"); - return -1; - } - close(fd); - if ((fd = mkstemp(regionFileName = - xtmptemplate(REGION_TEMPLATE_LONG, - REGION_TEMPLATE_SHORT))) == -1) { - sys_fatal("mkstemp"); - unlink(psFileName); - return -1; - } - close(fd); -#endif #endif return 0; diff --git a/src/utils/indxbib/indxbib.cc b/src/utils/indxbib/indxbib.cc index 4b2477f7..db3e9a40 100644 --- a/src/utils/indxbib/indxbib.cc +++ b/src/utils/indxbib/indxbib.cc @@ -229,7 +229,7 @@ int main(int argc, char **argv) name_max = file_name_max("."); const char *filename = p ? p + 1 : basename; if (name_max >= 0 && - long(strlen(filename) + sizeof(INDEX_SUFFIX) - 1) > name_max) + (strlen(filename) + sizeof(INDEX_SUFFIX) - 1) > name_max) fatal("`%1.%2' is too long for a filename", filename, INDEX_SUFFIX); if (p) { p++; -- cgit v1.2.1