Changeset 23118 for trunk/psphot/src/psphotVersion.c
- Timestamp:
- Mar 3, 2009, 3:20:48 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotVersion.c
r12805 r23118 1 # include "psphotInternal.h"1 #include "psphotInternal.h" 2 2 3 # if (HAVE_KAPA) 4 # include <kapa.h> 5 # endif 6 7 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name 3 #ifdef HAVE_KAPA 4 #include <kapa.h> 5 #endif 8 6 9 7 psString psphotVersion(void) 10 8 { 11 psString version = NULL; // Version, to return 12 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 13 return version; 9 #ifndef PSPHOT_VERSION 10 #error "PSPHOT_VERSION is not set" 11 #endif 12 #ifndef PSPHOT_BRANCH 13 #error "PSPHOT_BRANCH is not set" 14 #endif 15 return psStringCopy(PSPHOT_BRANCH "@" PSPHOT_VERSION); 16 } 17 18 psString psphotSource(void) 19 { 20 #ifndef PSPHOT_SOURCE 21 #error "PSPHOT_SOURCE is not set" 22 #endif 23 return psStringCopy(PSPHOT_SOURCE); 14 24 } 15 25 16 26 psString psphotVersionLong(void) 17 27 { 18 psString version = psphotVersion(); // Version, to return 19 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag 20 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 28 psString version = psLibVersion(); // Version, to return 29 psString source = psLibSource(); // Source 21 30 22 # if (HAVE_KAPA) 23 psString ohanaVersion = psStringStripCVS (ohana_version(), "Name");24 ps String libdvoVersion = psStringStripCVS (libdvo_version(), "Name");31 psStringPrepend(&version, "psphot "); 32 psStringAppend(&version, " from %s, built %s, %s", source, __DATE__, __TIME__); 33 psFree(source); 25 34 26 psStringAppend (&version, " with libkapa (ohana %s, libdvo: %s)", ohanaVersion, libdvoVersion); 27 psFree (ohanaVersion); 28 psFree (libdvoVersion); 29 # else 30 psStringAppend (&version, " WITHOUT libkapa"); 31 # endif 35 #ifdef __OPTIMIZE__ 36 psStringAppend(&version, " optimised"); 37 #else 38 psStringAppend(&version, " unoptimised"); 39 #endif 32 40 33 psFree(tag); 41 #ifdef HAVE_KAPA 42 #if 0 43 // XXX Need to get ohana and libdvo versions 44 psString ohanaVersion = psStringStripCVS(ohana_version(), "Name"); 45 psString libdvoVersion = psStringStripCVS(libdvo_version(), "Name"); 46 psStringAppend(&version, " with libkapa (ohana %s, libdvo: %s)", ohanaVersion, libdvoVersion); 47 psFree(ohanaVersion); 48 psFree(libdvoVersion); 49 #else 50 psStringAppend(&version, " with libkapa"); 51 #endif 52 53 #else 54 psStringAppend (&version, " without libkapa"); 55 #endif 56 34 57 return version; 35 58 } 36 37 // Defined by RHL; leaving for backwards compatibility.38 const char *psphotCVSName(void) {39 return cvsTag;40 }
Note:
See TracChangeset
for help on using the changeset viewer.
