From cd4af8eb78c30718f999c487c93e257bbd969cb1 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 11 Nov 2013 15:54:29 +0100 Subject: add data type validator Signed-off-by: John Crispin --- validate_data.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 validate_data.c (limited to 'validate_data.c') diff --git a/validate_data.c b/validate_data.c new file mode 100644 index 0000000..dc5e96b --- /dev/null +++ b/validate_data.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "libvalidate.h" + +int main(int argc, char **argv) +{ + bool rv; + + if (argc == 3) { + rv = dt_parse(argv[1], argv[2]); + + printf("%s - %s = %s\n", argv[1], argv[2], rv ? "true" : "false"); + + return rv ? 0 : 1; + } else if (argc > 3) { + + } + + return 0; +} -- cgit v1.2.3