diff --git a/programs/cmm/lib/patterns/history.h b/programs/cmm/lib/patterns/history.h index 23691176f1..90c5a3c470 100644 --- a/programs/cmm/lib/patterns/history.h +++ b/programs/cmm/lib/patterns/history.h @@ -3,13 +3,13 @@ struct _History { collection items; int active; - dword add(); - dword back(); - dword forward(); + int add(); + int back(); + int forward(); dword current(); } History; -dword _History::add(dword in) +int _History::add(dword in) { if (!strcmp(in, items.get(active-1))) return 0; items.count = active; @@ -18,18 +18,18 @@ dword _History::add(dword in) return 1; } -dword _History::back() +int _History::back() { if (active==1) return 0; active--; - return items.get(active-1); + return 1; } -dword _History::forward() +int _History::forward() { if (active==items.count) return 0; active++; - return items.get(active-1); + return 1; } dword _History::current() diff --git a/programs/cmm/liza/liza.c b/programs/cmm/liza/liza.c index f47afbafdf..eaaa5b5060 100644 --- a/programs/cmm/liza/liza.c +++ b/programs/cmm/liza/liza.c @@ -12,6 +12,7 @@ #include "../lib/socket.h" #include "../lib/draw_buf.h" #include "../lib/cursor.h" +#include "../lib/collection.h" //*.obj libraries #include "../lib/obj/box_lib.h" #include "../lib/obj/network.h" @@ -19,6 +20,8 @@ #include "../lib/obj/libimg_lib.h" #include "../lib/obj/netcode.h" #include "../lib/obj/iconv.h" +//patternts +#include "..\lib\patterns\history.h" //images byte letter_icons[sizeof(file "img/letter_icons.raw")] = FROM "img/letter_icons.raw"; #include "img/letter_icons.h"