/***************************************************************************** * rand : write a randomization of files or stdin or parms to stdout * Usage: * blah | rand [-lw] [-o output file] * rand [-lw] -f [-o output file] * * Copyright (C) 1998-2004 Erik Greenwald * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. * ******************************************************************************/ /* * $Id: main.c,v 1.10 2004/02/18 21:37:28 erik Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #ifdef ENABLE_NLS # include #endif #include "help.h" #include "seed.h" #include "rand.h" #include "options.h" /* * The main function. * @param argc The number of arguments. * @param argv The arguments themselves, in an arrag of strings (char *). * @return The exit value (EXIT_SUCCESS or EXIT_FAILURE). */ int main (int argc, char **argv) { FILE *io_pipes[2]; #ifdef ENABLE_NLS bindtextdomain (PACKAGE, LOCALEDIR); bind_textdomain_codeset (PACKAGE, "UTF-8"); textdomain (PACKAGE); #endif seed (NULL); scramble (options (argc, argv, io_pipes), io_pipes); return EXIT_SUCCESS; }