]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_iter.C
several changes and fixes. Read the ChangeLog
[lyx.git] / src / mathed / math_iter.C
index 74447273a2479ee8d5b4b85cf454c6d71898559e..8968d10871d4540f2a79168fdbb57bdd4d447f53 100644 (file)
@@ -7,7 +7,7 @@
  *
  *  Dependencies: Xlib, XForms
  *
- *  Copyright: (c) 1996, Alejandro Aguilar Sierra
+ *  Copyright: 1996, Alejandro Aguilar Sierra
  *
  *   Version: 0.8beta.
  *
@@ -27,6 +27,8 @@
 #include "support/lstrings.h"
 #include "debug.h"
 
+using std::endl;
+
 const int SizeInset = sizeof(char*) + 2;
 const int SizeFont = 2;
 
@@ -36,7 +38,8 @@ extern int mathed_char_height(short, int, byte, int&, int&);
 
 // the builtin memcpy() is broken in egcs and gcc 2.95.x on alpha
 // stations. We provide a hand-made version instead. 
-inline void my_memcpy( void * ps_in, const void * pt_in, size_t n )
+inline
+void my_memcpy( void * ps_in, const void * pt_in, size_t n )
 {
     char * ps = static_cast<char *>(ps_in);
     char const * pt = static_cast<char const *>(pt_in);
@@ -590,25 +593,25 @@ bool MathedXIter::Next()
 {  
 //    lyxerr << "Ne[" << pos << "]";
    if (!OK()) return false;
-   int w= 0;
+   int w = 0;
 //   lyxerr << "xt ";
    if (IsInset()) {
-      MathedInset* px = GetInset();
+      MathedInset * px = GetInset();
       w = px->Width();
       if (px->GetType() == LM_OT_SCRIPT) {
-        if (w>sw) sw = w;
+        if (w > sw) sw = w;
         w = 0;
       } else
-       sx = (px->GetLimits()) ? w: 0;
+       sx = (px->GetLimits()) ? w : 0;
    } else {  
       byte c = GetChar();
-      if (c>= ' ') {
+      if (c >= ' ') {
 //       lyxerr << "WD[" << fcode << " " << size << " " << c << endl;
          w = mathed_char_width(fcode, size, c);
       } else
       if (c == LM_TC_TAB && p) {
 //      w = p->GetTab(col+1);
-         w = (crow) ? crow->getTab(col+1): 0;
+         w = (crow) ? crow->getTab(col + 1) : 0;
         //lyxerr << "WW[" << w << "]";
       } else
       if (c == LM_TC_CR && p) {
@@ -626,9 +629,9 @@ bool MathedXIter::Next()
 //       lyxerr <<"LNX " << pos << endl;
 //       if (sw>0 && GetChar()!= LM_TC_UP && GetChar()!= LM_TC_DOWN) {
 //        w = (sx>sw) ? 0: sw-sx;
-      if ((sw>0 || sx>0) && GetChar()!= LM_TC_UP && GetChar()!= LM_TC_DOWN) {
-         if (sw>0)
-           w = (sx>sw) ? 0: sw-sx;
+      if ((sw > 0 || sx > 0) && GetChar() != LM_TC_UP && GetChar() != LM_TC_DOWN) {
+         if (sw > 0)
+           w = (sx > sw) ? 0 : sw - sx;
          sx = sw = 0;
       }
       x += w;