~ubuntu-branches/ubuntu/natty/eglibc/natty-security

« back to all changes in this revision

Viewing changes to posix/getopt1.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-08-03 10:17:12 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20090803101712-n74r7xge7cwubmka
Tags: upstream-2.10.1
ImportĀ upstreamĀ versionĀ 2.10.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* getopt_long and getopt_long_only entry points for GNU getopt.
2
 
   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004
3
 
     Free Software Foundation, Inc.
 
2
   Copyright (C) 1987-1994,1996-1998,2004,2009 Free Software Foundation, Inc.
4
3
   This file is part of the GNU C Library.
5
4
 
6
5
   The GNU C Library is free software; you can redistribute it and/or
64
63
getopt_long (int argc, char *const *argv, const char *options,
65
64
             const struct option *long_options, int *opt_index)
66
65
{
67
 
  return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
 
66
  return _getopt_internal (argc, argv, options, long_options, opt_index, 0, 0);
68
67
}
69
68
 
70
69
int
73
72
                struct _getopt_data *d)
74
73
{
75
74
  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
76
 
                             0, d);
 
75
                             0, d, 0);
77
76
}
78
77
 
79
78
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
85
84
getopt_long_only (int argc, char *const *argv, const char *options,
86
85
                  const struct option *long_options, int *opt_index)
87
86
{
88
 
  return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
 
87
  return _getopt_internal (argc, argv, options, long_options, opt_index, 1, 0);
89
88
}
90
89
 
91
90
int
94
93
                     struct _getopt_data *d)
95
94
{
96
95
  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
97
 
                             1, d);
 
96
                             1, d, 0);
98
97
}
99
98
 
100
99
#endif  /* Not ELIDE_CODE.  */