GNU PROLOG with UTF8 support
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
src_rdr_c.c File Reference
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include "gp_config.h"
#include <unistd.h>
#include "engine_pl.h"
#include "bips_pl.h"
Include dependency graph for src_rdr_c.c:

Data Structures

struct  sr_one_direct
 
struct  SRDirect
 
struct  sr_file
 
struct  sr_module
 
struct  SRInf
 

Macros

#define DO   0
 
#define UNDO   1
 
#define REREAD_MASK   (1 << 16)
 
#define REFLECT_EOF_MASK   (1 << 17)
 
#define UNDO_DIRECTIVES_MASK   (1 << 18)
 
#define Interf_Body(interf)   ((interf) ? "module" : "body")
 
#define SR_CURRENT_DESC_ALT   X1_2473725F63757272656E745F64657363726970746F725F616C74
 

Typedefs

typedef struct sr_one_directPSROneDirect
 
typedef struct sr_one_direct SROneDirect
 
typedef struct sr_filePSRFile
 
typedef struct sr_file SRFile
 
typedef struct sr_modulePSRModule
 
typedef struct sr_module SRModule
 

Enumerations

enum  SRDirType { OP, SET_PROLOG_FLAG, CHAR_CONVERSION }
 

Functions

static void Common_Clean (SRInf *sr, Bool for_reread)
 
static SRInfGet_Descriptor (WamWord desc_word, Bool accept_none)
 
static void Do_Directives (SRDirect *direct)
 
static void Undo_Directives (SRDirect *direct)
 
static void Exec_One_Directive (SROneDirect *o, int do_undo)
 
static void Close_Current_Module (void)
 
static StmInfWrite_Location (WamWord sora_word, WamWord list_word, int atom_file_name, int l1, int l2c)
 
static void Write_Message_Text (StmInf *pstm, WamWord sora_word, WamWord type_word, WamWord format_word, WamWord args_word)
 
void Pl_Op_3 (WamWord prec_word, WamWord specif_word, WamWord oper_word)
 
Bool Pl_Set_Prolog_Flag_2 (WamWord flag_word, WamWord value_word)
 
void Pl_Char_Conversion_2 (WamWord in_char_word, WamWord out_char_word)
 
void Pl_Write_2 (WamWord sora_word, WamWord term_word)
 
void Pl_Format_3 (WamWord sora_word, WamWord format_word, WamWord args_word)
 
 Prolog_Prototype (SR_CURRENT_DESC_ALT, 0)
 
void Pl_SR_Init_Open_2 (WamWord desc_word, WamWord out_sora_word)
 
void Pl_SR_Open_File_2 (WamWord file_name_word, WamWord from_stream_word)
 
void Pl_SR_Close_1 (WamWord desc_word)
 
Bool Pl_SR_New_Pass_1 (WamWord desc_word)
 
void Pl_SR_Add_Directive_7 (WamWord type_word, WamWord d1_word, WamWord d2_word, WamWord d3_word, WamWord u1_word, WamWord u2_word, WamWord u3_word)
 
void Pl_SR_Change_Options_0 (void)
 
void Pl_SR_Get_Stm_For_Read_Term_1 (WamWord stm_word)
 
Bool Pl_SR_EOF_Reached_1 (WamWord err_word)
 
void Pl_SR_Update_Position_0 (void)
 
void Pl_SR_Start_Module_3 (WamWord module_name_word, WamWord interface_word, WamWord err_word)
 
void Pl_SR_Stop_Module_3 (WamWord module_name_word, WamWord interface_word, WamWord err_word)
 
Bool Pl_SR_Current_Descriptor_1 (WamWord desc_word)
 
Bool Pl_SR_Current_Descriptor_Alt_0 (void)
 
Bool Pl_SR_Is_Bit_Set_1 (WamWord bit_word)
 
Bool Pl_SR_Get_Stm_2 (WamWord desc_word, WamWord stm_word)
 
Bool Pl_SR_Get_Module_3 (WamWord desc_word, WamWord module_name_word, WamWord interface_word)
 
Bool Pl_SR_Get_File_Name_2 (WamWord desc_word, WamWord file_name_word)
 
Bool Pl_SR_Get_Position_3 (WamWord desc_word, WamWord l1_word, WamWord l2_word)
 
Bool Pl_SR_Get_Include_List_2 (WamWord desc_word, WamWord list_word)
 
Bool Pl_SR_Get_Include_Stream_List_2 (WamWord desc_word, WamWord list_word)
 
Bool Pl_SR_Get_Size_Counters_3 (WamWord desc_word, WamWord chars_word, WamWord lines_word)
 
Bool Pl_SR_Get_Error_Counters_3 (WamWord desc_word, WamWord errors_word, WamWord warnings_word)
 
void Pl_SR_Set_Error_Counters_3 (WamWord desc_word, WamWord errors_word, WamWord warnings_word)
 
void Pl_SR_Check_Descriptor_1 (WamWord desc_word)
 
void Pl_SR_Write_Message_4 (WamWord desc_word, WamWord type_word, WamWord format_word, WamWord args_word)
 
void Pl_SR_Write_Message_6 (WamWord desc_word, WamWord l1_word, WamWord l2c_word, WamWord type_word, WamWord format_word, WamWord args_word)
 
void Pl_SR_Write_Message_8 (WamWord desc_word, WamWord list_word, WamWord file_name_word, WamWord l1_word, WamWord l2c_word, WamWord type_word, WamWord format_word, WamWord args_word)
 

Variables

static SRInfsr_tbl = NULL
 
static int sr_tbl_size = 0
 
static int sr_last_used = -1
 
static SRInfcur_sr
 

Macro Definition Documentation

#define DO   0
#define Interf_Body (   interf)    ((interf) ? "module" : "body")
#define REFLECT_EOF_MASK   (1 << 17)
#define REREAD_MASK   (1 << 16)
#define SR_CURRENT_DESC_ALT   X1_2473725F63757272656E745F64657363726970746F725F616C74
#define UNDO   1
#define UNDO_DIRECTIVES_MASK   (1 << 18)

Typedef Documentation

typedef struct sr_file* PSRFile
typedef struct sr_module* PSRModule
typedef struct sr_one_direct* PSROneDirect
typedef struct sr_file SRFile
typedef struct sr_module SRModule
typedef struct sr_one_direct SROneDirect

Enumeration Type Documentation

enum SRDirType
Enumerator
OP 
SET_PROLOG_FLAG 
CHAR_CONVERSION 

Function Documentation

static void Close_Current_Module ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Common_Clean ( SRInf sr,
Bool  for_reread 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Do_Directives ( SRDirect direct)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Exec_One_Directive ( SROneDirect o,
int  do_undo 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static SRInf * Get_Descriptor ( WamWord  desc_word,
Bool  accept_none 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Char_Conversion_2 ( WamWord  in_char_word,
WamWord  out_char_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Format_3 ( WamWord  sora_word,
WamWord  format_word,
WamWord  args_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Op_3 ( WamWord  prec_word,
WamWord  specif_word,
WamWord  oper_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool Pl_Set_Prolog_Flag_2 ( WamWord  flag_word,
WamWord  value_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_SR_Add_Directive_7 ( WamWord  type_word,
WamWord  d1_word,
WamWord  d2_word,
WamWord  d3_word,
WamWord  u1_word,
WamWord  u2_word,
WamWord  u3_word 
)

Here is the call graph for this function:

void Pl_SR_Change_Options_0 ( void  )
void Pl_SR_Check_Descriptor_1 ( WamWord  desc_word)

Here is the call graph for this function:

void Pl_SR_Close_1 ( WamWord  desc_word)

Here is the call graph for this function:

Bool Pl_SR_Current_Descriptor_1 ( WamWord  desc_word)

Here is the call graph for this function:

Bool Pl_SR_Current_Descriptor_Alt_0 ( void  )

Here is the call graph for this function:

Bool Pl_SR_EOF_Reached_1 ( WamWord  err_word)

Here is the call graph for this function:

Bool Pl_SR_Get_Error_Counters_3 ( WamWord  desc_word,
WamWord  errors_word,
WamWord  warnings_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_File_Name_2 ( WamWord  desc_word,
WamWord  file_name_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_Include_List_2 ( WamWord  desc_word,
WamWord  list_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_Include_Stream_List_2 ( WamWord  desc_word,
WamWord  list_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_Module_3 ( WamWord  desc_word,
WamWord  module_name_word,
WamWord  interface_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_Position_3 ( WamWord  desc_word,
WamWord  l1_word,
WamWord  l2_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_Size_Counters_3 ( WamWord  desc_word,
WamWord  chars_word,
WamWord  lines_word 
)

Here is the call graph for this function:

Bool Pl_SR_Get_Stm_2 ( WamWord  desc_word,
WamWord  stm_word 
)

Here is the call graph for this function:

void Pl_SR_Get_Stm_For_Read_Term_1 ( WamWord  stm_word)

Here is the call graph for this function:

void Pl_SR_Init_Open_2 ( WamWord  desc_word,
WamWord  out_sora_word 
)

Here is the call graph for this function:

Bool Pl_SR_Is_Bit_Set_1 ( WamWord  bit_word)

Here is the call graph for this function:

Bool Pl_SR_New_Pass_1 ( WamWord  desc_word)

Here is the call graph for this function:

void Pl_SR_Open_File_2 ( WamWord  file_name_word,
WamWord  from_stream_word 
)

Here is the call graph for this function:

void Pl_SR_Set_Error_Counters_3 ( WamWord  desc_word,
WamWord  errors_word,
WamWord  warnings_word 
)

Here is the call graph for this function:

void Pl_SR_Start_Module_3 ( WamWord  module_name_word,
WamWord  interface_word,
WamWord  err_word 
)

Here is the call graph for this function:

void Pl_SR_Stop_Module_3 ( WamWord  module_name_word,
WamWord  interface_word,
WamWord  err_word 
)

Here is the call graph for this function:

void Pl_SR_Update_Position_0 ( void  )
void Pl_SR_Write_Message_4 ( WamWord  desc_word,
WamWord  type_word,
WamWord  format_word,
WamWord  args_word 
)

Here is the call graph for this function:

void Pl_SR_Write_Message_6 ( WamWord  desc_word,
WamWord  l1_word,
WamWord  l2c_word,
WamWord  type_word,
WamWord  format_word,
WamWord  args_word 
)

Here is the call graph for this function:

void Pl_SR_Write_Message_8 ( WamWord  desc_word,
WamWord  list_word,
WamWord  file_name_word,
WamWord  l1_word,
WamWord  l2c_word,
WamWord  type_word,
WamWord  format_word,
WamWord  args_word 
)

Here is the call graph for this function:

void Pl_Write_2 ( WamWord  sora_word,
WamWord  term_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Prolog_Prototype ( SR_CURRENT_DESC_ALT  ,
 
)
static void Undo_Directives ( SRDirect direct)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static StmInf * Write_Location ( WamWord  sora_word,
WamWord  list_word,
int  atom_file_name,
int  l1,
int  l2c 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Write_Message_Text ( StmInf pstm,
WamWord  sora_word,
WamWord  type_word,
WamWord  format_word,
WamWord  args_word 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

SRInf* cur_sr
static
int sr_last_used = -1
static
SRInf* sr_tbl = NULL
static
int sr_tbl_size = 0
static