projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(oatoi): declare arg to be const
[gnulib.git]
/
lib
/
savedir.c
diff --git
a/lib/savedir.c
b/lib/savedir.c
index
e6becc6
..
5a9c339
100644
(file)
--- a/
lib/savedir.c
+++ b/
lib/savedir.c
@@
-1,5
+1,5
@@
/* savedir.c -- save the list of files in a directory in a string
/* savedir.c -- save the list of files in a directory in a string
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright (C) 1990
, 1997, 1998
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-17,14
+17,14
@@
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#if
def
HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+#
include <config.h>
#endif
#include <sys/types.h>
#endif
#include <sys/types.h>
-#if
def
HAVE_UNISTD_H
-#include <unistd.h>
+#if HAVE_UNISTD_H
+#
include <unistd.h>
#endif
#if HAVE_DIRENT_H
#endif
#if HAVE_DIRENT_H
@@
-46,23
+46,27
@@
#ifdef CLOSEDIR_VOID
/* Fake a return value. */
#ifdef CLOSEDIR_VOID
/* Fake a return value. */
-#define CLOSEDIR(d) (closedir (d), 0)
+#
define CLOSEDIR(d) (closedir (d), 0)
#else
#else
-#define CLOSEDIR(d) closedir (d)
+#
define CLOSEDIR(d) closedir (d)
#endif
#ifdef STDC_HEADERS
#endif
#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
+#
include <stdlib.h>
+#
include <string.h>
#else
char *malloc ();
char *realloc ();
#endif
#ifndef NULL
#else
char *malloc ();
char *realloc ();
#endif
#ifndef NULL
-#define NULL 0
+#
define NULL 0
#endif
#endif
+#ifndef stpcpy
char *stpcpy ();
char *stpcpy ();
+#endif
+
+#include "savedir.h"
/* Return a freshly allocated string containing the filenames
in directory DIR, separated by '\0' characters;
/* Return a freshly allocated string containing the filenames
in directory DIR, separated by '\0' characters;
@@
-73,8
+77,8
@@
char *stpcpy ();
char *
savedir (dir, name_size)
char *
savedir (dir, name_size)
- char *dir;
- unsigned name_size;
+ c
onst c
har *dir;
+ unsigned
int
name_size;
{
DIR *dirp;
struct dirent *dp;
{
DIR *dirp;
struct dirent *dp;