mirror of https://github.com/postgres/postgres
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
/*-------------------------------------------------------------------------
|
|
*
|
|
* stringinfo.h--
|
|
* Declarations/definitons for "string" functions.
|
|
*
|
|
*
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: stringinfo.h,v 1.6 1998/03/20 04:12:21 momjian Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef STRINGINFO_H
|
|
#define STRINGINFO_H
|
|
|
|
|
|
/*-------------------------
|
|
* StringInfoData holds information about a string.
|
|
* 'data' is the string.
|
|
* 'len' is the current string length (as returned by 'strlen')
|
|
* 'maxlen' is the size in bytes of 'data', i.e. the maximum string
|
|
* size (including the terminating '\0' char) that we can
|
|
* currently store in 'data' without having to reallocate
|
|
* more space.
|
|
*/
|
|
typedef struct StringInfoData
|
|
{
|
|
char *data;
|
|
int maxlen;
|
|
int len;
|
|
} StringInfoData;
|
|
|
|
typedef StringInfoData *StringInfo;
|
|
|
|
/*------------------------
|
|
* makeStringInfo
|
|
* create a 'StringInfoData' & return a pointer to it.
|
|
*/
|
|
extern StringInfo makeStringInfo(void);
|
|
|
|
/*------------------------
|
|
* appendStringInfo
|
|
* similar to 'strcat' but reallocates more space if necessary...
|
|
*/
|
|
extern void appendStringInfo(StringInfo str, char *buffer);
|
|
|
|
#endif /* STRINGINFO_H */
|
|
|