Changeset d9e190 in git
- Timestamp:
- Apr 21, 2011, 4:41:50 PM (12 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 6d28ba7962ff547926c1a0ce553ff7070a77746e
- Parents:
- 4f07ef5931598da3a05c62cb735d25ecaac0c5a9
- git-author:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-04-21 16:41:50+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:27+01:00
- Location:
- libpolys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/resources/feResource.cc
r4f07ef rd9e190 10 10 #include <unistd.h> 11 11 #include <string.h> 12 #include <unistd.h> 13 #include <sys/param.h> 12 14 13 15 #include "config.h" … … 15 17 16 18 #include "feResource.h" 17 18 19 // the following is needed due to 'program_invocation_name'20 #define _GNU_SOURCE21 #include <errno.h>22 19 23 20 … … 179 176 void feInitResources(char* argv0) 180 177 { 181 if (argv0==NULL)182 {183 argv0 = program_invocation_name;184 }185 186 178 #if defined(ix86_Win) && defined(__GNUC__) 187 179 if (cygwin32_posix_path_list_p (getenv("PATH"))) 188 180 fePathSep = ':'; 189 181 #endif 190 feArgv0 = omStrDup(argv0); 191 #ifdef RESOURCE_DEBUG 192 printf("feInitResources: entering with argv0=%s=\n", argv0); 182 if (argv0==NULL) 183 { 184 feArgv0 = (char*)omAlloc0(MAXPATHLEN+strlen("/Singular")); 185 getcwd(feArgv0,MAXPATHLEN); 186 strcpy(feArgv0+strlen(feArgv0),"/Singular"); 187 } 188 else 189 feArgv0 = omStrDup(argv0); 190 #ifdef RESOURCE_DEBUG 191 printf("feInitResources: entering with argv0=%s=\n", feArgv0); 193 192 #endif 194 193 // init some Resources -
libpolys/tests/coeffs_test.h
r4f07ef rd9e190 343 343 bool setUpWorld() { 344 344 clog << endl << ( "<world>" ) << endl; 345 feInitResources( );345 feInitResources(argv0); 346 346 return true; 347 347 } -
libpolys/tests/cxxtestgen.pl
r4f07ef rd9e190 536 536 sub writeMain() { 537 537 if ( $gui ) { 538 print "char* argv0;\n"; 538 539 print "int main( int argc, char *argv[] ) {\n"; 540 print "argv0 = argv[0];\n"; 539 541 $noStaticInit && 540 542 print " CxxTest::initialize();\n"; … … 543 545 } 544 546 elsif ( $runner ) { 545 print "int main() {\n"; 547 print "char* argv0;\n"; 548 print "int main( int argc, char *argv[] ) {\n"; 549 print "argv0 = argv[0];\n"; 546 550 $noStaticInit && 547 551 print " CxxTest::initialize();\n"; -
libpolys/tests/polys_test.h
r4f07ef rd9e190 37 37 bool setUpWorld() { 38 38 clog << ( "<world>" ) << endl; 39 feInitResources( );39 feInitResources(argv0); 40 40 41 41 TS_ASSERT_EQUALS( nRegister( n_Zp, npInitChar), n_Zp );
Note: See TracChangeset
for help on using the changeset viewer.