Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
petermichaux committed Jul 30, 2011
1 parent 03dad61 commit 0511772
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Makefile
@@ -1,3 +1,5 @@
# GNU Makefile

CC = gcc CC = gcc


CFLAGS = -std=c89 -pedantic-errors -Wall -Wextra -Werror \ CFLAGS = -std=c89 -pedantic-errors -Wall -Wextra -Werror \
Expand Down
5 changes: 2 additions & 3 deletions eval.c
@@ -1,8 +1,7 @@
#include "scm.h" #include "scm.h"


/* Until we have lists and symbols, just echo. The /* Until we have lists and symbols, just echo. The result of
* result of this echoing is the repl application * echoing is the repl application is a pretty printer.
* is a simple pretty printer.
*/ */
scm_object scm_eval(scm_object expression) { scm_object scm_eval(scm_object expression) {
return expression; return expression;
Expand Down
2 changes: 1 addition & 1 deletion read.c
Expand Up @@ -46,7 +46,7 @@ static scm_object scm_read_number(FILE *in) {
* as some other code in this reader will be waiting * as some other code in this reader will be waiting
* for that character to indicate the end of a list. * for that character to indicate the end of a list.
* *
* Check for EOF in case scm_is_delimiter allows it * Check for EOF in case scm_is_delimiter allows it
* as a delimiter. If trying to push EOF back on the * as a delimiter. If trying to push EOF back on the
* stream we will not know if an error has occured. * stream we will not know if an error has occured.
*/ */
Expand Down
12 changes: 5 additions & 7 deletions scm.h
Expand Up @@ -10,20 +10,18 @@ void scm_fatal(char *fmt, ...);


/************************ model.c *************************/ /************************ model.c *************************/


/* Assume scm_int is large enough to hold any /* scm_int must be large enough to hold any Scheme fixnum.
* scm_object fixnum.
*/ */
typedef long scm_int; typedef long scm_int;


/* A scm_object can be any of Scheme's many types: /* A scm_object can be any of Scheme's many types: boolean,
* the empty list, boolean, number, symbol, * the empty list, number, symbol, pair, vector, etc.
* pair, vector, string, port, etc. For now we only have * For now we only have fixnums which will fit in a long.
* fixnums which will fit in a long.
*/ */
typedef long scm_object; typedef long scm_object;


/* Trival conversions to and from fixnum since they are /* Trival conversions to and from fixnum since they are
* currently the only type now. * the only type for now.
*/ */
#define scm_fixnum_make(val) ((scm_object)(val)) #define scm_fixnum_make(val) ((scm_object)(val))
#define scm_fixnum_value(object) ((scm_int)(object)) #define scm_fixnum_value(object) ((scm_int)(object))
Expand Down
4 changes: 2 additions & 2 deletions util.c
Expand Up @@ -6,9 +6,9 @@
/* scm_fatal is borrowed from K&R2e page 174 where it is /* scm_fatal is borrowed from K&R2e page 174 where it is
* called "error". * called "error".
* *
* Purposely ignoring return values of fprintf and * Purposely ignoring the return values of fprintf and
* vfprintf because we want to continue to the exit * vfprintf because we want to continue to the exit
* even if there is an error printing. * even if a printing error occurs.
*/ */
void scm_fatal(char *fmt, ...) { void scm_fatal(char *fmt, ...) {
va_list args; va_list args;
Expand Down

0 comments on commit 0511772

Please sign in to comment.