GNU PROLOG with UTF8 support
Macros | Functions | Variables
atom.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <ctype.h>
#include "engine_pl.h"
#include "pl_wchar.h"
#include "linedit.h"
Include dependency graph for atom.c:

Macros

#define ATOM_FILE
 
#define ERR_ATOM_NIL_INVALID   "atom: invalid ATOM_NIL (should be %d)"
 
#define ERR_TABLE_FULL_ENV   "Atom table full (max atom: %d, environment variable used: %s)"
 
#define ERR_TABLE_FULL_NO_ENV   "Atom table full (max atom: %d - fixed size)"
 
#define GEN_SYM_CHARS   "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 
#define Gen_Sym_Rand()   (gen_sym_rand_next = gen_sym_rand_next * 1103515245 + 12345, (gen_sym_rand_next / 65536 % 32768))
 
#define TRY_MAX   1 /* 1 seems better than anything else on average ! */
 

Functions

static int Add_Atom (char *name, int len, unsigned hash, AtomInf *patom, Bool allocate)
 
static AtomInfLocate_Atom (char *name, unsigned hash)
 
static unsigned Hash_String (char *str, int len)
 
static void Error_Table_Full (void)
 
void Pl_Init_Atom (void)
 
int Pl_Create_Allocate_Atom (char *name)
 
int Pl_Create_Atom (char *name)
 
WamWord FC Pl_Create_Atom_Tagged (char *name)
 
int Pl_Find_Atom (char *name)
 
int Pl_Gen_New_Atom (char *prefix)
 
int Pl_Find_Next_Atom (int last_atom)
 
int ATOM_CHAR32 (CHAR32_T c)
 

Variables

int pl_char_type [256]
 
char pl_escape_symbol [] = "abfnrtv"
 
char pl_escape_char [] = "\a\b\f\n\r\t\v"
 
static char str_char [256][2]
 

Macro Definition Documentation

#define ATOM_FILE
#define ERR_ATOM_NIL_INVALID   "atom: invalid ATOM_NIL (should be %d)"
#define ERR_TABLE_FULL_ENV   "Atom table full (max atom: %d, environment variable used: %s)"
#define ERR_TABLE_FULL_NO_ENV   "Atom table full (max atom: %d - fixed size)"
#define GEN_SYM_CHARS   "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
#define Gen_Sym_Rand ( )    (gen_sym_rand_next = gen_sym_rand_next * 1103515245 + 12345, (gen_sym_rand_next / 65536 % 32768))
#define TRY_MAX   1 /* 1 seems better than anything else on average ! */

Function Documentation

static int Add_Atom ( char *  name,
int  len,
unsigned  hash,
AtomInf patom,
Bool  allocate 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

int ATOM_CHAR32 ( CHAR32_T  c)

Here is the call graph for this function:

Here is the caller graph for this function:

static void Error_Table_Full ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned Hash_String ( char *  str,
int  len 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static AtomInf * Locate_Atom ( char *  name,
unsigned  hash 
)
static

Here is the caller graph for this function:

int Pl_Create_Allocate_Atom ( char *  name)

Here is the call graph for this function:

Here is the caller graph for this function:

int Pl_Create_Atom ( char *  name)

Here is the caller graph for this function:

WamWord FC Pl_Create_Atom_Tagged ( char *  name)

Here is the call graph for this function:

int Pl_Find_Atom ( char *  name)

Here is the call graph for this function:

int Pl_Find_Next_Atom ( int  last_atom)

Here is the caller graph for this function:

int Pl_Gen_New_Atom ( char *  prefix)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Init_Atom ( void  )

Here is the caller graph for this function:

Variable Documentation

int pl_char_type[256]
Initial value:
= {
LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA,
LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA, LA,
LA, SC, DQ, GR, GR, CM, GR, QT, PC, PC, GR, GR, SC, GR, GR, GR,
DI, DI, DI, DI, DI, DI, DI, DI, DI, DI, GR, SC, GR, GR, GR, GR,
GR, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL,
CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, CL, PC, GR, PC, GR, UL,
BQ, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL,
SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, SL, PC, PC, PC, GR, LA
}
#define DI
Definition: atom.h:59
#define BQ
Definition: atom.h:56
#define LA
Definition: atom.h:52
#define UL
Definition: atom.h:60
#define DQ
Definition: atom.h:55
#define PC
Definition: atom.h:58
#define CL
Definition: atom.h:61
#define CM
Definition: atom.h:63
#define SC
Definition: atom.h:53
#define SL
Definition: atom.h:62
#define QT
Definition: atom.h:54
#define GR
Definition: atom.h:57
char pl_escape_char[] = "\a\b\f\n\r\t\v"
char pl_escape_symbol[] = "abfnrtv"
char str_char[256][2]
static