Annotation of researchv10no/ipc/libin/in_test.c, revision 1.1

1.1     ! root        1: #include <fio.h>
        !             2: main()
        !             3: {
        !             4:        char *hp, *np, *ap;
        !             5:        unsigned long x;
        !             6: 
        !             7:        print(">");
        !             8:        while(hp = Frdline(0)){
        !             9:                np = (char *)strchr(hp, ' ');
        !            10:                if(np) {
        !            11:                        *np++ = '\0';
        !            12:                        x = in_address(np);
        !            13:                        print("%s %ux\n", np, x);
        !            14:                        ap = (char *)qvalue("in", np, (char *)0);
        !            15:                        x = in_aton(ap);
        !            16:                        print("%s %ux\n", ap, x);
        !            17:                        x = (unsigned long)in_addronnet(hp, x, 0);
        !            18:                        print("%ux\n", x);
        !            19:                } else {
        !            20:                        x = (unsigned long)in_address(hp);
        !            21:                        print("%ux\n", x);
        !            22:                }
        !            23:                print(">");
        !            24:        }
        !            25: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.