changeset 7102:c4faffdc0862

[gaim-migrate @ 7667] Move show_usage() to main.c. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 01 Oct 2003 04:29:44 +0000
parents 6ca56650d11a
children 5dc4ed905a1a
files src/gtkutils.c src/gtkutils.h src/main.c
diffstat 3 files changed, 25 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutils.c	Wed Oct 01 04:14:28 2003 +0000
+++ b/src/gtkutils.c	Wed Oct 01 04:29:44 2003 +0000
@@ -1027,30 +1027,6 @@
 	return buf;
 }
 
-void show_usage(int mode, const char *name)
-{
-	switch (mode) {
-	case 0:		/* full help text */
-		printf(_("Gaim %s\n"
-		       "Usage: %s [OPTION]...\n\n"
-		       "  -a, --acct          display account editor window\n"
-		       "  -w, --away[=MESG]   make away on signon (optional argument MESG specifies\n"
-		       "                      name of away message to use)\n"
-		       "  -l, --login[=NAME]  automatically login (optional argument NAME specifies\n"
-		       "                      account(s) to use, seperated by commas)\n"
-		       "  -n, --loginwin      don't automatically login; show login window\n"
-		       "  -u, --user=NAME     use account NAME\n"
-		       "  -f, --file=FILE     use FILE as config\n"
-		       "  -d, --debug         print debugging messages to stdout\n"
-		       "  -v, --version       display the current version and exit\n"
-		       "  -h, --help          display this help and exit\n"), VERSION, name);
-		break;
-	case 1:		/* short message */
-		printf(_("Gaim %s. Try `%s -h' for more information.\n"), VERSION, name);
-		break;
-	}
-}
-
 void gaim_gtk_find_images(const char *message, GSList **list) {
 	GData *attribs;
 	const char *tmp, *start, *end;
--- a/src/gtkutils.h	Wed Oct 01 04:14:28 2003 +0000
+++ b/src/gtkutils.h	Wed Oct 01 04:29:44 2003 +0000
@@ -284,14 +284,4 @@
  */
 char *stylize(const gchar *text, int len);
 
-/**
- * Shows the usage options for the gaim binary.
- *
- * @param mode @c 0 for full options, or @c 1 for a short summary.
- * @param name The name of the binary.
- *
- * @todo Move this to the binary, when a library is formed.
- */
-void show_usage(int mode, const char *name);
-
 #endif /* _GAIM_GTK_UTILS_H_ */
--- a/src/main.c	Wed Oct 01 04:14:28 2003 +0000
+++ b/src/main.c	Wed Oct 01 04:29:44 2003 +0000
@@ -539,6 +539,31 @@
 	return &core_ops;
 }
 
+static void
+show_usage(int mode, const char *name)
+{
+	switch (mode) {
+	case 0:		/* full help text */
+		printf(_("Gaim %s\n"
+		       "Usage: %s [OPTION]...\n\n"
+		       "  -a, --acct          display account editor window\n"
+		       "  -w, --away[=MESG]   make away on signon (optional argument MESG specifies\n"
+		       "                      name of away message to use)\n"
+		       "  -l, --login[=NAME]  automatically login (optional argument NAME specifies\n"
+		       "                      account(s) to use, seperated by commas)\n"
+		       "  -n, --loginwin      don't automatically login; show login window\n"
+		       "  -u, --user=NAME     use account NAME\n"
+		       "  -f, --file=FILE     use FILE as config\n"
+		       "  -d, --debug         print debugging messages to stdout\n"
+		       "  -v, --version       display the current version and exit\n"
+		       "  -h, --help          display this help and exit\n"), VERSION, name);
+		break;
+	case 1:		/* short message */
+		printf(_("Gaim %s. Try `%s -h' for more information.\n"), VERSION, name);
+		break;
+	}
+}
+
 /* FUCKING GET ME A TOWEL! */
 #ifdef _WIN32
 int gaim_main(HINSTANCE hint, int argc, char *argv[])