nulib2/nufxlib/Version.c
Andy McFadden 9666ebd97a Move method return type to declaration line
Having the method name up against the left edge used to be common
practice, because you could jump to a method quickly by searching
for "^name".  Now we have "ctags" and IDEs.
2014-12-22 16:00:33 -08:00

42 lines
1.1 KiB
C

/*
* NuFX archive manipulation library
* Copyright (C) 2000-2007 by Andy McFadden, All Rights Reserved.
* This is free software; you can redistribute it and/or modify it under the
* terms of the BSD License, see the file COPYING-LIB.
*/
#include "NufxLibPriv.h"
/* executable was build on or after this date */
#ifdef __DATE__
static const char gNuBuildDate[] = __DATE__;
#else
static const char gNuBuildDate[] = "??? ?? ????";
#endif
#ifdef OPTFLAGSTR
static const char gNuBuildFlags[] = OPTFLAGSTR;
#else
static const char gNuBuildFlags[] = "-";
#endif
/*
* Return the version number, date built, and build flags.
*/
NuError Nu_GetVersion(long* pMajorVersion, long* pMinorVersion,
long* pBugVersion, const char** ppBuildDate, const char** ppBuildFlags)
{
if (pMajorVersion != NULL)
*pMajorVersion = kNuVersionMajor;
if (pMinorVersion != NULL)
*pMinorVersion = kNuVersionMinor;
if (pBugVersion != NULL)
*pBugVersion = kNuVersionBug;
if (ppBuildDate != NULL)
*ppBuildDate = gNuBuildDate;
if (ppBuildFlags != NULL)
*ppBuildFlags = gNuBuildFlags;
return kNuErrNone;
}