Return-Path: X-Original-To: apmail-corinthia-dev-archive@minotaur.apache.org Delivered-To: apmail-corinthia-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F84810BFF for ; Sun, 17 May 2015 23:49:48 +0000 (UTC) Received: (qmail 95297 invoked by uid 500); 17 May 2015 23:49:48 -0000 Delivered-To: apmail-corinthia-dev-archive@corinthia.apache.org Received: (qmail 95267 invoked by uid 500); 17 May 2015 23:49:48 -0000 Mailing-List: contact dev-help@corinthia.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@corinthia.incubator.apache.org Delivered-To: mailing list dev@corinthia.incubator.apache.org Received: (qmail 95255 invoked by uid 99); 17 May 2015 23:49:48 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 May 2015 23:49:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DC2AA1A2DFC for ; Sun, 17 May 2015 23:49:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.881 X-Spam-Level: X-Spam-Status: No, score=0.881 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_LIVE=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 9ljpewsBXdJg for ; Sun, 17 May 2015 23:49:39 +0000 (UTC) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id CDDA7428F6 for ; Sun, 17 May 2015 23:49:38 +0000 (UTC) Received: by wgjc11 with SMTP id c11so7316377wgj.0 for ; Sun, 17 May 2015 16:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=qwr1pd7Df9n2CTRHDH3LcmLx+SFqQjSBx5+LmknLzrE=; b=Bu4sWvy98cZ0djsb1QbaYHwweRWYW1TYhYAVyMOgagqDGbLhKNpShVDpxpgXcG1V9q R/R8q7RcQHhyd5e7oBeSeOjITvobk1IpcwajPPSHQPLEx3o9bVAER8zOSxYZBduyPY8P 3cMpUwwwzpzQeU8dusIP9AhE3A02zgHg41CgXoP95bozLDSg2Z1iBnQIBRDCyJ13Sn54 IFopeS4EdF07q5Ru7Ubb21Dw6FBNVQKmYB7X91DXrBHTrQa6/dr69cavXIEK1miUTwsS ibKYXOI2zsfZwBDfKzEO5pboCHOUYAN2HN3eQ+rWTgpRvrM9bkWldyKG9Kf7yxEvs7VE TzrA== MIME-Version: 1.0 X-Received: by 10.194.201.71 with SMTP id jy7mr38365774wjc.93.1431906533042; Sun, 17 May 2015 16:48:53 -0700 (PDT) Received: by 10.27.224.21 with HTTP; Sun, 17 May 2015 16:48:53 -0700 (PDT) Date: Mon, 18 May 2015 00:48:53 +0100 Message-ID: Subject: Colo(u)rs? From: Gabriela Gibson To: dev Content-Type: text/plain; charset=UTF-8 I made (for my branch) a color.c and a color.h, which can be handy if you're looking at a wall of text and want to spot something in particular without straining your eyes too much. It's easy to use: printf(MAGENTA "foo = %d" RESET, 5); will give you a nice 'foo = 5' magenta output. There's also stuff like blue("bar") which can be stuffed into other string functions. I wrangled it so that this feature can be turned on with a -D switch at compile time, ie, in CmakeLists.txt you can do: set(CMAKE_C_FLAGS "-std=c99 -D_GNU_SOURCE -g -fPIC -DCOLOR_ON=1") otherwise it's not going to show up. 1) Does anyone else other than me find this kind of thing useful? 2) Is it portable? 3) If 1 & 2, would you enjoy this dev debugging feature being added? G -- Visit my Coding Diary: http://gabriela-gibson.blogspot.com/