Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26082
Modified Files: Tag: devel_0_38 s_loader.c Log Message: better error reporting for loading OSX externals
Index: s_loader.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 *** s_loader.c 10 Nov 2004 18:29:50 -0000 1.4.4.2 --- s_loader.c 24 Nov 2004 19:19:46 -0000 1.4.4.3 *************** *** 131,137 **** void *ret; NSSymbol s; ! if ( NSCreateObjectFileImageFromFile( filename, &image) != NSObjectFileImageSuccess ) { ! post("%s: couldn't load", filename); class_set_extern_dir(&s_); return 0; --- 131,149 ---- void *ret; NSSymbol s; ! NSObjectFileImageReturnCode err = NSCreateObjectFileImageFromFile( filename, &image); ! if(err != NSObjectFileImageSuccess ) { ! const char *errcode; ! switch(err) ! { ! case NSObjectFileImageFailure: errcode = "failure"; break; ! case NSObjectFileImageInappropriateFile: errcode = "inappropriate file"; break; ! case NSObjectFileImageArch: errcode = "wrong arch"; break; ! case NSObjectFileImageFormat: errcode = "wrong format"; break; ! case NSObjectFileImageAccess: errcode = "access failure"; break; ! default: errcode = "???"; ! } ! ! post("%s: couldn't load (%s)", filename,errcode); class_set_extern_dir(&s_); return 0;