diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/Makefile.am | 4 | ||||
| -rw-r--r-- | src/strings.c | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d0928825..9494dd00 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2005-08-28 Ulrich Drepper <[email protected]> + * Makefile.an [BUILD_STATIC] (libdw): Add -ldl. + (CLEANFILES): Add *.gcno *.gcda *.gconv. + + * strings.c (process_chunk): Reorder expressions in conditional + (process_chunk_mb): Likewise. + * strings.c: New file. * Makefile.am (bin_PROGRAMS): Add strings. (strings_no_Wstring): Define. diff --git a/src/Makefile.am b/src/Makefile.am index ef944776..1a489497 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -67,7 +67,7 @@ libmudflap = -lmudflap endif if BUILD_STATIC -libdw = ../libdw/libdw.a $(libelf) $(libebl) +libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl libelf = ../libelf/libelf.a else libdw = ../libdw/libdw.so @@ -148,4 +148,4 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) done; \ done; rm -f c$${pid}_.???; exit $$bad -CLEANFILES = none_ld.os $(ld_modules:.c=.os) +CLEANFILES = none_ld.os $(ld_modules:.c=.os) *.gcno *.gcda *.gconv diff --git a/src/strings.c b/src/strings.c index fa7efa4a..1898ac74 100644 --- a/src/strings.c +++ b/src/strings.c @@ -334,7 +334,7 @@ process_chunk_mb (const char *fname, const unsigned char *buf, off64_t to, ch = buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0]; } - if (ch <= 255 && (ch == '\t' || isprint (ch))) + if (ch <= 255 && (isprint (ch) || ch == '\t')) { ++buf; ++curlen; @@ -399,8 +399,7 @@ process_chunk (const char *fname, const unsigned char *buf, off64_t to, const unsigned char *start = buf; while (len > 0) { - if ((*buf == '\t' || isprint (*buf)) - && (! char_7bit || *buf <= 127)) + if ((isprint (*buf) || *buf == '\t') && (! char_7bit || *buf <= 127)) { ++buf; ++curlen; |
