From 916dc69cb429beabc8fe5ff1857d70e423420044 Mon Sep 17 00:00:00 2001 From: Daniel Cerqueira Date: Mon, 17 Aug 2026 13:59:45 +0100 Subject: remove (some) unnecessary commented code --- liblali.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'liblali.c') diff --git a/liblali.c b/liblali.c index a816ad8..2b44150 100644 --- a/liblali.c +++ b/liblali.c @@ -595,43 +595,6 @@ Object *readNumberOrSymbol(Stream *stream, GC_PARAM) { stream->offset - offset, GC_ROOTS); } -/* Object *readNumberOrSymbol(Stream *stream, GC_PARAM) { */ -/* size_t offset = stream->offset; */ -/* int ch = streamPeek(stream); */ - -/* // skip optional leading sign */ -/* /\* if (ch == '+' || ch == '-') { *\/ */ -/* /\* streamGetc(stream); *\/ */ -/* /\* ch = streamPeek(stream); *\/ */ -/* /\* } *\/ */ - -/* if (ch == '+' || ch == '-') { */ -/* streamGetc(stream); */ -/* ch = streamPeek(stream); */ - -/* // try to read a number in integer or decimal format */ -/* if (ch == '.' || isdigit(ch)) { */ -/* if (isdigit(ch)) */ -/* ch = readWhile(stream, isdigit); */ -/* if (!isSymbolChar(ch)) */ -/* return newNumber(strtol(stream->buffer + offset, NULL, 10), GC_ROOTS); */ -/* if (ch == '.') { */ -/* ch = streamGetc(stream); */ -/* if (isdigit(streamPeek(stream))) { */ -/* ch = readWhile(stream, isdigit); */ -/* if (!isSymbolChar(ch)) */ -/* return newNumber(strtod(stream->buffer + offset, NULL), GC_ROOTS); */ -/* } */ -/* } */ -/* } */ -/* } */ - -/* // non-numeric character encountered, read a symbol */ -/* readWhile(stream, isSymbolChar); */ -/* return newSymbolWithLength(stream->buffer + offset, */ -/* stream->offset - offset, GC_ROOTS); */ -/* } */ - Object *reverseList(Object *list) { Object *object = nil; @@ -729,7 +692,6 @@ void writeObject(Object *object, bool readably, FILE *file) { fprintf(file, __VA_ARGS__); \ break CASE(TYPE_NUMBER, "%s", object->string); - /* CASE(TYPE_NUMBER, (object->number < 0) ? "%g" : "+%g", object->number); */ CASE(TYPE_SYMBOL, "%s", object->string); CASE(TYPE_PRIMITIVE, "#", object->name); #undef CASE @@ -1084,9 +1046,7 @@ DEFINE_PRIMITIVE_ARITHMETIC(primitiveRemainder, %, "+1", atoi, int, "%d", " /* DEFINE_PRIMITIVE_RELATIONAL(primitiveDifferent, !=, false) */ /* DEFINE_PRIMITIVE_RELATIONAL(primitiveEqual, ==, true) */ -/* DEFINE_PRIMITIVE_RELATIONAL(primitiveLess, <, true) */ DEFINE_PRIMITIVE_RELATIONAL(primitiveLessEqual, <=, true) -/* DEFINE_PRIMITIVE_RELATIONAL(primitiveGreater, >, true) */ DEFINE_PRIMITIVE_RELATIONAL(primitiveGreaterEqual, >=, true) Object *say(Object *object, GC_PARAM) { @@ -1329,11 +1289,7 @@ Primitive primitives[] = { { "*", 0, -1, primitiveMultiply }, { "/", 1, -1, primitiveDivide }, { "%", 1, -1, primitiveRemainder }, - /* { "=", 1, -1, primitiveEqual }, */ - /* { "!", 1, -1, primitiveDifferent }, */ - /* { "<", 1, -1, primitiveLess }, */ { "<=", 1, -1, primitiveLessEqual }, - /* { ">", 1, -1, primitiveGreater }, */ { ">=", 1, -1, primitiveGreaterEqual }, { "join", 1, 1, primitiveJoin }, { "split", 1, 1, primitiveSplit }, -- cgit