Index: trunk/scconfig/gen_conf.sh =================================================================== --- trunk/scconfig/gen_conf.sh (revision 31620) +++ trunk/scconfig/gen_conf.sh (revision 31621) @@ -126,6 +126,18 @@ return path } + # structs on the first level must be const + /struct/ && (level == 0) { + if (!($0 ~ "struct *[a-z_]*temp_s")) { # special case for core/librnd temp storage + tmp=$0 + sub("struct.*$", "", tmp) + if (!(tmp ~ "const")) { + print "First level structs must be const in line", NR > stderr + exit 1 + } + } + } + /[{]/ { uid = uids++ LEN[uid] = 0 Index: trunk/src/conf_core.h =================================================================== --- trunk/src/conf_core.h (revision 31620) +++ trunk/src/conf_core.h (revision 31621) @@ -12,7 +12,7 @@ typedef struct { - struct { + struct pcb_rnd_core_temp_s { RND_CFT_BOOLEAN rat_warn; /* rats nest has set warnings */ RND_CFT_BOOLEAN clip_inhibit_chg; /* dummy node to inform the menu about clip inhibit change */ } temp; @@ -85,7 +85,7 @@ RND_CFT_STRING subc_conv_refdes; /* automatic refdes value assigned to new subcircuits on conversion from objects - if empty, no refdes text or attribute is added; if the value is , the refdes text object is added but no refdes attribute is created */ } editor; - struct { + const struct { struct { RND_CFT_STRING method; /* method/strategy of placement; one of: disperse, frame, fit */ RND_CFT_STRING location; /* placement coordinate for methods that require it; if empty, use fixed coordinates at x,y; if non-empty, it may be: mark, center */ Index: trunk/src/librnd/core/hidlib_conf.h =================================================================== --- trunk/src/librnd/core/hidlib_conf.h (revision 31620) +++ trunk/src/librnd/core/hidlib_conf.h (revision 31621) @@ -41,7 +41,7 @@ typedef struct { - struct { + struct rnd_conf_temp_s { RND_CFT_BOOLEAN click_cmd_entry_active;/* true if the command line is active when the user click - this gives the command interpreter a chance to capture the click and use the coords */ } temp;