Changeset e5db0a in git
- Timestamp:
- Sep 3, 2010, 11:21:59 AM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- e128fda56ac773be45f4a851d82371ff728c25a9
- Parents:
- 5e016e27b98b70a42edca584335f57145f3a8dc0
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r5e016e re5db0a 15 15 #include <signal.h> 16 16 #include <Singular/mod2.h> 17 #include <misc_ip.h> 17 18 18 19 #ifdef TIME_WITH_SYS_TIME … … 606 607 return FALSE; 607 608 } 609 /*==================== mpz_t loader ======================*/ 610 if(strcmp(sys_cmd, "GNUmpLoad")==0) 611 { 612 if ((h != NULL) && (h->Typ() == STRING_CMD)) 613 { 614 char* filename = (char*)h->Data(); 615 FILE* f = fopen(filename, "r"); printf("check 1\n"); 616 if (f == NULL) 617 { 618 Werror( "invalid file name (in paths use '/')"); 619 return FALSE; 620 } printf("check 2\n"); 621 mpz_t m; mpz_init(m); printf("check 3\n"); 622 mpz_inp_str(m, f, 10); printf("check 4\n"); 623 fclose(f); printf("check 5\n"); 624 number n = mpz2number(m); printf("check 6\n"); 625 res->rtyp = BIGINT_CMD; 626 res->data = (void*)n; 627 return FALSE; 628 } 629 else 630 { 631 Werror( "expected valid file name as a string"); 632 return FALSE; 633 } 634 } 608 635 /*==================== neworder =============================*/ 609 636 // should go below -
Singular/misc_ip.h
r5e016e re5db0a 24 24 #ifndef MISC_H 25 25 #define MISC_H 26 27 #include <kernel/structs.h> 26 28 27 29 // include basic SINGULAR structures
Note: See TracChangeset
for help on using the changeset viewer.