Files
mercury/doc
Julien Fischer 54de823611 Fix runtime program basename on Windows.
Several places in the runtime make use of the program basename. This is
computed by stripping any directory qualification from the value of argv[0].
Currently, this is done by searching for uses of '/' as a directory separator.
This does not work on Windows where '\' is the directory separator and paths
may also be drive qualified. This diff adds a function that will handle
Windows-style paths.

Also, none of the uses of the program basename in the runtime currently account
for the presence of the .exe executable extension on Windows.  After this diff,
users won't have to, and in fact will not be allowed to, include the .exe
extension in the program name in these contexts.

runtime/mercury_runtime_util.[ch]:
    Add a function, MR_get_program_basename(), whose job is
    to strip any drive or directory qualification, and the executable
    extension from a given path.  On Windows, we use the OS's splitpath()
    function to do this.

    Add an XXX about the .exe extension on Cygwin.

runtime/mercury_wrapper.c:
    Use the new function when computing:
    - the name of the program-specific MERCURY_OPTIONS environment variable;
    - the value of the --trace-count-if-exec runtime option;
    - the value of the --coverage-test-if-exec runtime option.

doc/user_guide.texi:
    Document that the .exe extension is not expected in the three spots above.
2023-10-22 14:34:42 +11:00
..
2023-01-02 15:54:22 +11:00
2023-02-14 17:25:08 +11:00

This directory contains the source for

	The Mercury user's guide
	The Mercury language reference manual
	The Mercury library reference manual
	The Prolog to Mercury transition guide
	The Mercury frequently asked questions list

The master copy of each document is stored in texinfo format, from which
the info, dvi and html versions are derived automatically.

You can create postscript versions from either the dvi or html versions.
Due to the large spacing in texinfo-generated dvi files, the postscript file
generated from the html (manually via a browser such as xmosaic) will be
considerably shorter than the one derived from the dvi file.

The source for the Mercury library reference manual is generated automatically
from the library source files themselves.