diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/accounts.c | 2 | ||||
-rw-r--r-- | src/command/command.c (renamed from src/command.c) | 9 | ||||
-rw-r--r-- | src/command/command.h (renamed from src/command.h) | 4 | ||||
-rw-r--r-- | src/command/history.c (renamed from src/command_history.c) | 2 | ||||
-rw-r--r-- | src/command/history.h | 28 | ||||
-rw-r--r-- | src/command/parser.c (renamed from src/command_parser.c) | 0 | ||||
-rw-r--r-- | src/command/parser.h | 31 | ||||
-rw-r--r-- | src/contact_list.c | 2 | ||||
-rw-r--r-- | src/muc.c | 2 | ||||
-rw-r--r-- | src/muc.h | 2 | ||||
-rw-r--r-- | src/preferences.c | 2 | ||||
-rw-r--r-- | src/profanity.c | 2 | ||||
-rw-r--r-- | src/tools/autocomplete.c (renamed from src/autocomplete.c) | 0 | ||||
-rw-r--r-- | src/tools/autocomplete.h (renamed from src/autocomplete.h) | 0 | ||||
-rw-r--r-- | src/tools/history.c (renamed from src/history.c) | 0 | ||||
-rw-r--r-- | src/tools/history.h (renamed from src/history.h) | 0 | ||||
-rw-r--r-- | src/tools/tinyurl.c (renamed from src/tinyurl.c) | 0 | ||||
-rw-r--r-- | src/tools/tinyurl.h (renamed from src/tinyurl.h) | 0 | ||||
-rw-r--r-- | src/ui/inputwin.c | 2 | ||||
-rw-r--r-- | src/ui/windows.c | 2 |
20 files changed, 73 insertions, 17 deletions
diff --git a/src/accounts.c b/src/accounts.c index 746311aa..6549819b 100644 --- a/src/accounts.c +++ b/src/accounts.c @@ -27,11 +27,11 @@ #include "accounts.h" -#include "autocomplete.h" #include "common.h" #include "files.h" #include "jid.h" #include "log.h" +#include "tools/autocomplete.h" #include "xmpp/xmpp.h" static gchar *accounts_loc; diff --git a/src/command.c b/src/command/command.c index 6a4bc82a..778339fa 100644 --- a/src/command.c +++ b/src/command/command.c @@ -27,11 +27,11 @@ #include <glib.h> -#include "command.h" - #include "accounts.h" -#include "autocomplete.h" #include "chat_session.h" +#include "command/command.h" +#include "command/history.h" +#include "command/parser.h" #include "common.h" #include "contact.h" #include "contact_list.h" @@ -41,7 +41,8 @@ #include "preferences.h" #include "profanity.h" #include "theme.h" -#include "tinyurl.h" +#include "tools/autocomplete.h" +#include "tools/tinyurl.h" #include "ui/ui.h" #include "xmpp/xmpp.h" diff --git a/src/command.h b/src/command/command.h index 805702df..00c18a9c 100644 --- a/src/command.h +++ b/src/command/command.h @@ -45,12 +45,8 @@ GSList * cmd_get_basic_help(void); GSList * cmd_get_settings_help(void); GSList * cmd_get_presence_help(void); -void cmd_history_init(void); void cmd_history_append(char *inp); char *cmd_history_previous(char *inp, int *size); char *cmd_history_next(char *inp, int *size); -gchar** parse_args(const char * const inp, int min, int max); -gchar** parse_args_with_freetext(const char * const inp, int min, int max); - #endif diff --git a/src/command_history.c b/src/command/history.c index e830a0c4..29a952c1 100644 --- a/src/command_history.c +++ b/src/command/history.c @@ -20,7 +20,7 @@ * */ -#include "history.h" +#include "tools/history.h" #define MAX_HISTORY 100 diff --git a/src/command/history.h b/src/command/history.h new file mode 100644 index 00000000..3b0b168f --- /dev/null +++ b/src/command/history.h @@ -0,0 +1,28 @@ +/* + * command_history.h + * + * Copyright (C) 2012, 2013 James Booth <boothj5@gmail.com> + * + * This file is part of Profanity. + * + * Profanity is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Profanity is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Profanity. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef COMMAND_HISTORY_H +#define COMMAND_HISTORY_H + +void cmd_history_init(void); + +#endif diff --git a/src/command_parser.c b/src/command/parser.c index e8197444..e8197444 100644 --- a/src/command_parser.c +++ b/src/command/parser.c diff --git a/src/command/parser.h b/src/command/parser.h new file mode 100644 index 00000000..f191ed15 --- /dev/null +++ b/src/command/parser.h @@ -0,0 +1,31 @@ +/* + * parser.h + * + * Copyright (C) 2012, 2013 James Booth <boothj5@gmail.com> + * + * This file is part of Profanity. + * + * Profanity is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Profanity is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Profanity. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef PARSER_H +#define PARSER_H + +#include <glib.h> + +gchar** parse_args(const char * const inp, int min, int max); +gchar** parse_args_with_freetext(const char * const inp, int min, int max); + +#endif diff --git a/src/contact_list.c b/src/contact_list.c index 1b22ff4c..b9db1289 100644 --- a/src/contact_list.c +++ b/src/contact_list.c @@ -24,8 +24,8 @@ #include <glib.h> -#include "autocomplete.h" #include "contact.h" +#include "tools/autocomplete.h" static Autocomplete ac; static GHashTable *contacts; diff --git a/src/muc.c b/src/muc.c index 2658983b..b061e4ba 100644 --- a/src/muc.c +++ b/src/muc.c @@ -25,9 +25,9 @@ #include <glib.h> -#include "autocomplete.h" #include "contact.h" #include "jid.h" +#include "tools/autocomplete.h" typedef struct _muc_room_t { char *room; // e.g. test@conference.server diff --git a/src/muc.h b/src/muc.h index f2685b96..86ebabcb 100644 --- a/src/muc.h +++ b/src/muc.h @@ -25,9 +25,9 @@ #include <glib.h> -#include "autocomplete.h" #include "contact.h" #include "jid.h" +#include "tools/autocomplete.h" void muc_join_room(const char * const room, const char * const nick); void muc_leave_room(const char * const room); diff --git a/src/preferences.c b/src/preferences.c index 6a5aa66c..b2414fca 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -34,9 +34,9 @@ #include "preferences.h" -#include "autocomplete.h" #include "files.h" #include "log.h" +#include "tools/autocomplete.h" static gchar *prefs_loc; static GKeyFile *prefs; diff --git a/src/profanity.c b/src/profanity.c index 6ba50236..a5514b57 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -33,7 +33,7 @@ #include "accounts.h" #include "chat_session.h" -#include "command.h" +#include "command/command.h" #include "common.h" #include "contact.h" #include "contact_list.h" diff --git a/src/autocomplete.c b/src/tools/autocomplete.c index baeeecb2..baeeecb2 100644 --- a/src/autocomplete.c +++ b/src/tools/autocomplete.c diff --git a/src/autocomplete.h b/src/tools/autocomplete.h index 03f4a013..03f4a013 100644 --- a/src/autocomplete.h +++ b/src/tools/autocomplete.h diff --git a/src/history.c b/src/tools/history.c index 5ac41969..5ac41969 100644 --- a/src/history.c +++ b/src/tools/history.c diff --git a/src/history.h b/src/tools/history.h index 4258f7a7..4258f7a7 100644 --- a/src/history.h +++ b/src/tools/history.h diff --git a/src/tinyurl.c b/src/tools/tinyurl.c index 87fafc47..87fafc47 100644 --- a/src/tinyurl.c +++ b/src/tools/tinyurl.c diff --git a/src/tinyurl.h b/src/tools/tinyurl.h index 58070839..58070839 100644 --- a/src/tinyurl.h +++ b/src/tools/tinyurl.h diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 203efe30..5ddafa97 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -33,7 +33,7 @@ #include <ncurses.h> #endif -#include "command.h" +#include "command/command.h" #include "common.h" #include "contact_list.h" #include "log.h" diff --git a/src/ui/windows.c b/src/ui/windows.c index 389c362f..1fa1c01d 100644 --- a/src/ui/windows.c +++ b/src/ui/windows.c @@ -41,7 +41,7 @@ #endif #include "chat_session.h" -#include "command.h" +#include "command/command.h" #include "common.h" #include "contact.h" #include "contact_list.h" |