From 396f192799df6707b2709a8178992bd98bf3acea Mon Sep 17 00:00:00 2001 From: pavelyakov Date: Thu, 27 Dec 2018 11:27:01 +0000 Subject: [PATCH] Lisp v1.4 new version git-svn-id: svn://kolibrios.org@7567 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/lisp/lisp.c | 8 ++++---- programs/cmm/lisp/stdcall.h | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/programs/cmm/lisp/lisp.c b/programs/cmm/lisp/lisp.c index 344cb75b6a..de0842523a 100644 --- a/programs/cmm/lisp/lisp.c +++ b/programs/cmm/lisp/lisp.c @@ -55,7 +55,7 @@ dword evalLisp() { s = DSBYTE[code]; - while(s == ' ') + while (s == ' ') || (s == 9) { code++; s = DSBYTE[code]; @@ -184,13 +184,13 @@ void main() else { consoleInit(); - con_printf stdcall ("Lisp interpreter v1.3"); + con_printf stdcall ("Lisp interpreter v1.4\r\n"); while(maxLoop) { - con_printf stdcall ("\r\n\r\nEnter code: "); + con_printf stdcall ("\r\n$ "); con_gets stdcall(buffer, bufferSize); code = EAX; - code = txt; + //code = txt; con_printf stdcall ("Output: "); evalLisp(); maxLoop--; diff --git a/programs/cmm/lisp/stdcall.h b/programs/cmm/lisp/stdcall.h index d424aa3ff7..d48d4473e1 100644 --- a/programs/cmm/lisp/stdcall.h +++ b/programs/cmm/lisp/stdcall.h @@ -1,5 +1,11 @@ /* Lisp functions */ +:dword std_exit() +{ + con_exit stdcall (1); + ExitProcess(); +} + :dword std_set(dword count, args) { dword name = 0; @@ -103,7 +109,7 @@ void Init() functions.set("str", #std_str); /* System functions */ - functions.set("exit", #ExitProcess); + functions.set("exit", #std_exit); /* Math functions */ functions.set("+", #std_add);