From: ian Date: Thu, 10 Apr 2008 18:53:36 +0000 (+0000) Subject: fixes during movpos wip X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?p=trains.git;a=commitdiff_plain;h=01e92afe425762db83d270c037fe4c52349f9255 fixes during movpos wip --- diff --git a/hostside/commands.c b/hostside/commands.c index 55fcc3b..1c9953a 100644 --- a/hostside/commands.c +++ b/hostside/commands.c @@ -203,11 +203,13 @@ static void cmd_movfeat(ParseState *ps, const CmdInfo *ci) { if (!ps_neednoargs(ps)) return; ec= movpos_change(back,move,fwd,ms,0); - if (ec) + if (ec) { badcmd(ps,"movfeat %s %s %s %ld %s", back->i->pname, move->i->pname, fwd->i->pname, ms==INT_MAX ? -1L : ms, errorcodelist[ec]); + return; + } ouack(ci); } diff --git a/hostside/parseutils.c b/hostside/parseutils.c index d1509f3..c41bbd0 100644 --- a/hostside/parseutils.c +++ b/hostside/parseutils.c @@ -100,7 +100,7 @@ const void *any_lookup(ParseState *ps, const void *inf, int ninfsmax, for (i=0; ilthisword,ps->thisword); + return 0; + } return r; } diff --git a/hostside/realtime.c b/hostside/realtime.c index ae2082b..fbaa090 100644 --- a/hostside/realtime.c +++ b/hostside/realtime.c @@ -260,9 +260,8 @@ void die_hook(void) { int ps_needsegment(ParseState *ps, Segment **seg_r, const SegmentInfo **segi_r) { const SegmentInfo *segi; - if (!ps_needword(ps)) return 0; segi= some_needword_lookup_counted(ps,info_segments,info_nsegments, - ps->thisword); + "segment"); if (!segi) return 0; if (segi_r) *segi_r= segi; if (seg_r) *seg_r= segments + (segi - info_segments);