From: <enl...@li...> - 2002-04-30 01:07:53
|
Enlightenment CVS committal Author : mej Project : eterm Module : Eterm Dir : eterm/Eterm/src Modified Files: Tag: ETERM-0_10 options.c startup.c windows.c Log Message: Mon Apr 29 21:06:07 2002 Michael Jennings (mej) Oops...need to pre-parse some of those options. :) Also fixed the --install option which hasn't worked for ages. =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.c,v retrieving revision 1.102.2.1 retrieving revision 1.102.2.2 diff -u -3 -r1.102.2.1 -r1.102.2.2 --- options.c 29 Apr 2002 21:47:38 -0000 1.102.2.1 +++ options.c 30 Apr 2002 01:07:49 -0000 1.102.2.2 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: options.c,v 1.102.2.1 2002/04/29 21:47:38 mej Exp $"; +static const char cvs_ident[] = "$Id: options.c,v 1.102.2.2 2002/04/30 01:07:49 mej Exp $"; #include "config.h" #include "feature.h" @@ -95,7 +95,7 @@ static char *rs_greek_keyboard = NULL; #endif -unsigned long Options = (Opt_scrollbar), image_toggles = 0; +unsigned long Options = (Opt_scrollbar | Opt_select_trailing_spaces), image_toggles = 0; char *theme_dir = NULL, *user_dir = NULL; char **rs_exec_args = NULL; /* Args to exec (-e or --exec) */ char *rs_title = NULL; /* Window title */ @@ -152,26 +152,26 @@ /* Options structure */ spifopt_t option_list[] = { - SPIFOPT_STR('t', "theme", "select a theme", rs_theme), - SPIFOPT_STR('X', "config-file", "choose an alternate config file", rs_config_file), - SPIFOPT_STR('d', "display", "X server to connect to", display_name), + SPIFOPT_STR_PP('t', "theme", "select a theme", rs_theme), + SPIFOPT_STR_PP('X', "config-file", "choose an alternate config file", rs_config_file), + SPIFOPT_STR_PP('d', "display", "X server to connect to", display_name), #if DEBUG <= 0 - SPIFOPT_INT_LONG("debug", "level of debugging information to show (support not compiled in)", DEBUG_LEVEL), + SPIFOPT_INT_LONG_PP("debug", "level of debugging information to show (support not compiled in)", DEBUG_LEVEL), #elif DEBUG == 1 - SPIFOPT_INT_LONG("debug", "level of debugging information to show (0-1)", DEBUG_LEVEL), + SPIFOPT_INT_LONG_PP("debug", "level of debugging information to show (0-1)", DEBUG_LEVEL), #elif DEBUG == 2 - SPIFOPT_INT_LONG("debug", "level of debugging information to show (0-2)", DEBUG_LEVEL), + SPIFOPT_INT_LONG_PP("debug", "level of debugging information to show (0-2)", DEBUG_LEVEL), #elif DEBUG == 3 - SPIFOPT_INT_LONG("debug", "level of debugging information to show (0-3)", DEBUG_LEVEL), + SPIFOPT_INT_LONG_PP("debug", "level of debugging information to show (0-3)", DEBUG_LEVEL), #elif DEBUG == 4 - SPIFOPT_INT_LONG("debug", "level of debugging information to show (0-4)", DEBUG_LEVEL), + SPIFOPT_INT_LONG_PP("debug", "level of debugging information to show (0-4)", DEBUG_LEVEL), #else - SPIFOPT_INT_LONG("debug", "level of debugging information to show (0-5)", DEBUG_LEVEL), + SPIFOPT_INT_LONG_PP("debug", "level of debugging information to show (0-5)", DEBUG_LEVEL), #endif - SPIFOPT_BOOL_LONG("install", "install a private colormap", Options, Opt_install), + SPIFOPT_BOOL_LONG_PP("install", "install a private colormap", Options, Opt_install), - SPIFOPT_ABST('h', "help", "display usage information", usage), - SPIFOPT_ABST_LONG("version", "display version and configuration information", version), + SPIFOPT_ABST_PP('h', "help", "display usage information", usage), + SPIFOPT_ABST_LONG_PP("version", "display version and configuration information", version), /* =======[ Color options ]======= */ SPIFOPT_BOOL('r', "reverse-video", "reverse video", Options, Opt_reverse_video), @@ -339,9 +339,7 @@ printf("Eterm Enlightened Terminal Emulator for the X Window System\n"); printf("Copyright (c) 1997-2002, " AUTHORS "\n\n"); - spifopt_usage(); - - printf("\nOption types:\n"); + printf("Option types:\n"); printf(" (bool) -- Boolean option ('1', 'on', 'yes', or 'true' to activate, '0', 'off', 'no', or 'false' to deactivate)\n"); printf(" (int) -- Integer option (any signed number of reasonable value, usually in decimal/octal/hex)\n"); printf(" (str) -- String option (be sure to quote strings if needed to avoid shell expansion)\n\n"); @@ -354,7 +352,8 @@ printf("\nPlease consult the Eterm(1) man page for more detailed\n"); printf("information on command line options.\n\n"); - exit(EXIT_FAILURE); + + spifopt_usage(); } /* Print version and configuration information */ @@ -2371,7 +2370,6 @@ } #endif - Options = (Opt_scrollbar | Opt_select_trailing_spaces); Xdisplay = NULL; rs_term_name = NULL; #ifdef CUTCHAR_OPTION =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/startup.c,v retrieving revision 1.29.2.1 retrieving revision 1.29.2.2 diff -u -3 -r1.29.2.1 -r1.29.2.2 --- startup.c 29 Apr 2002 21:47:38 -0000 1.29.2.1 +++ startup.c 30 Apr 2002 01:07:50 -0000 1.29.2.2 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: startup.c,v 1.29.2.1 2002/04/29 21:47:38 mej Exp $"; +static const char cvs_ident[] = "$Id: startup.c,v 1.29.2.2 2002/04/30 01:07:50 mej Exp $"; #include "config.h" #include "feature.h" @@ -194,8 +194,6 @@ post_parse(); #ifdef PREFER_24BIT - cmap = DefaultColormap(Xdisplay, Xscreen); - /* * If depth is not 24, look for a 24bit visual. */ =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/windows.c,v retrieving revision 1.51 retrieving revision 1.51.2.1 diff -u -3 -r1.51 -r1.51.2.1 --- windows.c 3 Feb 2002 20:53:07 -0000 1.51 +++ windows.c 30 Apr 2002 01:07:50 -0000 1.51.2.1 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: windows.c,v 1.51 2002/02/03 20:53:07 mej Exp $"; +static const char cvs_ident[] = "$Id: windows.c,v 1.51.2.1 2002/04/30 01:07:50 mej Exp $"; #include "config.h" #include "feature.h" @@ -93,10 +93,10 @@ unsigned long r, g, b, t; wcol.pixel = WhitePixel(Xdisplay, Xscreen); - XQueryColor(Xdisplay, Xcmap, &wcol); + XQueryColor(Xdisplay, cmap, &wcol); D_PIXMAP(("Tint string is \"%s\", white color is rgbi:%d/%d/%d\n", color, wcol.red, wcol.green, wcol.blue)); - if (!XParseColor(Xdisplay, Xcmap, color, &xcol)) { + if (!XParseColor(Xdisplay, cmap, color, &xcol)) { print_error("Unable to parse tint color \"%s\". Ignoring.\n", color); return 0xffffff; } |