summaryrefslogtreecommitdiff
path: root/tools/retab.sml
diff options
context:
space:
mode:
authorKess Vargavind <vargavind@gmail.com>2009-09-21 08:35:18 +0200
committerKess Vargavind <vargavind@gmail.com>2009-09-21 11:31:41 +0200
commitae6e6a5fb1ca0fc8750203315283aaa02da07709 (patch)
tree179c0bd7e479e0cb96d23f06b29839640101fae6 /tools/retab.sml
parent92835b88d045ff0f8c7c52f330b80965b8c5172e (diff)
downloadserverdata-ae6e6a5fb1ca0fc8750203315283aaa02da07709.tar.gz
serverdata-ae6e6a5fb1ca0fc8750203315283aaa02da07709.tar.bz2
serverdata-ae6e6a5fb1ca0fc8750203315283aaa02da07709.tar.xz
serverdata-ae6e6a5fb1ca0fc8750203315283aaa02da07709.zip
Add license info and usage note for retab.sml
Executable ignored and test run commited as well.
Diffstat (limited to 'tools/retab.sml')
-rw-r--r--tools/retab.sml15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/retab.sml b/tools/retab.sml
index b374eff2..8e2a054e 100644
--- a/tools/retab.sml
+++ b/tools/retab.sml
@@ -1,3 +1,18 @@
+(*
+ * retab (c) 2009 The Mana World development team
+ * License: GPL, version 2 or later
+ *
+ * Compilation, e.g. (depends on SML implementation):
+ * mlton retab.sml
+ *
+ * Example usage:
+ * tools/retab < db/mob_db.txt > db/mob_db.txt.new && mv db/mob_db.txt.new db/mob_db.txt
+ *
+ * TODO:
+ * - Commas inside {} need to be seen as just one field when tabified
+ * - Commented lines should be left untabified
+ *)
+
fun width (#"\t", i) = let val m = i mod 8 in if m = 0 then 8 else m end
| width (c, i) = 1