Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
e051c631
Commit
e051c631
authored
Jun 22, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check_headers: fix regular expression
parent
e2067626
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
src/check_headers
src/check_headers
+17
-8
No files found.
src/check_headers
View file @
e051c631
...
@@ -5,14 +5,23 @@ cd "$(dirname "$0")" || exit $?
...
@@ -5,14 +5,23 @@ cd "$(dirname "$0")" || exit $?
# Look for configure #defines in public headers.
# Look for configure #defines in public headers.
# There are incorrect, as external users don't have our <config.h>.
# There are incorrect, as external users don't have our <config.h>.
regexp
=
"
$(
cat
../config.h.in |
\
regexp
=
""
sed
-n
-e
's/^#undef \([[:upper:][:digit:]_]*\)$/\1/p'
|
\
grep
-v
'WORDS_BIGENDIAN'
|
\
while
read
l
;
do
grep
-v
'UNICODE'
|
\
d
=
$(
echo
"
$l
"
|
sed
-n
-e
's/^#undef \([[:upper:][:digit:]_]*\)$/\1/p'
)
grep
-v
'__LIBVLC__'
|
\
test
-z
"
$d
"
&&
continue
xargs |
\
test
"
$d
"
=
"WORDS_BIGENDIAN"
&&
continue
sed
-e
's/ /\\\(\\s\\\|$\\\)\\\| /g'
)
"
test
"
$d
"
=
"UNICODE"
&&
continue
regexp
=
"
$regexp
\$
"
test
"
$d
"
=
"__LIBVLC__"
&&
continue
if
test
-z
"
$regexp
"
;
then
regexp
=
"[^A-Za-z0-9_]
\(
"
else
regexp
=
"
${
regexp
}
\|
"
fi
regexp
=
"
${
regexp
}${
d
}
"
done
< ../config.h.in
regexp
=
"
${
regexp
}
\)\(
[^A-Za-z0-9_]
\|\$\)
"
echo
Looking
for
private defines
in
public headers...
echo
Looking
for
private defines
in
public headers...
!
grep
--
"
$regexp
"
"
$@
"
||
exit
$?
!
grep
--
"
$regexp
"
"
$@
"
||
exit
$?
...
...
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