1N/A/*********************************************************************** 1N/A* This software is part of the ast package * 1N/A* Copyright (c) 1982-2011 AT&T Intellectual Property * 1N/A* and is licensed under the * 1N/A* Common Public License, Version 1.0 * 1N/A* by AT&T Intellectual Property * 1N/A* A copy of the License is available at * 1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1N/A* Information and Software Systems Research * 1N/A* David Korn <dgk@research.att.com> * 1N/A***********************************************************************/ 1N/A * Rewritten by David Korn 1N/A * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. 1N/A#
endif /* SHOPT_KIA */ 1N/A/* The following order is determined by sh_optset */ 1N/A#
endif /* SHOPT_KIA */ 1N/A/* ======== option handling ======== */ 1N/A * This routine turns options on and off 1N/A * The options "PDicr" are illegal from set command. 1N/A * The -o option is used to set option by name 1N/A * This routine returns the number of non-option arguments 1N/A case 'O':
/* shopt options, only in bash mode */ 1N/A case 'o':
/* set options */ 1N/A /* print style: -O => shopt options 1N/A * bash => print unset options also, no heading 1N/A case -
1:
/* --rcfile */ 1N/A case -
2:
/* --noediting */ 1N/A case -
3:
/* --profile */ 1N/A case -
4:
/* --posix */ 1N/A /* mask lower 8 bits to find char in optksh string */ 1N/A case -
5:
/* --version */ 1N/A case -
6:
/* --default */ 1N/A#
endif /* SHOPT_KIA */ 1N/A#
endif /* SHOPT_REGRESS */ 1N/A /* check for '-' or '+' argument */ 1N/A /* handling SH_INTERACTIVE and SH_PRIVILEGED has been moved to 1N/A * sh_applyopts(), so that the code can be reused from b_shopt(), too 1N/A#
endif /* SHOPT_KIA */ 1N/A/* apply new options */ 1N/A /* cannot set -n for interactive shells since there is no way out */ 1N/A * returns the value of $- 1N/A * set up positional parameters 1N/A /* link into chain */ 1N/A * free the argument list if the use count is 1 1N/A * If count is greater than 1 decrement count and return same blk 1N/A * Free the argument list if the use count is 1 and return next blk 1N/A * Delete the blk from the argfor chain 1N/A * If flag is set, then the block dolh is not freed 1N/A /* delete from chain */ 1N/A * grab space for arglist and copy args 1N/A * The strings are copied after the argment vector 1N/A /* count args and number of bytes of arglist */ 1N/A * used to set new arguments for functions 1N/A * reset arguments as they were before function 1N/A * increase the use count so that an sh_argset will not make it go away 1N/A * Print option settings on standard output 1N/A * if mode is inclusive or of PRINT_* 1N/A * if <mask> is set, only options with this mask value are displayed 1N/A * build an argument list 1N/A /* see if the arguments have already been expanded */ 1N/A /* allow room to prepend args */ 1N/A /* reserve an extra null pointer */ 1N/A * create a real pipe (not a socket) and print message on failure 1N/A /* argument of the form <(cmd) or >(cmd) */ 1N/A/* Argument expansion */ 1N/A#
endif /* SHOPT_DEVFD */ 1N/A#
endif /* SHOPT_OPTIMIZE */