Closed herzbube closed 3 years ago
extern
globals declared/used in various files
extern
in protos.h
int error_count = 0;
int critical_count = 0;
int warning_count = 0;
int ignored_count = 0;
char error_enabled[MAX_ERROR_NUM];
extern
in protos.h
struct SGFToken sgf_token[] =
extern
in protos.h
struct SGFInfo *sgfc = NULL;
char option_warnings = TRUE;
[...]
char *option_outfile = NULL;
static
globals declared/used in various files
static const char *error_mesg[]
static char *illegal, *last_pos;
static int ill_count = 0;
static U_LONG ill_type = E_NO_ERROR, last_type;
static int FF_diff = 0, GM_diff = 0;
static U_LONG path_board[MAX_BOARDSIZE*MAX_BOARDSIZE];
static U_LONG path_num = 0;
static struct SGFInfo sgf;
static int save_linelen;
static int save_chars_in_node;
static int save_eol_in_node;
static int gi_written = FALSE;
Call trees
----------
LoadSGF
+-- Everything not in ParseSGF and SaveSGF
ParseSGF
+-- Everything not in LoadSGF and SaveSGF
SaveSGF
+-- PrintError(FE_DEST_NAME_TOO_LONG | FE_DEST_FILE_OPEN | FE_DEST_FILE_WRITE) >>> Fatal Error
+-- WriteTree
+-- SetRootProps
| +-- New_PropValue
| +-- Find_Property
| +-- Add_Property
| | +-- SaveMalloc (#define)
| | | +-- PrintError(FE_OUT_OF_MEMORY) >>> Fatal Error
| | +-- Enqueue
| | +-- f_Enqueue
| | +-- f_AddTail
| +-- Add_PropValue
| +-- SaveMalloc (#define)
| | +-- PrintError(FE_OUT_OF_MEMORY) >>> Fatal Error
| +-- CopyValue
| | +-- PrintError(W_CTRL_BYTE_DELETED) >>> Warning
| +-- AddTail
+-- WriteNode
| +-- saveputc (#define)
| | +-- WriteChar
| +-- CompressPointList
| | +-- DecodePosChar
| | +-- Del_PropValue
| | | +-- Delete (#define)
| | | +-- f_Delete
| | +-- EncodePosChar
| | +-- Add_PropValue >>> Siehe oben
| +-- WriteProperty
| +-- saveputc (#define)
| | +-- WriteChar
| +-- WritePropValue
| | +-- saveputc (#define)
| | | +-- WriteChar
| | +-- WriteChar
| +-- CheckLineLen (#define)
| +-- saveputc (#define)
| +-- WriteChar
+-- WriteTree <-- recursion
+-- saveputc (#define)
+-- WriteChar
Most if not all of what was written in the previous comments is no longer valid since the changes that were made for SGFC v2.0. There's no point in preserving this information anymore in a structured format.
All global variables are either marked
static
orextern
. There are no variables outside functions that are not markedstatic
orextern
.The following files do not contain any global variables (checked for
static
and anything that is outside functions)The following files contain
static
variables but noextern
variables:The following files contain both
static
andextern
variables: