[darwinbuild-changes] [36] trunk/darwinxref/main.c

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 4 01:39:57 PDT 2006


Revision: 36
          http://trac.macosforge.org/projects/darwinbuild/changeset/36
Author:   kevin
Date:     2006-10-04 01:39:57 -0700 (Wed, 04 Oct 2006)

Log Message:
-----------
- added "info" command

Modified Paths:
--------------
    trunk/darwinxref/main.c

Modified: trunk/darwinxref/main.c
===================================================================
--- trunk/darwinxref/main.c	2005-07-07 22:44:41 UTC (rev 35)
+++ trunk/darwinxref/main.c	2006-10-04 08:39:57 UTC (rev 36)
@@ -32,6 +32,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include "sqlite3.h"
 
 #include "DBPluginPriv.h"
 
@@ -74,6 +75,15 @@
 	argc -= optind;
 	argv += optind;
 
+	// special built-in command
+	if (argc == 1 && strcmp(argv[0], "info") == 0) {
+		printf("%s/%s\n", basename(progname), "" VERSION "");
+		printf("\tcurrent build: %s\n", build);
+		printf("\tsqlite/%s (%s)\n", sqlite3_version, "UTF-8");
+		printf("\tCoreFoundation/%g%s\n", kCFCoreFoundationVersionNumber, NSIsSymbolNameDefined("_CFNotificationCenterGetTypeID") ? "" : " (CF-Lite)");
+		exit(1);
+	}
+
 	DBDataStoreInitialize(dbfile);
 	DBSetCurrentBuild(build);
 	DBPluginLoadPlugins(plugins);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/30adbf10/attachment.html


More information about the darwinbuild-changes mailing list