# $Id: CHANGES,v 1.41 2009/09/11 08:27:44 weis Exp $

2.21
----

- New option -str to directly read from a string argument instead of reading
  from a file.
- New conditional and is_empty primitives.
- New 0- and 2-decimal rounding primitives.
- New arithmetic operation primitives.

2.20
----

- New versionning primitives (major.minor+level, and major_minor_level for tags).
- New predefined variable $(host) gives the IP name of the host where htmlc is
  running.
- Regular installation procedure: ./configure; make; make install.

2.19
----

- The notion of mask in Htmlc was wrong: mask was in fact permissions.
  Consequently, the option -m is now option -p.

2.18
----

- Introducing the notion of ``modes'':
  - ssi mode is the HTML file processing mode, the default mode,
  - non-ssi mode is the text file processing mode,
  - expand mode is the make file processing mode, the mode that computes a
   regular make file from a make file with bindings and inclusion make
   directives.

- Related new options are, -ssi, -non_ssi, and -expand.

- New option -print_setting to get the actual default settings before
  starting compilation.

- New options -keep_non_ssi_include and -keep_non_ssi_binding to trigger
  copying of non SSI corresponding directives in the output.
  (Default is true.)

2.17
----

Introduction of non SSI directives. Similar to SSI directives but the syntax
does not require the HTML impedimenta. Mandatory to implement the -expand new
option.

- New option -expand to expand the input file with all its includes.

- New options to give fine control over evaluation

- New primitive to handle versionning of software.


Source documentation revisited.

2.16
----

- New option -force to force the output file name to possibly be the input file name.

- New options to give fine control over evaluation
  * -evaluate_directives <bool> controls directive evaluation (SSI),
  * -quote_dollar <bool> triggers the dollar quotation in text (%Id -> \$ID),
  * -substitute_in_text <bool> controls the substitution mechanism in text.

- New primitive
  * release_tag_base: compute a valid CVS tag base.

2.15
----
- New end of line character escape mechanism allows multi line lines (in the
  spirit of escaped end of lines in Caml strings).
- Better treatment of lines with more than one Htmlc commands.

2.14
----
- Date and time primitives revisited.

2.1
---
- New primitive ``include'' for htmlc.

- New command line option "-bindings" to load trivial bindings of the form:
  <ident> = .*'\n'
- Definitions are evaluated in their command line presentation order,
  including for environment and bindings files.
- New command line option "-pp" to pre-process source files before compiling
  them with htmlc.

- Htmlc now understands Spanish (Thanks to Laura Lowenthal).
- Htmlc now understands German (Thanks to Richard Bonichon).

- New functions in Lib_date.

- Predefined variables:
  * the_date: the English string representation of the time of day.
  * la_date: the French string representation of the time of day.

2.0
---
- New language feature: Htmlc now supports functions!
  For instance:
  * [let concat x y = "$(x)$(y)";;] defines the concatenation of two strings.
  * [$(concat "foo" "bar")] returns ["foobar"] and
  * if [$(x)] is bound to ["Hello"] then [$(concat x " world!")] evaluates to
    ["Hello world!"].
- More regular syntax to access system variables: <$VARIABLE> becomes $<VARIABLE>.
- Htmlc can be used as a filter if no files are specified.
- New option -m to set the permission mask of the output file.
- A new built-in feature to protect/expand strings within [$(expr)]
  expression evaluation.
- Predefined variables:
  * the_date: the English string representation of the time of day.
  * la_date: the French string representation of the time of day.

1.90
----
- Addition of primitives functions available in template files:
  * [use: file_name -> unit]
    loads an Htmlc environment from within a template file.
    For instance:
    [$(use "env3.ml")]
    loads file environment [env3.ml].
  * [expand : string -> unit]
    [expand e] computes argument [e] and call the htmlc compiler on the result.
    For instance:
    [$(expand $(title "Function applications"))]
    expands the result of evaluating the function [title] on the string
    argument ["Function applications"].
  * [center : string -> int -> string]
    Centers a string into a blank line.
    [$(center "Htmlc" 7)] returns the string [" Htmlc "].
  * [flush_left : string -> int -> string]
    Flushes a string on the left of a blank line.
    [$(flush_left "Htmlc" 7)] returns the string ["Htmlc  "].
  * [flush_right : string -> int -> string]
    Flushes a string on the right of a blank line.
    [$(flush_right "Htmlc" 7)] returns the string ["  Htmlc"].
- Experimental primitive support of function definitions and function applications in
  environment files and in template files.
- A lexical analyser for environment files is introduced.
- Better scanning of string lexemes. The characters \$ in the program text is
  copied as is in the resulting string lexeme.

1.80
----
- File, line number and character number reported when an error occurred while
  loading an environment file.
- Better error report in case of file inclusion.
- "." is in the default search path.
- predefined variables:
  * this_year
  * last_year
  * next_year
- htmlc compiled files have the same permissions as their source (except for the
  writable flag that is modified according to the -w option setting).

1.70
----
- Better error messages (line numbers are now reported most of the time).
- Spurious index out of bounds chased.
- Enhanced behaviour of escapes when substituting (\\ -> \ and \\\ -> \\).

1.62
----
- The file size format can be globally configured (e.g. #config
  sizefmt="bytes" fixes the file size format to byte number).
- When binding a variable to a value the value is evaluated (meaning
  non-escaped $variables are substituted to their value).
- Environment files are now read in the order of presentation
  specified on the command line (same feature for variables bound on the
  command line).
- Implementing some kind of "printenv" SSI:
  if mode is "htmlc" we print stuff from the htmlc environment with the
  following syntax:
  * "_" means print the entire environment
  * "id" means print the binding of id
  * bindings are printed as ``let id = value;;''

1.61
----
- A better (stricter) parsing of literal tokens (in particular
  numbers) avoid confusions when reading environment files.

1.60
----
- A bug in the variable substitutions has been removed (a '<'
  character at the end of a file was just ignored).
- Cleaner installation and build procedure.
- A man page was written.

1.50
----
- Htmlc understands more SSI directives:
   - in addition to "last_modified", echo var also knows
     "date_local", "date_gmt", "user_name", "document_path_info",
     "document_name",
   - set (or define) defines a variable in the document,
   - exec cmd="comm" launches the arbitrary Unix command named "comm"
     and inserts its result into the compiled document,
   - fsize gives the size of the document,
   - flastmod to get the last modification date of the document,
- The version of the Htmlc compiler is now available in the compilation
  environment as $htmlc_version (or $htmlc_full_version to get also the
  sub-version).

1.40
----
- Environment files syntax is almost compatible with Caml syntax:
     let ident = constant;;
     (* Simple remarks *)
  are properly understood.

- Flag -s meaning is generalised: output of htmlc -s filename.extension
  is still filename.html, but extension is no more limited to shtml
  (it can even be inexistent).

1.30
----
 - By default target files are read only to prevent editing of those
   instead of source files. Correlative -w flag to force htmlc to output
   a writable file.
 - Better environment file syntax:
       name = float
       name = bool
       name = int
       name = char
       name = string
       name = ident
   are accepted.
 - New -D option to bind a name to a value on the command line.

1.20 (Documents environment variables expansion)
----
 - Inside documents variables of the form $X, $(X), or ${X} are
   considered to be bound in the Htmlc's global environment hash table
   and expanded as their corresponding string associated value.
 - New -e argument to load environment files that set up Htmlc's global
   environment table. Environment files are list of lines
   that contain a variable name and an associated string (following Caml'
   lexical conventions).
 - New server side directive: the line
   <!--#include environment="filename"-->
   in a document loads environment file ``filename'' and enriches the
   global environment accordingly.
 - New -s compilation flag to expand .shtml files into .html files.

1.10 (User's environment variables expansion)
----
 - Throughout documents passed to htmlc, tags of the form <$X>
   are considered to reference the variable X in the user's
   global environment: hence, <$HOME> is replaced by the string
   representation of the user's HOME directory path.
   (This expansion mechanism is disabled when including verbatim files).

1.0
---
 - Initial distribution.
