Fix a bug in the (unused) RTS/CTS code; Clarify documentation.
[bertos.git] / verstag.h
index 6b62baee7d01f10484c5a971dfc34603298e342c..7ebe2c8718bd0d8b5303cddd70b2fc46aeda8278 100755 (executable)
--- a/verstag.h
+++ b/verstag.h
@@ -1,9 +1,9 @@
 /*!
  * \file
  * <!--
- * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2001,2002,2003 by Bernardo Innocenti <bernie@codewiz.org>
- * All Rights Reserved.
+ * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2001, 2002, 2003 by Bernardo Innocenti <bernie@codewiz.org>
+ * This file is part of DevLib - See devlib/README for information.
  * -->
  *
  * \version $Id$
  *
  * \brief Define version strings
  */
-#ifndef VERSTAG_H
-#define VERSTAG_H
+#ifndef DEVLIB_VERSTAG_H
+#define DEVLIB_VERSTAG_H
 
 #ifndef ARCH_CONFIG_H
        #include "arch_config.h"
 #endif
 
+#define APP_NAME "Appname"
+#define APP_DESCRIPTION "Long application name description"
+#define APP_AUTHOR "Develer"
+#define APP_COPYRIGHT "Copyright (C) 2004 by Develer (http://www.develer.com/)"
+
 #if (ARCH & ARCH_FOO)
        #define VERS_MAJOR 0
        #define VERS_MINOR 1
        #error unknown architecture
 #endif
 
+/*!
+ * If _SNAPSHOT is defined, VERSION_TAG build the version using the compilation
+ * date instead of building the numeric version string.
+ */
+#define _SNAPSHOT
+
 #ifdef _DEBUG
        #define VERS_DBG "D"
 #else
        #define VERS_DBG ""
 #endif
 
-#define _MAKE_VERS(maj,min,rev)        #maj "." #min "." #rev VERS_LETTER VERS_DBG
-#define MAKE_VERS(maj,min,rev) _MAKE_VERS(maj,min,rev)
+#define _STRINGIZE(a) #a
+/*! Build application version string (i.e.: "1.7.0") */
+#define MAKE_VERS(maj,min,rev) _STRINGIZE(maj) "." _STRINGIZE(min) "." _STRINGIZE(rev) VERS_LETTER VERS_DBG
+#ifdef _SNAPSHOT
+       #define VERSION_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG
+#else
+       #define VERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
+#endif
 
-#define VERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
+/*! Build application version string suitable for MS windows resource files (i.e.: "1, 7, 0, 1") */
+#define MAKE_RCVERS(maj,min,rev,bld) _STRINGIZE(maj) ", " _STRINGIZE(min) ", " _STRINGIZE(rev) ", " _STRINGIZE(bld)
+#define RCVERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
 
-#endif /* VERSTAG_H */
+#endif /* DEVLIB_VERSTAG_H */