summaryrefslogtreecommitdiff
path: root/byterun
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2010-01-22 12:48:24 +0000
committerDamien Doligez <damien.doligez-inria.fr>2010-01-22 12:48:24 +0000
commit04b1656222698bd7e92f213e9a718b7a4185643a (patch)
tree6186d1ba1e00adb1232908f95cb92c299902a943 /byterun
parentbdc0fadee2dc9669818955486b4c3497016edda5 (diff)
downloadocaml-04b1656222698bd7e92f213e9a718b7a4185643a.tar.gz
clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun')
-rw-r--r--byterun/Makefile.nt2
-rw-r--r--byterun/array.c2
-rw-r--r--byterun/backtrace.c1
-rw-r--r--byterun/custom.h2
-rw-r--r--byterun/debugger.c12
-rw-r--r--byterun/debugger.h2
-rw-r--r--byterun/dynlink.c2
-rw-r--r--byterun/fix_code.c2
-rw-r--r--byterun/floats.c2
-rw-r--r--byterun/globroots.c6
-rw-r--r--byterun/hash.c4
-rw-r--r--byterun/instrtrace.c40
-rw-r--r--byterun/instruct.h4
-rw-r--r--byterun/int64_format.h2
-rw-r--r--byterun/intern.c10
-rw-r--r--byterun/interp.c8
-rw-r--r--byterun/ints.c4
-rw-r--r--byterun/lexing.c3
-rw-r--r--byterun/md5.c1
-rw-r--r--byterun/md5.h2
-rw-r--r--byterun/meta.c4
-rw-r--r--byterun/osdeps.h1
-rw-r--r--byterun/parsing.c14
-rw-r--r--byterun/printexc.c2
-rw-r--r--byterun/roots.c1
-rw-r--r--byterun/signals.c2
-rw-r--r--byterun/startup.c2
-rw-r--r--byterun/str.c11
-rw-r--r--byterun/win32.c20
29 files changed, 81 insertions, 87 deletions
diff --git a/byterun/Makefile.nt b/byterun/Makefile.nt
index 23fcde9338..a633787de6 100644
--- a/byterun/Makefile.nt
+++ b/byterun/Makefile.nt
@@ -22,7 +22,7 @@ OBJS=$(COMMONOBJS:.o=.$(O)) win32.$(O) main.$(O)
DOBJS=$(OBJS:.$(O)=.$(DBGO)) instrtrace.$(DBGO)
ocamlrun$(EXE): libcamlrun.$(A) prims.$(O)
- $(MKEXE) -o ocamlrun$(EXE) prims.$(O) $(call SYSLIB,ws2_32) $(EXTRALIBS) libcamlrun.$(A)
+ $(MKEXE) -o ocamlrun$(EXE) prims.$(O) $(call SYSLIB,ws2_32) $(EXTRALIBS) libcamlrun.$(A)
ocamlrund$(EXE): libcamlrund.$(A) prims.$(O) main.$(O)
$(MKEXE) -o ocamlrun$(EXE) $(BYTECCDBGCOMPOPTS) prims.$(O) $(call SYSLIB,ws2_32) $(EXTRALIBS) libcamlrund.$(A)
diff --git a/byterun/array.c b/byterun/array.c
index e282f0600e..fc60659523 100644
--- a/byterun/array.c
+++ b/byterun/array.c
@@ -34,7 +34,7 @@ CAMLprim value caml_array_get_float(value array, value index)
double d;
value res;
- if (idx < 0 || idx >= Wosize_val(array) / Double_wosize)
+ if (idx < 0 || idx >= Wosize_val(array) / Double_wosize)
caml_array_bound_error();
d = Double_field(array, idx);
#define Setup_for_gc
diff --git a/byterun/backtrace.c b/byterun/backtrace.c
index 1afce8ae2a..2b29c31dcc 100644
--- a/byterun/backtrace.c
+++ b/byterun/backtrace.c
@@ -308,4 +308,3 @@ CAMLprim value caml_get_exception_backtrace(value unit)
}
CAMLreturn(res);
}
-
diff --git a/byterun/custom.h b/byterun/custom.h
index 3855742f4e..a706857ae0 100644
--- a/byterun/custom.h
+++ b/byterun/custom.h
@@ -27,7 +27,7 @@ struct custom_operations {
void (*finalize)(value v);
int (*compare)(value v1, value v2);
intnat (*hash)(value v);
- void (*serialize)(value v,
+ void (*serialize)(value v,
/*out*/ uintnat * wsize_32 /*size in bytes*/,
/*out*/ uintnat * wsize_64 /*size in bytes*/);
uintnat (*deserialize)(void * dst);
diff --git a/byterun/debugger.c b/byterun/debugger.c
index 38b1923e6e..3639c43bbb 100644
--- a/byterun/debugger.c
+++ b/byterun/debugger.c
@@ -72,7 +72,7 @@ static union { /* Socket address for the debugger */
struct sockaddr s_gen;
#ifndef _WIN32
struct sockaddr_un s_unix;
-#endif
+#endif
struct sockaddr_in s_inet;
} sock_addr;
static int sock_addr_len; /* Length of sock_addr */
@@ -98,7 +98,7 @@ static void open_connection(void)
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
(char *) &newvalue, sizeof(newvalue));
}
-#endif
+#endif
dbg_socket = socket(sock_domain, SOCK_STREAM, 0);
#ifdef _WIN32
if (retcode == 0) {
@@ -106,7 +106,7 @@ static void open_connection(void)
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
(char *) &oldvalue, oldvaluelen);
}
-#endif
+#endif
if (dbg_socket == -1 ||
connect(dbg_socket, &sock_addr.s_gen, sock_addr_len) == -1){
caml_fatal_error_arg2 ("cannot connect to debugger at %s", dbg_addr,
@@ -181,7 +181,7 @@ void caml_debugger_init(void)
+ strlen(address);
#else
caml_fatal_error("Unix sockets not supported");
-#endif
+#endif
} else {
/* Internet domain */
sock_domain = PF_INET;
@@ -318,7 +318,7 @@ void caml_debugger(enum event_kind event)
#else
caml_fatal_error("error: REQ_CHECKPOINT command");
exit(-1);
-#endif
+#endif
break;
case REQ_GO:
caml_event_count = caml_getword(dbg_in);
@@ -332,7 +332,7 @@ void caml_debugger(enum event_kind event)
#else
caml_fatal_error("Fatal error: REQ_WAIT command");
exit(-1);
-#endif
+#endif
break;
case REQ_INITIAL_FRAME:
frame = caml_extern_sp + 1;
diff --git a/byterun/debugger.h b/byterun/debugger.h
index 59e23ec0e1..ce479d271a 100644
--- a/byterun/debugger.h
+++ b/byterun/debugger.h
@@ -46,7 +46,7 @@ enum debugger_request {
REQ_RESET_INSTR = 'i', /* uint32 pos */
/* Clear an event or breapoint at position pos, restores initial instr. */
REQ_CHECKPOINT = 'c', /* no args */
- /* Checkpoint the runtime system by forking a child process.
+ /* Checkpoint the runtime system by forking a child process.
Reply is pid of child process or -1 if checkpoint failed. */
REQ_GO = 'g', /* uint32 n */
/* Run the program for n events.
diff --git a/byterun/dynlink.c b/byterun/dynlink.c
index e08bdc0b2c..7df594dbe9 100644
--- a/byterun/dynlink.c
+++ b/byterun/dynlink.c
@@ -94,7 +94,7 @@ static char * parse_ld_conf(void)
ldconfname);
config = caml_stat_alloc(st.st_size + 1);
nread = read(ldconf, config, st.st_size);
- if (nread == -1)
+ if (nread == -1)
caml_fatal_error_arg
("Fatal error: error while reading loader config file %s\n",
ldconfname);
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index b626f2cb07..b252efd587 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -92,7 +92,7 @@ void caml_thread_code (code_t code, asize_t len)
code_t p;
int l [STOP + 1];
int i;
-
+
for (i = 0; i <= STOP; i++) {
l [i] = 0;
}
diff --git a/byterun/floats.c b/byterun/floats.c
index 21ba411a77..d1d178a329 100644
--- a/byterun/floats.c
+++ b/byterun/floats.c
@@ -429,7 +429,7 @@ CAMLprim value caml_classify_float(value vd)
return Val_int(FP_normal);
}
#else
- union {
+ union {
double d;
#if defined(ARCH_BIG_ENDIAN) || (defined(__arm__) && !defined(__ARM_EABI__))
struct { uint32 h; uint32 l; } i;
diff --git a/byterun/globroots.c b/byterun/globroots.c
index e4fec33287..acac1e2170 100644
--- a/byterun/globroots.c
+++ b/byterun/globroots.c
@@ -133,7 +133,7 @@ static void caml_delete_global_root(struct global_root_list * rootlist,
/* Reclaim list element */
caml_stat_free(e);
/* Down-correct list level */
- while (rootlist->level > 0 &&
+ while (rootlist->level > 0 &&
rootlist->forward[rootlist->level] == NULL)
rootlist->level--;
}
@@ -223,11 +223,11 @@ CAMLexport void caml_modify_generational_global_root(value *r, value newval)
{
value oldval = *r;
- /* It is OK to have a root in roots_young that suddenly points to
+ /* It is OK to have a root in roots_young that suddenly points to
the old generation -- the next minor GC will take care of that.
What needs corrective action is a root in roots_old that suddenly
points to the young generation. */
- if (Is_block(newval) && Is_young(newval) &&
+ if (Is_block(newval) && Is_young(newval) &&
Is_block(oldval) && Is_in_heap(oldval)) {
caml_delete_global_root(&caml_global_roots_old, r);
caml_insert_global_root(&caml_global_roots_young, r);
diff --git a/byterun/hash.c b/byterun/hash.c
index a1d7864db8..c981768d0f 100644
--- a/byterun/hash.c
+++ b/byterun/hash.c
@@ -61,7 +61,7 @@ static void hash_aux(value obj)
/* Pointers into the heap are well-structured blocks. So are atoms.
We can inspect the block contents. */
- Assert (Is_block (obj));
+ Assert (Is_block (obj));
if (Is_in_value_area(obj)) {
tag = Tag_val(obj);
switch (tag) {
@@ -146,7 +146,7 @@ CAMLexport value caml_hash_variant(char const * tag)
{
value accu;
/* Same hashing algorithm as in ../typing/btype.ml, function hash_variant */
- for (accu = Val_int(0); *tag != 0; tag++)
+ for (accu = Val_int(0); *tag != 0; tag++)
accu = Val_int(223 * Int_val(accu) + *((unsigned char *) tag));
#ifdef ARCH_SIXTYFOUR
accu = accu & Val_long(0x7FFFFFFFL);
diff --git a/byterun/instrtrace.c b/byterun/instrtrace.c
index 3734d82412..3afdc9541e 100644
--- a/byterun/instrtrace.c
+++ b/byterun/instrtrace.c
@@ -59,7 +59,7 @@ void caml_disasm_instr(pc)
/* Instructions with two operands */
case APPTERM: case CLOSURE: case CLOSUREREC: case PUSHGETGLOBALFIELD:
case GETGLOBALFIELD: case MAKEBLOCK:
- case BEQ: case BNEQ: case BLTINT: case BLEINT: case BGTINT: case BGEINT:
+ case BEQ: case BNEQ: case BLTINT: case BLEINT: case BGTINT: case BGEINT:
case BULTINT: case BUGEINT:
printf(" %d, %d\n", pc[0], pc[1]); break;
/* Instructions with a C primitive as operand */
@@ -182,13 +182,13 @@ caml_trace_value_file (value v, code_t prog, int proglen, FILE * f)
if (!v)
return;
if (prog && v % sizeof (int) == 0
- && (code_t) v >= prog
- && (code_t) v < (code_t) ((char *) prog + proglen))
+ && (code_t) v >= prog
+ && (code_t) v < (code_t) ((char *) prog + proglen))
fprintf (f, "=code@%d", (code_t) v - prog);
else if (Is_long (v))
fprintf (f, "=long%" ARCH_INTNAT_PRINTF_FORMAT "d", Long_val (v));
- else if ((void*)v >= (void*)caml_stack_low
- && (void*)v < (void*)caml_stack_high)
+ else if ((void*)v >= (void*)caml_stack_low
+ && (void*)v < (void*)caml_stack_high)
fprintf (f, "=stack_%d", (intnat*)caml_stack_high - (intnat*)v);
else if (Is_block (v)) {
int s = Wosize_val (v);
@@ -202,10 +202,10 @@ caml_trace_value_file (value v, code_t prog, int proglen, FILE * f)
l = caml_string_length (v);
fprintf (f, "=string[s%dL%d]'", s, l);
for (i = 0; i < ((l>0x1f)?0x1f:l) ; i++) {
- if (isprint (Byte (v, i)))
- putc (Byte (v, i), f);
- else
- putc ('?', f);
+ if (isprint (Byte (v, i)))
+ putc (Byte (v, i), f);
+ else
+ putc ('?', f);
};
fprintf (f, "'");
goto displayfields;
@@ -215,7 +215,7 @@ caml_trace_value_file (value v, code_t prog, int proglen, FILE * f)
case Double_array_tag:
fprintf (f, "=floatarray[s%d]", s);
for (i = 0; i < ((s>0xf)?0xf:s); i++)
- fprintf (f, " %g", Double_field (v, i));
+ fprintf (f, " %g", Double_field (v, i));
goto displayfields;
case Abstract_tag:
fprintf (f, "=abstract[s%d]", s);
@@ -227,25 +227,25 @@ caml_trace_value_file (value v, code_t prog, int proglen, FILE * f)
fprintf (f, "=block<T%d/s%d>", tg, s);
displayfields:
if (s > 0)
- fputs ("=(", f);
+ fputs ("=(", f);
for (i = 0; i < s; i++) {
- if (i > 20) {
- fputs ("....", f);
- break;
- };
- if (i > 0)
- putc (' ', f);
- fprintf (f, "%#lx", Field (v, i));
+ if (i > 20) {
+ fputs ("....", f);
+ break;
+ };
+ if (i > 0)
+ putc (' ', f);
+ fprintf (f, "%#lx", Field (v, i));
};
if (s > 0)
- putc (')', f);
+ putc (')', f);
};
}
}
void
caml_trace_accu_sp_file (value accu, value * sp, code_t prog, int proglen,
- FILE * f)
+ FILE * f)
{
int i;
value *p;
diff --git a/byterun/instruct.h b/byterun/instruct.h
index a2eb5b7b5e..c45d4ea287 100644
--- a/byterun/instruct.h
+++ b/byterun/instruct.h
@@ -27,7 +27,7 @@ enum instructions {
ENVACC1, ENVACC2, ENVACC3, ENVACC4, ENVACC,
PUSHENVACC1, PUSHENVACC2, PUSHENVACC3, PUSHENVACC4, PUSHENVACC,
PUSH_RETADDR, APPLY, APPLY1, APPLY2, APPLY3,
- APPTERM, APPTERM1, APPTERM2, APPTERM3,
+ APPTERM, APPTERM1, APPTERM2, APPTERM3,
RETURN, RESTART, GRAB,
CLOSURE, CLOSUREREC,
OFFSETCLOSUREM2, OFFSETCLOSURE0, OFFSETCLOSURE2, OFFSETCLOSURE,
@@ -48,7 +48,7 @@ enum instructions {
NEGINT, ADDINT, SUBINT, MULINT, DIVINT, MODINT,
ANDINT, ORINT, XORINT, LSLINT, LSRINT, ASRINT,
EQ, NEQ, LTINT, LEINT, GTINT, GEINT,
- OFFSETINT, OFFSETREF, ISINT,
+ OFFSETINT, OFFSETREF, ISINT,
GETMETHOD,
BEQ, BNEQ, BLTINT, BLEINT, BGTINT, BGEINT,
ULTINT, UGEINT,
diff --git a/byterun/int64_format.h b/byterun/int64_format.h
index 2096a030de..b9ae910400 100644
--- a/byterun/int64_format.h
+++ b/byterun/int64_format.h
@@ -49,7 +49,7 @@ static void I64_format(char * buffer, char * fmt, int64 x)
filler = '0'; break;
case '#':
alternate = 1; break;
- case '1': case '2': case '3': case '4': case '5':
+ case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9':
width = atoi(p);
while (*p >= '0' && *p <= '9') p++;
diff --git a/byterun/intern.c b/byterun/intern.c
index b7acfd4a06..f442114622 100644
--- a/byterun/intern.c
+++ b/byterun/intern.c
@@ -104,7 +104,7 @@ static void intern_cleanup(void)
if (intern_obj_table != NULL) caml_stat_free(intern_obj_table);
if (intern_extra_block != NULL) {
/* free newly allocated heap chunk */
- caml_free_for_heap(intern_extra_block);
+ caml_free_for_heap(intern_extra_block);
} else if (intern_block != 0) {
/* restore original header for heap block, otherwise GC is confused */
Hd_val(intern_block) = intern_header;
@@ -186,7 +186,7 @@ static void intern_rec(value *dest)
read_shared:
Assert (ofs > 0);
Assert (ofs <= obj_counter);
- Assert (intern_obj_table != NULL);
+ Assert (intern_obj_table != NULL);
v = intern_obj_table[obj_counter - ofs];
break;
case CODE_SHARED16:
@@ -237,7 +237,7 @@ static void intern_rec(value *dest)
Permute_64(v, ARCH_FLOAT_ENDIANNESS, v, 0x01234567)
else
Permute_64(v, ARCH_FLOAT_ENDIANNESS, v, 0x76543210);
-#endif
+#endif
break;
case CODE_DOUBLE_ARRAY8_LITTLE:
case CODE_DOUBLE_ARRAY8_BIG:
@@ -508,7 +508,7 @@ CAMLexport value caml_input_value_from_malloc(char * data, intnat ofs)
intern_src = intern_input + ofs;
intern_input_malloced = 1;
magic = read32u();
- if (magic != Intext_magic_number)
+ if (magic != Intext_magic_number)
caml_failwith("input_value_from_malloc: bad object");
block_len = read32u();
obj = input_val_from_block();
@@ -527,7 +527,7 @@ CAMLexport value caml_input_value_from_block(char * data, intnat len)
intern_src = intern_input;
intern_input_malloced = 0;
magic = read32u();
- if (magic != Intext_magic_number)
+ if (magic != Intext_magic_number)
caml_failwith("input_value_from_block: bad object");
block_len = read32u();
if (5*4 + block_len > len)
diff --git a/byterun/interp.c b/byterun/interp.c
index 254441e6ef..7bcdf7acb3 100644
--- a/byterun/interp.c
+++ b/byterun/interp.c
@@ -1024,14 +1024,14 @@ value caml_interprete(code_t prog, asize_t prog_size)
Instruct(ISINT):
accu = Val_long(accu & 1);
Next;
-
+
/* Object-oriented operations */
#define Lookup(obj, lab) Field (Field (obj, 0), Int_val(lab))
/* please don't forget to keep below code in sync with the
- functions caml_cache_public_method and
- caml_cache_public_method2 in obj.c */
+ functions caml_cache_public_method and
+ caml_cache_public_method2 in obj.c */
Instruct(GETMETHOD):
accu = Lookup(sp[0], accu);
@@ -1137,7 +1137,7 @@ void caml_prepare_bytecode(code_t prog, asize_t prog_size) {
Assert(prog);
Assert(prog_size>0);
/* actually, the threading of the bytecode might be done here */
-}
+}
void caml_release_bytecode(code_t prog, asize_t prog_size) {
/* other implementations of the interpreter (such as an hypothetical
diff --git a/byterun/ints.c b/byterun/ints.c
index 7b8a136751..9fdaa1802b 100644
--- a/byterun/ints.c
+++ b/byterun/ints.c
@@ -180,7 +180,7 @@ CAMLprim value caml_format_int(value fmt, value arg)
value res;
buffer = parse_format(fmt, ARCH_INTNAT_PRINTF_FORMAT,
- format_string, default_format_buffer, &conv);
+ format_string, default_format_buffer, &conv);
switch (conv) {
case 'u': case 'x': case 'X': case 'o':
sprintf(buffer, format_string, Unsigned_long_val(arg));
@@ -492,7 +492,7 @@ CAMLprim value caml_int64_of_float(value v)
{ return caml_copy_int64(I64_of_double(Double_val(v))); }
CAMLprim value caml_int64_to_float(value v)
-{
+{
int64 i = Int64_val(v);
return caml_copy_double(I64_to_double(i));
}
diff --git a/byterun/lexing.c b/byterun/lexing.c
index d2776116ef..6e74795c23 100644
--- a/byterun/lexing.c
+++ b/byterun/lexing.c
@@ -219,7 +219,7 @@ CAMLprim value caml_new_lex_engine(struct lexing_table *tbl, value start_state,
pc_off = Short(tbl->lex_trans_code, base_code + c) ;
else
pc_off = Short(tbl->lex_default_code, pstate) ;
- if (pc_off > 0)
+ if (pc_off > 0)
run_mem(Bp_val(tbl->lex_code) + pc_off, lexbuf->lex_mem, lexbuf->lex_curr_pos) ;
/* Erase the EOF condition only if the EOF pseudo-character was
consumed by the automaton (i.e. there was no backtrack above)
@@ -228,4 +228,3 @@ CAMLprim value caml_new_lex_engine(struct lexing_table *tbl, value start_state,
}
}
}
-
diff --git a/byterun/md5.c b/byterun/md5.c
index 9d2481fe91..d0b6e5e462 100644
--- a/byterun/md5.c
+++ b/byterun/md5.c
@@ -308,4 +308,3 @@ CAMLexport void caml_MD5Transform(uint32 *buf, uint32 *in)
buf[2] += c;
buf[3] += d;
}
-
diff --git a/byterun/md5.h b/byterun/md5.h
index ff8c23ee0e..b92b02ad12 100644
--- a/byterun/md5.h
+++ b/byterun/md5.h
@@ -32,7 +32,7 @@ struct MD5Context {
};
CAMLextern void caml_MD5Init (struct MD5Context *context);
-CAMLextern void caml_MD5Update (struct MD5Context *context, unsigned char *buf,
+CAMLextern void caml_MD5Update (struct MD5Context *context, unsigned char *buf,
uintnat len);
CAMLextern void caml_MD5Final (unsigned char *digest, struct MD5Context *ctx);
CAMLextern void caml_MD5Transform (uint32 *buf, uint32 *in);
diff --git a/byterun/meta.c b/byterun/meta.c
index 91143612ac..1ed4fbddd5 100644
--- a/byterun/meta.c
+++ b/byterun/meta.c
@@ -82,7 +82,7 @@ CAMLprim value caml_realloc_global(value size)
}
return Val_unit;
}
-
+
CAMLprim value caml_get_current_environment(value unit)
{
return *caml_extern_sp;
@@ -148,7 +148,7 @@ value caml_realloc_global(value size)
caml_invalid_argument("Meta.realloc_global");
return Val_unit; /* not reached */
}
-
+
value caml_invoke_traced_function(value codeptr, value env, value arg)
{
caml_invalid_argument("Meta.invoke_traced_function");
diff --git a/byterun/osdeps.h b/byterun/osdeps.h
index 3646fb4f78..248b3f6aa3 100644
--- a/byterun/osdeps.h
+++ b/byterun/osdeps.h
@@ -69,4 +69,3 @@ extern int caml_executable_name(char * name, int name_len);
#endif
#endif /* CAML_OSDEPS_H */
-
diff --git a/byterun/parsing.c b/byterun/parsing.c
index 23228bf7bc..bcb9e5faa5 100644
--- a/byterun/parsing.c
+++ b/byterun/parsing.c
@@ -83,7 +83,7 @@ int caml_parser_trace = 0;
/* Output codes */
/* Mirrors parser_output in ../stdlib/parsing.ml */
-#define READ_TOKEN Val_int(0)
+#define READ_TOKEN Val_int(0)
#define RAISE_PARSE_ERROR Val_int(1)
#define GROW_STACKS_1 Val_int(2)
#define GROW_STACKS_2 Val_int(3)
@@ -133,8 +133,8 @@ static void print_token(struct parser_tables *tables, int state, value tok)
else
fprintf(stderr, "_");
fprintf(stderr, ")\n");
- }
-}
+ }
+}
/* The pushdown automata */
@@ -171,7 +171,7 @@ CAMLprim value caml_parse_engine(struct parser_tables *tables,
caml_modify(&env->lval, Val_long(0));
}
if (caml_parser_trace) print_token(tables, state, arg);
-
+
testshift:
n1 = Short(tables->sindex, state);
n2 = n1 + Int_val(env->curr_char);
@@ -199,7 +199,7 @@ CAMLprim value caml_parse_engine(struct parser_tables *tables,
n2 = n1 + ERRCODE;
if (n1 != 0 && n2 >= 0 && n2 <= Int_val(tables->tablesize) &&
Short(tables->check, n2) == ERRCODE) {
- if (caml_parser_trace)
+ if (caml_parser_trace)
fprintf(stderr, "Recovering in state %d\n", state1);
goto shift_recover;
} else {
@@ -222,7 +222,7 @@ CAMLprim value caml_parse_engine(struct parser_tables *tables,
env->curr_char = Val_int(-1);
goto loop;
}
-
+
shift:
env->curr_char = Val_int(-1);
if (errflag > 0) errflag--;
@@ -289,7 +289,7 @@ CAMLprim value caml_parse_engine(struct parser_tables *tables,
Assert(0);
return RAISE_PARSE_ERROR; /* Keeps gcc -Wall happy */
}
-
+
}
/* Control printing of debugging info */
diff --git a/byterun/printexc.c b/byterun/printexc.c
index c2f0af046a..f72157ff08 100644
--- a/byterun/printexc.c
+++ b/byterun/printexc.c
@@ -44,7 +44,7 @@ static void add_string(struct stringbuf *buf, char *s)
if (len > 0) memmove(buf->ptr, s, len);
buf->ptr += len;
}
-
+
CAMLexport char * caml_format_exception(value exn)
{
mlsize_t start, i;
diff --git a/byterun/roots.c b/byterun/roots.c
index ff726bd319..74fbb41edb 100644
--- a/byterun/roots.c
+++ b/byterun/roots.c
@@ -101,4 +101,3 @@ CAMLexport void caml_do_local_roots (scanning_action f, value *stack_low,
}
}
}
-
diff --git a/byterun/signals.c b/byterun/signals.c
index 31604eba24..90fe891962 100644
--- a/byterun/signals.c
+++ b/byterun/signals.c
@@ -267,7 +267,7 @@ CAMLprim value caml_install_signal_handler(value signal_number, value action)
int sig, act, oldact;
sig = caml_convert_signal_number(Int_val(signal_number));
- if (sig < 0 || sig >= NSIG)
+ if (sig < 0 || sig >= NSIG)
caml_invalid_argument("Sys.signal: unavailable signal");
switch(action) {
case Val_int(0): /* Signal_default */
diff --git a/byterun/startup.c b/byterun/startup.c
index 419d49be60..f954e3ee52 100644
--- a/byterun/startup.c
+++ b/byterun/startup.c
@@ -176,7 +176,7 @@ int32 caml_seek_optional_section(int fd, struct exec_trailer *trail, char *name)
int32 caml_seek_section(int fd, struct exec_trailer *trail, char *name)
{
int32 len = caml_seek_optional_section(fd, trail, name);
- if (len == -1)
+ if (len == -1)
caml_fatal_error_arg("Fatal_error: section `%s' is missing\n", name);
return len;
}
diff --git a/byterun/str.c b/byterun/str.c
index 380e2eb5ad..760b154e30 100644
--- a/byterun/str.c
+++ b/byterun/str.c
@@ -91,7 +91,7 @@ CAMLprim value caml_string_compare(value s1, value s2)
if (s1 == s2) return Val_int(0);
len1 = caml_string_length(s1);
- len2 = caml_string_length(s2);
+ len2 = caml_string_length(s2);
res = memcmp(String_val(s1), String_val(s2), len1 <= len2 ? len1 : len2);
if (res < 0) return Val_int(-1);
if (res > 0) return Val_int(1);
@@ -104,22 +104,22 @@ CAMLprim value caml_string_lessthan(value s1, value s2)
{
return caml_string_compare(s1, s2) < Val_int(0) ? Val_true : Val_false;
}
-
+
CAMLprim value caml_string_lessequal(value s1, value s2)
{
return caml_string_compare(s1, s2) <= Val_int(0) ? Val_true : Val_false;
}
-
+
CAMLprim value caml_string_greaterthan(value s1, value s2)
{
return caml_string_compare(s1, s2) > Val_int(0) ? Val_true : Val_false;
}
-
+
CAMLprim value caml_string_greaterequal(value s1, value s2)
{
return caml_string_compare(s1, s2) >= Val_int(0) ? Val_true : Val_false;
}
-
+
CAMLprim value caml_blit_string(value s1, value ofs1, value s2, value ofs2,
value n)
{
@@ -153,4 +153,3 @@ CAMLprim value caml_bitvect_test(value bv, value n)
int pos = Int_val(n);
return Val_int(Byte_u(bv, pos >> 3) & (1 << (pos & 7)));
}
-
diff --git a/byterun/win32.c b/byterun/win32.c
index fa499f959b..866977b121 100644
--- a/byterun/win32.c
+++ b/byterun/win32.c
@@ -84,7 +84,7 @@ char * caml_search_in_path(struct ext_table * path, char * name)
strcpy(fullname, name);
return fullname;
}
-
+
CAMLexport char * caml_search_exe_in_path(char * name)
{
char * fullname, * filepart;
@@ -95,14 +95,14 @@ CAMLexport char * caml_search_exe_in_path(char * name)
while (1) {
fullname = stat_alloc(pathlen);
retcode = SearchPath(NULL, /* use system search path */
- name,
- ".exe", /* add .exe extension if needed */
- pathlen,
- fullname,
- &filepart);
+ name,
+ ".exe", /* add .exe extension if needed */
+ pathlen,
+ fullname,
+ &filepart);
if (retcode == 0) {
caml_gc_message(0x100, "%s not found in search path\n",
- (uintnat) name);
+ (uintnat) name);
strcpy(fullname, name);
break;
}
@@ -406,7 +406,7 @@ void caml_signal_thread(void * lpParam)
#if defined(NATIVE_CODE) && !defined(_WIN64)
-/* Handling of system stack overflow.
+/* Handling of system stack overflow.
* Based on code provided by Olivier Andrieu.
* An EXCEPTION_STACK_OVERFLOW is signaled when the guard page at the
@@ -470,11 +470,11 @@ static void caml_reset_stack (void *faulting_address)
/* restore the PAGE_GUARD protection on this page */
switch (osi.dwPlatformId) {
case VER_PLATFORM_WIN32_NT:
- VirtualProtect (mbi.BaseAddress, page_size,
+ VirtualProtect (mbi.BaseAddress, page_size,
mbi.Protect | PAGE_GUARD, &oldprot);
break;
case VER_PLATFORM_WIN32_WINDOWS:
- VirtualProtect (mbi.BaseAddress, page_size,
+ VirtualProtect (mbi.BaseAddress, page_size,
PAGE_NOACCESS, &oldprot);
break;
}