00001 /* 00002 00003 Copyright (C) 1996, 1997 John W. Eaton 00004 00005 This file is part of Octave. 00006 00007 Octave is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 2, or (at your option) any 00010 later version. 00011 00012 Octave is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Octave; see the file COPYING. If not, write to the Free 00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 00021 */ 00022 00023 #ifdef HAVE_CONFIG_H 00024 #include <config.h> 00025 #endif 00026 00027 #include "oct-getopt.h" 00028 00029 #include "prog-args.h" 00030 00031 int 00032 prog_args::getopt (void) 00033 { 00034 if (long_opts) 00035 return ::octave_getopt_long (xargc, xargv, short_opts, 00036 X_CAST (const struct option *, long_opts), 0); 00037 else 00038 return ::octave_getopt (xargc, xargv, short_opts); 00039 } 00040 00041 const char * 00042 prog_args::optarg (void) 00043 { 00044 return ::optarg; 00045 } 00046 00047 int 00048 prog_args::optind (void) 00049 { 00050 return ::optind; 00051 } 00052 00053 // This is intended to communicate to getopt that it is supposed to 00054 // start over on the next call, but it may not be portable. See the 00055 // comments in getopt.c for more information. 00056 00057 void 00058 prog_args::init (void) 00059 { 00060 ::optind = 0; 00061 } 00062 00063 /* 00064 ;;; Local Variables: *** 00065 ;;; mode: C++ *** 00066 ;;; End: *** 00067 */
SEO | [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送 | ||