Browse Source

Change formatting to match the rest of the file.

Ian Jackson 19 years ago
parent
commit
b31f79e7ef
2 changed files with 37 additions and 32 deletions
  1. 5 0
      ChangeLog
  2. 32 32
      src/archives.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2007-07-31  Ian Jackson  <iwj@ubuntu.com>
+
+	* src/archives.c (quote_filename): Change formatting to match the
+	rest of the file (tab -> 2 spaces).
+
 2007-07-25  Guillem Jover  <guillem@debian.org>
 
 	* scripts/changelog/debian.pl: Switch from 'dpkg-gettext.pl' to

+ 32 - 32
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 */