*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.30 2000/05/11 01:37:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.31 2000/05/11 03:14:19 momjian Exp $
*/
#include "postgres.h"
static void
showVersion(void);
-
+static void
+ explain_help_and_exit(void);
/*
*
/* unknown option reported by getopt */
else
{
- fputs("Try -? for help.\n", stderr);
- exit(EXIT_FAILURE);
+ explain_help_and_exit();
}
break;
#ifndef HAVE_GETOPT_LONG
break;
#endif
default:
- fputs("Try -? for help.\n", stderr);
- exit(EXIT_FAILURE);
+ explain_help_and_exit();
break;
}
}
puts("Read the file COPYRIGHT or use the command \\copyright to see the");
puts("usage and distribution terms.");
}
+
+static void
+explain_help_and_exit(void)
+{
+
+#ifdef WIN32
+ fputs("Try -? for help.\n", stderr);
+#else /* !WIN32 */
+ fputs("Try -\\? for help.\n", stderr);
+#endif /* WIN32 */
+
+ exit(EXIT_FAILURE);
+}
+