xml1.sed

来自「图片显示,电脑光于望技术湖连望键往,网络」· SED 代码 · 共 37 行

SED
37
字号
# This sed program is used in pkgcreate.ch# it will change XMLPUBFUN rettype XMLCALL func (type arg));#         to     rettype func(type arg);# it will handle the functions having multiple lines such as #  XMLPUBFUN rettype XMLCALL#         func (type arg); /XMLPUBFUN.*XMLCALL/!d# process line if XMLPUBFUN is present /XMLPUBFUN/{    # Join function prototypes that span multiple lines    :loop    /).*/!{       # if )); is not found, it will match next line      N      # remove return line '\n' and spaces " " between lines      s/\n */ /      # go back to loop      b loop    }    # it will replace XMLPUBFUN rettype XMLCALL func (type arg));    #         with rettype func(type arg)    # \1 refers to rettype, \2 refers to func, \3 refers to (type arg)    # [^,] means to match the first ","    # [^)] means to match the first ")"     s/XMLPUBFUN\(.*\)XMLCALL\(.*\);/\1 \2;/}

⌨️ 快捷键说明

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