diff options
| author | Bruce Momjian | 1997-09-08 02:41:22 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1997-09-08 02:41:22 +0000 |
| commit | 9af06b7a48dc6a4461d9530c318050c67a0bfee5 (patch) | |
| tree | cfe9e5a0d8a5de36159d4c2f6156f00565552306 /src/bin/psql/stringutils.c | |
| parent | 7b49de83a5157c1a6e0bbadc091bd7c873d20e2c (diff) | |
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
Diffstat (limited to 'src/bin/psql/stringutils.c')
| -rw-r--r-- | src/bin/psql/stringutils.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bin/psql/stringutils.c b/src/bin/psql/stringutils.c index e140f4d82d..32dfcadfe0 100644 --- a/src/bin/psql/stringutils.c +++ b/src/bin/psql/stringutils.c @@ -30,12 +30,12 @@ /* MODIFIES the string passed in and returns the head of it */ #ifdef NOT_USED -static char * +static char * leftTrim(char *s) { - char *s2 = s; - int shift = 0; - int j = 0; + char *s2 = s; + int shift = 0; + int j = 0; while (isspace(*s)) { @@ -53,10 +53,10 @@ leftTrim(char *s) #endif -char * +char * rightTrim(char *s) { - char *sEnd; + char *sEnd; sEnd = s + strlen(s) - 1; while (sEnd >= s && isspace(*sEnd)) @@ -69,7 +69,7 @@ rightTrim(char *s) } #ifdef NOT_USED -static char * +static char * doubleTrim(char *s) { strcpy(s, leftTrim(rightTrim(s))); @@ -82,18 +82,18 @@ doubleTrim(char *s) 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 */ " ", /* string with one whitespace */ NULL_STR}; - int i = 0; + int i = 0; while (tests[i] != NULL_STR) { - char *t; + char *t; t = strdup(tests[i]); printf("leftTrim(%s) = ", t); |
