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/bin/pg_encoding/pg_encoding.c | |
parent | af74855a608da4cd7ef88ceb2241ec1c75537f39 (diff) |
OK, folks, here is the pgindent output.
Diffstat (limited to 'src/bin/pg_encoding/pg_encoding.c')
-rw-r--r-- | src/bin/pg_encoding/pg_encoding.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/bin/pg_encoding/pg_encoding.c b/src/bin/pg_encoding/pg_encoding.c index 38a87a4f398..4ab8cb02552 100644 --- a/src/bin/pg_encoding/pg_encoding.c +++ b/src/bin/pg_encoding/pg_encoding.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.1 1998/07/24 03:32:10 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.2 1998/09/01 04:33:48 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,29 +21,32 @@ static void usage(void); int main(int argc, char **argv) { - char c; - char *p; - int rtn; + char c; + char *p; + int rtn; - if (argc < 2) { - usage(); - exit(1); - } - p = argv[1]; - while((c = *p++)) { - if (c < '0' || c > '9') { - rtn = pg_char_to_encoding(argv[1]); - if (rtn >= 0) { - printf("%d\n",rtn); - } - exit(0); - } - } - printf("%s\n",pg_encoding_to_char(atoi(argv[1]))); - exit(0); + if (argc < 2) + { + usage(); + exit(1); + } + p = argv[1]; + while ((c = *p++)) + { + if (c < '0' || c > '9') + { + rtn = pg_char_to_encoding(argv[1]); + if (rtn >= 0) + printf("%d\n", rtn); + exit(0); + } + } + printf("%s\n", pg_encoding_to_char(atoi(argv[1]))); + exit(0); } -static void usage() +static void +usage() { - fprintf(stderr, "pg_encoding: encoding_name | encoding_number\n"); + fprintf(stderr, "pg_encoding: encoding_name | encoding_number\n"); } |