magic/utils
Anton Blanchard bdeb4bab50 Restore terminal if exit is called inside a TCL script at startup
If exit is called in a TCL script that is executed at startup, the libc
exit() function is called directly and we don't get a chance to reset
the terminal. We return to the shell with echo off, and have to run
"reset". A simple example:

echo exit > test.tcl
magic -noconsole -dnull  test.tcl

There are a few ways we could solve this. We could register an exit
handler using atexit(). Here I use Tcl_SetExitProc() to register a
callback with the TCL interpreter.
2021-02-18 11:38:42 +11:00
..
LIBdbio.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
LIBmain.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
LIBtextio.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Makefile Moved new work on magic-8.4 (experimental merging of micromagic bplane structure 2019-03-22 19:58:47 -04:00
args.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
child.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
displays.proto Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
dqueue.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
dqueue.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
finddisp.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
flock.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
flsbuf.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
fraction.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
geofast.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
geometry.c Added two new features: (1) Default substrate name: Added an 2020-06-01 16:49:59 -04:00
geometry.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
getrect.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
hash.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
hash.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
heap.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
heap.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
ihash.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
ihash.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
list.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
list.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
lookup.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
lookupany.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
lookupfull.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
macros.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
macros.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
magic.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
magsgtty.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
main.c Restore terminal if exit is called inside a TCL script at startup 2021-02-18 11:38:42 +11:00
main.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
malloc.c Provisionally switched the memory allocation definitions away from 2020-08-11 16:50:26 -04:00
malloc.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
match.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
maxrect.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
maxrect.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
netlist.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
netlist.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
niceabort.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
parser.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
parsetest.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
path.c Made a few modifications to the patch from Keno Fischer (pull request 2021-01-04 09:47:03 -05:00
paths.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
pathvisit.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
pathvisit.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
port.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
printstuff.c Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
runstats.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
runstats.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
set.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
show.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
signals.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
signals.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
stack.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
stack.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
strdup.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
styles.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
tech.c Several changes and updates: (1) Added a new keyword "required" to the 2020-12-16 11:49:24 -05:00
tech.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
touchingtypes.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
touchtypes.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
undo.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
undo.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
utils.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00