Changeset 1d1101 in git for Singular/iplib.cc


Ignore:
Timestamp:
Apr 27, 1998, 4:58:09 PM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
48ef1b78f26c10a268b5e62bb42f0787fe9e3b18
Parents:
9e2ba3333cb37221b091178f15de38c4f2cfbf24
Message:
Fixed exmaple bug
Added HAVE_DYNAMIC_LOADING


git-svn-id: file:///usr/local/Singular/svn/trunk@1490 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iplib.cc

    r9e2ba3 r1d1101  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iplib.cc,v 1.20 1998-04-27 12:34:16 obachman Exp $ */
     4/* $Id: iplib.cc,v 1.21 1998-04-27 14:58:09 krueger Exp $ */
    55/*
    66* ABSTRACT: interpreter: LIB and help
     
    194194    strcat(s+procbuflen-3, "\n;return();\n\n" );
    195195    p=strchr(s,'{');
    196     if (p!=NULL) *s=' ';
     196    if (p!=NULL) *p=' ';
    197197    return(s);
    198198  }
     
    322322  {
    323323    leftv res = (leftv)Alloc0(sizeof(sleftv));
     324    res->rtyp=NONE;
    324325    err = (pi->data.o.function)(res, sl);
    325326    iiRETURNEXPR[myynest+1].Copy(res);
     
    431432}
    432433
     434/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    433435BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror )
    434436{
     
    695697}
    696698
     699/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    697700procinfo *iiInitSingularProcinfo(procinfov pi, char *libname, char *procname,
    698701                                 int line, long pos, BOOLEAN pstatic)
     
    721724}
    722725
     726#ifdef HAVE_DYNAMIC_LOADING
     727/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
     728int iiAddCproc(char *libname, char *procname, BOOLEAN pstatic,
     729               BOOLEAN(*func)(leftv res, leftv v))
     730{
     731  procinfov pi;
     732  idhdl h;
     733
     734  h = enterid(mstrdup(procname),0, PROC_CMD, &idroot, FALSE);
     735  if ( h!= NULL ) {
     736    Print("register binary proc: %s::%s\n", libname, procname);
     737    pi = IDPROC(h);
     738    pi->libname = mstrdup(libname);
     739    pi->procname = mstrdup(procname);
     740    pi->language = LANG_C;
     741    pi->ref = 1;
     742    pi->is_static = pstatic;
     743    pi->data.o.function = func;
     744    return(1);
     745  } else {
     746    Print("iiAddCproc: failed.\n");
     747  }
     748  return(0);
     749}
     750#endif /* HAVE_DYNAMIC_LOADING */
     751
    723752/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    724753char *iiConvName(char *libname)
Note: See TracChangeset for help on using the changeset viewer.