#include <stdio.h>
#include "fegetopt.h"
Go to the source code of this file.
|
char * | getenv () |
|
static size_t | my_strlen (const char *str) |
|
static const char * | my_index (const char *str, int chr) |
|
static void | exchange (char **argv) |
|
int | _fe_getopt_internal (int argc, char *const *argv, const char *optstring, const struct fe_option *longopts, int *longind, int long_only) |
|
int | fe_getopt (int argc, char *const *argv, const char *optstring) |
|
int | fe_getopt_long (int argc, char *const *argv, const char *options, const struct fe_option *long_options, int *opt_index) |
|
int | fe_getopt_long_only (int argc, char *const *argv, const char *options, const struct fe_option *long_options, int *opt_index) |
|
◆ _NO_PROTO
◆ BAD_OPTION
◆ const
◆ anonymous enum
Enumerator |
---|
REQUIRE_ORDER | |
PERMUTE | |
RETURN_IN_ORDER | |
Definition at line 161 of file fegetopt.c.
◆ _fe_getopt_internal()
Definition at line 325 of file fegetopt.c.
332{
334
336
337
338
339
340
341
343 {
345
347
348
349
351 {
354 }
356 {
359 }
362 else
364 }
365
367 {
369 {
370
371
372
377
378
379
380
387 )
390 }
391
392
393
394
395
396
398 {
400
406
408 }
409
410
411
412
414 {
415
416
420 }
421
422
423
424
430 )
431 {
435 return 1;
436 }
437
438
439
440
443 }
444
448#ifdef GETOPT_COMPAT
450#endif
451 ))
452 {
459
460 while (*
s && *
s !=
'=')
462
463
467 {
469 {
470
474 break;
475 }
477 {
478
481 }
482 else
483
485 }
486
488 {
495 }
496
498 {
502 {
503
504
507 else
508 {
510 {
512
514 "%s: option `--%s' doesn't allow an argument\n",
516 else
517
519 "%s: option `%c%s' doesn't allow an argument\n",
521 }
524 }
525 }
526 else if (
pfound->has_arg == 1)
527 {
530 else
531 {
537 }
538 }
543 }
544
545
546
547
553 {
555 {
557
560 else
561
564 }
568 }
569 }
570
571
572
573 {
576
577
580
582 {
584 {
585#if 0
587 fprintf (
stderr,
"%s: unrecognized option, character code 0%o\n",
589 else
591#else
592
594#endif
595 }
598 }
600 {
602 {
603
605 {
608 }
609 else
612 }
613 else
614 {
615
617 {
619
620
622 }
624 {
626 {
627#if 0
630#else
631
634#endif
635 }
638 c = ':';
639 else
641 }
642 else
643
644
647 }
648 }
649 return c;
650 }
651}
const CanonicalForm int s
static void exchange(char **argv)
static size_t my_strlen(const char *str)
static const char * my_index(const char *str, int chr)
◆ exchange()
Definition at line 243 of file fegetopt.c.
244{
246
247
250 while (first <
last) {
252 }
253
257 while (first <
last) {
259 }
260
261
265 while (first <
last) {
267 }
268}
◆ fe_getopt()
Definition at line 653 of file fegetopt.c.
657{
660 (int *) 0,
661 0);
662}
int _fe_getopt_internal(int argc, char *const *argv, const char *optstring, const struct fe_option *longopts, int *longind, int long_only)
◆ fe_getopt_long()
◆ fe_getopt_long_only()
◆ getenv()
◆ my_index()
Definition at line 198 of file fegetopt.c.
199{
200 while (*str)
201 {
203 return (
const char *)
str;
205 }
206 return 0;
207}
◆ my_strlen()
Definition at line 190 of file fegetopt.c.
191{
192 size_t n = 0;
193 while (*str++)
194 n++;
195 return n;
196}
◆ fe_optarg
◆ fe_opterr
◆ fe_optind
◆ fe_optopt
◆ first_nonopt
◆ last_nonopt
◆ nextchar
◆ []