diff options
author | Bruce Momjian | 1998-09-01 04:40:42 +0000 |
---|---|---|
committer | Bruce Momjian | 1998-09-01 04:40:42 +0000 |
commit | fa1a8d6a97068295fe30ac646aec7493a6305bc2 (patch) | |
tree | 645f7cef3c78fbab4d6d7bbc7c9a61ad2893d273 /src/interfaces/libpq/fe-print.c | |
parent | af74855a608da4cd7ef88ceb2241ec1c75537f39 (diff) |
OK, folks, here is the pgindent output.
Diffstat (limited to 'src/interfaces/libpq/fe-print.c')
-rw-r--r-- | src/interfaces/libpq/fe-print.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index 6e0a6e3ff4a..2a189f0545e 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -9,7 +9,7 @@ * didn't really belong there. * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.11 1998/09/01 03:28:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.12 1998/09/01 04:40:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -30,7 +30,7 @@ #else #include <termios.h> #endif -#endif /* WIN32 */ +#endif /* WIN32 */ #include <stdlib.h> #include <signal.h> #include <string.h> @@ -52,19 +52,16 @@ static struct winsize #endif -static void -do_field(PQprintOpt *po, PGresult *res, +static void do_field(PQprintOpt *po, PGresult *res, const int i, const int j, char *buf, const int fs_len, char **fields, const int nFields, char **fieldNames, unsigned char *fieldNotNum, int *fieldMax, const int fieldMaxLen, FILE *fout); -static char * -do_header(FILE *fout, PQprintOpt *po, const int nFields, +static char *do_header(FILE *fout, PQprintOpt *po, const int nFields, int *fieldMax, char **fieldNames, unsigned char *fieldNotNum, const int fs_len, PGresult *res); -static void -output_row(FILE *fout, PQprintOpt *po, const int nFields, char **fields, +static void output_row(FILE *fout, PQprintOpt *po, const int nFields, char **fields, unsigned char *fieldNotNum, int *fieldMax, char *border, const int row_index); static void fill(int length, int max, char filler, FILE *fp); @@ -150,7 +147,7 @@ PQprint(FILE *fout, if (fout == NULL) fout = stdout; - if (po->pager && fout == stdout + if (po->pager && fout == stdout #ifndef WIN32 && isatty(fileno(stdin)) && @@ -502,20 +499,20 @@ PQprintTuples(PGresult *res, * if this variable is not defined, the same encoding as * the backend is assumed. */ -int PQmblen(unsigned char *s) +int +PQmblen(unsigned char *s) { - char *str; - int encoding = -1; - - str = getenv("PGCLIENTENCODING"); - if (str) { - encoding = pg_char_to_encoding(str); - } - if (encoding < 0) { - encoding = MULTIBYTE; - } - return(pg_encoding_mblen(encoding, s)); + char *str; + int encoding = -1; + + str = getenv("PGCLIENTENCODING"); + if (str) + encoding = pg_char_to_encoding(str); + if (encoding < 0) + encoding = MULTIBYTE; + return (pg_encoding_mblen(encoding, s)); } + #endif static void @@ -552,11 +549,11 @@ do_field(PQprintOpt *po, PGresult *res, if (!skipit) { #ifdef MULTIBYTE - int len; + int len; - for (p = pval, o = buf; *p; - len = PQmblen(p),memcpy(o,p,len), - o+=len, p+=len) + for (p = pval, o = buf; *p; + len = PQmblen(p), memcpy(o, p, len), + o += len, p += len) #else for (p = pval, o = buf; *p; *(o++) = *(p++)) #endif |