#include <misc/auxiliary.h>
#include <omalloc/omalloc.h>
#include <reporter/reporter.h>
#include <resources/feResource.h>
#include <resources/feFopen.h>
#include <stdlib.h>
#include <stdio.h>
#include <misc/mylimits.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <ctype.h>
#include <unistd.h>
Go to the source code of this file.
#define fePutChar |
( |
|
c | ) |
fputc((unsigned char)(c),stdout) |
#define INITIAL_PRINT_BUFFER 24*1024L |
#define MAX_FILE_BUFFER 4*4096 |
#define warn_str "// ** " |
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 | ) |
|
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 332 of file reporter.cc.
339 int ls = strlen(fmt);
340 if (fmt !=
NULL && ls > 0)
344 ns = (
char*)
omAlloc(
sizeof(
char)*(ls + l + 512));
345 if (l > 0) strcpy(ns,
sprint);
347 #ifdef HAVE_VSNPRINTF 348 l = vsnprintf(&(ns[l]), ls+511, fmt, ap);
351 vsprintf(&(ns[l]), fmt, ap);
367 #ifdef HAVE_VSNPRINTF 368 l = vsnprintf(s, ls+511, fmt, ap);
369 if ((l==-1)||(s[l]!=
'\0')||(l!=(
int)strlen(s)))
371 printf(
"Print problem: l=%d, fmt=>>%s<<\n",l,fmt);
374 vsprintf(s, fmt, ap);
const CanonicalForm int s
void PrintS(const char *s)
#define omCheckAddr(addr)
Definition at line 327 of file reporter.cc.
void PrintS(const char *s)
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)
static void SPrintS |
( |
const char * |
s | ) |
|
|
static |
Definition at line 266 of file reporter.cc.
269 if ((
s ==
NULL)||(*
s ==
'\0'))
return;
274 ns = (
char*)
omAlloc((l + ls + 1)*
sizeof(char));
275 if (l > 0) strcpy(ns,
sprint);
const CanonicalForm int s
#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 * |
st | ) |
|
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 * |
st | ) |
|
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, |
|
|
|
... |
|
) |
| |
Definition at line 199 of file reporter.cc.
204 vsprintf(s, fmt, ap);
const CanonicalForm int s
#define omFreeSize(addr, size)
void WerrorS(const char *s)
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)
long feBufferLength_save[8] |
|
static |
char* feBufferStart_save[8] |
|
static |
const char feNotImplemented[] ="not implemented" |
char* sprint_backup = NULL |
|
static |