diff options
author | James Booth <boothj5@gmail.com> | 2012-02-12 22:23:51 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-02-12 22:23:51 +0000 |
commit | bff2210b7f69f04b74ac512c33da4ad1f90b7bf6 (patch) | |
tree | 557236f0f77287654aaecc849330f085fa3d4697 | |
parent | 9e63c4a0f6510149aa8253b9f9b57e072d860b9e (diff) | |
download | profani-tty-bff2210b7f69f04b74ac512c33da4ad1f90b7bf6.tar.gz |
Renamed console window functions
-rw-r--r-- | command.c | 10 | ||||
-rw-r--r-- | jabber.c | 6 | ||||
-rw-r--r-- | windows.c | 6 | ||||
-rw-r--r-- | windows.h | 8 |
4 files changed, 16 insertions, 14 deletions
diff --git a/command.c b/command.c index a20520f0..e8dea950 100644 --- a/command.c +++ b/command.c @@ -18,7 +18,7 @@ int handle_start_command(char *cmd) if (strcmp(cmd, "/quit") == 0) { result = QUIT_PROF; } else if (strncmp(cmd, "/help", 5) == 0) { - win_cons_help(); + cons_help(); result = AWAIT_COMMAND; } else if (strncmp(cmd, "/connect ", 9) == 0) { char *user; @@ -32,7 +32,7 @@ int handle_start_command(char *cmd) jabber_connect(user, passwd); result = START_MAIN; } else { - win_cons_bad_command(cmd); + cons_bad_command(cmd); result = AWAIT_COMMAND; } @@ -71,7 +71,7 @@ static int _cmd_quit(void) static int _cmd_help(void) { - win_cons_help(); + cons_help(); return TRUE; } @@ -107,7 +107,7 @@ static int _cmd_close(char *cmd) if (win_in_chat()) { win_close_win(); } else { - win_cons_bad_command(cmd); + cons_bad_command(cmd); } return TRUE; @@ -121,7 +121,7 @@ static int _cmd_default(char *cmd) jabber_send(cmd, recipient); win_show_outgoing_msg("me", recipient, cmd); } else { - win_cons_bad_command(cmd); + cons_bad_command(cmd); } return TRUE; diff --git a/jabber.c b/jabber.c index a19fce42..5e365783 100644 --- a/jabber.c +++ b/jabber.c @@ -157,19 +157,19 @@ static int _roster_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanz log_msg(CONN, "ERROR: query failed"); else { query = xmpp_stanza_get_child_by_name(stanza, "query"); - win_cons_show("Roster:"); + cons_show("Roster:"); for (item = xmpp_stanza_get_children(query); item; item = xmpp_stanza_get_next(item)) { if ((name = xmpp_stanza_get_attribute(item, "name"))) { char line[200]; sprintf(line, " %s (%s)", name, xmpp_stanza_get_attribute(item, "jid")); - win_cons_show(line); + cons_show(line); } else { char line[200]; sprintf(line, " %s", xmpp_stanza_get_attribute(item, "jid")); - win_cons_show(line); + cons_show(line); } } } diff --git a/windows.c b/windows.c index 7d62658e..c4840dd0 100644 --- a/windows.c +++ b/windows.c @@ -191,7 +191,7 @@ void win_show_outgoing_msg(char *from, char *to, char *message) } } -void win_cons_help(void) +void cons_help(void) { char tstmp[80]; get_time(tstmp); @@ -224,7 +224,7 @@ void win_cons_help(void) } } -void win_cons_show(char *msg) +void cons_show(char *msg) { char tstmp[80]; get_time(tstmp); @@ -238,7 +238,7 @@ void win_cons_show(char *msg) } } -void win_cons_bad_command(char *cmd) +void cons_bad_command(char *cmd) { char tstmp[80]; get_time(tstmp); diff --git a/windows.h b/windows.h index 1087a677..9e997e0b 100644 --- a/windows.h +++ b/windows.h @@ -42,8 +42,10 @@ int win_in_chat(void); void win_get_recipient(char *recipient); void win_show_incomming_msg(char *from, char *message); void win_show_outgoing_msg(char *from, char *to, char *message); -void win_cons_help(void); -void win_cons_bad_command(char *cmd); -void win_cons_show(char *cmd); + +// console window actions +void cons_help(void); +void cons_bad_command(char *cmd); +void cons_show(char *cmd); #endif |