about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTChunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTChunk.h')
-rw-r--r--WWW/Library/Implementation/HTChunk.h48
1 files changed, 27 insertions, 21 deletions
diff --git a/WWW/Library/Implementation/HTChunk.h b/WWW/Library/Implementation/HTChunk.h
index ba28c422..8a5ade18 100644
--- a/WWW/Library/Implementation/HTChunk.h
+++ b/WWW/Library/Implementation/HTChunk.h
@@ -16,18 +16,21 @@
 
 #include <UCMap.h>
 
-typedef struct {
-    int size;			/* In bytes                     */
-    int growby;			/* Allocation unit in bytes     */
-    int allocated;		/* Current size of *data        */
-    char *data;			/* Pointer to malloc'd area or 0 */
-    int failok;			/* allowed to fail without exiting program? */
-} HTChunk;
+#ifdef __cplusplus
+extern "C" {
+#endif
+    typedef struct {
+	int size;		/* In bytes                     */
+	int growby;		/* Allocation unit in bytes     */
+	int allocated;		/* Current size of *data        */
+	char *data;		/* Pointer to malloc'd area or 0 */
+	int failok;		/* allowed to fail without exiting program? */
+    } HTChunk;
 
 /*
  * Initialize a chunk's allocation data and allocation-increment.
  */
-extern void HTChunkInit(HTChunk *ch, int grow);
+    extern void HTChunkInit(HTChunk *ch, int grow);
 
 /*
  *
@@ -45,7 +48,7 @@ extern void HTChunkInit(HTChunk *ch, int grow);
  *
  */
 
-extern HTChunk *HTChunkCreate(int growby);
+    extern HTChunk *HTChunkCreate(int growby);
 
 /*
  *  Create a chunk for which an allocation error is not a fatal application
@@ -54,13 +57,13 @@ extern HTChunk *HTChunkCreate(int growby);
  *  are ok each time after data have been appended.
  *  The create call may also fail and will reurn NULL in that case. - kw
  */
-extern HTChunk *HTChunkCreateMayFail(int growby, int failok);
+    extern HTChunk *HTChunkCreateMayFail(int growby, int failok);
 
 /*
  *  Like HTChunkCreate but with initial allocation - kw
  *
  */
-extern HTChunk *HTChunkCreate2(int growby, size_t needed);
+    extern HTChunk *HTChunkCreate2(int growby, size_t needed);
 
 /*
  *
@@ -76,7 +79,7 @@ extern HTChunk *HTChunkCreate2(int growby, size_t needed);
  *
  */
 
-extern void HTChunkFree(HTChunk *ch);
+    extern void HTChunkFree(HTChunk *ch);
 
 /*
  *
@@ -92,7 +95,7 @@ extern void HTChunkFree(HTChunk *ch);
  *
  */
 
-extern void HTChunkClear(HTChunk *ch);
+    extern void HTChunkClear(HTChunk *ch);
 
 /*
  *
@@ -110,7 +113,7 @@ extern void HTChunkClear(HTChunk *ch);
  *
  */
 
-extern BOOL HTChunkRealloc(HTChunk *ch, int growby);
+    extern BOOL HTChunkRealloc(HTChunk *ch, int growby);
 
 /*
  *
@@ -128,7 +131,7 @@ extern BOOL HTChunkRealloc(HTChunk *ch, int growby);
  *
  */
 
-extern void HTChunkEnsure(HTChunk *ch, int s);
+    extern void HTChunkEnsure(HTChunk *ch, int s);
 
 /*
  *
@@ -145,11 +148,11 @@ extern void HTChunkEnsure(HTChunk *ch, int s);
  *   *ch		Is one character bigger
  *
  */
-extern void HTChunkPutc(HTChunk *ch, char c);
+    extern void HTChunkPutc(HTChunk *ch, char c);
 
-extern void HTChunkPutb(HTChunk *ch, const char *b, int l);
+    extern void HTChunkPutb(HTChunk *ch, const char *b, int l);
 
-extern void HTChunkPutUtf8Char(HTChunk *ch, UCode_t code);
+    extern void HTChunkPutUtf8Char(HTChunk *ch, UCode_t code);
 
 /*
  * Append a string to a  chunk
@@ -166,7 +169,7 @@ extern void HTChunkPutUtf8Char(HTChunk *ch, UCode_t code);
  *
  */
 
-extern void HTChunkPuts(HTChunk *ch, const char *str);
+    extern void HTChunkPuts(HTChunk *ch, const char *str);
 
 /*
  *
@@ -186,6 +189,9 @@ extern void HTChunkPuts(HTChunk *ch, const char *str);
  *
  */
 
-extern void HTChunkTerminate(HTChunk *ch);
+    extern void HTChunkTerminate(HTChunk *ch);
 
-#endif /* HTCHUNK_H */
+#ifdef __cplusplus
+}
+#endif
+#endif				/* HTCHUNK_H */