summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>1999-11-29 19:04:56 +0000
committerDamien Doligez <damien.doligez-inria.fr>1999-11-29 19:04:56 +0000
commit44c244d3110393a0db0daeb06cc6114dab48073f (patch)
treee7873f34f2d0292d2b95657805d9f76d030883c8
parent7cbb370448df987884d740f49f7e3b86e6914482 (diff)
downloadocaml-44c244d3110393a0db0daeb06cc6114dab48073f.tar.gz
tabs -> spaces
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--byterun/stacks.c4
-rw-r--r--debugger/show_source.ml14
-rw-r--r--emacs/caml-compat.el8
-rw-r--r--emacs/ocamltags.in6
-rw-r--r--otherlibs/db/db.ml29
-rw-r--r--otherlibs/db/dbstubs.c26
-rw-r--r--otherlibs/graph/color.c7
-rw-r--r--otherlibs/graph/dump_img.c13
-rw-r--r--otherlibs/systhreads/event.ml26
-rw-r--r--otherlibs/systhreads/win32.c6
-rw-r--r--otherlibs/threads/Tests/testsieve.ml25
-rw-r--r--otherlibs/threads/event.ml26
-rw-r--r--otherlibs/threads/scheduler.c17
-rw-r--r--otherlibs/unix/select.c8
-rw-r--r--otherlibs/unix/sendrecv.c6
-rw-r--r--otherlibs/unix/socketaddr.c6
-rw-r--r--otherlibs/win32unix/gettimeofday.c4
-rw-r--r--otherlibs/win32unix/select.c8
-rw-r--r--otherlibs/win32unix/sendrecv.c10
-rw-r--r--stdlib/gc.mli2
-rw-r--r--stdlib/stream.mli18
-rw-r--r--testasmcomp/alpha.S7
-rw-r--r--testasmcomp/mips.s2
-rw-r--r--tools/dumpobj.ml14
-rw-r--r--tools/ocamlcp.ml2
-rw-r--r--utils/nativeint.mli2
-rw-r--r--yacc/reader.c4
27 files changed, 144 insertions, 156 deletions
diff --git a/byterun/stacks.c b/byterun/stacks.c
index c353b4a397..ff26855c1c 100644
--- a/byterun/stacks.c
+++ b/byterun/stacks.c
@@ -41,11 +41,11 @@ void init_stack (long unsigned int initial_max_size)
trap_barrier = stack_high + 1;
max_stack_size = initial_max_size;
gc_message (0x08, "Initial stack limit: %luk bytes\n",
- max_stack_size / 1024 * sizeof (value));
+ max_stack_size / 1024 * sizeof (value));
}
void realloc_stack(void)
-{
+{
asize_t size;
value * new_low, * new_high, * new_sp;
value * p;
diff --git a/debugger/show_source.ml b/debugger/show_source.ml
index 2e386d0df0..7f8e226d07 100644
--- a/debugger/show_source.ml
+++ b/debugger/show_source.ml
@@ -47,16 +47,16 @@ let show_point mdle point before selected =
if !emacs & selected then
begin try
let source = source_of_module mdle in
- print_string "\026\026M";
- print_string source;
- print_string ":";
- print_int point;
- print_string (if before then ":before" else ":after");
- print_newline ()
+ print_string "\026\026M";
+ print_string source;
+ print_string ":";
+ print_int point;
+ print_string (if before then ":before" else ":after");
+ print_newline ()
with
Not_found -> (* get_buffer *)
prerr_endline ("No source file for " ^ mdle ^ ".");
- show_no_point ()
+ show_no_point ()
end
else
begin try
diff --git a/emacs/caml-compat.el b/emacs/caml-compat.el
index dfe0ed78ff..63b4a480fd 100644
--- a/emacs/caml-compat.el
+++ b/emacs/caml-compat.el
@@ -9,10 +9,10 @@
This function removes or adds spaces and tabs at beginning of line
only if necessary. It leaves point at end of indentation."
(if (= (current-indentation) column)
- (back-to-indentation)
- (beginning-of-line 1)
- (delete-horizontal-space)
- (indent-to column))))
+ (back-to-indentation)
+ (beginning-of-line 1)
+ (delete-horizontal-space)
+ (indent-to column))))
;; buffer-substring-no-properties
diff --git a/emacs/ocamltags.in b/emacs/ocamltags.in
index 8da00e26db..a67565394e 100644
--- a/emacs/ocamltags.in
+++ b/emacs/ocamltags.in
@@ -23,8 +23,8 @@
;; collect definitions
(while (caml-prev-index-position-function)
(if (looking-at "[ \t]*val") nil
- (setq index (cons (caml-match-string 5) (point)))
- (setq all-alist (cons index all-alist))))
+ (setq index (cons (caml-match-string 5) (point)))
+ (setq all-alist (cons index all-alist))))
all-alist))
(defun caml-tags-file (filename)
@@ -91,7 +91,7 @@
(prin1 (car tail)))
(setq tail (cdr tail) i (1+ i)))
(princ "\n")))
-
+
(setq gc-cons-threshold 1000000)
diff --git a/otherlibs/db/db.ml b/otherlibs/db/db.ml
index 129b690b9d..c1f0428ef7 100644
--- a/otherlibs/db/db.ml
+++ b/otherlibs/db/db.ml
@@ -83,29 +83,29 @@ external sync : t -> unit
(* Wrap-up as for other table-like types *)
let add db x v = put db x v [R_NOOVERWRITE]
let find db x = get db x []
-let find_all db x =
+let find_all db x =
try
match seq db x [R_CURSOR] with
k, v when k = x ->
- let l = ref [v] in
- begin
- try
- while true do
- let k, v = seq db x [R_NEXT] in
- if k = x then l := v :: !l
- else raise Exit
- done;
- !l
- with
- Exit | Not_found -> !l
- end
+ let l = ref [v] in
+ begin
+ try
+ while true do
+ let k, v = seq db x [R_NEXT] in
+ if k = x then l := v :: !l
+ else raise Exit
+ done;
+ !l
+ with
+ Exit | Not_found -> !l
+ end
| _ -> (* its greater than x *) []
with
Not_found -> []
let remove db x = del db x []
-let iter f db =
+let iter f db =
let rec walk k =
let k, v = seq db k [R_NEXT] in
f k v;
@@ -117,4 +117,3 @@ let iter f db =
walk k
with
Not_found -> ()
-
diff --git a/otherlibs/db/dbstubs.c b/otherlibs/db/dbstubs.c
index 585d410b6d..698d6fa5f4 100644
--- a/otherlibs/db/dbstubs.c
+++ b/otherlibs/db/dbstubs.c
@@ -28,7 +28,7 @@
#include <string.h>
#include "dbstubs.h"
-/* This MUST be in the same order as in dbm.mli
+/* This MUST be in the same order as in dbm.mli
* We take a minimum (check O_NONBLOCK ?)
*/
static int db_open_flags[] = {
@@ -73,7 +73,7 @@ static void caml_db_free(value cdb)
/*
* The primitives
*/
-value caml_db_close(value cdb) /* ML */
+value caml_db_close(value cdb) /* ML */
{
if (caml_db_close_internal(cdb) == 0)
return Val_unit;
@@ -86,7 +86,7 @@ value caml_db_del(value cdb, value key, value vflags) /* ML */
/* Note: we could check that db is still open */
DBT dbt;
int flags;
-
+
Assert(Is_string(key));
dbt.data = String_val(key);
dbt.size = string_length(key);
@@ -146,7 +146,7 @@ value caml_db_put(value cdb, value vkey, value vdata, value vflags) /* ML */
}
-value caml_db_seq(value cdb, value vkey, value vflags) /* ML */
+value caml_db_seq(value cdb, value vkey, value vflags) /* ML */
{
DBT key;
DBT data;
@@ -171,7 +171,7 @@ value caml_db_seq(value cdb, value vkey, value vflags) /* ML */
End_roots();
return res;
}
- case 1:
+ case 1:
raise_not_found();
default:
raise_db("seq");
@@ -179,7 +179,7 @@ value caml_db_seq(value cdb, value vkey, value vflags) /* ML */
}
-value caml_db_sync(value cdb) /* ML */
+value caml_db_sync(value cdb) /* ML */
{
if (0 == Camldb_db(cdb)->sync(Camldb_db(cdb), 0))
return Val_unit;
@@ -195,7 +195,7 @@ value caml_db_open(value vfile, value vflags, value vmode, value vpars) /* ML */
BTREEINFO *info;
DB *db;
- /* Infos for btree structure : 0 is default everywhere */
+ /* Infos for btree structure : 0 is default everywhere */
info = stat_alloc(sizeof(BTREEINFO));
bzero(info, sizeof(BTREEINFO));
@@ -204,17 +204,17 @@ value caml_db_open(value vfile, value vflags, value vmode, value vpars) /* ML */
if (Is_block(par)) { /* It's a non-constant constructor */
switch(Tag_val(par)) {
case 0: /* Cachesize */
- info->cachesize = Int_val(Field(par, 0));
+ info->cachesize = Int_val(Field(par, 0));
default:
- break;
+ break;
}
} else { /* It's a constant constructor */
switch (Int_val(par)) {
case 0: /* Duplicates */
- info->flags |= R_DUP;
- break;
+ info->flags |= R_DUP;
+ break;
default:
- break;
+ break;
}
}
vpars = Field(vpars, 1);
@@ -240,7 +240,7 @@ exception DBError of string
let _ = Callback.register_exception "dberror" (DBError "")
as well as a call to the init function.
*/
-value caml_db_init(value v) /* ML */
+value caml_db_init(value v) /* ML */
{
if (caml_db_exn == NULL)
caml_db_exn = caml_named_value("dberror");
diff --git a/otherlibs/graph/color.c b/otherlibs/graph/color.c
index 4dee537a95..2bde01cce1 100644
--- a/otherlibs/graph/color.c
+++ b/otherlibs/graph/color.c
@@ -76,7 +76,7 @@ unsigned long gr_pixel_rgb(int rgb)
i = (i + 1) & (Color_cache_size - 1);
if (i == h) {
/* Cache is full. Instead of inserting at slot h, which causes
- thrasing if many colors hash to the same value,
+ thrashing if many colors hash to the same value,
insert at h + n where n is pseudo-random and
smaller than Color_cache_slack */
int slack = num_overflows++ & (Color_cache_slack - 1);
@@ -120,8 +120,3 @@ value gr_set_color(value vrgb)
XSetForeground(grdisplay, grbstore.gc, grcolor);
return Val_unit;
}
-
-
-
-
-
diff --git a/otherlibs/graph/dump_img.c b/otherlibs/graph/dump_img.c
index a4e31689cb..b4d53f2023 100644
--- a/otherlibs/graph/dump_img.c
+++ b/otherlibs/graph/dump_img.c
@@ -37,21 +37,18 @@ value gr_dump_image(value image)
XGetImage(grdisplay, Data_im(image), 0, 0, width, height, (-1), ZPixmap);
for (i = 0; i < height; i++)
for (j = 0; j < width; j++)
- Field(Field(m, i), j) = Val_int(gr_rgb_pixel(XGetPixel(idata, j, i)));
+ Field(Field(m, i), j) = Val_int(gr_rgb_pixel(XGetPixel(idata, j, i)));
XDestroyImage(idata);
if (Mask_im(image) != None) {
imask =
- XGetImage(grdisplay, Mask_im(image), 0, 0, width, height, 1, ZPixmap);
+ XGetImage(grdisplay, Mask_im(image), 0, 0, width, height, 1, ZPixmap);
for (i = 0; i < height; i++)
- for (j = 0; j < width; j++)
- if (XGetPixel(imask, j, i) == 0)
- Field(Field(m, i), j) = Val_int(Transparent);
+ for (j = 0; j < width; j++)
+ if (XGetPixel(imask, j, i) == 0)
+ Field(Field(m, i), j) = Val_int(Transparent);
XDestroyImage(imask);
}
End_roots();
return m;
}
-
-
-
diff --git a/otherlibs/systhreads/event.ml b/otherlibs/systhreads/event.ml
index 21f0999ef2..972cce74c0 100644
--- a/otherlibs/systhreads/event.ml
+++ b/otherlibs/systhreads/event.ml
@@ -55,13 +55,13 @@ let new_channel () =
let masterlock = Mutex.create()
-let do_aborts abort_env genev performed =
+let do_aborts abort_env genev performed =
if abort_env <> [] then begin
if performed >= 0 then begin
let ids_done = snd genev.(performed) in
- List.iter
- (fun (id,f) -> if not (List.mem id ids_done) then f ())
- abort_env
+ List.iter
+ (fun (id,f) -> if not (List.mem id ids_done) then f ())
+ abort_env
end else begin
List.iter (fun (_,f) -> f ()) abort_env
end
@@ -110,25 +110,25 @@ let scramble_array a =
let gensym = let count = ref 0 in fun () -> incr count; !count
-let rec flatten_event
- (abort_list : int list)
+let rec flatten_event
+ (abort_list : int list)
(accu : ('a behavior * int list) list)
- (accu_abort : (int * (unit -> unit)) list)
+ (accu_abort : (int * (unit -> unit)) list)
ev =
match ev with
Communication bev -> ((bev,abort_list) :: accu) , accu_abort
| WrapAbort (ev,fn) ->
- let id = gensym () in
+ let id = gensym () in
flatten_event (id :: abort_list) accu ((id,fn)::accu_abort) ev
| Choose evl ->
let rec flatten_list accu' accu_abort'= function
- ev :: l ->
- let (accu'',accu_abort'') =
- flatten_event abort_list accu' accu_abort' ev in
- flatten_list accu'' accu_abort'' l
+ ev :: l ->
+ let (accu'',accu_abort'') =
+ flatten_event abort_list accu' accu_abort' ev in
+ flatten_list accu'' accu_abort'' l
| [] -> (accu',accu_abort') in
flatten_list accu accu_abort evl
- | Guard fn -> flatten_event abort_list accu accu_abort (fn ())
+ | Guard fn -> flatten_event abort_list accu accu_abort (fn ())
let sync ev =
let (evl,abort_env) = flatten_event [] [] [] ev in
diff --git a/otherlibs/systhreads/win32.c b/otherlibs/systhreads/win32.c
index 0b88e0e491..35a26ae392 100644
--- a/otherlibs/systhreads/win32.c
+++ b/otherlibs/systhreads/win32.c
@@ -253,7 +253,7 @@ value caml_thread_initialize(value unit) /* ML */
if (caml_mutex == NULL) caml_wthread_error("Thread.init");
/* Create a finalized value to hold thread handle */
vthread = alloc_final(sizeof(struct caml_thread_handle) / sizeof(value),
- caml_thread_finalize, 1, 1000);
+ caml_thread_finalize, 1, 1000);
((struct caml_thread_handle *)vthread)->handle = NULL;
/* Create a descriptor for the current thread */
descr = alloc_tuple(sizeof(struct caml_thread_descr) / sizeof(value));
@@ -326,7 +326,7 @@ static void caml_thread_start(caml_thread_t th)
/* Free the thread descriptor */
stat_free(th);
/* The thread now stops running */
-}
+}
value caml_thread_new(value clos) /* ML */
{
@@ -338,7 +338,7 @@ value caml_thread_new(value clos) /* ML */
Begin_roots2 (clos, vthread)
/* Create a finalized value to hold thread handle */
vthread = alloc_final(sizeof(struct caml_thread_handle) / sizeof(value),
- caml_thread_finalize, 1, 1000);
+ caml_thread_finalize, 1, 1000);
((struct caml_thread_handle *)vthread)->handle = NULL;
/* Create a descriptor for the new thread */
descr = alloc_tuple(sizeof(struct caml_thread_descr) / sizeof(value));
diff --git a/otherlibs/threads/Tests/testsieve.ml b/otherlibs/threads/Tests/testsieve.ml
index 3e707656d9..6079d8a8eb 100644
--- a/otherlibs/threads/Tests/testsieve.ml
+++ b/otherlibs/threads/Tests/testsieve.ml
@@ -3,24 +3,23 @@ let sieve primes=
Event.sync (Event.send primes 1);
Event.sync (Event.send primes 2);
let integers = Event.new_channel () in
- let rec enumerate n=
+ let rec enumerate n=
Event.sync (Event.send integers n);
enumerate (n + 2)
- and filter inpout =
- let n = Event.sync (Event.receive inpout)
- (* On prepare le terrain pour l'appel recursif
-*)
+ and filter inpout =
+ let n = Event.sync (Event.receive inpout)
+ (* On prepare le terrain pour l'appel recursif *)
and output = Event.new_channel () in
(* Celui qui etait en tete du crible est premier *)
Event.sync (Event.send primes n);
- Thread.create filter output;
+ Thread.create filter output;
(* On elimine de la sortie ceux qui sont des multiples de n *)
- while true do
- let m = Event.sync (Event.receive inpout) in
+ while true do
+ let m = Event.sync (Event.receive inpout) in
(* print_int n; print_string ": "; print_int m; print_newline(); *)
- if (m mod n) = 0
- then ()
- else ((Event.sync (Event.send output m));())
+ if (m mod n) = 0
+ then ()
+ else ((Event.sync (Event.send output m));())
done in
Thread.create filter integers;
Thread.create enumerate 3
@@ -36,8 +35,8 @@ let main _ =
done;
exit 0
done
-
-let _ =
+
+let _ =
try main ()
with _ -> exit 0;;
diff --git a/otherlibs/threads/event.ml b/otherlibs/threads/event.ml
index 21f0999ef2..972cce74c0 100644
--- a/otherlibs/threads/event.ml
+++ b/otherlibs/threads/event.ml
@@ -55,13 +55,13 @@ let new_channel () =
let masterlock = Mutex.create()
-let do_aborts abort_env genev performed =
+let do_aborts abort_env genev performed =
if abort_env <> [] then begin
if performed >= 0 then begin
let ids_done = snd genev.(performed) in
- List.iter
- (fun (id,f) -> if not (List.mem id ids_done) then f ())
- abort_env
+ List.iter
+ (fun (id,f) -> if not (List.mem id ids_done) then f ())
+ abort_env
end else begin
List.iter (fun (_,f) -> f ()) abort_env
end
@@ -110,25 +110,25 @@ let scramble_array a =
let gensym = let count = ref 0 in fun () -> incr count; !count
-let rec flatten_event
- (abort_list : int list)
+let rec flatten_event
+ (abort_list : int list)
(accu : ('a behavior * int list) list)
- (accu_abort : (int * (unit -> unit)) list)
+ (accu_abort : (int * (unit -> unit)) list)
ev =
match ev with
Communication bev -> ((bev,abort_list) :: accu) , accu_abort
| WrapAbort (ev,fn) ->
- let id = gensym () in
+ let id = gensym () in
flatten_event (id :: abort_list) accu ((id,fn)::accu_abort) ev
| Choose evl ->
let rec flatten_list accu' accu_abort'= function
- ev :: l ->
- let (accu'',accu_abort'') =
- flatten_event abort_list accu' accu_abort' ev in
- flatten_list accu'' accu_abort'' l
+ ev :: l ->
+ let (accu'',accu_abort'') =
+ flatten_event abort_list accu' accu_abort' ev in
+ flatten_list accu'' accu_abort'' l
| [] -> (accu',accu_abort') in
flatten_list accu accu_abort evl
- | Guard fn -> flatten_event abort_list accu accu_abort (fn ())
+ | Guard fn -> flatten_event abort_list accu accu_abort (fn ())
let sync ev =
let (evl,abort_env) = flatten_event [] [] [] ev in
diff --git a/otherlibs/threads/scheduler.c b/otherlibs/threads/scheduler.c
index b576a6ddc1..2ee82fb036 100644
--- a/otherlibs/threads/scheduler.c
+++ b/otherlibs/threads/scheduler.c
@@ -139,7 +139,7 @@ static void (*prev_scan_roots_hook) (scanning_action);
static void thread_scan_roots(scanning_action action)
{
thread_t th, start;
-
+
/* Scan all active descriptors */
start = curr_thread;
(*action)((value) curr_thread, (value *) &curr_thread);
@@ -410,7 +410,7 @@ try_again:
sys_error(NO_ARG);
}
if (retcode > 0) {
- /* Some descriptors are ready.
+ /* Some descriptors are ready.
Mark the corresponding threads runnable. */
FOREACH_THREAD(th)
if (retcode <= 0) break;
@@ -445,8 +445,8 @@ try_again:
Field(retval, 2) = e;
Assign(th->retval, retval);
th->status = RUNNABLE;
- if (run_thread == NULL) run_thread = th; /* Found one. */
- }
+ if (run_thread == NULL) run_thread = th; /* Found one. */
+ }
End_roots();
}
END_FOREACH(th);
@@ -732,10 +732,10 @@ static value inter_fdlist_set(value fdl, fd_set *set, int *count)
int fd = Int_val(Field(fdl, 0));
if (FD_ISSET(fd, set)) {
cons = alloc_small(2, 0);
- Field(cons, 0) = Val_int(fd);
- Field(cons, 1) = res;
- res = cons;
- FD_CLR(fd, set); /* wake up only one thread per fd ready */
+ Field(cons, 0) = Val_int(fd);
+ Field(cons, 1) = res;
+ res = cons;
+ FD_CLR(fd, set); /* wake up only one thread per fd ready */
(*count)--;
}
}
@@ -821,4 +821,3 @@ static void thread_restore_std_descr(void)
thread_set_nonblock(1, stdout_initial_status);
thread_set_nonblock(2, stderr_initial_status);
}
-
diff --git a/otherlibs/unix/select.c b/otherlibs/unix/select.c
index a0f600c5b3..3792341c07 100644
--- a/otherlibs/unix/select.c
+++ b/otherlibs/unix/select.c
@@ -59,10 +59,10 @@ static value fdset_to_fdlist(file_descr_set *fdset)
Begin_root(res);
for (i = FD_SETSIZE - 1; i >= 0; i--) {
if (FD_ISSET(i, fdset)) {
- value newres = alloc_small(2, 0);
- Field(newres, 0) = Val_int(i);
- Field(newres, 1) = res;
- res = newres;
+ value newres = alloc_small(2, 0);
+ Field(newres, 0) = Val_int(i);
+ Field(newres, 1) = res;
+ res = newres;
}
}
End_roots();
diff --git a/otherlibs/unix/sendrecv.c b/otherlibs/unix/sendrecv.c
index 5d40d8c5c7..7ecfa0c103 100644
--- a/otherlibs/unix/sendrecv.c
+++ b/otherlibs/unix/sendrecv.c
@@ -37,7 +37,7 @@ value unix_recv(value sock, value buff, value ofs, value len, value flags) /* ML
if (numbytes > UNIX_BUFFER_SIZE) numbytes = UNIX_BUFFER_SIZE;
enter_blocking_section();
ret = recv(Int_val(sock), iobuf, (int) numbytes,
- convert_flag_list(flags, msg_flag_table));
+ convert_flag_list(flags, msg_flag_table));
leave_blocking_section();
if (ret == -1) uerror("recv", Nothing);
bcopy(iobuf, &Byte(buff, Long_val(ofs)), ret);
@@ -59,8 +59,8 @@ value unix_recvfrom(value sock, value buff, value ofs, value len, value flags) /
sock_addr_len = sizeof(sock_addr);
enter_blocking_section();
ret = recvfrom(Int_val(sock), iobuf, (int) numbytes,
- convert_flag_list(flags, msg_flag_table),
- &sock_addr.s_gen, &sock_addr_len);
+ convert_flag_list(flags, msg_flag_table),
+ &sock_addr.s_gen, &sock_addr_len);
leave_blocking_section();
if (ret == -1) uerror("recvfrom", Nothing);
bcopy(iobuf, &Byte(buff, Long_val(ofs)), ret);
diff --git a/otherlibs/unix/socketaddr.c b/otherlibs/unix/socketaddr.c
index e9feff0fb0..7e760161eb 100644
--- a/otherlibs/unix/socketaddr.c
+++ b/otherlibs/unix/socketaddr.c
@@ -83,7 +83,7 @@ value alloc_sockaddr(void)
{ value n = copy_string(sock_addr.s_unix.sun_path);
Begin_root (n);
res = alloc_small(1, 0);
- Field(res,0) = n;
+ Field(res,0) = n;
End_roots();
break;
}
@@ -92,8 +92,8 @@ value alloc_sockaddr(void)
{ value a = alloc_inet_addr(sock_addr.s_inet.sin_addr.s_addr);
Begin_root (a);
res = alloc_small(2, 1);
- Field(res,0) = a;
- Field(res,1) = Val_int(ntohs(sock_addr.s_inet.sin_port));
+ Field(res,0) = a;
+ Field(res,1) = Val_int(ntohs(sock_addr.s_inet.sin_port));
End_roots();
break;
}
diff --git a/otherlibs/win32unix/gettimeofday.c b/otherlibs/win32unix/gettimeofday.c
index dd6f662831..7285a51d66 100644
--- a/otherlibs/win32unix/gettimeofday.c
+++ b/otherlibs/win32unix/gettimeofday.c
@@ -18,7 +18,7 @@
#include "unixsupport.h"
-static time_t initial_time = 0; /* 0 means uninitialized */
+static time_t initial_time = 0; /* 0 means uninitialized */
static DWORD initial_tickcount;
value unix_gettimeofday(value unit) /* ML */
@@ -29,6 +29,6 @@ value unix_gettimeofday(value unit) /* ML */
return copy_double((double) initial_time);
} else {
return copy_double(initial_time +
- (GetTickCount() - initial_tickcount) * 1e-3);
+ (GetTickCount() - initial_tickcount) * 1e-3);
}
}
diff --git a/otherlibs/win32unix/select.c b/otherlibs/win32unix/select.c
index 12f6e1b9e6..a8e92088b4 100644
--- a/otherlibs/win32unix/select.c
+++ b/otherlibs/win32unix/select.c
@@ -35,10 +35,10 @@ static value fdset_to_fdlist(value fdlist, fd_set *fdset)
for (/*nothing*/; fdlist != Val_int(0); fdlist = Field(fdlist, 1)) {
value s = Field(fdlist, 0);
if (FD_ISSET((SOCKET) Handle_val(s), fdset)) {
- value newres = alloc_small(2, 0);
- Field(newres, 0) = s;
- Field(newres, 1) = res;
- res = newres;
+ value newres = alloc_small(2, 0);
+ Field(newres, 0) = s;
+ Field(newres, 1) = res;
+ res = newres;
}
}
End_roots();
diff --git a/otherlibs/win32unix/sendrecv.c b/otherlibs/win32unix/sendrecv.c
index abee5942e1..62c862d6b6 100644
--- a/otherlibs/win32unix/sendrecv.c
+++ b/otherlibs/win32unix/sendrecv.c
@@ -33,7 +33,7 @@ value unix_recv(value sock, value buff, value ofs, value len, value flags)
if (numbytes > UNIX_BUFFER_SIZE) numbytes = UNIX_BUFFER_SIZE;
enter_blocking_section();
ret = recv((SOCKET) Handle_val(sock), iobuf, (int) numbytes,
- convert_flag_list(flags, msg_flag_table));
+ convert_flag_list(flags, msg_flag_table));
leave_blocking_section();
if (ret == -1) unix_error(WSAGetLastError(), "recv", Nothing);
bcopy(iobuf, &Byte(buff, Long_val(ofs)), ret);
@@ -55,9 +55,9 @@ value unix_recvfrom(value sock, value buff, value ofs, value len, value flags) /
sock_addr_len = sizeof(sock_addr);
enter_blocking_section();
ret = recvfrom((SOCKET) Handle_val(sock),
- iobuf, (int) numbytes,
- convert_flag_list(flags, msg_flag_table),
- &sock_addr.s_gen, &sock_addr_len);
+ iobuf, (int) numbytes,
+ convert_flag_list(flags, msg_flag_table),
+ &sock_addr.s_gen, &sock_addr_len);
leave_blocking_section();
if (ret == -1) unix_error(WSAGetLastError(), "recvfrom", Nothing);
bcopy(iobuf, &Byte(buff, Long_val(ofs)), ret);
@@ -98,7 +98,7 @@ value unix_sendto_native(value sock, value buff, value ofs, value len, value fla
bcopy(&Byte(buff, Long_val(ofs)), iobuf, numbytes);
enter_blocking_section();
ret = sendto((SOCKET) Handle_val(sock),
- iobuf, (int) numbytes,
+ iobuf, (int) numbytes,
convert_flag_list(flags, msg_flag_table),
&sock_addr.s_gen, sock_addr_len);
leave_blocking_section();
diff --git a/stdlib/gc.mli b/stdlib/gc.mli
index a4312f6efb..8d726a843a 100644
--- a/stdlib/gc.mli
+++ b/stdlib/gc.mli
@@ -91,7 +91,7 @@ type control = {
of live data. If [max_overhead] is set to 0, heap
compaction is triggered at the end of each major GC cycle
(this setting is intended for testing purposes only).
- If [max_overhead >= 1000000], compaction is never triggered.
+ If [max_overhead >= 1000000], compaction is never triggered.
Default: 1000000.
- [verbose] This value controls the GC messages on standard error output.
It is a sum of some of the following flags, to print messages
diff --git a/stdlib/stream.mli b/stdlib/stream.mli
index d7920bef93..20495ecbfc 100644
--- a/stdlib/stream.mli
+++ b/stdlib/stream.mli
@@ -15,14 +15,14 @@
(* Module [Stream]: streams and parsers *)
type 'a t
- (* The type of streams holding values of type ['a]. *)
+ (* The type of streams holding values of type ['a]. *)
exception Failure;;
- (* Raised by parsers when none of the first components of the stream
+ (* Raised by parsers when none of the first components of the stream
patterns is accepted. *)
exception Error of string;;
- (* Raised by parsers when the first component of a stream pattern is
- accepted, but one of the following components is rejected. *)
+ (* Raised by parsers when the first component of a stream pattern is
+ accepted, but one of the following components is rejected. *)
(** Stream builders *)
(* Warning: these functions create streams with fast access; it is illegal
@@ -30,7 +30,7 @@ exception Error of string;;
when accessing such mixed streams. *)
val from : (int -> 'a option) -> 'a t;;
- (* [Stream.from f] returns a stream built from the function [f].
+ (* [Stream.from f] returns a stream built from the function [f].
To create a new stream element, the function [f] is called with
the current stream count. The user function [f] must return either
[Some <value>] for a value or [None] to specify the end of the
@@ -41,7 +41,7 @@ val of_list : 'a list -> 'a t;;
val of_string : string -> char t;;
(* Return the stream of the characters of the string parameter. *)
val of_channel : in_channel -> char t;;
- (* Return the stream of the characters read from the input channel. *)
+ (* Return the stream of the characters read from the input channel. *)
(** Stream iterator *)
@@ -52,10 +52,10 @@ val iter : ('a -> unit) -> 'a t -> unit;;
(** Predefined parsers *)
val next : 'a t -> 'a;;
- (* Return the first element of the stream and remove it from the
+ (* Return the first element of the stream and remove it from the
stream. Raise [Stream.Failure] if the stream is empty. *)
val empty : 'a t -> unit;;
- (* Return [()] if the stream is empty, else raise [Stream.Failure]. *)
+ (* Return [()] if the stream is empty, else raise [Stream.Failure]. *)
(** Useful functions *)
@@ -66,7 +66,7 @@ val junk : 'a t -> unit;;
(* Remove the first element of the stream, possibly unfreezing
it before. *)
val count : 'a t -> int;;
- (* Return the current count of the stream elements, i.e. the number
+ (* Return the current count of the stream elements, i.e. the number
of the stream elements discarded. *)
val npeek : int -> 'a t -> 'a list;;
diff --git a/testasmcomp/alpha.S b/testasmcomp/alpha.S
index 88bc3c9328..d8851065c3 100644
--- a/testasmcomp/alpha.S
+++ b/testasmcomp/alpha.S
@@ -14,7 +14,7 @@
.globl call_gen_code
.ent call_gen_code
-
+
call_gen_code:
lda $sp, -80($sp)
stq $26, 0($sp)
@@ -41,7 +41,7 @@ call_gen_code:
ldt $f3, 48($sp)
ldt $f4, 56($sp)
ldt $f5, 64($sp)
- lda $sp, 80($sp)
+ lda $sp, 80($sp)
ret ($26)
.end call_gen_code
@@ -52,7 +52,7 @@ caml_c_call:
lda $sp, -16($sp)
stq $26, 0($sp)
stq $gp, 8($sp)
- mov $25, $27
+ mov $25, $27
jsr ($25)
ldq $26, 0($sp)
ldq $gp, 8($sp)
@@ -60,4 +60,3 @@ caml_c_call:
ret ($26)
.end caml_c_call
-
diff --git a/testasmcomp/mips.s b/testasmcomp/mips.s
index d32fb4126f..9fe9f94b60 100644
--- a/testasmcomp/mips.s
+++ b/testasmcomp/mips.s
@@ -15,7 +15,7 @@
.globl call_gen_code
.ent call_gen_code
call_gen_code:
- subu $sp, $sp, 0x90
+ subu $sp, $sp, 0x90
sd $31, 0x88($sp)
/* Save all callee-save registers */
sd $16, 0x0($sp)
diff --git a/tools/dumpobj.ml b/tools/dumpobj.ml
index b306984fde..d74786edfe 100644
--- a/tools/dumpobj.ml
+++ b/tools/dumpobj.ml
@@ -355,7 +355,7 @@ let op_shapes = [
];;
let print_instr ic =
- print_int (currpc ic); print_string "\t";
+ printf "%8d" (currpc ic);
let op = inputu ic in
if op >= Array.length names_of_instructions || op < 0
then (print_string "*** unknown opcode : "; print_int op)
@@ -381,11 +381,11 @@ let print_instr ic =
-> let n = inputu ic in
let orig = currpc ic in
for i = 0 to (n land 0xFFFF) - 1 do
- print_string "\n\tint "; print_int i; print_string " -> ";
+ print_string "\n int "; print_int i; print_string " -> ";
print_int(orig + inputs ic);
done;
for i = 0 to (n lsr 16) - 1 do
- print_string "\n\ttag "; print_int i; print_string " -> ";
+ print_string "\n tag "; print_int i; print_string " -> ";
print_int(orig + inputs ic);
done;
| Closurerec
@@ -413,12 +413,12 @@ let print_code ic len =
(* Dump relocation info *)
let print_reloc (info, pos) =
- printf "\t%d\t(%d)\t" pos (pos/4);
+ printf " %d (%d) " pos (pos/4);
match info with
Reloc_literal sc -> print_struct_const sc; printf "\n"
- | Reloc_getglobal id -> printf "require\t%s\n" (Ident.name id)
- | Reloc_setglobal id -> printf "provide\t%s\n" (Ident.name id)
- | Reloc_primitive s -> printf "prim\t%s\n" s
+ | Reloc_getglobal id -> printf "require %s\n" (Ident.name id)
+ | Reloc_setglobal id -> printf "provide %s\n" (Ident.name id)
+ | Reloc_primitive s -> printf "prim %s\n" s
(* Print a .zo file *)
diff --git a/tools/ocamlcp.ml b/tools/ocamlcp.ml
index aa2a92dd62..173b2ddd7c 100644
--- a/tools/ocamlcp.ml
+++ b/tools/ocamlcp.ml
@@ -83,7 +83,7 @@ let _ =
let status =
Sys.command
(Printf.sprintf "ocamlc -pp \"ocamlprof %s -instrument %s\" %s %s"
- !ismultithreaded
+ !ismultithreaded
(String.concat " " (List.rev !profargs))
(if !make_archive then "" else "profiling.cmo")
(String.concat " " (List.rev !compargs))) in
diff --git a/utils/nativeint.mli b/utils/nativeint.mli
index 0caecfc69a..cca8aa6c74 100644
--- a/utils/nativeint.mli
+++ b/utils/nativeint.mli
@@ -30,7 +30,7 @@ val shift: t -> int -> t
val logand: t -> t -> t
val logor: t -> t -> t
val logxor: t -> t -> t
- (* Bitwise and, or, xor *)
+ (* Bitwise and, or, xor *)
val sign: t -> int
(* [sign n1] returns [0] if [n1] is zero, a positive
integer if [n] is positive, and a negative integer if
diff --git a/yacc/reader.c b/yacc/reader.c
index 7aad1d77d7..9902d852a1 100644
--- a/yacc/reader.c
+++ b/yacc/reader.c
@@ -1222,7 +1222,7 @@ void copy_action(void)
for (i = 1; i <= n; i++) {
item = pitem[nitems + i - n - 1];
if (item->class == TERM && !item->tag) continue;
- fprintf(f, "\tlet _%d = ", i);
+ fprintf(f, " let _%d = ", i);
if (item->tag)
fprintf(f, "(peek_val parser_env %d : %s) in\n", n - i, item->tag);
else if (sflag)
@@ -1230,7 +1230,7 @@ void copy_action(void)
else
fprintf(f, "(peek_val parser_env %d : '%s) in\n", n - i, item->name);
}
- fprintf(f, "\tObj.repr((\n");
+ fprintf(f, " Obj.repr((\n");
fprintf(f, "# %d \"%s\"\n", lineno, input_file_name);
for (i = cptr - line; i >= 0; i--) fputc(' ', f);