From 3ada071d44898ac7b3b7d82774525852a64f70cc Mon Sep 17 00:00:00 2001 From: jianf <2198972886@qq.com> Date: Wed, 1 Oct 2025 19:30:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E6=8B=9F=E7=BB=88?= =?UTF-8?q?=E7=AB=AF=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c/tem/ctl.c | 2 ++ c/tem/ctl.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/c/tem/ctl.c b/c/tem/ctl.c index 9afc1cf..5080c25 100644 --- a/c/tem/ctl.c +++ b/c/tem/ctl.c @@ -272,6 +272,8 @@ Ctl *init_tem(log_manager *logmanager) tem->infifo = infifo; tem->index = 0; tem->logmanager = logmanager; + char *his_buf[HISTORY_BUF] = {NULL}; + memcpy(tem->history,his_buf,HISTORY_BUF); for(int i =0;i<6;i++) { tem->history[i] = NULL; diff --git a/c/tem/ctl.h b/c/tem/ctl.h index 12547bf..97d0083 100644 --- a/c/tem/ctl.h +++ b/c/tem/ctl.h @@ -6,7 +6,7 @@ #include "interpreter/interpreter.h" #define MAX_BUF 256 -#define HISTORY_BUF 256 +#define HISTORY_BUF 210 #define PROMPT "chatbot$$ "