/**************************************************************************** * NAME: App_Version.c *---------------------------------------------------------------------------- * Copyright (c) DIGITAL STREAM Technology Inc. *---------------------------------------------------------------------------- * CREATED_BY: Do Gon Lee * CREATION_DATE: 2009/08/24 * $Author: foxhunt $ * $Revision: 1.0 $ * $Date: 2009/08/24 10:39:43 $ *---------------------------------------------------------------------------- * PURPOSE: * - build date/time and sw version/project name definition file. *****************************************************************************/ /*_____ I N C L U D E __________________________________________*/ #include "App_Main.h" #include "App_Version.h" #include "App_Revision.h" // ÁÖÀÇ!! ÀÌ Çì´õ ÆÄÀÏÀº makefile¿¡¼­ ÀÚµ¿ »ý¼ºµÊ. /*_____ D E F I N I T I O N ____________________________________*/ #if COMMENT _____DbgPrint_____(){} #endif #if COMMENT ____Config____(){} #endif #if COMMENT ____Types____(){} #endif #if COMMENT ____Variables____(){} #endif /*_____ F U N C T I O N ________________________________________*/ const char *App_GetSwVersion(void) { return APP_SW_VERSION; } // 2010.04.15 foxhunt : build date & timeÀ» µû·Î Ç¥±âÇϹǷÎ, APP_BUILD_NUMBER »ç¿ëÇÏÁö ¾Ê±â·Î ÇÑ´Ù. const char *App_GetBuildNumber(void) { return APP_BUILD_NUMBER; } const char *App_GetPrjName(void) { const char *project_names[] = APP_PRJ_ID_NAME_TABLE; if ((UINT32)APP_PRJ_ID >= sizeof(project_names)/sizeof(project_names[0])) { DHL_ASSERT(FALSE, "APP_PRJ_ID is invalid"); } return project_names[APP_PRJ_ID]; } /* cafrii 081223 add if revision string is just digits (ex: "340"), then this local copy is exactly same as svn repository. if revision string has '+' sign at the end (ex: "340+3"), this working copy is not same as repo, but it has some changed files. last digit means the number of changed files. */ const char *App_GetRevision(void) { static char rev[100]; /* ¿©±â¼­´Â ProjectÀ̸§¿¡ »ó°ü ¾øÀÌ ¸ðµÎ NEO_xxx ¶ó´Â prefix¸¦ »ç¿ëÇÑ´Ù. svn repositoryÀÇ À̸§Àº NEO À̰í, Neo, Trinity, Udcp ¸ðµÎ neo svn ¿¡¼­ °ü¸®µÇ±â ¶§¹®. */ #if defined (NEO_SW_REVISION) sprintf(rev, "%d", NEO_SW_REVISION); #else strcpy(rev, "0"); #endif #if defined (NEO_SW_LOCALPATCH) if (NEO_SW_LOCALPATCH) sprintf(rev+strlen(rev), "+%d", NEO_SW_LOCALPATCH); #endif return rev; } /* "Dec 10 2009" ¿Í °°Àº Çü½ÄÀ» "2009/12/10" Çü½ÄÀ¸·Î º¯°æÇÔ. */ const char *App_GetBuildDateString(void) { #if 0 static char s_buf[32]; char stryear[10], strmonth[10], strday[10]; int i, month = 0; const char *month_name[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; sscanf(__DATE__, "%s %s %s", strmonth, strday, stryear); for (i=0; i<12; i++) { if (strncmp(strmonth, month_name[i], 3) == 0) month = i+1; } sprintf(s_buf, "%s/%u/%s", stryear, month, strday); #endif return "2013 May 2 "; } const char *App_GetBuildTimeString(void) { return __TIME__; } const char *App_GetBuildDateTimeString(void) { return ""; } /* end of file */