summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Cerqueira <dan.git@lispclub.com>2026-08-17 13:59:45 +0100
committerDaniel Cerqueira <dan.git@lispclub.com>2026-08-17 13:59:45 +0100
commit916dc69cb429beabc8fe5ff1857d70e423420044 (patch)
tree283a3056a92ae752e5cab7f63bb3dc91313c0784
parented7dfeecb709723aa90259d67c3db49623f065a5 (diff)
remove (some) unnecessary commented code
-rw-r--r--liblali.c44
1 files changed, 0 insertions, 44 deletions
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, "#<Primitive %s>", 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 },