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

errhandler.c File Reference

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "types.h"
#include "toke.h"
#include "stream.h"
#include "errhandler.h"
#include "scanner.h"

Include dependency graph for errhandler.c:

Go to the source code of this file.

Data Structures

struct  err_category

Functions

void init_error_handler (void)
void tokenization_error (int err_type, char *msg,...)
static void print_where_started (bool show_started, bool show_that_st, char *saved_ifile, unsigned int saved_lineno, bool may_show_incolon)
void started_at (char *saved_ifile, unsigned int saved_lineno)
void print_started_at (char *saved_ifile, unsigned int saved_lineno)
void just_started_at (char *saved_ifile, unsigned int saved_lineno)
void where_started (char *saved_ifile, unsigned int saved_lineno)
void just_where_started (char *saved_ifile, unsigned int saved_lineno)
void in_last_colon (void)
_PTR safe_malloc (size_t size, char *phrase)
bool error_summary (void)

Variables

static bool print_msg
static int errs_to_print
static int err_types_found = 0
static int err_count = 0
static int warn_count = 0
static int info_count = 0
static int user_msg_count = 0
static int fatal_err_exit = -1
static FILE * message_dest
static const err_category error_categories []
static const int num_categories


Function Documentation

bool error_summary void   ) 
 

Definition at line 881 of file errhandler.c.

References err_category::counter, err_types_found, FATAL, noerrors, num_categories, opc, and TKERROR.

Referenced by close_output(), and tokenization_error().

void in_last_colon void   ) 
 

Definition at line 794 of file errhandler.c.

References incolon, last_colon_defname, last_colon_filename, last_colon_lineno, message_dest, print_msg, and print_where_started().

Referenced by control_stack_size_test(), error_check_locals(), gather_locals(), handle_internal(), must_be_deep_in_do(), print_where_started(), ret_stk_access_rpt(), ret_stk_balance_rpt(), trace_creation(), and warn_unterm().

Here is the call graph for this function:

void init_error_handler void   ) 
 

Definition at line 372 of file errhandler.c.

References err_count, err_types_found, ERRMSG_DESTINATION, errs_to_print, FFLUSH_STDOUT, INFO, info_count, message_dest, user_msg_count, verbose, and warn_count.

Referenced by main().

void just_started_at char *  saved_ifile,
unsigned int  saved_lineno
 

Definition at line 700 of file errhandler.c.

References print_where_started().

Referenced by conditionally_tokenize(), and show_node_start().

Here is the call graph for this function:

void just_where_started char *  saved_ifile,
unsigned int  saved_lineno
 

Definition at line 755 of file errhandler.c.

References print_where_started().

Referenced by conditionally_tokenize(), handle_internal(), modified_by_instance(), show_node_start(), and unresolved_instance().

Here is the call graph for this function:

void print_started_at char *  saved_ifile,
unsigned int  saved_lineno
 

Definition at line 669 of file errhandler.c.

References ERRMSG_DESTINATION, message_dest, and started_at().

Referenced by list_fcode_ranges().

Here is the call graph for this function:

static void print_where_started bool  show_started,
bool  show_that_st,
char *  saved_ifile,
unsigned int  saved_lineno,
bool  may_show_incolon
[static]
 

Definition at line 586 of file errhandler.c.

References in_last_colon(), iname, lineno, message_dest, and print_msg.

Referenced by in_last_colon(), just_started_at(), just_where_started(), started_at(), and where_started().

Here is the call graph for this function:

_PTR safe_malloc size_t  size,
char *  phrase
 

Definition at line 840 of file errhandler.c.

References FATAL, fatal_err_exit, and tokenization_error().

Referenced by add_str_sub_entry(), add_tic_entry(), add_to_include_list(), add_to_trace_list(), dev_vocab_control_struct_check(), extend_filename(), init_incl_list_scan(), init_output(), init_scanner(), init_stack(), init_stream(), list_user_symbols(), new_device_vocab(), push_cstag(), push_source(), and set_next_fcode().

Here is the call graph for this function:

void started_at char *  saved_ifile,
unsigned int  saved_lineno
 

Definition at line 652 of file errhandler.c.

References print_where_started().

Referenced by assigning_fcode(), finish_device_vocab(), list_fcode_ranges(), new_device_vocab(), print_started_at(), and reset_normal_vocabs().

Here is the call graph for this function:

void tokenization_error int  err_type,
char *  msg,
  ...
 

Definition at line 450 of file errhandler.c.

References err_category::category_name, err_category::counter, err_count, err_types_found, ERRMSG_DESTINATION, error_summary(), errs_to_print, FATAL, fatal_err_exit, iname, lineno, err_category::new_line, num_categories, print_msg, err_category::single, and TKERROR.

Referenced by abort_quote(), assign_local(), assigning_fcode(), base_val(), c_string_escape(), cannot_apply(), check_name_length(), close_output(), conditionally_tokenize(), control_stack_size_test(), control_struct_incomplete(), control_structure_mismatch(), could_not_open(), create_alias(), create_current_alias(), emit_fc_offset(), emit_fcodehdr(), emit_pci_data_block(), emit_pcihdr(), emit_string(), emit_token(), encode_file(), enter_global_scope(), error_check_locals(), eval_user_symbol(), exists_in_ancestor(), expand_pathname(), expanded_name(), fcode_end_err_check(), fcode_ender(), fcode_starter(), finish_device_vocab(), finish_fcodehdr(), finish_incl_list_scan(), finish_pcihdr(), gather_locals(), get_fcode_from_stack(), get_string(), get_until(), get_word(), get_word_in_line(), glob_not_allowed(), handle_internal(), handle_user_message(), increase_output_buffer(), init_stream(), locals_separator(), macro_recursion_error(), modified_by_instance(), must_be_deep_in_do(), new_device_vocab(), not_in_dict(), obsolete_warning(), offset_too_large(), open_expanded_file(), print_if_mac_err(), process_remark(), reset_normal_vocabs(), resume_device_scope(), ret_stk_access_rpt(), ret_stk_balance_rpt(), safe_malloc(), set_cl_flag(), show_all_cl_flag_settings(), skip_string(), stackerror(), test_in_colon(), tokenized_word_error(), tokz_emit_fcode(), tokz_esc_emit_byte(), tokz_esc_next_fcode(), trace_creation(), unresolved_instance(), validate_to_target(), warn_if_duplicate(), warn_if_multiline(), warn_unterm(), and you_are_here().

Here is the call graph for this function:

void where_started char *  saved_ifile,
unsigned int  saved_lineno
 

Definition at line 728 of file errhandler.c.

References print_where_started().

Referenced by control_struct_incomplete(), control_structure_mismatch(), offset_too_large(), and warn_if_multiline().

Here is the call graph for this function:


Variable Documentation

int err_count = 0 [static]
 

Definition at line 152 of file errhandler.c.

Referenced by init_error_handler(), and tokenization_error().

int err_types_found = 0 [static]
 

Definition at line 151 of file errhandler.c.

Referenced by error_summary(), init_error_handler(), and tokenization_error().

const err_category error_categories[] [static]
 

Initial value:

 {
    
    
    { FATAL,    "Fatal Error", "", "",     &err_count      , TRUE  },

    { TKERROR,    "Error"     , "", "s",    &err_count      , FALSE },
    { WARNING,    "Warning"   , "", "s",    &warn_count     , FALSE },
    { INFO,       "Advisor"   , "y", "ies", &info_count     , FALSE },
    { MESSAGE ,   "Message"   , "", "s",    &user_msg_count , TRUE  },
    { P_MESSAGE , "Message"   , "", "s",    &user_msg_count , FALSE }
}

Definition at line 180 of file errhandler.c.

int errs_to_print [static]
 

Initial value:

Definition at line 149 of file errhandler.c.

Referenced by init_error_handler(), and tokenization_error().

int fatal_err_exit = -1 [static]
 

Definition at line 156 of file errhandler.c.

Referenced by safe_malloc(), and tokenization_error().

int info_count = 0 [static]
 

Definition at line 154 of file errhandler.c.

Referenced by init_error_handler().

FILE* message_dest [static]
 

Definition at line 157 of file errhandler.c.

Referenced by in_last_colon(), init_error_handler(), list_fcode_ranges(), print_started_at(), and print_where_started().

const int num_categories [static]
 

Initial value:

    ( sizeof(error_categories) / sizeof(err_category) )

Definition at line 192 of file errhandler.c.

Referenced by error_summary(), and tokenization_error().

bool print_msg [static]
 

Definition at line 148 of file errhandler.c.

Referenced by in_last_colon(), print_where_started(), and tokenization_error().

int user_msg_count = 0 [static]
 

Definition at line 155 of file errhandler.c.

Referenced by init_error_handler().

int warn_count = 0 [static]
 

Definition at line 153 of file errhandler.c.

Referenced by init_error_handler().


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