Back to index

texmacs  1.0.7.15
Defines | Functions
error.h File Reference
#include "system.h"
#include <assert.h>
#include <stdio.h>

Go to the source code of this file.

Defines

#define FATAL_ERROR   -1
#define NO_ERROR   0
#define ASSERT(e)   assert(e)

Functions

void error_cleanup ()
void shut_up (void)
void ERROR (const char *fmt,...)
void MESG (const char *fmt,...)
void WARN (const char *fmt,...)

Define Documentation

#define ASSERT (   e)    assert(e)

Definition at line 44 of file error.h.

#define FATAL_ERROR   -1

Definition at line 32 of file error.h.

#define NO_ERROR   0

Definition at line 33 of file error.h.


Function Documentation

void ERROR ( const char *  fmt,
  ... 
)

Definition at line 81 of file error.c.

{
  va_list argp;

  if (!really_quiet) {
    if (WANT_NEWLINE())
      fprintf(stderr, "\n");
    fprintf(stderr, "** ERROR ** ");
    va_start(argp, fmt);
    vfprintf(stderr, fmt, argp);
    va_end(argp);
    fprintf(stderr, "\n");
  }
  error_cleanup();
  exit( 1 );
}

Here is the call graph for this function:

void error_cleanup ( )

Definition at line 43 of file pdf_renderer.cpp.

  {
    pdf_close_images();  /* delete temporary files */
    pdf_error_cleanup();
#if 0
    if (pdf_filename) {
      remove(pdf_filename);
      fprintf(stderr, "\nOutput file removed.\n");
    }
#endif
  }

Here is the call graph for this function:

void MESG ( const char *  fmt,
  ... 
)

Definition at line 47 of file error.c.

{
  va_list argp;

  if (!really_quiet) {
    va_start(argp, fmt);
    vfprintf(stderr, fmt, argp);
    va_end(argp);
    _mesg_type = DPX_MESG;
  }
}
void shut_up ( void  )

Definition at line 41 of file error.c.

{
  really_quiet = 1;
}
void WARN ( const char *  fmt,
  ... 
)

Definition at line 60 of file error.c.

{
  va_list argp;

  if (!really_quiet) {
    if (WANT_NEWLINE())
      fprintf(stderr, "\n");
    fprintf(stderr, "** WARNING ** ");
    va_start(argp, fmt);
    vfprintf(stderr, fmt, argp);
    va_end(argp);
    fprintf(stderr, "\n");

    _mesg_type = DPX_MESG_WARN;
  }
}