Commit a82590fe authored by Matteo Quintiliani's avatar Matteo Quintiliani

Substitude *_LENGTH with NMXP_DATA_*_LENGTH


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@1233 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 2dd65775
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp_data.h,v 1.31 2009-03-10 16:57:07 mtheo Exp $
* $Id: nmxp_data.h,v 1.32 2009-03-10 17:01:50 mtheo Exp $
*
*/
......@@ -101,20 +101,20 @@ typedef struct {
#define NMXP_DATA_MAX_SIZE_DATE 200
/*! \brief Length in bytes of channel strings */
#define NETWORK_LENGTH 10
#define NMXP_DATA_NETWORK_LENGTH 10
/*! \brief Length in bytes of station strings */
#define STATION_LENGTH 10
#define NMXP_DATA_STATION_LENGTH 10
/*! \brief Length in bytes of channel strings */
#define CHANNEL_LENGTH 10
#define NMXP_DATA_CHANNEL_LENGTH 10
/*! \brief Parameter structure for functions that process data */
typedef struct {
int32_t key; /*!< \brief Channel Key */
char network[NETWORK_LENGTH]; /*!< \brief Network code */
char station[STATION_LENGTH]; /*!< \brief Station code */
char channel[CHANNEL_LENGTH]; /*!< \brief Channel code */
char network[NMXP_DATA_NETWORK_LENGTH]; /*!< \brief Network code */
char station[NMXP_DATA_STATION_LENGTH]; /*!< \brief Station code */
char channel[NMXP_DATA_CHANNEL_LENGTH]; /*!< \brief Channel code */
int32_t packet_type; /*!< \brief Packet type */
int32_t x0; /*!< \brief First sample. It is significant only if x0n_significant != 0 */
int32_t xn; /*!< \brief Last sample. It is significant only if x0n_significant != 0 */
......
......@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it
*
* $Id: nmxp_base.c,v 1.77 2009-03-10 16:36:25 mtheo Exp $
* $Id: nmxp_base.c,v 1.78 2009-03-10 17:01:50 mtheo Exp $
*
*/
......@@ -506,15 +506,15 @@ NMXP_DATA_PROCESS *nmxp_processDecompressedData(char* buffer_data, int length_da
pd.key = pKey;
if(network_code[0] != 0) {
strncpy(pd.network, network_code, NETWORK_LENGTH);
strncpy(pd.network, network_code, NMXP_DATA_NETWORK_LENGTH);
} else {
strncpy(pd.network, network_code_default, NETWORK_LENGTH);
strncpy(pd.network, network_code_default, NMXP_DATA_NETWORK_LENGTH);
}
if(station_code[0] != 0) {
strncpy(pd.station, station_code, STATION_LENGTH);
strncpy(pd.station, station_code, NMXP_DATA_STATION_LENGTH);
}
if(channel_code[0] != 0) {
strncpy(pd.channel, channel_code, CHANNEL_LENGTH);
strncpy(pd.channel, channel_code, NMXP_DATA_CHANNEL_LENGTH);
}
pd.packet_type = NMXP_MSG_DECOMPRESSED;
pd.x0 = -1;
......@@ -697,15 +697,15 @@ NMXP_DATA_PROCESS *nmxp_processCompressedData(char* buffer_data, int length_data
pd.key = pKey;
if(network_code[0] != 0) {
strncpy(pd.network, network_code, NETWORK_LENGTH);
strncpy(pd.network, network_code, NMXP_DATA_NETWORK_LENGTH);
} else {
strncpy(pd.network, network_code_default, NETWORK_LENGTH);
strncpy(pd.network, network_code_default, NMXP_DATA_NETWORK_LENGTH);
}
if(station_code[0] != 0) {
strncpy(pd.station, station_code, STATION_LENGTH);
strncpy(pd.station, station_code, NMXP_DATA_STATION_LENGTH);
}
if(channel_code[0] != 0) {
strncpy(pd.channel, channel_code, CHANNEL_LENGTH);
strncpy(pd.channel, channel_code, NMXP_DATA_CHANNEL_LENGTH);
}
pd.packet_type = nmx_ptype;
pd.x0 = nmx_x0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment