Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
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
riscv-gcc-1
Commits
3f69bd93
Commit
3f69bd93
authored
May 17, 2000
by
Bruce Korb
Committed by
Bruce Korb
May 17, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use #def constant for sub-pattern count
From-SVN: r33961
parent
5e36475b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
gcc/ChangeLog
+3
-1
gcc/fixinc/fixfixes.c
+10
-7
No files found.
gcc/ChangeLog
View file @
3f69bd93
...
...
@@ -7,7 +7,9 @@
*
fixinc
/
fixincl
.
c
:
improve
the
debug
displays
,
ignore
SIGPIPE
*
fixinc
/
server
.
c
:
likewise
*
fixinc
/
fixfixes
.
c
(
char_macro_def_fix
)
:
fix
regex
+
#
ifdef
debugging
code
*
fixinc
/
fixfixes
.
c
(
char_macro_def_fix
)
:
fix
regex
+
#
ifdef
debugging
code
+
use
#
def
constant
for
sub
-
pattern
count
*
fixinc
/
inclhack
.
def
(
hpux11_fabsf
)
:
Keep
HP
-
UX
11
from
stomping
on
C
++
math
namespace
...
...
gcc/fixinc/fixfixes.c
View file @
3f69bd93
...
...
@@ -296,11 +296,12 @@ FIX_PROC_HEAD( char_macro_use_fix )
#endif
;
# define SUB_PAT_CT 1
char
*
pz_pat
;
static
regex_t
re
;
regmatch_t
rm
[
2
];
regmatch_t
rm
[
SUB_PAT_CT
+
1
];
if
(
p_fixd
->
patch_args
[
1
]
==
NULL
)
{
...
...
@@ -316,10 +317,10 @@ FIX_PROC_HEAD( char_macro_use_fix )
exit
(
3
);
}
compile_re
(
pz_pat
,
&
re
,
2
,
"macro pattern"
,
"char_macro_use_fix"
);
compile_re
(
pz_pat
,
&
re
,
1
,
"macro pattern"
,
"char_macro_use_fix"
);
free
(
pz_pat
);
while
(
regexec
(
&
re
,
text
,
3
,
rm
,
0
)
==
0
)
while
(
regexec
(
&
re
,
text
,
SUB_PAT_CT
+
1
,
rm
,
0
)
==
0
)
{
const
char
*
pz
=
text
+
rm
[
1
].
rm_so
;
...
...
@@ -334,6 +335,7 @@ FIX_PROC_HEAD( char_macro_use_fix )
}
fputs
(
text
,
stdout
);
# undef SUB_PAT_CT
}
...
...
@@ -382,8 +384,8 @@ FIX_PROC_HEAD( char_macro_def_fix )
char
*
pz_pat
;
static
regex_t
re
;
regmatch_t
rm
[
3
];
# define SUB_PAT_CT 2
regmatch_t
rm
[
SUB_PAT_CT
+
1
];
const
char
*
p
;
int
rerr
;
...
...
@@ -404,7 +406,7 @@ FIX_PROC_HEAD( char_macro_def_fix )
compile_re
(
pz_pat
,
&
re
,
1
,
"macro pattern"
,
"char_macro_def_fix"
);
#ifdef DEBUG
if
((
rerr
=
regexec
(
&
re
,
text
,
3
,
rm
,
0
))
!=
0
)
if
((
rerr
=
regexec
(
&
re
,
text
,
SUB_PAT_CT
+
1
,
rm
,
0
))
!=
0
)
{
fprintf
(
stderr
,
"Match error %d:
\n
%s
\n
"
,
rerr
,
pz_pat
);
exit
(
3
);
...
...
@@ -413,7 +415,7 @@ FIX_PROC_HEAD( char_macro_def_fix )
free
(
pz_pat
);
while
((
rerr
=
regexec
(
&
re
,
text
,
3
,
rm
,
0
))
==
0
)
while
((
rerr
=
regexec
(
&
re
,
text
,
SUB_PAT_CT
+
1
,
rm
,
0
))
==
0
)
{
const
char
*
pz
=
text
+
rm
[
2
].
rm_so
;
...
...
@@ -450,6 +452,7 @@ FIX_PROC_HEAD( char_macro_def_fix )
* Emit the rest of the text
*/
fputs
(
text
,
stdout
);
# undef SUB_PAT_CT
}
/* Fix for machine name #ifdefs that are not in the namespace reserved
...
...
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