[uim-commit] r2614 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Dec 16 14:30:38 PST 2005
Author: yamaken
Date: 2005-12-16 14:30:34 -0800 (Fri, 16 Dec 2005)
New Revision: 2614
Modified:
branches/r5rs/sigscheme/encoding.c
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/eval.c
branches/r5rs/sigscheme/io.c
branches/r5rs/sigscheme/main.c
branches/r5rs/sigscheme/operations-nonstd.c
branches/r5rs/sigscheme/operations-srfi1.c
branches/r5rs/sigscheme/operations-srfi34.c
branches/r5rs/sigscheme/operations-srfi6.c
branches/r5rs/sigscheme/operations.c
branches/r5rs/sigscheme/print.c
branches/r5rs/sigscheme/read.c
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/storage-continuation.c
branches/r5rs/sigscheme/storage-gc.c
branches/r5rs/sigscheme/storage-symbol.c
branches/r5rs/sigscheme/storage.c
branches/r5rs/sigscheme/test-compact.c
Log:
* sigscheme/read.c
* sigscheme/encoding.c
* sigscheme/error.c
* sigscheme/operations-srfi34.c
* sigscheme/storage.c
* sigscheme/operations-srfi6.c
* sigscheme/io.c
* sigscheme/storage-continuation.c
* sigscheme/operations.c
* sigscheme/operations-nonstd.c
* sigscheme/storage-gc.c
* sigscheme/test-compact.c
* sigscheme/operations-srfi1.c
* sigscheme/sigscheme.c
* sigscheme/storage-symbol.c
* sigscheme/main.c
* sigscheme/eval.c
* sigscheme/print.c
- Insert newline after all return type of static function
definitions, and trim argument list by hand
perl -i -pe '$/ = undef; s/^(static\s.+[^\s])\s*\b(\w+)(\([^{;]+\))\s*\n\s*\{/\1\n\2\3\n{/mg' sigscheme/*.c
Modified: branches/r5rs/sigscheme/encoding.c
===================================================================
--- branches/r5rs/sigscheme/encoding.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/encoding.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -345,7 +345,8 @@
#define SS3 0x8F
#if SCM_USE_EUCJP
-static const char *eucjp_encoding(void)
+static const char *
+eucjp_encoding(void)
{
return "EUC-JP";
}
@@ -359,7 +360,8 @@
* GR <- G1 (JIS X 0208)
* CL <- JIS X 0211 C0
* CR <- JIS X 0211 C1 */
-static ScmMultibyteCharInfo eucjp_scan_char(ScmMultibyteString mbs)
+static ScmMultibyteCharInfo
+eucjp_scan_char(ScmMultibyteString mbs)
{
const char *str = SCM_MBS_GET_STR(mbs);
const int size = SCM_MBS_GET_SIZE(mbs);
@@ -397,7 +399,8 @@
RETURN_ERROR();
}
-static int eucjp_str2int(const uchar *src, size_t len, ScmMultibyteState state)
+static int
+eucjp_str2int(const uchar *src, size_t len, ScmMultibyteState state)
{
int ch;
@@ -427,7 +430,8 @@
/* TODO: migrate to a canonical form shared with ISO-2022 variants that contain
absolute character set identifier instead of raw encoding-dependent
shifts */
-static uchar *eucjp_int2str(uchar *dst, int ch, ScmMultibyteState state)
+static uchar *
+eucjp_int2str(uchar *dst, int ch, ScmMultibyteState state)
{
#if SCM_STRICT_ENCODING_CHECK
uchar seq[3];
@@ -467,7 +471,8 @@
#if (SCM_USE_EUCCN || SCM_USE_EUCKR || SCM_USE_SJIS)
/* generic double-byte char */
-static int dbc_str2int(const uchar *src, size_t len, ScmMultibyteState state)
+static int
+dbc_str2int(const uchar *src, size_t len, ScmMultibyteState state)
{
int ch;
@@ -490,7 +495,8 @@
#endif /* (SCM_USE_EUCCN || SCM_USE_EUCKR || SCM_USE_SJIS) */
#if (SCM_USE_EUCCN || SCM_USE_EUCKR)
-static uchar *euc_int2str(uchar *dst, int ch, ScmMultibyteState state)
+static uchar *
+euc_int2str(uchar *dst, int ch, ScmMultibyteState state)
{
#if SCM_STRICT_ENCODING_CHECK
uchar seq[2];
@@ -517,7 +523,8 @@
#endif /* (SCM_USE_EUCCN || SCM_USE_EUCKR) */
#if SCM_USE_EUCCN
-static const char *euccn_encoding(void)
+static const char *
+euccn_encoding(void)
{
return "EUC-CN";
}
@@ -529,7 +536,8 @@
*
* GL <- G0 (ASCII)
* GR <- G1 (GB2312) */
-static ScmMultibyteCharInfo euccn_scan_char(ScmMultibyteString mbs)
+static ScmMultibyteCharInfo
+euccn_scan_char(ScmMultibyteString mbs)
{
/* TODO: maybe we can make this an alias of eucjp_scan_char()? */
const char *str = SCM_MBS_GET_STR(mbs);
@@ -555,7 +563,8 @@
#endif
#if SCM_USE_EUCKR
-static const char *euckr_encoding(void)
+static const char *
+euckr_encoding(void)
{
return "EUC-KR";
}
@@ -569,7 +578,8 @@
*
* GL <- G0
* GR <- G1 */
-static ScmMultibyteCharInfo euckr_scan_char(ScmMultibyteString mbs)
+static ScmMultibyteCharInfo
+euckr_scan_char(ScmMultibyteString mbs)
{
const char *str = SCM_MBS_GET_STR(mbs);
const int size = SCM_MBS_GET_SIZE(mbs);
@@ -612,12 +622,14 @@
#define LEADING_VAL(u, n) ((u) >> TRAILING_VAL_BITS * ((n) - 1))
#define TRAILING_VAL(u, i) (~MASK(1) & ((u) >> TRAILING_VAL_BITS * (i)))
-static const char *utf8_encoding(void)
+static const char *
+utf8_encoding(void)
{
return "UTF-8";
}
-static ScmMultibyteCharInfo utf8_scan_char(ScmMultibyteString mbs)
+static ScmMultibyteCharInfo
+utf8_scan_char(ScmMultibyteString mbs)
{
const char *str = SCM_MBS_GET_STR(mbs);
const int size = SCM_MBS_GET_SIZE(mbs);
@@ -653,7 +665,8 @@
}
-static int utf8_str2int(const uchar *src, size_t len, ScmMultibyteState state)
+static int
+utf8_str2int(const uchar *src, size_t len, ScmMultibyteState state)
{
int ch;
@@ -687,7 +700,8 @@
return ch;
}
-static uchar *utf8_int2str(uchar *dst, int ch, ScmMultibyteState state)
+static uchar *
+utf8_int2str(uchar *dst, int ch, ScmMultibyteState state)
{
if (IS_ASCII(ch)) {
*dst++ = ch;
@@ -748,12 +762,14 @@
&& (uchar)(c) != 0xA0)
#define IS_TRAIL(c) (0x40 <= (uchar)(c) && (uchar)(c) <= 0xFC && (c) != 0x7E)
-static const char *sjis_encoding(void)
+static const char *
+sjis_encoding(void)
{
return "SHIFT_JIS";
}
-static ScmMultibyteCharInfo sjis_scan_char(ScmMultibyteString mbs)
+static ScmMultibyteCharInfo
+sjis_scan_char(ScmMultibyteString mbs)
{
const char *str = SCM_MBS_GET_STR(mbs);
const int size = SCM_MBS_GET_SIZE(mbs);
@@ -773,7 +789,8 @@
RETURN(1);
}
-static uchar *sjis_int2str(uchar *dst, int ch)
+static uchar *
+sjis_int2str(uchar *dst, int ch)
{
uchar high, low;
@@ -809,13 +826,15 @@
* ISO-8859-*
* VISCII
*/
-static const char *unibyte_encoding(void)
+static const char *
+unibyte_encoding(void)
{
/* conventional assumption */
return "ISO-8859-1";
}
-static ScmMultibyteCharInfo unibyte_scan_char(ScmMultibyteString mbs)
+static ScmMultibyteCharInfo
+unibyte_scan_char(ScmMultibyteString mbs)
{
ENTER;
if (SCM_MBS_GET_SIZE(mbs))
@@ -823,8 +842,8 @@
RETURN(0);
}
-static int unibyte_str2int(const uchar *src, size_t len,
- ScmMultibyteState state)
+static int
+unibyte_str2int(const uchar *src, size_t len, ScmMultibyteState state)
{
#if SCM_STRICT_ENCODING_CHECK
if (len != 1)
@@ -833,7 +852,8 @@
return src[0];
}
-static uchar *unibyte_int2str(uchar *dst, int ch, ScmMultibyteState state)
+static uchar *
+unibyte_int2str(uchar *dst, int ch, ScmMultibyteState state)
{
#if SCM_STRICT_ENCODING_CHECK
if (ch & ~BYTE_MASK)
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/error.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -151,7 +151,8 @@
}
#if SCM_USE_SRFI34
-static int srfi34_providedp(void)
+static int
+srfi34_providedp(void)
{
if (!srfi34_is_provided) {
/* expensive */
@@ -345,7 +346,8 @@
}
#if (SCM_DEBUG && SCM_DEBUG_BACKTRACE_VAL)
-static void show_arg(ScmObj arg, ScmObj env)
+static void
+show_arg(ScmObj arg, ScmObj env)
{
#define UNBOUNDP(var, env) \
(scm_lookup_environment(var, env) == SCM_INVALID_REF \
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/eval.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -186,7 +186,8 @@
}
/** Lookup a variable of a frame */
-static ScmRef lookup_frame(ScmObj var, ScmObj frame)
+static ScmRef
+lookup_frame(ScmObj var, ScmObj frame)
{
ScmObj vars;
ScmRef vals;
@@ -252,7 +253,8 @@
}
/* ARGS should NOT have been evaluated yet. */
-static ScmObj reduce(ScmObj (*func)(), ScmObj args, ScmObj env, int suppress_eval)
+static ScmObj
+reduce(ScmObj (*func)(), ScmObj args, ScmObj env, int suppress_eval)
{
ScmObj left;
ScmObj right;
@@ -288,7 +290,8 @@
}
/* ARGS should already be evaluated. */
-static ScmObj call_closure(ScmObj proc, ScmObj args, ScmEvalState *eval_state)
+static ScmObj
+call_closure(ScmObj proc, ScmObj args, ScmEvalState *eval_state)
{
ScmObj formals;
DECLARE_INTERNAL_FUNCTION("call_closure");
@@ -347,8 +350,8 @@
* @param suppress_eval PROC and ARGS are assumed to have already gone
* through all necessary evaluations if this flag is nonzero.
*/
-static ScmObj call(ScmObj proc, ScmObj args,
- ScmEvalState *eval_state, int suppress_eval)
+static ScmObj
+call(ScmObj proc, ScmObj args, ScmEvalState *eval_state, int suppress_eval)
{
ScmObj env = eval_state->env;
ScmObj (*func)() = NULL;
@@ -563,7 +566,8 @@
return val;
}
-static ScmObj map_eval(ScmObj args, ScmObj env)
+static ScmObj
+map_eval(ScmObj args, ScmObj env)
{
ScmQueue q;
ScmObj res, elm;
@@ -737,7 +741,8 @@
*
* @see list_translator, tr_msg
*/
-static ScmObj listran(sequence_translator *t, tr_msg msg, ScmObj obj)
+static ScmObj
+listran(sequence_translator *t, tr_msg msg, ScmObj obj)
{
DECLARE_INTERNAL_FUNCTION("(list translator)");
switch (msg) {
@@ -783,7 +788,8 @@
return SCM_INVALID;
}
-static ScmObj vectran(sequence_translator *t, tr_msg msg, ScmObj obj)
+static ScmObj
+vectran(sequence_translator *t, tr_msg msg, ScmObj obj)
{
int splice_len;
int change_index;
@@ -1464,7 +1470,8 @@
*
* @see qquote_vector()
*/
-static qquote_result qquote_internal(ScmObj input, ScmObj env, int nest)
+static qquote_result
+qquote_internal(ScmObj input, ScmObj env, int nest)
{
ScmObj obj;
sequence_translator tr;
@@ -1586,7 +1593,8 @@
/*=======================================
R5RS : 5.2 Definitions
=======================================*/
-static void define_internal(ScmObj var, ScmObj exp, ScmObj env)
+static void
+define_internal(ScmObj var, ScmObj exp, ScmObj env)
{
if (NULLP(env)) {
/* given top-level environment */
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/io.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -509,7 +509,7 @@
return succeeded;
}
-static ScmObj
+static ScmObj
scm_load_internal(const char *c_filename)
{
ScmObj path, port, sexp;
@@ -544,7 +544,8 @@
}
/* FIXME: reject relative paths to ensure security */
-static char *find_path(const char *filename)
+static char *
+find_path(const char *filename)
{
char *path;
int lib_path_len, filename_len, path_len;
@@ -571,7 +572,8 @@
return NULL;
}
-static int file_existsp(const char *c_filepath)
+static int
+file_existsp(const char *c_filepath)
{
FILE *f;
@@ -597,7 +599,8 @@
}
#if SCM_USE_SRFI22
-static void interpret_script_prelude(ScmObj port)
+static void
+interpret_script_prelude(ScmObj port)
{
char **argv;
@@ -612,7 +615,8 @@
scm_free_argv(argv);
}
-static char **parse_script_prelude(ScmObj port)
+static char **
+parse_script_prelude(ScmObj port)
{
int argc, c, len;
char **argv, *arg, *p, line[SCRIPT_PRELUDE_MAXLEN];
Modified: branches/r5rs/sigscheme/main.c
===================================================================
--- branches/r5rs/sigscheme/main.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/main.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -72,7 +72,8 @@
/*=======================================
Function Implementations
=======================================*/
-static void repl(void)
+static void
+repl(void)
{
#if !SCM_GCC4_READY_GC
ScmObj stack_start = NULL;
@@ -89,7 +90,8 @@
#endif
}
-static void repl_loop(void)
+static void
+repl_loop(void)
{
ScmObj sexp, result;
#if SCM_USE_SRFI34
@@ -150,7 +152,8 @@
}
}
-static int show_promptp(void)
+static int
+show_promptp(void)
{
#if SCM_COMPAT_SIOD
return (FALSEP(scm_p_providedp(feature_id_siod))
Modified: branches/r5rs/sigscheme/operations-nonstd.c
===================================================================
--- branches/r5rs/sigscheme/operations-nonstd.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/operations-nonstd.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -132,7 +132,8 @@
#endif
}
-static ScmObj create_loaded_str(ScmObj filename)
+static ScmObj
+create_loaded_str(ScmObj filename)
{
char *loaded_str = NULL;
int size = 0;
Modified: branches/r5rs/sigscheme/operations-srfi1.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi1.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/operations-srfi1.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -341,7 +341,8 @@
return SCM_TRUE;
}
-static ScmObj compare_list(ScmObj eqproc, ScmObj lst1, ScmObj lst2)
+static ScmObj
+compare_list(ScmObj eqproc, ScmObj lst1, ScmObj lst2)
{
#define CHECK_LIST_EQUALITY_WITH_EQPROC(eqproc, obj1, obj2) \
(scm_call(eqproc, \
Modified: branches/r5rs/sigscheme/operations-srfi34.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi34.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/operations-srfi34.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -194,7 +194,8 @@
current_exception_handlers = LIST_1(proc_fallback_handler);
}
-static ScmObj set_cur_handlers(ScmObj handlers, ScmObj env)
+static ScmObj
+set_cur_handlers(ScmObj handlers, ScmObj env)
{
DECLARE_PRIVATE_FUNCTION("with_exception_handlers", SyntaxFixed1);
@@ -202,7 +203,8 @@
return SCM_UNDEF;
}
-static ScmObj with_exception_handlers(ScmObj new_handlers, ScmObj thunk)
+static ScmObj
+with_exception_handlers(ScmObj new_handlers, ScmObj thunk)
{
ScmObj prev_handlers, before, after;
DECLARE_PRIVATE_FUNCTION("with_exception_handlers", ProcedureFixed2);
@@ -286,7 +288,8 @@
return scm_call(ret, SCM_NULL);
}
-static ScmObj guard_internal(ScmObj q_guard_k, ScmObj env)
+static ScmObj
+guard_internal(ScmObj q_guard_k, ScmObj env)
{
ScmObj handler, body;
DECLARE_PRIVATE_FUNCTION("guard", SyntaxFixed1);
@@ -301,7 +304,8 @@
return scm_p_srfi34_with_exception_handler(handler, body);
}
-static ScmObj guard_handler(ScmObj q_condition, ScmEvalState *eval_state)
+static ScmObj
+guard_handler(ScmObj q_condition, ScmEvalState *eval_state)
{
ScmObj handler_body, ret;
DECLARE_PRIVATE_FUNCTION("guard", SyntaxFixedTailRec1);
@@ -319,7 +323,8 @@
}
/* assumes that scm_s_delay() returns a closure */
-static ScmObj delay(ScmObj evaled_obj, ScmObj env)
+static ScmObj
+delay(ScmObj evaled_obj, ScmObj env)
{
ScmObj vals;
@@ -334,7 +339,8 @@
}
/* assumes that scm_s_delay() returns a closure */
-static ScmObj guard_handler_body(ScmObj q_handler_k, ScmObj env)
+static ScmObj
+guard_handler_body(ScmObj q_handler_k, ScmObj env)
{
ScmEvalState eval_state;
ScmObj lex_env, cond_env, condition, cond_catch, guard_k, handler_k;
@@ -371,7 +377,8 @@
return SCM_UNDEF;
}
-static ScmObj guard_body(ScmEvalState *eval_state)
+static ScmObj
+guard_body(ScmEvalState *eval_state)
{
ScmEvalState lex_eval_state;
ScmObj lex_env, guard_k, body, result;
Modified: branches/r5rs/sigscheme/operations-srfi6.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi6.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/operations-srfi6.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -75,7 +75,8 @@
REGISTER_FUNC_TABLE(srfi6_func_info_table);
}
-static void istrport_finalize(char **str, int ownership, void **opaque)
+static void
+istrport_finalize(char **str, int ownership, void **opaque)
{
scm_gc_unprotect((ScmObj *)opaque);
}
Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/operations.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -844,7 +844,7 @@
return ret_lst;
}
-static ScmObj
+static ScmObj
scm_p_listtail_internal(ScmObj lst, int k)
{
while (k--) {
@@ -1720,7 +1720,8 @@
return map_multiple_args(proc, args);
}
-static ScmObj map_single_arg(ScmObj proc, ScmObj lst)
+static ScmObj
+map_single_arg(ScmObj proc, ScmObj lst)
{
ScmQueue q;
ScmObj elm, res;
@@ -1736,7 +1737,8 @@
return res;
}
-static ScmObj map_multiple_args(ScmObj proc, ScmObj args)
+static ScmObj
+map_multiple_args(ScmObj proc, ScmObj args)
{
ScmQueue resq, argq;
ScmObj res, map_args, rest_args, arg;
Modified: branches/r5rs/sigscheme/print.c
===================================================================
--- branches/r5rs/sigscheme/print.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/print.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -166,7 +166,8 @@
#endif /* SCM_VOLATILE_OUTPUT */
}
-static void print_obj(ScmObj port, ScmObj obj, enum OutputType otype)
+static void
+print_obj(ScmObj port, ScmObj obj, enum OutputType otype)
{
ScmObj sym;
@@ -255,7 +256,8 @@
}
}
-static void print_char(ScmObj port, ScmObj obj, enum OutputType otype)
+static void
+print_char(ScmObj port, ScmObj obj, enum OutputType otype)
{
const ScmSpecialCharInfo *info;
int c;
@@ -289,7 +291,8 @@
}
/* FIXME: support multibyte char properly */
-static void print_string(ScmObj port, ScmObj obj, enum OutputType otype)
+static void
+print_string(ScmObj port, ScmObj obj, enum OutputType otype)
{
const ScmSpecialCharInfo *info;
const char *str;
@@ -325,7 +328,8 @@
}
}
-static void print_list(ScmObj port, ScmObj lst, enum OutputType otype)
+static void
+print_list(ScmObj port, ScmObj lst, enum OutputType otype)
{
ScmObj car;
#if SCM_USE_SRFI38
@@ -383,7 +387,8 @@
SCM_PORT_PUT_CHAR(port, ')');
}
-static void print_vector(ScmObj port, ScmObj vec, enum OutputType otype)
+static void
+print_vector(ScmObj port, ScmObj vec, enum OutputType otype)
{
ScmObj *v;
int len, i;
@@ -401,7 +406,8 @@
SCM_PORT_PUT_CHAR(port, ')');
}
-static void print_port(ScmObj port, ScmObj obj, enum OutputType otype)
+static void
+print_port(ScmObj port, ScmObj obj, enum OutputType otype)
{
char *info;
@@ -427,7 +433,8 @@
SCM_PORT_PUT_CHAR(port, '>');
}
-static void print_constant(ScmObj port, ScmObj obj, enum OutputType otype)
+static void
+print_constant(ScmObj port, ScmObj obj, enum OutputType otype)
{
const char *str;
@@ -451,7 +458,8 @@
SCM_PORT_PUTS(port, str);
}
-static void print_errobj(ScmObj port, ScmObj obj, enum OutputType otype)
+static void
+print_errobj(ScmObj port, ScmObj obj, enum OutputType otype)
{
ScmObj err_obj_tag, reason, objs, trace_stack;
DECLARE_INTERNAL_FUNCTION("print_errobj");
@@ -489,7 +497,8 @@
}
#if SCM_USE_SRFI38
-static void hash_grow(hash_table *tab)
+static void
+hash_grow(hash_table *tab)
{
size_t old_size, new_size, i;
hash_entry *old_ents;
@@ -511,7 +520,8 @@
/**
* @return A pointer to the entry, or NULL if not found.
*/
-static hash_entry *hash_lookup(hash_table *tab, ScmObj key, int datum, int flag)
+static hash_entry *
+hash_lookup(hash_table *tab, ScmObj key, int datum, int flag)
{
size_t i;
unsigned hashval;
@@ -561,7 +571,8 @@
* @param obj The object in question, or a part of it.
* @param ctx Where to put the scan results.
*/
-static void write_ss_scan(ScmObj obj, write_ss_context *ctx)
+static void
+write_ss_scan(ScmObj obj, write_ss_context *ctx)
{
int i;
hash_entry *ent;
@@ -618,7 +629,8 @@
* *additive inverse* of the index. If obj is nondefining,
* return zero.
*/
-static int get_shared_index(ScmObj obj)
+static int
+get_shared_index(ScmObj obj)
{
hash_entry *ent;
Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/read.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -166,7 +166,8 @@
}
-static int skip_comment_and_space(ScmObj port)
+static int
+skip_comment_and_space(ScmObj port)
{
int c, state;
@@ -191,7 +192,8 @@
}
}
-static void read_sequence(ScmObj port, char *buf, int len)
+static void
+read_sequence(ScmObj port, char *buf, int len)
{
int c;
char *p;
@@ -207,8 +209,9 @@
buf[len] = '\0';
}
-static size_t read_token(ScmObj port, int *err,
- char *buf, size_t buf_size, const char *delim)
+static size_t
+read_token(ScmObj port,
+ int *err, char *buf, size_t buf_size, const char *delim)
{
int c;
size_t len;
@@ -255,7 +258,8 @@
return len;
}
-static ScmObj read_sexpression(ScmObj port)
+static ScmObj
+read_sexpression(ScmObj port)
{
int c;
@@ -340,7 +344,8 @@
}
}
-static ScmObj read_list(ScmObj port, int closeParen)
+static ScmObj
+read_list(ScmObj port, int closeParen)
{
ScmObj lst, elm, cdr;
ScmQueue q;
@@ -414,7 +419,8 @@
}
#if SCM_USE_SRFI75
-static int parse_unicode_sequence(const char *seq, int len)
+static int
+parse_unicode_sequence(const char *seq, int len)
{
int c;
char *first_nondigit;
@@ -449,7 +455,8 @@
return (*first_nondigit) ? -1 : c;
}
-static int read_unicode_sequence(ScmObj port, char prefix)
+static int
+read_unicode_sequence(ScmObj port, char prefix)
{
int len;
char seq[sizeof("U0010ffff")];
@@ -468,7 +475,8 @@
}
#endif /* SCM_USE_SRFI75 */
-static ScmObj read_char(ScmObj port)
+static ScmObj
+read_char(ScmObj port)
{
int c, next, err;
#if SCM_USE_SRFI75
@@ -508,7 +516,8 @@
ERR("invalid character literal: #\\%s", buf);
}
-static ScmObj read_string(ScmObj port)
+static ScmObj
+read_string(ScmObj port)
{
ScmObj obj;
const ScmSpecialCharInfo *info;
@@ -587,7 +596,8 @@
/* NOTREACHED */
}
-static ScmObj read_symbol(ScmObj port)
+static ScmObj
+read_symbol(ScmObj port)
{
ScmObj sym;
size_t offset, tail_len;
@@ -616,7 +626,8 @@
return sym;
}
-static ScmObj read_number_or_symbol(ScmObj port)
+static ScmObj
+read_number_or_symbol(ScmObj port)
{
int c, err;
size_t len;
@@ -656,8 +667,8 @@
}
/* reads 'b123' part of #b123 */
-static ScmObj parse_number(ScmObj port,
- char *buf, size_t buf_size, char prefix)
+static ScmObj
+parse_number(ScmObj port, char *buf, size_t buf_size, char prefix)
{
int radix, number;
char *first_nondigit;
@@ -681,7 +692,8 @@
ERR("ill-formatted number: #%c%s", prefix, buf);
}
-static ScmObj read_number(ScmObj port, char prefix)
+static ScmObj
+read_number(ScmObj port, char prefix)
{
int err;
size_t len;
@@ -694,7 +706,8 @@
return parse_number(port, buf, sizeof(buf), prefix);
}
-static ScmObj read_quote(ScmObj port, ScmObj quoter)
+static ScmObj
+read_quote(ScmObj port, ScmObj quoter)
{
return SCM_LIST_2(quoter, read_sexpression(port));
}
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -129,7 +129,7 @@
#endif
}
-static void
+static void
scm_initialize_internal(void)
{
/*=======================================================================
@@ -375,7 +375,7 @@
Scheme Function Export Related Functions
===========================================================================*/
/* New Interfaces */
-static int
+static int
scm_register_func(const char *name, ScmFuncType c_func, enum ScmFuncTypeCode type)
{
ScmObj sym = scm_intern(name);
Modified: branches/r5rs/sigscheme/storage-continuation.c
===================================================================
--- branches/r5rs/sigscheme/storage-continuation.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/storage-continuation.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -126,23 +126,27 @@
#define DYNEXT_FRAME_BEFORE CAR
#define DYNEXT_FRAME_AFTER CDR
-static void initialize_dynamic_extent(void)
+static void
+initialize_dynamic_extent(void)
{
current_dynamic_extent = SCM_NULL;
scm_gc_protect((ScmObj *)¤t_dynamic_extent);
}
-static void finalize_dynamic_extent(void)
+static void
+finalize_dynamic_extent(void)
{
}
-static void wind_onto_dynamic_extent(ScmObj before, ScmObj after)
+static void
+wind_onto_dynamic_extent(ScmObj before, ScmObj after)
{
current_dynamic_extent = CONS(MAKE_DYNEXT_FRAME(before, after),
current_dynamic_extent);
}
-static void unwind_dynamic_extent(void)
+static void
+unwind_dynamic_extent(void)
{
if (NULLP(current_dynamic_extent))
ERR("corrupted dynamic extent");
@@ -151,7 +155,8 @@
}
/* enter a dynamic extent of another continuation (dest) */
-static void enter_dynamic_extent(ScmObj dest)
+static void
+enter_dynamic_extent(ScmObj dest)
{
ScmObj frame, unwound, retpath;
DECLARE_INTERNAL_FUNCTION("enter_dynamic_extent");
@@ -171,7 +176,8 @@
}
/* exit to a dynamic extent of another continuation (dest) */
-static void exit_dynamic_extent(ScmObj dest)
+static void
+exit_dynamic_extent(ScmObj dest)
{
ScmObj frame;
@@ -205,22 +211,26 @@
/*============================================================================
Continuation
============================================================================*/
-static void initialize_continuation_env(void)
+static void
+initialize_continuation_env(void)
{
continuation_stack = SCM_NULL;
scm_gc_protect((ScmObj *)&continuation_stack);
}
-static void finalize_continuation_env(void)
+static void
+finalize_continuation_env(void)
{
}
-static void continuation_stack_push(ScmObj cont)
+static void
+continuation_stack_push(ScmObj cont)
{
continuation_stack = CONS(cont, continuation_stack);
}
-static ScmObj continuation_stack_pop(void)
+static ScmObj
+continuation_stack_pop(void)
{
ScmObj recentmost;
@@ -235,7 +245,8 @@
}
/* expire all descendant continuations and dest_cont */
-static ScmObj continuation_stack_unwind(ScmObj dest_cont)
+static ScmObj
+continuation_stack_unwind(ScmObj dest_cont)
{
ScmObj cont;
Modified: branches/r5rs/sigscheme/storage-gc.c
===================================================================
--- branches/r5rs/sigscheme/storage-gc.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/storage-gc.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -180,7 +180,8 @@
* Registered veriable locations are held in vector instead of linked list to
* maximize space and performance efficiency.
*/
-static ScmObj **locate_protected_var(ScmObj *var)
+static ScmObj **
+locate_protected_var(ScmObj *var)
{
ScmObj **slot;
@@ -269,7 +270,8 @@
/*============================================================================
Heap Allocator & Garbage Collector
============================================================================*/
-static void initialize_heap(size_t size, size_t alloc_threshold,
+static void
+initialize_heap(size_t size, size_t alloc_threshold,
int n_max, int n_init)
{
int i;
@@ -287,7 +289,8 @@
add_heap();
}
-static void add_heap(void)
+static void
+add_heap(void)
{
ScmObjHeap heap;
ScmCell *cell;
@@ -314,7 +317,8 @@
freelist = heap;
}
-static void finalize_heap(void)
+static void
+finalize_heap(void)
{
int i;
ScmCell *cell;
@@ -329,7 +333,8 @@
free(heaps);
}
-static void gc_mark_and_sweep(void)
+static void
+gc_mark_and_sweep(void)
{
size_t n_collected;
@@ -344,7 +349,8 @@
}
}
-static void mark_obj(ScmObj obj)
+static void
+mark_obj(ScmObj obj)
{
int i = 0;
@@ -401,14 +407,16 @@
}
}
-static void finalize_protected_var(void)
+static void
+finalize_protected_var(void)
{
free(protected_vars);
}
/* The core part of Conservative GC */
-static int within_heapp(ScmObj obj)
+static int
+within_heapp(ScmObj obj)
{
ScmCell *heap, *ptr;
int i;
@@ -440,7 +448,8 @@
return 0;
}
-static void gc_mark_protected_var(void)
+static void
+gc_mark_protected_var(void)
{
ScmObj **slot;
@@ -456,7 +465,8 @@
}
/* mark a contiguous region such as stack */
-static void gc_mark_locations_n(ScmObj *start, size_t n)
+static void
+gc_mark_locations_n(ScmObj *start, size_t n)
{
ScmObj *objp;
@@ -466,7 +476,8 @@
}
}
-static void gc_mark_definite_locations_n(ScmObj *start, size_t n)
+static void
+gc_mark_definite_locations_n(ScmObj *start, size_t n)
{
ScmObj *objp;
@@ -474,7 +485,8 @@
mark_obj(*objp);
}
-static void gc_mark_locations(ScmObj *start, ScmObj *end)
+static void
+gc_mark_locations(ScmObj *start, ScmObj *end)
{
int size;
ScmObj *tmp;
@@ -497,7 +509,8 @@
* To avoid incorrect stack_end placement, the jmp_buf is allocated to outside
* of stack
*/
-static void gc_mark(void)
+static void
+gc_mark(void)
{
ScmObj stack_end;
void *save_regs_buf_end = (char *)save_regs_buf + sizeof(save_regs_buf);
@@ -512,7 +525,8 @@
gc_mark_definite_locations_n(scm_symbol_hash, NAMEHASH_SIZE);
}
-static void free_cell(ScmCell *cell)
+static void
+free_cell(ScmCell *cell)
{
#if SCM_OBJ_COMPACT
if (SCM_NEED_SWEEPP(cell)) {
@@ -588,7 +602,8 @@
#endif /* SCM_OBJ_COMPACT */
}
-static size_t gc_sweep(void)
+static size_t
+gc_sweep(void)
{
int i;
size_t sum_collected, n_collected;
Modified: branches/r5rs/sigscheme/storage-symbol.c
===================================================================
--- branches/r5rs/sigscheme/storage-symbol.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/storage-symbol.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -122,7 +122,8 @@
/*============================================================================
Symbol table
============================================================================*/
-static void initialize_symbol_hash(void)
+static void
+initialize_symbol_hash(void)
{
int i;
@@ -132,12 +133,14 @@
scm_symbol_hash[i] = SCM_NULL;
}
-static void finalize_symbol_hash(void)
+static void
+finalize_symbol_hash(void)
{
free(scm_symbol_hash);
}
-static int symbol_name_hash(const char *name)
+static int
+symbol_name_hash(const char *name)
{
int hash, c;
Modified: branches/r5rs/sigscheme/storage.c
===================================================================
--- branches/r5rs/sigscheme/storage.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/storage.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -129,7 +129,8 @@
* initialization is encapsulated in this file. Upper layers must only use
* abstract interfaces such as SCM_NULL and SCM_NULLP().
*/
-static void initialize_special_constants(void)
+static void
+initialize_special_constants(void)
{
#if !SCM_OBJ_COMPACT
SCM_CONSTANT_BIND_SUBSTANCE(scm_null, null_cell);
Modified: branches/r5rs/sigscheme/test-compact.c
===================================================================
--- branches/r5rs/sigscheme/test-compact.c 2005-12-16 21:00:08 UTC (rev 2613)
+++ branches/r5rs/sigscheme/test-compact.c 2005-12-16 22:30:34 UTC (rev 2614)
@@ -56,13 +56,15 @@
} \
} while(0)
-static int die(const char *filename, int line)
+static int
+die(const char *filename, int line)
{
printf("assertion faled. (file : %s, line : %d)\n", filename, line);
return -1;
}
-static const char* typecode2typestr(enum ScmObjType type)
+static const char*
+typecode2typestr(enum ScmObjType type)
{
switch (type) {
case ScmInt: return "Int";
@@ -87,7 +89,8 @@
return "Invalid";
}
-static void check_type(enum ScmObjType type, ScmObj obj)
+static void
+check_type(enum ScmObjType type, ScmObj obj)
{
if (type == ScmInt)
SCM_ASSERT(SCM_INTP(obj));
@@ -160,14 +163,16 @@
ASSERT_TYPE(type, ScmCFuncPointer, !SCM_C_FUNCPOINTERP(obj));
}
-static void *malloc_aligned(size_t size)
+static void *
+malloc_aligned(size_t size)
{
void *p;
posix_memalign(&p, 32, size);
return p;
}
-static void* aligned_strdup(const char *str)
+static void*
+aligned_strdup(const char *str)
{
char *ret = NULL;
if (str) {
More information about the uim-commit
mailing list