Go to the source code of this file.
#define void void __attribute__ ((used,noinline,regparm(0),stdcall)) |
Creates a data pool for all atoms and creates one special atom representing the empty list.
Definition at line 130 of file atoms.c.
133 printf(
"<ATOM> Atoms initialized\n");
Returns the empty list back to the data pool.
Definition at line 182 of file atoms.c.
186 #ifdef DEBUG_MEMORY_LEAKS
191 printf(
"<ATOM> Atoms finalized\n");
- Parameters
-
Adds a link to an atom by increasing atom's reference count.
Definition at line 206 of file atoms.c.
217 #ifdef DEBUG_RUNTIME_ATOMS
221 dump_atom_address( a );
226 #ifdef DEBUG_COMPILETIME_ATOMS
230 dump_atom_address( a );
256 printf(
"<ATOM> [%08x] ref+1\n",(
int)a);
- Parameters
-
Decrements the reference count for the atom and if it reaches 0 then frees the atom using one of the functions delete_numeric, delete_list, delete_word, delete_subword, delete_error, delete_var.
Definition at line 276 of file atoms.c.
279 __asm__
volatile ( ASM_STORE_RESULT:::ASM_CLOBBER_REGISTERS );
283 static deleter_t deleters[
MAX_ID] = {
309 #ifdef DEBUG_RUNTIME_ATOMS
313 dump_atom_address( a );
318 #ifdef DEBUG_COMPILETIME_ATOMS
322 dump_atom_address( a );
344 printf(
"<ATOM> [%08x] ref-1\n",(
int)a);
352 deleter_t deleter = deleters[
ID(a)];
356 __asm__
volatile ( ASM_RESTORE_RESULT:::ASM_CLOBBER_REGISTERS );
- Parameters
-
a | atom to dump |
level | level of nesting |
Dumps atom's contents using a call-back outter
function. Texts are automatically indented according to the level
. Typically this function is used to print an atom when the call-back function forwards contents to standard output. The call-back function is set by init_output().
< array of deleter functions for each atom type
Definition at line 375 of file atoms.c.
379 static dumper_t dumpers[
MAX_ID] = {
397 #ifdef DEBUG_REF_COUNT
405 #define DUMP_BUF_SIZE 64
412 dumper_t dumper = dumpers[
ID(a)];
- Parameters
-
Dumps atom's contents throught the current text output function (e.g. use_stdout).
Definition at line 427 of file atoms.c.
- Parameters
-
Dumps atom's contents throught the current text output function (e.g. use_stdout) and moves cursor to the next line.
Definition at line 444 of file atoms.c.
- Parameters
-
new_outter | new outter function to use by dump and dumpln |
Initializes the text output system by setting the std_outter function to output text throught it.
Definition at line 461 of file atoms.c.
- Parameters
-
new_inner | new inner function |
new_inner_eof | new inner_eof function |
Initializes the text input system by setting the std_inner and :std_inner_eof functions to input text throught it.
Definition at line 479 of file atoms.c.
- Parameters
-
string | text to print |
len | length of text |
This function prints text to either the hooked output or to a file.
Definition at line 496 of file atoms.c.
504 if( len==-1 ) len =
STRLEN(
string );
505 for( ; len>0; len--,
string++ )
507 int crlf = (
DEBAR(*
string)==0x0D) && (
DEBAR(*(
string+1))==0x0A);
511 wc[0] =
DEBAR(*
string);
523 if( len==-1 ) len =
STRLEN(
string );
524 for( ; len>0; len--,
string++ )
526 int crlf = (
DEBAR(*
string)==0x0D) && (
DEBAR(*(
string+1))==0x0A);
530 wc[0] =
DEBAR(*
string);
Return EOF status of a hooked or file stream.
Definition at line 549 of file atoms.c.
FILE* input_stream = NULL |
FILE* output_stream = NULL |
FILE* dribble_handle = NULL |
struct lconv* locale_info |