mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2025-02-18 13:34:42 +02:00
eeshow/sch.h, sch-parse.c, sch-render.c: rename obj.u.sheet to obj.u.name
This commit is contained in:
parent
fb888f3714
commit
48327e149b
@ -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) {
|
if (sscanf(line, "F%d \"%m[^\"]\" %u", &n, &s, &dim) == 3) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 0:
|
case 0:
|
||||||
sheet->sheet = s;
|
sheet->name = s;
|
||||||
sheet->sheet_dim = dim;
|
sheet->name_dim = dim;
|
||||||
return 1;
|
return 1;
|
||||||
case 1:
|
case 1:
|
||||||
sheet->file = s;
|
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) {
|
if (sscanf(line, "$Sheet%n", &n) == 0 && n) {
|
||||||
ctx->state = sch_sheet;
|
ctx->state = sch_sheet;
|
||||||
obj->u.sheet.sheet = NULL;
|
obj->u.sheet.name = NULL;
|
||||||
obj->u.sheet.file = NULL;
|
obj->u.sheet.file = NULL;
|
||||||
obj->u.sheet.rotated = 0;
|
obj->u.sheet.rotated = 0;
|
||||||
obj->u.sheet.fields = NULL;
|
obj->u.sheet.fields = NULL;
|
||||||
|
@ -69,17 +69,17 @@ static void do_hsheet_text(const struct sch_obj *obj,
|
|||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
assert(sheet->sheet && sheet->file);
|
assert(sheet->name && sheet->file);
|
||||||
|
|
||||||
struct text sheet_txt = {
|
struct text sheet_txt = {
|
||||||
.size = sheet->sheet_dim,
|
.size = sheet->name_dim,
|
||||||
.x = obj->x,
|
.x = obj->x,
|
||||||
.y = obj->y,
|
.y = obj->y,
|
||||||
.rot = 0,
|
.rot = 0,
|
||||||
.hor = text_min,
|
.hor = text_min,
|
||||||
.vert = 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 */
|
sheet_txt.s = s; /* work around "const" mismatch */
|
||||||
|
|
||||||
struct text file_txt = {
|
struct text file_txt = {
|
||||||
|
@ -67,8 +67,8 @@ struct sch_obj {
|
|||||||
} comp;
|
} comp;
|
||||||
struct sch_sheet {
|
struct sch_sheet {
|
||||||
unsigned h, w;
|
unsigned h, w;
|
||||||
const char *sheet;
|
const char *name;
|
||||||
unsigned sheet_dim;
|
unsigned name_dim;
|
||||||
const char *file;
|
const char *file;
|
||||||
unsigned file_dim;
|
unsigned file_dim;
|
||||||
bool rotated;
|
bool rotated;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user