/* pbmextras.c - wrapper program for merged pbmextras executables ** ** Copyright (C) 1991, 1994, 1999 by Jef Poskanzer. ** ** Permission to use, copy, modify, and distribute this software and its ** documentation for any purpose and without fee is hereby granted, provided ** that the above copyright notice appear in all copies and that both that ** copyright notice and this permission notice appear in supporting ** documentation. This software is provided "as is" without express or ** implied warranty. */ #include #include "pnm.h" int main( int argc, char* argv[] ) { register char* cp; again: if ( ( cp = rindex( argv[0], '/' ) ) != (char*) 0 ) ++cp; else cp = argv[0]; if ( strcmp( cp, "pbmextras" ) == 0 ) { ++argv; --argc; goto again; } #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) exit( m( argc, argv ) ); }