MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtlib_io_binary_header

Function gmtlib_io_binary_header

src/gmt_io.c:6497–6506  ·  view source on GitHub ↗

! . */

Source from the content-addressed store, hash-verified

6495
6496/*! . */
6497void gmtlib_io_binary_header (struct GMT_CTRL *GMT, FILE *fp, unsigned int dir) {
6498 uint64_t k;
6499 char c = ' ';
6500 if (dir == GMT_IN) { /* Use fread since we don't know if input is a stream or a file */
6501 for (k = 0; k < GMT->current.setting.io_n_header_items; k++) (void)gmt_M_fread (&c, sizeof (char), 1U, fp);
6502 }
6503 else {
6504 for (k = 0; k < GMT->current.setting.io_n_header_items; k++) gmt_M_fwrite (&c, sizeof (char), 1U, fp);
6505 }
6506}
6507
6508/*! . */
6509bool gmt_byteswap_file (struct GMT_CTRL *GMT, FILE *outfp, FILE *infp, const SwapWidth swapwidth, const uint64_t offset, const uint64_t length) {

Callers 3

gmtapi_next_io_sourceFunction · 0.85
gmtlib_write_tableheaderFunction · 0.85
gmtlib_read_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected