Why do i get unreadable printout with the fopen() function ?
The argumens are well recognised
i used a filename for a file in the same drawer, a fullpath, a fullpath embedde in double quotes.
Allways the same result
int main ( int argc, char **argv ) { FILE *ListFP = NULL; STRPTR TargetFName, OutputFile, ListFileName; int rval = RETURN_OK, i = 0; // ----------------------------------------------------------------- struct RDArgs *rdargs; LONG args[] = { 0, 0, 0}; rdargs = ReadArgs("LISTFILE/A,OUTPUT/A, FUNCTION/A", args, NULL); if (argc != 4) /// was 3 , one more ? { fprintf( stderr, "usage LISTFILE/A,OUTPUT/A, FUNCTION/A \n"); return( RETURN_ERROR ); } if ((int32 *)args[0] != NULL) {ListFileName = (STRPTR)args[0];} if ((int32 *)args[1] != NULL) {OutputFile = (STRPTR)args[1];} if ((int32 *)args[2] != NULL) {TargetFName = (STRPTR)args[2];} FreeArgs (rdargs); if (!(ListFP = fopen( ListFileName, "r" ))) { rval = IoErr(); printf("main Opening file ListFileName %s\n",ListFileName); /// not seen fprintf( stderr, "problem opening %s\n", ListFileName ); goto ExitCallScan; } ExitCallScan: if (ListFP)/// (closeListfile == TRUE) fclose( ListFP ); return( rval ); }