git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename structures and functions
[protos/libecoli.git]
/
examples
/
readline
/
main.c
diff --git
a/examples/readline/main.c
b/examples/readline/main.c
index
6095808
..
90a25f0
100644
(file)
--- a/
examples/readline/main.c
+++ b/
examples/readline/main.c
@@
-54,7
+54,7
@@
static char *my_completion_entry(const char *s, int state)
return NULL;
line[rl_point] = '\0';
return NULL;
line[rl_point] = '\0';
- c = ec_
node_
complete(commands, line);
+ c = ec_complete(commands, line);
free(line);
if (c == NULL)
return NULL;
free(line);
if (c == NULL)
return NULL;
@@
-106,7
+106,7
@@
static char **my_attempted_completion(const char *text, int start, int end)
static char *get_node_help(const struct ec_comp_item *item)
{
const struct ec_comp_group *grp;
static char *get_node_help(const struct ec_comp_item *item)
{
const struct ec_comp_group *grp;
- const struct ec_p
ars
e *state;
+ const struct ec_p
nod
e *state;
const struct ec_node *node;
char *help = NULL;
const char *node_help = NULL;
const struct ec_node *node;
char *help = NULL;
const char *node_help = NULL;
@@
-114,8
+114,8
@@
static char *get_node_help(const struct ec_comp_item *item)
grp = ec_comp_item_get_grp(item);
for (state = ec_comp_group_get_state(grp); state != NULL;
grp = ec_comp_item_get_grp(item);
for (state = ec_comp_group_get_state(grp); state != NULL;
- state = ec_p
ars
e_get_parent(state)) {
- node = ec_p
ars
e_get_node(state);
+ state = ec_p
nod
e_get_parent(state)) {
+ node = ec_p
nod
e_get_node(state);
if (node_help == NULL)
node_help = ec_dict_get(ec_node_attrs(node), "help");
if (node_desc == NULL)
if (node_help == NULL)
node_help = ec_dict_get(ec_node_attrs(node), "help");
if (node_desc == NULL)
@@
-139,7
+139,7
@@
static int show_help(int ignore, int invoking_key)
const struct ec_comp_group *grp, *prev_grp = NULL;
const struct ec_comp_item *item;
struct ec_comp *c = NULL;
const struct ec_comp_group *grp, *prev_grp = NULL;
const struct ec_comp_item *item;
struct ec_comp *c = NULL;
- struct ec_p
ars
e *p = NULL;
+ struct ec_p
nod
e *p = NULL;
char *line = NULL;
unsigned int count;
char **helps = NULL;
char *line = NULL;
unsigned int count;
char **helps = NULL;
@@
-154,15
+154,15
@@
static int show_help(int ignore, int invoking_key)
goto fail;
/* check if the current line matches */
goto fail;
/* check if the current line matches */
- p = ec_
node_
parse(commands, line);
- if (ec_p
ars
e_matches(p))
+ p = ec_parse(commands, line);
+ if (ec_p
nod
e_matches(p))
match = 1;
match = 1;
- ec_p
ars
e_free(p);
+ ec_p
nod
e_free(p);
p = NULL;
/* complete at current cursor position */
line[rl_point] = '\0';
p = NULL;
/* complete at current cursor position */
line[rl_point] = '\0';
- c = ec_
node_
complete(commands, line);
+ c = ec_complete(commands, line);
free(line);
line = NULL;
if (c == NULL)
free(line);
line = NULL;
if (c == NULL)
@@
-211,7
+211,7
@@
static int show_help(int ignore, int invoking_key)
fail:
ec_comp_iter_free(iter);
fail:
ec_comp_iter_free(iter);
- ec_p
ars
e_free(p);
+ ec_p
nod
e_free(p);
free(line);
ec_comp_free(c);
if (helps != NULL) {
free(line);
ec_comp_free(c);
if (helps != NULL) {
@@
-328,7
+328,7
@@
static int create_commands(void)
int main(void)
{
int main(void)
{
- struct ec_p
ars
e *p;
+ struct ec_p
nod
e *p;
char *line;
if (ec_init() < 0) {
char *line;
if (ec_init() < 0) {
@@
-347,10
+347,10
@@
int main(void)
if (line == NULL)
break;
if (line == NULL)
break;
- p = ec_
node_
parse(commands, line);
- ec_p
ars
e_dump(stdout, p);
+ p = ec_parse(commands, line);
+ ec_p
nod
e_dump(stdout, p);
add_history(line);
add_history(line);
- ec_p
ars
e_free(p);
+ ec_p
nod
e_free(p);
}
}