projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23a50c3
)
Pass int instead of char to iscntrl() and isspace() because that's what they require...
author
David Levine
<levinedl@acm.org>
Tue, 17 Jan 2012 00:33:57 +0000
(18:33 -0600)
committer
David Levine
<levinedl@acm.org>
Tue, 17 Jan 2012 00:33:57 +0000
(18:33 -0600)
sbr/fmt_scan.c
patch
|
blob
|
history
diff --git
a/sbr/fmt_scan.c
b/sbr/fmt_scan.c
index
de20013
..
9c1eb16
100644
(file)
--- a/
sbr/fmt_scan.c
+++ b/
sbr/fmt_scan.c
@@
-155,7
+155,10
@@
cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) {
sp += char_len;
#else
end--;
- if (iscntrl(*sp) || isspace(*sp)) {
+ /* isnctrl(), etc., take an int argument. Cygwin's ctype.h
+ intentionally warns if they are passed a char. */
+ int c = *sp;
+ if (iscntrl(c) || isspace(c)) {
sp++;
#endif
if (!prevCtrl) {