options.h (8f0ea33f2bbf3a6aa80235f0a02fa5f2780c2b17) | options.h (22ea47ec90b51ecbe6d2883ccee30d312c162044) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 59 unchanged lines hidden (view full) --- 68#define NOPTS 19 69 70struct optent { 71 const char *name; 72 const char letter; 73 char val; 74}; 75 | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 59 unchanged lines hidden (view full) --- 68#define NOPTS 19 69 70struct optent { 71 const char *name; 72 const char letter; 73 char val; 74}; 75 |
76extern struct optent optlist[NOPTS]; |
|
76#ifdef DEFINE_OPTIONS 77struct optent optlist[NOPTS] = { 78 { "errexit", 'e', 0 }, 79 { "noglob", 'f', 0 }, 80 { "ignoreeof", 'I', 0 }, 81 { "interactive",'i', 0 }, 82 { "monitor", 'm', 0 }, 83 { "noexec", 'n', 0 }, --- 6 unchanged lines hidden (view full) --- 90 { "allexport", 'a', 0 }, 91 { "notify", 'b', 0 }, 92 { "nounset", 'u', 0 }, 93 { "privileged", 'p', 0 }, 94 { "trapsasync", 'T', 0 }, 95 { "physical", 'P', 0 }, 96 { "trackall", 'h', 0 }, 97}; | 77#ifdef DEFINE_OPTIONS 78struct optent optlist[NOPTS] = { 79 { "errexit", 'e', 0 }, 80 { "noglob", 'f', 0 }, 81 { "ignoreeof", 'I', 0 }, 82 { "interactive",'i', 0 }, 83 { "monitor", 'm', 0 }, 84 { "noexec", 'n', 0 }, --- 6 unchanged lines hidden (view full) --- 91 { "allexport", 'a', 0 }, 92 { "notify", 'b', 0 }, 93 { "nounset", 'u', 0 }, 94 { "privileged", 'p', 0 }, 95 { "trapsasync", 'T', 0 }, 96 { "physical", 'P', 0 }, 97 { "trackall", 'h', 0 }, 98}; |
98#else 99extern struct optent optlist[NOPTS]; | |
100#endif 101 102 103extern char *minusc; /* argument to -c option */ 104extern char *arg0; /* $0 */ 105extern struct shparam shellparam; /* $@ */ 106extern char **argptr; /* argument list for builtin commands */ 107extern char *shoptarg; /* set by nextopt */ 108extern char *nextopt_optptr; /* used by nextopt */ 109 110void procargs(int, char **); 111void optschanged(void); 112void setparam(char **); 113void freeparam(struct shparam *); 114int nextopt(const char *); 115void getoptsreset(const char *); | 99#endif 100 101 102extern char *minusc; /* argument to -c option */ 103extern char *arg0; /* $0 */ 104extern struct shparam shellparam; /* $@ */ 105extern char **argptr; /* argument list for builtin commands */ 106extern char *shoptarg; /* set by nextopt */ 107extern char *nextopt_optptr; /* used by nextopt */ 108 109void procargs(int, char **); 110void optschanged(void); 111void setparam(char **); 112void freeparam(struct shparam *); 113int nextopt(const char *); 114void getoptsreset(const char *); |