-------- Original Message --------
Subject: PATCH: Entrance small refactorings - spawner cleanup
Date: Tue, 27 Jun 2006 02:56:53 +0100
From: Essien Ita Essien <[EMAIL PROTECTED]>
To: [email protected]
moves the usage message into a usage function as nicely suggested in the
code :)
Index: entrance/src/daemon/spawner.c
===================================================================
RCS file: /var/cvs/e/e17/apps/entrance/src/daemon/spawner.c,v
retrieving revision 1.30
diff -a -u -r1.30 spawner.c
--- entrance/src/daemon/spawner.c 3 Jun 2006 06:36:16 -0000 1.30
+++ entrance/src/daemon/spawner.c 27 Jun 2006 01:34:22 -0000
@@ -391,9 +391,35 @@
entranced_debug("Entranced exits.\n");
}
+
+
+void usage(char* name)
+{
+ /* This should probably in a separate usage function, but bleh */
+ printf("Entranced - Launcher for the Entrance Display Manager\n");
+ printf("Usage: %s [OPTION] ...\n\n", name);
+ printf
+ ("--------------------------------------------------------------------------\n");
+ printf(" -c CONFIG Specify config file for greeter\n");
+ printf(" -d DISPLAY Connect to an existing X server\n");
+ printf(" -help Display this help message\n");
+ /*printf(" -verbose Display extra debugging info\n");*/
+ printf
+ (" -nodaemon Don't fork to background (useful for init scripts)\n");
+ printf
+ ("==========================================================================\n\n");
+ printf
+ ("Note: if you're launching Entrance from within an existing X session, don't\n");
+ printf
+ ("try to use entranced or you may get unexpected results. Instead, launch\n");
+ printf("entrance directly by typing \"entrance\".\n\n");
+ exit(0);
+}
+
/*
* Main function
*/
+
int
main(int argc, char **argv)
{
@@ -448,26 +474,7 @@
nodaemon = 1;
break;
case 'h':
- /* This should probably in a separate usage function, but bleh */
- printf("Entranced - Launcher for the Entrance Display Manager\n");
- printf("Usage: %s [OPTION] ...\n\n", argv[0]);
- printf
- ("--------------------------------------------------------------------------\n");
- printf(" -c CONFIG Specify config file for greeter\n");
- printf(" -d DISPLAY Connect to an existing X server\n");
- printf(" -help Display this help message\n");
- /*printf(" -verbose Display extra debugging info\n");*/
- printf
- (" -nodaemon Don't fork to background (useful for init scripts)\n");
- printf
- ("==========================================================================\n\n");
- printf
- ("Note: if you're launching Entrance from within an existing X session, don't\n");
- printf
- ("try to use entranced or you may get unexpected results. Instead, launch\n");
- printf("entrance directly by typing \"entrance\".\n\n");
- exit(0);
-
+ usage(argv[0]);
/*case 'v':
config.debuglevel = 1;*/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel