projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[pspp-builds.git]
/
src
/
command.c
diff --git
a/src/command.c
b/src/command.c
index 071c7e4e9ecb89942d1a3394c229a4019357126f..cd2b2038163b41f85d67394d35ed01fa54cefd1e 100644
(file)
--- a/
src/command.c
+++ b/
src/command.c
@@
-293,6
+293,12
@@
conflicting_3char_prefixes (const char *a, const char *b)
bw = find_word (b, &bw_len);
assert (aw != NULL && bw != NULL);
bw = find_word (b, &bw_len);
assert (aw != NULL && bw != NULL);
+ /* Words that are the same don't conflict. */
+ if (aw_len == bw_len && !memcmp (aw, bw, aw_len))
+ return 0;
+
+ /* Words that are otherwise the same in the first three letters
+ do conflict. */
return ((aw_len > 3 && bw_len > 3)
|| (aw_len == 3 && bw_len > 3)
|| (bw_len == 3 && aw_len > 3)) && !memcmp (aw, bw, 3);
return ((aw_len > 3 && bw_len > 3)
|| (aw_len == 3 && bw_len > 3)
|| (bw_len == 3 && aw_len > 3)) && !memcmp (aw, bw, 3);
@@
-765,11
+771,11
@@
cmd_host (void)
/* Make sure that the system has a command interpreter, then run a
command. */
if (system (NULL) != 0)
/* Make sure that the system has a command interpreter, then run a
command. */
if (system (NULL) != 0)
-
success
= run_command ();
+
code
= run_command ();
else
{
msg (SE, _("No operating system support for this command."));
else
{
msg (SE, _("No operating system support for this command."));
-
success
= CMD_FAILURE;
+
code
= CMD_FAILURE;
}
#endif /* !unix */
}
#endif /* !unix */