Main Page | Data Structures | File List | Data Fields | Globals

stack.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "stack.h"
#include "scanner.h"
#include "errhandler.h"

Include dependency graph for stack.c:

Go to the source code of this file.

Functions

void clear_stack (void)
void init_stack (void)
static void stackerror (bool stat)
bool min_stack_depth (int mindep)
static bool room_on_stack_for (int newdep)
void dpush (long data)
long dpop (void)
long dget (void)
long stackdepth (void)
void swap (void)
void two_swap (void)

Variables

long * dstack
static long * startdstack
static long * enddstack


Function Documentation

void clear_stack void   ) 
 

Definition at line 69 of file stack.c.

References dstack, and enddstack.

Referenced by fcode_end_err_check().

long dget void   ) 
 

Definition at line 172 of file stack.c.

References dstack, and min_stack_depth().

Here is the call graph for this function:

long dpop void   ) 
 

Definition at line 158 of file stack.c.

References dstack, and min_stack_depth().

Referenced by create_constant(), emit_pci_data_block(), get_fcode_from_stack(), handle_internal(), if_from_stack(), and tokz_esc_emit_byte().

Here is the call graph for this function:

void dpush long  data  ) 
 

Definition at line 146 of file stack.c.

References dstack, and room_on_stack_for().

Referenced by deliver_number(), do_constant(), and handle_internal().

Here is the call graph for this function:

void init_stack void   ) 
 

Definition at line 76 of file stack.c.

References dstack, enddstack, MAX_ELEMENTS, safe_malloc(), and startdstack.

Referenced by main().

Here is the call graph for this function:

bool min_stack_depth int  mindep  ) 
 

Definition at line 99 of file stack.c.

References dstack, enddstack, and stackerror().

Referenced by dget(), dpop(), swap(), and two_swap().

Here is the call graph for this function:

static bool room_on_stack_for int  newdep  )  [static]
 

Definition at line 129 of file stack.c.

References dstack, stackerror(), and startdstack.

Referenced by dpush().

Here is the call graph for this function:

long stackdepth void   ) 
 

Definition at line 182 of file stack.c.

References dstack, and enddstack.

Referenced by fcode_end_err_check().

static void stackerror bool  stat  )  [static]
 

Definition at line 84 of file stack.c.

References statbuf, TKERROR, and tokenization_error().

Referenced by min_stack_depth(), and room_on_stack_for().

Here is the call graph for this function:

void swap void   ) 
 

Definition at line 201 of file stack.c.

References dstack, and min_stack_depth().

Referenced by tokz_esc_swap().

Here is the call graph for this function:

void two_swap void   ) 
 

Definition at line 212 of file stack.c.

References dstack, and min_stack_depth().

Referenced by tokz_esc_two_swap().

Here is the call graph for this function:


Variable Documentation

long* dstack
 

Definition at line 56 of file stack.c.

Referenced by clear_stack(), dget(), dpop(), dpush(), init_stack(), min_stack_depth(), room_on_stack_for(), stackdepth(), swap(), two_swap(), and zero_equals().

long* enddstack [static]
 

Definition at line 67 of file stack.c.

Referenced by clear_stack(), init_stack(), min_stack_depth(), and stackdepth().

long* startdstack [static]
 

Definition at line 66 of file stack.c.

Referenced by init_stack(), and room_on_stack_for().


Generated on Fri Aug 18 14:05:05 2006 for Toke1.0 by  doxygen 1.4.4