Index: trunk/src/plugins/io_easyeda/read_hi_pro_glue.c =================================================================== --- trunk/src/plugins/io_easyeda/read_hi_pro_glue.c (revision 10707) +++ trunk/src/plugins/io_easyeda/read_hi_pro_glue.c (revision 10708) @@ -356,7 +356,7 @@ char *sch_name = NULL; /* user readable sch name */ njson_sem_ctx_t jctx = {0}; FILE *f; - enum {M_MISC, M_SCH, M_SYM} main = M_MISC; + enum {M_MISC, M_SCH, M_SYM} tmain = M_MISC; int level = 0, c, res = 0, sch_id= -1; fn = rnd_concat(bnd->dir, "/project.json", NULL); @@ -385,10 +385,10 @@ case NJSON_SEM_EV_eof: case NJSON_SEM_EV_error: break; /* can't happen */ case NJSON_SEM_EV_OBJECT_BEGIN: if (level == 1) { - if (strcmp(jctx.name, "schematics") == 0) main = M_SCH; - else if (strcmp(jctx.name, "symbols") == 0) main = M_SYM; + if (strcmp(jctx.name, "schematics") == 0) tmain = M_SCH; + else if (strcmp(jctx.name, "symbols") == 0) tmain = M_SYM; } - if ((level == 2) && ((main == M_SYM) || (main == M_SCH))) { + if ((level == 2) && ((tmain == M_SYM) || (tmain == M_SCH))) { if (sname != NULL) free(sname); sname = rnd_strdup(jctx.name); /* rnd_trace(" sname: %s\n", jctx.name);*/ @@ -395,11 +395,11 @@ } case NJSON_SEM_EV_ARRAY_BEGIN: level++; -/* rnd_trace(" [%d %d] %s\n", level, main, jctx.name);*/ +/* rnd_trace(" [%d %d] %s\n", level, tmain, jctx.name);*/ break; case NJSON_SEM_EV_OBJECT_END: case NJSON_SEM_EV_ARRAY_END: - if ((level == 5) && (main == M_SCH)) { /* finished reading a schematic block */ + if ((level == 5) && (tmain == M_SCH)) { /* finished reading a schematic block */ char *name, *path; /* rnd_trace("!sch flush! sname=%s uname=%s id=%d\n", sname, user_name, sch_id);*/ name = rnd_concat(sch_name, "::", user_name, NULL); @@ -412,7 +412,7 @@ user_name = NULL; sch_id = -1; } - if ((level == 3) && (main == M_SYM)) { /* finished reading a symbol block */ + if ((level == 3) && (tmain == M_SYM)) { /* finished reading a symbol block */ char *name, *path; /* rnd_trace("!sym flush! sname=%s title=%s\n", sname, user_name);*/ name = user_name; @@ -424,11 +424,11 @@ user_name = NULL; /* don't free user_name, ownership is passed to the vector */ } level--; - if (level == 1) main = M_MISC; + if (level == 1) tmain = M_MISC; break; case NJSON_SEM_EV_ATOMIC: - switch(main) { + switch(tmain) { case M_SCH: if ((level == 3) && (strcmp(jctx.name, "name") == 0)) { /* remember user-unreadable long uid with use readable name - however, it's not necessarily unique */