#include <stdio.h>
#include <string.h>
#include <misc/auxiliary.h>
#include <resources/feFopen.h>
Go to the source code of this file.
|
#define | TRACE_SHOW_PROC 1 |
|
#define | TRACE_SHOW_LINENO 2 |
|
#define | TRACE_SHOW_LINE 4 |
|
#define | TRACE_SHOW_RINGS 8 |
|
#define | TRACE_SHOW_LINE1 16 |
|
#define | TRACE_BREAKPOINT 32 |
|
#define | TRACE_TMP_BREAKPOINT 64 |
|
#define | TRACE_CALL 128 |
|
#define | TRACE_ASSIGN 256 |
|
#define | TRACE_CONV 512 |
|
#define | TRACE_PROFILING 1024 |
|
#define | SI_PROT_I 1 |
|
#define | SI_PROT_O 2 |
|
#define | SI_PROT_IO 3 |
|
#define | mflush() fflush(stdout) |
|
#define | dReportBug(s) dReportError("Bug reported: %s\n occurred at %s,%d\n", s, __FILE__, __LINE__) |
|
#define | assume_violation(s, f, l) dReportError("assume violation at %s:%d condition: %s", f,l,s) |
|
#define | assume(x) _assume(x, __FILE__, __LINE__) |
|
#define | r_assume(x) _r_assume(x, __FILE__, __LINE__) |
|
#define | _assume(x, f, l) |
|
#define | _r_assume(x, f, l) |
|
#define _assume |
( |
|
x, |
|
|
|
f, |
|
|
|
l |
|
) |
| |
Value:do \
} \
#define assume_violation(s, f, l)
Definition at line 132 of file reporter.h.
#define _r_assume |
( |
|
x, |
|
|
|
f, |
|
|
|
l |
|
) |
| |
Value:do \
} \
#define assume_violation(s, f, l)
Definition at line 142 of file reporter.h.
#define assume |
( |
|
x | ) |
_assume(x, __FILE__, __LINE__) |
#define assume_violation |
( |
|
s, |
|
|
|
f, |
|
|
|
l |
|
) |
| dReportError("assume violation at %s:%d condition: %s", f,l,s) |
#define dReportBug |
( |
|
s | ) |
dReportError("Bug reported: %s\n occurred at %s,%d\n", s, __FILE__, __LINE__) |
#define mflush |
( |
| ) |
fflush(stdout) |
#define TRACE_BREAKPOINT 32 |
#define TRACE_PROFILING 1024 |
#define TRACE_SHOW_LINE 4 |
#define TRACE_SHOW_LINE1 16 |
#define TRACE_SHOW_LINENO 2 |
#define TRACE_SHOW_PROC 1 |
#define TRACE_SHOW_RINGS 8 |
#define TRACE_TMP_BREAKPOINT 64 |
int dReportError |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 45 of file dError.cc.
48 #ifdef HAVE_EXECINFO_H 50 void *
buffer[SIZE+1];
int ret;
56 #ifndef MAKE_DISTRIBUTION 57 fprintf(stderr,
"\n// ***dError: ");
58 vfprintf(stderr, fmt, ap);
59 #if !defined(OM_NDEBUG) 60 #ifdef omPrintCurrentBackTraceMax 61 fprintf(stderr,
" occurred at: \n");
67 #ifdef HAVE_EXECINFO_H 68 ret = backtrace( buffer, SIZE );
69 fprintf(stderr,
"\nExecinfo backtrace (with %zd stack frames): \n", ret);
71 #ifndef HAVE_GCC_ABI_DEMANGLE 72 backtrace_symbols_fd(buffer, ret, STDERR_FILENO);
74 char **ptr = backtrace_symbols( buffer, ret );
80 for (
int i = 0;
i < ret;
i++)
89 fprintf (stderr,
" #%02d: '%s': ",
i, s);
90 ss[0] =
'('; s = ss + 1;
97 demangledName = abi::__cxa_demangle( s,
NULL,
NULL, &status );
98 if( status == 0 && demangledName !=
NULL )
99 fprintf (stderr,
" '%s'", (demangledName[0] != 0)? demangledName: s);
101 fprintf (stderr,
" '%s'", s);
112 fprintf (stderr,
" + %s", s);
116 fprintf (stderr,
" %s\n", ss + 2);
127 fprintf(stderr,
"\n// !!! YOU HAVE FOUND A BUG IN SINGULAR.");
128 fprintf(stderr,
"// !!! Please, email the input\n// and the following error message to singular@mathematik.uni-kl.de")
129 vfprintf(stderr, fmt, ap);
const CanonicalForm int s
int omPrintCurrentBackTraceMax(FILE *fd, int max)
static void malloc_free(void *ptr)
static int index(p_Length length, p_Ord ord)
Definition at line 390 of file reporter.cc.
394 if (*
s >=
'0' && *
s <=
'9')
397 while (*
s >=
'0' && *
s <=
'9')
405 Werror(
"`%s` greater than %d(max. integer representation)",
const CanonicalForm int s
void Werror(const char *fmt,...)
void feStringAppendResources |
( |
int |
warn = -1 | ) |
|
Definition at line 415 of file reporter.cc.
424 (r !=
NULL ? r :
""));
static char * feResource(feResourceConfig config, int warn)
feResourceConfig_s feResourceConfigs[]
void StringAppend(const char *fmt,...)
void Print |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 327 of file reporter.cc.
void PrintS(const char *s)
void void PrintNSpaces |
( |
const int |
n | ) |
|
Definition at line 381 of file reporter.cc.
384 while(l>=0) {
PrintS(
" "); l--; }
void PrintS(const char *s)
void PrintS |
( |
const char * |
s | ) |
|
Definition at line 294 of file reporter.cc.
317 fwrite(
s,1,strlen(
s),stdout);
const CanonicalForm int s
void(* PrintS_callback)(const char *s)
static void SPrintS(const char *s)
Definition at line 283 of file reporter.cc.
static char * sprint_backup
#define omCheckAddr(addr)
Definition at line 256 of file reporter.cc.
void WerrorS(const char *s)
static char * sprint_backup
void StringAppend |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 61 of file reporter.cc.
70 more = ((more + (8*1024-1))/(8*1024))*(8*1024);
74 #if (!defined(SING_NDEBUG)) && (!defined(OM_NDEBUG)) const CanonicalForm int s
#define omCheckAddrSize(addr, size)
static char * feBufferStart
#define omReallocSize(addr, o_size, size)
static long feBufferLength
void omMarkAsStaticAddr(void *addr)
void StringAppendS |
( |
const char * |
s | ) |
|
Definition at line 107 of file reporter.cc.
117 more = ((more + (8*1024-1))/(8*1024))*(8*1024);
#define omreallocSize(addr, o_size, size)
static char * feBufferStart
static long feBufferLength
Definition at line 151 of file reporter.cc.
const CanonicalForm int s
static char * feBufferStart
static char * feBuffer_save[8]
static long feBufferLength
static long feBufferLength_save[8]
static char * feBufferStart_save[8]
void StringSetS |
( |
const char * |
s | ) |
|
Definition at line 128 of file reporter.cc.
142 more = ((l + (4*1024-1))/(4*1024))*(4*1024);
static char * feBufferStart
#define INITIAL_PRINT_BUFFER
static char * feBuffer_save[8]
#define omReallocSize(addr, o_size, size)
static long feBufferLength
static long feBufferLength_save[8]
static char * feBufferStart_save[8]
void Warn |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 237 of file reporter.cc.
242 #ifdef HAVE_VSNPRINTF 243 vsnprintf(s, 256, fmt, ap);
245 vsprintf(s, fmt, ap);
const CanonicalForm int s
#define omFreeSize(addr, size)
void WarnS(const char *s)
void WarnS |
( |
const char * |
s | ) |
|
Definition at line 210 of file reporter.cc.
212 #define warn_str "// ** " 225 fwrite(
s,1,strlen(
s),stdout);
226 fwrite(
"\n",1,1,stdout);
const CanonicalForm int s
void Werror |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
void void WerrorS_batch |
( |
const char * |
s | ) |
|
Definition at line 178 of file reporter.cc.
194 strcat(
feErrors,
"Singular error: ");
const CanonicalForm int s
#define omReallocSize(addr, o_size, size)
const char feNotImplemented[] |