]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_utils.C
my changes during the holidyas...i expect some compilers to have some problems, but...
[lyx.git] / src / mathed / math_utils.C
index a2a25b6ef410b00dc7f79e3062146da126403914..89f758519d829b2eb6613ac41862e54eeebaf913 100644 (file)
@@ -11,7 +11,8 @@
 
 #include <config.h>
 
-#include <stdlib.h>
+#include <cstdlib>
+
 #include "math_defs.h"
 #include "symbol_def.h"
 
@@ -54,7 +55,7 @@ struct binary_op_pair { short id, isrel; } binary_op_table[] = {
       { LM_ddagger, LMB_OPERATOR }
 };
 
-static int compara(const void *a, const void *b)
+extern "C" int compara(const void *a, const void *b)
 {
     int i = ((binary_op_pair const *)a)->id, j = ((binary_op_pair const*)b)->id;
     return i - j;
@@ -70,12 +71,12 @@ int MathedLookupBOP(short id)
        issorted = true;
     }
     
-   int result=0, m, k, l= 0, r = bopCount;
+   int result= 0, m, k, l= 0, r = bopCount;
   
    while (l < r) {
       m = (l+r)/2;
       k = binary_op_table[m].id - id;
-      if (k==0) {
+      if (k == 0) {
         result = binary_op_table[m].isrel;
         break;
       } else