File:  [ELWIX - Embedded LightWeight unIX -] / libaitio / example / Attic / astvar.c
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Thu Feb 10 22:01:33 2011 UTC (13 years, 4 months ago) by misho
Branches: MAIN
CVS tags: io2_2, io2_1, io2_0, io1_9, io1_8, io1_7, io1_6, io1_5, IO2_1, IO2_0, IO1_9, IO1_8, IO1_7, IO1_6, IO1_5, IO1_4, HEAD
final version

#include <stdio.h>
#include <aitio.h>

int
main(int argc, char **argv)
{
	char *str;

	if (argc < 2) {
		printf("Syntax: %s <var (like {99999[:9:9]})>\n", argv[0]);
		return 1;
	}

	str = ioVarAst(argv[1]);
	if (!str) {
		printf("#%d - %s\n", io_GetErrno(), io_GetError());
		return 1;
	}

	printf(">>> %s\n", str);

	free(str);
	return 0;
}

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