diff --git a/.gitignore b/.gitignore index 03afefaa..3156aeee 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ custom/.all custom/libcustcalc* custom/.gitignore compile_commands.json +compile_flags.txt debug.out .dynamic endian @@ -187,4 +188,5 @@ unused_tmp ustat_tmp ver_calc vs_tmp +.vscode win32/ diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index fe8c265f..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "lldb launch", - "cwd": "${workspaceFolder}", - "program": "./calc", - "env": { - "DYLD_LIBRARY_PATH": ".", - }, - "preRunCommands": [ - "command script import .vscode/launch/_env.py .vscode/launch/env.py", - ], - "args": ["-Cpf", "custom/pfe-launch.cal"], - }, - { - "preLaunchTask": "compiledb make clobber all #DEBUG=… w/ macports readline", - "type": "lldb", - "request": "launch", - "name": "lldb launch + compiledb make clobber all #DEBUG=… w/ macports readline", - "cwd": "${workspaceFolder}", - "program": "./calc", - "env": { - "DYLD_LIBRARY_PATH": ".", - }, - "preRunCommands": [ - "command script import .vscode/launch/_env.py .vscode/launch/env.py", - ], - "args": ["-Cpf", "custom/pfe-launch.cal"], - }, - { - "preLaunchTask": "compiledb make clobber all #… w/ macports readline", - "type": "lldb", - "request": "launch", - "name": "lldb launch + compiledb make clobber all #… w/ macports readline", - "cwd": "${workspaceFolder}", - "program": "./calc", - "env": { - "DYLD_LIBRARY_PATH": ".", - }, - "preRunCommands": [ - "command script import .vscode/launch/_env.py .vscode/launch/env.py", - ], - "args": ["-Cpf", "custom/pfe-launch.cal"], - }, - ] -} \ No newline at end of file diff --git a/.vscode/launch/.env b/.vscode/launch/.env deleted file mode 100644 index 5b09ebe8..00000000 --- a/.vscode/launch/.env +++ /dev/null @@ -1,8 +0,0 @@ - -# customized dotenv format allowing for any space in key to align keys and values but retain any space in values - -# general - verbose =1 -# specific - wait =1 - leaks =0 \ No newline at end of file diff --git a/.vscode/launch/_env.py b/.vscode/launch/_env.py deleted file mode 100644 index 2984bb24..00000000 --- a/.vscode/launch/_env.py +++ /dev/null @@ -1,3 +0,0 @@ -import os - -os.environ['ENV_PY'] = '.vscode/launch/.env' diff --git a/.vscode/launch/env.py b/.vscode/launch/env.py deleted file mode 100644 index f6c50003..00000000 --- a/.vscode/launch/env.py +++ /dev/null @@ -1,25 +0,0 @@ -import sys -import os -import re -import lldb -#from pprint import pprint - -class EnvPyFormatException(Exception): - pass - -env_array = [] - -with open(os.path.join(os.environ['ENV_PY'])) as file: - for line in file: - if not re.match("^\s*(#.*)?$" , line): - if m := re.match("^\s*(?P\S+)\s*=(?P.*)$" , line): - env_array.append(m.group('key')+"="+m.group('value')) - else: - raise EnvPyFormatException("Line doesn't match ` `, ` # comment` or ` key =value` where space is optional:" - , line) - -target = lldb.debugger.GetSelectedTarget() - -launch_info = target.GetLaunchInfo() -launch_info.SetEnvironmentEntries(env_array, True) -target.SetLaunchInfo(launch_info) diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 087abd3f..00000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "compiledb make clobber all #… w/ macports readline", - "type": "shell", - "command": "~/Library/Python/3.8/bin/compiledb make clobber all READLINE_INCLUDE=' -I/opt/local/include/readline' READLINE_LIB=' -L/opt/local/lib -l''readline'", - "problemMatcher": ["$gcc"] - }, - { - "label": "compiledb make clobber all #DEBUG=… w/ macports readline", - "type": "shell", - "command": "~/Library/Python/3.8/bin/compiledb make clobber all DEBUG='-O0 -g' READLINE_INCLUDE=' -I/opt/local/include/readline' READLINE_LIB=' -L/opt/local/lib -l''readline'", - "problemMatcher": ["$gcc"] - }, - ] -} \ No newline at end of file diff --git a/compile_flags.txt b/compile_flags.txt deleted file mode 100644 index 8f91f619..00000000 --- a/compile_flags.txt +++ /dev/null @@ -1,2 +0,0 @@ --DCALC_SRC --DCUSTOM diff --git a/custom/pfe+conf.cal b/custom/pfe+conf.cal deleted file mode 100644 index 2761d68e..00000000 --- a/custom/pfe+conf.cal +++ /dev/null @@ -1,11 +0,0 @@ - - ; _ = config("resource_debug" ,0) -## ; _ = config("trace" ,2) - ; _ = config("tilde" ,0) - ; _ = config("display" ,8) - - ; define inputname ( ) = custom("inputname" ) - ; define dirname (path ) = custom("dirname",path ) - ; p = strcat(dirname(inputname()),"/pfe.cal" ) - ;read $p - diff --git a/custom/pfe-dev.cal b/custom/pfe-dev.cal deleted file mode 100644 index 1c2d8265..00000000 --- a/custom/pfe-dev.cal +++ /dev/null @@ -1,203 +0,0 @@ - ##//cspell:ignore strprintf - - ; _ = config("resource_debug" ,0) - ; define inputname ( ) = custom("inputname" ) - ; define dirname (path ) = custom("dirname",path ) - ; p = strcat(dirname(inputname()),"/pfe+conf.cal" ) - ;read $p - - ; NULL = null() - ; TRUE = 1 - ; FALSE = 0 - - ; err = 2 - ; out = 1 - ; in = 0 - - ; LEAKS = eval(getenv("leaks" )||"" ) - - ; WRITE = eval(getenv("write" )||"1" ) - ; WAIT = eval(getenv("wait" )||"" ) - - ; v = eval(getenv("verbose" )||"" ) - - ; di = pipe() ##// dn in - ; uo = pipe() ##// up out - ; ue = pipe() ##// up err - - ;if( pid = fork()){ - ; e = close ( di[ in ] ) - ; e = close ( ue[ out ] ) - ; e = close ( uo[ out ] ) - /* - ; wtl = list ( di[ out ] ) - ; s = fds (null(),wtl) - ; print "parent wtl bef. wt:":wtl - /**/##end - ; if( v) print "parent writing to child" - ;if( WRITE - ) c = wt ( di[ out ] ,"parent to child") - ; e = close ( di[ out ] ) - /* - ; rcl = list ( uo[ in ] - , ue[ in ] ) - ; s = fds \ - ( rcl ) - ; print "parent rcl aft. wt bef. sleep:":rcl - - ; s = 1 - ; sleep ( s) - - ; rcl = list ( uo[ in ] - , ue[ in ] ) - ; s = fds \ - ( rcl ) - ; print "parent rcl bef. rd:":rcl - /**/##end - ; rbl = list ( uo[ in ] - , ue[ in ] ) ##// read base list - ; s = -1 - ;while( rbz = size \ - ( rbl ) ){ - /**/ - ;if( v && s == -1 - ) s\ - = WAIT - ;else if( s){ - ; if( v) printf( "parent ------ sleep %d; read base size %d\n" - , s - , rbz ) - ; sleep ( s ) ;} - /**/##end - ; rcl\ - = rbl ##// read check list - ; exl = list ( uo[ in ] - , ue[ in ] ) - ; if( v) print "parent before select" - (! WAIT - ?"" :strprintf ( " waiting %f" - , WAIT/2)) - /**/ - ; fdc\ - = fds\ - ( & rcl,! WAIT - ? NULL: WAIT/2) - /*##else - ; fdc\ - = fds\ - ( rcl - , NULL - , exl, WAIT) - /**/##end - ;if(0 < fdc ){ - ; rcz = size \ - ( rcl ) ; - ; if( v) print "parent select read size"\ - : ":" rcz ; - ;for( rcs = 0 - ; rcs - < rcz - ; rcs++){ - ; if( v) print "parent select read "\ - : rcs \ - :":" \ - : rcl \ - [ rcs] ; - ; rcd = rd \ - ( rcl - [ rcs]) - ;if( rcl - [ rcs] - == uo[ in ] - )if( rcd!=NULL) print ##"out:\n" - : rcd: - else{ delete \ - ( rbl - , search - (rbl, uo[ in ])) - ; if( v) print "parent read eof - child out" - ;} - ;if( rcl - [ rcs] - == ue[ in ] - )if( rcd!=NULL) print ##"err:\n" - : rcd: - else{ delete \ - ( rbl - , search - (rbl, ue[ in ])) - ; if( v) print "parent read eof - child err" - ;} - ;} - /* - ; exz = size \ - ( exl ) ; - ; print "parent select exception size"\ - : ":" exz ; - ;for( exs = 0 - ; exs - < exz - ; exs++){ - ; print "parent select exception "\ - : exs \ - :":" \ - : exl \ - [ exs] ; - ;} - /**/##end - ;} - ;} - ; stt = assoc() - ; w = wait4(pid,& stt) - ;if( v && stt["exited" ] ){ - ; print "parent: child exited with status" - :" ": stt["exitstatus"];} - ;if( v && stt["signaled" ] ){ - ; print "parent: child signaled by " - : stt["termsig" ] - : ( stt["coredump" ] - ? " (with dump)" - : " (no dump)" ) ;} - ;if( v && stt["stopped" ] ){ - ; print "parent: child stopped by " - : stt["stopsig" ] ;} - ;print "stt" \ - : (! stt["exited" ] - ?0: stt["exitstatus"] ) - + (! stt["stopped" ] - ?0: 127+stt["stopsig" ] ) - + (! stt["signaled" ] - ?0: 127+stt["termsig" ] ) - ;}\ - else{ - ; e = close ( uo[ in ] ) - ; e = close ( ue[ in ] ) - ; e = close ( di[ out ] ) - - ; scpt\ - = strprintf("read; echo \"outA:$REPLY\"; echo 'errA' >&2;%s echo 'outZ'; exec >&-; echo 'errZ' >&2; exec 2>&-;exit 2" - , ! WAIT ? "" : strprintf(" sleep %d;" - , floor ( WAIT*2.5) )) - ; if( v) print scpt - - ; args = list\ - ( "bash" - , "-c") - ; append ( args, scpt) - - ; d = dup2 ( di[ in ] - , in ) - ; d = dup2 ( uo[ out ] - , out ) - ; d = dup2 ( ue[ out ] - , err ) - - ; e = execvp ( args[0] - , args) - - ;} - - ;if( LEAKS ){ - ; print getpid() - ; rd ( in ) - ;} \ No newline at end of file diff --git a/custom/pfe-launch.cal b/custom/pfe-launch.cal deleted file mode 100644 index 91d330ce..00000000 --- a/custom/pfe-launch.cal +++ /dev/null @@ -1,8 +0,0 @@ - ; null( config("resource_debug" ,0)) - ; define inputname ( ) = custom("inputname" ) - ; define dirname (path ) = custom("dirname",path ) - ; p = strcat(dirname(inputname()),"/pfe+conf.cal" ) - ;read $p - - ;pfe_test() - diff --git a/custom/pfe-v.cal b/custom/pfe-v.cal deleted file mode 100644 index f47d28f9..00000000 --- a/custom/pfe-v.cal +++ /dev/null @@ -1,12 +0,0 @@ - ; null( config("resource_debug" ,0)); - ; define inputname ( ) = custom("inputname" ) - ; define dirname (path ) = custom("dirname",path ) - ; p = strcat(dirname(inputname()),"/pfe+conf.cal" ) - ;read $p - - ##// executing personal file with `#!/usr/bin/env bash` in dirs under PATH; vbash cause-of vscode fails to retrieve env (for PATH) - ;define vbhu(a1,a2,a3,a4,a5){local i,o,e,z,s,args=list("/Users/vike/shell/library/script/system/vbash","vbhu",a1,a2,a3,a4,a5);for(z=size(args),s=0;s1))&&f=-v||f=+conf;};}&&cd1 /∂/git/calc custom/pfe-v.sh custom/pfe$f.cal "$(((dev))||([[ ${test+?} ]]&&echo ";pfe${test:+_$test}_test()"))$(((dev>1))||echo ';custom("help","pfe")')")