Deleted Added
full compact
savedir.c (56915) savedir.c (126432)
1/* savedir.c -- save the list of files in a directory in a string
2 Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8

--- 75 unchanged lines hidden (view full) ---

84 char *namep;
85
86 dirp = opendir (dir);
87 if (dirp == NULL)
88 return NULL;
89
90 /* Be sure name_size is at least `1' so there's room for
91 the final NUL byte. */
1/* savedir.c -- save the list of files in a directory in a string
2 Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8

--- 75 unchanged lines hidden (view full) ---

84 char *namep;
85
86 dirp = opendir (dir);
87 if (dirp == NULL)
88 return NULL;
89
90 /* Be sure name_size is at least `1' so there's room for
91 the final NUL byte. */
92 name_size += !name_size;
92 if (name_size <= 0)
93 name_size = 1;
93
94 name_space = (char *) malloc (name_size);
95 if (name_space == NULL)
96 {
97 closedir (dirp);
98 return NULL;
99 }
100 namep = name_space;

--- 37 unchanged lines hidden ---
94
95 name_space = (char *) malloc (name_size);
96 if (name_space == NULL)
97 {
98 closedir (dirp);
99 return NULL;
100 }
101 namep = name_space;

--- 37 unchanged lines hidden ---