view src/vbuf.h @ 388:292ad0f71fd4

Add operator and quotes to the AX_PYTHON_DEVEL parameter The operator is required and the quotes are needed to protect PYTHON_VERSION. See-also: https://www.gnu.org/software/autoconf-archive/ax_python_devel.html Fixes: checking whether to build the libpst python interface... yes checking for python build information... checking for python3.7... python3.7 checking for main in -lpython3.7... no checking for main in -lpython3.7m... yes results of the Python check: Binary: python3.7 Library: python3.7m Include Dir: /usr/include/python3.7m checking for python3.7... /usr/bin/python3.7 checking for a version of Python >= '2.1.0'... yes checking for a version of Python 3.7... File "<string>", line 1 import sys; ver = sys.version.split ()[0]; print (ver 3.7) ^ SyntaxError: invalid syntax no configure: error: this package requires Python 3.7. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See ``configure --help'' for reference.
author Paul Wise <pabs3@bonedaddy.net>
date Sat, 21 Dec 2019 21:25:45 +0800
parents b65e8d0a088a
children
line wrap: on
line source


#ifndef __PST_VBUF_H
#define __PST_VBUF_H

#include "common.h"


// Variable-length buffers
struct pst_varbuf {
	size_t dlen; 	//length of data stored in buffer
	size_t blen; 	//length of buffer
	char *buf; 	    //buffer
	char *b;	    //start of stored data
};


typedef struct pst_varbuf pst_vbuf;

pst_vbuf  *pst_vballoc(size_t len);
void       pst_vbgrow(pst_vbuf *vb, size_t len);    // grow buffer by len bytes, data are preserved
void       pst_vbset(pst_vbuf *vb, void *data, size_t len);
void       pst_vbappend(pst_vbuf *vb, void *data, size_t length);
void       pst_unicode_init();
size_t     pst_vb_utf16to8(pst_vbuf *dest, const char *inbuf, int iblen);
size_t     pst_vb_utf8to8bit(pst_vbuf *dest, const char *inbuf, int iblen, const char* charset);
size_t     pst_vb_8bit2utf8(pst_vbuf *dest, const char *inbuf, int iblen, const char* charset);


#endif