From 3e57c5045666605b0a3bc2d3146253bca13befdc Mon Sep 17 00:00:00 2001 From: Scott Charlton Date: Thu, 9 Aug 2018 12:42:50 -0600 Subject: [PATCH] [iphreeqc] Changes for CRAN 3.4.7 --- R/Makefile | 3 +++ R/build-examples.R | 2 +- src/phreeqcpp/PBasic.cpp | 2 ++ src/phreeqcpp/cl1.cpp | 2 ++ src/phreeqcpp/cvode.cpp | 2 +- src/phreeqcpp/model.cpp | 4 ++-- src/phreeqcpp/print.cpp | 2 +- src/phreeqcpp/spread.cpp | 12 ++++++------ src/phreeqcpp/transport.cpp | 2 +- src/phreeqcpp/utilities.cpp | 2 ++ 10 files changed, 21 insertions(+), 12 deletions(-) diff --git a/R/Makefile b/R/Makefile index 2a88e386..1bbdad6a 100644 --- a/R/Makefile +++ b/R/Makefile @@ -250,6 +250,9 @@ $(DATADIR)/databases.rda : $(DBS) build-databases.R ex15.ascii : $(EXDIR)/ex15.dat perl -pe 's/[^[:ascii:]]/?/g' $< > $@ +ex21.ascii : $(EXDIR)/ex21 + perl -pe 's/[^[:ascii:]]/?/g' $< > $@ + %.ascii : $(DBDIR)/%.dat perl -pe 's/[^[:ascii:]]/?/g' $< > $@ diff --git a/R/build-examples.R b/R/build-examples.R index f18ebb85..06e4e7e0 100644 --- a/R/build-examples.R +++ b/R/build-examples.R @@ -33,7 +33,7 @@ ex18 <- scan("../phreeqc3-examples/ex18", what="", sep="\n") ex19 <- scan("../phreeqc3-examples/ex19", what="", sep="\n") ex20a <- scan("../phreeqc3-examples/ex20a", what="", sep="\n") ex20b <- scan("../phreeqc3-examples/ex20b", what="", sep="\n") -ex21 <- scan("../phreeqc3-examples/ex21", what="", sep="\n") +ex21 <- scan("ex21.ascii", what="", sep="\n") ex22 <- scan("../phreeqc3-examples/ex22", what="", sep="\n") save(list = ls(all=TRUE), file="phreeqc/data/examples.rda") diff --git a/src/phreeqcpp/PBasic.cpp b/src/phreeqcpp/PBasic.cpp index f8ac71f1..c0bc75dd 100644 --- a/src/phreeqcpp/PBasic.cpp +++ b/src/phreeqcpp/PBasic.cpp @@ -15,6 +15,8 @@ #include "Utils.h" #include "Solution.h" +#define register + /* Run-time library for PhreeqcPtr->use with "p2c", the Pascal to C translator */ /* "p2c" Copyright (C) 1989, 1990, 1991 Free Software Foundation. diff --git a/src/phreeqcpp/cl1.cpp b/src/phreeqcpp/cl1.cpp index ce47b201..e363e72b 100644 --- a/src/phreeqcpp/cl1.cpp +++ b/src/phreeqcpp/cl1.cpp @@ -5,6 +5,8 @@ #include "Phreeqc.h" #include "phqalloc.h" +#define register + /* debug #define DEBUG_CL1 #define CHECK_ERRORS diff --git a/src/phreeqcpp/cvode.cpp b/src/phreeqcpp/cvode.cpp index c03a679c..171ce1c1 100644 --- a/src/phreeqcpp/cvode.cpp +++ b/src/phreeqcpp/cvode.cpp @@ -3780,7 +3780,7 @@ CVsldet(CVodeMem cv_mem) rd2c = rd1c - rd1d; rd3a = rd2a - rd2b; rd3b = rd2b - rd2c; - rd3b = rd3b; + /* rd3b = rd3b; */ if (ABS(rd1b) < TINY * smax[k]) { diff --git a/src/phreeqcpp/model.cpp b/src/phreeqcpp/model.cpp index 6ab53c18..f89990a2 100644 --- a/src/phreeqcpp/model.cpp +++ b/src/phreeqcpp/model.cpp @@ -3054,8 +3054,8 @@ ss_binary(cxxSS *ss_ptr) xb2 = xb * xb; xb3 = xb2 * xb; xb4 = xb3 * xb; - xb4 = xb4; - xc3 = xc3; + /* xb4 = xb4; */ + /* xc3 = xc3; */ /* used derivation that did not substitute x2 = 1-x1 */ diff --git a/src/phreeqcpp/print.cpp b/src/phreeqcpp/print.cpp index ea62c4cd..ad04d4aa 100644 --- a/src/phreeqcpp/print.cpp +++ b/src/phreeqcpp/print.cpp @@ -285,7 +285,7 @@ print_diffuse_layer(cxxSurfaceCharge *charge_ptr) output_msg(sformatf( "\n\tSpecies \t Moles \tMoles excess\t g\n")); } - if (mass_water_surface = charge_ptr->Get_mass_water()) + if ((mass_water_surface = charge_ptr->Get_mass_water())) { count_elts = 0; paren_count = 0; diff --git a/src/phreeqcpp/spread.cpp b/src/phreeqcpp/spread.cpp index 8720fd56..c9e33274 100644 --- a/src/phreeqcpp/spread.cpp +++ b/src/phreeqcpp/spread.cpp @@ -142,7 +142,7 @@ read_solution_spread(void) copy_token(token, &ptr); if (token[0] == '-') { - opt = opt; + /* opt = opt; */ } else { @@ -155,7 +155,7 @@ read_solution_spread(void) case 10: /* water */ if ((count == 2 || count == 3) && num == TRUE) { - opt = opt; + /* opt = opt; */ } else { @@ -167,7 +167,7 @@ read_solution_spread(void) if ((count == 2 || count == 3 || count == 4) && num == TRUE) { - opt = opt; + /* opt = opt; */ } else { @@ -179,7 +179,7 @@ read_solution_spread(void) case 8: /* unit */ if (count == 2) { - opt = opt; + /* opt = opt; */ } else { @@ -193,7 +193,7 @@ read_solution_spread(void) } else { - opt = opt; + /* opt = opt; */ } break; case 11: /* isotope_uncertainty */ @@ -205,7 +205,7 @@ read_solution_spread(void) } else { - opt = opt; + /* opt = opt; */ } break; case 14: /* pressure */ diff --git a/src/phreeqcpp/transport.cpp b/src/phreeqcpp/transport.cpp index 9334779c..1887e88c 100644 --- a/src/phreeqcpp/transport.cpp +++ b/src/phreeqcpp/transport.cpp @@ -763,7 +763,7 @@ transport(void) */ if (b_c != 1) j = 1; - for (j = j; j <= nmix; j++) + for (/* j = j */; j <= nmix; j++) { if (multi_Dflag && j == nmix && (transport_step % print_modulus == 0)) { diff --git a/src/phreeqcpp/utilities.cpp b/src/phreeqcpp/utilities.cpp index b952c2d0..54247f76 100644 --- a/src/phreeqcpp/utilities.cpp +++ b/src/phreeqcpp/utilities.cpp @@ -6,6 +6,8 @@ #include "Solution.h" #include +#define register + /* ---------------------------------------------------------------------- */ int Phreeqc:: add_elt_list(struct elt_list *elt_list_ptr, LDBLE coef)