changeset 465:e2899b4ff713

- // -> /* */, mainly for consistency (but also for a few obscure compilers)
author Tassilo Philipp
date Wed, 02 Feb 2022 12:55:23 +0100
parents bd65767c0534
children ddfb9577a00e
files dyncall/dyncall_callvm_mips_n64.c dyncall/dyncall_callvm_mips_o32.c dyncall/dyncall_callvm_x86.c dyncallback/dyncall_alloc_wx.h dyncallback/dyncall_callback_arch.S dyncallback/dyncall_callback_arm32.c dyncallback/dyncall_thunk_mips.h dyncallback/dyncallback.3 test/sign/sign.c test/suite/case.c
diffstat 10 files changed, 30 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/dyncall/dyncall_callvm_mips_n64.c	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncall/dyncall_callvm_mips_n64.c	Wed Feb 02 12:55:23 2022 +0100
@@ -150,7 +150,7 @@
 #else
   DCfloat f[] = {x,0.f};
 # if defined(DC__Endian_BIG)
-  // floats in regs always right justified
+  /* floats in regs always right justified */
   if (((DCCallVM_mips_n64*)in_self)->mRegCount < 8) {
     f[1] = f[0];
     f[0] = 0.f;
--- a/dyncall/dyncall_callvm_mips_o32.c	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncall/dyncall_callvm_mips_o32.c	Wed Feb 02 12:55:23 2022 +0100
@@ -125,7 +125,7 @@
 # if defined(DC__Endian_LITTLE)
     self->mRegData.u[self->mArgCount].f[0] = x;
 # else
-    self->mRegData.u[self->mArgCount].f[1] = x; // floats in regs always right justified
+    self->mRegData.u[self->mArgCount].f[1] = x; /* floats in regs always right justified */
 # endif
 # if 0
     self->mRegData.u[self->mArgCount].f[1] = x;
--- a/dyncall/dyncall_callvm_x86.c	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncall/dyncall_callvm_x86.c	Wed Feb 02 12:55:23 2022 +0100
@@ -605,7 +605,7 @@
 #if defined(DC_PLAN9)
     case DC_CALL_C_X86_PLAN9:          vt = &gVT_x86_plan9;          break;
 #else
-    case DC_CALL_C_X86_CDECL:          vt = &gVT_x86_cdecl;          break; // also handles DC_CALL_C_X86_WIN32_THIS_GNU
+    case DC_CALL_C_X86_CDECL:          vt = &gVT_x86_cdecl;          break; /* also handles DC_CALL_C_X86_WIN32_THIS_GNU */
     case DC_CALL_C_X86_WIN32_STD:      vt = &gVT_x86_win32_std;      break;
     case DC_CALL_C_X86_WIN32_FAST_MS:  vt = &gVT_x86_win32_fast_ms;  break;
     case DC_CALL_C_X86_WIN32_THIS_MS:  vt = &gVT_x86_win32_this_ms;  break;
--- a/dyncallback/dyncall_alloc_wx.h	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncallback/dyncall_alloc_wx.h	Wed Feb 02 12:55:23 2022 +0100
@@ -35,7 +35,7 @@
 extern "C" {
 #endif
 
-// returns 0 on success
+/* returns 0 on success */
 DCerror dcAllocWX   (DCsize size, void** p);
 DCerror dcInitExecWX(void* p, DCsize size);
 void    dcFreeWX    (void* p, DCsize size);
--- a/dyncallback/dyncall_callback_arch.S	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncallback/dyncall_callback_arch.S	Wed Feb 02 12:55:23 2022 +0100
@@ -52,7 +52,7 @@
 #    include "dyncall_callback_x86.S"
 #  elif defined(DC__Arch_ARM64)
 #    include "dyncall_callback_arm64.S"
-#  else // e.g. PowerPC G5, which is PPC64, etc.
+#  else /* e.g. PowerPC G5, which is PPC64, etc. */
 #    error Unsupported Architecture on Darwin/OS X.
 #  endif
 #else 
--- a/dyncallback/dyncall_callback_arm32.c	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncallback/dyncall_callback_arm32.c	Wed Feb 02 12:55:23 2022 +0100
@@ -33,9 +33,9 @@
 
 struct DCCallback
 {
-  DCThunk  	         thunk;    // offset 0
-  DCCallbackHandler* handler;  // offset 12
-  void*              userdata; // offset 16
+  DCThunk            thunk;    /* offset  0 */
+  DCCallbackHandler* handler;  /* offset 12 */
+  void*              userdata; /* offset 16 */
 };
 
 
--- a/dyncallback/dyncall_thunk_mips.h	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncallback/dyncall_thunk_mips.h	Wed Feb 02 12:55:23 2022 +0100
@@ -31,7 +31,7 @@
 {
   unsigned short data[6];
   unsigned int   jump;
-  unsigned short bddt[2]; // branch delay slots
+  unsigned short bddt[2]; /* branch delay slots */
 };
 
 #define DCTHUNK_MIPS_SIZE 20
--- a/dyncallback/dyncallback.3	Wed Feb 02 11:03:06 2022 +0100
+++ b/dyncallback/dyncallback.3	Wed Feb 02 12:55:23 2022 +0100
@@ -104,7 +104,7 @@
   double    arg4 = dcbArgDouble  (args);
   long long arg5 = dcbArgLongLong(args);
 
-  // .. do something ..
+  /* .. do something .. */
 
   result->s = 1244;
   return 's';
--- a/test/sign/sign.c	Wed Feb 02 11:03:06 2022 +0100
+++ b/test/sign/sign.c	Wed Feb 02 12:55:23 2022 +0100
@@ -26,20 +26,19 @@
 
 #include "dyncall.h"
 
-// This program demonstrates the need for 'unsigned' integers and the
-// ability to implement zero/sign extensions for small integers.
-// This test program indicates failure on powerpc 32-bit with
-// compiler optimizations enabled (e.g. '-O2' compilation flags).
-//
-// A fix to be incorporated in the API is also given.
-//
+/* This program demonstrates the need for 'unsigned' integers and the */
+/* ability to implement zero/sign extensions for small integers.      */
+/* This test program indicates failure on powerpc 32-bit with         */
+/* compiler optimizations enabled (e.g. '-O2' compilation flags).     */
+/*                                                                    */
+/* A fix to be incorporated in the API is also given.                 */
 
 int add1s(unsigned short x) { return x + 1; }
 
-// API BUGFIX:
+/* API BUGFIX: */
 #define dcArgUShort(vm,x) dcArgInt(vm,(int)(unsigned int)(x))
 
-// OLD TEST: int add1(unsigned char x) { return x + 1; }
+/* OLD TEST: int add1(unsigned char x) { return x + 1; } */
 
 int main(int argc, char* argv[])
 {
@@ -55,9 +54,8 @@
   printf("result: sign: %d\n", total); 
  
   if (!total) {
-    //
-    // TEST BUGFIX: use instead..
-    //
+
+    /* TEST BUGFIX: use instead.. */
     dcReset(vm);
     dcArgUShort( vm, 0xFFFF );
     result = dcCallInt( vm, &add1s );
@@ -65,14 +63,15 @@
     printf("result: sign (bugfix): %d\n", total); 
   }
   
-  // result = dcCallInt( vm, &add1s );
-  // total = (result == 0x10000);
+  /*result = dcCallInt( vm, &add1s );
+  total = (result == 0x10000);*/
   
-  // OLD TEST: updated to using 'short'
-  // dcArgChar( vm, (char) 255 );
-  // result = dcCallInt( vm, &add1 );
-  // total = (result == 256);
+  /*OLD TEST: updated to using 'short'
+  dcArgChar( vm, (char) 255 );
+  result = dcCallInt( vm, &add1 );
+  total = (result == 256);*/
   
-  // printf("result: sign: %d\n", total); 
+  /*printf("result: sign: %d\n", total); */
   return 0;
 }
+
--- a/test/suite/case.c	Wed Feb 02 11:03:06 2022 +0100
+++ b/test/suite/case.c	Wed Feb 02 12:55:23 2022 +0100
@@ -47,7 +47,7 @@
 int gID;
 int getId() { return gID; }
 
-// Generate function definitions.
+/* Generate function definitions. */
 #define VF0( id,                               S)  void S(                                                              ) {gID=id;                                                                                                                                    }
 #define VF1( id,A1,                            S)  void S(A1 a1                                                         ) {gID=id;g_##A1(a1,0);                                                                                                                       }
 #define VF2( id,A1,A2,                         S)  void S(A1 a1, A2 a2                                                  ) {gID=id;g_##A1(a1,0);g_##A2(a2,1);                                                                                                          }
@@ -62,7 +62,7 @@
 #include "case.h"
 
 
-// Generate function pointer table used for loop.
+/* Generate function pointer table used for loop. */
 #undef VF0
 #undef VF1
 #undef VF2