This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

making scanf byte-clean(er)


Attached is a patch for making the scanf format string (more)
byte-transparent. It actually couldn't deal with non-ASCII chars at
all, even valid ones, due to comparing an 'unsigned char' with a
(signed) 'char'. And when encountering an invalid byte, it would go
backwards in the format string. Finally, it wrongly reset the
multibyte conversion state for every character and used the same state
object for the format string and %ls arguments.

I thought I'd send the patch here for review first before sending it
upstream. Hope that makes sense.

Andy

Attachment: scanf.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]