GNU PROLOG with UTF8 support
Data Structures | Macros | Functions
stream_c.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include "engine_pl.h"
#include "bips_pl.h"
#include "linedit.h"
#include <unistd.h>
#include <sys/fcntl.h>
Include dependency graph for stream_c.c:

Data Structures

struct  TermSInf
 

Macros

#define TERM_STREAM_WRITE_BLOCK   1024
 
#define ERR_NEEDS_SPECIAL_CLOSE   "special stream: needs appropriate close predicate"
 
#define ERR_CANNOT_CLOSE_STREAM   "cannot close stream"
 
#define CURRENT_STREAM_ALT   X1_2463757272656E745F73747265616D5F616C74
 
#define CURRENT_ALIAS_ALT   X1_2463757272656E745F616C6961735F616C74
 
#define CURRENT_MIRROR_ALT   X1_2463757272656E745F6D6972726F725F616C74
 

Functions

 Prolog_Prototype (CURRENT_STREAM_ALT, 0)
 
 Prolog_Prototype (CURRENT_ALIAS_ALT, 0)
 
 Prolog_Prototype (CURRENT_MIRROR_ALT, 0)
 
Bool Pl_Current_Input_1 (WamWord stm_word)
 
Bool Pl_Current_Output_1 (WamWord stm_word)
 
void Pl_Set_Input_1 (WamWord sora_word)
 
void Pl_Set_Output_1 (WamWord sora_word)
 
void Pl_Set_Top_Level_Streams_2 (WamWord sora_in_word, WamWord sora_out_word)
 
void Pl_Set_Debugger_Streams_2 (WamWord sora_in_word, WamWord sora_out_word)
 
void Pl_Open_3 (WamWord source_sink_word, WamWord mode_word, WamWord stm_word)
 
Bool Pl_Test_Alias_Not_Assigned_1 (WamWord alias_word)
 
Bool Pl_From_Alias_To_Stream_2 (WamWord alias_word, WamWord stm_word)
 
Bool Pl_Add_Stream_Alias_2 (WamWord sora_word, WamWord alias_word)
 
void Pl_Check_Valid_Mirror_1 (WamWord mirror_word)
 
void Pl_Add_Stream_Mirror_2 (WamWord sora_word, WamWord mirror_word)
 
Bool Pl_Remove_Stream_Mirror_2 (WamWord sora_word, WamWord mirror_word)
 
void Pl_Set_Stream_Type_2 (WamWord sora_word, WamWord is_text_word)
 
void Pl_Set_Stream_Eof_Action_2 (WamWord sora_word, WamWord action_word)
 
void Pl_Set_Stream_Buffering_2 (WamWord sora_word, WamWord buff_mode_word)
 
void Pl_Close_1 (WamWord sora_word)
 
void Pl_Close_Stm (int stm, Bool force)
 
void Pl_PB_Empty_Buffer_1 (WamWord sora_word)
 
void Pl_Flush_Output_1 (WamWord sora_word)
 
void Pl_Flush_Output_0 (void)
 
Bool Pl_Current_Stream_1 (WamWord stm_word)
 
Bool Pl_Current_Stream_Alt_0 (void)
 
Bool Pl_Stream_Prop_File_Name_2 (WamWord file_name_word, WamWord stm_word)
 
Bool Pl_Stream_Prop_Mode_2 (WamWord mode_word, WamWord stm_word)
 
Bool Pl_Stream_Prop_Input_1 (WamWord stm_word)
 
Bool Pl_Stream_Prop_Output_1 (WamWord stm_word)
 
Bool Pl_Stream_Prop_Type_2 (WamWord type_word, WamWord stm_word)
 
Bool Pl_Stream_Prop_Reposition_2 (WamWord reposition_word, WamWord stm_word)
 
Bool Pl_Stream_Prop_Eof_Action_2 (WamWord eof_action_word, WamWord stm_word)
 
Bool Pl_Stream_Prop_Buffering_2 (WamWord buffering_word, WamWord stm_word)
 
Bool Pl_Stream_Prop_End_Of_Stream_2 (WamWord end_of_stream_word, WamWord stm_word)
 
Bool Pl_At_End_Of_Stream_1 (WamWord sora_word)
 
Bool Pl_At_End_Of_Stream_0 (void)
 
Bool Pl_Current_Alias_2 (WamWord stm_word, WamWord alias_word)
 
Bool Pl_Current_Alias_Alt_0 (void)
 
Bool Pl_Current_Mirror_2 (WamWord stm_word, WamWord m_stm_word)
 
Bool Pl_Current_Mirror_Alt_0 (void)
 
Bool Pl_Stream_Position_2 (WamWord sora_word, WamWord position_word)
 
Bool Pl_Set_Stream_Position_2 (WamWord sora_word, WamWord position_word)
 
Bool Pl_Seek_4 (WamWord sora_word, WamWord whence_word, WamWord offset_word, WamWord new_loc_word)
 
Bool Pl_Character_Count_2 (WamWord sora_word, WamWord count_word)
 
Bool Pl_Line_Count_2 (WamWord sora_word, WamWord count_word)
 
Bool Pl_Line_Position_2 (WamWord sora_word, WamWord count_word)
 
Bool Pl_Stream_Line_Column_3 (WamWord sora_word, WamWord line_word, WamWord col_word)
 
Bool Pl_Set_Stream_Line_Column_3 (WamWord sora_word, WamWord line_word, WamWord col_word)
 
void Pl_Open_Input_Term_Stream_2 (WamWord sink_term_word, WamWord stm_word)
 
void Pl_Close_Input_Term_Stream_1 (WamWord sora_word)
 
void Pl_Open_Output_Term_Stream_1 (WamWord stm_word)
 
Bool Pl_Close_Output_Term_Stream_2 (WamWord sora_word, WamWord sink_term_word)
 

Macro Definition Documentation

#define CURRENT_ALIAS_ALT   X1_2463757272656E745F616C6961735F616C74
#define CURRENT_MIRROR_ALT   X1_2463757272656E745F6D6972726F725F616C74
#define CURRENT_STREAM_ALT   X1_2463757272656E745F73747265616D5F616C74
#define ERR_CANNOT_CLOSE_STREAM   "cannot close stream"
#define ERR_NEEDS_SPECIAL_CLOSE   "special stream: needs appropriate close predicate"
#define TERM_STREAM_WRITE_BLOCK   1024

Function Documentation

Bool Pl_Add_Stream_Alias_2 ( WamWord  sora_word,
WamWord  alias_word 
)

Here is the call graph for this function:

void Pl_Add_Stream_Mirror_2 ( WamWord  sora_word,
WamWord  mirror_word 
)

Here is the call graph for this function:

Bool Pl_At_End_Of_Stream_0 ( void  )

Here is the call graph for this function:

Bool Pl_At_End_Of_Stream_1 ( WamWord  sora_word)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool Pl_Character_Count_2 ( WamWord  sora_word,
WamWord  count_word 
)

Here is the call graph for this function:

void Pl_Check_Valid_Mirror_1 ( WamWord  mirror_word)

Here is the call graph for this function:

void Pl_Close_1 ( WamWord  sora_word)

Here is the call graph for this function:

void Pl_Close_Input_Term_Stream_1 ( WamWord  sora_word)

Here is the call graph for this function:

Bool Pl_Close_Output_Term_Stream_2 ( WamWord  sora_word,
WamWord  sink_term_word 
)

Here is the call graph for this function:

void Pl_Close_Stm ( int  stm,
Bool  force 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool Pl_Current_Alias_2 ( WamWord  stm_word,
WamWord  alias_word 
)

Here is the call graph for this function:

Bool Pl_Current_Alias_Alt_0 ( void  )

Here is the call graph for this function:

Bool Pl_Current_Input_1 ( WamWord  stm_word)

Here is the call graph for this function:

Bool Pl_Current_Mirror_2 ( WamWord  stm_word,
WamWord  m_stm_word 
)

Here is the call graph for this function:

Bool Pl_Current_Mirror_Alt_0 ( void  )

Here is the call graph for this function:

Bool Pl_Current_Output_1 ( WamWord  stm_word)

Here is the call graph for this function:

Bool Pl_Current_Stream_1 ( WamWord  stm_word)

Here is the call graph for this function:

Bool Pl_Current_Stream_Alt_0 ( void  )

Here is the call graph for this function:

void Pl_Flush_Output_0 ( void  )

Here is the call graph for this function:

void Pl_Flush_Output_1 ( WamWord  sora_word)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool Pl_From_Alias_To_Stream_2 ( WamWord  alias_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Line_Count_2 ( WamWord  sora_word,
WamWord  count_word 
)

Here is the call graph for this function:

Bool Pl_Line_Position_2 ( WamWord  sora_word,
WamWord  count_word 
)

Here is the call graph for this function:

void Pl_Open_3 ( WamWord  source_sink_word,
WamWord  mode_word,
WamWord  stm_word 
)

Here is the call graph for this function:

void Pl_Open_Input_Term_Stream_2 ( WamWord  sink_term_word,
WamWord  stm_word 
)

Here is the call graph for this function:

void Pl_Open_Output_Term_Stream_1 ( WamWord  stm_word)

Here is the call graph for this function:

void Pl_PB_Empty_Buffer_1 ( WamWord  sora_word)

Here is the call graph for this function:

Bool Pl_Remove_Stream_Mirror_2 ( WamWord  sora_word,
WamWord  mirror_word 
)

Here is the call graph for this function:

Bool Pl_Seek_4 ( WamWord  sora_word,
WamWord  whence_word,
WamWord  offset_word,
WamWord  new_loc_word 
)

Here is the call graph for this function:

void Pl_Set_Debugger_Streams_2 ( WamWord  sora_in_word,
WamWord  sora_out_word 
)

Here is the call graph for this function:

void Pl_Set_Input_1 ( WamWord  sora_word)

Here is the call graph for this function:

void Pl_Set_Output_1 ( WamWord  sora_word)

Here is the call graph for this function:

void Pl_Set_Stream_Buffering_2 ( WamWord  sora_word,
WamWord  buff_mode_word 
)

Here is the call graph for this function:

void Pl_Set_Stream_Eof_Action_2 ( WamWord  sora_word,
WamWord  action_word 
)

Here is the call graph for this function:

Bool Pl_Set_Stream_Line_Column_3 ( WamWord  sora_word,
WamWord  line_word,
WamWord  col_word 
)

Here is the call graph for this function:

Bool Pl_Set_Stream_Position_2 ( WamWord  sora_word,
WamWord  position_word 
)

Here is the call graph for this function:

void Pl_Set_Stream_Type_2 ( WamWord  sora_word,
WamWord  is_text_word 
)

Here is the call graph for this function:

void Pl_Set_Top_Level_Streams_2 ( WamWord  sora_in_word,
WamWord  sora_out_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Line_Column_3 ( WamWord  sora_word,
WamWord  line_word,
WamWord  col_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Position_2 ( WamWord  sora_word,
WamWord  position_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Buffering_2 ( WamWord  buffering_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_End_Of_Stream_2 ( WamWord  end_of_stream_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Eof_Action_2 ( WamWord  eof_action_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_File_Name_2 ( WamWord  file_name_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Input_1 ( WamWord  stm_word)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Mode_2 ( WamWord  mode_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Output_1 ( WamWord  stm_word)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Reposition_2 ( WamWord  reposition_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Stream_Prop_Type_2 ( WamWord  type_word,
WamWord  stm_word 
)

Here is the call graph for this function:

Bool Pl_Test_Alias_Not_Assigned_1 ( WamWord  alias_word)

Here is the call graph for this function:

Prolog_Prototype ( CURRENT_STREAM_ALT  ,
 
)
Prolog_Prototype ( CURRENT_ALIAS_ALT  ,
 
)
Prolog_Prototype ( CURRENT_MIRROR_ALT  ,
 
)