1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-07-03 00:13:15 +03:00

eeshow/sch.h, sch-parse.c, sch-render.c: rename obj.u.sheet to obj.u.name

This commit is contained in:
Werner Almesberger 2016-08-03 11:46:24 -03:00
parent fb888f3714
commit 48327e149b
3 changed files with 8 additions and 8 deletions

View File

@ -211,8 +211,8 @@ static bool parse_hsheet_field(struct sch_ctx *ctx, const char *line)
if (sscanf(line, "F%d \"%m[^\"]\" %u", &n, &s, &dim) == 3) {
switch (n) {
case 0:
sheet->sheet = s;
sheet->sheet_dim = dim;
sheet->name = s;
sheet->name_dim = dim;
return 1;
case 1:
sheet->file = s;
@ -335,7 +335,7 @@ static bool parse_line(const struct file *file, void *user, const char *line)
}
if (sscanf(line, "$Sheet%n", &n) == 0 && n) {
ctx->state = sch_sheet;
obj->u.sheet.sheet = NULL;
obj->u.sheet.name = NULL;
obj->u.sheet.file = NULL;
obj->u.sheet.rotated = 0;
obj->u.sheet.fields = NULL;

View File

@ -69,17 +69,17 @@ static void do_hsheet_text(const struct sch_obj *obj,
{
char *s;
assert(sheet->sheet && sheet->file);
assert(sheet->name && sheet->file);
struct text sheet_txt = {
.size = sheet->sheet_dim,
.size = sheet->name_dim,
.x = obj->x,
.y = obj->y,
.rot = 0,
.hor = text_min,
.vert = text_min,
};
if (asprintf(&s, "Sheet: %s", sheet->sheet)) {}
if (asprintf(&s, "Sheet: %s", sheet->name)) {}
sheet_txt.s = s; /* work around "const" mismatch */
struct text file_txt = {

View File

@ -67,8 +67,8 @@ struct sch_obj {
} comp;
struct sch_sheet {
unsigned h, w;
const char *sheet;
unsigned sheet_dim;
const char *name;
unsigned name_dim;
const char *file;
unsigned file_dim;
bool rotated;