mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
Enabled lots of GCC warnings, fixed those that were easy to fix.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@456 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
f8aa81b73c
commit
dcc2e89b2e
25 changed files with 84 additions and 106 deletions
|
|
@ -30,13 +30,13 @@
|
|||
#include "screen.h"
|
||||
#include "gui-windows.h"
|
||||
|
||||
#define TEXT_CHUNK_USABLE_SIZE (LINE_TEXT_CHUNK_SIZE-2-sizeof(char*))
|
||||
#define TEXT_CHUNK_USABLE_SIZE (LINE_TEXT_CHUNK_SIZE-2-(int)sizeof(char*))
|
||||
|
||||
int mirc_colors[] = { 15, 0, 1, 2, 12, 6, 5, 4, 14, 10, 3, 11, 9, 13, 8, 7, 15 };
|
||||
static int scrollback_lines, scrollback_hours;
|
||||
|
||||
#define mark_temp_eol(text) \
|
||||
memcpy((text)->buffer + (text)->pos, "\0\x80", 2);
|
||||
memcpy((text)->buffer + (text)->pos, "\0\200", 2);
|
||||
|
||||
static LINE_REC *create_line(GUI_WINDOW_REC *gui, int level)
|
||||
{
|
||||
|
|
@ -191,7 +191,7 @@ static void get_colors(int flags, int *fg, int *bg)
|
|||
if (flags & PRINTFLAG_BLINK) *bg |= 0x80;
|
||||
}
|
||||
|
||||
static void linebuf_add(GUI_WINDOW_REC *gui, char *str, int len)
|
||||
static void linebuf_add(GUI_WINDOW_REC *gui, const char *str, int len)
|
||||
{
|
||||
int left;
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ static void gui_printtext(WINDOW_REC *window, gpointer fgcolor, gpointer bgcolor
|
|||
/* \n can be only at the start of the line.. */
|
||||
if (*str == '\n') {
|
||||
str++;
|
||||
linebuf_add(gui, "\0\x80", 2); /* mark EOL */
|
||||
linebuf_add(gui, "\0\200", 2); /* mark EOL */
|
||||
|
||||
line = create_line(gui, 0);
|
||||
gui_window_newline(gui, visible);
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ static void sig_addchar(const char *data)
|
|||
gui_entry_insert_char(*data);
|
||||
}
|
||||
|
||||
static void sig_window_auto_changed(WINDOW_REC *window)
|
||||
static void sig_window_auto_changed(void)
|
||||
{
|
||||
command_history_next(active_win, gui_entry_get_text());
|
||||
gui_entry_set_text("");
|
||||
|
|
@ -452,12 +452,12 @@ void gui_readline_init(void)
|
|||
key_bind("prev page", "Previous page", "ALT-P", NULL, (SIGNAL_FUNC) sig_prev_page);
|
||||
key_bind("next page", "Next page", "ALT-N", NULL, (SIGNAL_FUNC) sig_next_page);
|
||||
|
||||
key_bind("special char", "Insert special character", "CTRL-B", "\x02", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL--", "\x1f", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-C", "\x03", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-V", "\x16", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-G", "\x07", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-O", "\x0f", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", "Insert special character", "CTRL-B", "\002", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL--", "\037", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-C", "\003", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-V", "\026", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-G", "\007", (SIGNAL_FUNC) sig_addchar);
|
||||
key_bind("special char", NULL, "CTRL-O", "\017", (SIGNAL_FUNC) sig_addchar);
|
||||
|
||||
for (n = 0; changekeys[n] != '\0'; n++) {
|
||||
key = g_strdup_printf("ALT-%c", changekeys[n]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue