aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/stringutils.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-11-04 21:56:02 +0000
committerBruce Momjian <bruce@momjian.us>1999-11-04 21:56:02 +0000
commita45195a191eec367a4f305bb71ab541d17a3b9f9 (patch)
tree99b815a93f6175b0db76c2da0da39e95a0ee6b8d /src/bin/psql/stringutils.h
parent2ea3b6d63addeaf07267e2390597645cbf013c36 (diff)
downloadpostgresql-a45195a191eec367a4f305bb71ab541d17a3b9f9.tar.gz
postgresql-a45195a191eec367a4f305bb71ab541d17a3b9f9.zip
Major psql overhaul by Peter Eisentraut.
Diffstat (limited to 'src/bin/psql/stringutils.h')
-rw-r--r--src/bin/psql/stringutils.h49
1 files changed, 9 insertions, 40 deletions
diff --git a/src/bin/psql/stringutils.h b/src/bin/psql/stringutils.h
index 84c8c77777f..f505a7b2c14 100644
--- a/src/bin/psql/stringutils.h
+++ b/src/bin/psql/stringutils.h
@@ -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 */