summaryrefslogtreecommitdiff
path: root/manual/memory.texi
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-08-09 02:46:09 +0000
committerUlrich Drepper <drepper@redhat.com>1996-08-09 02:46:09 +0000
commita5113b141cd85a98b4711607c430e6e01775bd9a (patch)
tree5e345c0560b177c68320fa8a467215352996bb35 /manual/memory.texi
parent233963756b2ef272f8876afec2a2bb629b425e0c (diff)
Thu Aug 8 16:17:38 1996 Ulrich Drepper <drepper@cygnus.com> * pwd/getpwent.c: Define BUFLEN from NSS_BUFLEN_PASSWD. * pwd/getpwent_r.c: Likewise. * pwd/getpwnam.c: Likewise. * pwd/getpwnam_r.c: Likewise. * pwd/getpwuid.c: Likewise. * pwd/getpwuid_r.c: Likewise. * grp/getgrent.c: Define BUFLEN from NSS_BUFLEN_GROUP. * grp/getgrent_r.c: Likewise. * grp/getgrgid.c: Likewise. * grp/getgrgid_r.c: Likewise. * grp/getgrnam.c: Likewise. * pwd/fgetpwent_r.c: New file. Reentrant version of fgetpwent. * pwd/fgetpwent.c: Rewrite to use fgetpwent_r. * pwd/Makefile (routines): Add fgetpwent_r. * pwd/pwd.h: Add prototypes for __fgetpwent_r and fgetpwent_r. * grp/fgetgrent_r.c: New file. Reentrant version of fgetgrent. * grp/fgetgrent.c: Rewrite to use fgetgrent_r. * grp/Makefile (routines): Add fgetgrent_r. * grp/grp.h: Add prototypes for __fgetgrent_r and fgetgrent_r. Implement shadow password lookup functions. This is no complete shadow password suite. * shadow/Makefile: New file. * shadow/fgetspent.c: New file. * shadow/fgetspent_r.c: New file. * shadow/getspent.c: New file. * shadow/getspent_r.c: New file. * shadow/getspnam.c: New file. * shadow/getspnam_r.c: New file. * shadow/putspent.c: New file. * shadow/sgetspent.c: New file. * shadow/sgetspent_r.c: New file. * shadow/shadow.h: New file. * shadow/spwd-lookup.c: New file. * shadow/nss_files/files-spwd.c: New file. Thu Aug 8 13:33:45 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/ftime.c: New file. Available system call is only a stub. Reported by Matthias Urlichs. * Makeconfig [!default_cflags]: Change default value from `-g' to `-g -O'. * configure.in: Recognize i686. * sysdeps/i386/i686/Implies: Default on i586 optimized code. Thu Aug 8 12:40:20 1996 Matthias Urlichs <smurf@smurf.noris.de> * Makeconfig [$(build-omitfp) == yes]: Add to CFLAGS-.so value of CFLAGS-.o, not CFLAGS-o. * sysdeps/unix/sysv/linux/init-first.c (init): Add volatile pointer to ourself. Otherwise `gcc -O3' optimized init away. sure that all tables in binary file are word-aligned.
Diffstat (limited to 'manual/memory.texi')
-rw-r--r--manual/memory.texi19
1 files changed, 7 insertions, 12 deletions
diff --git a/manual/memory.texi b/manual/memory.texi
index de543ec684..343da0bb7e 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -756,7 +756,7 @@ the padding needed to start each object on a suitable boundary.
* Obstacks Data Alignment:: Controlling alignment of objects in obstacks.
* Obstack Chunks:: How obstacks obtain and release chunks;
efficiency considerations.
-* Summary of Obstacks::
+* Summary of Obstacks::
@end menu
@node Creating Obstacks
@@ -1182,7 +1182,7 @@ When you check for space using @code{obstack_room} and there is not
enough room for what you want to add, the fast growth functions
are not safe. In this case, simply use the corresponding ordinary
growth function instead. Very soon this will copy the object to a
-new chunk; then there will be lots of room available again.
+new chunk; then there will be lots of room available again.
So, each time you use an ordinary growth function, check afterward for
sufficient space using @code{obstack_room}. Once the object is copied
@@ -1206,7 +1206,7 @@ add_string (struct obstack *obstack, const char *ptr, int len)
obstack_1grow (obstack, *ptr++);
len--;
@}
- else
+ else
@{
if (room > len)
room = len;
@@ -1494,8 +1494,7 @@ int
open2 (char *str1, char *str2, int flags, int mode)
@{
char *name = (char *) alloca (strlen (str1) + strlen (str2) + 1);
- strcpy (name, str1);
- strcat (name, str2);
+ stpcpy (stpcpy (name, str1), str2);
return open (name, flags, mode);
@}
@end smallexample
@@ -1512,8 +1511,7 @@ open2 (char *str1, char *str2, int flags, int mode)
int desc;
if (name == 0)
fatal ("virtual memory exceeded");
- strcpy (name, str1);
- strcat (name, str2);
+ stpcpy (stpcpy (name, str1), str2);
desc = open (name, flags, mode);
free (name);
return desc;
@@ -1558,8 +1556,7 @@ int
open2 (char *str1, char *str2, int flags, int mode)
@{
char *name = (char *) alloca (strlen (str1) + strlen (str2) + 1);
- strcpy (name, str1);
- strcat (name, str2);
+ stpcpy (stpcpy (name, str1), str2);
return open_or_report_error (name, flags, mode);
@}
@end smallexample
@@ -1606,8 +1603,7 @@ variable size. Here is how @code{open2} would look then:
int open2 (char *str1, char *str2, int flags, int mode)
@{
char name[strlen (str1) + strlen (str2) + 1];
- strcpy (name, str1);
- strcat (name, str2);
+ stpcpy (stpcpy (name, str1), str2);
return open (name, flags, mode);
@}
@end smallexample
@@ -1748,4 +1744,3 @@ Normally it ought to display the string for the user to read.
The warnings come when memory becomes 75% full, when it becomes 85%
full, and when it becomes 95% full. Above 95% you get another warning
each time memory usage increases.
-