Go to the source code of this file.
Defines | |
| #define | retype_arraycp(to_t, to, from, size) |
| use type conversion to another (possibly) type, copy one array to another | |
| #define | NC_STATUS_CHECK(f) |
| handles the status of netcdf functions. It prints an appropriate message if a function would fail and quit with the status | |
| #define | message(...) |
| message from the program (with the program name in it) | |
| #define | fatal(errcode,...) |
| Fatal error message macro used for error messaging and program emergency exit. | |
| #define | warning(...) |
| Warning message with debug info. No emergency exit. | |
| #define fatal | ( | errcode, | |||
| ... | ) |
Value:
{ \
fprintf( stderr, __FILE__ ":%d\n", __LINE__ ); \
fprintf( stderr, " Error %d (" PROGRAM_NAME_BRIEF \
") at function %s:\n", errcode, __func__ ); \
fprintf( stderr, " " __VA_ARGS__ ); \
fprintf( stderr, "\n" ); \
exit( errcode ); \
}
| [in] | errcode | integer with the code number |
| [in] | ... | Any input to the printf function. |
if ( x == 0 ) fatal ( 1, "Division by zero" ); else if ( x == 1 ) fatal ( 2, "Wrong value of x (%d)", x );
Referenced by mfft_ibm_double(), mfft_ibm_float(), and readdata_alloc().
| #define message | ( | ... | ) |
Value:
{ \
printf( "(" PROGRAM_NAME_BRIEF ") " __VA_ARGS__ ); \
printf( "\n" ); \
}
Referenced by main(), mfft_fftw(), and mfft_ibm_float().
| #define NC_STATUS_CHECK | ( | f | ) |
Value:
{ \
int status = (f); \
if ( status != NC_NOERR ) \
{ \
fprintf( stderr, __FILE__ ":%d, netCDF API: ", __LINE__); \
fprintf( stderr, "%s\n", nc_strerror( status ) ); \
exit( status ); \
} \
}
| #define retype_arraycp | ( | to_t, | |||
| to, | |||||
| from, | |||||
| size | ) |
Value:
{ \
for( size_t _k = 0; _k < (size); ++_k ) (to)[_k] = (to_t) (from)[_k]; \
}
| [in] | to_t | new type of elements |
| [out] | to | destination array |
| [in] | from | source array |
| [in] | size | the size of arrays |
| #define warning | ( | ... | ) |
Value:
{ \
fprintf( stderr, __FILE__ ":%d\n", __LINE__ ); \
fprintf( stderr, " Warning (" PROGRAM_NAME_BRIEF \
") at function %s:\n", __func__ ); \
fprintf( stderr, " " __VA_ARGS__ ); \
fprintf( stderr, "\n" ); \
}
| [in] | ... | Any input to the printf function. |
1.5.7.1