Roxen.git / server / modules / tags / lisp.pike

version» Context lines:

Roxen.git/server/modules/tags/lisp.pike:1:   #define error(X) throw( ({ (X), backtrace() }) ) - constant cvs_version = "$Id: lisp.pike,v 1.8 1998/03/08 13:48:55 per Exp $"; + constant cvs_version = "$Id: lisp.pike,v 1.9 1998/05/18 22:02:03 per Exp $";      #include <module.h>   inherit "module";      constant thread_safe=1;      array register_module()   {    return ({ MODULE_PARSER, "Lisp tag module",    "This module defines a new tag, "
Roxen.git/server/modules/tags/lisp.pike:355:    {    string s = arglist->car->print(0);    len += strlen(s);    globals->lisp_result += s;    arglist = arglist->cdr;    }       return Number( len );   }    - #if 0 +    object f_format(object arglist, object env, object globals)   {    string f = arglist->car->value;    array args=({});    while( !(arglist = arglist->cdr)->is_nil)    {    if(objectp(arglist->car->value))    args+=({(int)arglist->car->value});    else    args+=({arglist->car->value});    }    if(!stringp(f)) {    return 0;    }    return String( sprintf(f, @args) );   }    -  + #if 0   object f_line_break(object arglist, object env, object globals)   {    string f = arglist->car->print();    int n = (arglist->cdr && (int)arglist->cdr->car->value) || 75;    string res = "";    while(strlen(f))    {    res += f[..n-1]+"\n";    f = f[n..];    }    return String( res );   }   #endif      void init_roxen_functions(object environment, object conf)   { -  // environment->extend(make_symbol("format"), Builtin(f_format)); +  environment->extend(make_symbol("format"), Builtin(f_format));       environment->extend(make_symbol("r-get-string"), Builtin(f_get));    environment->extend(make_symbol("r-get-int"), Builtin(f_getint));    environment->extend(make_symbol("write"), Builtin(f_write));    environment->extend(make_symbol("display"), Builtin(f_display));       // environment->extend(make_symbol("line-break"), Builtin(f_line_break));    // environment->extend(make_symbol("read"), Builtin(f_read));    // environment->extend(make_symbol("print"), Builtin(f_print));    // environment->extend(make_symbol("princ"), Builtin(f_print));