Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "gecos missing (solar)" <solar@g.o>
Subject: gentoo-projects commit in portage-utils: qlist.c
Date: Sat, 08 Sep 2007 06:31:48 +0000
solar       07/09/08 06:31:48

  Modified:             qlist.c
  Log:
  Add -L option to use : as the slot separator. example: qlist -CSqL

Revision  Changes    Path
1.46                 portage-utils/qlist.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?r1=1.45&r2=1.46

Index: qlist.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- qlist.c	24 May 2007 14:47:18 -0000	1.45
+++ qlist.c	8 Sep 2007 06:31:48 -0000	1.46
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2007 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v 1.45 2007/05/24 14:47:18 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v 1.46 2007/09/08 06:31:48 solar Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@g.o>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@g.o>
@@ -10,10 +10,11 @@
 
 #ifdef APPLET_qlist
 
-#define QLIST_FLAGS "ISUDeados" COMMON_FLAGS
+#define QLIST_FLAGS "ISULDeados" COMMON_FLAGS
 static struct option const qlist_long_opts[] = {
 	{"installed", no_argument, NULL, 'I'},
 	{"slots",     no_argument, NULL, 'S'},
+	{"separator", no_argument, NULL, 'L'},
 	{"umap",      no_argument, NULL, 'U'},
 	{"dups",      no_argument, NULL, 'D'},
 	{"exact",     no_argument, NULL, 'e'},
@@ -27,6 +28,7 @@
 static const char *qlist_opts_help[] = {
 	"Just show installed packages",
 	"Display installed packages with slots",
+	"Display : as the slot separator",
 	"Display installed packages with flags used",
 	"Only show package dups",
 	"Exact match (only CAT/PN or PN without PV)",
@@ -37,7 +39,7 @@
 	/* "query filename for pkgname", */
 	COMMON_OPTS_HELP
 };
-static const char qlist_rcsid[] = "$Id: qlist.c,v 1.45 2007/05/24 14:47:18 solar Exp $";
+static const char qlist_rcsid[] = "$Id: qlist.c,v 1.46 2007/09/08 06:31:48 solar Exp $";
 #define qlist_usage(ret) usage(ret, QLIST_FLAGS, qlist_long_opts, qlist_opts_help, lookup_applet_idx("qlist"))
 
 extern char *grab_vdb_item(const char *, const char *, const char *);
@@ -141,6 +143,9 @@
 	char swap[_Q_PATH_MAX];
 	queue *sets = NULL;
 	depend_atom *pkgname, *atom;
+	char *slot_separator;
+
+	slot_separator = (char *) " ";
 
 	DBG("argc=%d argv[0]=%s argv[1]=%s",
 	    argc, argv[0], argc > 1 ? argv[1] : "NULL?");
@@ -152,6 +157,7 @@
 		COMMON_GETOPTS_CASES(qlist)
 		case 'a': qlist_all = 1;
 		case 'I': just_pkgname = 1; break;
+		case 'L': slot_separator = (char *) ":"; break;
 		case 'S': just_pkgname = 1; show_slots = 1; break;
 		case 'U': just_pkgname = 1; show_umap = 1; break;
 		case 'e': exact = 1; break;
@@ -243,7 +249,7 @@
 					/* display it */
 					printf("%s%s/%s%s%s%s%s%s%s", BOLD, cat[j]->d_name, BLUE,
 					       (pkgname ? pkgname->PN : de[x]->d_name), NORM,
-						YELLOW, slot ? " ": "", slot ? slot : "", NORM);
+						YELLOW, slot ? slot_separator : "", slot ? slot : "", NORM);
 					puts(umapstr(show_umap, cat[j]->d_name, de[x]->d_name));
 				}
 				if (pkgname)



-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-projects commit in portage-utils/man: qlist.1
Next by thread:
gentoo-projects commit in portage-utils: qlist.c
Previous by date:
gentoo-projects commit in portage-utils/man: qlist.1
Next by date:
gentoo-x86 commit in x11-libs/libX11: ChangeLog libX11-1.1.3.ebuild


Updated Apr 14, 2011

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.