1 /* $Id: tstcharmap.c,v 1.9 2007-05-21 07:15:06 adam Exp $
2 Copyright (C) 1995-2007
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 /* use env srcdir as base directory - or current directory if unset */
28 const char *get_srcdir(void)
30 const char *srcdir = getenv("srcdir");
31 if (!srcdir || ! *srcdir)
39 /* open existing map chrmaptab.chr */
40 chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */,
41 "tstcharmap.chr" /* file */,
44 chrmaptab_destroy(tab);
49 /* open non-existing nonexist.chr */
50 chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */,
51 "nonexist.chr" /* file */,
54 chrmaptab_destroy(tab);
57 int main(int argc, char **argv)
59 YAZ_CHECK_INIT(argc, argv);
71 * indent-tabs-mode: nil
73 * vim: shiftwidth=4 tabstop=8 expandtab