Added lines to change path when run on iPhone. Reason: iPhone operates in sandbox and so cannot write files just anywhere ... I use the documents folder in this test. gsoc2008_iphone
authorHolmes Futrell <hfutrell@umail.ucsb.edu>
Fri, 15 Aug 2008 00:57:58 +0000
branchgsoc2008_iphone
changeset 2432daf3baf72a45
parent 2431 7e449145b6ca
child 2433 450a9bf50c37
Added lines to change path when run on iPhone. Reason: iPhone operates in sandbox and so cannot write files just anywhere ... I use the documents folder in this test.
test/testfile.c
     1.1 --- a/test/testfile.c	Fri Aug 15 00:56:43 2008 +0000
     1.2 +++ b/test/testfile.c	Fri Aug 15 00:57:58 2008 +0000
     1.3 @@ -14,9 +14,14 @@
     1.4  #include <stdio.h>
     1.5  
     1.6  /* WARNING ! those 2 files will be destroyed by this test program */
     1.7 -#define FBASENAME1	"sdldata1"      /* this file will be created during tests */
     1.8 -#define FBASENAME2	"sdldata2"      /* this file should not exists before starting test */
     1.9  
    1.10 +#ifdef __IPHONEOS__
    1.11 +	#define FBASENAME1	"../Documents/sdldata1"      /* this file will be created during tests */
    1.12 +	#define FBASENAME2  "../Documents/sdldata2"		/* this file should not exist before starting test */
    1.13 +#else
    1.14 +	#define FBASENAME1	"sdldata1"      /* this file will be created during tests */
    1.15 +	#define FBASENAME2	"sdldata2"      /* this file should not exist before starting test */
    1.16 +#endif
    1.17  
    1.18  #ifndef NULL
    1.19  #define NULL ((void *)0)