Server 0.0.1
HTTP/REST server implementation

src/cbuf/get_data.c

Go to the documentation of this file.
00001 
00023 #include <sys/types.h>
00024 #include <string.h>
00025 
00026 #include "cbuf.h"
00027 
00028 char *
00029 cbufGetData(Cbuf this, size_t n)
00030 {
00031         char * ret = cbufGetRead(this);
00032 
00033         if (n > this->bused) {
00034                 return (char *)-1;
00035         }
00036 
00037         cbufIncRead(this, n);
00038         return ret;
00039 }
00040 
00041 // vim: set ts=4 sw=4:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines