GNU PROLOG with UTF8 support
Data Structures | Macros | Functions | Variables
os_interf_c.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "gp_config.h"
#include <dirent.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/wait.h>
#include "engine_pl.h"
#include "bips_pl.h"
Include dependency graph for os_interf_c.c:

Data Structures

struct  InfSig
 

Macros

#define _XOPEN_SOURCE_EXTENDED   /* for alpha/OSF (usleep prototype) */
 
#define OBJ_INIT   Os_Interf_Initializer
 
#define MAX_SIGNALS   255
 
#define MAX_SPAWN_ARGS   1024
 

Functions

static int Flag_Of_Permission (WamWord perm_word, Bool is_a_directory)
 
static char * Get_Path_Name (WamWord path_name_word)
 
static Bool Date_Time_To_Prolog (time_t *t, WamWord date_time_word)
 
static int Select_Init_Set (WamWord list_word, fd_set *set, int check)
 
static Bool Select_Init_Ready_List (WamWord list_word, fd_set *set, WamWord ready_list_word)
 
static void Os_Interf_Initializer (void)
 
Bool Pl_Make_Directory_1 (WamWord path_name_word)
 
Bool Pl_Delete_Directory_1 (WamWord path_name_word)
 
Bool Pl_Working_Directory_1 (WamWord path_name_word)
 
Bool Pl_Change_Directory_1 (WamWord path_name_word)
 
Bool Pl_Directory_Files_2 (WamWord path_name_word, WamWord list_word)
 
Bool Pl_Rename_File_2 (WamWord path_name1_word, WamWord path_name2_word)
 
void Pl_Unlink_1 (WamWord path_name_word)
 
Bool Pl_Delete_File_1 (WamWord path_name_word)
 
Bool Pl_File_Exists_1 (WamWord path_name_word)
 
Bool Pl_File_Permission_2 (WamWord path_name_word, WamWord perm_list_word)
 
Bool Pl_File_Prop_Absolute_File_Name_2 (WamWord absolute_path_name_word, WamWord path_name_word)
 
Bool Pl_File_Prop_Real_File_Name_2 (WamWord real_path_name_word, WamWord path_name_word)
 
Bool Pl_File_Prop_Type_2 (WamWord type_word, WamWord path_name_word)
 
Bool Pl_File_Prop_Size_2 (WamWord size_word, WamWord path_name_word)
 
Bool Pl_Check_Prop_Perm_And_File_2 (WamWord perm_word, WamWord path_name_word)
 
Bool Pl_File_Prop_Date_2 (WamWord date_time_word, WamWord path_name_word)
 
Bool Pl_Temporary_Name_2 (WamWord template_word, WamWord path_name_word)
 
Bool Pl_Temporary_File_3 (WamWord dir_word, WamWord prefix_word, WamWord path_name_word)
 
Bool Pl_Date_Time_1 (WamWord date_time_word)
 
Bool Pl_Host_Name_1 (WamWord host_name_word)
 
Bool Pl_Os_Version_1 (WamWord os_version_word)
 
Bool Pl_Architecture_1 (WamWord architecture_word)
 
void Pl_Sleep_1 (WamWord seconds_word)
 
Bool Pl_Shell_2 (WamWord cmd_word, WamWord status_word)
 
Bool Pl_System_2 (WamWord cmd_word, WamWord status_word)
 
Bool Pl_Spawn_3 (WamWord cmd_word, WamWord list_word, WamWord status_word)
 
Bool Pl_Popen_3 (WamWord cmd_word, WamWord mode_word, WamWord stm_word)
 
Bool Pl_Exec_5 (WamWord cmd_word, WamWord stm_in_word, WamWord stm_out_word, WamWord stm_err_word, WamWord pid_word)
 
Bool Pl_Create_Pipe_2 (WamWord stm_in_word, WamWord stm_out_word)
 
Bool Pl_Fork_Prolog_1 (WamWord pid_word)
 
Bool Pl_Select_5 (WamWord reads_word, WamWord ready_reads_word, WamWord writes_word, WamWord ready_writes_word, WamWord time_out_word)
 
Bool Pl_Prolog_Pid_1 (WamWord prolog_pid_word)
 
Bool Pl_Send_Signal_2 (WamWord pid_word, WamWord signal_word)
 
Bool Pl_Wait_2 (WamWord pid_word, WamWord status_word)
 

Variables

static int atom_dt
 
static int atom_execute
 
static int atom_search
 
static int atom_regular
 
static int atom_directory
 
static int atom_fifo
 
static int atom_socket
 
static int atom_character_device
 
static int atom_block_device
 
static int atom_unknown
 
static InfSig tsig [MAX_SIGNALS]
 
static int nb_sig
 

Macro Definition Documentation

#define _XOPEN_SOURCE_EXTENDED   /* for alpha/OSF (usleep prototype) */
#define MAX_SIGNALS   255
#define MAX_SPAWN_ARGS   1024
#define OBJ_INIT   Os_Interf_Initializer

Function Documentation

static Bool Date_Time_To_Prolog ( time_t *  t,
WamWord  date_time_word 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int Flag_Of_Permission ( WamWord  perm_word,
Bool  is_a_directory 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static char * Get_Path_Name ( WamWord  path_name_word)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Os_Interf_Initializer ( void  )
static

Here is the call graph for this function:

Bool Pl_Architecture_1 ( WamWord  architecture_word)

Here is the call graph for this function:

Bool Pl_Change_Directory_1 ( WamWord  path_name_word)

Here is the call graph for this function:

Bool Pl_Check_Prop_Perm_And_File_2 ( WamWord  perm_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_Create_Pipe_2 ( WamWord  stm_in_word,
WamWord  stm_out_word 
)

Here is the call graph for this function:

Bool Pl_Date_Time_1 ( WamWord  date_time_word)

Here is the call graph for this function:

Bool Pl_Delete_Directory_1 ( WamWord  path_name_word)

Here is the call graph for this function:

Bool Pl_Delete_File_1 ( WamWord  path_name_word)

Here is the call graph for this function:

Bool Pl_Directory_Files_2 ( WamWord  path_name_word,
WamWord  list_word 
)

Here is the call graph for this function:

Bool Pl_Exec_5 ( WamWord  cmd_word,
WamWord  stm_in_word,
WamWord  stm_out_word,
WamWord  stm_err_word,
WamWord  pid_word 
)

Here is the call graph for this function:

Bool Pl_File_Exists_1 ( WamWord  path_name_word)

Here is the call graph for this function:

Bool Pl_File_Permission_2 ( WamWord  path_name_word,
WamWord  perm_list_word 
)

Here is the call graph for this function:

Bool Pl_File_Prop_Absolute_File_Name_2 ( WamWord  absolute_path_name_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_File_Prop_Date_2 ( WamWord  date_time_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_File_Prop_Real_File_Name_2 ( WamWord  real_path_name_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_File_Prop_Size_2 ( WamWord  size_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_File_Prop_Type_2 ( WamWord  type_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_Fork_Prolog_1 ( WamWord  pid_word)

Here is the call graph for this function:

Bool Pl_Host_Name_1 ( WamWord  host_name_word)

Here is the call graph for this function:

Bool Pl_Make_Directory_1 ( WamWord  path_name_word)

Here is the call graph for this function:

Bool Pl_Os_Version_1 ( WamWord  os_version_word)

Here is the call graph for this function:

Bool Pl_Popen_3 ( WamWord  cmd_word,
WamWord  mode_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Prolog_Pid_1 ( WamWord  prolog_pid_word)

Here is the call graph for this function:

Bool Pl_Rename_File_2 ( WamWord  path_name1_word,
WamWord  path_name2_word 
)

Here is the call graph for this function:

Bool Pl_Select_5 ( WamWord  reads_word,
WamWord  ready_reads_word,
WamWord  writes_word,
WamWord  ready_writes_word,
WamWord  time_out_word 
)

Here is the call graph for this function:

Bool Pl_Send_Signal_2 ( WamWord  pid_word,
WamWord  signal_word 
)

Here is the call graph for this function:

Bool Pl_Shell_2 ( WamWord  cmd_word,
WamWord  status_word 
)

Here is the call graph for this function:

void Pl_Sleep_1 ( WamWord  seconds_word)

Here is the call graph for this function:

Bool Pl_Spawn_3 ( WamWord  cmd_word,
WamWord  list_word,
WamWord  status_word 
)

Here is the call graph for this function:

Bool Pl_System_2 ( WamWord  cmd_word,
WamWord  status_word 
)

Here is the call graph for this function:

Bool Pl_Temporary_File_3 ( WamWord  dir_word,
WamWord  prefix_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

Bool Pl_Temporary_Name_2 ( WamWord  template_word,
WamWord  path_name_word 
)

Here is the call graph for this function:

void Pl_Unlink_1 ( WamWord  path_name_word)

Here is the call graph for this function:

Bool Pl_Wait_2 ( WamWord  pid_word,
WamWord  status_word 
)

Here is the call graph for this function:

Bool Pl_Working_Directory_1 ( WamWord  path_name_word)

Here is the call graph for this function:

static Bool Select_Init_Ready_List ( WamWord  list_word,
fd_set *  set,
WamWord  ready_list_word 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int Select_Init_Set ( WamWord  list_word,
fd_set *  set,
int  check 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int atom_block_device
static
int atom_character_device
static
int atom_directory
static
int atom_dt
static
int atom_execute
static
int atom_fifo
static
int atom_regular
static
int atom_search
static
int atom_socket
static
int atom_unknown
static
int nb_sig
static
InfSig tsig[MAX_SIGNALS]
static