aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/stringutils.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-07-28 07:08:15 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-07-28 07:08:15 +0000
commit7450ea6dfb7bc26ec6263082548c6f642fa9503c (patch)
tree20240d8e8d8b567f087e91ea779b2bb23735250d /src/bin/psql/stringutils.c
parent0e887c541e6a9062c0edcc07ad1015c76f369258 (diff)
downloadpostgresql-7450ea6dfb7bc26ec6263082548c6f642fa9503c.tar.gz
postgresql-7450ea6dfb7bc26ec6263082548c6f642fa9503c.zip
cosmetic changes: char* x changed to char *x
submitted by: bruce
Diffstat (limited to 'src/bin/psql/stringutils.c')
-rw-r--r--src/bin/psql/stringutils.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/bin/psql/stringutils.c b/src/bin/psql/stringutils.c
index 0a9043c6337..294ce401798 100644
--- a/src/bin/psql/stringutils.c
+++ b/src/bin/psql/stringutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.1.1.1 1996/07/09 06:22:15 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.2 1996/07/28 07:08:15 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,9 +21,9 @@
/* removes whitespaces from the left, right and both sides of a string */
/* MODIFIES the string passed in and returns the head of it */
-char* leftTrim(char* s)
+char *leftTrim(char *s)
{
- char* s2 = s;
+ char *s2 = s;
int shift=0;
int j=0;
@@ -38,9 +38,9 @@ char* leftTrim(char* s)
return s2;
}
-char* rightTrim(char* s)
+char *rightTrim(char *s)
{
- char* sEnd;
+ char *sEnd;
sEnd = s+strlen(s)-1;
while (isspace(*sEnd))
sEnd--;
@@ -51,7 +51,7 @@ char* rightTrim(char* s)
return s;
}
-char* doubleTrim(char* s)
+char *doubleTrim(char *s)
{
strcpy(s,leftTrim(rightTrim(s)));
return s;
@@ -59,10 +59,10 @@ char* doubleTrim(char* s)
/* dupstr : copies a string, while allocating space for it.
the CALLER is responsible for freeing the space
- returns NULL if the argument is NULL*/
-char* dupstr(char *s)
+ returns NULL if the argument is NULL */
+char *dupstr(char *s)
{
- char* result;
+ char *result;
if (s == NULL)
return NULL;
@@ -76,7 +76,7 @@ char* dupstr(char *s)
#ifdef STRINGUTILS_TEST
void testStringUtils()
{
- static char* tests[] = {" goodbye \n", /* space on both ends */
+ static char *tests[] = {" goodbye \n", /* space on both ends */
"hello world", /* no spaces to trim */
"", /* empty string */
"a", /* string with one char*/
@@ -86,7 +86,7 @@ void testStringUtils()
int i=0;
while (tests[i]!=NULL_STR)
{
- char* t;
+ char *t;
t = dupstr(tests[i]);
printf("leftTrim(%s) = ",t);
printf("%sEND\n", leftTrim(t));