File: vertest.cc

package info (click to toggle)
wvstreams 4.6.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 6,820 kB
  • ctags: 7,837
  • sloc: cpp: 64,203; ansic: 4,154; sh: 4,094; makefile: 549; perl: 402
file content (22 lines) | stat: -rw-r--r-- 799 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Worldvisions Weaver Software:
 *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
 * 
 * Version number and string manipulations.  Version numbers are 32-bit
 * hexadecimal numbers such as 0x00012a00.  The first 16 bits are the major
 * version, and the second 16 bits are the (fractional) minor version.  For
 * example, the above example corresponds to version "1.2a" (which is the
 * version string).
 */
#include "verstring.h"
#include <stdio.h>

int main()
{
    printf("%s %08x\n", ver_to_string(0x99998888), string_to_ver("1.0"));
    printf("%s %08x\n", ver_to_string(0x01a00200), string_to_ver(".02a"));
    printf("%s %08x\n", ver_to_string(0x00001000), string_to_ver("1b"));
    printf("%s %08x\n", ver_to_string(0x00000000), string_to_ver("1A."));
    
    return 0;
}