diff options
author | pixel <pixel> | 2003-02-19 21:28:54 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-02-19 21:28:54 +0000 |
commit | ec2c97793151512f5dca3290dbd9f24a09b7ac6f (patch) | |
tree | 9b0908c3d6276440ba75d47a2463e21b95f7f4b9 /ToF/map2sqr | |
parent | 13db4477d55e91d9a3680512e06074331665a368 (diff) |
Yay to Tales of Fates... ^^;
Diffstat (limited to 'ToF/map2sqr')
-rwxr-xr-x | ToF/map2sqr | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ToF/map2sqr b/ToF/map2sqr new file mode 100755 index 0000000..a5739a0 --- /dev/null +++ b/ToF/map2sqr @@ -0,0 +1,35 @@ +#!/usr/bin/awk -f +BEGIN { + ol = -1; +} + +NR <= 4 { + print $0; +} + +NR > 4 { + f = $1; + l = $2; + c = l - f + 1; + if ((ol + 1) != f) { + print "You blew it @ line", NR > "/dev/stderr" + exit -1; + } + ol = l; + print c; + + d = $3; + print d; + d = $4; + print d; + + for (i = 5; i <= NF; i++) { + $(i - 4) = $i; + } + NF -= 4; + print $0; +} + +END { + print 0; +} |