Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
c24caf5f
Commit
c24caf5f
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename four variables, for density and aptness
parent
8db21b68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/files.c
+7
-8
src/files.c
with
7 additions
and
8 deletions
+7
-8
src/files.c
View file @
c24caf5f
...
...
@@ -2713,25 +2713,24 @@ char *input_tab(char *buf, bool allow_files, size_t *place,
char
*
mzero
,
*
glued
;
const
char
*
lastslash
=
revstrstr
(
buf
,
"/"
,
buf
+
*
place
);
size_t
lastslash_len
=
(
lastslash
==
NULL
)
?
0
:
lastslash
-
buf
+
1
;
char
mat
ch1
[
mb_cur_max
()],
mat
ch2
[
mb_cur_max
()];
int
match1_
len
,
match2_
len
;
char
ch
ar
1
[
mb_cur_max
()],
ch
ar
2
[
mb_cur_max
()];
int
len
1
,
len
2
;
/* Get the number of characters that all matches have in common. */
while
(
TRUE
)
{
match1_
len
=
parse_mbchar
(
matches
[
0
]
+
common_len
,
mat
ch1
,
NULL
);
len
1
=
parse_mbchar
(
matches
[
0
]
+
common_len
,
ch
ar
1
,
NULL
);
for
(
match
=
1
;
match
<
num_matches
;
match
++
)
{
match2_len
=
parse_mbchar
(
matches
[
match
]
+
common_len
,
match2
,
NULL
);
if
(
match1_len
!=
match2_len
||
strncmp
(
match1
,
match2
,
match2_len
)
!=
0
)
len2
=
parse_mbchar
(
matches
[
match
]
+
common_len
,
char2
,
NULL
);
if
(
len1
!=
len2
||
strncmp
(
char1
,
char2
,
len2
)
!=
0
)
break
;
}
if
(
match
<
num_matches
||
matches
[
0
][
common_len
]
==
'\0'
)
break
;
common_len
+=
match1_
len
;
common_len
+=
len
1
;
}
mzero
=
charalloc
(
lastslash_len
+
common_len
+
1
);
...
...
This diff is collapsed.
Click to expand it.
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