summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-05-06 23:21:08 +0000
committerjbj <devnull@localhost>1999-05-06 23:21:08 +0000
commit331076d9a13f4625650fbde1f517b8320ab5a432 (patch)
treec774dc7048f23980b6e9775e6c6e59bb4544a936 /lib
parent5df8ebee630e9cbc6dfaea72925a7be596bd44f3 (diff)
downloadrpm-331076d9a13f4625650fbde1f517b8320ab5a432.tar.gz
rpm-331076d9a13f4625650fbde1f517b8320ab5a432.tar.bz2
rpm-331076d9a13f4625650fbde1f517b8320ab5a432.zip
Add argument to specedit to choose between specs and powertools packages.
CVS patchset: 3051 CVS date: 1999/05/06 23:21:08
Diffstat (limited to 'lib')
-rw-r--r--lib/query.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/query.c b/lib/query.c
index 39a745ee7..a5cab38c8 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -424,7 +424,7 @@ static void showMatches(rpmdb db, dbiIndexSet matches, int queryFlags,
}
}
-extern int specedit;
+extern char * specedit;
static void
printNewSpecfile(Spec spec)
@@ -437,8 +437,6 @@ printNewSpecfile(Spec spec)
if (sl == NULL || st == NULL)
return;
-#define SPECSPACKAGE "specs"
-
for (i = 0; i < st->st_ntags; i++) {
char *msgstr;
struct spectag *t;
@@ -452,7 +450,7 @@ printNewSpecfile(Spec spec)
sprintf(buf, "%s(%s)", n, tagName(t->t_tag));
t->t_msgid = strdup(buf);
}
- msgstr = strdup(dgettext(SPECSPACKAGE, t->t_msgid));
+ msgstr = strdup(dgettext(specedit, t->t_msgid));
switch(t->t_tag) {
case RPMTAG_SUMMARY:
@@ -565,7 +563,7 @@ int rpmQuery(const char * prefix, enum rpmQuerySources source, int queryFlags,
break;
}
- if (specedit) {
+ if (specedit != NULL) {
printNewSpecfile(spec);
freeSpec(spec);
retcode = 0;