SWCH needs to treat opt as boolean
authorsasha <sasha>
Fri, 8 Jun 2007 20:40:07 +0000 (20:40 +0000)
committersasha <sasha>
Fri, 8 Jun 2007 20:40:07 +0000 (20:40 +0000)
src/xdefaults.C

index 48a9e82aeedebe0c2301c487cb5e8b212e7d581a..05fb6afa69ed9591d0b904cb30166fa487b28d42 100644 (file)
@@ -60,7 +60,7 @@
 
 /* SWCH () - `-' flag */
 #define SWCH(opt, option, flag, desc)                          \
-    { (option), (flag), -1, NULL, (opt), NULL, (desc)}
+    { (option), (Optflag_Boolean | (flag)), -1, NULL, (opt), NULL, (desc)}
 
 /* convenient macros */
 #define optList_strlen(i)                                              \
@@ -540,6 +540,7 @@ rxvt_term::get_options (int argc, const char *const *argv)
         {
           if (optList_isReverse (entry))
             flag = flag == resval_on ? resval_off : resval_on;
+fprintf( stderr, "entry = %d, opt = [%s], flag = 0x%X, resval_on = %d\n", entry, opt, *flag, *resval_on );
 
           if (optList_strlen (entry))
             {
@@ -548,7 +549,7 @@ rxvt_term::get_options (int argc, const char *const *argv)
                * X resources to set these values before we settle for
                * default values
                */
-
+fprintf( stderr, "string\n");
               if (optList[entry].doff != -1)
                 {
                   if (flag == resval_on && !argv [i+1])