summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h')
-rw-r--r--gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h79
1 files changed, 36 insertions, 43 deletions
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h
index cf0a4bf3b16..7a6d79ffd00 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h
@@ -1,14 +1,14 @@
/* The Stream class definition -- libwww
STREAM OBJECT DEFINITION
-
+
A Stream object is something which accepts a stream of text.
-
- The creation methods will vary on the type of Stream Object. All creation methods
- return a pointer to the stream type below.
-
- As you can see, but the methods used to write to the stream and close it are pointed to
- be the object itself.
-
+
+ The creation methods will vary on the type of Stream Object. All creation
+ methods return a pointer to the stream type below.
+
+ As you can see, but the methods used to write to the stream and close it are
+ pointed to be the object itself.
+
*/
#ifndef HTSTREAM_H
#define HTSTREAM_H
@@ -16,43 +16,33 @@
#ifndef HTUTILS_H
#include <HTUtils.h>
#endif
-
-typedef struct _HTStream HTStream;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ typedef struct _HTStream HTStream;
/*
- These are the common methods of all streams. They should be self-explanatory, except
- for end_document which must be called before free. It should be merged with free in
- fact: it should be dummy for new streams.
-
- The put_block method was write, but this upset systems which had macros for write().
-
+ These are the common methods of all streams. They should be
+ self-explanatory.
+
*/
-typedef struct _HTStreamClass {
-
- char* name; /* Just for diagnostics */
-
- void (*_free) PARAMS((
- HTStream* me));
-
- void (*_abort) PARAMS((
- HTStream* me,
- HTError e));
-
- void (*put_character) PARAMS((
- HTStream* me,
- char ch));
-
- void (*put_string) PARAMS((
- HTStream* me,
- CONST char * str));
-
- void (*put_block) PARAMS((
- HTStream* me,
- CONST char * str,
- int len));
-
-}HTStreamClass;
+ typedef struct _HTStreamClass {
+
+ const char *name; /* Just for diagnostics */
+
+ void (*_free) (HTStream *me);
+
+ void (*_abort) (HTStream *me, HTError e);
+
+ void (*put_character) (HTStream *me, char ch);
+
+ void (*put_string) (HTStream *me, const char *str);
+
+ void (*put_block) (HTStream *me, const char *str, int len);
+
+ } HTStreamClass;
/*
@@ -63,6 +53,9 @@ typedef struct _HTStreamClass {
example from the network.
*/
-extern HTStream * HTErrorStream NOPARAMS;
+ extern HTStream *HTErrorStream(void);
-#endif /* HTSTREAM_H */
+#ifdef __cplusplus
+}
+#endif
+#endif /* HTSTREAM_H */