1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-09 13:25:06 +00:00

Renamed DoneCollection -> CollDone and InitCollection -> CollInit.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5146 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-08-10 14:20:45 +00:00
parent 9d2538f12b
commit 060b297a78

View File

@@ -565,7 +565,7 @@ static char* SB_StrDup (const StrBuf* B)
static Collection* InitCollection (Collection* C) static Collection* CollInit (Collection* C)
/* Initialize a collection and return it. */ /* Initialize a collection and return it. */
{ {
/* Intialize the fields. */ /* Intialize the fields. */
@@ -579,7 +579,7 @@ static Collection* InitCollection (Collection* C)
static void DoneCollection (Collection* C) static void CollDone (Collection* C)
/* Free the data for a collection. This will not free the data contained in /* Free the data for a collection. This will not free the data contained in
* the collection. * the collection.
*/ */
@@ -587,8 +587,8 @@ static void DoneCollection (Collection* C)
/* Free the pointer array */ /* Free the pointer array */
xfree (C->Items); xfree (C->Items);
/* Clear the fields, so the collection may be reused (or DoneCollection /* Clear the fields, so the collection may be reused (or CollDone called)
* called) again * again
*/ */
C->Count = 0; C->Count = 0;
C->Size = 0; C->Size = 0;
@@ -953,8 +953,8 @@ static FileInfo* NewFileInfo (const StrBuf* Name)
FileInfo* F = xmalloc (sizeof (FileInfo) + SB_GetLen (Name)); FileInfo* F = xmalloc (sizeof (FileInfo) + SB_GetLen (Name));
/* Initialize it */ /* Initialize it */
InitCollection (&F->ModInfoByName); CollInit (&F->ModInfoByName);
InitCollection (&F->LineInfoByLine); CollInit (&F->LineInfoByLine);
memcpy (F->Name, SB_GetConstBuf (Name), SB_GetLen (Name) + 1); memcpy (F->Name, SB_GetConstBuf (Name), SB_GetLen (Name) + 1);
/* Return it */ /* Return it */
@@ -966,8 +966,9 @@ static FileInfo* NewFileInfo (const StrBuf* Name)
static void FreeFileInfo (FileInfo* F) static void FreeFileInfo (FileInfo* F)
/* Free a FileInfo struct */ /* Free a FileInfo struct */
{ {
/* Delete the collection with the line infos */ /* Delete the collections */
DoneCollection (&F->LineInfoByLine); CollDone (&F->ModInfoByName);
CollDone (&F->LineInfoByLine);
/* Free the file info structure itself */ /* Free the file info structure itself */
xfree (F); xfree (F);
@@ -1382,8 +1383,8 @@ static ModInfo* NewModInfo (const StrBuf* Name)
ModInfo* M = xmalloc (sizeof (ModInfo) + SB_GetLen (Name)); ModInfo* M = xmalloc (sizeof (ModInfo) + SB_GetLen (Name));
/* Initialize it */ /* Initialize it */
InitCollection (&M->FileInfoByName); CollInit (&M->FileInfoByName);
InitCollection (&M->ScopeInfoByName); CollInit (&M->ScopeInfoByName);
memcpy (M->Name, SB_GetConstBuf (Name), SB_GetLen (Name) + 1); memcpy (M->Name, SB_GetConstBuf (Name), SB_GetLen (Name) + 1);
/* Return it */ /* Return it */
@@ -1396,8 +1397,8 @@ static void FreeModInfo (ModInfo* M)
/* Free a ModInfo struct */ /* Free a ModInfo struct */
{ {
/* Free the collections */ /* Free the collections */
DoneCollection (&M->FileInfoByName); CollDone (&M->FileInfoByName);
DoneCollection (&M->ScopeInfoByName); CollDone (&M->ScopeInfoByName);
/* Free the structure itself */ /* Free the structure itself */
xfree (M); xfree (M);
@@ -1701,18 +1702,18 @@ static DbgInfo* NewDbgInfo (void)
DbgInfo* Info = xmalloc (sizeof (DbgInfo)); DbgInfo* Info = xmalloc (sizeof (DbgInfo));
/* Initialize it */ /* Initialize it */
InitCollection (&Info->FileInfoById); CollInit (&Info->FileInfoById);
InitCollection (&Info->LibInfoById); CollInit (&Info->LibInfoById);
InitCollection (&Info->LineInfoById); CollInit (&Info->LineInfoById);
InitCollection (&Info->ModInfoById); CollInit (&Info->ModInfoById);
InitCollection (&Info->ScopeInfoById); CollInit (&Info->ScopeInfoById);
InitCollection (&Info->SegInfoById); CollInit (&Info->SegInfoById);
InitCollection (&Info->SymInfoById); CollInit (&Info->SymInfoById);
InitCollection (&Info->FileInfoByName); CollInit (&Info->FileInfoByName);
InitCollection (&Info->SegInfoByName); CollInit (&Info->SegInfoByName);
InitCollection (&Info->SymInfoByName); CollInit (&Info->SymInfoByName);
InitCollection (&Info->SymInfoByVal); CollInit (&Info->SymInfoByVal);
InitLineInfoList (&Info->LineInfoByAddr); InitLineInfoList (&Info->LineInfoByAddr);
@@ -1751,18 +1752,18 @@ static void FreeDbgInfo (DbgInfo* Info)
} }
/* Free the memory used by the collections themselves */ /* Free the memory used by the collections themselves */
DoneCollection (&Info->FileInfoById); CollDone (&Info->FileInfoById);
DoneCollection (&Info->LibInfoById); CollDone (&Info->LibInfoById);
DoneCollection (&Info->LineInfoById); CollDone (&Info->LineInfoById);
DoneCollection (&Info->ModInfoById); CollDone (&Info->ModInfoById);
DoneCollection (&Info->ScopeInfoById); CollDone (&Info->ScopeInfoById);
DoneCollection (&Info->SegInfoById); CollDone (&Info->SegInfoById);
DoneCollection (&Info->SymInfoById); CollDone (&Info->SymInfoById);
DoneCollection (&Info->FileInfoByName); CollDone (&Info->FileInfoByName);
DoneCollection (&Info->SegInfoByName); CollDone (&Info->SegInfoByName);
DoneCollection (&Info->SymInfoByName); CollDone (&Info->SymInfoByName);
DoneCollection (&Info->SymInfoByVal); CollDone (&Info->SymInfoByVal);
/* Free line info */ /* Free line info */
DoneLineInfoList (&Info->LineInfoByAddr); DoneLineInfoList (&Info->LineInfoByAddr);
@@ -2281,7 +2282,7 @@ static void ParseFile (InputData* D)
ErrorExit: ErrorExit:
/* Entry point in case of errors */ /* Entry point in case of errors */
DoneCollection (&ModIds); CollDone (&ModIds);
SB_Done (&Name); SB_Done (&Name);
return; return;
} }
@@ -3660,7 +3661,7 @@ static void ProcessLineInfo (InputData* D)
CreateLineInfoList (&D->Info->LineInfoByAddr, &LineInfoByAddr); CreateLineInfoList (&D->Info->LineInfoByAddr, &LineInfoByAddr);
/* Remove the temporary collection */ /* Remove the temporary collection */
DoneCollection (&LineInfoByAddr); CollDone (&LineInfoByAddr);
} }
@@ -4374,7 +4375,7 @@ cc65_lineinfo* cc65_lineinfo_byname (cc65_dbginfo Handle, const char* FileName,
} }
/* Delete the temporary data collection */ /* Delete the temporary data collection */
DoneCollection (&LineInfoList); CollDone (&LineInfoList);
/* Return the allocated struct */ /* Return the allocated struct */
return D; return D;
@@ -4841,7 +4842,7 @@ cc65_symbolinfo* cc65_symbol_inrange (cc65_dbginfo Handle, cc65_addr Start, cc65
} }
/* Free the collection */ /* Free the collection */
DoneCollection (&SymInfoList); CollDone (&SymInfoList);
/* Return the result */ /* Return the result */
return D; return D;