#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.
◆ fePutChar
#define fePutChar |
( |
|
c | ) |
fputc((unsigned char)(c),stdout) |
◆ INITIAL_PRINT_BUFFER
#define INITIAL_PRINT_BUFFER 24*1024L |
◆ MAX_FILE_BUFFER
#define MAX_FILE_BUFFER 4*4096 |
◆ warn_str
#define warn_str "// ** " |
◆ eati()
Definition at line 373 of file reporter.cc.
377 if (*
s >=
'0' && *
s <=
'9')
380 while (*
s >=
'0' && *
s <=
'9')
388 Werror(
"`%s` greater than %d(max. integer representation)",
const CanonicalForm int s
void Werror(const char *fmt,...)
◆ feStringAppendResources()
void feStringAppendResources |
( |
int |
warn | ) |
|
Definition at line 398 of file reporter.cc.
407 (r !=
NULL ? r :
""));
static char * feResource(feResourceConfig config, int warn)
feResourceConfig_s feResourceConfigs[]
void StringAppend(const char *fmt,...)
◆ Print()
void Print |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 315 of file reporter.cc.
322 int ls = strlen(fmt);
323 if (fmt !=
NULL && ls > 0)
327 ns = (
char*)
omAlloc(
sizeof(
char)*(ls + l + 512));
328 if (l > 0) strcpy(ns,
sprint);
330 #ifdef HAVE_VSNPRINTF 331 l = vsnprintf(&(ns[l]), ls+511, fmt, ap);
334 vsprintf(&(ns[l]), fmt, ap);
350 #ifdef HAVE_VSNPRINTF 351 l = vsnprintf(s, ls+511, fmt, ap);
352 if ((l==-1)||(s[l]!=
'\0')||(l!=(
int)strlen(s)))
354 printf(
"Print problem: l=%d, fmt=>>%s<<\n",l,fmt);
357 vsprintf(s, fmt, ap);
const CanonicalForm int s
void PrintS(const char *s)
#define omCheckAddr(addr)
◆ PrintLn()
Definition at line 310 of file reporter.cc.
void PrintS(const char *s)
◆ PrintNSpaces()
void PrintNSpaces |
( |
const int |
n | ) |
|
Definition at line 364 of file reporter.cc.
367 while(l>=0) {
PrintS(
" "); l--; }
void PrintS(const char *s)
◆ PrintS()
void PrintS |
( |
const char * |
s | ) |
|
Definition at line 284 of file reporter.cc.
300 fwrite(
s,1,strlen(
s),stdout);
const CanonicalForm int s
void(* PrintS_callback)(const char *s)
static void SPrintS(const char *s)
◆ SPrintEnd()
Definition at line 273 of file reporter.cc.
static char * sprint_backup
#define omCheckAddr(addr)
◆ SPrintS()
static void SPrintS |
( |
const char * |
s | ) |
|
|
inlinestatic |
Definition at line 256 of file reporter.cc.
259 if ((
s ==
NULL)||(*
s ==
'\0'))
return;
264 ns = (
char*)
omAlloc((l + ls + 1)*
sizeof(char));
265 if (l > 0) strcpy(ns,
sprint);
const CanonicalForm int s
#define omCheckAddr(addr)
◆ SPrintStart()
Definition at line 246 of file reporter.cc.
void WerrorS(const char *s)
static char * sprint_backup
◆ StringAppend()
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)
◆ StringAppendS()
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
◆ StringEndS()
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]
◆ StringSetS()
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]
◆ Warn()
void Warn |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 227 of file reporter.cc.
232 #ifdef HAVE_VSNPRINTF 233 vsnprintf(s, 256, fmt, ap);
235 vsprintf(s, fmt, ap);
const CanonicalForm int s
#define omFreeSize(addr, size)
void WarnS(const char *s)
◆ WarnS()
void WarnS |
( |
const char * |
s | ) |
|
Definition at line 202 of file reporter.cc.
204 #define warn_str "// ** " 210 fwrite(
s,1,strlen(
s),stdout);
211 fwrite(
"\n",1,1,stdout);
const CanonicalForm int s
void(* WarnS_callback)(const char *s)
◆ Werror()
void Werror |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 189 of file reporter.cc.
194 vsprintf(s, fmt, ap);
const CanonicalForm int s
#define omFreeSize(addr, size)
void WerrorS(const char *s)
◆ WerrorS_batch()
void WerrorS_batch |
( |
const char * |
s | ) |
|
Definition at line 168 of file reporter.cc.
184 strcat(
feErrors,
"Singular error: ");
const CanonicalForm int s
#define omReallocSize(addr, o_size, size)
◆ feBuffer
◆ feBuffer_cnt
◆ feBuffer_save
◆ feBufferLength
◆ feBufferLength_save
long feBufferLength_save[8] |
|
static |
◆ feBufferStart
◆ feBufferStart_save
char* feBufferStart_save[8] |
|
static |
◆ feErrors
◆ feErrorsLen
◆ feNotImplemented
const char feNotImplemented[] ="not implemented" |
◆ feOut
◆ feProt
◆ feProtFile
◆ feWarn
◆ sprint
◆ sprint_backup
char* sprint_backup = NULL |
|
static |
◆ WarnS_callback