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

📄 c++

📁 早期freebsd实现
💻
字号:
#!/bin/sh# Compile programs, treating .c files as C++.: || exec /bin/sh -f $0 $argv:q# The compiler name might be different when doing cross-compilation# (this should be configured)gcc_name=gccspeclang=-xnone# replace the command name by the name of the new commandprogname=`basename $0`case "$0" in  */*)    gcc=`echo $0 | sed -e "s;/[^/]*$;;"`/$gcc_name    ;;  *)    gcc=$gcc_name    ;;esac# $first is yes for first arg, no afterwards.first=yes# If next arg is the argument of an option, $quote is non-empty.# More precisely, it is the option that wants an argument.quote=# $library is made empty to disable use of libg++.library=-lg++numargs=$## ash requires the newline before `do'.for argdo  if [ $first = yes ]  then    # Need some 1st arg to `set' which does not begin with `-'.    # We get rid of it after the loop ends.    set gcc    first=no  fi  # If you have to ask what this does, you should not edit this file. :-)  # The ``S'' at the start is so that echo -nostdinc does not eat the  # -nostdinc.  arg=`echo "S$arg" | sed "s/^S//; s/'/'\\\\\\\\''/g"`  if [ x$quote != x ]  then    quote=  else    quote=    case $arg in      -nostdlib)	# Inhibit linking with -lg++.	library=	;;      -lm)	# Because libg++ uses things from the math library, make sure it	# always comes before the math library.	set "$@" $library	library=""	;;      -[bBVDUoeTuIYmLiA] | -Tdata)	# these switches take following word as argument,	# so don't treat it as a file name.	quote=$arg	;;      -[cSEM] | -MM)	# Don't specify libraries if we won't link,	# since that would cause a warning.	library=	;;      -x*)	speclang=$arg	;;      -v)	# catch `g++ -v'	if [ $numargs = 1 ] ; then library="" ; fi	;;      -*)	# Pass other options through; they don't need -x and aren't inputs.	;;      *)	# If file ends in .c or .i, put options around it.	# But not if a specified -x option is currently active.	case "$speclang $arg" in -xnone\ *.[ci])	  set "$@" -xc++ "'$arg'" -xnone	  continue	esac	;;    esac  fi  set "$@" "'$arg'"done# Get rid of that initial 1st argif [ $first = no ]; then  shiftelse  echo "$0: No input files specified."  exit 1fiif [ x$quote != x ]then  echo "$0: argument to \`$quote' missing"  exit 1fieval $gcc "$@" $library

⌨️ 快捷键说明

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