X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Fsrc%2Ftestintl.c;fp=t%2Fsrc%2Ftestintl.c;h=95a324cea7f2b59fafc852b63e9035754b7f0155;hb=836e96dc2e006b691d6a5d129003392dd583c8e1;hp=0000000000000000000000000000000000000000;hpb=e2dc61467fd3fa3692d580ffe86f78965bb8485e;p=gedcom-parse.git diff --git a/t/src/testintl.c b/t/src/testintl.c new file mode 100644 index 0000000..95a324c --- /dev/null +++ b/t/src/testintl.c @@ -0,0 +1,110 @@ +/* Test program for the Gedcom library. + Copyright (C) 2001, 2002 The Genes Development Team + This file is part of the Gedcom parser library. + Contributed by Peter Verthez , 2001. + + The Gedcom parser library is free software; you can redistribute it + and/or modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The Gedcom parser library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the Gedcom parser library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* $Id$ */ +/* $Name$ */ + +#include "gedcom.h" +#include +#include + +#define MYTEXTDOMAIN "TESTINTL" + +void gedcom_message_handler(Gedcom_msg_type type, char *msg) +{ + if (type == MESSAGE) + output(1, "MESSAGE: "); + else if (type == WARNING) + output(1, "WARNING: "); + else if (type == ERROR) + output(1, "ERROR: "); + output(1, "%s\n", msg); +} + +void show_help () +{ + printf("gedcom-parse test program for libgedcom\n\n"); + printf("Usage: testintl [options]\n"); + printf("Options:\n"); + printf(" -h Show this help text\n"); + printf(" -q No output to standard output\n"); + printf(" -o File to generate output to (def. testgedcom.out)\n"); +} + +int main(int argc, char* argv[]) +{ + int result; + char* outfilename = NULL; + + if (argc > 1) { + int i; + for (i=1; i