--- rxvt-unicode/src/xdefaults.C 2006/01/31 19:54:39 1.91 +++ rxvt-unicode/src/xdefaults.C 2006/02/02 18:04:46 1.94 @@ -28,7 +28,7 @@ #include "version.h" #ifdef KEYSYM_RESOURCE -#include "keyboard.h" +# include "keyboard.h" #endif /* place holders used for parsing command-line options */ @@ -36,7 +36,7 @@ #define Optflag_Boolean 0x80000000UL #define Optflag_mask 0x3fffffffUL -/*{{{ monolithic option/resource structure: */ +/* monolithic option/resource structure: */ /* * `string' options MUST have a usage argument * `switch' and `boolean' options have no argument @@ -268,7 +268,6 @@ #undef RSTRG #undef SWCH #undef BOOL -/*}}} */ static const char releasestring[] = "rxvt-unicode (" RXVTNAME ") v" VERSION " - released: " DATE "\n"; static const char optionsstring[] = "options: " @@ -409,7 +408,7 @@ for (col = 1, i = 0; i < optList_size; i++) if (optList[i].desc != NULL) { - int len = 0; + int len = 0; if (!optList_isBool (i)) { @@ -486,7 +485,7 @@ void rxvt_term::get_options (int argc, const char *const *argv) { - int i, bad_option = 0; + int i, bad_option = 0; for (i = 1; i < argc; i++) { @@ -543,8 +542,12 @@ */ if (optList[entry].doff != -1) - rs[optList[entry].doff] = flag == resval_on && argv[i+1] - ? argv[++i] : resval_undef; + { + if (flag == resval_on && !argv [i+1]) + rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); + + rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; + } } else { /* boolean value */ @@ -773,7 +776,7 @@ const char * rxvt_term::x_resource (const char *name) { - XrmDatabase database = XrmGetDatabase (xdisp); + XrmDatabase database = XrmGetDatabase (dpy); const char *p = get_res (database, rs[Rs_name], name); const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); @@ -835,7 +838,7 @@ * [R5 or later]: enumerate the resource database */ # ifdef KEYSYM_RESOURCE - XrmDatabase database = XrmGetDatabase (xdisp); + XrmDatabase database = XrmGetDatabase (dpy); XrmName name_prefix[3]; XrmClass class_prefix[3];