WvStreams
wvverstring.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2004 Net Integration Technologies, Inc.
4 *
5 * Version number and string manipulations.
6 *
7 * The old version number was a 32-bit hexadecimal number, split into a 16-bit
8 * major version and a 16-bit minor version. For example, the old-style string
9 * equivalent of 0x00012a00 would be "1.2a".
10 *
11 * The new-style version number is a 32-bit hexadecimal number, split into
12 * an 8-bit major version, an 8-bit minor version, and a 16-bit revision
13 * number. The new-style string equivalent of 0x01020150 would be "1.02.0150".
14 */
15#ifndef __WVVERSTRING_H
16#define __WVVERSTRING_H
17
22const char *ver_to_string(unsigned int ver);
23
25const char *old_ver_to_string(unsigned int ver);
26
28const char *new_ver_to_string(unsigned int ver);
29
34unsigned int string_to_ver(const char *str);
35
37unsigned int string_to_old_ver(const char *str);
38
40unsigned int string_to_new_ver(const char *str);
41
48bool is_new_ver(unsigned int ver);
49
54bool is_new_verstr(const char *str);
55
59char *trim_verstr(char *verstr);
60
61#endif // __WVVERSTRING_H