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
3af556f7
Commit
3af556f7
authored
Sep 12, 2000
by
Bruce Korb
Committed by
Bruce Korb
Sep 12, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanups
From-SVN: r36359
parent
32892c52
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
47 deletions
+60
-47
gcc/ChangeLog
+11
-0
gcc/fixinc/fixfixes.c
+9
-10
gcc/fixinc/fixincl.c
+6
-6
gcc/fixinc/fixincl.tpl
+2
-2
gcc/fixinc/fixincl.x
+0
-0
gcc/fixinc/fixlib.h
+17
-13
gcc/fixinc/fixtests.c
+8
-6
gcc/fixinc/server.h
+7
-10
No files found.
gcc/ChangeLog
View file @
3af556f7
2000-09-12 Bruce Korb <bkorb@gnu.org>
* fixinc/fixfixes.c: make a type for the fix procedure & use it,
remove obsolete code
* fixinc/fixincl.c: Use PARAMS, not _P_. Add no-op default to switch.
* fixinc/fixincl.tpl: make non-exported arrays static scope
* fixinc/fixincl.x: regenerate
* fixinc/fixlib.h: Use PARAMS, not _P_
* fixinc/fixtests.c: make a type for the test proc & use it
* fixinc/server.h: Use PARAMS, not _P_
2000-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2000-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-typeck.c (process_init_element): Avoid union init warnings on
* c-typeck.c (process_init_element): Avoid union init warnings on
...
...
gcc/fixinc/fixfixes.c
View file @
3af556f7
...
@@ -66,9 +66,10 @@ Boston, MA 02111-1307, USA. */
...
@@ -66,9 +66,10 @@ Boston, MA 02111-1307, USA. */
tSCC
zNeedsArg
[]
=
"fixincl error: `%s' needs %s argument (c_fix_arg[%d])
\n
"
;
tSCC
zNeedsArg
[]
=
"fixincl error: `%s' needs %s argument (c_fix_arg[%d])
\n
"
;
typedef
void
t_fix_proc
PARAMS
((
const
char
*
,
const
char
*
,
tFixDesc
*
));
typedef
struct
{
typedef
struct
{
const
char
*
fix_name
;
const
char
*
fix_name
;
void
(
*
fix_proc
)()
;
t_fix_proc
*
fix_proc
;
}
fix_entry_t
;
}
fix_entry_t
;
#define FIXUP_TABLE \
#define FIXUP_TABLE \
...
@@ -80,13 +81,14 @@ typedef struct {
...
@@ -80,13 +81,14 @@ typedef struct {
_FT_( "gnu_type", gnu_type_fix )
_FT_( "gnu_type", gnu_type_fix )
#define FIX_PROC_HEAD( fix ) \
#define FIX_PROC_HEAD( fix ) \
static void fix ( filname, text, p_fixd ) \
static t_fix_proc fix;
/* avoid warning */
\
const char* filname; \
static void fix ( filname, text, p_fixd ) \
const char* text; \
const char* filname; \
const char* text; \
tFixDesc* p_fixd;
tFixDesc* p_fixd;
#ifdef NEED_PRINT_QUOTE
/*
/*
* Skip over a quoted string. Single quote strings may
* Skip over a quoted string. Single quote strings may
* contain multiple characters if the first character is
* contain multiple characters if the first character is
...
@@ -128,6 +130,7 @@ print_quote( q, text )
...
@@ -128,6 +130,7 @@ print_quote( q, text )
return
text
;
return
text
;
}
}
#endif
/* NEED_PRINT_QUOTE */
/*
/*
...
@@ -250,7 +253,6 @@ FIX_PROC_HEAD( format_fix )
...
@@ -250,7 +253,6 @@ FIX_PROC_HEAD( format_fix )
{
{
tCC
*
pz_pat
=
p_fixd
->
patch_args
[
2
];
tCC
*
pz_pat
=
p_fixd
->
patch_args
[
2
];
tCC
*
pz_fmt
=
p_fixd
->
patch_args
[
1
];
tCC
*
pz_fmt
=
p_fixd
->
patch_args
[
1
];
const
char
*
p
;
regex_t
re
;
regex_t
re
;
regmatch_t
rm
[
10
];
regmatch_t
rm
[
10
];
...
@@ -295,9 +297,6 @@ FIX_PROC_HEAD( format_fix )
...
@@ -295,9 +297,6 @@ FIX_PROC_HEAD( format_fix )
compile_re
(
pz_pat
,
&
re
,
1
,
"format search-text"
,
"format_fix"
);
compile_re
(
pz_pat
,
&
re
,
1
,
"format search-text"
,
"format_fix"
);
while
(
regexec
(
&
re
,
text
,
10
,
rm
,
0
)
==
0
)
while
(
regexec
(
&
re
,
text
,
10
,
rm
,
0
)
==
0
)
{
{
char
*
apz
[
10
];
int
i
;
fwrite
(
text
,
rm
[
0
].
rm_so
,
1
,
stdout
);
fwrite
(
text
,
rm
[
0
].
rm_so
,
1
,
stdout
);
format_write
(
pz_fmt
,
text
,
rm
);
format_write
(
pz_fmt
,
text
,
rm
);
text
+=
rm
[
0
].
rm_eo
;
text
+=
rm
[
0
].
rm_eo
;
...
...
gcc/fixinc/fixincl.c
View file @
3af556f7
...
@@ -93,12 +93,11 @@ const char incl_quote_pat[] = "^[ \t]*#[ \t]*include[ \t]*\"[^/]";
...
@@ -93,12 +93,11 @@ const char incl_quote_pat[] = "^[ \t]*#[ \t]*include[ \t]*\"[^/]";
tSCC
z_fork_err
[]
=
"Error %d (%s) starting filter process for %s
\n
"
;
tSCC
z_fork_err
[]
=
"Error %d (%s) starting filter process for %s
\n
"
;
regex_t
incl_quote_re
;
regex_t
incl_quote_re
;
void
do_version
();
void
do_version
PARAMS
((
void
));
char
*
load_file
_P_
((
const
char
*
));
char
*
load_file
PARAMS
((
const
char
*
));
void
process
_P_
((
char
*
,
const
char
*
));
void
run_compiles
PARAMS
((
void
));
void
run_compiles
();
void
initialize
PARAMS
((
int
argc
,
char
**
argv
));
void
initialize
_P_
((
int
argc
,
char
**
argv
));
void
process
PARAMS
((
void
));
void
process
();
/* External Source Code */
/* External Source Code */
...
@@ -523,6 +522,7 @@ run_compiles ()
...
@@ -523,6 +522,7 @@ run_compiles ()
p_test
->
p_test_regex
=
p_re
++
;
p_test
->
p_test_regex
=
p_re
++
;
compile_re
(
p_test
->
pz_test_text
,
p_test
->
p_test_regex
,
0
,
compile_re
(
p_test
->
pz_test_text
,
p_test
->
p_test_regex
,
0
,
"select test"
,
p_fixd
->
fix_name
);
"select test"
,
p_fixd
->
fix_name
);
default
:
break
;
}
}
p_test
++
;
p_test
++
;
}
}
...
...
gcc/fixinc/fixincl.tpl
View file @
3af556f7
...
@@ -124,7 +124,7 @@ _SETENV re_ct
...
@@ -124,7 +124,7 @@ _SETENV re_ct
re_ct _env _val
re_ct _env _val
select _count +
select _count +
bypass _count + =]
bypass _count + =]
tTestDesc a[=hackname _cap=]Tests[] = {[=
static
tTestDesc a[=hackname _cap=]Tests[] = {[=
_FOR test =]
_FOR test =]
{ TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
{ TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
...
@@ -149,7 +149,7 @@ tTestDesc a[=hackname _cap=]Tests[] = {[=
...
@@ -149,7 +149,7 @@ tTestDesc a[=hackname _cap=]Tests[] = {[=
/*
/*
* Fix Command Arguments for [=hackname _cap=]
* Fix Command Arguments for [=hackname _cap=]
*/
*/
const char* apz[=hackname _cap=]Patch[] = {[=
static
const char* apz[=hackname _cap=]Patch[] = {[=
_IF sed _exist =] "sed"[=
_IF sed _exist =] "sed"[=
_FOR sed=],
_FOR sed=],
"-e", [=sed _krstr=][=
"-e", [=sed _krstr=][=
...
...
gcc/fixinc/fixincl.x
View file @
3af556f7
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixlib.h
View file @
3af556f7
...
@@ -79,6 +79,7 @@ typedef int t_success;
...
@@ -79,6 +79,7 @@ typedef int t_success;
#define NULLPROCESS ((pid_t)0)
#define NULLPROCESS ((pid_t)0)
#define EXIT_PANIC 99
#define EXIT_PANIC 99
#endif
/* NOPROCESS */
#ifndef HAVE_T_BOOL_ENUM
#ifndef HAVE_T_BOOL_ENUM
#define HAVE_T_BOOL_ENUM
#define HAVE_T_BOOL_ENUM
...
@@ -93,9 +94,6 @@ typedef int apply_fix_p_t; /* Apply Fix Predicate Type */
...
@@ -93,9 +94,6 @@ typedef int apply_fix_p_t; /* Apply Fix Predicate Type */
#define APPLY_FIX 0
#define APPLY_FIX 0
#define SKIP_FIX 1
#define SKIP_FIX 1
#define _P_(p) ()
#endif
#define ENV_TABLE \
#define ENV_TABLE \
_ENV_( pz_machine, BOOL_TRUE, "TARGET_MACHINE", \
_ENV_( pz_machine, BOOL_TRUE, "TARGET_MACHINE", \
"output from config.guess" ) \
"output from config.guess" ) \
...
@@ -194,25 +192,31 @@ extern int gnu_type_map_ct;
...
@@ -194,25 +192,31 @@ extern int gnu_type_map_ct;
/*
/*
* Exported procedures
* Exported procedures
*/
*/
char
*
load_file_data
_P_
((
FILE
*
fp
));
char
*
load_file_data
PARAMS
((
FILE
*
fp
));
#ifdef IS_CXX_HEADER_NEEDED
#ifdef IS_CXX_HEADER_NEEDED
t_bool
is_cxx_header
_P_
((
tCC
*
filename
,
tCC
*
filetext
));
t_bool
is_cxx_header
PARAMS
((
tCC
*
filename
,
tCC
*
filetext
));
#endif
/* IS_CXX_HEADER_NEEDED */
#endif
/* IS_CXX_HEADER_NEEDED */
#ifdef SKIP_QUOTE_NEEDED
#ifdef SKIP_QUOTE_NEEDED
tCC
*
skip_quote
_P_
((
char
q
,
char
*
text
));
tCC
*
skip_quote
PARAMS
((
char
q
,
char
*
text
));
#endif
#endif
void
compile_re
_P_
((
tCC
*
pat
,
regex_t
*
re
,
int
match
,
tCC
*
e1
,
tCC
*
e2
));
void
apply_fix
_P_
((
tFixDesc
*
p_fixd
,
tCC
*
filname
));
void
compile_re
PARAMS
((
tCC
*
pat
,
regex_t
*
re
,
int
match
,
apply_fix_p_t
run_test
_P_
((
tCC
*
t_name
,
tCC
*
f_name
,
tCC
*
text
));
tCC
*
e1
,
tCC
*
e2
));
void
apply_fix
PARAMS
((
tFixDesc
*
p_fixd
,
tCC
*
filname
));
apply_fix_p_t
run_test
PARAMS
((
tCC
*
t_name
,
tCC
*
f_name
,
tCC
*
text
));
#ifdef __MSDOS__
#ifdef __MSDOS__
char
*
make_raw_shell_str
_P_
((
char
*
pz_d
,
tCC
*
pz_s
,
size_t
smax
));
char
*
make_raw_shell_str
PARAMS
((
char
*
pz_d
,
tCC
*
pz_s
,
size_t
smax
));
#endif
#endif
#ifdef MN_NAME_PAT
#ifdef MN_NAME_PAT
void
mn_get_regexps
_P_
((
regex_t
**
label_re
,
regex_t
**
name_re
,
void
mn_get_regexps
tCC
*
who
));
PARAMS
((
regex_t
**
label_re
,
regex_t
**
name_re
,
tCC
*
who
));
#endif
#endif
#endif
/* FIXINCLUDES_FIXLIB_H */
#endif
/* FIXINCLUDES_FIXLIB_H */
gcc/fixinc/fixtests.c
View file @
3af556f7
...
@@ -47,18 +47,20 @@ Boston, MA 02111-1307, USA. */
...
@@ -47,18 +47,20 @@ Boston, MA 02111-1307, USA. */
#include "fixlib.h"
#include "fixlib.h"
typedef
apply_fix_p_t
t_test_proc
PARAMS
((
tCC
*
file
,
tCC
*
text
));
typedef
struct
{
typedef
struct
{
tCC
*
test_name
;
tCC
*
test_name
;
apply_fix_p_t
(
*
test_proc
)()
;
t_test_proc
*
test_proc
;
}
test_entry_t
;
}
test_entry_t
;
#define FIX_TEST_TABLE \
#define FIX_TEST_TABLE \
_FT_( "machine_name", machine_name_test )
_FT_( "machine_name", machine_name_test )
#define TEST_FOR_FIX_PROC_HEAD( test ) \
#define TEST_FOR_FIX_PROC_HEAD( test )
\
t_test_proc test;
/* avoid warning */
\
static apply_fix_p_t test ( fname, text ) \
static apply_fix_p_t test ( fname, text )
\
tCC* fname; \
tCC* fname;
\
tCC* text;
tCC* text;
...
...
gcc/fixinc/server.h
View file @
3af556f7
...
@@ -77,6 +77,7 @@ typedef char *t_pchar;
...
@@ -77,6 +77,7 @@ typedef char *t_pchar;
#define NULLPROCESS ((pid_t)0)
#define NULLPROCESS ((pid_t)0)
#define EXIT_PANIC 99
#define EXIT_PANIC 99
#endif
/* NOPROCESS */
#ifndef HAVE_T_BOOL_ENUM
#ifndef HAVE_T_BOOL_ENUM
#define HAVE_T_BOOL_ENUM
#define HAVE_T_BOOL_ENUM
...
@@ -86,14 +87,10 @@ typedef enum
...
@@ -86,14 +87,10 @@ typedef enum
}
t_bool
;
}
t_bool
;
#endif
#endif
#define _P_(p) ()
char
*
run_shell
PARAMS
((
const
char
*
pzCmd
));
#endif
pid_t
proc2_fopen
PARAMS
((
t_pf_pair
*
p_pair
,
t_pchar
*
pp_args
));
pid_t
proc2_open
PARAMS
((
t_fd_pair
*
p_pair
,
t_pchar
*
pp_args
));
char
*
run_shell
_P_
((
const
char
*
pzCmd
));
int
chain_open
PARAMS
((
int
in_fd
,
t_pchar
*
pp_args
,
pid_t
proc2_fopen
_P_
((
t_pf_pair
*
p_pair
,
t_pchar
*
pp_args
));
pid_t
*
p_child
));
pid_t
proc2_open
_P_
((
t_fd_pair
*
p_pair
,
t_pchar
*
pp_args
));
void
close_server
PARAMS
((
void
));
int
chain_open
_P_
((
int
in_fd
,
t_pchar
*
pp_args
,
pid_t
*
p_child
));
void
close_server
_P_
((
void
));
#endif
/* FIXINC_SERVER_H */
#endif
/* FIXINC_SERVER_H */
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