diff options
Diffstat (limited to 'ipl/gpacks/weaving/sdb2wvp.icn')
-rw-r--r-- | ipl/gpacks/weaving/sdb2wvp.icn | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/ipl/gpacks/weaving/sdb2wvp.icn b/ipl/gpacks/weaving/sdb2wvp.icn new file mode 100644 index 0000000..46f9d2c --- /dev/null +++ b/ipl/gpacks/weaving/sdb2wvp.icn @@ -0,0 +1,51 @@ +############################################################################ +# +# File: sdb2wvp.icn +# +# Subject: Program to convert sequence-draft data bases to include files +# +# Author: Ralph E. Griswold +# +# Date: May 23, 1999 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# AD HOC. +# +# Command-line arguments are converted into $defines in the output. +# +############################################################################ +# +# Links: basename, weavutil, io, tables, xcode +# +############################################################################ + +link basename +link weavutil +link io +link tables +link xcode + +procedure main(args) + local line, output, path, database, spec, name + + weaving2 # mention to prevent deletion + + database := xdecode(&input) | stop("*** cannot decode input") + + put(args, "Background", "Reflect") # run in background + + every spec := database[!keylist(database)] do { + name := spec.name || ".wvp" + output := open(name, "w") | + stop("*** cannot open ", name, " for writing") + every write(output, "$define ", !args) + close(output) + write_spec(name, spec) + } + +end |