patch-2.0.37 linux/scripts/tkgen.c

Next file: linux/scripts/tkparse.c
Previous file: linux/scripts/Menuconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.36/linux/scripts/tkgen.c linux/scripts/tkgen.c
@@ -280,6 +280,7 @@
    */
   switch(item->tok)
     {
+    case tok_define_int:
     case tok_define:
       printf("} then { set %s %s } \n",  item->optionname, item->value);
       break;
@@ -464,6 +465,9 @@
    */
   switch(item->tok)
     {
+    case tok_define_int:
+      printf("} then {write_int $cfg $autocfg %s %s $notmod }\n", item->optionname, item->value);
+      break;
     case tok_define:
       printf("} then {write_tristate $cfg $autocfg %s %s $notmod }\n", item->optionname, item->value);
       break;
@@ -572,7 +576,8 @@
        * Skip items not for this menu, or ones having no conditions.
        */
       if (cfg->menu_number != menu_num ) continue;
-      if (cfg->tok != tok_define) continue;
+      if (cfg->tok != tok_define && cfg->tok != tok_define_int)
+      	continue;
       /*
        * Clear all of the booleans that are defined in this menu.
        */
@@ -717,6 +722,7 @@
 	  cfg->menu_line = menu_line++;
 	  break;
 	case tok_define:
+	case tok_define_int:
 	  cfg->menu_number = -1;
 	case tok_choice:
 	default:
@@ -923,7 +929,7 @@
       /*
        * Skip items not for this menu, or ones having no conditions.
        */
-      if( cfg->tok != tok_define) continue;
+      if( cfg->tok != tok_define && cfg->tok != tok_define_int) continue;
       if (cfg->cond != NULL ) 
 	generate_if(cfg, cfg->cond, menu_num, cfg->menu_line);
       else
@@ -988,6 +994,7 @@
 	case tok_tristate:
 	case tok_dep_tristate:
 	case tok_define:
+	case tok_define_int:
 	case tok_choose:
 	  if(!(cfg->flags & GLOBAL_WRITTEN))
 	    {
@@ -1019,7 +1026,7 @@
 		  printf("\twrite_comment $cfg $autocfg \"%s\"\n", cfg->label);
 		}
 #if 0
-	      else if(cfg->tok == tok_define)
+	      else if(cfg->tok == tok_define || cfg->tok == tok_define_int)
 		{
 		  printf("\twrite_define %s %s\n", cfg->optionname,
 			 cfg->value);
@@ -1043,6 +1050,12 @@
 			 cfg->optionname,
 			 cfg->optionname);
 	        }
+	      else if (cfg->tok == tok_define_int )
+	        {
+		  printf("\twrite_int $cfg $autocfg %s $%s $notmod\n",
+			 cfg->optionname,
+			 cfg->optionname);
+	        }
 	      else if (cfg->tok == tok_hex )
 	        {
 		  printf("\twrite_hex $cfg $autocfg %s $%s $notmod\n",
@@ -1109,13 +1122,14 @@
   clear_globalflags(config);
   for(cfg = scfg; cfg != NULL; cfg = cfg->next)
     {
-      if( cfg->tok != tok_define ) continue;
+      if( cfg->tok != tok_define && cfg->tok != tok_define_int ) 
+      	continue;
       printf("\tglobal %s; set %s 0\n",  cfg->optionname,  cfg->optionname);
       cfg->flags |= GLOBAL_WRITTEN;
     }
   for(cfg = scfg; cfg != NULL; cfg = cfg->next)
     {
-      if( cfg->tok != tok_define ) continue;
+      if( cfg->tok != tok_define && cfg->tok != tok_define_int ) continue;
       if (cfg->cond != NULL ) 
 	generate_if(cfg, cfg->cond, -1, 0);
       else

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov