diff options
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/doc/makedoc.c | 19 |
2 files changed, 16 insertions, 8 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 34b0c79..bc0ec24 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,10 @@ 2015-11-06 Jon Turney <jon.turney@dronecode.org.uk> + * doc/makedoc.c (iscommand): Only allow commands to have trailing + spaces, not space separated words. + +2015-11-06 Jon Turney <jon.turney@dronecode.org.uk> + * libm/mathfp/s_acos.c: Fix QUICKREF. * libm/mathfp/e_acosh.c: Ditto. * libm/math/w_asin.c: Ditto. diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c index 7188642..96362f7 100644 --- a/newlib/doc/makedoc.c +++ b/newlib/doc/makedoc.c @@ -777,14 +777,18 @@ DEFUN( iscommand,(ptr, idx), unsigned int idx) { unsigned int len = 0; - while (at(ptr,idx)) { - if (isupper(at(ptr,idx)) || at(ptr,idx) == ' ' || - at(ptr,idx) == '_') - { + + while (isupper(at(ptr,idx)) || at(ptr,idx) == '_') { len++; idx++; - } - else if(at(ptr,idx) == '\n') + } + + while (at(ptr,idx) == ' ') { + len++; + idx++; + } + + if(at(ptr,idx) == '\n') { /* The length check will never fail on a real command * because the commands are screened as the definitions file @@ -792,8 +796,7 @@ DEFUN( iscommand,(ptr, idx), if (len >= MIN_CMDLEN) return 1; return 0; } - else return 0; - } + return 0; } |