#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "aitmqtt.h"
int
main(int argc, char **argv)
{
mqtt_subscr_t *v, *p;
u_char qoses[] = { 1, 0, 2, 6, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0 };
register int i;
if (argc < 2)
return 1;
v = mqtt_str2sub((const char**) argv, 0, qoses);
for (p = v; p->sub_topic.msg_base; p++)
printf("size=%hd %s qos=%d\n", p->sub_topic.msg_len, (char*) p->sub_topic.msg_base, p->sub_ret);
mqtt_subFree(&v);
v = mqtt_subAlloc(10);
for (p = v; p->sub_topic.msg_base; p++)
printf("i=%d\n", i++);
mqtt_subFree(&v);
return 0;
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>