Changeset 8321
- Timestamp:
- 02/02/21 13:54:41 (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/reporting/ewhtmlemail/ewhtmlemail.c
r8310 r8321 46 46 /* 1.3.5 - 2020-12-22 - added OPTIONAL FromAddress setting for sendmail (UNIX only) */ 47 47 /* 1.3.6 - 2020-12-28 - added REGION name to ShowDetailedSubject, if part of a region decision */ 48 49 #define VERSION_STR "1.3.6 - 2021-01-02" 48 /* 1.3.7 - 2021-02-02 - sorted phases by distance as some hypoinverse files from dbselect output were SCNL sorted */ 49 50 #define VERSION_STR "1.3.7 - 2021-02-02" 50 51 51 52 #define MAX_GE_MARKERS 20 … … 254 255 static unsigned char TypeTraceBuf2 = 0; 255 256 257 /*-- this was in main, but now as a global variable --*/ 258 HypoArc *arc; // a hypoinverse ARC message currently being processed 259 static int phase_dist_compare( const void* a, const void* b ) { 260 int ret_value = 0; 261 struct Hpck *a_pick = (struct Hpck *) a, *b_pick = (struct Hpck *) b; 262 if (a_pick->dist < b_pick->dist) { 263 ret_value=-1; 264 } else if (a_pick->dist > b_pick->dist) { 265 ret_value=1; 266 } 267 return ret_value; 268 } 269 270 256 271 257 272 /* Error messages used by ewhtmlemail … … 278 293 unsigned char seq; 279 294 int i, j, res; 280 HypoArc *arc; // a hypoinverse ARC message281 295 MAG_INFO mag_l; // a magnitude message containing ML, after ARC 282 296 MAG_INFO mag_w; // a magnitude message containing Mw … … 623 637 arc = calloc(1, sizeof(HypoArc)); 624 638 parse_arc(msgbuf, arc); 639 qsort(arc->phases, arc->num_phases, sizeof(struct Hpck *), phase_dist_compare); 625 640 if (!UseML && !UseMW) { 626 641 process_message(arc, NULL, NULL, reclogo); … … 1763 1778 char phases[MAX_STATIONS][3]; /* Phase types of each trace */ 1764 1779 double arrivalTimes[MAX_STATIONS]; /* Arrival times of each trace */ 1765 1780 double residual[MAX_STATIONS]; /* phase residual */ 1766 1781 int coda_lengths[MAX_STATIONS]; /* Coda lengths of each trace */ 1767 1782 double coda_mags[MAX_STATIONS]; /* station coda mags > 0 if used */
Note: See TracChangeset
for help on using the changeset viewer.