Skip to content

Commit

Permalink
Added xstr macro to help versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
emcconville committed Jun 20, 2015
1 parent c3f7f04 commit 8d0bff1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cif/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,11 @@ void listFilterArgumentsFor(NSString * filterName)

#pragma mark - Application

#define xstr(s) str(s)
#define str(s) #s

#ifndef CIF_VERSION
#define CIF_VERSION "1.0"
#define CIF_VERSION 1.0
#endif

#ifndef CIF_RELEASE_DATE
Expand All @@ -593,9 +595,9 @@ void listFilterArgumentsFor(NSString * filterName)

void version() {
fprintf(stdout, _version,
CIF_VERSION,
CIF_RELEASE_DATE,
CIF_RELEASE_URL);
xstr(CIF_VERSION),
xstr(CIF_RELEASE_DATE),
xstr(CIF_RELEASE_URL));
}

static const char * _usage = ""
Expand All @@ -612,7 +614,7 @@ void usage() {
};


static const char * _help = ""
static const char * _help = "\n"
"Commands\n"
"--------\n"
"\n"
Expand All @@ -624,7 +626,7 @@ void usage() {
"list <CIFilter> Display description of Core Image filter, and list all input\n"
" parameters. Each parameter hints expected format, and default\n"
" value.\n"
"version, -v Print current version header."
"version, -v Print current version header.\n"
"\n"
"Types\n"
"-----\n"
Expand Down

0 comments on commit 8d0bff1

Please sign in to comment.