summaryrefslogtreecommitdiff
path: root/query.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1997-01-17 22:56:22 +0000
committerewt <devnull@localhost>1997-01-17 22:56:22 +0000
commit3366d6c2e0f027256860db99b562627aa6db3088 (patch)
treeee37d44376c154016b90f68171387714d1a49587 /query.c
parent10ac1065199e0ddfd51fd25fcb9cb9472b2220a7 (diff)
downloadrpm-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/query.c b/query.c
index 46e1f7caf..9bdd32e85 100644
--- a/query.c
+++ b/query.c
@@ -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)));