diff options
author | ewt <devnull@localhost> | 1997-01-17 22:56:22 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1997-01-17 22:56:22 +0000 |
commit | 3366d6c2e0f027256860db99b562627aa6db3088 (patch) | |
tree | ee37d44376c154016b90f68171387714d1a49587 /query.c | |
parent | 10ac1065199e0ddfd51fd25fcb9cb9472b2220a7 (diff) | |
download | rpm-3366d6c2e0f027256860db99b562627aa6db3088.tar.gz rpm-3366d6c2e0f027256860db99b562627aa6db3088.tar.bz2 rpm-3366d6c2e0f027256860db99b562627aa6db3088.zip |
added :octal for int32 and int16
CVS patchset: 1324
CVS date: 1997/01/17 22:56:22
Diffstat (limited to 'query.c')
-rw-r--r-- | query.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -264,6 +264,9 @@ static char * handleFormat(Header h, char * chptr, int * cntptr, if (!strcmp(how, "perms") || !strcmp(how, "permissions")) { strcat(format, "s"); printf(format, permsString(*(((int_16 *) p) + arrayNum))); + } else if (!strcmp(how, "octal")) { + strcat(format, "#o"); + printf(format, *(((int_16 *) p) + arrayNum) & 0xFFFF); } else { strcat(format, "d"); printf(format, *(((int_16 *) p) + arrayNum)); @@ -287,6 +290,9 @@ static char * handleFormat(Header h, char * chptr, int * cntptr, if (anint & RPMFILE_CONFIG) strcat(buf, "c"); printf(format, buf); + } else if (!strcmp(how, "octal")) { + strcat(format, "#o"); + printf(format, *(((int_32 *) p) + arrayNum)); } else if (!strcmp(how, "perms") || !strcmp(how, "permissions")) { strcat(format, "s"); printf(format, permsString(*(((int_32 *) p) + arrayNum))); |