herzbube / libsgfcplusplus

libsgfc++. A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Apache License 2.0
12 stars 2 forks source link

Preserve SGFC source code analysis results #25

Closed herzbube closed 3 years ago

herzbube commented 4 years ago

All global variables are either marked static or extern. There are no variables outside functions that are not marked static or extern.

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 no extern variables:

The following files contain both static and extern variables:

herzbube commented 4 years ago

extern globals declared/used in various files

herzbube commented 4 years ago

static globals declared/used in various files

herzbube commented 4 years ago
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
herzbube commented 3 years ago

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.