1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Major psql overhaul by Peter Eisentraut.

This commit is contained in:
Bruce Momjian
1999-11-04 21:56:02 +00:00
parent 2ea3b6d63a
commit a45195a191
30 changed files with 7026 additions and 152 deletions

View File

@ -1,45 +1,14 @@
/*-------------------------------------------------------------------------
*
* stringutils.h
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: stringutils.h,v 1.8 1999/02/13 23:20:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef STRINGUTILS_H
#define STRINGUTILS_H
/* use this for memory checking of alloc and free using Tcl's memory check
package*/
#ifdef TCL_MEM_DEBUG
#include <tcl.h>
#define malloc(x) ckalloc(x)
#define free(x) ckfree(x)
#define realloc(x,y) ckrealloc(x,y)
#endif
/* string fiddling utilties */
/* all routines assume null-terminated strings! as arguments */
/* removes whitespaces from the left, right and both sides of a string */
/* MODIFIES the string passed in and returns the head of it */
extern char *rightTrim(char *s);
#ifdef STRINGUTILS_TEST
extern void testStringUtils();
#endif
#ifndef NULL_STR
#define NULL_STR (char*)0
#endif
#ifndef NULL
#define NULL 0
#endif
/* The cooler version of strtok() which knows about quotes and doesn't
* overwrite your input */
extern char *
strtokx(const char *s,
const char *delim,
const char *quote,
char escape,
char * was_quoted,
unsigned int * token_pos);
#endif /* STRINGUTILS_H */