Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
3bcc4fc3
Commit
3bcc4fc3
authored
Nov 21, 2022
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Other suggested changes.
parent
b0518173
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
src/base/main/libSupport.c
+13
-6
src/misc/extra/extraUtilUtil.c
+7
-3
No files found.
src/base/main/libSupport.c
View file @
3bcc4fc3
...
@@ -61,7 +61,7 @@ void open_libs() {
...
@@ -61,7 +61,7 @@ void open_libs() {
DIR
*
dirp
;
DIR
*
dirp
;
struct
dirent
*
dp
;
struct
dirent
*
dp
;
char
*
env
,
*
init_p
,
*
p
;
char
*
env
,
*
init_p
,
*
p
;
int
done
;
//
int done;
env
=
getenv
(
"ABC_LIB_PATH"
);
env
=
getenv
(
"ABC_LIB_PATH"
);
if
(
env
==
NULL
)
{
if
(
env
==
NULL
)
{
...
@@ -74,12 +74,14 @@ void open_libs() {
...
@@ -74,12 +74,14 @@ void open_libs() {
}
}
// Extract directories and read libraries
// Extract directories and read libraries
done
=
0
;
//
done = 0;
p
=
init_p
;
p
=
init_p
;
while
(
!
done
)
{
//while (!done) {
for
(;;)
{
char
*
endp
=
strchr
(
p
,
':'
);
char
*
endp
=
strchr
(
p
,
':'
);
if
(
endp
==
NULL
)
done
=
1
;
// last directory in the list
//if (endp == NULL) done = 1; // last directory in the list
else
*
endp
=
0
;
// end of string
//else *endp = 0; // end of string
if
(
endp
!=
NULL
)
*
endp
=
0
;
// end of string
dirp
=
opendir
(
p
);
dirp
=
opendir
(
p
);
if
(
dirp
==
NULL
)
{
if
(
dirp
==
NULL
)
{
...
@@ -119,7 +121,12 @@ void open_libs() {
...
@@ -119,7 +121,12 @@ void open_libs() {
}
}
}
}
closedir
(
dirp
);
closedir
(
dirp
);
p
=
endp
+
1
;
//p = endp+1;
if
(
endp
==
NULL
)
{
break
;
// last directory in the list
}
else
{
p
=
endp
+
1
;
}
}
}
ABC_FREE
(
init_p
);
ABC_FREE
(
init_p
);
...
...
src/misc/extra/extraUtilUtil.c
View file @
3bcc4fc3
...
@@ -280,7 +280,7 @@ char * Extra_UtilFileSearch(char *file, char *path, char *mode)
...
@@ -280,7 +280,7 @@ char * Extra_UtilFileSearch(char *file, char *path, char *mode)
save_path
=
path
=
Extra_UtilStrsav
(
path
);
save_path
=
path
=
Extra_UtilStrsav
(
path
);
quit
=
0
;
quit
=
0
;
do
{
for
(;;)
{
cp
=
strchr
(
path
,
':'
);
cp
=
strchr
(
path
,
':'
);
if
(
cp
!=
0
)
{
if
(
cp
!=
0
)
{
*
cp
=
'\0'
;
*
cp
=
'\0'
;
...
@@ -304,8 +304,12 @@ char * Extra_UtilFileSearch(char *file, char *path, char *mode)
...
@@ -304,8 +304,12 @@ char * Extra_UtilFileSearch(char *file, char *path, char *mode)
return
filename
;
return
filename
;
}
}
ABC_FREE
(
filename
);
ABC_FREE
(
filename
);
path
=
++
cp
;
if
(
quit
)
{
}
while
(
!
quit
);
break
;
}
else
{
path
=
++
cp
;
}
}
ABC_FREE
(
save_path
);
ABC_FREE
(
save_path
);
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment