diff --git a/src/draw.c b/src/draw.c index 19218f95..2c79b7f8 100644 --- a/src/draw.c +++ b/src/draw.c @@ -351,7 +351,7 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot, double x0,y0,x1,y1,x2,y2; short flip; xLine line; - xRect box; + xRect rect; xArc arc; xPoly polygon; xText text; @@ -466,11 +466,11 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot, (hide && layer == PINLAYER && xctx->enable_layer[layer]) ) { for(j=0;j< symptr->rects[layer];j++) { - box = (symptr->rect[layer])[j]; - ROTATION(rot, flip, 0.0,0.0,box.x1,box.y1,x1,y1); - ROTATION(rot, flip, 0.0,0.0,box.x2,box.y2,x2,y2); + rect = (symptr->rect[layer])[j]; + ROTATION(rot, flip, 0.0,0.0,rect.x1,rect.y1,x1,y1); + ROTATION(rot, flip, 0.0,0.0,rect.x2,rect.y2,x2,y2); RECTORDER(x1,y1,x2,y2); - drawrect(c,what, x0+x1, y0+y1, x0+x2, y0+y2, box.dash); + drawrect(c,what, x0+x1, y0+y1, x0+x2, y0+y2, rect.dash); filledrect(c,what, x0+x1, y0+y1, x0+x2, y0+y2); } } @@ -538,7 +538,7 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot short flip; xLine line; xPoly polygon; - xRect box; + xRect rect; xArc arc; xText text; register xSymbol *symptr; @@ -613,9 +613,9 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot for(j=0;j< symptr->rects[layer];j++) { - box = (symptr->rect[layer])[j]; - ROTATION(rot, flip, 0.0,0.0,box.x1,box.y1,x1,y1); - ROTATION(rot, flip, 0.0,0.0,box.x2,box.y2,x2,y2); + rect = (symptr->rect[layer])[j]; + ROTATION(rot, flip, 0.0,0.0,rect.x1,rect.y1,x1,y1); + ROTATION(rot, flip, 0.0,0.0,rect.x2,rect.y2,x2,y2); RECTORDER(x1,y1,x2,y2); drawtemprect(gc,what, x0+x1, y0+y1, x0+x2, y0+y2); } diff --git a/src/findnet.c b/src/findnet.c index f791d4f2..2a68af09 100644 --- a/src/findnet.c +++ b/src/findnet.c @@ -121,7 +121,7 @@ void find_closest_net_or_symbol_pin(double mx,double my, double *x, double *y) { int i, j, no_of_pin_rects; double x0, x1, x2, y0, y1, y2, xx, yy, dist, min_dist_x=0, min_dist_y=0; - xRect box; + xRect rect; short rot, flip; char *type=NULL; double curr_dist; @@ -138,9 +138,9 @@ void find_closest_net_or_symbol_pin(double mx,double my, double *x, double *y) no_of_pin_rects = (xctx->inst[i].ptr+ xctx->sym)->rects[PINLAYER]; if(IS_LABEL_OR_PIN(type)) no_of_pin_rects=1; for(j=0; jinst[i].ptr+ xctx->sym)->rect[PINLAYER])[j]; - ROTATION(rot, flip, 0.0,0.0,box.x1,box.y1,x1,y1); - ROTATION(rot, flip, 0.0,0.0,box.x2,box.y2,x2,y2); + rect = ((xctx->inst[i].ptr+ xctx->sym)->rect[PINLAYER])[j]; + ROTATION(rot, flip, 0.0,0.0,rect.x1,rect.y1,x1,y1); + ROTATION(rot, flip, 0.0,0.0,rect.x2,rect.y2,x2,y2); x1 += x0; y1 += y0; x2 += x0; diff --git a/src/psprint.c b/src/psprint.c index 64b23a88..41b6cb6e 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -491,7 +491,7 @@ static void ps_draw_symbol(int n,int layer, short tmp_flip, short rot, double xo short flip; int textlayer; xLine line; - xRect box; + xRect rect; xText text; xArc arc; xPoly polygon; @@ -570,11 +570,11 @@ static void ps_draw_symbol(int n,int layer, short tmp_flip, short rot, double xo } if( xctx->enable_layer[layer] ) for(j=0;j< (xctx->inst[n].ptr+ xctx->sym)->rects[layer];j++) { - box = ((xctx->inst[n].ptr+ xctx->sym)->rect[layer])[j]; - ROTATION(rot, flip, 0.0,0.0,box.x1,box.y1,x1,y1); - ROTATION(rot, flip, 0.0,0.0,box.x2,box.y2,x2,y2); + rect = ((xctx->inst[n].ptr+ xctx->sym)->rect[layer])[j]; + ROTATION(rot, flip, 0.0,0.0,rect.x1,rect.y1,x1,y1); + ROTATION(rot, flip, 0.0,0.0,rect.x2,rect.y2,x2,y2); RECTORDER(x1,y1,x2,y2); - ps_filledrect(layer, x0+x1, y0+y1, x0+x2, y0+y2, box.dash); + ps_filledrect(layer, x0+x1, y0+y1, x0+x2, y0+y2, rect.dash); } if( (layer==TEXTWIRELAYER && !(xctx->inst[n].flags&2) ) || (xctx->sym_txt && (layer==TEXTLAYER) && (xctx->inst[n].flags&2) ) ) diff --git a/src/save.c b/src/save.c index 98a5527d..828a8d8e 100644 --- a/src/save.c +++ b/src/save.c @@ -1410,9 +1410,9 @@ static void get_sym_type(const char *symname, char **type, } else { char *globalprop=NULL; int fscan_ret; - xRect box; + xRect rect; - box.prop_ptr = NULL; + rect.prop_ptr = NULL; while(1) { if(fscanf(fd," %c",tag)==EOF) break; if(embed_fd && tag[0] == ']') break; @@ -1435,14 +1435,14 @@ static void get_sym_type(const char *symname, char **type, ungetc(tag[0], fd); read_record(tag[0], fd, 1); } - fscan_ret = fscanf(fd, "%lf %lf %lf %lf ",&box.x1, &box.y1, &box.x2, &box.y2); + fscan_ret = fscanf(fd, "%lf %lf %lf %lf ",&rect.x1, &rect.y1, &rect.x2, &rect.y2); if(fscan_ret < 4) dbg(0, "Warning: missing fields in 'B' line\n"); - load_ascii_string( &box.prop_ptr, fd); - dbg(1, "get_sym_type(): %s box.prop_ptr=%s\n", symname, box.prop_ptr); + load_ascii_string( &rect.prop_ptr, fd); + dbg(1, "get_sym_type(): %s rect.prop_ptr=%s\n", symname, rect.prop_ptr); if (pintable && c == PINLAYER) { /* hash pins to get LCC schematic have same order as corresponding symbol */ - int_hash_lookup(pintable, get_tok_value(box.prop_ptr, "name", 0), n++, XINSERT); - dbg(1, "get_sym_type() : hashing %s\n", get_tok_value(box.prop_ptr, "name", 0)); + int_hash_lookup(pintable, get_tok_value(rect.prop_ptr, "name", 0), n++, XINSERT); + dbg(1, "get_sym_type() : hashing %s\n", get_tok_value(rect.prop_ptr, "name", 0)); ++(*sym_n_pins); } break; @@ -1454,7 +1454,7 @@ static void get_sym_type(const char *symname, char **type, read_line(fd, 0); /* discard any remaining characters till (but not including) newline */ } my_free(1166, &globalprop); - my_free(1167, &box.prop_ptr); + my_free(1167, &rect.prop_ptr); if(!embed_fd) fclose(fd); } } @@ -1479,13 +1479,13 @@ static void align_sch_pins_with_sym(const char *name, int pos) /* hash all symbol pins with their position into pintable hash*/ get_sym_type(symname, &symtype, pintable, NULL, &sym_n_pins); if(symtype[0]) { /* found a .sym for current .sch LCC instance */ - xRect *box = NULL; + xRect *rect = NULL; if (sym_n_pins!=xctx->sym[pos].rects[PINLAYER]) { dbg(0, " align_sch_pins_with_sym(): warning: number of pins mismatch between %s and %s\n", name, symname); fail = 1; } - box = (xRect *) my_malloc(1168, sizeof(xRect) * sym_n_pins); + rect = (xRect *) my_malloc(1168, sizeof(xRect) * sym_n_pins); dbg(1, "align_sch_pins_with_sym(): symbol: %s\n", symname); for(i=0; i < xctx->sym[pos].rects[PINLAYER]; i++) { struct int_hashentry *entry; @@ -1497,17 +1497,17 @@ static void align_sch_pins_with_sym(const char *name, int pos) fail = 1; break; } - box[entry->value] = xctx->sym[pos].rect[PINLAYER][i]; /* box[] is the pin array ordered as in symbol */ + rect[entry->value] = xctx->sym[pos].rect[PINLAYER][i]; /* rect[] is the pin array ordered as in symbol */ dbg(1, "align_sch_pins_with_sym(): i=%d, pin name=%s entry->value=%d\n", i, pinname, entry->value); } if(!fail) { - /* copy box[] ordererd array to LCC schematic instance */ + /* copy rect[] ordererd array to LCC schematic instance */ for(i=0; i < xctx->sym[pos].rects[PINLAYER]; i++) { - xctx->sym[pos].rect[PINLAYER][i] = box[i]; + xctx->sym[pos].rect[PINLAYER][i] = rect[i]; } } int_hash_free(pintable); - my_free(1169, &box); + my_free(1169, &rect); } my_free(1170, &symtype); } diff --git a/src/svgdraw.c b/src/svgdraw.c index 2f9903ea..837687a3 100644 --- a/src/svgdraw.c +++ b/src/svgdraw.c @@ -400,7 +400,7 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot, short flip; int textlayer; xLine line; - xRect box; + xRect rect; xText text; xArc arc; xPoly polygon; @@ -468,11 +468,11 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot, } if( xctx->enable_layer[layer] ) for(j=0;j< symptr->rects[layer];j++) { - box = (symptr->rect[layer])[j]; - ROTATION(rot, flip, 0.0,0.0,box.x1,box.y1,x1,y1); - ROTATION(rot, flip, 0.0,0.0,box.x2,box.y2,x2,y2); + rect = (symptr->rect[layer])[j]; + ROTATION(rot, flip, 0.0,0.0,rect.x1,rect.y1,x1,y1); + ROTATION(rot, flip, 0.0,0.0,rect.x2,rect.y2,x2,y2); RECTORDER(x1,y1,x2,y2); - svg_filledrect(c, x0+x1, y0+y1, x0+x2, y0+y2, box.dash); + svg_filledrect(c, x0+x1, y0+y1, x0+x2, y0+y2, rect.dash); } if( (layer==TEXTWIRELAYER && !(xctx->inst[n].flags&2) ) || (xctx->sym_txt && (layer==TEXTLAYER) && (xctx->inst[n].flags&2) ) ) {