Changeset 584d1f1 in git for Singular/extra.cc


Ignore:
Timestamp:
Feb 16, 2001, 4:33:41 PM (23 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
9173792041b606db778caa93efbcb33cd4dab347
Parents:
b179b1987538b1a2bada58f749875535e6c772a7
Message:
win DLL stuff


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

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    rb179b1 r584d1f1  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.159 2001-02-15 14:04:31 levandov Exp $ */
     4/* $Id: extra.cc,v 1.160 2001-02-16 15:33:41 levandov Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    12731273#endif
    12741274#ifdef ix86_Win
     1275#ifdef HAVE_DL
    12751276/*==================== DLL =================*/
    12761277/* testing the DLL functionality under Win32 */
    1277     if (strcmp(sys_cmd, "DLL") == 0)
    1278     {
    1279       typedef void  (*Void_Func)();
    1280       typedef int  (*Int_Func)(int);
    1281       void *hh=dynl_open("WinDllTest.dll");
    1282       if ((h!=NULL) && (h->Typ()==INT_CMD))
    1283       {
    1284         int (*f)(int);
    1285         if (hh!=NULL)
    1286           {
    1287             int (*f)(int);
    1288             f=(Int_Func)dynl_sym(hh,"PlusDll");
    1289             int i=10;
    1290             if (f!=NULL) printf("%d\n",f(i));
    1291             else PrintS("cannot find PlusDll\n");
    1292           }
    1293       }
    1294       else
    1295         {       
    1296           void (*f)();
    1297           f= (Void_Func)dynl_sym(hh,"TestDll");
    1298           if (f!=NULL) f();
    1299           else PrintS("cannot find TestDll\n");
     1278      if (strcmp(sys_cmd, "DLL") == 0)
     1279        {
     1280          typedef void  (*Void_Func)();
     1281          typedef int  (*Int_Func)(int);
     1282          void *hh=dynl_open("WinDllTest.dll");
     1283          if ((h!=NULL) && (h->Typ()==INT_CMD))
     1284            {
     1285              int (*f)(int);
     1286              if (hh!=NULL)
     1287                {
     1288                  int (*f)(int);
     1289                  f=(Int_Func)dynl_sym(hh,"PlusDll");
     1290                  int i=10;
     1291                  if (f!=NULL) printf("%d\n",f(i));
     1292                  else PrintS("cannot find PlusDll\n");
     1293                }
     1294            }
     1295          else
     1296            {   
     1297              void (*f)();
     1298              f= (Void_Func)dynl_sym(hh,"TestDll");
     1299              if (f!=NULL) f();
     1300              else PrintS("cannot find TestDll\n");
     1301            }
     1302          return FALSE;
    13001303        }
    1301       return FALSE;
    1302     }
    1303     else
     1304      else
     1305#endif
    13041306#endif
    13051307/*==================== Error =================*/
Note: See TracChangeset for help on using the changeset viewer.