SP_set_argv() #include <sicstus/sicstus.h>
int
SP_set_argv(int argc,
char **argv,
spio_t_bits options);
Initializes the argv prolog flag.
argv vector.
prolog_flag(argv,X).
This argument is copied by SP_set_argv() so it can be discarded
by the caller. May be passed as NULL if argc is zero.
The encoding used when converting the entries to atoms is determined
by the options argument.
options is zero then each entry in argv is assumed to
be an encoded string, i.e. encoded using ‘UTF-8’. This is
the same as passing argc and argv to
SP_initialize() except that SP_initialize() will not
report failure even if the argv entries are not suitable as
atom names. Note that UTF-8 may not be the encoding used by the
operating system when invoking main().
If options is SP_SET_ARGV_OPTION_SYSTEM_ENCODING then
each entry in argv is assumed to be encoded using some system
encoding. This is only useful on Unix-like systems since it is
preferable, and trivial, to obtain and pass a UTF-8 argv vector
on Windows.
The system encoding used by SP_set_argv() will be the first
character encoding specified by the following environment variables:
SP_CTYPELC_ALL (only on Unix)LC_CTYPE (only on Unix)LANG (only on Unix)Please note: For best results on Unix-like platforms you should use a locale based on UTF-8.
Zero if the argument entries cannot be converted to atoms, and a nonzero value otherwise.
Initializing the Prolog Engine.