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
878a5794
Commit
878a5794
authored
Jul 12, 2000
by
Bruce Korb
Committed by
Bruce Korb
Jul 12, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed dinkleberries and use xmalloc instead of a private version
From-SVN: r34986
parent
2964d54f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
20 deletions
+58
-20
gcc/ChangeLog
+10
-0
gcc/fixinc/fixfixes.c
+1
-1
gcc/fixinc/fixincl.c
+2
-0
gcc/fixinc/fixlib.c
+39
-15
gcc/fixinc/fixlib.h
+6
-1
gcc/fixinc/fixtests.c
+0
-3
No files found.
gcc/ChangeLog
View file @
878a5794
2000-07-12 Bruce Korb <bkorb@gnu.org>
* fixinc/fixfixes.c: use xmalloc
* fixinc/fixincl.c(initialize): set program name for xmalloc
* fixinc/fixlib.c(must_malloc): obsolete
(is_cxx_header): no longer used - disabled
(skip_quote): inserted and disabled for future use
* fixinc/fixlib.h: reflects above
* fixinc/fixtests.c: removed dinkleberries
2000-07-12 Neil Booth <NeilB@earthling.net>
* cpphash.h: (TOKEN_SPELL) Pulled from cpplex.c.
...
...
gcc/fixinc/fixfixes.c
View file @
878a5794
...
...
@@ -567,7 +567,7 @@ FIX_PROC_HEAD( wrap_fix )
*
(
pz_dst
++
)
=
'_'
;
if
(
++
len
>=
sizeof
(
z_fixname
))
{
void
*
p
=
must_
malloc
(
len
+
strlen
(
pz_src
)
+
1
);
void
*
p
=
x
malloc
(
len
+
strlen
(
pz_src
)
+
1
);
memcpy
(
p
,
(
void
*
)
z_fixname
,
len
);
pz_name
=
(
tCC
*
)
p
;
pz_dst
=
(
char
*
)
pz_name
+
len
;
...
...
gcc/fixinc/fixincl.c
View file @
878a5794
...
...
@@ -206,6 +206,8 @@ initialize ( argc, argv )
"fixincl ERROR: %s environment variable not defined
\n
\
\t
TARGET_MACHINE, DESTDIR, SRCDIR and FIND_BASE are required
\n
"
;
xmalloc_set_program_name
(
argv
[
0
]);
switch
(
argc
)
{
case
1
:
...
...
gcc/fixinc/fixlib.c
View file @
878a5794
...
...
@@ -24,20 +24,6 @@ Boston, MA 02111-1307, USA. */
#include "fixlib.h"
void
*
must_malloc
(
siz
)
size_t
siz
;
{
void
*
res
=
malloc
(
siz
);
if
(
res
==
(
void
*
)
NULL
)
{
fprintf
(
stderr
,
"fixincl failed to malloc %d bytes
\n
"
,
siz
);
exit
(
3
);
}
return
res
;
}
/* * * * * * * * * * * * *
load_file_data loads all the contents of a file into malloc-ed memory.
...
...
@@ -95,7 +81,7 @@ load_file_data (fp)
return
pz_data
;
}
#ifdef IS_CXX_HEADER_NEEDED
t_bool
is_cxx_header
(
fname
,
text
)
tCC
*
fname
;
...
...
@@ -153,6 +139,44 @@ template[ \t]*<|\
return
BOOL_FALSE
;
}
#endif
/* CXX_TYPE_NEEDED */
#ifdef SKIP_QUOTE_NEEDED
/*
* Skip over a quoted string. Single quote strings may
* contain multiple characters if the first character is
* a backslash. Especially a backslash followed by octal digits.
* We are not doing a correctness syntax check here.
*/
tCC
*
skip_quote
(
q
,
text
)
char
q
;
char
*
text
;
{
for
(;;)
{
char
ch
=
*
(
text
++
);
switch
(
ch
)
{
case
'\\'
:
text
++
;
/* skip over whatever character follows */
break
;
case
'"'
:
case
'\''
:
if
(
ch
!=
q
)
break
;
/*FALLTHROUGH*/
case
'\n'
:
case
NUL
:
goto
skip_done
;
}
}
skip_done
:
;
return
text
;
}
#endif
/* SKIP_QUOTE_NEEDED */
/* * * * * * * * * * * * *
...
...
gcc/fixinc/fixlib.h
View file @
878a5794
...
...
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "gnu-regex.h"
#include "machname.h"
#include "libiberty.h"
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
...
...
@@ -152,10 +153,14 @@ struct fix_desc
* Exported procedures
*/
char
*
load_file_data
_P_
((
FILE
*
fp
));
#ifdef IS_CXX_HEADER_NEEDED
t_bool
is_cxx_header
_P_
((
tCC
*
filename
,
tCC
*
filetext
));
#endif
/* IS_CXX_HEADER_NEEDED */
#ifdef SKIP_QUOTE_NEEDED
tCC
*
skip_quote
_P_
((
char
q
,
char
*
text
));
#endif
void
compile_re
_P_
((
tCC
*
pat
,
regex_t
*
re
,
int
match
,
tCC
*
e1
,
tCC
*
e2
));
void
*
must_malloc
_P_
((
size_t
));
void
apply_fix
_P_
((
tFixDesc
*
p_fixd
,
tCC
*
filname
));
apply_fix_p_t
run_test
_P_
((
tCC
*
t_name
,
tCC
*
f_name
,
tCC
*
text
));
...
...
gcc/fixinc/fixtests.c
View file @
878a5794
...
...
@@ -47,9 +47,6 @@ Boston, MA 02111-1307, USA. */
#include "fixlib.h"
#define SHOULD_APPLY(afp) ((afp) == APPLY_FIX)
apply_fix_p_t
run_test
();
typedef
struct
{
tCC
*
test_name
;
apply_fix_p_t
(
*
test_proc
)();
...
...
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