WvStreams
wvverstring.h
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2004 Net Integration Technologies, Inc.
00004  *
00005  * Version number and string manipulations.
00006  *
00007  * The old version number was a 32-bit hexadecimal number, split into a 16-bit
00008  * major version and a 16-bit minor version.  For example, the old-style string
00009  * equivalent of 0x00012a00 would be "1.2a".
00010  *
00011  * The new-style version number is a 32-bit hexadecimal number, split into
00012  * an 8-bit major version, an 8-bit minor version, and a 16-bit revision
00013  * number.  The new-style string equivalent of 0x01020150 would be "1.02.0150".
00014  */
00015 #ifndef __WVVERSTRING_H
00016 #define __WVVERSTRING_H
00017 
00022 const char *ver_to_string(unsigned int ver);
00023 
00025 const char *old_ver_to_string(unsigned int ver);
00026 
00028 const char *new_ver_to_string(unsigned int ver);
00029 
00034 unsigned int string_to_ver(const char *str);
00035 
00037 unsigned int string_to_old_ver(const char *str);
00038 
00040 unsigned int string_to_new_ver(const char *str);
00041 
00048 bool is_new_ver(unsigned int ver);
00049 
00054 bool is_new_verstr(const char *str);
00055 
00059 char *trim_verstr(char *verstr);
00060 
00061 #endif // __WVVERSTRING_H