From 0511772ebb7cfe55e576ba2af1f59f249990229e Mon Sep 17 00:00:00 2001 From: Peter Michaux Date: Fri, 29 Jul 2011 21:44:34 -0700 Subject: [PATCH] comments --- Makefile | 2 ++ eval.c | 5 ++--- read.c | 2 +- scm.h | 12 +++++------- util.c | 4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index fdcc16c..00f2c2f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# GNU Makefile + CC = gcc CFLAGS = -std=c89 -pedantic-errors -Wall -Wextra -Werror \ diff --git a/eval.c b/eval.c index 8caf0a6..3e05f23 100644 --- a/eval.c +++ b/eval.c @@ -1,8 +1,7 @@ #include "scm.h" -/* Until we have lists and symbols, just echo. The - * result of this echoing is the repl application - * is a simple pretty printer. +/* Until we have lists and symbols, just echo. The result of + * echoing is the repl application is a pretty printer. */ scm_object scm_eval(scm_object expression) { return expression; diff --git a/read.c b/read.c index 8448784..542b17e 100644 --- a/read.c +++ b/read.c @@ -46,7 +46,7 @@ static scm_object scm_read_number(FILE *in) { * as some other code in this reader will be waiting * 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 * stream we will not know if an error has occured. */ diff --git a/scm.h b/scm.h index 56ca5bd..d0924fe 100644 --- a/scm.h +++ b/scm.h @@ -10,20 +10,18 @@ void scm_fatal(char *fmt, ...); /************************ model.c *************************/ -/* Assume scm_int is large enough to hold any - * scm_object fixnum. +/* scm_int must be large enough to hold any Scheme fixnum. */ typedef long scm_int; -/* A scm_object can be any of Scheme's many types: - * the empty list, boolean, number, symbol, - * pair, vector, string, port, etc. For now we only have - * fixnums which will fit in a long. +/* A scm_object can be any of Scheme's many types: boolean, + * the empty list, number, symbol, pair, vector, etc. + * For now we only have fixnums which will fit in a long. */ typedef long scm_object; /* 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_value(object) ((scm_int)(object)) diff --git a/util.c b/util.c index 41d4967..deb1fa1 100644 --- a/util.c +++ b/util.c @@ -6,9 +6,9 @@ /* scm_fatal is borrowed from K&R2e page 174 where it is * 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 - * even if there is an error printing. + * even if a printing error occurs. */ void scm_fatal(char *fmt, ...) { va_list args;