From b31f79e7ef0e8b958442fbb55d08c11b404812ad Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 31 Jul 2007 04:17:02 +0300 Subject: [PATCH] Change formatting to match the rest of the file. --- ChangeLog | 5 ++++ src/archives.c | 64 +++++++++++++++++++++++++------------------------- 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab2de9fd..34e30384 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-31 Ian Jackson + + * src/archives.c (quote_filename): Change formatting to match the + rest of the file (tab -> 2 spaces). + 2007-07-25 Guillem Jover * scripts/changelog/debian.pl: Switch from 'dpkg-gettext.pl' to diff --git a/src/archives.c b/src/archives.c index 38e2b56a..826cbf3d 100644 --- a/src/archives.c +++ b/src/archives.c @@ -81,39 +81,39 @@ int cflict_index = 0; static char * quote_filename(char *buf, int size, char *s) { - char *r = buf; - while (size > 0) { - switch (*s) { - case '\0': - *buf = '\0'; - return r; - case '\\': - *buf++ = '\\'; - *buf++ = '\\'; - size -= 2; - break; - default: - if (((*s)&0x80) == 0) { - *buf++ = *s++; - --size; - } else { - if (size > 4) { - sprintf(buf, "\\%03o", - *(unsigned char *)s); - size -= 4; - buf += 4; - s++; - } else { - /* buffer full */ - *buf = '\0'; /* XXX */ - return r; - } - } - } - } - *buf = '\0'; /* XXX */ - return r; + char *r = buf; + while (size > 0) { + switch (*s) { + case '\0': + *buf = '\0'; + return r; + case '\\': + *buf++ = '\\'; + *buf++ = '\\'; + size -= 2; + break; + default: + if (((*s) & 0x80) == 0) { + *buf++ = *s++; + --size; + } else { + if (size > 4) { + sprintf(buf, "\\%03o", *(unsigned char *)s); + size -= 4; + buf += 4; + s++; + } else { + /* buffer full */ + *buf = '\0'; /* XXX */ + return r; + } + } + } + } + *buf = '\0'; /* XXX */ + + return r; } /* special routine to handle partial reads from the tarfile */ -- 2.39.5