/* * fhist - file history and comparison tools * Copyright (C) 1991-1994, 1998-2000, 2002 Peter Miller; * All rights reserved. * * Derived from a work * Copyright (C) 1990 David I. Bell. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * * MANIFEST: operating system entry point, and parse arguments * * fcomp - a file comparison program */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include enum { arglex_token_binary, arglex_token_binary_not, arglex_token_blank, arglex_token_context, arglex_token_debug, arglex_token_edit, arglex_token_failures, arglex_token_join, arglex_token_line_numbers, arglex_token_matching, arglex_token_output, arglex_token_quiet, arglex_token_spaces, arglex_token_upcase, arglex_token_verbose, arglex_token_what, }; static arglex_table_ty argtab[] = { { "-BINary", arglex_token_binary, }, { "-No_BINary", arglex_token_binary_not, }, { "-Blank", arglex_token_blank, }, { "-Context", arglex_token_context, }, { "-Debug", arglex_token_debug, }, { "-Edit", arglex_token_edit, }, { "-Failures", arglex_token_failures, }, { "-Join", arglex_token_join, }, { "-Number", arglex_token_line_numbers, }, { "-Matching", arglex_token_matching, }, { "-Output", arglex_token_output, }, { "-Quiet", arglex_token_quiet, }, { "-Spaces", arglex_token_spaces, }, { "-Upcase", arglex_token_upcase, }, { "-Verbose", arglex_token_verbose, }, { "-What", arglex_token_what, }, { 0, 0, }, /* end marker */ }; /* * Type out the possible commands. */ static void usage(void) { char *progname; progname = progname_get(); fprintf(stderr, "usage: %s [