#include "misc/auxiliary.h"
#include "reporter/reporter.h"
#include "resources/feResource.h"
#include "resources/feFopen.h"
#include "omalloc/omalloc.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 :
""));
VAR feResourceConfig_s feResourceConfigs[]
static char * feResource(feResourceConfig config, int warn)
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));
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);
#define omCheckAddr(addr)
void PrintS(const char *s)
◆ PrintLn()
◆ PrintNSpaces()
void PrintNSpaces |
( |
const int |
n | ) |
|
◆ PrintS()
void PrintS |
( |
const char * |
s | ) |
|
Definition at line 284 of file reporter.cc.
300 fwrite(
s,1,strlen(
s),stdout);
VAR void(* PrintS_callback)(const char *s)
static void SPrintS(const char *s)
◆ SPrintEnd()
Definition at line 273 of file reporter.cc.
STATIC_VAR char * sprint_backup
◆ SPrintS()
static void SPrintS |
( |
const char * |
s | ) |
|
|
inlinestatic |
◆ SPrintStart()
Definition at line 246 of file reporter.cc.
void WerrorS(const char *s)
◆ 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))
#define omReallocSize(addr, o_size, size)
#define omCheckAddrSize(addr, size)
void omMarkAsStaticAddr(void *addr)
STATIC_VAR char * feBuffer
STATIC_VAR char * feBufferStart
STATIC_VAR long feBufferLength
◆ 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)
◆ StringEndS()
Definition at line 151 of file reporter.cc.
STATIC_VAR char * feBufferStart_save[8]
STATIC_VAR char * feBuffer_save[8]
STATIC_VAR long feBufferLength_save[8]
STATIC_VAR int feBuffer_cnt
◆ StringSetS()
void StringSetS |
( |
const char * |
st | ) |
|
Definition at line 128 of file reporter.cc.
142 more = ((
l + (4*1024-1))/(4*1024))*(4*1024);
#define INITIAL_PRINT_BUFFER
◆ 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);
#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);
VAR void(* WarnS_callback)(const char *s)
◆ Werror()
void Werror |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ WerrorS_batch()
void WerrorS_batch |
( |
const char * |
s | ) |
|
◆ feBuffer
◆ feBuffer_cnt
◆ feBuffer_save
◆ feBufferLength
◆ feBufferLength_save
◆ feBufferStart
◆ feBufferStart_save
◆ feErrors
◆ feErrorsLen
◆ feNotImplemented
const char feNotImplemented[] ="not implemented" |
◆ feOut
◆ feProt
◆ feProtFile
◆ feWarn
◆ sprint
◆ sprint_backup
◆ WarnS_callback