pfsclose.cpp (pfstools-2.1.0.tgz) | : | pfsclose.cpp (pfstools-2.2.0.tgz) | ||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
#include <octave/oct.h> | #include <octave/oct.h> | |||
#include <octave/oct-stream.h> | #include <octave/oct-stream.h> | |||
#include <octave/ov-struct.h> | #include <octave/ov-struct.h> | |||
//#include "../../config.h" // conflicts with config. h from octave distribution | //#include "../../config.h" // conflicts with config. h from octave distribution | |||
#include <string> | #include <string> | |||
#include <pfs.h> | #include <pfs.h> | |||
#if OCTAVE_MAJOR_VERSION < 4 || (OCTAVE_MAJOR_VERSION == 4 && OCTAVE_MINOR_VERSI | ||||
ON < 4) | ||||
#define isstruct is_map | ||||
#endif | ||||
#define SCRIPT_NAME "pfsclose" | #define SCRIPT_NAME "pfsclose" | |||
static const char *helpString = | static const char *helpString = | |||
#include "pfsclose_help.h" | #include "pfsclose_help.h" | |||
DEFUN_DLD( pfsclose, args, , helpString ) | DEFUN_DLD( pfsclose, args, , helpString ) | |||
{ | { | |||
octave_value_list retval; | octave_value_list retval; | |||
int nargin = args.length(); | int nargin = args.length(); | |||
// Get arguments and check if they are legal | // Get arguments and check if they are legal | |||
if( nargin != 1 || !args(0).is_map() ) | if( nargin != 1 || !args(0).isstruct() ) | |||
{ | { | |||
error( SCRIPT_NAME ": Improper usage!"); | error( SCRIPT_NAME ": Improper usage!"); | |||
return retval; | return retval; | |||
} | } | |||
octave_map pfsStream = args(0).map_value(); | octave_map pfsStream = args(0).map_value(); | |||
octave_scalar_map::const_iterator itFH = pfsStream.seek( "FH" ); | octave_scalar_map::const_iterator itFH = pfsStream.seek( "FH" ); | |||
if( itFH == pfsStream.end() || | if( itFH == pfsStream.end() || | |||
!pfsStream.contents( itFH )(0).is_real_scalar() ) | !pfsStream.contents( itFH )(0).is_real_scalar() ) | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 6 lines changed or added |