Skip to content

Commit 0a1ce56

Browse files
authored
Merge branch 'master' into scm801
2 parents 0ce74a1 + 7764c3a commit 0a1ce56

File tree

7 files changed

+16
-18
lines changed

7 files changed

+16
-18
lines changed

doc/rst/source/devdocs/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ using the following steps:
440440
- Run ``dvc diff`` to check that modified files are in the correct directory.
441441
- Add the modified images to dvc using ``dvc add test/baseline/<module>/<newplot.ps>``, ``dvc add doc/scripts/images/<newplot.ps>``,
442442
or ``dvc add doc/examples/images/<newplot.ps>``
443-
depending on the type of test modified. RUn one dvc add command per updated PostScript plot.
443+
depending on the type of test modified. Run one dvc add command per updated PostScript plot.
444444
- Check that the .dvc file was updated by running ``git status``.
445445
- Stage the modified .dvc files in git using ``git add test/baseline/<module>/<newplot.ps>.dvc``, ``git add doc/scripts/images/<newplot.ps>.dvc``,
446446
or ``git add doc/examples/images/<newplot.ps>.dvc``, again per updated file.

src/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ message (STATUS "Searching dependent libraries. This may take a few minutes...")
139139
find_package (NETCDF REQUIRED)
140140
include_directories (${NETCDF_INCLUDE_DIR})
141141

142-
# libcurl is required since 5.4
143-
find_package (CURL REQUIRED)
142+
# libcurl is required since GMT 5.4
143+
# At least version 7.55.0 is needed for src/gmt_remote.c
144+
find_package (CURL 7.55.0 REQUIRED)
144145
include_directories (${CURL_INCLUDE_DIRS})
145146
list (APPEND GMT_OPTIONAL_LIBRARIES ${CURL_LIBRARIES})
146147
set (CURL_LIBRARY ${CURL_LIBRARIES} CACHE INTERNAL "")

src/gmt_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,9 +1168,9 @@ GMT_LOCAL void gmtinit_translate_to_short_options(struct GMTAPI_CTRL *API, struc
11681168
and also note that at this point we will always be at GMT_MSG_WARNING or whatever
11691169
default verbosity level the program is initialized with -- fix this later (or not)! */
11701170
#endif /* 0 */
1171-
if (modified) {
1171+
if (modified && gmt_M_is_verbose (API->GMT, GMT_MSG_INFORMATION)) { /* Echo the converted options */
11721172
char *cmd = GMT_Create_Cmd (API, *options);
1173-
GMT_Report (API, GMT_MSG_WARNING, "Reformatted options: %s\n", cmd);
1173+
GMT_Report (API, GMT_MSG_INFORMATION, "Reformatted options: %s\n", cmd);
11741174
GMT_Destroy_Cmd (API, &cmd); /* Free string */
11751175
}
11761176
}

src/gmt_remote.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ GMT_LOCAL size_t gmtremote_skip_large_files (struct GMT_CTRL *GMT, char * URL, s
648648
/* Get the remote file's size and if too large we refuse to download */
649649
CURL *curl = NULL;
650650
CURLcode res;
651-
double filesize = 0.0;
651+
curl_off_t filesize = 0;
652652
size_t action = 0;
653653
char curl_useragent[GMT_LEN64];
654654

@@ -677,10 +677,10 @@ GMT_LOCAL size_t gmtremote_skip_large_files (struct GMT_CTRL *GMT, char * URL, s
677677
res = curl_easy_perform (curl);
678678

679679
if ((res = curl_easy_perform (curl)) == CURLE_OK) {
680-
res = curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
680+
res = curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &filesize);
681681
if ((res == CURLE_OK) && (filesize > 0.0)) { /* Got the size */
682682
GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Remote file %s: Size is %0.0f bytes\n", URL, filesize);
683-
action = (filesize < (double)limit) ? 0 : (size_t)filesize;
683+
action = ((size_t)filesize < limit) ? 0 : (size_t)filesize;
684684
}
685685
}
686686
else /* We failed */

src/grdedit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ EXTERN_MSC int GMT_grdedit (void *V_API, int mode, void *args) {
595595
if (Ctrl->A.active) {
596596
G->header->inc[GMT_X] = gmt_M_get_inc (GMT, G->header->wesn[XLO], G->header->wesn[XHI], G->header->n_columns, G->header->registration);
597597
G->header->inc[GMT_Y] = gmt_M_get_inc (GMT, G->header->wesn[YLO], G->header->wesn[YHI], G->header->n_rows, G->header->registration);
598-
GMT_Report (API, GMT_MSG_INFORMATION, "Reset grid-spacing in file %s to %g/%g\n",
598+
GMT_Report (API, GMT_MSG_INFORMATION, "Reset grid-spacing in file %s to %.14g/%.14g\n",
599599
out_file, G->header->inc[GMT_X], G->header->inc[GMT_Y]);
600600
}
601601
if (gmt_M_is_geographic (GMT, GMT_IN) && gmt_M_is_cartesian (GMT, GMT_OUT)) { /* Force a switch from geographic to Cartesian */

src/seis/gmtisf.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ static int parse(struct GMT_CTRL *GMT, struct READISF_CTRL *Ctrl, struct GMT_OPT
101101
* returned when registering these sources/destinations with the API.
102102
*/
103103

104-
unsigned int n_errors = 0, n_files = 0, pos = 0;
105-
int i, j, k;
106-
size_t n_alloc = 0, len;
107-
char txt_a[GMT_LEN256] = {""}, txt_b[GMT_LEN256] = {""}, p[GMT_BUFSIZ] = {""};
104+
unsigned int n_errors = 0, n_files = 0;
108105
char *pch = NULL;
109106
double t;
110107
struct GMT_OPTION *opt = NULL;
@@ -175,8 +172,7 @@ EXTERN_MSC int GMT_gmtisf(void *V_API, int mode, void *args) { /* High-level fun
175172
char f_type[6], f_plane[6];
176173
bool got_event = false, event_end, tensor_end, got_region = false;
177174
int error = GMT_NOERROR;
178-
int i, in, mag_c = 0, event_c, idx_min_rms, np, ns, n_out_cols;
179-
int export_aki = false, export_cmt = false, export_tensor = false;
175+
int i, mag_c = 0, event_c, idx_min_rms, np, ns, n_out_cols;
180176
int yyyy,mm,dd,hh,mi,ss,msec,strike,ndef,nsta,gap;
181177
int *years, *months, *days, *hours, *minutes;
182178
float stime,sdobs,lat,lon,depth,smaj,smin,sdepth,mindist,maxdist;
@@ -317,8 +313,9 @@ EXTERN_MSC int GMT_gmtisf(void *V_API, int mode, void *args) { /* High-level fun
317313
else if (!read_axes_head(line)) {
318314
if (fgets(line, ISF_LINE_LEN, fp) != NULL)
319315
if (!read_axes(line, &scale_factor, &t_val, &t_azim, &t_pl, &b_val, &b_azim,
320-
&b_pl, &p_val, &p_azim, &p_pl,author));
321-
tensor_end = true;
316+
&b_pl, &p_val, &p_azim, &p_pl,author))
317+
;
318+
tensor_end = true;
322319
}
323320
else if (tensor_end && !read_netmag_head(line)) {
324321
mag_c = read_mags(fp,line,magtype,&magind,&mag,&magerr,&nsta,author,origid,mag_t,mags);

src/seis/read_isf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int read_event_data(FILE *fp, char *line, int *yyyy, int *mm, int *dd, int *hh,
1414
int *months, int *days, int *hours, int *minutes, int *idx_min_rms) {
1515

1616
int done = false, event_c = 0;
17-
float rms_min = 1e9, gap_min = 360;
17+
float gap_min = 360;
1818
*idx_min_rms = 0; /* I'm currently using GAP instead of RMS */
1919

2020
while (!done && (fgets (line, ISF_LINE_LEN, fp) != NULL)) {

0 commit comments

Comments
 (0)