File: aliastest.cc

package info (click to toggle)
wvstreams 4.6.1-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,420 kB
  • sloc: cpp: 64,196; ansic: 4,154; sh: 4,025; makefile: 546; perl: 402
file content (37 lines) | stat: -rw-r--r-- 579 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Worldvisions Weaver Software:
 *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
 *
 * WvIPAliaser test program.
 *
 */

#include "wvipaliaser.h"

int main()
{
    free(malloc(1));
    
    WvIPAliaser a, b;
    
    a.start_edit();
    a.add("1.2.3.4");
    b.start_edit();
    a.add("1.2.3.4");
    b.add("2.4.6.5");
    b.add("3.4.5.6");
    b.add("1.2.3.4");
    b.done_edit();
    a.done_edit();

    a.dump(); b.dump();

    a.start_edit();
    a.add("1.2.3.5");
    a.add("1.2.3.6");
    a.done_edit();
    
    a.dump(); b.dump();
    
    return 0;
}