Annotation of libaitmqtt/example/test_declen.c, revision 1.1.1.1.16.1

1.1       misho       1: #include <stdio.h>
                      2: #include <stdlib.h>
                      3: #include <netinet/in.h>
1.1.1.1.16.1! misho       4: #include <limits.h>
        !             5: #include <aitmqtt.h>
1.1       misho       6: 
                      7: int
                      8: main(int argc, char **argv)
                      9: {
                     10:        unsigned int x;
                     11:        unsigned char *p = (unsigned char*) &x;
                     12:        int s;
                     13: 
                     14:        if (argc < 2)
                     15:                return 1;
                     16:        else
                     17:                x = strtol(argv[1], NULL, 0);
                     18: 
                     19:        printf("decode:: (wire)-> %02x %02x %02x %02x ", p[0], p[1], p[2], p[3]);
                     20:        x = mqtt_decodeLen(&x, &s);
                     21:        printf("length is x=%u sizeof=%d\n", x, s);
                     22: 
                     23:        return 0;
                     24: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>