diff options
Diffstat (limited to 'src/bin/psql')
| -rw-r--r-- | src/bin/psql/command.c | 4 | ||||
| -rw-r--r-- | src/bin/psql/command.h | 15 | ||||
| -rw-r--r-- | src/bin/psql/common.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/copy.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/describe.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/help.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/input.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/large_obj.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/mainloop.c | 4 | ||||
| -rw-r--r-- | src/bin/psql/mainloop.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/mbprint.c | 3 | ||||
| -rw-r--r-- | src/bin/psql/mbprint.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/print.h | 13 | ||||
| -rw-r--r-- | src/bin/psql/prompt.h | 17 | ||||
| -rw-r--r-- | src/bin/psql/settings.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/startup.c | 13 | ||||
| -rw-r--r-- | src/bin/psql/stringutils.h | 3 | ||||
| -rw-r--r-- | src/bin/psql/tab-complete.c | 3 | ||||
| -rw-r--r-- | src/bin/psql/tab-complete.h | 3 |
19 files changed, 60 insertions, 45 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 004b8bacaf..72e64a8900 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.61 2001/10/25 05:49:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.62 2001/10/28 06:25:58 momjian Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -56,7 +56,7 @@ static backslashResult exec_command(const char *cmd, enum option_type { - OT_NORMAL, OT_SQLID, OT_FILEPIPE + OT_NORMAL, OT_SQLID, OT_FILEPIPE }; static char *scan_option(char **string, enum option_type type, char *quote, bool semicolon); static char *unescape(const unsigned char *source, size_t len); diff --git a/src/bin/psql/command.h b/src/bin/psql/command.h index 8141201eea..5064bf505f 100644 --- a/src/bin/psql/command.h +++ b/src/bin/psql/command.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/command.h,v 1.11 2001/10/25 05:49:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/command.h,v 1.12 2001/10/28 06:25:58 momjian Exp $ */ #ifndef COMMAND_H #define COMMAND_H @@ -16,12 +16,12 @@ typedef enum _backslashResult { - CMD_UNKNOWN = 0,/* not done parsing yet (internal only) */ - CMD_SEND, /* query complete; send off */ - CMD_SKIP_LINE, /* keep building query */ - CMD_TERMINATE, /* quit program */ - CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */ - CMD_ERROR /* the execution of the backslash command + CMD_UNKNOWN = 0, /* not done parsing yet (internal only) */ + CMD_SEND, /* query complete; send off */ + CMD_SKIP_LINE, /* keep building query */ + CMD_TERMINATE, /* quit program */ + CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */ + CMD_ERROR /* the execution of the backslash command * resulted in an error */ } backslashResult; @@ -40,4 +40,5 @@ bool do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet); + #endif /* COMMAND_H */ diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h index 617e4d5a84..bdaa2ec98e 100644 --- a/src/bin/psql/common.h +++ b/src/bin/psql/common.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.15 2001/10/25 05:49:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.16 2001/10/28 06:25:58 momjian Exp $ */ #ifndef COMMON_H #define COMMON_H @@ -36,4 +36,5 @@ extern void handle_sigint(SIGNAL_ARGS); extern PGresult *PSQLexec(const char *query); extern bool SendQuery(const char *query); + #endif /* COMMON_H */ diff --git a/src/bin/psql/copy.h b/src/bin/psql/copy.h index 3bda9913f3..c22146707a 100644 --- a/src/bin/psql/copy.h +++ b/src/bin/psql/copy.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/copy.h,v 1.10 2001/10/25 05:49:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/copy.h,v 1.11 2001/10/28 06:25:58 momjian Exp $ */ #ifndef COPY_H #define COPY_H @@ -19,4 +19,5 @@ bool do_copy(const char *args); bool handleCopyOut(PGconn *conn, FILE *copystream); bool handleCopyIn(PGconn *conn, FILE *copystream, const char *prompt); + #endif diff --git a/src/bin/psql/describe.h b/src/bin/psql/describe.h index 2fc05f9d32..d79bf3988b 100644 --- a/src/bin/psql/describe.h +++ b/src/bin/psql/describe.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/describe.h,v 1.11 2001/10/25 05:49:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/describe.h,v 1.12 2001/10/28 06:25:58 momjian Exp $ */ #ifndef DESCRIBE_H #define DESCRIBE_H @@ -39,4 +39,5 @@ bool listAllDbs(bool desc); /* \dt, \di, \ds, \dS, etc. */ bool listTables(const char *infotype, const char *name, bool desc); + #endif /* DESCRIBE_H */ diff --git a/src/bin/psql/help.h b/src/bin/psql/help.h index 36cf326a01..16d09480bf 100644 --- a/src/bin/psql/help.h +++ b/src/bin/psql/help.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/help.h,v 1.7 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/help.h,v 1.8 2001/10/28 06:25:58 momjian Exp $ */ #ifndef HELP_H #define HELP_H @@ -15,4 +15,5 @@ void slashUsage(void); void helpSQL(const char *topic); void print_copyright(void); + #endif diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h index 86caad4f0e..db8af0de13 100644 --- a/src/bin/psql/input.h +++ b/src/bin/psql/input.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.13 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.14 2001/10/28 06:25:58 momjian Exp $ */ #ifndef INPUT_H #define INPUT_H @@ -39,4 +39,5 @@ char *gets_fromFile(FILE *source); void initializeInput(int flags); bool saveHistory(char *fname); + #endif /* INPUT_H */ diff --git a/src/bin/psql/large_obj.h b/src/bin/psql/large_obj.h index 85e708b1a4..2af4bcbf9f 100644 --- a/src/bin/psql/large_obj.h +++ b/src/bin/psql/large_obj.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/large_obj.h,v 1.9 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/large_obj.h,v 1.10 2001/10/28 06:25:58 momjian Exp $ */ #ifndef LARGE_OBJ_H #define LARGE_OBJ_H @@ -12,4 +12,5 @@ bool do_lo_export(const char *loid_arg, const char *filename_arg); bool do_lo_import(const char *filename_arg, const char *comment_arg); bool do_lo_unlink(const char *loid_arg); bool do_lo_list(void); + #endif /* LARGE_OBJ_H */ diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index f728e4df1f..3de66712b5 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.41 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.42 2001/10/28 06:25:58 momjian Exp $ */ #include "postgres_fe.h" #include "mainloop.h" @@ -393,7 +393,7 @@ MainLoop(FILE *source) line = new; len = strlen(new); - goto rescan; /* reparse the just substituted */ + goto rescan; /* reparse the just substituted */ } else { diff --git a/src/bin/psql/mainloop.h b/src/bin/psql/mainloop.h index 55e0a65fb1..eadccc1363 100644 --- a/src/bin/psql/mainloop.h +++ b/src/bin/psql/mainloop.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.h,v 1.11 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.h,v 1.12 2001/10/28 06:25:58 momjian Exp $ */ #ifndef MAINLOOP_H #define MAINLOOP_H @@ -17,4 +17,5 @@ extern sigjmp_buf main_loop_jmp; #endif int MainLoop(FILE *source); + #endif /* MAINLOOP_H */ diff --git a/src/bin/psql/mbprint.c b/src/bin/psql/mbprint.c index 1ca86f0e50..b0478eeef8 100644 --- a/src/bin/psql/mbprint.c +++ b/src/bin/psql/mbprint.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.2 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.3 2001/10/28 06:25:58 momjian Exp $ */ #include "postgres_fe.h" @@ -349,4 +349,5 @@ pg_wcswidth(unsigned char *pwcs, int len) { return len; } + #endif diff --git a/src/bin/psql/mbprint.h b/src/bin/psql/mbprint.h index 4d0cab1b9d..7a83135806 100644 --- a/src/bin/psql/mbprint.h +++ b/src/bin/psql/mbprint.h @@ -1,4 +1,4 @@ -/* $Id: mbprint.h,v 1.2 2001/10/25 05:49:54 momjian Exp $ */ +/* $Id: mbprint.h,v 1.3 2001/10/28 06:25:58 momjian Exp $ */ #ifndef MBPRINT_H #define MBPRINT_H @@ -13,4 +13,5 @@ unsigned char *mbvalidate(unsigned char *pwcs); #endif /* MULTIBYTE */ int pg_wcswidth(unsigned char *pwcs, int len); + #endif /* MBPRINT_H */ diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h index d469149b69..6223b2721c 100644 --- a/src/bin/psql/print.h +++ b/src/bin/psql/print.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/print.h,v 1.10 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/print.h,v 1.11 2001/10/28 06:25:58 momjian Exp $ */ #ifndef PRINT_H #define PRINT_H @@ -12,12 +12,11 @@ enum printFormat { - PRINT_NOTHING = 0, /* to make sure someone - * initializes this */ - PRINT_UNALIGNED, - PRINT_ALIGNED, - PRINT_HTML, - PRINT_LATEX + PRINT_NOTHING = 0, /* to make sure someone initializes this */ + PRINT_UNALIGNED, + PRINT_ALIGNED, + PRINT_HTML, + PRINT_LATEX /* add your favourite output format here ... */ }; diff --git a/src/bin/psql/prompt.h b/src/bin/psql/prompt.h index 4c2b0a693b..965f4bb55e 100644 --- a/src/bin/psql/prompt.h +++ b/src/bin/psql/prompt.h @@ -3,21 +3,22 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/prompt.h,v 1.9 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/prompt.h,v 1.10 2001/10/28 06:25:58 momjian Exp $ */ #ifndef PROMPT_H #define PROMPT_H typedef enum _promptStatus { - PROMPT_READY, - PROMPT_CONTINUE, - PROMPT_COMMENT, - PROMPT_SINGLEQUOTE, - PROMPT_DOUBLEQUOTE, - PROMPT_PAREN, - PROMPT_COPY + PROMPT_READY, + PROMPT_CONTINUE, + PROMPT_COMMENT, + PROMPT_SINGLEQUOTE, + PROMPT_DOUBLEQUOTE, + PROMPT_PAREN, + PROMPT_COPY } promptStatus_t; char *get_prompt(promptStatus_t status); + #endif /* PROMPT_H */ diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index 1be01f445c..21faca3233 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/settings.h,v 1.11 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/settings.h,v 1.12 2001/10/28 06:25:58 momjian Exp $ */ #ifndef SETTINGS_H #define SETTINGS_H @@ -69,4 +69,5 @@ extern PsqlSettings pset; #define EXIT_BADCONN 2 #define EXIT_USER 3 + #endif diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 75d04551c3..c1d2dbc993 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.52 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.53 2001/10/28 06:25:58 momjian Exp $ */ #include "postgres_fe.h" @@ -56,11 +56,11 @@ PsqlSettings pset; */ enum _actions { - ACT_NOTHING = 0, - ACT_SINGLE_SLASH, - ACT_LIST_DB, - ACT_SINGLE_QUERY, - ACT_FILE + ACT_NOTHING = 0, + ACT_SINGLE_SLASH, + ACT_LIST_DB, + ACT_SINGLE_QUERY, + ACT_FILE }; struct adhoc_opts @@ -695,4 +695,5 @@ printSSLInfo(void) printf(gettext("SSL connection (cipher: %s, bits: %i)\n\n"), SSL_get_cipher(ssl), sslbits); } + #endif diff --git a/src/bin/psql/stringutils.h b/src/bin/psql/stringutils.h index 2d7bdaa86b..1feb2e4d06 100644 --- a/src/bin/psql/stringutils.h +++ b/src/bin/psql/stringutils.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.h,v 1.15 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.h,v 1.16 2001/10/28 06:25:58 momjian Exp $ */ #ifndef STRINGUTILS_H #define STRINGUTILS_H @@ -17,4 +17,5 @@ extern char *strtokx(const char *s, char *was_quoted, unsigned int *token_pos, int encoding); + #endif /* STRINGUTILS_H */ diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 500ded13fe..c7998d1d6d 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.39 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.40 2001/10/28 06:25:58 momjian Exp $ */ /*---------------------------------------------------------------------- @@ -1113,4 +1113,5 @@ dequote_file_name(char *text, char quote_char) return s; } #endif /* 0 */ + #endif /* USE_READLINE */ diff --git a/src/bin/psql/tab-complete.h b/src/bin/psql/tab-complete.h index 7200fd6feb..fdf40d64f5 100644 --- a/src/bin/psql/tab-complete.h +++ b/src/bin/psql/tab-complete.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.h,v 1.7 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.h,v 1.8 2001/10/28 06:25:59 momjian Exp $ */ #ifndef TAB_COMPLETE_H #define TAB_COMPLETE_H @@ -11,4 +11,5 @@ #include "postgres_fe.h" void initialize_readline(void); + #endif |
