strod.c revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen/* ***** BEGIN LICENSE BLOCK *****
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * The contents of this file are subject to the Mozilla Public License Version
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * 1.1 (the "License"); you may not use this file except in compliance with
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * the License. You may obtain a copy of the License at
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * Software distributed under the License is distributed on an "AS IS" basis,
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * for the specific language governing rights and limitations under the
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * The Original Code is the Netscape Portable Runtime (NSPR).
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * The Initial Developer of the Original Code is
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * Netscape Communications Corporation.
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * Portions created by the Initial Developer are Copyright (C) 1998-2000
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * the Initial Developer. All Rights Reserved.
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * Contributor(s):
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * Alternatively, the contents of this file may be used under the terms of
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * either the GNU General Public License Version 2 or later (the "GPL"), or
2bb0656f94af82b1ff5e3e77a99b4427c52e4953rbowen * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * in which case the provisions of the GPL or the LGPL are applicable instead
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * of those above. If you wish to allow use of your version of this file only
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * under the terms of either the GPL or the LGPL, and not to allow others to
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * use your version of this file under the terms of the MPL, indicate your
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * decision by deleting the provisions above and replace them with the notice
5727d620998bb261ce947ba5f530c94f3e464ae8rbowen * and other provisions required by the GPL or the LGPL. If you do not delete
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * the provisions above, a recipient may use your version of this file under
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * the terms of any one of the MPL, the GPL or the LGPL.
4a1711ab536d965e63d7be80e29f912287fe70b2rbowen * ***** END LICENSE BLOCK ***** */
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowenstatic void Help(void)
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen PR_fprintf(err, "Usage: /.strod [-n n] [-l n] [-h]\n");
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen PR_fprintf(err, "\t-n n Number to translate (default: 1234567890123456789)\n");
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen PR_fprintf(err, "\t-l n Times to loop the test (default: 1)\n");
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen PR_fprintf(err, "\t-h This message and nothing else\n");
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen} /* Help */
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowenstatic PRIntn PR_CALLBACK RealMain(PRIntn argc, char **argv)
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen PLOptState *opt = PL_CreateOptState(argc, argv, "hc:l:");
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen PR_fprintf(err, "\tNumber to translate %s\n", number);
7ff40e17761fc92c8480c9403e5404927c4c6c23rbowen} /* main */