Permalink
Browse files

fix whitespace and over-long lines

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13436 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent 361803e commit 8d921d62a30ba9b0343b41b08d99c5add601f552 Damien Doligez committed Mar 22, 2013
Showing with 12 additions and 8 deletions.
  1. +5 −3 byterun/backtrace.c
  2. +2 −1 byterun/config.h
  3. +3 −3 byterun/instrtrace.c
  4. +2 −1 byterun/interp.c
View
@@ -13,13 +13,14 @@
/* Stack backtrace for uncaught exceptions */
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
-#include "config.h"
+#include <string.h>
#ifdef HAS_UNISTD
#include <unistd.h>
#endif
+#include "config.h"
#include "mlvalues.h"
#include "alloc.h"
#include "io.h"
@@ -315,7 +316,8 @@ CAMLprim value caml_get_exception_raw_backtrace(value unit)
CAMLlocal1(res);
res = caml_alloc(caml_backtrace_pos, Abstract_tag);
if(caml_backtrace_buffer != NULL)
- memcpy(&Field(res, 0), caml_backtrace_buffer, caml_backtrace_pos * sizeof(code_t));
+ memcpy(&Field(res, 0), caml_backtrace_buffer,
+ caml_backtrace_pos * sizeof(code_t));
CAMLreturn(res);
}
View
@@ -94,7 +94,8 @@ typedef struct { uint32 l, h; } uint64, int64;
/* We use threaded code interpretation if the compiler provides labels
as first-class values (GCC 2.x). */
-#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG) && !defined (SHRINKED_GNUC) && !defined(CAML_JIT)
+#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG) \
+ && !defined (SHRINKED_GNUC) && !defined(CAML_JIT)
#define THREADED_CODE
#endif
@@ -182,19 +182,19 @@ caml_trace_value_file (value v, code_t prog, int proglen, FILE * f)
if (prog && v % sizeof (int) == 0
&& (code_t) v >= prog
&& (code_t) v < (code_t) ((char *) prog + proglen))
- fprintf (f, "=code@%d", (code_t) v - prog);
+ fprintf (f, "=code@%ld", (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)
- fprintf (f, "=stack_%d", (intnat*)caml_stack_high - (intnat*)v);
+ fprintf (f, "=stack_%ld", (intnat*)caml_stack_high - (intnat*)v);
else if (Is_block (v)) {
int s = Wosize_val (v);
int tg = Tag_val (v);
int l = 0;
switch (tg) {
case Closure_tag:
- fprintf (f, "=closure[s%d,cod%d]", s, (code_t) (Code_val (v)) - prog);
+ fprintf (f, "=closure[s%ld,cod%ld]", s, (code_t) (Code_val (v)) - prog);
goto displayfields;
case String_tag:
l = caml_string_length (v);
View
@@ -111,7 +111,8 @@ sp is a local copy of the global variable caml_extern_sp. */
For GCC, I have hand-assigned hardware registers for several architectures.
*/
-#if defined(__GNUC__) && !defined(DEBUG) && !defined(__INTEL_COMPILER) && !defined(__llvm__)
+#if defined(__GNUC__) && !defined(DEBUG) && !defined(__INTEL_COMPILER) \
+ && !defined(__llvm__)
#ifdef __mips__
#define PC_REG asm("$16")
#define SP_REG asm("$17")

0 comments on commit 8d921d6

Please sign in to comment.