This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: [PATCH] scsh block comment fix + small speedup
- To: Chris Cramer <crayc at kiwi dot pyro dot net>
- Subject: Re: [PATCH] scsh block comment fix + small speedup
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 04 May 2000 00:21:15 +0200
- Cc: guile at sourceware dot cygnus dot com
- References: <20000430202602.A27506@kiwi.pyrotechnics.com>
Chris Cramer <crayc@kiwi.pyro.net> writes:
> OK, I looked up the scsh manual, it says block comments start with
> #! and end with !# on a line by itself.
I'm not sure whether we should recommend block comments in general. I
find the normal ;; comments to be quite workable with Emacs support.
However, when we have them we should implement them properly, of
course.
> This patch fixes the block comment parsing.
Thanks, I'll look into it. On the first read, I don't like your use
of macros. Do you think it is possible to rewrite your patch to use
inline functions instead? Then, why did you do this change to
scm_getc:
--- old/guile-1.3.4/libguile/ports.c Mon Sep 20 16:34:57 1999
+++ guile-1.3.4/libguile/ports.c Sat Apr 29 19:43:25 2000
@@ -703,14 +703,9 @@
int c;
scm_port *pt = SCM_PTAB_ENTRY (port);
- if (pt->rw_active == SCM_PORT_WRITE)
- {
- /* may be marginally faster than calling scm_flush. */
- scm_ptobs[SCM_PTOBNUM (port)].flush (port);
- }
+ if (pt->rw_active == SCM_PORT_WRITE) scm_flush(port);
That is, why did you replace the `marginally faster' thing with a call
to scm_flush?
Last point: I think it is sensible to restrict SCM_LINE_INCREMENTORS
to be a single character. However, we should probably rename the
macro to SCM_LINE_INCREMENTER and then use it like so
while ((bp = memchr(bp, SCM_LINE_INCREMENTER, be - bp)) == NULL)
Do you think you can update your patch based on these comments?