--- lbbs/src/editor.c 2025/11/10 11:54:30 1.59 +++ lbbs/src/editor.c 2025/12/18 02:56:00 1.62 @@ -6,6 +6,10 @@ * Copyright (C) 2004-2025 Leaflet */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "bbs.h" #include "common.h" #include "editor.h" @@ -268,10 +272,8 @@ int editor_data_insert(EDITOR_DATA *p_ed { if (p_editor_data->display_line_total >= MAX_EDITOR_DATA_LINES) { -#ifdef _DEBUG - log_error("Split line error, display_line_total(%ld) reach limit(%d)\n", + log_debug("Split line error, display_line_total(%ld) reach limit(%d)\n", p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES); -#endif return -2; } @@ -365,9 +367,7 @@ int editor_data_insert(EDITOR_DATA *p_ed // Insert blank display line after last_display_line if (p_editor_data->display_line_total >= MAX_EDITOR_DATA_LINES) { -#ifdef _DEBUG - log_error("display_line_total over limit %d >= %d\n", p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES); -#endif + log_debug("display_line_total over limit %d >= %d\n", p_editor_data->display_line_total, MAX_EDITOR_DATA_LINES); // Terminate prior display line with \n, to avoid error on cleanup if (display_line + i - 1 >= 0 && p_editor_data->display_line_lengths[display_line + i - 1] > 0) @@ -759,9 +759,7 @@ int editor_display(EDITOR_DATA *p_editor ch = igetch(100); // 0.1 second if (ch == KEY_NULL || ch == KEY_TIMEOUT) // Ignore received bytes if no futher input { -#ifdef _DEBUG - log_error("Ignore %d bytes of incomplete UTF8 character\n", str_len); -#endif + log_debug("Ignore %d bytes of incomplete UTF8 character\n", str_len); str_len = 0; break; } @@ -970,7 +968,7 @@ int editor_display(EDITOR_DATA *p_editor switch (ch) { case KEY_NULL: - log_error("KEY_NULL\n"); + log_debug("KEY_NULL\n"); goto cleanup; case KEY_TIMEOUT: log_error("User input timeout\n");