Index: xdrffio.c =================================================================== RCS file: /upc/share/CVS/netcdf/libsrc/xdrffio.c,v retrieving revision 2.7 diff -c -r2.7 xdrffio.c *** 2.7 1996/06/27 19:38:48 --- xdrffio.c 1996/09/26 18:13:30 *************** *** 32,38 **** #include ! #include #include #include --- 32,38 ---- #include ! #include #include #include #include *************** *** 271,280 **** * strings */ - static char *mess1 = "Unable to open file: "; - static char *mess2 = "\n"; - static char *mess3 = "Error Explanation:"; - int NCxdrfile_create(xdrs, path, ncmode) XDR *xdrs ; --- 271,276 ---- *************** *** 335,341 **** /* wait for all PEs to complete open, as the FFIO layer will */ barrier(); #else ! fd = ffopens(path, fmode, 0666, 0, &stat, ControlString) ; #endif if( fd == -1 ) { /* SWANSON --- 331,337 ---- /* wait for all PEs to complete open, as the FFIO layer will */ barrier(); #else ! fd = ffopens(path, fmode, 0666, 0, (struct ffsw*)NULL, ControlString) ; #endif if( fd == -1 ) { /* SWANSON *************** *** 348,364 **** * * we will try to issue the message directly to * file handle 2 (stderr) - * */ ! write(2,mess1,strlen(mess1)); ! write(2,path,strlen(path)); ! write(2,mess2,1); /* end of line */ ! write(2,mess3,strlen(mess3)); /* start of line */ ! write(2,_fdc_errlist[stat.sw_error - 5000], ! strlen(_fdc_errlist[stat.sw_error - 5000])); ! write(2,mess2,1); /* end of line */ ! /* nc_serror("filename \"%s\"", path) ; */ return (-1); } if( ncmode & NC_CREAT ) { --- 344,382 ---- * * we will try to issue the message directly to * file handle 2 (stderr) */ ! #if 1 ! /* ! * I don't see it (nc_serror() doesn't allocate memory). Also, ! * Swanson's method seems to cause a segmentation violation in ! * some circumstances. --Steve Emmerson 1996-08-26 ! */ ! nc_serror("filename \"%s\"", path) ; ! #else ! /* ! * ! * I rewrote the method to elminate the segmentation violation ! * but have not yet decided to return to Swanson's method. ! * --Steve Emmerson 1996-09-26 ! */ ! if( ncopts & NC_VERBOSE ) ! { ! char *colon_space = ": "; ! char *filename_space_quote = "filename \""; ! char *quote_colon_space = "\": "; ! char *newline = "\n"; ! ! write(2,cdf_routine_name,strlen(cdf_routine_name)); ! write(2,colon_space,strlen(colon_space)); ! write(2,filename_space_quote,strlen(filename_space_quote)); ! write(2,path,strlen(path)); ! write(2,quote_colon_space,strlen(quote_colon_space)); ! write(2,strerror(errno),strlen(strerror(errno))); ! write(2,newline,strlen(newline)); ! return (-1); + } + #endif } if( ncmode & NC_CREAT ) {