Back to index

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

Go to the source code of this file.

Functions

int total_size (list_environment l)
static void flatten (basic_environment &env, list_environment l)
basic_environment flatten (list_environment l)

Function Documentation

static void flatten ( basic_environment env,
list_environment  l 
) [static]

Definition at line 80 of file list_environment.cpp.

                                                     {
  if (is_nil (l->next))
    env->multiple_insert (l->env->a, l->env->n);
  else {
    flatten (env, l->next);
    env->multiple_write (l->env->a, l->env->n);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 90 of file list_environment.cpp.

                             {
  if (is_nil (l)) return basic_environment (2);
  if (is_nil (l->next)) return l->env;
  int size= total_size (l);
  int n=2;
  while (n < size) n= n<<1;
  basic_environment env (n);
  flatten (env, l);
  return env;
}

Here is the call graph for this function:

Definition at line 74 of file list_environment.cpp.

                                {
  if (is_nil (l)) return 0;
  return l->env->size + total_size (l->next);
}

Here is the call graph for this function: