Operating System Functionality

Portable Interaction with the OS, be it Unix, Linux, OSX, or Windows.

Support for Operating System Interfacing.

YAP provides a library of system utilities compatible with the SICStus Prolog system library. This library extends and to some point complements the functionality of Operating System access routines. The library includes Unix/Linux and Win32 C code. They are available through the use_module(library(system)) command.

Define:

1. BUF_SIZE:

Functions:

1. X_API void init_sys(void):

1. static YAP_Bool sysmktime(void):

1. static YAP_Bool datime(void):

1. static YAP_Bool p_unlink(void):

1. static YAP_Bool p_rmdir(void):

1. static YAP_Bool rename_file(void):

1. YAP_Bool OSCopyFile(void): : see https://stackoverflow.com/questions/2180079/how-can-i-copy-a-file-on-unix-using-c for the original code.

1. static YAP_Bool read_link(void):

1. static YAP_Bool dir_separator(void):

1. static YAP_Bool file_property(void):

1. static YAP_Bool p_mktemp(void):

1. static YAP_Bool p_tmpnam(void):

1. static YAP_Bool temp_file(void):

1. static YAP_Bool p_tmpdir(void):

1. static YAP_Bool p_environ(void):

1. static YAP_Bool execute_command(void):

1. static YAP_Bool do_system(void):

1. static YAP_Bool do_shell(void):

1. static YAP_Bool plwait(void):

1. static YAP_Bool host_name(void):

1. static YAP_Bool host_id(void):

1. static YAP_Bool pid(void):

1. static YAP_Bool win(void):

1. static YAP_Bool p_kill(void):

1. static YAP_Bool m/5(void): : "md5( +Text, -Key, -Remainingkey" )

@class md5_3

encode text using OpenSSL

arg Text is a List of ASCII codes arg2 and 3: difference list with the character codes for the digest.

return:
whether ARG1's md5 unifies with the difference liat.

1. static YAP_Bool error_message(void):