📄 use.pl
字号:
#! /usr/local/bin/perl$base = $ARGV[0];$opt = $ARGV[1];$ind = $ARGV[2];if($ENV{"COG_HOME"}){ $cog = $ENV{"COG_HOME"};}else{ $cog = $ENV{"PDELIB_HOME"}.'/modules/cog';}if($ENV{"COG_WORK"}){ $w = $ENV{"COG_WORK"}."/";}else{ $w = "./";}if(!$base){ print "usage: coguse [main|cog] [option]main: defines the file maintest.cxx (main program)cog: defines the file cogtest.cxx (test cogeometry used in some test files)without [option] you get a list of the available options.See tutorial.html for more information."; exit;}if(!$opt){ $cmd = "ls ".$w.$base."\*test.html ".$cog.'/'.$base."\*test.html 2\>\/dev\/null";# $cmd = "ls ".$cog.'/'.$base."\*test.html"; $list = `$cmd`; $list=~s/$cog\///g; $list=~s/$w//g; $def = $base."test.html\n"; $list=~s/$def//g; $list=~s/$base/ \| /g; $list=~s/test.html\n//g; $list=~s/ \| //; print "usage: coguse ".$base." \[ ".$list." \]for an option xxx, see ".$base."xxxtest.html for more information.";}$target = $w.$base.$ind."test.cxx";$source = $w.$base.$opt."test.html";if(! -e $source){$source = $cog.'/'.$base.$opt."test.html";}if(-e $source){ $cmd = "html2cxx ".$source." ".$target; `$cmd`; print "using now C++ code from file ".$source." as ".$target."\n";}else{ $source = $base.$opt."test.cxx"; if(! -e $source){$source = $cog.'/'.$source;} if(-e $source){ $cmd = "cp -f ".$source." ".$target; `$cmd`; print "using now file ".$source." as ".$target."\n"; }else{ print "source for file $target not found\n"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -