From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-776611-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 90FC6138A87 for <garchives@archives.gentoo.org>; Tue, 24 Feb 2015 01:26:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C1F05E08DA; Tue, 24 Feb 2015 01:26:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9EAC9E08D9 for <gentoo-commits@lists.gentoo.org>; Tue, 24 Feb 2015 01:26:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B673934095D for <gentoo-commits@lists.gentoo.org>; Tue, 24 Feb 2015 01:26:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A1C98126B6 for <gentoo-commits@lists.gentoo.org>; Tue, 24 Feb 2015 01:26:04 +0000 (UTC) From: "Mike Frysinger" <vapier@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" <vapier@gentoo.org> Message-ID: <1424628335.4992b64a6f726550801e8c56f19b98f209cc9651.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/ X-VCS-Repository: proj/portage-utils X-VCS-Files: libq/atom_explode.c X-VCS-Directories: libq/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 4992b64a6f726550801e8c56f19b98f209cc9651 X-VCS-Branch: master Date: Tue, 24 Feb 2015 01:26:04 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e21ad149-ec68-45d7-a0cb-5033d1f3dfe6 X-Archives-Hash: c5dc47a9c02cc82453eeacd6d990a09b commit: 4992b64a6f726550801e8c56f19b98f209cc9651 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Sun Feb 22 18:05:35 2015 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Sun Feb 22 18:05:35 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=4992b64a atom: add a print helper for debugging --- libq/atom_explode.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libq/atom_explode.c b/libq/atom_explode.c index daa18ac..9eb5695 100644 --- a/libq/atom_explode.c +++ b/libq/atom_explode.c @@ -40,6 +40,20 @@ typedef struct { char *P, *SLOT, *REPO; } depend_atom; +void atom_print(const depend_atom *atom); +void atom_print(const depend_atom *atom) +{ + if (atom->CATEGORY) + printf("%s/", atom->CATEGORY); + printf("%s", atom->P); + if (atom->PR_int) + printf("-r%i", atom->PR_int); + if (atom->SLOT) + printf(":%s", atom->SLOT); + if (atom->REPO) + printf("::%s", atom->REPO); +} + #ifdef _USE_CACHE static depend_atom *_atom_cache = NULL; static size_t _atom_cache_len = 0;