Lines Matching refs:newflags
147 Shopt_t newflags;
153 newflags=ap->sh->options;
214 off_option(&newflags,SH_VI);
215 off_option(&newflags,SH_EMACS);
216 off_option(&newflags,SH_GMACS);
238 if(!(o&SH_COMMANDLINE) && is_option(&newflags,o&0xff))
239 off_option(&newflags,o&0xff);
246 on_option(&newflags,SH_NOEXEC);
299 off_option(&newflags,SH_VI);
300 off_option(&newflags,SH_EMACS);
301 off_option(&newflags,SH_GMACS);
303 on_option(&newflags,o);
315 off_option(&newflags,o);
327 off_option(&newflags,SH_XTRACE);
328 off_option(&newflags,SH_VERBOSE);
336 sh_printopts(newflags,verbose,0);
354 else if(is_option(&newflags,SH_CFLAG))
366 sh_applyopts(ap->sh,newflags);
393 void sh_applyopts(Shell_t* shp,Shopt_t newflags)
397 off_option(&newflags,SH_NOEXEC);
398 if(is_option(&newflags,SH_PRIVILEGED))
399 on_option(&newflags,SH_NOUSRPROFILE);
400 if(!sh_isstate(SH_INIT) && is_option(&newflags,SH_PRIVILEGED) != sh_isoption(SH_PRIVILEGED) || sh_isstate(SH_INIT) && is_option(&((Arg_t*)shp->arg_context)->sh->offoptions,SH_PRIVILEGED) && shp->gd->userid!=shp->gd->euserid)
402 if(!is_option(&newflags,SH_PRIVILEGED))
415 off_option(&newflags,SH_PRIVILEGED);
418 on_option(&newflags,SH_CMDHIST);
419 on_option(&newflags,SH_CHECKHASH);
420 on_option(&newflags,SH_EXECFAIL);
421 on_option(&newflags,SH_EXPAND_ALIASES);
422 on_option(&newflags,SH_HISTAPPEND);
423 on_option(&newflags,SH_INTERACTIVE_COMM);
424 on_option(&newflags,SH_LITHIST);
425 on_option(&newflags,SH_NOEMPTYCMDCOMPL);
427 if(!is_option(&newflags,SH_XPG_ECHO) && sh_isoption(SH_XPG_ECHO))
429 if(is_option(&newflags,SH_XPG_ECHO) && !sh_isoption(SH_XPG_ECHO))
431 if(!is_option(&newflags,SH_PHYSICAL) && sh_isoption(SH_PHYSICAL))
433 if(is_option(&newflags,SH_PHYSICAL) && !sh_isoption(SH_PHYSICAL))
435 if(is_option(&newflags,SH_HISTORY2) && !sh_isoption(SH_HISTORY2))
440 if(!is_option(&newflags,SH_HISTORY2) && sh_isoption(SH_HISTORY2))
446 shp->options = newflags;