libisdn
strstream.h
Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  *
00005  */
00006 #ifndef _STRSTREAM_H_
00007 #define _STRSTREAM_H_
00008 
00009 struct strstream {
00010         int  size;
00011         int  offset;
00012 
00013         char *buf;
00014 };
00015 
00016 #define STRSTREAM_SIZE  6192
00017 
00018 int strstream_init(struct strstream *s, const int size);
00019 int strstream_init_static(struct strstream *s, char *buf, const int size);
00020 
00021 int strstream_printf(struct strstream *s, const char *fmt, ...);
00022 int strstream_puts(struct strstream *s, const char *str);
00023 int strstream_printhex(struct strstream *s, const char *buf, const int size);
00024 
00025 int strstream_length(struct strstream *s);
00026 int strstream_size(struct strstream *s);
00027 int strstream_left(struct strstream *s);
00028 
00029 const char *strstream_get(struct strstream *s);
00030 
00031 #endif