aboutsummaryrefslogtreecommitdiff
path: root/stdio/stdio.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-05-07 14:49:12 +0000
committerRoland McGrath <roland@gnu.org>1996-05-07 14:49:12 +0000
commit28ca9458282823a172f24d42585ff0c45b1c8d19 (patch)
treed38b4d1b1829b23beea46c9074a08a805fe3bc15 /stdio/stdio.h
parentcee8df033b579c23d90db02814fea763d282045f (diff)
downloadglibc-28ca9458282823a172f24d42585ff0c45b1c8d19.zip
glibc-28ca9458282823a172f24d42585ff0c45b1c8d19.tar.gz
glibc-28ca9458282823a172f24d42585ff0c45b1c8d19.tar.bz2
Mon May 6 09:51:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdio/linewrap.c: New file. * stdio/Makefile (routines): Add linewrap. * stdio/stdio.h [__USE_GNU]: Declare line_wrap_stream, line_unwrap_stream.
Diffstat (limited to 'stdio/stdio.h')
-rw-r--r--stdio/stdio.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/stdio/stdio.h b/stdio/stdio.h
index 349b9c3..efaf2b9 100644
--- a/stdio/stdio.h
+++ b/stdio/stdio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -353,6 +353,22 @@ extern FILE *fmemopen __P ((__ptr_t __s, size_t __len, __const char *__modes));
necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
and the number of characters written on fflush or fclose. */
extern FILE *open_memstream __P ((char **__bufloc, size_t *__sizeloc));
+
+
+/* Modify STREAM so that it prefixes lines written on it with *LMARGIN
+ spaces and limits them to *RMARGIN columns total. If WRAP is not null,
+ words that extend past *RMARGIN are wrapped by replacing the whitespace
+ before them with a newline and *WRAP spaces. Otherwise, chars beyond
+ *RMARGIN are simply dropped until a newline. Returns STREAM after
+ modifying it, or NULL if there was an error. The pointers passed are
+ stored in the stream and so must remain valid until `line_unwrap_stream'
+ is called; the values pointed to can be changed between stdio calls. */
+extern FILE *line_wrap_stream __P ((FILE *__stream,
+ size_t *__lmargin, size_t *__rmargin,
+ size_t *__wrap));
+
+/* Remove the hooks placed in STREAM by `line_wrap_stream'. */
+extern void line_unwrap_stream __P ((FILE *__stream));
#endif