OSDN Git Service

Update the address and phone number of the FSF organization.
[pf3gnuchains/gcc-fork.git] / libiberty / getopt.c
index 2402a39..d09ce5a 100644 (file)
@@ -21,7 +21,7 @@
 
    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-1307,
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
    USA.  */
 \f
 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
@@ -217,9 +217,7 @@ extern char *getenv ();
 #endif
 
 static char *
-my_index (str, chr)
-     const char *str;
-     int chr;
+my_index (const char *str, int chr)
 {
   while (*str)
     {
@@ -307,8 +305,7 @@ static void exchange (char **);
 #endif
 
 static void
-exchange (argv)
-     char **argv;
+exchange (char **argv)
 {
   int bottom = first_nonopt;
   int middle = last_nonopt;
@@ -333,8 +330,8 @@ exchange (argv)
        nonoption_flags_len = nonoption_flags_max_len = 0;
       else
        {
-         memset (__mempcpy (new_str, __getopt_nonoption_flags,
-                            nonoption_flags_max_len),
+         memset (mempcpy (new_str, __getopt_nonoption_flags,
+                          nonoption_flags_max_len),
                  '\0', top + 1 - nonoption_flags_max_len);
          nonoption_flags_max_len = top + 1;
          __getopt_nonoption_flags = new_str;
@@ -392,10 +389,7 @@ exchange (argv)
 static const char *_getopt_initialize (int, char *const *, const char *);
 #endif
 static const char *
-_getopt_initialize (argc, argv, optstring)
-     int argc;
-     char *const *argv;
-     const char *optstring;
+_getopt_initialize (int argc, char *const *argv, const char *optstring)
 {
   /* Start processing options with ARGV-element 1 (since ARGV-element 0
      is the program name); the sequence of previously skipped
@@ -444,7 +438,7 @@ _getopt_initialize (argc, argv, optstring)
              if (__getopt_nonoption_flags == NULL)
                nonoption_flags_max_len = -1;
              else
-               memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+               memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
                        '\0', nonoption_flags_max_len - len);
            }
        }
@@ -514,13 +508,9 @@ _getopt_initialize (argc, argv, optstring)
    long-named options.  */
 
 int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
-     int argc;
-     char *const *argv;
-     const char *optstring;
-     const struct option *longopts;
-     int *longind;
-     int long_only;
+_getopt_internal (int argc, char *const *argv, const char *optstring,
+                  const struct option *longopts,
+                  int *longind, int long_only)
 {
   optarg = NULL;
 
@@ -970,10 +960,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
 }
 
 int
-getopt (argc, argv, optstring)
-     int argc;
-     char *const *argv;
-     const char *optstring;
+getopt (int argc, char *const *argv, const char *optstring)
 {
   return _getopt_internal (argc, argv, optstring,
                           (const struct option *) 0,
@@ -989,9 +976,7 @@ getopt (argc, argv, optstring)
    the above definition of `getopt'.  */
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int c;
   int digit_optind = 0;