⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iffe

📁 su 的源代码库
💻
📖 第 1 页 / 共 5 页
字号:
						esac						x="$x$SEP$1"						SEP=$sep						shift					done					case $v in					'note{');;					*)	x="$x$nl" # \r\n bash needs this barf # ;;					esac					case $v in					'fail{')	fail=$x ;;					'nofail{')	pass=$x v='pass{' ;;					'nopass{')	fail=$x v='fail{' ;;					'no{')		no=$x ;;					'note{')	note=$x ;;					'pass{')	pass=$x ;;					'test{')	test=$x ;;					'yes{'|'{')	yes=$x ;;					*)		src=$x run=$v ;;					esac					;;				:)	shift					break					;;				*[\"\'\(\)\{\}\ \	]*)					case $op in					pth)	pth="$pth $1"						lst=pth						;;					*)	case $test in						'')	test=$1 ;;						*)	test="$test $1" ;;						esac						;;					esac					;;				-)	case $2 in					[-+]l*)	lst=lib ;;					-D*)	lst=mac ;;					esac					case $lst in					hdr)	hdr="$hdr $1" ;;					lib)	lib="$lib $1" ;;					mac)	mac="$mac $1" ;;					pth)	pth="$pth $1" ;;					esac					;;				-l*)	lib="$lib $1"					lst=lib					;;				+l*)	case $shell in					bsh)	x=`echo '' $1 | sed 's/.*+//'` ;;					*)	eval 'x=${1#+}' ;;					esac					lib="$lib -$x"					lst=lib					;;				-*|+*)	case $op in					ref)	cc="$cc $1"						occ="$occ $1"						case $1 in						-L*)	case $shell in							ksh)	x=${1#-L} ;;							*)	x=`echo x$1 | sed 's,^x-L,,'` ;;							esac							for y in $libpaths							do	eval $y=\"\$$y:\$x\$${y}_default\"								eval export $y							done							;;						esac						;;					run)	opt="$opt $1"						;;					*)	case $1 in						-D*)	mac="$mac $1"							lst=mac							;;						*)	cc="$cc $1"							;;						esac						;;					esac					;;				*.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB])					lib="$lib $1"					lst=lib					;;				*[.\\/]*)					case $op in					pth)	pth="$pth $1"						lst=pth						;;					*)	hdr="$hdr $1"						lst=hdr						;;					esac					;;				*)	case $op in					pth)	pth="$pth $1"						lst=pth						;;					*)	case $test in						'')	test=$1 ;;						*)	test="$test $1" ;;						esac						;;					esac					;;				esac				shift			done			;;		esac		;;	esac	case $ifelse in	DONE|SKIP)	continue ;;	esac	# check for local package root directories	case $PACKAGE_PATH in	?*)	for i in `echo $PACKAGE_PATH | sed 's,:, ,g'`		do	if	test -d $i/include			then	cc="$cc -I$i/include"				occ="$occ -I$i/include"			fi			if	test -d $i/lib			then	cc="$cc -L$i/lib"				occ="$occ -L$i/lib"				for y in $libpaths				do	eval $y=\"\$$y:\$i/lib\$${y}_default\"					eval export $y				done			fi		done		;;	esac	case $cc in	"")	cc="$occ $includes" ;;	esac	# some ops allow no args	case $arg in	'')	case $op in		iff)	arg=- ;;		esac		;;	esac	# save $* for ancient shells	argx=1	argv=$*	# check the candidate macros	case $mac in	?*)	case " $mac " in		*" - "*);;		*)	cc="$cc $mac"			mac=			;;		esac		;;	esac	# make sure $cc compiles C	case $cctest in	"")	echo "int i = 1;" > $tmp.c		if	$cc -c $tmp.c <&$nullin >&$nullout		then	echo "(;" > $tmp.c			if	$cc -c $tmp.c <&$nullin >&$nullout			then	cctest="should not compile '(;'"			fi		else	cctest="should compile 'int i = 1;'"		fi		case $cctest in		"")	cctest=0			;;		*)	echo "$command: $cc: not a C compiler: $cctest" >&$stderr			exit 1			;;		esac		;;	esac	# check for global default headers (some cc -E insist on compiling)	case $hdrtest in	'')	hdrtest=1		allinc=		for x in types		do	case $config in			0)	c=_sys_${x}				;;			1)	case $shell in				ksh)	typeset -u u=$x ;;				*)	u=`echo $x | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;				esac				c=HAVE_SYS_${u}_H				;;			esac			x=sys/$x.h			echo "${allinc}#include <$x>" > $tmp.c			is hdr $x			if	$cc -E $tmp.c <&$nullin >&$nullout			then	success				gothdr="$gothdr + $x"				case $explicit in				0)	can="$can$cansep#define $c	1	/* #include <$x> ok */"					cansep=$nl					;;				esac				eval $c=1				allinc="${allinc}#include <$x>$nl"			else	failure				gothdr="$gothdr - $x"				case $explicit$all$config$undef in				0?1?|0??1)					can="$can$cansep#undef	$c		/* #include <$x> not ok */"					cansep=$nl					;;				01??)	can="$can$cansep#define $c	0	/* #include <$x> not ok */"					cansep=$nl					;;				esac			fi		done		;;	esac	# add implicit headers/libraries before the checks	case $op in	npt)	hdr="sys/types.h stdlib.h unistd.h $hdr"		;;	siz|typ)hdr="sys/types.h time.h sys/time.h sys/times.h stddef.h stdlib.h $hdr"		;;	esac	# check the candidate headers	case $hdr in	?*)	z=$hdr		hdr=		hit=0		dis=0		for x in $z		do	case $x in			-)	case $hit in				0)	hit=1 ;;				1)	;;				*)	break ;;				esac				continue				;;			*.h)	case " $gothdr " in				*" - $x "*)					continue					;;				*" + $x "*)					;;				*)	case $shell in					bsh)	eval `echo $x | sed -e 's,^\\([^\\\\/]*\\).*[\\\\/]\\([^\\\\/]*\\)\$,\\1_\\2,' -e 's/\\..*//' -e 's/^/c=/'`						;;					*)	eval 'c=${x##*[\\/]}'						eval 'c=${c%%.*}'						case $x in						*/*)	eval 'c=${x%%[\\/]*}_${c}' ;;						esac						;;					esac					case $explicit in					0)	dis=0						;;					*)	case $x in						*/*)	dis=$c ;;						*)	dis=hdr ;;						esac						case ${dis}_ in						${op}_*)dis=0 ;;						*)	dis=1 ;;						esac						;;					esac					case $config in					0)	case $x in						*/*)	c=_${c} ;;						*)	c=_hdr_${c} ;;						esac						;;					1)	case $shell in						ksh)	typeset -u u=$c ;;						*)	u=`echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;						esac						c=HAVE_${u}_H						;;					esac					echo "${allinc}#include <$x>" > $tmp.c					is hdr $x					if	$cc -E $tmp.c <&$nullin >&$nullout					then	success						gothdr="$gothdr + $x"						case $dis in						0)	can="$can$cansep#define $c	1	/* #include <$x> ok */"							cansep=$nl							;;						esac						eval $c=1					else	failure						gothdr="$gothdr - $x"						case $dis$all$config$undef in						0?1?|0??1)							can="$can$cansep#undef	$c		/* #include <$x> not ok */"							cansep=$nl							;;						01??)	can="$can$cansep#define $c	0	/* #include <$x> not ok */"							cansep=$nl							;;						esac						continue					fi					;;				esac				;;			*)	test -r $x || continue				;;			esac			hdr="$hdr $x"			case $hit in			0)	;;			1)	hit=2 ;;			esac		done		;;	esac	# check the candidate libraries	case $lib in	?*)	z=$lib		lib=		p=		hit=0		echo "int main(){return(0);}" > $tmp.c		for x in $z -		do	case $x in			-)	case $hit in				0)	hit=1					continue					;;				esac				;;			*)	case $hit in				0)	p=$x					;;				*)	case $p in					'')	p=$x ;;					*)	p="$p $x" ;;					esac					continue					;;				esac				;;			esac			case " $gotlib " in			*"- $p "*)				failure +				p=				;;			*"+ $p "*)				success +				lib="$lib $p"				;;			*)	rm -f $tmp.exe				is LIB $p				if	$cc -o $tmp.exe $tmp.c $p <&$nullin >&$nullout				then	success					gotlib="$gotlib + $p"					lib="$lib $p"					e=0				else	a=					e=1					for l in $z					do	case $l in						-)	a=							continue							;;						$p)	a=$p							continue							;;						*)	case $gotlib in							*" $l "*)	continue ;;							esac							;;						esac						case $a in						$p)	a="$a $l"							if	$cc -o $tmp.exe $tmp.c $a <&$nullin >&$nullout							then	success								gotlib="$gotlib + $p"								lib="$lib $p"								e=0								break							fi							;;						esac					done					case $e in					1)	failure						gotlib="$gotlib - $p"						;;					esac				fi				y=				for x in $p				do	case $shell in					bsh)	c=`echo '' $x | sed 's, *-l,,'` ;;					*)	eval 'c=${x#-l}' ;;					esac					case $c in					*[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*)						c=`echo '' $c | sed -e 's,.*[\\\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,'`						;;					esac					case $config in					0)	case $e$p in						0*' '*)	case " $gotlib " in							*[-+]" $x "*)								;;							*)	can="$can$cansep#define _LIB_$c	1	/* $x is a library */"								cansep=$nl								eval _LIB_$c=1								;;							esac							;;						esac						;;					1)	case $shell in						ksh)	typeset -u u=$c ;;						*)	u=`echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;						esac						c=$u						case $e in						0*' '*)	case " $gotlib " in							*[-+]" $x "*)								;;							*)	can="$can$cansep#define HAVE_${c}_LIB	1	/* $x is a library */"								cansep=$nl								eval HAVE_${c}_LIB=1								;;							esac							;;						esac						;;					esac					y=${y}_$c				done				case $config in				0)	c=_LIB${y} ;;				1)	c=HAVE${y}_LIB ;;				esac				case $p in				*' '*)	q="a library group" ;;				*)	q="a library" ;;				esac				case $e in				0)	can="$can$cansep#define $c	1	/* $p is $q */"					cansep=$nl					eval $c=1					case $hit in					1)	break ;;					esac					;;				1)	case $all$config$undef in					?1?|??1)can="$can$cansep#undef	$c		/* $p is not $q */"						cansep=$nl						;;					1??)	can="$can$cansep#define $c	0	/* $p is not $q */"						cansep=$nl						;;					esac					eval $c=0					;;				esac				p=				;;			esac		done		;;	esac	# last op precheck	case $op in	ref)	deflib="$deflib $lib"		defhdr="$defhdr $hdr"		continue		;;	esac	IFS=" ,"	case $shell in	bash)	op=`echo $op`		arg=`echo $arg`		;;	*)	eval op=\"$op\"		eval arg=\"$arg\"		;;	esac	IFS=$ifs	# check for op aliases	x=	for o in $op	do	case $o in		def|default)	x="$x cmd dat hdr key lib mth sys typ" ;;		*)		x="$x $o" ;;		esac	done	# loop on the ops o and args a	result=UNKNOWN	for o in $x	do	for a in $arg		do	c=			case $a in			*[.\\/]*)				case $o in				hdr|lcl|nxt|pth|sys)					x=$a					case $x in					*.lcl|*.nxt)						case $o in						sys)	x=sys/$x ;;						esac						case $shell in						bsh)	eval `echo $x | sed -e 's,\\(.*\\)\.\\([^.]*\\),x=\\1 o=\\2,'`							;;						*)	o=${x##*.}							x=${x%.${o}}							;;						esac						v=$x						;;					esac					case $x in					*[\\/]*)case $shell in						bsh)	eval `echo $x | sed -e 's,\\(.*\\)[\\\\//]\\(.*\\),p=\\1 v=\\2,'`							;;						*)	eval 'p=${x%/*}'							eval 'v=${x##*/}'							;;						esac						;;					*.*)	case $shell in						bsh)	eval `echo $x | sed -e 's,\\(.*\\)\\.\\(.*\\),p=\\1 v=\\2,'`							;;						*)	eval 'p=${x%.*}'							eval 'v=${x##*.}'							;;						esac						;;					*)	p=						;;					esac					case $o in					lcl|nxt)	c=$v.$o ;;					*)		c=$v ;;					esac					;;				*)	case $shell in					bsh)	eval `echo $a | sed -e 's,.*[\\\\/],,' -e 's/\\(.*\\)\\.\\(.*\\)/p=\\1 v=\\2/'`						;;					*)	eval 'p=${a%.*}'						eval 'p=${p##*[\\/]}'						eval 'v=${a##*.}'						eval 'v=${v##*[\\/]}'						;;					esac					;;				esac				case $p in				'')	f=${v} ;;				*)	f=${p}/${v} ;;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -