1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00
libpsyc/test/isRoutingVar.c

27 lines
463 B
C

#include <psyc.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
int main(int argc, char** argv)
{
const char* vars[] =
{
"_source",
"_source_relay",
"_source_foo",
"_sourcherry",
"_foo",
"bar",
"_",
};
int i;
for (i = 0; i < sizeof(vars) / sizeof(*vars); i++)
{
printf(">> %s: %ld %ld\n", vars[i], sizeof(vars[i]), sizeof(*vars[i]));
printf("%s: %d\n", vars[i], PSYC_isRoutingVar(vars[i], strlen(vars[i])));
}
return 0;
}