File:  [ELWIX - Embedded LightWeight unIX -] / libaitio / example / Attic / astvar.c
Revision 1.1.2.1: download - view: text, annotated - select for diffs - revision graph
Thu Feb 10 19:44:57 2011 UTC (13 years, 4 months ago) by misho
Branches: io1_4
add new example

    1: #include <stdio.h>
    2: #include <aitio.h>
    3: 
    4: int
    5: main(int argc, char **argv)
    6: {
    7: 	char *str;
    8: 
    9: 	if (argc < 2) {
   10: 		printf("Syntax: %s <var (like {99999[:9:9]})>\n", argv[0]);
   11: 		return 1;
   12: 	}
   13: 
   14: 	str = ioVarAst(argv[1]);
   15: 	if (!str) {
   16: 		printf("#%d - %s\n", io_GetErrno(), io_GetError());
   17: 		return 1;
   18: 	}
   19: 
   20: 	printf(">>> %s\n", str);
   21: 
   22: 	free(str);
   23: 	return 0;
   24: }

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