Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Got rid of type-casting into isFOO() and toFOO() functions by
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
f529adb
..
f7ccc00
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-90,7
+90,6
@@
struct {
{ 0, NULL }
};
{ 0, NULL }
};
-
/*
* Map from rsync error code to name, or return NULL.
*/
/*
* Map from rsync error code to name, or return NULL.
*/
@@
-215,11
+214,11
@@
static void filtered_fwrite(FILE *f, const char *buf, int len, int use_isprint)
for (s = buf; s < end; s++) {
if ((s < end - 4
&& *s == '\\' && s[1] == '#'
for (s = buf; s < end; s++) {
if ((s < end - 4
&& *s == '\\' && s[1] == '#'
- && is
digit(*(uchar*)(s+2)
)
- && is
digit(*(uchar*)(s+3)
)
- && is
digit(*(uchar*)(s+4)
))
+ && is
Digit(s + 2
)
+ && is
Digit(s + 3
)
+ && is
Digit(s + 4
))
|| (*s != '\t'
|| (*s != '\t'
- && ((use_isprint && !is
print(*(uchar*)
s))
+ && ((use_isprint && !is
Print(
s))
|| *(uchar*)s < ' '))) {
if (s != buf && fwrite(buf, s - buf, 1, f) != 1)
exit_cleanup(RERR_MESSAGEIO);
|| *(uchar*)s < ' '))) {
if (s != buf && fwrite(buf, s - buf, 1, f) != 1)
exit_cleanup(RERR_MESSAGEIO);
@@
-386,7
+385,7
@@
void rsyserr(enum logcode code, int errcode, const char *format, ...)
char buf[BIGPATHBUFLEN];
size_t len;
char buf[BIGPATHBUFLEN];
size_t len;
- str
cpy(buf, RSYNC_NAME ": "
);
+ str
lcpy(buf, RSYNC_NAME ": ", sizeof buf
);
len = (sizeof RSYNC_NAME ": ") - 1;
va_start(ap, format);
len = (sizeof RSYNC_NAME ": ") - 1;
va_start(ap, format);
@@
-446,7
+445,7
@@
static void log_formatted(enum logcode code, char *format, char *op,
n = fmt + 1;
if (*p == '-')
*n++ = *p++;
n = fmt + 1;
if (*p == '-')
*n++ = *p++;
- while (is
digit(*(uchar*)
p) && n - fmt < (int)(sizeof fmt) - 8)
+ while (is
Digit(
p) && n - fmt < (int)(sizeof fmt) - 8)
*n++ = *p++;
if (!*p)
break;
*n++ = *p++;
if (!*p)
break;
@@
-536,15
+535,15
@@
static void log_formatted(enum logcode code, char *format, char *op,
case 'L':
if (hlink && *hlink) {
n = hlink;
case 'L':
if (hlink && *hlink) {
n = hlink;
- str
cpy(buf2, " => "
);
+ str
lcpy(buf2, " => ", sizeof buf2
);
} else if (S_ISLNK(file->mode) && file->u.link) {
n = file->u.link;
} else if (S_ISLNK(file->mode) && file->u.link) {
n = file->u.link;
- str
cpy(buf2, " -> "
);
+ str
lcpy(buf2, " -> ", sizeof buf2
);
} else {
n = "";
if (!fmt[1])
break;
} else {
n = "";
if (!fmt[1])
break;
- str
cpy(buf2, " "
);
+ str
lcpy(buf2, " ", sizeof buf2
);
}
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2 + 4, sizeof buf2 - 4, fmt, n);
}
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2 + 4, sizeof buf2 - 4, fmt, n);
@@
-678,7
+677,7
@@
int log_format_has(const char *format, char esc)
for (p = format; (p = strchr(p, '%')) != NULL; ) {
if (*++p == '-')
p++;
for (p = format; (p = strchr(p, '%')) != NULL; ) {
if (*++p == '-')
p++;
- while (is
digit(*(uchar*)
p))
+ while (is
Digit(
p))
p++;
if (!*p)
break;
p++;
if (!*p)
break;