Commit Graph

3 Commits

Author SHA1 Message Date
sin d4830dba30 Fix fgetrune on systems where char is unsigned by default (ARM)
Store the result in an int and do the comparison.  This is always
safe without using strange constructs like "signed char".

wc(1) would go into an infinite loop when executed on an ARM
system.
2015-02-13 15:42:54 +00:00
FRIGN 1c462012e4 Rename variable Rune * p -> r in fgetrune() 2015-02-11 21:14:28 +01:00
FRIGN a5ae899a48 Scrap readrune(), introducing fgetrune()
Interface as proposed by cls, but internally rewritten after a few
considerations.
The code is much shorter and to the point, aligning itself with other
standard functions. It should also be much faster, which is not bad.
2015-02-11 20:16:49 +01:00