~ubuntu-branches/ubuntu/gutsy/plotutils/gutsy

« back to all changes in this revision

Viewing changes to lib/getopt.c

  • Committer: Bazaar Package Importer
  • Author(s): Floris Bruynooghe
  • Date: 2007-05-10 19:48:54 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070510194854-mrr3lgwzpxd8hovo
Tags: 2.5-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
   the new indices of the non-options in ARGV after they are moved.  */
120
120
 
121
121
static void
122
 
#ifdef _HAVE_PROTOS
123
122
exchange (char **argv)
124
 
#else
125
 
exchange (argv)
126
 
     char **argv;
127
 
#endif
128
123
{
129
124
  int bottom = first_nonopt;
130
125
  int middle = last_nonopt;
181
176
/* Initialize the internal data when the first call is made.  */
182
177
 
183
178
static const char *
184
 
#ifdef _HAVE_PROTOS
185
179
_getopt_initialize (const char *optstring)
186
 
#else
187
 
_getopt_initialize (optstring)
188
 
     const char *optstring;
189
 
#endif
190
180
{
191
181
  /* Start processing options with ARGV-element 1 (since ARGV-element 0
192
182
     is the program name); the sequence of previously skipped
273
263
   long-named options.  */
274
264
 
275
265
int
276
 
#ifdef _HAVE_PROTOS
277
266
_getopt_internal (int argc, char *const *argv, const char *optstring, 
278
267
                  const struct option *longopts, int *longind, int long_only)
279
 
#else
280
 
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
281
 
     int argc;
282
 
     char *const *argv;
283
 
     const char *optstring;
284
 
     const struct option *longopts;
285
 
     int *longind;
286
 
     int long_only;
287
 
#endif
288
268
{
289
269
  optarg = NULL;
290
270
 
573
553
}
574
554
 
575
555
int
576
 
#ifdef _HAVE_PROTOS
577
556
gnu_getopt (int argc, char *const *argv, const char *optstring)
578
 
#else
579
 
gnu_getopt (argc, argv, optstring)
580
 
     int argc;
581
 
     char *const *argv;
582
 
     const char *optstring;
583
 
#endif
584
557
{
585
558
  return _getopt_internal (argc, argv, optstring,
586
559
                           (const struct option *) 0,