chiark / gitweb /
Compiles with libc6.
[moebius.git] / graphics.cc
index 5fdfb25d6ba434675d85dd0222736a8093d0344f..ae1659e97b69b4cae05e1043d5ff0198345bac3c 100644 (file)
@@ -23,7 +23,8 @@ static int checkneededline(Onscreen a, Onscreen b) {
 void Cell::display(Output& o) {
   int nn[4];
   int totalnn= 0;
-  for (int i=0; i<4; i++) {
+  int i;
+  for (i=0; i<4; i++) {
     nn[i]= checkneededline(p[i],p[(i+1)&3]);
     totalnn+= nn[i];
   }
@@ -55,7 +56,8 @@ SortedCellList::Fragment* SortedCellList::insertfragment(int at) {
 
 void SortedCellList::insert(Cell *it) {
   double index= it->index();
-  for (int fragment= used-1;
+  int fragment;
+  for (fragment= used-1;
        fragment >= 0 && index < fragments[fragment]->entries[0].index;
        fragment--);
   if (fragment < 0) {
@@ -65,7 +67,8 @@ void SortedCellList::insert(Cell *it) {
     nf->entries[0].cell= it;
     return;
   }
-  for (int entry= 0;
+  int entry;
+  for (entry= 0;
        entry < fragments[fragment]->used &&
        index > fragments[fragment]->entries[entry].index;
        entry++);