File: pbuffer.h

package info (click to toggle)
libhtml-template-pro-perl 0.9524-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,512 kB
  • sloc: ansic: 1,841; perl: 1,474; yacc: 404; pascal: 118; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 798 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _PBUFFER_H
#define _PBUFFER_H	1

#include<stdlib.h>
#include<pabidecl.h>
#include "pstring.h"

typedef struct pbuffer {
  size_t bufsize;
  char*  buffer;
} pbuffer;

#define PBUFFER_MULTIPLICATOR 2

TMPLPRO_LOCAL size_t pbuffer_size(const pbuffer*);
TMPLPRO_LOCAL void   pbuffer_preinit(pbuffer* pBuffer);
TMPLPRO_LOCAL char*  pbuffer_init(pbuffer*);
TMPLPRO_LOCAL char*  pbuffer_init_as(pbuffer* pBuffer,size_t size);
TMPLPRO_LOCAL char*  pbuffer_string(const pbuffer*);
TMPLPRO_LOCAL char*  pbuffer_resize(pbuffer*, size_t size);
TMPLPRO_LOCAL void   pbuffer_free(pbuffer*);
TMPLPRO_LOCAL void pbuffer_fill_from_pstring(pbuffer* pBuffer, PSTRING pstr);
TMPLPRO_LOCAL void pbuffer_swap(pbuffer* buf1, pbuffer* buf2);

#endif /* pbuffer.h */

/*
 * Local Variables:
 * mode: c
 * End:
 */