(file) Return to jsoc_version.h CVS log (file) (dir) Up to [Development] / JSOC / base

File: [Development] / JSOC / base / jsoc_version.h (download)
Revision: 1.134, Tue Feb 16 20:43:38 2021 UTC (2 years, 3 months ago) by arta
Branch: MAIN
Changes since 1.133: +2 -2 lines
Set the development version of the version macros for the 9.41 release.

/*
 *  jsoc_version.h
 *
 * Contains the master version, release and build number definition.
 *
 *  Responsible:  CM
 *
 * NOTE: !!!!!!!! This should only be modified by the CM !!!!!!!!!!!!
 *
 */

#ifndef JSOC_VERSION_INCL

#define JSOC_VERSION_INCL 1

#define jsoc_version "V9R41X"
#define jsoc_vers_num (-941)


static inline const char *jsoc_getversion(char *verstr, int size, int *isdev)
{
    char *vers = strdup(jsoc_version);
    char *pc = NULL;
    int len = strlen(jsoc_version);

    if (vers)
    {
        if (isdev)
        {
            *isdev = 0;
        }

        if ((pc = strchr(vers, 'R')) != NULL)
        {
            *pc = '\0';
        }

        if (jsoc_version[len - 1] == 'X')
        {
            if (isdev)
            {
                *isdev = 1;
            }

            vers[len - 1] = '\0';
        }

        snprintf(verstr, size, "%s.%s", vers + 1, pc + 1);

        free(vers);
    }
    else
    {
        fprintf(stderr, "Out of memory.\n");
    }

    return jsoc_version;
}

static inline const char *jsoc_get_make_root(void)
{
    return DRMS_MAKE_ROOT_DIRECTORY;
}

#endif

Karen Tian
Powered by
ViewCVS 0.9.4