head 1.5; access; symbols INITIAL:1.1.1.1 VENDOR:1.1.1; locks; strict; comment @ * @; 1.5 date 2003.02.16.11.39.23; author rse; state Exp; branches; next 1.4; 1.4 date 2002.08.27.19.04.33; author rse; state Exp; branches; next 1.3; 1.3 date 2002.08.23.15.33.18; author rse; state Exp; branches; next 1.2; 1.2 date 2002.08.03.10.23.41; author rse; state Exp; branches; next 1.1; 1.1 date 2002.01.21.13.32.35; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.01.21.13.32.35; author rse; state Exp; branches; next ; desc @@ 1.5 log @update copyright messages for new year 2003 @ text @/* ** OSSP path - Filesystem Path Manipulation ** Copyright (c) 2002-2003 Ralf S. Engelschall ** Copyright (c) 2002-2003 The OSSP Project ** Copyright (c) 2002-2003 Cable & Wireless Deutschland ** ** This file is part of OSSP path, a filesystem path manipulation library ** which can be found at http://www.ossp.org/pkg/lib/path/. ** ** Permission to use, copy, modify, and distribute this software for ** any purpose with or without fee is hereby granted, provided that ** the above copyright notice and this permission notice appear in all ** copies. ** ** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ** SUCH DAMAGE. ** ** path_test.c: test suite */ #include #include #include #include #include #include #include "path.h" static void usage(const char *argv0, const char *error) { if (error != NULL) fprintf(stderr, "error: %s\n", error); fprintf(stderr, "usage: %s abs2rel []\n", argv0); fprintf(stderr, "usage: %s rel2abs []\n", argv0); fprintf(stderr, "usage: %s resolve \n", argv0); fprintf(stderr, "usage: %s dirname \n", argv0); fprintf(stderr, "usage: %s basename \n", argv0); fprintf(stderr, "usage: %s temp dir|file [