Changeset 584d1f1 in git for Singular/extra.cc
- Timestamp:
- Feb 16, 2001, 4:33:41 PM (23 years ago)
- Branches:
- (u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
- Children:
- 9173792041b606db778caa93efbcb33cd4dab347
- Parents:
- b179b1987538b1a2bada58f749875535e6c772a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
rb179b1 r584d1f1 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: extra.cc,v 1.1 59 2001-02-15 14:04:31 levandov Exp $ */4 /* $Id: extra.cc,v 1.160 2001-02-16 15:33:41 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT: general interface to internals of Singular ("system" command) … … 1273 1273 #endif 1274 1274 #ifdef ix86_Win 1275 #ifdef HAVE_DL 1275 1276 /*==================== DLL =================*/ 1276 1277 /* 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; 1300 1303 } 1301 return FALSE; 1302 } 1303 else 1304 else 1305 #endif 1304 1306 #endif 1305 1307 /*==================== Error =================*/
Note: See TracChangeset
for help on using the changeset viewer.