Back to index

texmacs  1.0.7.15
Defines | Typedefs | Functions | Variables
tinyscheme_tm.hpp File Reference
#include "scheme-private.h"
#include "string.hpp"
#include "array.hpp"
#include "blackbox.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TM_OP_APPLY   OP_APPLY
#define scm_install_procedure(name, func, args, p0, p1)   scm_define_glue( name, proc<func>)
#define SCM_ARG1
#define SCM_ARG2
#define SCM_ARG3
#define SCM_ARG4
#define SCM_ARG5
#define SCM_ARG6
#define SCM_ARG7
#define SCM_ARG8
#define TMSCM_ASSERT(_cond, _arg, _pos, _subr)

Typedefs

typedef cell_ptr scm
typedef foreign_func scm_foreign_func

Functions

scm scm_null ()
scm scm_true ()
scm scm_false ()
bool scm_is_equal (scm o1, scm o2)
bool scm_is_null (scm obj)
bool scm_is_pair (scm obj)
bool scm_is_list (scm obj)
bool scm_is_bool (scm obj)
bool scm_is_int (scm obj)
bool scm_is_double (scm obj)
bool scm_is_string (scm obj)
bool scm_is_symbol (scm obj)
bool scm_is_blackbox (scm obj)
scm scm_cons (scm obj1, scm obj2)
scm scm_car (scm obj)
scm scm_cdr (scm obj)
scm scm_caar (scm obj)
scm scm_cadr (scm obj)
scm scm_cdar (scm obj)
scm scm_cddr (scm obj)
scm scm_caddr (scm obj)
scm scm_cadddr (scm obj)
void scm_set_car (scm obj, scm obj2)
void scm_set_cdr (scm obj, scm obj2)
scm bool_to_scm (bool b)
scm int_to_scm (int i)
scm double_to_scm (double i)
scm blackbox_to_scm (blackbox b)
scm string_to_scm (string s)
scm symbol_to_scm (string s)
bool scm_to_bool (scm obj)
int scm_to_int (scm obj)
double scm_to_double (scm obj)
string scm_to_string (scm obj)
string scm_to_symbol (scm obj)
blackbox scm_to_blackbox (scm obj)
scm eval_scheme_file (string name)
scm eval_scheme (string s)
scm call_scheme (scm fun)
scm call_scheme (scm fun, scm a1)
scm call_scheme (scm fun, scm a1, scm a2)
scm call_scheme (scm fun, scm a1, scm a2, scm a3)
scm call_scheme (scm fun, scm a1, scm a2, scm a3, scm a4)
scm call_scheme (scm fun, array< scm > a)
template<scm(*)() PROC>
static scm proc (scheme *, scm)
string scheme_dialect ()
void scm_define_glue (const char *name, scm_foreign_func f)

Variables

schemethe_scheme

Define Documentation

#define SCM_ARG1

Definition at line 188 of file tinyscheme_tm.hpp.

#define SCM_ARG2

Definition at line 189 of file tinyscheme_tm.hpp.

#define SCM_ARG3

Definition at line 190 of file tinyscheme_tm.hpp.

#define SCM_ARG4

Definition at line 191 of file tinyscheme_tm.hpp.

#define SCM_ARG5

Definition at line 192 of file tinyscheme_tm.hpp.

#define SCM_ARG6

Definition at line 193 of file tinyscheme_tm.hpp.

#define SCM_ARG7

Definition at line 194 of file tinyscheme_tm.hpp.

#define SCM_ARG8

Definition at line 195 of file tinyscheme_tm.hpp.

#define scm_install_procedure (   name,
  func,
  args,
  p0,
  p1 
)    scm_define_glue( name, proc<func>)

Definition at line 186 of file tinyscheme_tm.hpp.

#define TM_OP_APPLY   OP_APPLY

Definition at line 19 of file tinyscheme_tm.hpp.

#define TMSCM_ASSERT (   _cond,
  _arg,
  _pos,
  _subr 
)

Definition at line 197 of file tinyscheme_tm.hpp.


Typedef Documentation

typedef cell_ptr scm

Definition at line 30 of file tinyscheme_tm.hpp.

Definition at line 181 of file tinyscheme_tm.hpp.


Function Documentation

scm blackbox_to_scm ( blackbox  b) [inline]

Definition at line 80 of file tinyscheme_tm.hpp.

{ return mk_blackbox (the_scheme,(void*)(tm_new<blackbox>(b))); } // CHECK

Here is the call graph for this function:

scm bool_to_scm ( bool  b) [inline]

Definition at line 77 of file tinyscheme_tm.hpp.

{ return b ? scm_true () : scm_false (); }

Here is the call graph for this function:

scm call_scheme ( scm  fun)

Definition at line 235 of file tinyscheme_tm.cpp.

                      {
       scm a[]= { fun }; arg_list args= { 0, a };
       return TeXmacs_call_scm (&args);
}

Here is the call graph for this function:

scm call_scheme ( scm  fun,
scm  a1 
)

Definition at line 241 of file tinyscheme_tm.cpp.

                              {
       scm a[]= { fun, a1 }; arg_list args= { 1, a };
       return TeXmacs_call_scm (&args);
}

Here is the call graph for this function:

scm call_scheme ( scm  fun,
scm  a1,
scm  a2 
)

Definition at line 247 of file tinyscheme_tm.cpp.

                                      {
       scm a[]= { fun, a1, a2 }; arg_list args= { 2, a };
       return TeXmacs_call_scm (&args);
}

Here is the call graph for this function:

scm call_scheme ( scm  fun,
scm  a1,
scm  a2,
scm  a3 
)

Definition at line 253 of file tinyscheme_tm.cpp.

                                              {
       scm a[]= { fun, a1, a2, a3 }; arg_list args= { 3, a };
       return TeXmacs_call_scm (&args);
}

Here is the call graph for this function:

scm call_scheme ( scm  fun,
scm  a1,
scm  a2,
scm  a3,
scm  a4 
)

Definition at line 259 of file tinyscheme_tm.cpp.

                                                      {
       scm a[]= { fun, a1, a2, a3, a4 }; arg_list args= { 4, a };
       return TeXmacs_call_scm (&args);
}

Here is the call graph for this function:

scm call_scheme ( scm  fun,
array< scm a 
)

Definition at line 265 of file tinyscheme_tm.cpp.

                                    {
       const int n= N(a);
       STACK_NEW_ARRAY(v, scm, n+1);
       int i;
       v[0]= fun;
       for (i=0; i<n; i++) v[i+1]= a[i];
       arg_list args= { n, v };
       scm ret= TeXmacs_call_scm (&args);
       STACK_DELETE_ARRAY(scm);
       return ret;
}

Here is the call graph for this function:

scm double_to_scm ( double  i) [inline]

Definition at line 79 of file tinyscheme_tm.hpp.

{ return mk_real (the_scheme,i); }

Here is the call graph for this function:

Definition at line 129 of file guile_tm.cpp.

                       {
       // cout << "Eval] " << s << "\n";
       char* _s= as_charp (s);
       SCM result= TeXmacs_eval_string (_s);
       tm_delete_array (_s);
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file guile_tm.cpp.

                               {
       //static int cumul= 0;
       //timer tm;
       if (DEBUG_STD) cout << "TeXmacs] Evaluating " << file << "...\n";
       char* _file= as_charp (file);
       SCM result= TeXmacs_eval_file (_file);
       tm_delete_array (_file);
       //int extra= tm->watch (); cumul += extra;
       //cout << extra << "\t" << cumul << "\t" << file << "\n";
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

scm int_to_scm ( int  i) [inline]

Definition at line 78 of file tinyscheme_tm.hpp.

{   return mk_integer (the_scheme,i); }

Here is the call graph for this function:

template<scm(*)() PROC>
static scm proc ( scheme ,
scm  args 
) [static]

Definition at line 109 of file tinyscheme_tm.hpp.

                                { 
       scm res = PROC();
       return (res);
}

Here is the caller graph for this function:

Definition at line 225 of file guile_tm.cpp.

                  {
#ifdef GUILE_A
       return "guile-a";
#else
#ifdef GUILE_B
       return "guile-b";
#else
#ifdef GUILE_C
       return "guile-c";
#else
#ifdef GUILE_D
       return "guile-d";
#else
       return "unknown";
#endif
#endif
#endif
#endif
}

Here is the caller graph for this function:

scm scm_caar ( scm  obj) [inline]

Definition at line 65 of file tinyscheme_tm.hpp.

{ return scm_car (scm_car (obj)); }

Here is the call graph for this function:

scm scm_cadddr ( scm  obj) [inline]

Definition at line 70 of file tinyscheme_tm.hpp.

{ return scm_caddr (scm_cdr (obj)); }

Here is the call graph for this function:

scm scm_caddr ( scm  obj) [inline]

Definition at line 69 of file tinyscheme_tm.hpp.

{ return scm_cadr (scm_cdr (obj)); }

Here is the call graph for this function:

Here is the caller graph for this function:

scm scm_cadr ( scm  obj) [inline]

Definition at line 66 of file tinyscheme_tm.hpp.

{ return scm_car (scm_cdr (obj)); }

Here is the call graph for this function:

Here is the caller graph for this function:

scm scm_car ( scm  obj) [inline]

Definition at line 63 of file tinyscheme_tm.hpp.

{ return pair_car (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

scm scm_cdar ( scm  obj) [inline]

Definition at line 67 of file tinyscheme_tm.hpp.

{ return scm_cdr (scm_car (obj)); }

Here is the call graph for this function:

scm scm_cddr ( scm  obj) [inline]

Definition at line 68 of file tinyscheme_tm.hpp.

{ return scm_cdr (scm_cdr (obj)); }

Here is the call graph for this function:

scm scm_cdr ( scm  obj) [inline]

Definition at line 64 of file tinyscheme_tm.hpp.

{ return pair_cdr (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

scm scm_cons ( scm  obj1,
scm  obj2 
) [inline]

Definition at line 62 of file tinyscheme_tm.hpp.

{ return _cons (the_scheme,obj1,obj2,0); }

Here is the call graph for this function:

Here is the caller graph for this function:

void scm_define_glue ( const char *  name,
scm_foreign_func  f 
)

Definition at line 288 of file tinyscheme_tm.cpp.

{
       //  cout << "Define glue: " << name << LF;
       scm_define(symbol_to_scm(name), mk_foreign_func (the_scheme, f));
}

Here is the call graph for this function:

scm scm_false ( ) [inline]

Definition at line 48 of file tinyscheme_tm.hpp.

{ return the_scheme->F; }

Here is the caller graph for this function:

bool scm_is_blackbox ( scm  obj) [inline]

Definition at line 60 of file tinyscheme_tm.hpp.

{ return is_blackbox (obj); }

Here is the call graph for this function:

bool scm_is_bool ( scm  obj) [inline]

Definition at line 55 of file tinyscheme_tm.hpp.

{ return ((obj == scm_true ()) || (obj == scm_false ())); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_double ( scm  obj) [inline]

Definition at line 57 of file tinyscheme_tm.hpp.

{ return is_real (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_equal ( scm  o1,
scm  o2 
) [inline]

Definition at line 50 of file tinyscheme_tm.hpp.

{ return (o1 == o2); }
bool scm_is_int ( scm  obj) [inline]

Definition at line 56 of file tinyscheme_tm.hpp.

{ return is_integer (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_list ( scm  obj) [inline]

Definition at line 54 of file tinyscheme_tm.hpp.

{ return scm_is_pair(obj) || scm_is_null(obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_null ( scm  obj) [inline]

Definition at line 52 of file tinyscheme_tm.hpp.

{ return (obj == scm_null()); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_pair ( scm  obj) [inline]

Definition at line 53 of file tinyscheme_tm.hpp.

{ return is_pair (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_string ( scm  obj) [inline]

Definition at line 58 of file tinyscheme_tm.hpp.

{ return is_string (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool scm_is_symbol ( scm  obj) [inline]

Definition at line 59 of file tinyscheme_tm.hpp.

{ return is_symbol (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

scm scm_null ( ) [inline]

Definition at line 46 of file tinyscheme_tm.hpp.

{ return the_scheme->NIL; }

Here is the caller graph for this function:

void scm_set_car ( scm  obj,
scm  obj2 
) [inline]

Definition at line 72 of file tinyscheme_tm.hpp.

{ set_car (obj, obj2); }

Here is the call graph for this function:

void scm_set_cdr ( scm  obj,
scm  obj2 
) [inline]

Definition at line 73 of file tinyscheme_tm.hpp.

{ set_cdr (obj, obj2); }

Here is the call graph for this function:

blackbox scm_to_blackbox ( scm  obj) [inline]

Definition at line 89 of file tinyscheme_tm.hpp.

{ return *(blackbox*)blackboxvalue(obj); }

Here is the call graph for this function:

bool scm_to_bool ( scm  obj) [inline]

Definition at line 84 of file tinyscheme_tm.hpp.

{ return (obj != scm_false()); } 

Here is the call graph for this function:

Here is the caller graph for this function:

double scm_to_double ( scm  obj) [inline]

Definition at line 86 of file tinyscheme_tm.hpp.

{ return rvalue (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

int scm_to_int ( scm  obj) [inline]

Definition at line 85 of file tinyscheme_tm.hpp.

{ return ivalue (obj); }

Here is the call graph for this function:

Here is the caller graph for this function:

string scm_to_string ( scm  obj) [inline]

Definition at line 87 of file tinyscheme_tm.hpp.

{ return string ( string_value (obj),  string_length (obj)); }

Here is the call graph for this function:

string scm_to_symbol ( scm  obj) [inline]

Definition at line 88 of file tinyscheme_tm.hpp.

{ return string (symname (obj),  symlen (obj)); }

Here is the call graph for this function:

scm scm_true ( ) [inline]

Definition at line 47 of file tinyscheme_tm.hpp.

{ return the_scheme->T; }

Here is the caller graph for this function:

Definition at line 302 of file tinyscheme_tm.cpp.

                         {
       char* _s= as_charp (s);
       scm r= mk_counted_string (the_scheme,_s, N(s));
       tm_delete_array (_s);
       return r;
}

Here is the call graph for this function:

Definition at line 314 of file tinyscheme_tm.cpp.

                         {
       char* _s= as_charp (s);
       scm r= mk_symbol (the_scheme,_s);
       tm_delete_array (_s);
       return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 22 of file tinyscheme_tm.cpp.