-/* Consume an SCSH-style block comment. Assume that we've already
- read the initial `#!', and eat characters until we get a
- newline/exclamation-point/sharp-sign/newline sequence.
-
- A carriage return is also reocgnized as a newline. */
-
-static void
-skip_scsh_block_comment (SCM port)
-#define FUNC_NAME "skip_scsh_block_comment"
-{
- int state = 0;
-
- for (;;)
- {
- int c = scm_getc (port);
-
- if (c == EOF)
- SCM_MISC_ERROR ("unterminated `#! ... !#' comment", SCM_EOL);
-
- if (state == 1 && c == '!')
- state = 2;
- else if (state == 2 && c == '#')
- state = 3;
- else if (state == 3 && (c == '\n' || c == '\r'))
- return;
- else if (c == '\n' || c == '\r')
- state = 1;
- else
- state = 0;
- }
-}
-#undef FUNC_NAME
-