Module Cmd


module Cmd: sig .. end
Command line interface for some programs of Structio.

This source is released to the public domain since 2002. No warranty. Citation of the project Structio and the following URL is appreciated. http://structio.sourceforge.net/repasa


val ac_file : string list Pervasives.ref
In this variable files read in command line are accumulated
val pformat : string Pervasives.ref
Format of input file specified in comman line with option -f
val plength : string Pervasives.ref
Maximal length of each description, in command line with option -f
val phtypes : string list Pervasives.ref
Hierarchy of types received in command line
val strict : bool Pervasives.ref
Indicates if order of types must be strictly checked.
val pdefname : string Pervasives.ref
Name of default file with definitions, received from command line.
val pclassifname : string Pervasives.ref
Name of default file with classifications, received in command line

type argtyp =
| Unit of (unit -> unit)
| String of (string -> unit)
| Int of (int -> unit)
| Float of (float -> unit)
| Set of bool Pervasives.ref
| Clear of bool Pervasives.ref
| Rest of (string -> unit)
To change module Arg to spanish and improve some things. This is based in interface arg.mli, see Ocaml manual for documentation

type infoprg = {
   mutable pgm : string; (*Program name withouth markup*)
   mutable version : string; (*Version of program withouth markup*)
   mutable project : string; (*Project name withouth markup*)
   mutable desc : string; (*Description*)
   mutable formatInfo : Lrepasa.knownFormats; (*Format of the strings in register*)
   mutable opusage : string; (*Usage syntax*)
   mutable versioninfo : string; (*Info to show with version*)
   mutable restversion : unit -> unit; (*Function to execute in version*)
   mutable spec : (string * argtyp * string) list; (*Command line options*)
   mutable parg : string -> unit; (*Function called for each parameter that is not in spec*)
   mutable prelongdesc : string;
   mutable poslongdesc : string;
   mutable examples : string;
   mutable see : string;
   mutable standard : string;
   mutable history : string;
   mutable bugs : string;
   mutable author : string;
}
Information of a program. Useful to generate documentation and respond to some command line options.
val ac_parg : string -> unit
ac_parg x Adds x to the list of strings ac_file. Useful to be used as parg field of register infoprog
val idfun : 'a -> 'a
val verrepasa : string
val restverrepasa : 'a -> unit -> unit
val info : infoprg
val print_version : infoprg -> unit
print_version i Prints version of program with information i.
val showman : Lrepasa.knownFormats -> infoprg -> string
mandb i receives information of a program in i and prints a reference entry for DocBook
val curpos : int Pervasives.ref
val usage : infoprg -> unit
exception Bad of string
val parse : infoprg -> unit
val prep_paths : unit -> unit
prep_paths () Prepares the paths where Markup will look by default for XMLs and DTDs.
val commspec : infoprg -> (string * argtyp * string) list
commspec info Returns a common spec based on info
val specformat : (string * argtyp * string) list
specformat returns spec for format of input file, option -f
val spechier : (string * argtyp * string) list
spechier returns a spec for a hierarchy, options -j, -e
val specdef : (string * argtyp * string) list
specdef tarch returns a spec for a definitions file that if not given transform tarch. Option -d
val speccla : (string * argtyp * string) list
speccla returns spec for a default classification file