unit libaplu;

interface

// extern void init_libapl(const char * progname, int log_startup);
procedure init_libapl(progname : ansistring; log_startup : integer); cdecl;

//extern LIBAPL_error apl_exec(const char * line_utf8);
function apl_exec(line_utf8 : ansistring) : longint; cdecl;
//function apl_exec(line_utf8 : pchar) : longint; cdecl;

//extern const char * apl_command(const char * command_utf8);
function apl_command(command_utf8 : pchar) : pchar; cdecl; // good : output is apl result
//function apl_command(command_utf8 : pchar) : longint; cdecl; // good : output is integer
//function apl_command(command_utf8 : pchar) : ansistring; cdecl; // does not worl
//function apl_command(command_utf8 : ansistring) : ansistring; cdecl; // does not work
//function apl_command(command_utf8 : ansistring) : longint; cdecl; // does not work

implementation

procedure init_libapl(progname : ansistring; log_startup : integer); cdecl; external;

function apl_exec(line_utf8 : ansistring) : longint; cdecl; external;
//function apl_exec(line_utf8 : pchar) : longint; cdecl; external;

function apl_command(command_utf8 : pchar) : pchar; cdecl; external;
//function apl_command(command_utf8 : pchar) : longint; cdecl; external;
//function apl_command(command_utf8 : pchar) : ansistring; cdecl; external;
//function apl_command(command_utf8 : ansistring) : ansistring; cdecl; external;
//function apl_command(command_utf8 : ansistring) : longint; cdecl; external;

end.

