Back to index

tetex-bin  3.0
Functions
comp_error.c File Reference
#include <curses.priv.h>
#include <tic.h>

Go to the source code of this file.

Functions

 NCURSES_EXPORT_VAR (bool)
 _nc_set_type (const char *const name)
 _nc_get_type (char *name)
static void where_is_problem (void)
 _nc_warning (const char *const fmt,...)
 _nc_err_abort (const char *const fmt,...)
 _nc_syserr_abort (const char *const fmt,...)

Function Documentation

_nc_err_abort ( const char *const  fmt,
  ... 
)

Definition at line 113 of file comp_error.c.

{
    va_list argp;

    where_is_problem();
    va_start(argp, fmt);
    vfprintf(stderr, fmt, argp);
    fprintf(stderr, "\n");
    va_end(argp);
    exit(EXIT_FAILURE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

_nc_get_type ( char *  name)

Definition at line 72 of file comp_error.c.

{
#if NO_LEAKS
    if (name == 0) {
       FreeAndNull(termtype);
       return;
    }
#endif
    strcpy(name, termtype != 0 ? termtype : "");
}

Here is the call graph for this function:

Here is the caller graph for this function:

_nc_set_type ( const char *const  name)

Definition at line 60 of file comp_error.c.

{
    if (termtype == 0)
       termtype = typeMalloc(char, MAX_NAME_SIZE + 1);
    if (termtype != 0) {
       termtype[0] = '\0';
       if (name)
           strncat(termtype, name, MAX_NAME_SIZE);
    }
}

Here is the caller graph for this function:

_nc_syserr_abort ( const char *const  fmt,
  ... 
)

Definition at line 126 of file comp_error.c.

{
    va_list argp;

    where_is_problem();
    va_start(argp, fmt);
    vfprintf(stderr, fmt, argp);
    fprintf(stderr, "\n");
    va_end(argp);

    /* If we're debugging, try to show where the problem occurred - this
     * will dump core.
     */
#if defined(TRACE) || !defined(NDEBUG)
    abort();
#else
    /* Dumping core in production code is not a good idea.
     */
    exit(EXIT_FAILURE);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

_nc_warning ( const char *const  fmt,
  ... 
)

Definition at line 98 of file comp_error.c.

{
    va_list argp;

    if (_nc_suppress_warnings)
       return;

    where_is_problem();
    va_start(argp, fmt);
    vfprintf(stderr, fmt, argp);
    fprintf(stderr, "\n");
    va_end(argp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 46 of file comp_error.c.

{
    sourcename = name;
}
static void where_is_problem ( void  ) [inline, static]

Definition at line 84 of file comp_error.c.

{
    fprintf(stderr, "\"%s\"", sourcename);
    if (_nc_curr_line >= 0)
       fprintf(stderr, ", line %d", _nc_curr_line);
    if (_nc_curr_col >= 0)
       fprintf(stderr, ", col %d", _nc_curr_col);
    if (termtype != 0 && termtype[0] != '\0')
       fprintf(stderr, ", terminal '%s'", termtype);
    fputc(':', stderr);
    fputc(' ', stderr);
}

Here is the call graph for this function:

Here is the caller graph for this function: