1 |
solar 07/09/08 06:31:48 |
2 |
|
3 |
Modified: qlist.c |
4 |
Log: |
5 |
Add -L option to use : as the slot separator. example: qlist -CSqL |
6 |
|
7 |
Revision Changes Path |
8 |
1.46 portage-utils/qlist.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?rev=1.46&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?rev=1.46&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?r1=1.45&r2=1.46 |
13 |
|
14 |
Index: qlist.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v |
17 |
retrieving revision 1.45 |
18 |
retrieving revision 1.46 |
19 |
diff -u -r1.45 -r1.46 |
20 |
--- qlist.c 24 May 2007 14:47:18 -0000 1.45 |
21 |
+++ qlist.c 8 Sep 2007 06:31:48 -0000 1.46 |
22 |
@@ -1,7 +1,7 @@ |
23 |
/* |
24 |
* Copyright 2005-2007 Gentoo Foundation |
25 |
* Distributed under the terms of the GNU General Public License v2 |
26 |
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v 1.45 2007/05/24 14:47:18 solar Exp $ |
27 |
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v 1.46 2007/09/08 06:31:48 solar Exp $ |
28 |
* |
29 |
* Copyright 2005-2007 Ned Ludd - <solar@g.o> |
30 |
* Copyright 2005-2007 Mike Frysinger - <vapier@g.o> |
31 |
@@ -10,10 +10,11 @@ |
32 |
|
33 |
#ifdef APPLET_qlist |
34 |
|
35 |
-#define QLIST_FLAGS "ISUDeados" COMMON_FLAGS |
36 |
+#define QLIST_FLAGS "ISULDeados" COMMON_FLAGS |
37 |
static struct option const qlist_long_opts[] = { |
38 |
{"installed", no_argument, NULL, 'I'}, |
39 |
{"slots", no_argument, NULL, 'S'}, |
40 |
+ {"separator", no_argument, NULL, 'L'}, |
41 |
{"umap", no_argument, NULL, 'U'}, |
42 |
{"dups", no_argument, NULL, 'D'}, |
43 |
{"exact", no_argument, NULL, 'e'}, |
44 |
@@ -27,6 +28,7 @@ |
45 |
static const char *qlist_opts_help[] = { |
46 |
"Just show installed packages", |
47 |
"Display installed packages with slots", |
48 |
+ "Display : as the slot separator", |
49 |
"Display installed packages with flags used", |
50 |
"Only show package dups", |
51 |
"Exact match (only CAT/PN or PN without PV)", |
52 |
@@ -37,7 +39,7 @@ |
53 |
/* "query filename for pkgname", */ |
54 |
COMMON_OPTS_HELP |
55 |
}; |
56 |
-static const char qlist_rcsid[] = "$Id: qlist.c,v 1.45 2007/05/24 14:47:18 solar Exp $"; |
57 |
+static const char qlist_rcsid[] = "$Id: qlist.c,v 1.46 2007/09/08 06:31:48 solar Exp $"; |
58 |
#define qlist_usage(ret) usage(ret, QLIST_FLAGS, qlist_long_opts, qlist_opts_help, lookup_applet_idx("qlist")) |
59 |
|
60 |
extern char *grab_vdb_item(const char *, const char *, const char *); |
61 |
@@ -141,6 +143,9 @@ |
62 |
char swap[_Q_PATH_MAX]; |
63 |
queue *sets = NULL; |
64 |
depend_atom *pkgname, *atom; |
65 |
+ char *slot_separator; |
66 |
+ |
67 |
+ slot_separator = (char *) " "; |
68 |
|
69 |
DBG("argc=%d argv[0]=%s argv[1]=%s", |
70 |
argc, argv[0], argc > 1 ? argv[1] : "NULL?"); |
71 |
@@ -152,6 +157,7 @@ |
72 |
COMMON_GETOPTS_CASES(qlist) |
73 |
case 'a': qlist_all = 1; |
74 |
case 'I': just_pkgname = 1; break; |
75 |
+ case 'L': slot_separator = (char *) ":"; break; |
76 |
case 'S': just_pkgname = 1; show_slots = 1; break; |
77 |
case 'U': just_pkgname = 1; show_umap = 1; break; |
78 |
case 'e': exact = 1; break; |
79 |
@@ -243,7 +249,7 @@ |
80 |
/* display it */ |
81 |
printf("%s%s/%s%s%s%s%s%s%s", BOLD, cat[j]->d_name, BLUE, |
82 |
(pkgname ? pkgname->PN : de[x]->d_name), NORM, |
83 |
- YELLOW, slot ? " ": "", slot ? slot : "", NORM); |
84 |
+ YELLOW, slot ? slot_separator : "", slot ? slot : "", NORM); |
85 |
puts(umapstr(show_umap, cat[j]->d_name, de[x]->d_name)); |
86 |
} |
87 |
if (pkgname) |
88 |
|
89 |
|
90 |
|
91 |
-- |
92 |
gentoo-commits@g.o mailing list |