Skip to content

Commit

Permalink
Regularize some constant names.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Jan 3, 2021
1 parent 36bc45e commit d5d4ad0
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 190 deletions.
15 changes: 7 additions & 8 deletions cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
#define A_X116MOUSE_IN 68
#define A_CLR_SEARCH 70

/* These values must not conflict with any A_* or EC_* value. */
#define A_INVALID 100
#define A_NOACTION 101
#define A_UINVALID 102
#define A_END_LIST 103
#define A_SPECIAL_KEY 104
#define A_PREFIX 105

#define A_SKIP 127

#define A_EXTRA 0200
Expand All @@ -103,17 +103,16 @@
#define EC_B_COMPLETE 18
#define EC_LITERAL 19
#define EC_ABORT 20
#define EC_X11MOUSE_IGNORE 21
#define EC_X116MOUSE_IGNORE 22
#define EC_X11MOUSE 21
#define EC_X116MOUSE 22

#define EC_NOACTION 101
#define EC_UINVALID 102

/* Flags for editchar() */
#define EC_PEEK 01
#define EC_NOHISTORY 02
#define EC_NOCOMPLETE 04
#define EC_NORIGHTLEFT 010
#define ECF_PEEK 01
#define ECF_NOHISTORY 02
#define ECF_NOCOMPLETE 04
#define ECF_NORIGHTLEFT 010

/* Environment variable stuff */
#define EV_OK 01
Expand Down
8 changes: 4 additions & 4 deletions cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,20 +845,22 @@ cmd_edit(c)
/*
* No current history; don't accept history manipulation cmds.
*/
flags |= EC_NOHISTORY;
flags |= ECF_NOHISTORY;
#endif
#if TAB_COMPLETE_FILENAME
if (curr_mlist == ml_search)
/*
* In a search command; don't accept file-completion cmds.
*/
flags |= EC_NOCOMPLETE;
flags |= ECF_NOCOMPLETE;
#endif

action = editchar(c, flags);

switch (action)
{
case A_NOACTION:
return (CC_OK);
case EC_RIGHT:
not_in_completion();
return (cmd_right());
Expand Down Expand Up @@ -927,8 +929,6 @@ cmd_edit(c)
case EC_EXPAND:
return (cmd_complete(action));
#endif
case EC_NOACTION:
return (CC_OK);
default:
not_in_completion();
return (CC_PASS);
Expand Down
2 changes: 1 addition & 1 deletion command.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ mca_char(c)
*/
if ((c >= '0' && c <= '9') || c == '.')
break;
switch (editchar(c, EC_PEEK|EC_NOHISTORY|EC_NOCOMPLETE|EC_NORIGHTLEFT))
switch (editchar(c, ECF_PEEK|ECF_NOHISTORY|ECF_NOCOMPLETE|ECF_NORIGHTLEFT))
{
case A_NOACTION:
return (MCA_MORE);
Expand Down
Loading

0 comments on commit d5d4ad0

Please sign in to comment.