File:
[ELWIX - Embedded LightWeight unIX -] /
libaitmqtt /
example /
exptop.c
Revision
1.2:
download - view:
text,
annotated -
select for diffs -
revision graph
Wed Jun 20 15:02:23 2012 UTC (12 years, 6 months ago) by
misho
Branches:
MAIN
CVS tags:
mqtt1_8,
mqtt1_7,
mqtt1_6,
mqtt1_5,
mqtt1_4,
mqtt1_3,
mqtt1_2,
MQTT1_7,
MQTT1_6,
MQTT1_5,
MQTT1_4,
MQTT1_3,
MQTT1_2,
MQTT1_1,
HEAD
version 1.1
#include <stdio.h>
#include <string.h>
#include <aitmqtt.h>
int
main(int argc, char **argv)
{
int len;
char blah[BUFSIZ] = { 0 };
if (argc < 2)
return 1;
len = strlen(argv[1]);
printf("input=%s %d\n", argv[1], len);
len = mqtt_expandTopic(argv[1], blah, sizeof blah, 1, 0);
printf("regex)result=%s ret=%d\n", blah, len);
len = mqtt_sqlTopic(argv[1], blah, sizeof blah);
printf("sql)result=%s ret=%d\n", blah, len);
return 0;
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>