Main Page Class Hierarchy Compound List File List Compound Members File Members

# rw_mag.c File Reference

`#include <stdio.h>`
`#include <string.h>`
`#include <earthworm.h>`
`#include <rw_mag.h>`

Go to the source code of this file.

## Functions
int | strappend (char *s1, int s1max, char *s2)
int | tokenlength (char *begtok, char c)
int | rd_mag (char *msg, int msgLen, MAG_INFO *pMag)
int | rd_chan_mag (char *msg, int msglen, MAG_CHAN_INFO *pMci, int size_ml)
int | wr_mag (MAG_INFO *pMag, char *buf, int buflen)
int | wr_chan_mag (MAG_CHAN_INFO *pMci, int nchannels, char *buf, int buflen)

## Function Documentation

int rd_chan_mag | ( | char * | msg,
|  | int | msglen,
|  | MAG_CHAN_INFO * | pMci,
|  | int | size_ml
| ) |

| Definition at line 155 of file rw_mag.c. References _MAG_CHAN_INFO::Amp2, _MAG_CHAN_INFO::comp, _MAG_CHAN_INFO::net, _MAG_CHAN_INFO::Period2, _MAG_CHAN_INFO::sta, _MAG_CHAN_INFO::Time2, tokenlength(), TRACE_CHAN_LEN, TRACE_NET_LEN, and TRACE_STA_LEN. Referenced by rd_mag().

int rd_mag | ( | char * | msg,
|  | int | msgLen,
|  | MAG_INFO * | pMag
| ) |

| Definition at line 87 of file rw_mag.c. References _MAG_INFO::algorithm, _MAG_INFO::azimuth, _MAG_INFO::error, _MAG_INFO::imagtype, _MAG_INFO::mag, _MAG_INFO::mindist, _MAG_INFO::nchannels, _MAG_INFO::nstations, _MAG_INFO::origin_version, _MAG_INFO::pMagAux, _MAG_INFO::qauthor, _MAG_INFO::qdds_version, _MAG_INFO::qid, _MAG_INFO::quality, rd_chan_mag(), _MAG_INFO::size_aux, and _MAG_INFO::szmagtype.

int strappend | ( | char * | s1,
|  | int | s1max,
|  | char * | s2
| ) | `[static]`

| Definition at line 329 of file rw_mag.c.

int tokenlength | ( | char * | begtok,
|  | char | c
| ) | `[static]`

| Definition at line 342 of file rw_mag.c.

int wr_chan_mag | ( | MAG_CHAN_INFO * | pMci,
|  | int | nchannels,
|  | char * | buf,
|  | int | buflen
| ) |

| Definition at line 298 of file rw_mag.c. References strappend(). Referenced by wr_mag().

int wr_mag | ( | MAG_INFO * | pMag,
|  | char * | buf,
|  | int | buflen
| ) |

| Definition at line 239 of file rw_mag.c. References _MAG_INFO::algorithm, _MAG_INFO::azimuth, _MAG_INFO::error, _MAG_INFO::imagtype, _MAG_INFO::mag, _MAG_INFO::mindist, _MAG_INFO::nchannels, _MAG_INFO::nstations, _MAG_INFO::origin_version, _MAG_INFO::pMagAux, _MAG_INFO::qauthor, _MAG_INFO::qdds_version, _MAG_INFO::qid, _MAG_INFO::quality, strappend(), _MAG_INFO::szmagtype, and wr_chan_mag().