options.c File Reference

#include "shell.h"
#include "options.h"
#include "nodes.h"
#include "eval.h"
#include "jobs.h"
#include "input.h"
#include "output.h"
#include "trap.h"
#include "var.h"
#include "memalloc.h"
#include "error.h"
#include "mystring.h"

Include dependency graph for options.c:

Go to the source code of this file.

Defines

#define DEFINE_OPTIONS

Functions

STATIC void options ()
STATIC void setoption ()
void procargs (argc, char **argv)
STATIC void options (cmdline)
STATIC void setoption (char flag, int val)
void setparam (char **argv)
void freeparam (struct shparam *param)
 shiftcmd (argc, char **argv)
 setcmd (argc, char **argv)
 getoptscmd (argc, char **argv)
int nextopt (char *optstring)

Variables

static char sccsid [] = "@(#)options.c 5.2 (Berkeley) 3/13/91"
char * arg0
shparam shellparam
char ** argptr
char * optarg
char * optptr
int editable
char * minusc


Define Documentation

#define DEFINE_OPTIONS
 

Definition at line 42 of file options.c.


Function Documentation

void freeparam struct shparam param  ) 
 

Definition at line 236 of file options.c.

References ckfree.

Referenced by setparam().

getoptscmd argc  ,
char **  argv
 

Definition at line 304 of file options.c.

References argc, c, error, fmtstr(), NULL, shparam::optnext, shparam::optptr, out, out1fmt(), shparam::p, s, setvar(), and shellparam.

int nextopt char *  optstring  ) 
 

Definition at line 368 of file options.c.

References argptr, c, error, NULL, and optptr.

Referenced by cdcmd(), and readcmd().

STATIC void options cmdline   ) 
 

Definition at line 128 of file options.c.

References argptr, c, cmdline(), error, minusc, NULL, p, setoption(), setparam(), val, vflag, and xflag.

STATIC void options  ) 
 

Referenced by do_waitpid(), main(), procargs(), and setcmd().

void procargs argc  ,
char **  argv
 

Definition at line 81 of file options.c.

References arg0, argc, argptr, commandname, editable, iflag, isatty, jflag, minusc, NULL, options(), optval, p, setinputfile(), and sflag.

Referenced by main().

setcmd argc  ,
char **  argv
 

Definition at line 282 of file options.c.

References argc, argptr, iflag, INTOFF, INTON, jflag, NULL, options(), setinteractive(), setjobctl, setparam(), and showvarscmd().

STATIC void setoption char  flag,
int  val
 

Definition at line 180 of file options.c.

References error, NULL, optchar, optval, p, and strchr.

STATIC void setoption  ) 
 

Referenced by main(), and options().

void setparam char **  argv  ) 
 

Definition at line 210 of file options.c.

References ckmalloc(), freeparam(), shparam::malloc, shparam::nparam, NULL, shparam::optnext, shparam::p, savestr, and shellparam.

Referenced by options(), setcmd(), and tryexec().

shiftcmd argc  ,
char **  argv
 

Definition at line 254 of file options.c.

References argc, ckfree, INTOFF, INTON, shparam::malloc, n, shparam::nparam, NULL, number, shparam::optnext, shparam::p, and shellparam.


Variable Documentation

char* arg0
 

Definition at line 56 of file options.c.

Referenced by add(), addpath(), bail_out(), distribute(), enter(), finddev(), heaperr(), main(), makeold(), master(), parse(), perr(), procargs(), receive(), report(), request(), rread(), setflags(), setmodes(), slave(), tryexec(), usage(), and Usage().

char** argptr
 

Definition at line 58 of file options.c.

int editable
 

Definition at line 61 of file options.c.

Referenced by procargs(), and putprompt().

char* minusc
 

Definition at line 63 of file options.c.

Referenced by main(), options(), and procargs().

char* optarg
 

Definition at line 59 of file options.c.

Referenced by cpio_options(), file_open(), getoldopt(), getopt(), main(), mcopy(), mdoctorfat(), mformat(), mlabel(), mmd(), mmove(), mpartition(), pax_options(), process_command_line(), readcmd(), and tar_options().

char* optptr
 

Definition at line 60 of file options.c.

Referenced by make_pack(), and nextopt().

char sccsid[] = "@(#)options.c 5.2 (Berkeley) 3/13/91" [static]
 

Definition at line 38 of file options.c.

struct shparam shellparam
 

Definition at line 57 of file options.c.

Referenced by evalvar(), getoptscmd(), setparam(), shiftcmd(), varisset(), and varvalue().


Generated on Fri Apr 14 22:58:59 2006 for minix by  doxygen 1.4.6