Back to index

texmacs  1.0.7.15
Functions
skeleton.cpp File Reference
#include "skeleton.hpp"

Go to the source code of this file.

Functions

bool var_path_inf_eq (path p1, path p2)
bool operator== (insertion ins1, insertion ins2)
bool operator!= (insertion ins1, insertion ins2)
bool operator< (insertion ins1, insertion ins2)
tm_ostreamoperator<< (tm_ostream &out, insertion ins)
bool operator== (pagelet pg1, pagelet pg2)
bool operator!= (pagelet pg1, pagelet pg2)
tm_ostreamoperator<< (tm_ostream &out, pagelet pg)
void sort (pagelet &pg)

Function Documentation

bool operator!= ( insertion  ins1,
insertion  ins2 
)

Definition at line 42 of file skeleton.cpp.

                                             {
  return
    (ins1->type  != ins2->type ) ||
    (ins1->begin != ins2->begin) ||
    (ins1->end   != ins2->end  ) ||
    (ins1->sk    != ins2->sk   );
}
bool operator!= ( pagelet  pg1,
pagelet  pg2 
)

Definition at line 78 of file skeleton.cpp.

                                       {
  if (is_nil (pg1) || is_nil (pg2)) return is_nil (pg1) != is_nil (pg2);
  return (pg1->ins != pg2->ins);
}

Here is the call graph for this function:

bool operator< ( insertion  ins1,
insertion  ins2 
)

Definition at line 51 of file skeleton.cpp.

                                            {
  if (ins1->type != ins2->type) {
    if (is_tuple (ins1->type, "footnote")) return false;
    if (is_tuple (ins2->type, "footnote")) return true;
    if (ins1->type == tuple ("float", "b")) return false;
    if (ins2->type == tuple ("float", "b")) return true;
    if (ins1->type == tuple ("float", "t")) return true;
    if (ins2->type == tuple ("float", "t")) return false;
  }
  return !var_path_inf_eq (ins2->begin, ins1->begin);
}

Here is the call graph for this function:

tm_ostream& operator<< ( tm_ostream out,
insertion  ins 
)

Definition at line 64 of file skeleton.cpp.

                                             {
  if (ins->type != "") out << ins->type << " ";
  out << "insertion [ " << ins->begin << " -- " << ins->end;
  if (N(ins->sk)>0) out << "; " << ins->sk;
  return out << " ]";
}

Here is the call graph for this function:

tm_ostream& operator<< ( tm_ostream out,
pagelet  pg 
)

Definition at line 84 of file skeleton.cpp.

                                          {
  return out << "pagelet " << pg->ins;
}
bool operator== ( insertion  ins1,
insertion  ins2 
)

Definition at line 33 of file skeleton.cpp.

                                             {
  return
    (ins1->type  == ins2->type ) &&
    (ins1->begin == ins2->begin) &&
    (ins1->end   == ins2->end  ) &&
    (ins1->sk    == ins2->sk   );
}
bool operator== ( pagelet  pg1,
pagelet  pg2 
)

Definition at line 72 of file skeleton.cpp.

                                       {
  if (is_nil (pg1) || is_nil (pg2)) return is_nil (pg1) == is_nil (pg2);
  return (pg1->ins == pg2->ins);
}

Here is the call graph for this function:

void sort ( pagelet pg)

Definition at line 89 of file skeleton.cpp.

                   {
  int i, n= N (pg->ins);
  while (true) {
    bool flag =true;
    for (i=0; i<n-1; i++)
      if (pg->ins[i+1] < pg->ins[i]) {
       insertion tmp= pg->ins[i];
       pg->ins[i]= pg->ins[i+1];
       pg->ins[i+1]= tmp;
       flag= false;
      }
    if (flag) break;
  }
}

Here is the call graph for this function:

bool var_path_inf_eq ( path  p1,
path  p2 
)

Definition at line 156 of file page_breaker.cpp.

                                   {
  if (is_nil (p1) || is_nil (p2)) return is_nil (p1);
  if (p1->item<p2->item) return true;
  if (p1->item>p2->item) return false;
  return var_path_inf_eq (p1->next, p2->next);
}

Here is the call graph for this function:

Here is the caller graph for this function: