Make 2013/birken restore sanity after exit
As long as the program (alt code and otherwise) runs to completion the
program will return instead of 0:
system("reset");
so that the terminal becomes sane again (otherwise cursor is invisible).
One could also use 'tput cvvis' but this is longer and I wanted to make
the column as close to the original ending as possible.
This commit is contained in:
1 parent
ef8c84a3b1
commit
f954d8d4a5
6 files changed
+26
-15
No files matched your search
+12
-5
@@ -42,9 +42,16 @@ perl -e 'map{map{print int(rand()*8);}(0..16);print chr(10);}(0..30);' | tr '[0-
|
||||
./try.sh
|
||||
```
|
||||
|
||||
If you wish to speed it up 200% you can use instead `-DZ=3750`. Doing this
|
||||
you might find the right value to your liking; use ctrl-c to terminate the
|
||||
program early.
|
||||
If you wish to speed that up 200% you can use instead `-DZ=3750`. Doing this you
|
||||
might find the right value to your liking; use ctrl-c to terminate the program
|
||||
early but note that the terminal is likely to be messed up. Try:
|
||||
|
||||
|
||||
```sh
|
||||
reset
|
||||
```
|
||||
|
||||
to make it sane again (running to completion will do that for you).
|
||||
|
||||
|
||||
## Original code:
|
||||
@@ -69,8 +76,8 @@ PLEASE be careful if you are sensitive to flashing colours!
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
This program also wins the "Most amusing abuse of the iocccsize tool" award; although not the
|
||||
absolute best: it is possible to achieve 0 by writing:
|
||||
This program also wins the "Most amusing abuse of the iocccsize tool" award;
|
||||
although not the absolute best: it is possible to achieve 0 by writing:
|
||||
|
||||
```c
|
||||
/* *\
|
||||
|
||||
Reference in new issue
Block a user