1
1

* ext.c (regex_command): Don't check same condition twice.

(exec_extension): Comment out useless loop.
Этот коммит содержится в:
Andrew V. Samoilov 2002-07-31 00:28:07 +00:00
родитель 10044de5b9
Коммит 8025b4bce4
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -2,6 +2,9 @@
* man2hlp.c (main): Don't use freed structure member.
* ext.c (regex_command): Don't check same condition twice.
(exec_extension): Comment out useless loop.
2002-07-30 Pavel Roskin <proski@gnu.org>
* man2hlp.c (main): Use only stream I/O. Fix checks for error

Просмотреть файл

@ -276,9 +276,9 @@ exec_extension (const char *filename, const char *data, char **drops, int *move_
char *q;
*p = 0;
p = buffer;
while (*p == ' ' && *p == '\t')
p++;
/* while (*p == ' ' && *p == '\t')
* p++;
*/
/* Search last non-space character. Start search at the end in order
not to short filenames containing spaces. */
q = p + strlen (p) - 1;
@ -472,9 +472,9 @@ file as an example of how to write it.\n\
found = 1;
} else if (!strncmp (p, "shell/", 6)) {
p += 6;
if (*p == '.' && file_len >= (q - p)) {
if (file_len >= (q - p) &&
!strncmp (p, filename + file_len - (q - p), q - p))
if (*p == '.' && file_len >= (q - p)) {
if (!strncmp (p, filename + file_len - (q - p),
q - p))
found = 1;
} else {
if (q - p == file_len && !strncmp (p, filename, q - p))