|
Line 0
Link Here
|
|
|
1 |
--- src/octave/pfsput.cpp.orig 2016-01-12 13:32:11.031123026 +0000 |
| 2 |
+++ src/octave/pfsput.cpp 2016-01-12 13:32:11.061123988 +0000 |
| 3 |
@@ -52,9 +52,9 @@ |
| 4 |
return retval; |
| 5 |
} |
| 6 |
|
| 7 |
- Octave_map pfsStream = args(0).map_value(); |
| 8 |
+ octave_map pfsStream = args(0).map_value(); |
| 9 |
|
| 10 |
- Octave_map::const_iterator itFH = pfsStream.seek( "FH" ); |
| 11 |
+ octave_map::const_iterator itFH = pfsStream.seek( "FH" ); |
| 12 |
if( itFH == pfsStream.end() || |
| 13 |
!pfsStream.contents( itFH )(0).is_real_scalar() ) |
| 14 |
{ |
| 15 |
@@ -65,7 +65,7 @@ |
| 16 |
|
| 17 |
// Check mode |
| 18 |
{ |
| 19 |
- Octave_map::const_iterator itMode = pfsStream.seek( "MODE" ); |
| 20 |
+ octave_map::const_iterator itMode = pfsStream.seek( "MODE" ); |
| 21 |
if( itMode == pfsStream.end() || !pfsStream.contents( itMode )(0).is_string() ) |
| 22 |
{ |
| 23 |
error( SCRIPT_NAME ": MODE field missing in the structure or it has wrong type"); |
| 24 |
@@ -80,8 +80,8 @@ |
| 25 |
// Get width & height |
| 26 |
int width, height; |
| 27 |
{ |
| 28 |
- Octave_map::const_iterator itCols = pfsStream.seek( "columns" ); |
| 29 |
- Octave_map::const_iterator itRows = pfsStream.seek( "rows" ); |
| 30 |
+ octave_map::const_iterator itCols = pfsStream.seek( "columns" ); |
| 31 |
+ octave_map::const_iterator itRows = pfsStream.seek( "rows" ); |
| 32 |
if( itCols == pfsStream.end() || itRows == pfsStream.end() || |
| 33 |
!pfsStream.contents( itCols )(0).is_real_scalar() || |
| 34 |
!pfsStream.contents( itRows )(0).is_real_scalar() ) |
| 35 |
@@ -94,9 +94,9 @@ |
| 36 |
} |
| 37 |
|
| 38 |
// Get channels |
| 39 |
- Octave_map channels; |
| 40 |
+ octave_map channels; |
| 41 |
{ |
| 42 |
- Octave_map::const_iterator itChannels = pfsStream.seek( "channels" ); |
| 43 |
+ octave_map::const_iterator itChannels = pfsStream.seek( "channels" ); |
| 44 |
if( itChannels == pfsStream.end() || |
| 45 |
!pfsStream.contents( itChannels )(0).is_map() ) |
| 46 |
{ |
| 47 |
@@ -111,7 +111,7 @@ |
| 48 |
pfs::Frame *frame = ctx.createFrame( width, height ); |
| 49 |
|
| 50 |
// For each channel in the 'channels' map |
| 51 |
- for( Octave_map::iterator itCh = channels.begin(); itCh != channels.end(); itCh++ ) { |
| 52 |
+ for( octave_map::iterator itCh = channels.begin(); itCh != channels.end(); itCh++ ) { |
| 53 |
std::string channelName = channels.key(itCh); |
| 54 |
|
| 55 |
if( !channels.contents( itCh )(0).is_real_matrix() ) { |
| 56 |
@@ -135,15 +135,15 @@ |
| 57 |
|
| 58 |
// Copy frame tags |
| 59 |
{ |
| 60 |
- Octave_map::const_iterator itTags = pfsStream.seek( "tags" ); |
| 61 |
+ octave_map::const_iterator itTags = pfsStream.seek( "tags" ); |
| 62 |
if( itTags != pfsStream.end() ) { |
| 63 |
if( !pfsStream.contents( itTags )(0).is_map() ) |
| 64 |
{ |
| 65 |
throw pfs::Exception( "'tags' field must be a structure" ); |
| 66 |
} |
| 67 |
|
| 68 |
- Octave_map tags = pfsStream.contents( itTags )(0).map_value(); |
| 69 |
- for( Octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { |
| 70 |
+ octave_map tags = pfsStream.contents( itTags )(0).map_value(); |
| 71 |
+ for( octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { |
| 72 |
std::string tagName = tags.key(itTag); |
| 73 |
|
| 74 |
if( !tags.contents( itTag )(0).is_string() ) |
| 75 |
@@ -156,14 +156,14 @@ |
| 76 |
|
| 77 |
// Copy channel tags |
| 78 |
{ |
| 79 |
- Octave_map::const_iterator itChTags = pfsStream.seek( "channelTags" ); |
| 80 |
+ octave_map::const_iterator itChTags = pfsStream.seek( "channelTags" ); |
| 81 |
if( itChTags != pfsStream.end() ) { |
| 82 |
if( !pfsStream.contents( itChTags )(0).is_map() ) |
| 83 |
{ |
| 84 |
throw pfs::Exception( "'channelTags' field must be a structure" ); |
| 85 |
} |
| 86 |
- Octave_map tagChannels = pfsStream.contents( itChTags )(0).map_value(); |
| 87 |
- for( Octave_map::iterator itCh = tagChannels.begin(); itCh != tagChannels.end(); itCh++ ) { |
| 88 |
+ octave_map tagChannels = pfsStream.contents( itChTags )(0).map_value(); |
| 89 |
+ for( octave_map::iterator itCh = tagChannels.begin(); itCh != tagChannels.end(); itCh++ ) { |
| 90 |
std::string channelName = tagChannels.key(itCh); |
| 91 |
if( !tagChannels.contents( itCh )(0).is_map() ) { |
| 92 |
throw pfs::Exception( "each channelTags file must be a structure" ); |
| 93 |
@@ -173,8 +173,8 @@ |
| 94 |
throw pfs::Exception( "can not set channel tag if channel is missing" ); |
| 95 |
} |
| 96 |
|
| 97 |
- Octave_map tags = tagChannels.contents( itCh )(0).map_value(); |
| 98 |
- for( Octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { |
| 99 |
+ octave_map tags = tagChannels.contents( itCh )(0).map_value(); |
| 100 |
+ for( octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) { |
| 101 |
std::string tagName = tags.key(itTag); |
| 102 |
if( !tags.contents( itTag )(0).is_string() ) |
| 103 |
throw pfs::Exception( "all channel tags must be given as strings" ); |