aboutsummaryrefslogtreecommitdiff
path: root/manual/filesys.texi
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-03-10 20:18:07 +0000
committerAndreas Jaeger <aj@suse.de>2000-03-10 20:18:07 +0000
commitd1d62b539d3332d2cd23fa9b56d999fa2bc5ebfc (patch)
tree86258fe58d0c90b9d3d8aecec2a1d3cc18a04c85 /manual/filesys.texi
parent0aa9fad6d0758da9d1dfb1b77ddfcf1ab686f88d (diff)
downloadglibc-d1d62b539d3332d2cd23fa9b56d999fa2bc5ebfc.zip
glibc-d1d62b539d3332d2cd23fa9b56d999fa2bc5ebfc.tar.gz
glibc-d1d62b539d3332d2cd23fa9b56d999fa2bc5ebfc.tar.bz2
Update.
* manual/filesys.texi (Working Directory): Fix last patch. Patch by Martin Buchholz <martin@xemacs.org>. 2000-03-10 Andreas Jaeger <aj@suse.de>
Diffstat (limited to 'manual/filesys.texi')
-rw-r--r--manual/filesys.texi11
1 files changed, 6 insertions, 5 deletions
diff --git a/manual/filesys.texi b/manual/filesys.texi
index e2c9ffb..0f27cfc 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -91,17 +91,18 @@ using only the standard behavior of @code{getcwd}:
@smallexample
char *
-gnu_getcwd (size_t size)
+gnu_getcwd ()
@{
+ size_t size = 100;
+
while (1)
@{
char *buffer = (char *) xmalloc (size);
- char *value = getcwd (buffer, size);
- if (value == buffer)
- return value;
+ if (getcwd (buffer, size) == buffer)
+ return buffer;
free (buffer);
if (errno != ERANGE)
- return value;
+ return 0;
size *= 2;
@}
@}