• merge printf from OpenBSD
• deactivate %a and %A since our libc doesn’t have it • rewrite the mksh integration code to use shf instead of stdio, removing floating point support always in the process, as shf doesn’t support it ⇒ saves 11114 (6706 text, 168 data, 4240 bss) with dietlibc on Debian • fix -Wall -Wextra -Wformat -Wstrict-aliasing=2 for gcc (Debian 4.4.4-7) • fix these and -Wc++-compat for gcc version 4.6.0 20100711 (experimental) [trunk revision 162057] (Debian 20100711-1) except: – a few enum warnings that relate to eglibc’s {g,s}etrlimit() functions taking an enum instead of an int because they’re too stupid to adhere to POSIX interfaces they design by themselves – all “request for implicit conversion” involving a "void *" on one side • tweak the manual page somewhat more
This commit is contained in:
8
misc.c
8
misc.c
@ -29,7 +29,7 @@
|
||||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.140 2010/07/13 13:07:56 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.141 2010/07/17 22:09:36 tg Exp $");
|
||||
|
||||
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
||||
|
||||
@ -695,10 +695,10 @@ do_gmatch(const unsigned char *s, const unsigned char *se,
|
||||
static const unsigned char *
|
||||
cclass(const unsigned char *p, int sub)
|
||||
{
|
||||
int c, d, not, found = 0;
|
||||
int c, d, notp, found = 0;
|
||||
const unsigned char *orig_p = p;
|
||||
|
||||
if ((not = (ISMAGIC(*p) && *++p == NOT)))
|
||||
if ((notp = (ISMAGIC(*p) && *++p == NOT)))
|
||||
p++;
|
||||
do {
|
||||
c = *p++;
|
||||
@ -732,7 +732,7 @@ cclass(const unsigned char *p, int sub)
|
||||
found = 1;
|
||||
} while (!(ISMAGIC(p[0]) && p[1] == ']'));
|
||||
|
||||
return ((found != not) ? p+2 : NULL);
|
||||
return ((found != notp) ? p+2 : NULL);
|
||||
}
|
||||
|
||||
/* Look for next ) or | (if match_sep) in *(foo|bar) pattern */
|
||||
|
Reference in New Issue
Block a user