---
tar.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/tar.c b/tar.c
index 3481942..3de49fb 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -35,8 +35,8 @@ enum {
};
enum Type {
- REG = '0', HARDLINK = '1', SYMLINK = '2', CHARDEV = '3',
- BLOCKDEV = '4', DIRECTORY = '5', FIFO = '6'
+ REG = '0', HARDLINK = '1', SYMLINK = '2', CHARDEV = '3',
+ BLOCKDEV = '4', DIRECTORY = '5', FIFO = '6'
};
static void putoctal(char *, unsigned, int);
_AT_@ -49,7 +49,7 @@ static void xt(int (*)(char*, int, char[Blksiz]));
static FILE *tarfile;
-static void
+static void
usage(void)
{
eprintf("usage: tar [-f tarfile] [-C dir] [-]x|t\n"
_AT_@ -58,7 +58,7 @@ usage(void)
" tar [-C dir] x|tf tarfile\n");
}
-int
+int
main(int argc, char *argv[])
{
char *file = NULL, *dir = ".", *ap;
_AT_@ -142,13 +142,13 @@ putoctal(char *dst, unsigned num, int n)
snprintf(dst, n, "%.*o", n-1, num);
}
-int
+int
strlcpy(char *dst, const char *src, int n)
{
return snprintf(dst, n, "%s", src);
}
-int
+int
archive(const char* path, const struct stat* sta, int type)
{
unsigned char b[Blksiz];
_AT_@ -209,10 +209,10 @@ archive(const char* path, const struct stat* sta, int type)
fwrite(b, Blksiz, 1, tarfile);
}
fclose(f);
- return 0;
+ return 0;
}
-int
+int
unarchive(char *fname, int l, char b[Blksiz])
{
char lname[101];
_AT_@ -255,7 +255,7 @@ unarchive(char *fname, int l, char b[Blksiz])
default:
fprintf(stderr, "usupported tarfiletype %c\n", h->type);
}
- if(getuid() == 0 && chown(fname, strtoul(h->uid, 0, 8),
+ if(getuid() == 0 && chown(fname, strtoul(h->uid, 0, 8),
strtoul(h->gid, 0, 8)))
perror(fname);
_AT_@ -269,7 +269,7 @@ unarchive(char *fname, int l, char b[Blksiz])
return 0;
}
-int
+int
print(char * fname, int l, char b[Blksiz])
{
puts(fname);
--
1.8.3.3
--EeQfGwPcQSOJBaQU--
Received on Mon Sep 17 2001 - 00:00:00 CEST
This archive was generated by hypermail 2.3.0 : Fri Jul 19 2013 - 18:12:05 CEST