Skip to content

Commit ff65094

Browse files
committed
Delete repl.h
1 parent c84076a commit ff65094

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

examples/hanoi.lisp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
(defun list (x . y) (cons x y))
22

3-
(defun mapc1 (fn xs)
4-
(if (= () xs)
5-
()
6-
(progn
7-
(fn (car xs))
8-
(mapc1 fn (cdr xs)))))
9-
103
(defun hanoi-print (disk from to)
114
(println (string-concat "Move disk " disk
125
" from " (symbol->string from)

src/minilisp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <string.h>
1212
#include "minilisp.h"
1313
#include "gc.h"
14-
#include "repl.h"
1514

1615
jmp_buf context;
1716

@@ -412,6 +411,7 @@ static Obj *apply(void *root, Obj **env, Obj **fn, Obj **args) {
412411
return apply_func(root, env, fn, eargs);
413412
}
414413
error("not supported");
414+
return Nil; //fix warning
415415
}
416416

417417
// Searches for a variable by symbol. Returns null if not found.
@@ -492,6 +492,7 @@ static Obj *eval(void *root, Obj **env, Obj **obj) {
492492
default:
493493
error("Bug: eval: Unknown tag type: %d", (*obj)->type);
494494
}
495+
return Nil; // fix warning
495496
}
496497

497498
//======================================================================

src/minilisp.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ typedef struct Obj {
7676
};
7777
} Obj;
7878

79+
typedef struct {
80+
char *filename;
81+
size_t file_len;
82+
int line_num;
83+
} filepos_t;
7984

8085
void init_minilisp(Obj **env);
8186
int eval_input(char *input, Obj **env, Obj **expr);

src/repl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include "../bestline/bestline.h"
88
#include "ketopt.h"
99
#include "gc.h"
10-
#include "repl.h"
1110
#include "minilisp.h"
1211

1312
int ends_with(const char *str, const char *suffix)

0 commit comments

Comments
 (0)