Back to index

cell.cpp File Reference
#include "Format/format.hpp"
#include "Table/table.hpp"
#include "Boxes/construct.hpp"

Go to the source code of this file.


void extract_format (tree fm, tree *r, int n)

Function Documentation

void extract_format ( tree  fm,
tree r,
int  n 

Definition at line 98 of file cell.cpp.

  int i;
  for (i=0; i<n; i++) r[i]= tree (TFORMAT);
  if (!is_func (fm, TFORMAT)) return;
  for (i=0; i<N(fm); i++)
    if (is_func (fm[i], CWITH))
      if ((N(fm[i]) >= 2) &&
         (is_int (fm[i][0])) &&
         (is_int (fm[i][1])))
         int k;
         int k1= as_int (fm[i][0]);
         int k2= as_int (fm[i][1]);
         tree u= fm[i] (2, N (fm[i]));
         if (k1>=0) k1--; else k1+=n;
         if (k2> 0) k2--; else k2+=n;
         if ((k1 >= n) || (k2 < 0)) continue;
         k1= max (k1, 0);
         k2= min (k2, n-1);
         for (k=k1; k<=k2; k++) r[k] << u;

Here is the call graph for this function:

Here is the caller graph for this function: