mknewdoc.sh
来自「seismic software,very useful」· Shell 代码 · 共 48 行
SH
48 行
#! /bin/sh# mknewdoc - change self-docs from old form to ANSI# Usage: mknewdoc file(s)## $Author: jkc $# $Source$# $Revision$ ; $Date$# this is for emergency use if porting to strict ANSI C system that# doesn't support \newline line continuation.# works only with Jack's coding style and conventions# changes sdoc string to ANSI style# sdocs will likely wrap a few lines after mknewdoc application# changes declaration of main to ANSI style# does NOT change declarations of any embedded subs!savedir=/usr/tmptmpfile=$$.mknewfor ido cp $i $savedir/$$.$i sed -n '1,/self documentation/p' $i >$tmpfile sed -n '/sdoc/,/^"\;$/p' $i | sed ' s/sdoc = "\\/sdoc =/ /\\n\\$/s/^/" / /\\n\\$/s//\\n"/ /^"\;/s//;/ ' >>$tmpfile sed -n '/end self doc/,$p' $i | sed ' s/main(argc, argv)/main(int argc, char **argv)/ /int argc;/d ' >>$tmpfile mv $tmpfile $idoneexit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?