(strtox, strtoy): New. Use it instead of inputxy() to avoid the
double-remainder problem: x-coordinate SHRT_MAX+1 is truncated to 0 by cast to coord, then converted by xabs(). This is wrong unless WORLD_X divides SHRT_MAX+1. (sarg_xy, sarg_getrange, sarg_range): Use them. (inputxy): No longer used, remove. (sarg_type): Use NS_UNDEF instead of 0. (sarg_list): Change confusing loop control. Properly diagnose overlong lists; used to silently ignore list tail and return MAX+1, which made a later snxtitem_list() fail. (atoip): No longer used, remove. Parsing was broken anyway. (sarg_type, sarg_xy, sarg_area, sarg_range, sarg_list, sarg_getrange): Use plain char * instead of s_char *.
This commit is contained in:
parent
543b0cba4f
commit
5d302eaad5
6 changed files with 131 additions and 150 deletions
|
@ -61,7 +61,8 @@ extern void xyrelrange(struct natstr *np, struct range *src,
|
|||
struct range *dst);
|
||||
extern void xyabsrange(struct natstr *np, struct range *src,
|
||||
struct range *dst);
|
||||
extern void inputxy(coord *xp, coord *yp, natid cn);
|
||||
extern coord strtox(char *str, char **end);
|
||||
extern coord strtoy(char *str, char **end);
|
||||
extern coord xabs(struct natstr *np, coord relx);
|
||||
extern coord yabs(struct natstr *np, coord rely);
|
||||
extern coord xnorm(register coord x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue