// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// snapshot.c
// ============================================================================
FreeSnapshotBuffers(snapshot_buffers_ptr);
}
-void FreeSnapshotSingle()
+void FreeSnapshotSingle(void)
{
FreeSnapshotBuffers(snapshot_single);
while (snapshot_list != node)
{
#if DEBUG_SNAPSHOTS
- printf("::: FreeSnapshotList_*() [%s, %d, %d]\n",
- snapshot_list->key, num_snapshot_buffers, num_snapshot_bytes);
+ Debug("snapshot:FreeSnapshotList_UpToNode", "[%s, %d, %d]",
+ snapshot_list->key, num_snapshot_buffers, num_snapshot_bytes);
#endif
deleteNodeFromList(&snapshot_list, snapshot_list->key, FreeSnapshot);
}
}
-void FreeSnapshotList()
+void FreeSnapshotList(void)
{
#if DEBUG_SNAPSHOTS
- printf("::: FreeSnapshotList()\n");
+ Debug("snapshot:FreeSnapshotList", "");
#endif
FreeSnapshotList_UpToNode(NULL);
snapshot_current = NULL;
}
-void ReduceSnapshotList()
+static void ReduceSnapshotList(void)
{
#if DEBUG_SNAPSHOTS
- printf("::: (Reducing number of snapshots from %d ",
- num_snapshots);
+ int num_snapshots_last = num_snapshots;
#endif
// maximum number of snapshots exceeded -- thin out list of snapshots
}
#if DEBUG_SNAPSHOTS
- printf("to %d.)\n", num_snapshots);
+ Debug("snapshot:ReduceSnapshotList",
+ "(Reducing number of snapshots from %d to %d.)",
+ num_snapshots_last, num_snapshots);
#if 0
node = snapshot_list;
while (node)
{
- printf("::: key: %s\n", node->key);
+ Debug("snapshot:ReduceSnapshotList", "key: %s", node->key);
+
node = node->next;
}
#endif
FreeSnapshotList_UpToNode(snapshot_current);
#if DEBUG_SNAPSHOTS
- printf("::: SaveSnapshotToList() [%d] [%d snapshots, %d buffers, %d bytes]\n",
- next_snapshot_key, num_snapshots,
- num_snapshot_buffers, num_snapshot_bytes);
+ Debug("snapshot:SaveSnapshotToList",
+ "[%d] [%d snapshots, %d buffers, %d bytes]",
+ next_snapshot_key, num_snapshots,
+ num_snapshot_buffers, num_snapshot_bytes);
#endif
addNodeToList(&snapshot_list, i_to_a(next_snapshot_key),
ReduceSnapshotList();
}
-boolean LoadSnapshotSingle()
+boolean LoadSnapshotSingle(void)
{
if (snapshot_single)
{
LoadSnapshotBuffers(snapshot_current->content);
#if DEBUG_SNAPSHOTS
- printf("::: LoadSnapshotFromList_Older() [%s]\n", snapshot_current->key);
+ Debug("snapshot:LoadSnapshotFromList_Older", "[%s]", snapshot_current->key);
#endif
return TRUE;
LoadSnapshotBuffers(snapshot_current->content);
#if DEBUG_SNAPSHOTS
- printf("::: LoadSnapshotFromList_Newer() [%s]\n", snapshot_current->key);
+ Debug("snapshot:LoadSnapshotFromList_Newer", "[%s]", snapshot_current->key);
#endif
return TRUE;
return FALSE;
}
-boolean CheckSnapshotList()
+boolean CheckSnapshotList(void)
{
return (snapshot_list ? TRUE : FALSE);
}