Bug #1037

grd2xyz giving incorrect messages

Added by Joaquim over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:2017-02-06
Priority:NormalDue date:
Assignee:Paul% Done:


Target version:Candidate for next bugfix release
Affected version:5.3-svn Platform:


See forum topic http://gmt.soest.hawaii.edu/boards/1/topics/4685

The issue is that GMT_Put_Record() interprets as an error

case GMT_WRITE_DOUBLE:        /* Export either a formatted ASCII data record or a binary record */
if (API→GMT→common.b.ncol[GMT_OUT] == UINT_MAX) API→GMT→common.b.ncol[GMT_OUT] = API→GMT→common.b.ncol[GMT_IN];
error = API→GMT→current.io.output (API→GMT, S_obj→fp, API→GMT→common.b.ncol[GMT_OUT], record);

the output of gmt_z_output(), which on success returns the

return (err ? -1 : (int)n);    /* Return -1 if failed, else n items written */

All these "errors" accumulate in grd2xyz 'n_suppressed' and we get the wrong info.


#1 Updated by Paul over 3 years ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

The return codes from GMT_Put_Record were not processed properly. Fixed in r17588.

#2 Updated by Joaquim over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF