[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5581] info_add_extension return value.
From: |
Gavin D. Smith |
Subject: |
[5581] info_add_extension return value. |
Date: |
Sun, 18 May 2014 17:41:42 +0000 |
Revision: 5581
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5581
Author: gavin
Date: 2014-05-18 17:41:41 +0000 (Sun, 18 May 2014)
Log Message:
-----------
info_add_extension return value. put "" back where it was in info_suffixes
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/filesys.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-05-18 17:04:38 UTC (rev 5580)
+++ trunk/ChangeLog 2014-05-18 17:41:41 UTC (rev 5581)
@@ -13,6 +13,9 @@
* info/pseudotty.c: Don't open slave side of pseudoterminal
line. Report on progress to stderr.
+ * info/filesys.c (info_add_extension): Return null pointer properly
+ if nothing found.
+
2014-05-18 Patrice Dumas <address@hidden>
* tp/Texinfo/Convert/Converter.pm (output): warn about
Modified: trunk/info/filesys.c
===================================================================
--- trunk/info/filesys.c 2014-05-18 17:04:38 UTC (rev 5580)
+++ trunk/info/filesys.c 2014-05-18 17:41:41 UTC (rev 5581)
@@ -26,7 +26,8 @@
#include "tag.h"
/* Local to this file. */
-static char *info_file_in_path (char *filename, char *path, struct stat
*finfo);
+static char *info_file_in_path (char *filename, char *path,
+ struct stat *finfo);
static char *info_add_extension (char *dirname, char *fname,
struct stat *finfo);
@@ -48,7 +49,6 @@
} COMPRESSION_ALIST;
static char *info_suffixes[] = {
- "",
".info",
"-info",
"/index",
@@ -58,6 +58,7 @@
".in", /* for .inz, .igz etc. */
".i",
#endif
+ "",
NULL
};
@@ -225,6 +226,7 @@
pre_suffix_length += strlen (filename);
+ /* Add enough space for any file extensions at end. */
try_filename = xmalloc (pre_suffix_length + 30);
try_filename[0] = '\0';
@@ -294,6 +296,9 @@
}
}
}
+ /* Nothing was found. */
+ free (try_filename);
+ return 0;
}
/* Given a string containing units of information separated by the
@@ -364,8 +369,8 @@
/* Read the contents of PATHNAME, returning a buffer with the contents of
that file in it, and returning the size of that buffer in FILESIZE.
If the file turns out to be compressed, set IS_COMPRESSED to non-zero.
- If the file cannot be read, return a NULL pointer. Set *FINFO with
- information about file. */
+ If the file cannot be read, set filesys_error_number and return a NULL
+ pointer. Set *FINFO with information about file. */
char *
filesys_read_info_file (char *pathname, size_t *filesize,
struct stat *finfo, int *is_compressed)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5581] info_add_extension return value.,
Gavin D. Smith <=