diff options
Diffstat (limited to 'command_line/CmdLine/Src/Project/CLAccessPaths.c')
-rw-r--r-- | command_line/CmdLine/Src/Project/CLAccessPaths.c | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/command_line/CmdLine/Src/Project/CLAccessPaths.c b/command_line/CmdLine/Src/Project/CLAccessPaths.c index d20b16b..1b455da 100644 --- a/command_line/CmdLine/Src/Project/CLAccessPaths.c +++ b/command_line/CmdLine/Src/Project/CLAccessPaths.c @@ -32,8 +32,7 @@ void Path_Free(Path *path) { } Boolean Paths_Initialize(Paths *paths) { -#line 52 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(52, paths != NULL); memset(paths, 0, sizeof(Paths)); paths->pathsArray = NULL; @@ -43,8 +42,7 @@ Boolean Paths_Initialize(Paths *paths) { Boolean Paths_Terminate(Paths *paths) { UInt16 index; -#line 63 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(63, paths != NULL); if (paths->pathsArray) { for (index = 0; index < paths->pathsCount; index++) @@ -59,8 +57,7 @@ Boolean Paths_Terminate(Paths *paths) { static Boolean Paths_GrowPaths(Paths *paths, UInt16 *index) { Path **newArray; -#line 84 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(84, paths != NULL); if (paths->pathsCount >= paths->arraySize) { paths->arraySize += 20; @@ -116,8 +113,7 @@ Boolean Paths_DeletePath(Paths *paths, UInt16 index) { } Path *Paths_GetPath(Paths *paths, UInt16 pathnum) { -#line 151 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(151, paths != NULL); if (pathnum < paths->pathsCount) return paths->pathsArray[pathnum]; @@ -126,8 +122,7 @@ Path *Paths_GetPath(Paths *paths, UInt16 pathnum) { } UInt16 Paths_Count(const Paths *paths) { -#line 161 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(161, paths != NULL); return paths->pathsCount; } @@ -135,8 +130,7 @@ UInt16 Paths_Count(const Paths *paths) { Boolean Paths_FindPath(const Paths *paths, const Path *path) { UInt16 idx; -#line 169 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(169, paths != NULL); for (idx = 0; idx < paths->pathsCount; idx++) { if (paths->pathsArray[idx] == path) @@ -150,8 +144,7 @@ Path *Paths_FindPathSpec(const Paths *paths, const OSPathSpec *dir) { UInt16 idx; Path *path; -#line 182 - OPTION_ASSERT(paths != NULL); + OS_ASSERT(182, paths != NULL); for (idx = 0; idx < paths->pathsCount; idx++) { path = paths->pathsArray[idx]; @@ -220,8 +213,7 @@ int Paths_CountRecurse(Paths *paths) { mine = Paths_Count(paths); for (idx = 0; idx < mine; idx++) { path = Paths_GetPath(paths, idx); -#line 336 - OPTION_ASSERT(path); + OS_ASSERT(336, path); if (path->recursive) mine += Paths_CountRecurse(path->recursive); @@ -237,11 +229,9 @@ static void CopyRecurseFSS(FSSpec **list, Paths *paths, UInt16 *count) { for (idx = 0; idx < Paths_Count(paths); idx++) { path = Paths_GetPath(paths, idx); -#line 353 - OPTION_ASSERT(path && *count > 0); + OS_ASSERT(353, path && *count > 0); OS_MakeSpecWithPath(path->spec, NULL, 0, &spec); -#line 355 - OPTION_ASSERT(OS_OSSpec_To_FSSpec(&spec, *list)); + OS_ASSERT(355, OS_OSSpec_To_FSSpec(&spec, *list)); (*list)++; (*count)--; if (path->recursive) @@ -251,13 +241,11 @@ static void CopyRecurseFSS(FSSpec **list, Paths *paths, UInt16 *count) { void Paths_CopyRecurseFSS(FSSpec *list, Paths *paths, UInt16 count) { CopyRecurseFSS(&list, paths, &count); -#line 367 - OPTION_ASSERT(count == 0); + OS_ASSERT(367, count == 0); } static Boolean Frameworks_Initialize(Frameworks *fws) { -#line 405 - OPTION_ASSERT(fws != NULL); + OS_ASSERT(405, fws != NULL); memset(fws, 0, sizeof(Frameworks)); fws->fwsArray = NULL; @@ -267,8 +255,7 @@ static Boolean Frameworks_Initialize(Frameworks *fws) { static Boolean Frameworks_Grow(Frameworks *fws, UInt16 *index) { Paths_FWInfo **newArray; -#line 418 - OPTION_ASSERT(fws != NULL); + OS_ASSERT(418, fws != NULL); if (fws->fwsCount >= fws->arraySize) { fws->arraySize += 20; @@ -461,9 +448,8 @@ void Framework_GetEnvInfo(void) { int err; Boolean is_file; -#line 672 - OPTION_ASSERT(Paths_Initialize(&FrameworkPaths) == 1); - OPTION_ASSERT(Frameworks_Initialize(&FrameworkInfo) == 1); + OS_ASSERT(672, Paths_Initialize(&FrameworkPaths) == 1); + OS_ASSERT(673, Frameworks_Initialize(&FrameworkInfo) == 1); env = getenv("MWFrameworkPaths"); if (env) { @@ -518,8 +504,7 @@ int Frameworks_GetCount(void) { } Paths_FWInfo *Frameworks_GetInfo(int which) { -#line 762 - OPTION_ASSERT(FrameworkInfo.fwsArray); - OPTION_ASSERT(FrameworkInfo.fwsCount > which); + OS_ASSERT(762, FrameworkInfo.fwsArray); + OS_ASSERT(763, FrameworkInfo.fwsCount > which); return FrameworkInfo.fwsArray[which]; } |