pspsdk-1.0+beta2
getopt_long.c File Reference
#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for getopt_long.c:

Macros

#define IGNORE_FIRST   (*options == '-' || *options == '+')
#define PRINT_ERROR
#define IS_POSIXLY_CORRECT   (getenv("POSIXLY_CORRECT") != NULL)
#define PERMUTE   (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
#define IN_ORDER   (!IS_POSIXLY_CORRECT && *options == '-')
#define BADCH   (int)'?'
#define BADARG
#define INORDER   (int)1
#define EMSG   ""

Functions

int getopt_long (int nargc, char *const *nargv, const char *options, const struct option *long_options, int *idx)

Variables

int opterr = 1
int optind = 1
int optopt = '?'
int optreset
char * optarg

Macro Definition Documentation

#define BADARG
Value:
((IGNORE_FIRST && options[1] == ':') \
|| (*options == ':') ? (int)':' : (int)'?')

Referenced by getopt_long().

#define BADCH   (int)'?'

Referenced by getopt_long().

#define EMSG   ""

Referenced by getopt_long().

#define IGNORE_FIRST   (*options == '-' || *options == '+')
#define IN_ORDER   (!IS_POSIXLY_CORRECT && *options == '-')
#define INORDER   (int)1
#define IS_POSIXLY_CORRECT   (getenv("POSIXLY_CORRECT") != NULL)
#define PERMUTE   (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
#define PRINT_ERROR
Value:
((opterr) && ((*options != ':') \
|| (IGNORE_FIRST && options[1] != ':')))

Referenced by getopt_long().

Function Documentation

int getopt_long ( int  nargc,
char *const *  nargv,
const char *  options,
const struct option long_options,
int *  idx 
)

Variable Documentation

char* optarg

Referenced by getopt_long(), and process_args().

int opterr = 1
int optind = 1

Referenced by getopt_long(), and process_args().

int optopt = '?'

Referenced by getopt_long().

int optreset