X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcommon.h;h=0cc15f90c4684c1b5613260fcf12281e10c2b05c;hb=72e5a9beb6f5b37fbb6018f661eda7e6aba49402;hp=7bdd84fc8d075a7351ada116d9b3cead783f58ce;hpb=7657bd43238f4d3f65d3f43cdf3b9da2b24a4c10;p=chaz%2Ftar diff --git a/src/common.h b/src/common.h index 7bdd84f..0cc15f9 100644 --- a/src/common.h +++ b/src/common.h @@ -28,6 +28,12 @@ #define PREFIX_FIELD_SIZE 155 #define UNAME_FIELD_SIZE 32 #define GNAME_FIELD_SIZE 32 + +/* FIXME */ +#define MAXOCTAL11 017777777777L +#define MAXOCTAL7 07777777 + + /* Some various global definitions. */ @@ -358,6 +364,8 @@ void check_links (void); #define TIME_TO_CHARS(val, where) time_to_chars (val, where, sizeof (where)) #define UID_TO_CHARS(val, where) uid_to_chars (val, where, sizeof (where)) #define UINTMAX_TO_CHARS(val, where) uintmax_to_chars (val, where, sizeof (where)) +#define UNAME_TO_CHARS(name,buf) string_to_chars (name, buf, sizeof(buf)) +#define GNAME_TO_CHARS(name,buf) string_to_chars (name, buf, sizeof(buf)) void gid_to_chars (gid_t, char *, size_t); void major_to_chars (major_t, char *, size_t); @@ -368,6 +376,7 @@ void size_to_chars (size_t, char *, size_t); void time_to_chars (time_t, char *, size_t); void uid_to_chars (uid_t, char *, size_t); void uintmax_to_chars (uintmax_t, char *, size_t); +void string_to_chars (char *, char *, size_t); /* Module diffarch.c. */ @@ -411,8 +420,9 @@ enum read_header struct xheader { - int nblocks; - union block *blocks; + struct obstack *stk; + size_t size; + char *buffer; }; GLOBAL struct xheader extended_header; @@ -532,10 +542,10 @@ void xpipe (int[2]); extern struct name *gnu_list_name; -void gid_to_gname (gid_t, char gname[GNAME_FIELD_SIZE]); -int gname_to_gid (char gname[GNAME_FIELD_SIZE], gid_t *); -void uid_to_uname (uid_t, char uname[UNAME_FIELD_SIZE]); -int uname_to_uid (char uname[UNAME_FIELD_SIZE], uid_t *); +void gid_to_gname (gid_t, char **gname); +int gname_to_gid (char *gname, gid_t *); +void uid_to_uname (uid_t, char **uname); +int uname_to_uid (char *uname, uid_t *); void init_names (void); void name_add (const char *);