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
526fef40
Commit
526fef40
authored
Mar 26, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r592
parent
84c0bb63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
gcc/protoize.c
+13
-1
No files found.
gcc/protoize.c
View file @
526fef40
...
...
@@ -1320,11 +1320,22 @@ shortpath (cwd, filename)
path_p
++
;
unmatched_slash_count
++
;
}
/* Find out how many directory levels in cwd were *not* matched. */
while
(
*
cwd_p
)
if
(
*
cwd_p
++
==
'/'
)
unmatched_slash_count
++
;
unmatched_slash_count
++
;
/* Now we know how long the "short name" will be.
Reject it if longer than the input. */
if
(
unmatched_slash_count
*
3
+
strlen
(
path_p
)
>=
filename_len
)
return
filename
;
/* For each of them, put a `../' at the beginning of the short name. */
while
(
unmatched_slash_count
--
)
{
/* Give up if the result gets to be longer
than the absolute path name. */
if
(
rel_buffer
+
filename_len
<=
rel_buf_p
+
3
)
return
filename
;
*
rel_buf_p
++
=
'.'
;
...
...
@@ -1332,6 +1343,7 @@ shortpath (cwd, filename)
*
rel_buf_p
++
=
'/'
;
}
/* Then tack on the unmatched part of the desired file's name. */
do
{
if
(
rel_buffer
+
filename_len
<=
rel_buf_p
)
...
...
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