Index: animator/hid_anim.c =================================================================== --- animator/hid_anim.c (revision 4738) +++ animator/hid_anim.c (revision 4739) @@ -48,8 +48,10 @@ typedef struct { unsigned in_use:1; + unsigned xor:1; char cap; char color[16]; + double width; } gc_t; #define NUM_GC 32 @@ -124,6 +126,36 @@ gc[idx].cap = *cs; } +static void cmd_linwid(proto_node_t *args) +{ + int idx; + char *end; + double d; + proto_node_t *ch1 = child1(args); + char *gs = str(ch1), *ws = str(next(ch1)); + + if ((ws == NULL) || (gs == NULL)) + return; + get_gc(idx, gs); + d = strtod(ws, &end); + if (*end == '\0') + gc[idx].width = d; +} + +static void cmd_setxor(proto_node_t *args) +{ + int idx; + proto_node_t *ch1 = child1(args); + char *gs = str(ch1), *xs = str(next(ch1)); + + if ((xs == NULL) || (gs == NULL)) + return; + get_gc(idx, gs); + if ((*xs == '0') || (*xs == '1')) + gc[idx].xor = !!(xs - '0'); +} + + static void read_netin(void) { P_size_t len, n; @@ -146,6 +178,8 @@ case cmds_delGC: cmd_delGC(pctx.targ); break; case cmds_clr: cmd_clr(pctx.targ); break; case cmds_cap: cmd_cap(pctx.targ); break; + case cmds_linwid: cmd_linwid(pctx.targ); break; + case cmds_setxor: cmd_setxor(pctx.targ); break; /* ignore */ case cmds_inval: