From: ewt Date: Fri, 17 Jan 1997 22:56:22 +0000 (+0000) Subject: added :octal for int32 and int16 X-Git-Tag: rpm-4.4-release~4411 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3366d6c2e0f027256860db99b562627aa6db3088;p=platform%2Fupstream%2Frpm.git added :octal for int32 and int16 CVS patchset: 1324 CVS date: 1997/01/17 22:56:22 --- diff --git a/query.c b/query.c index 46e1f7c..9bdd32e 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)));