From: Michael Urman Date: Mon, 18 Mar 2002 03:11:07 +0000 (-0000) Subject: Fix slight whitespace issue - don't append whitespace after closing X-Git-Tag: v0.1.0~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=160ba169cc38d8bed84c1ed92b2cef05a2cb4916;p=yasm Fix slight whitespace issue - don't append whitespace after closing paren to beginning of expansion of %define with parameters. svn path=/trunk/yasm/; revision=525 --- diff --git a/modules/preprocs/yapp/yapp-preproc.c b/modules/preprocs/yapp/yapp-preproc.c index 6b5ed5ef..2451ef4a 100644 --- a/modules/preprocs/yapp/yapp-preproc.c +++ b/modules/preprocs/yapp/yapp-preproc.c @@ -834,7 +834,9 @@ yapp_preproc_input(char *buf, size_t max_size) if (token == ')') { /* after paramlist and ')' */ /* everything is what it's defined to be */ - if(append_to_return(¯o_head, ¯o_tail)==0) state=YAPP_STATE_EOF; + token = yapp_preproc_lex(); + if (token != WHITESPACE) append_token(token, ¯o_head, ¯o_tail); + if (append_to_return(¯o_head, ¯o_tail)==0) state=YAPP_STATE_EOF; else { ydebug(("YAPP: Inserting define macro %s (%d)\n", s, param_count)); yapp_define_insert(s, param_count, 0); diff --git a/src/preprocs/yapp/yapp-preproc.c b/src/preprocs/yapp/yapp-preproc.c index 6b5ed5ef..2451ef4a 100644 --- a/src/preprocs/yapp/yapp-preproc.c +++ b/src/preprocs/yapp/yapp-preproc.c @@ -834,7 +834,9 @@ yapp_preproc_input(char *buf, size_t max_size) if (token == ')') { /* after paramlist and ')' */ /* everything is what it's defined to be */ - if(append_to_return(¯o_head, ¯o_tail)==0) state=YAPP_STATE_EOF; + token = yapp_preproc_lex(); + if (token != WHITESPACE) append_token(token, ¯o_head, ¯o_tail); + if (append_to_return(¯o_head, ¯o_tail)==0) state=YAPP_STATE_EOF; else { ydebug(("YAPP: Inserting define macro %s (%d)\n", s, param_count)); yapp_define_insert(s, param_count, 0);