Opened 5 months ago
Closed 5 months ago
#70248 closed defect (fixed)
cdf @3.8.1: Checksum mismatch
Reported by: | bernstei | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | ||
Port: | cdf |
Description
The cdf port (not netcdf), required by opendx, is failing to install with
bernstei@vpn214062 ~ % port install cdf ---> Computing dependencies for cdf ---> Fetching archive for cdf ---> Attempting to fetch cdf-3.8.1_0.darwin_23.arm64.tbz2 from https://mirrors.mit.edu/macports/packages/cdf ---> Attempting to fetch cdf-3.8.1_0.darwin_23.arm64.tbz2 from http://bos.us.packages.macports.org/cdf ---> Attempting to fetch cdf-3.8.1_0.darwin_23.arm64.tbz2 from https://packages.macports.org/cdf ---> Verifying checksums for cdf Error: Checksum (rmd160) mismatch for cdf38_1-dist-all.tar.gz Error: Checksum (sha256) mismatch for cdf38_1-dist-all.tar.gz Error: Checksum (size) mismatch for cdf38_1-dist-all.tar.gz Error: Failed to checksum cdf: Unable to verify file checksums Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_cdf/cdf/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port cdf failed
macos version 14.5
Attachments (1)
Change History (4)
Changed 5 months ago by bernstei
comment:1 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | cdf checksum removed |
---|---|
Owner: | set to ryandesign |
Port: | cdf added |
Status: | new → accepted |
Summary: | cdf fails to install with mismatched checksum → cdf @3.8.1: Checksum mismatch |
I agree, the distfile has changed since I last updated this port:
% sudo port fetch --no-mirrors cdf ---> Fetching distfiles for cdf ---> Attempting to fetch cdf38_1-dist-all.tar.gz from https://spdf.gsfc.nasa.gov/pub/software/cdf/dist/cdf38_1/unix/ % sudo port checksum cdf ---> Verifying checksums for cdf Error: Checksum (rmd160) mismatch for cdf38_1-dist-all.tar.gz Error: Checksum (sha256) mismatch for cdf38_1-dist-all.tar.gz Error: Checksum (size) mismatch for cdf38_1-dist-all.tar.gz Error: Failed to checksum cdf: Unable to verify file checksums
There is a new 3.9.0 version available to which I have been meaning to update the port, but I would like to understand why the 3.8.1 distfile changed. There is a rather extensive difference between the old 3.8.1 (March 15, 2022) and the new 3.8.1 (April 25, 2022):
-
cdf38_1-dist/Makefile
diff -ru old/cdf38_1-dist/Makefile new/cdf38_1-dist/Makefile
old new 1076 1076 fi 1077 1077 @if [ -f $(JNIsrcDIR)/libcdfNativeLibrary.jnilib ] ; then \ 1078 1078 $(MAKE) $(EXTRAMAKE) MAKE=$(MAKE) "INSTALLDIR=$(INSTALLDIR)" install.lib.jnilib ; \ 1079 $(MAKE) $(EXTRAMAKE) MAKE=$(MAKE) "INSTALLDIR=$(MYHOME)/Library/Java/Extensions" install.lib.jnilib2 ; \1080 1079 else \ 1081 1080 $(NULL) ; \ 1082 1081 fi … … 1246 1245 @if [ -f $(JNIsrcDIR)/libcdfNativeLibrary.jnilib ] ; then \ 1247 1246 echo cp $(JNIsrcDIR)/libcdfNativeLibrary.jnilib $(INSTALLDIR)/lib/libcdfNativeLibrary.$(VERSION).jnilib ; \ 1248 1247 cp $(JNIsrcDIR)/libcdfNativeLibrary.jnilib $(INSTALLDIR)/lib/libcdfNativeLibrary.$(VERSION).jnilib ; \ 1248 mkdir -p $(MYHOME)/lib ; \ 1249 echo cp $(JNIsrcDIR)/libcdfNativeLibrary.jnilib $(MYHOME)/lib/libcdfNativeLibrary.$(VERSION).jnilib ; \ 1250 cp $(JNIsrcDIR)/libcdfNativeLibrary.jnilib $(MYHOME)/lib/libcdfNativeLibrary.$(VERSION).jnilib ; \ 1251 mkdir -p $(MYHOME)/Library/Java/Extensions ; \ 1249 1252 echo cp $(JNIsrcDIR)/libcdfNativeLibrary.jnilib $(MYHOME)/Library/Java/Extensions/libcdfNativeLibrary.$(VERSION).jnilib ; \ 1250 1253 cp $(JNIsrcDIR)/libcdfNativeLibrary.jnilib $(MYHOME)/Library/Java/Extensions/libcdfNativeLibrary.$(VERSION).jnilib ; \ 1251 1254 rm -f $(INSTALLDIR)/lib/libcdfNativeLibrary.jnilib ; \ 1252 1255 cd $(INSTALLDIR)/lib && ln -s libcdfNativeLibrary.$(VERSION).jnilib libcdfNativeLibrary.jnilib ; \ 1256 rm -f $(MYHOME)/lib/libcdfNativeLibrary.jnilib ; \ 1257 cd $(MYHOME)/lib && ln -s libcdfNativeLibrary.$(VERSION).jnilib libcdfNativeLibrary.jnilib ; \ 1253 1258 rm -f $(MYHOME)/Library/Java/Extensions/libcdfNativeLibrary.jnilib ; \ 1254 1259 cd $(MYHOME)/Library/Java/Extensions && ln -s libcdfNativeLibrary.$(VERSION).jnilib libcdfNativeLibrary.jnilib ; \ 1255 1260 fi -
cdf38_1-dist/Release.notes
diff -ru old/cdf38_1-dist/Release.notes new/cdf38_1-dist/Release.notes
old new 137 137 138 138 The CDF documentation set consists of the following: 139 139 140 cdf3 63ug.pdf (CDF User's Guide)141 cdf3 63crm.pdf (CDF C Reference Manual)142 cdf3 63frm.pdf (CDF Fortran Reference Manual)143 cdf3 63prm.pdf (CDF Perl Reference Manual)144 cdf3 63jrm.pdf (CDF Java Reference Manual)145 cdf3 63csrm.pdf (CDF C# Reference Manual)146 cdf3 63vbrm.pdf (CDF Visual Basic Reference Manual)147 cdf3 6ifd.pdf (CDF Internal Format Description)140 cdf381ug.pdf (CDF User's Guide) 141 cdf381crm.pdf (CDF C Reference Manual) 142 cdf381frm.pdf (CDF Fortran Reference Manual) 143 cdf381prm.pdf (CDF Perl Reference Manual) 144 cdf381jrm.pdf (CDF Java Reference Manual) 145 cdf381csrm.pdf (CDF C# Reference Manual) 146 cdf381vbrm.pdf (CDF Visual Basic Reference Manual) 147 cdf38ifd.pdf (CDF Internal Format Description) 148 148 149 149 These documents are available from the CDF home page (http://cdf.gsfc.nasa.gov). 150 150 -
cdf38_1-dist/cdfjava/cdfjson/CDF2Json.java
diff -ru old/cdf38_1-dist/cdfjava/cdfjson/CDF2Json.java new/cdf38_1-dist/cdfjava/cdfjson/CDF2Json.java
old new 189 189 private static String item8 = "GlobalAttributes"; 190 190 private static String item9 = "VariableAttributes"; 191 191 private static String separator = System.getProperty("file.separator"); 192 192 private static long numDimsN; 193 193 public static void main(String[] args) throws Exception { 194 194 195 195 try { … … 738 738 dimSizes = v.getDimSizes(); 739 739 dimVariances = v.getDimVariances(); 740 740 741 long numDimsN;741 // long numDimsN; 742 742 long[] dimSizesN = new long[(int)CDF_MAX_DIMS]; 743 743 numDimsN = 0; 744 744 for (i = 0; i < numDims; i++) { … … 748 748 ++numDimsN; 749 749 } 750 750 } 751 752 751 JsonObjectBuilder nd = Json.createObjectBuilder(). 753 752 add("NumDims",numDimsN); 754 753 infos.add (nd.build()); … … 979 978 long[] dimSizes = {1L}, dimVariances; 980 979 long[] dimIndices = {0L}; 981 980 long[] dimIntervals = {1L}; 982 long numDimsN = 0;981 // long numDimsN = 0; 983 982 long[] dimSizesN = null; 984 983 maxRec = v.getMaxWrittenRecord(); 985 984 … … 998 997 dataType = v.getDataType(); 999 998 dimVariances = v.getDimVariances(); 1000 999 numValuesToRead = 1; 1000 /* 1001 1001 if (numDims > 0) { 1002 1002 dimIntervals = new long[dimSizes.length]; 1003 1003 dimIndices = new long[dimSizes.length]; … … 1015 1015 numValuesToRead *= dimSizes[i]; 1016 1016 } 1017 1017 } 1018 */ 1019 if (numDimsN > 0) { 1020 dimIntervals = new long[(int)numDimsN]; 1021 dimIndices = new long[(int)numDimsN]; 1022 dimSizesN = new long[(int)numDimsN]; 1023 int j = 0; 1024 // numDimsN = 0; 1025 for (int i=0; i < numDimsN; i++) { 1026 if (dimVariances[i] == VARY) { 1027 // ++numDimsN; 1028 dimSizesN[j] = dimSizes[i]; 1029 ++j; 1030 } 1031 dimIntervals[i] = 1; 1032 dimIndices[i] = 0; 1033 numValuesToRead *= dimSizes[i]; 1034 } 1035 } 1018 1036 1019 1037 JsonArrayBuilder records = Json.createArrayBuilder(); 1020 1038 … … 1040 1058 numRecordsToRead = maxRec - i + 1; 1041 1059 else 1042 1060 numRecordsToRead = incrementCounter; 1043 if (numDimsN > 0) 1061 if (numDimsN > 0) { 1044 1062 cdfdata = v.getHyperDataObject((long) i, 1045 1063 numRecordsToRead, 1L, 1046 1064 dimIndices, 1047 1065 dimSizes, 1048 1066 dimIntervals); 1049 else1067 } else { 1050 1068 cdfdata = v.getRecordsObject((long) i, 1051 1069 numRecordsToRead); 1070 } 1052 1071 // Get the status of the last CDF call 1053 1072 long status = cdf.getStatus(); 1054 1073 Object dataArray = cdfdata.getData(); … … 1068 1087 } else 1069 1088 datum = dataArray; 1070 1089 1071 if (numDims != numDimsN) {1090 if (numDimsN > 0 && numDims != numDimsN) { 1072 1091 // Filled data for non-varying dimension(s) 1073 1092 long iz; 1074 1093 iz = numDims; … … 1077 1096 --iz; 1078 1097 } 1079 1098 } 1099 1080 1100 if (numDimsN < 2) { 1081 1101 boolean single = false; 1082 1102 if (!recVary || maxRec == 0) single = true; … … 1085 1105 datum, dataType, numDimsN, 1086 1106 -1, (withz?"Z":""), formatT, 1087 1107 fillVal, single); 1088 } else { 1108 } else { 1089 1109 JsonArrayBuilder oData = printMultipleData (datum, 1090 1110 dataType, (int)numDimsN, 1091 1111 dimSizes, -
cdf38_1-dist/cdfjava/cdfjson/CDFJsonReader.java
diff -ru old/cdf38_1-dist/cdfjava/cdfjson/CDFJsonReader.java new/cdf38_1-dist/cdfjava/cdfjson/CDFJsonReader.java
old new 89 89 boolean toVar = false; 90 90 // Retrieve data from "CDFVariables" JsonArray 91 91 JsonArray cdfVariables = jsonObject1.getJsonArray(item3); 92 String format = null; 93 long dataType = 0; 92 94 if (cdfVariables != null) { 93 95 System.out.println(" "+item3+":"); 96 format = null; 97 dataType = 0; 94 98 for (JsonValue varInfo : cdfVariables) { 95 99 for (String key: ((JsonObject)varInfo).keySet()) { 96 100 JsonArray var = ((JsonObject)varInfo).getJsonArray(key); 97 101 JsonObject varItem = var.getJsonObject(0); 98 102 if (varCount > 0) toShow = checkVar (varItem); 99 103 if (!toShow) continue; 100 System.out.println(" "+key+":"); // Variable 104 System.out.println(" "+key+":"); // Variable name 101 105 for (int ii = 0; ii < var.size(); ++ii) { // VarDescription | 102 106 // VarAttributes | 103 107 // VarData … … 111 115 // VarDescription: 112 116 System.out.println(" "+varKey+":"+value); 113 117 } else if (value instanceof JsonArray) { 114 // VarDescription: 118 // VarDescription: | VarAttributes: | VarData: 115 119 System.out.println(" "+varKey+":"); 116 120 int valueN = ((JsonArray)value).size(); 117 121 boolean breakout = false; … … 120 124 if (data instanceof JsonObject) { 121 125 for (String keyx: ((JsonObject)data).keySet()) { 122 126 Object des = ((JsonObject)data).get(keyx); 127 // DataType: | VALIDMIN: 123 128 System.out.println(" "+keyx+":"+des); 124 129 if (!toVarDesc && keyx.equalsIgnoreCase("varname")) 125 130 breakout = true; 126 131 if (keyx.equals("RecVariance")) { 127 132 if (des.toString().equals("\"NOVARY\"")) toVar= true; 128 133 } 134 if (keyx.equalsIgnoreCase("format")) { 135 format = toCformat(des.toString(). 136 replaceAll("^\"|\"$", "")); 137 } 138 if (keyx.equalsIgnoreCase("datatype")) { 139 dataType = CDFUtils.getDataTypeValue( 140 des.toString().replaceAll("^\"|\"$", "")); 141 } 129 142 } 130 143 } else if (data instanceof JsonArray) { 131 144 System.out.print(" ["); … … 138 151 } else if (data instanceof JsonNumber || 139 152 data instanceof JsonString) { 140 153 if (jj == 0) System.out.print(" ["); 141 System.out.print(data+(jj<(valueN-1)?", ":"")); 154 if (data instanceof JsonString || format == null || 155 (dataType != CDF_REAL4 && dataType != CDF_REAL8 && 156 dataType != CDF_FLOAT && dataType != CDF_DOUBLE)) 157 System.out.print(data+(jj<(valueN-1)?", ":"")); 158 else 159 System.out.print( 160 String.format(format,((JsonNumber)data). 161 doubleValue())+ 162 (jj<(valueN-1)?", ":"")); 142 163 if (jj == (valueN - 1)) System.out.println("]"); 143 164 } else { 144 165 System.out.println(" "+data); … … 313 334 System.out.println (" "); 314 335 } 315 336 337 private static String toCformat (String oFormat) { 338 if (oFormat.charAt(0) == '%') return oFormat; 339 /*********************************************************************** 340 * FORTRAN format form 341 * Change `oformat' to point to first non-blank, non-digit, non-`(' 342 * character. This will skip over a Fortran repeat count (eg. the `20' 343 * in `20F8.4' or `20(F8.4)'). 344 ***********************************************************************/ 345 oFormat = oFormat.trim(); 346 if (oFormat == null) return null; 347 int len = oFormat.length(); 348 String formatY = null; 349 for (int i = 0; i < len; ++i) { 350 char a = oFormat.charAt(i); 351 if (Character.isDigit(a) || a == '(') continue; 352 formatY = oFormat.substring(i); 353 if (formatY.endsWith(")")) 354 formatY = formatY.substring(0, formatY.length()-1); 355 break; 356 } 357 if (formatY == null) return null; 358 String cformat; 359 /*********************************************************************** 360 * Encode C format specification. 361 ***********************************************************************/ 362 switch (formatY.charAt(0)) { 363 /********************************************************************* 364 * Integer/decimal. 365 *********************************************************************/ 366 case 'I': 367 case 'i': 368 cformat = formatY.substring(1); 369 return "%"+cformat+"d"; 370 /********************************************************************* 371 * Floating-point/non-scientific notation (which is called... 372 *********************************************************************/ 373 case 'F': 374 case 'f': 375 cformat = formatY.substring(1); 376 return "%"+cformat+"f"; 377 /********************************************************************* 378 * Floating-point/scientific notation. 379 *********************************************************************/ 380 case 'E': 381 case 'e': 382 cformat = formatY.substring(1); 383 return "%"+cformat+"e"; 384 } 385 return null; 386 } 387 316 388 } -
cdf38_1-dist/src/include/cdf.h
Only in new/cdf38_1-dist/cdfjava/cdfjson: po.txt Only in new/cdf38_1-dist/cdfjava/cdfjson: wi.txt Binary files old/cdf38_1-dist/cdfjava/classes/cdfjava.jar and new/cdf38_1-dist/cdfjava/classes/cdfjava.jar differ Binary files old/cdf38_1-dist/cdfjava/classes/cdfjson.jar and new/cdf38_1-dist/cdfjava/classes/cdfjson.jar differ Only in old/cdf38_1-dist/cdfjava/examples: TUTF8a.cdf Only in old/cdf38_1-dist/cdfjava/examples: tUTF8.cdf diff -ru old/cdf38_1-dist/src/include/cdf.h new/cdf38_1-dist/src/include/cdf.h
old new 1779 1779 VISIBLE_PREFIX CDFstatus CDFgetAttrStrEntry PROTOARGs(( 1780 1780 CDFid id, int grzEntry, long attrNum, long entryNum, char **string 1781 1781 )); 1782 / /#if defined(WIN32)1782 /* #if defined(WIN32) */ 1783 1783 VISIBLE_PREFIX CDFstatus CDFputAttrWStrEntry PROTOARGs(( 1784 1784 CDFid id, int grzEntry, long attrNum, long entryNum, wchar_t *wstring, 1785 1785 char *locale … … 1788 1788 CDFid id, int grzEntry, long attrNum, long entryNum, wchar_t **wstring, 1789 1789 char *locale 1790 1790 )); 1791 / /#endif1791 /* #endif */ 1792 1792 VISIBLE_PREFIX CDFstatus CDFgetAttrEntryNumStrings PROTOARGs(( 1793 1793 CDFid id, int rzEntry, long attrNum, long entryNum, 1794 1794 long *numStrings -
cdf38_1-dist/src/lib/cdftt2000.c
diff -ru old/cdf38_1-dist/src/lib/cdftt2000.c new/cdf38_1-dist/src/lib/cdftt2000.c
old new 38 38 #define HOURinNanoSecs 3600000000000LL 39 39 #define MINUTEinNanoSecs 60000000000LL 40 40 #define T12hinNanoSecs 43200000000000LL 41 /* Julian days for 1707-09-22 and 2292-04-11, the valid TT2000 range. */ 41 /* Julian days for 1707-09-22T12:12:10.961224192 and 42 * 2292-04-11T11:46:07.670775807, the valid TT2000 range. */ 43 /* 1707-09-22T12:12:10.961224192 reserved as FILLVAL */ 44 /* (encoded as 9999-12-31T23:59:59.999999999) */ 45 /* 1707-09-22T12:12:10.961224193 reserved as PADVAL */ 46 /* (encoded as 0000-01-01T00:00:00.000000000) */ 47 /* 1707-09-22T12:12:10.961224195 reserved as ILLEGAL_VAL */ 48 /* (encoded as 9999-12-31T23:59:59.999999999) */ 42 49 #define JDY17070922 2344793 50 #define JDY17070922subdayns 43930961224192LL 43 51 #define JDY22920411 2558297 52 #define JDY22920411subdayns 42367670775807LL 44 53 45 54 /* Number of Delta(dAT) expressions before leap seconds were introduced */ 46 55 #define NERA1 14 … … 959 968 long lyl, lml, ldl, lhl, lnl, lsl, lll, lul, lal; 960 969 long xy, xm, xd; 961 970 int lyear; 962 971 double jday12h = 0.0; 963 972 #if defined(STDARG) 964 973 va_start (ap, dd); 965 974 #else … … 1105 1114 ls += as; 1106 1115 ll += al; 1107 1116 lu += au; 1108 tmp= JulianDay12h ((long) ly, (long) lm, (long) ld);1109 DatefromJulianDay ( tmp, &lyl, &lml, &ldl);1117 jday12h = JulianDay12h ((long) ly, (long) lm, (long) ld); 1118 DatefromJulianDay (jday12h, &lyl, &lml, &ldl); 1110 1119 } 1111 1120 if (lu >= 1000.0) { 1112 1121 double ad, ah, am, as, al; … … 1125 1134 ln += am; 1126 1135 ls += as; 1127 1136 ll += al; 1128 tmp= JulianDay12h ((long) ly, (long) lm, (long) ld);1129 DatefromJulianDay ( tmp, &lyl, &lml, &ldl);1137 jday12h = JulianDay12h ((long) ly, (long) lm, (long) ld); 1138 DatefromJulianDay (jday12h, &lyl, &lml, &ldl); 1130 1139 } 1131 1140 if (ll >= 1000.0) { 1132 1141 double ad, ah, am, as; … … 1142 1151 lh += ah; 1143 1152 ln += am; 1144 1153 ls += as; 1145 tmp= JulianDay12h ((long) ly, (long) lm, (long) ld);1146 DatefromJulianDay ( tmp, &lyl, &lml, &ldl);1154 jday12h = JulianDay12h ((long) ly, (long) lm, (long) ld); 1155 DatefromJulianDay (jday12h, &lyl, &lml, &ldl); 1147 1156 } 1148 1157 if (ls >= 60.0) { 1149 1158 tmp = JulianDay12h ((long) ly, (long) lm, (long) ld); … … 1161 1170 ld += ad; 1162 1171 lh += ah; 1163 1172 ln += am; 1164 tmp= JulianDay12h ((long) ly, (long) lm, (long) ld);1165 DatefromJulianDay ( tmp, &lyl, &lml, &ldl);1173 jday12h = JulianDay12h ((long) ly, (long) lm, (long) ld); 1174 DatefromJulianDay (jday12h, &lyl, &lml, &ldl); 1166 1175 } 1167 1176 } 1168 1177 if (ln >= 60.0) { … … 1173 1182 ln = ln - ah * 60; 1174 1183 ld += ad; 1175 1184 lh += ah; 1176 tmp= JulianDay12h ((long) ly, (long) lm, (long) ld);1177 DatefromJulianDay ( tmp, &lyl, &lml, &ldl);1185 jday12h = JulianDay12h ((long) ly, (long) lm, (long) ld); 1186 DatefromJulianDay (jday12h, &lyl, &lml, &ldl); 1178 1187 } 1179 1188 if (lh >= 24.0) { 1180 1189 double ad; 1181 1190 ad = floor(lh / 24.0); 1182 1191 lh = lh - ad * 24.0; 1183 1192 ld += ad; 1184 tmp= JulianDay12h ((long) ly, (long) lm, (long) ld);1185 DatefromJulianDay ( tmp, &lyl, &lml, &ldl);1193 jday12h = JulianDay12h ((long) ly, (long) lm, (long) ld); 1194 DatefromJulianDay (jday12h, &lyl, &lml, &ldl); 1186 1195 } 1187 1196 if (lyl == -999 && lml == -999) { 1188 1197 lyl = (long) ly; … … 1204 1213 return DEFAULT_TT2000_PADVALUE; 1205 1214 if (!YearWithin(lyl) && !ValidateYMD(lyl,lml,ldl)) 1206 1215 return ILLEGAL_TT2000_VALUE; 1216 if (jday12h == 0.0) jday12h = JulianDay12h (lyl, lml, ldl); 1217 if (jday12h == JDY22920411) { 1218 long long subday = (long long) (3600*lhl+60*lnl+lsl)*1000000000LL+ 1219 lll*1000000LL+lul*1000LL+lal; 1220 if (subday > JDY22920411subdayns) return ILLEGAL_TT2000_VALUE; 1221 } else if (jday12h == JDY17070922) { 1222 long long subday = (long long) (3600*lhl+60*lnl+lsl)*1000000000LL+ 1223 lll*1000000LL+lul*1000LL+lal; 1224 if (subday < JDY17070922subdayns) return ILLEGAL_TT2000_VALUE; 1225 } 1207 1226 lyear = (lyl & 3) == 0 && ((lyl % 25) != 0 || (lyl & 15) == 0); 1208 1227 if ((!lyear && ldl > 365) || (lyear && ldl > 366)) 1209 1228 return ILLEGAL_TT2000_VALUE; -
cdf38_1-dist/src/tools/cdf2skt.c
diff -ru old/cdf38_1-dist/src/tools/cdf2skt.c new/cdf38_1-dist/src/tools/cdf2skt.c
old new 917 917 long sarray[CDF_MAX_PARMS]; 918 918 char *format; 919 919 int howto; 920 int varNameLen; 920 921 format = NULL; 921 922 sarray[0] = 0; 922 923 status = CDFlib (SELECT_, VAR(zVar), varN, … … 1048 1049 1049 1050 /*************************************************************************** 1050 1051 * Write variable definition line. 1052 * Variable name might break into multiple lines if its length is more than 1053 * 74 characters. In this case, an extra "-" is appended to the end for 1054 * an indication of continuation. 1051 1055 ***************************************************************************/ 1052 1056 1053 1057 WriteOut (SKTfp, "\n"); 1054 1058 1055 1059 delim = PickDelimiter (varName, strlen(varName)); 1056 1060 WriteOut (SKTfp, "\n"); 1057 snprintf (tempS, (size_t) sizeof(tempS), " %c%s%c", delim, varName, delim); 1058 ccc = WriteOut (SKTfp, tempS); 1059 1061 varNameLen = (int) strlen(varName); 1062 if (varNameLen < 75) { 1063 snprintf (tempS, (size_t) sizeof(tempS), " %c%s%c", delim, varName, delim); 1064 ccc = WriteOut (SKTfp, tempS); 1065 } else { 1066 int len, ix; 1067 char namePart[73]; 1068 len = varNameLen; 1069 ix = 0; 1070 while (len >= 72) { 1071 strncpy(namePart, varName+ix, 72); 1072 namePart[72] = (char ) '\0'; 1073 snprintf (tempS, (size_t) sizeof(tempS), " %c%s%c %c", delim, namePart, 1074 delim,(len==72?' ':'-')); 1075 ccc = WriteOut (SKTfp, tempS); 1076 WriteOut (SKTfp, "\n"); 1077 ix += 72; 1078 len -= 72; 1079 } 1080 if (len > 0) { 1081 strcpyX(namePart, varName+ix, 72); 1082 snprintf (tempS, (size_t) sizeof(tempS), " %c%s%c", delim, namePart, 1083 delim); 1084 ccc = WriteOut (SKTfp, tempS); 1085 WriteOut (SKTfp, "\n"); 1086 ccc = 0; 1087 } 1088 } 1060 1089 if (varDataType != CDF_TIME_TT2000) ddd = 0; 1061 1090 else ddd = 4; 1062 1091 -
cdf38_1-dist/src/tools/cdfedit2.c
diff -ru old/cdf38_1-dist/src/tools/cdfedit2.c new/cdf38_1-dist/src/tools/cdfedit2.c
old new 1012 1012 long nElemsEntered; void *newBinary; 1013 1013 int style; 1014 1014 if (TT2000dataType(dataType)) { 1015 if (!ziso8601) style = TT2000_3_STYLE; 1016 else style = TT2000_4_STYLE; 1017 } else { 1015 if (!ziso8601) { 1016 style = TT2000_3_STYLE; 1017 *((char *)(PW.value)+TT2000_3_STRING_LEN) = (char) '\0'; 1018 } else { 1019 style = TT2000_4_STYLE; 1020 *((char *)(PW.value)+TT2000_4_STRING_LEN) = (char) '\0'; 1021 } 1022 } else if (EPOCHdataType(dataType)) { 1023 if (!ziso8601) { 1024 style = EPOCH4_STYLE; 1025 *((char *)(PW.value)+EPOCH4_STRING_LEN) = (char) '\0'; 1026 } else { 1027 style = EPOCH3_STYLE; 1028 *((char *)(PW.value)+EPOCH3_STRING_LEN) = (char) '\0'; 1029 } 1030 } else if (EPOCH16dataType(dataType)) { 1031 if (!ziso8601) { 1032 style = EPOCH4_STYLE; 1033 *((char *)(PW.value)+EPOCH16_4_STRING_LEN) = (char) '\0'; 1034 } else { 1035 style = EPOCH3_STYLE; 1036 *((char *)(PW.value)+EPOCH16_3_STRING_LEN) = (char) '\0'; 1037 } 1038 } else { 1018 1039 if (!ziso8601) style = DEFAULTstyleEDIT; 1019 1040 else style = EPOCH3_STYLE; 1020 1041 } -
cdf38_1-dist/src/tools/skt2cdf.c
Only in old/cdf38_1-dist/src/tools: cfxp3.c diff -ru old/cdf38_1-dist/src/tools/skt2cdf.c new/cdf38_1-dist/src/tools/skt2cdf.c
old new 122 122 #ifdef WIN32 123 123 static unsigned int oldCodePage = 0; 124 124 #endif 125 static Logical longVar; 125 126 126 127 /****************************************************************************** 127 128 * Main. … … 520 521 if (token[0] != NUL) 521 522 if (!ItemStream(token)) return FALSE; 522 523 } 523 else 524 CATchr (&token, chr, &tokenZ, BASE_TOKEN_SIZE); 524 else { 525 /* For a long variable name that spans more than one line, skip that 526 '-' character in its first line... */ 527 if (!longVar || chr != (int) '-') 528 CATchr (&token, chr, &tokenZ, BASE_TOKEN_SIZE); 529 } 525 530 break; 526 531 /************************************************************************** 527 532 * … … 631 636 break; 632 637 } 633 638 else 634 if (startBraceFound) 639 if (startBraceFound) { 635 640 if (inString) { 636 641 if (lineN != stringLineN) { 637 642 ParseError ("String/substring split across lines."); … … 639 644 } 640 645 CATchr (&eValue, chr, &eValueZ, BASE_EVALUE_SIZE); 641 646 } 647 } 642 648 break; 643 649 /************************************************************************** 644 650 * … … 788 794 int dN, dNt; /* Dimension number. */ 789 795 void *padValue; 790 796 size_t nBytes; 797 791 798 /**************************************************************************** 792 799 * Based on what should be next... 793 800 ****************************************************************************/ … … 1429 1436 long vAttrNum; 1430 1437 strcpyX (vAttrName, item, CDF_ATTR_NAME_LEN256); 1431 1438 if (!ISTPname (vAttrName) && warning) 1432 WriteOutFP (stdout, "Warning: Attribute name: \"%s\" not ISTP compliant... not recommended\n", 1439 WriteOutFP (stdout, "Warning: Attribute name: \"%s\" not ISTP " 1440 "compliant... not recommended\n", 1433 1441 vAttrName); 1434 1442 status = CDFlib (CREATE_, ATTR_, vAttrName, VARIABLE_SCOPE, &vAttrNum, 1435 1443 NULL_); … … 1476 1484 /************************************************************************** 1477 1485 * 1478 1486 **************************************************************************/ 1479 case VARNAMEfield: 1480 strcpyX (varName, item, CDF_VAR_NAME_LEN256); 1487 case VARNAMEfield: { 1488 char *ptrs, *ptre, *tmpx; 1489 ptre = strrchr (line, '"'); 1490 if (ptre && !strncmp(ptre, "\" -", 3)) { 1491 strcpyX (varName, item, 0); 1492 if (fgets(line,MAX_SKTLINE_LEN,SKTfp) == NULL) { 1493 ParseError ("Unexpected end-of-file."); 1494 FreeGrowingStrings (); 1495 return done; 1496 } 1497 ptrs = strchr (line, '"'); 1498 ptre = strrchr (ptrs+1, '"'); 1499 while (ptre && !strncmp(ptre, "\" -", 3)) { 1500 tmpx = (char *) malloc(ptre-ptrs); 1501 strncpy (tmpx, ptrs+1, ptre-ptrs-1); 1502 *(tmpx+(ptre-ptrs-1)) = (char ) '\0'; 1503 strcatX (varName, tmpx, CDF_VAR_NAME_LEN256); 1504 free (tmpx); 1505 tmpx = NULL; 1506 if (fgets(line,MAX_SKTLINE_LEN,SKTfp) == NULL) { 1507 ParseError ("Unexpected end-of-file."); 1508 FreeGrowingStrings (); 1509 return done; 1510 } 1511 ptre = strrchr (line, '"'); 1512 } 1513 ptrs = strchr (line, '"'); 1514 ptre = strrchr (ptrs+1, '"'); 1515 tmpx = (char *) malloc(ptre-ptrs); 1516 strncpy (tmpx, ptrs+1, ptre-ptrs-1); 1517 *(tmpx+(ptre-ptrs-1)) = (char ) '\0'; 1518 strcatX (varName, tmpx, CDF_VAR_NAME_LEN256); 1519 free (tmpx); 1520 tmpx = NULL; 1521 longVar = TRUE; 1522 } else { 1523 strcpyX (varName, item, CDF_VAR_NAME_LEN256); 1524 longVar = FALSE; 1525 } 1481 1526 NextSearchItem (TOKEN, VARDATATYPEfield); 1482 1527 break; 1528 } 1483 1529 /************************************************************************** 1484 1530 * 1485 1531 **************************************************************************/ … … 1574 1620 zVar = BOO(zSection,TRUE,(zMode > zMODEoff)); 1575 1621 if (!ISTPname (varName) && warning) 1576 1622 WriteOutFP (stdout, 1577 "Warning: Variable name: \"%s\" non-ISTP compliant... not recommended\n", 1623 "Warning: Variable name: \"%s\" non-ISTP compliant... not " 1624 "recommended\n", 1578 1625 varName); 1579 1626 if (zVar) 1580 1627 status = CDFlib (CREATE_, zVAR_, varName, vDataType, vNumElems,
comment:2 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)
3.9.0 contains the old (April 1, 2022) versions of CDF2Json.java and CDFJsonReader.java that are in the old (March 15, 2022) 3.8.1, not the new (April 20, 2022) versions in the new (April 25, 2022) 3.8.1.
comment:3 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note: See
TracTickets for help on using
tickets.
log