annotate src/vbuf.h @ 409:1c458f13d1d3 stable-0-6-76

fix template issue to build with gcc 11
author Carl Byington <carl@five-ten-sg.com>
date Sat, 27 Mar 2021 17:06:30 -0700
parents b65e8d0a088a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
1
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
2 #ifndef __PST_VBUF_H
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
3 #define __PST_VBUF_H
132
5e4d6faada34 fix from Fridrich Strba for parallel make
Carl Byington <carl@five-ten-sg.com>
parents: 130
diff changeset
4
5e4d6faada34 fix from Fridrich Strba for parallel make
Carl Byington <carl@five-ten-sg.com>
parents: 130
diff changeset
5 #include "common.h"
5e4d6faada34 fix from Fridrich Strba for parallel make
Carl Byington <carl@five-ten-sg.com>
parents: 130
diff changeset
6
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
7
70
b12f4e50e2e8 Patch from Joachim Metz <joachim.metz@gmail.com> for 64 bit compile.
Carl Byington <carl@five-ten-sg.com>
parents: 43
diff changeset
8 // Variable-length buffers
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
9 struct pst_varbuf {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
10 size_t dlen; //length of data stored in buffer
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
11 size_t blen; //length of buffer
70
b12f4e50e2e8 Patch from Joachim Metz <joachim.metz@gmail.com> for 64 bit compile.
Carl Byington <carl@five-ten-sg.com>
parents: 43
diff changeset
12 char *buf; //buffer
b12f4e50e2e8 Patch from Joachim Metz <joachim.metz@gmail.com> for 64 bit compile.
Carl Byington <carl@five-ten-sg.com>
parents: 43
diff changeset
13 char *b; //start of stored data
b12f4e50e2e8 Patch from Joachim Metz <joachim.metz@gmail.com> for 64 bit compile.
Carl Byington <carl@five-ten-sg.com>
parents: 43
diff changeset
14 };
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
15
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
16
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
17 typedef struct pst_varbuf pst_vbuf;
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
18
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
19 pst_vbuf *pst_vballoc(size_t len);
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
20 void pst_vbgrow(pst_vbuf *vb, size_t len); // grow buffer by len bytes, data are preserved
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
21 void pst_vbset(pst_vbuf *vb, void *data, size_t len);
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
22 void pst_vbappend(pst_vbuf *vb, void *data, size_t length);
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
23 void pst_unicode_init();
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
24 size_t pst_vb_utf16to8(pst_vbuf *dest, const char *inbuf, int iblen);
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
25 size_t pst_vb_utf8to8bit(pst_vbuf *dest, const char *inbuf, int iblen, const char* charset);
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
26 size_t pst_vb_8bit2utf8(pst_vbuf *dest, const char *inbuf, int iblen, const char* charset);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
27
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents:
diff changeset
28
182
b65e8d0a088a more cleanup on external names in the shared object file
Carl Byington <carl@five-ten-sg.com>
parents: 176
diff changeset
29 #endif