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

📄 ckustr.sed

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 SED
字号:
#! /bin/sh# Special cc preprocessor for using mkstr(1) to extract strings from the# kermit source.  Change the "CC=cc" line to "CC=./ckustr.sed" to use# string extraction.  NOTE: the file ckustr.c might need the StringFile# declaration modified to suit local system requirements.  When installing# the kermit executable be sure to install kermit.sr and make it readable# by the public (mode 444).STRINGS=cku195.sr# Get filename and arguments.initargs=$@while [ -n "$1" ]do	if [ $1 = -o ]	then		exec cc $initargs		exit 1	fi	if [ `expr substr $1 1 1` = - ]	then		if [ $1 != -c ]		then			args="$args $1"		fi	else		csrc=$1	fi	shiftdone# Only process compilations, and then only for certain files.if [ $csrc = ckustr.c -o $csrc = ckwart.c ]then	exec cc $initargs	exit 1fi# String extractionsecho Extracting strings from ${csrc}...cc -E $args $csrc > xxmk.csed -e 's/ferror(/strferrorf(/'				\    -e 's/perror("/strperror("/'			\    -e 's/experror(/strexperrorf(/'			\    -e 's/sprintf(\([^,][^,]*\),[ ]*\("[^"]*"\)\([,)]\)/strsrerror(\2, \1\3/' \    -e '/sprintf(\([^,][^,]*\),/{Ns/sprintf(\([^,][^,]*\),\n[ ]*\("[^"]*"\)\([,)]\)/strsrerror(\2, \1\3/}'							\    -e 's/fprintf(\([^,][^,]*\),[ ]*\("[^"]*"\)\([,)]\)/strfrerror(\2, \1\3/' \    -e '/fprintf(\([^,][^,]*\),/{Ns/fprintf(\([^,][^,]*\),\n[ ]*\("[^"]*"\)\([,)]\)/strfrerror(\2, \1\3/}'							\    -e 's/printf[ ]*("/strprerror("/'		\    -e '/printf[ ]*(/{Ns/printf[ ]*(\n"/strprerror("/}' xxmk.c > mk.cmkstr - $STRINGS xx mk.csed -e 's/^# \([0-9]\)/#line \1/' xxmk.c | xstr -c -echo Compiling...cc -Dstrferrorf=ferror -Dstrexperrorf=experror $args -c x.cmv x.o `basename $csrc .c`.orm -f x.c mk.c xxmk.c

⌨️ 快捷键说明

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