Debian Codegraph @

cextern/cfitsio/ChangeLog

raw
1 Log of Changes Made to CFITSIO
2
3 Version 4.6.3 - Sep 2025
4
5 - For greater C23 compatibility, updated cfortran.h file and
6 removed old-style function declarations.
7
8 - Cleanup of multiple compiler warnings. Our thanks to petesmc for
9 help with this.
10
11 - Updated 'speed' utility to use higher precision total time.
12
13 - Fixes for FreeBSD and OpenBSD build issues. Our thanks to Diab
14 Jerius.
15
16 - Added RPM support file cfitsio.spec, and packaging helper file
17 ax_cfitsio.m4. Our thanks to Richard Mathar for these.
18
19 - Added files portfile.cmake and vcpkg.json. Our thanks to
20 D. Partridge for these.
21
22 - Fixed possible memory leaks in certain error exit conditions.
23 Our thanks to petesmc.
24
25 - Fix to minor truncation error in ffgthd.
26
27 Version 4.6.2 - Mar 2025
28
29 - Updated autotools configure script to use AM_MAINTAINER_MODE;
30 disables automatic regeneration of the build system unless
31 configure is invoked with '--enable-maintainer-mode'
32
33 Version 4.6.1 - Mar 2025
34
35 - Updated CMake configuration to use GNUInstallDirs module and to
36 use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR; fixes bug
37 in 4.6.0 that led to an empty 'includedir' in cfitsio.pc
38
39 - Updated autotools config files
40
41 Version 4.6.0 - Mar 2025
42
43 - Improved the empty primary data test performed in fits_open_file.
44
45 - Correction to eval_defs.h typedefs to allow for compilation on old
46 gcc compilers.
47
48 - The fitsverify utility tool now distinguishes between alternate
49 coordinate systems when testing positions of WCSAXES keywords.
50
51 - Updates made for greater C23 compatibility as required for gcc-15.
52
53 - Possible memory vulnerabilities patched. Our thanks
54 to Doyensec for reporting this.
55
56 - Fix to a possible heap buffer overflow in a utility tool. Our
57 thanks to TeamH4C for reporting this.
58
59 - Negative size parameter vulnerability patched in utility
60 tool. Our thanks to TeamH4C for reporting this.
61
62 Version 4.5.0 - Aug 2024
63
64 - Conversion of CFITSIO configure/build files to better conform with
65 automake and libtool.
66
67 - Bug fix for case of bit column output in string format on clang
68 compilers with high optimization.
69
70 - Added compiler macro support to improve builds on loongarch64 and on
71 Gnu/Hurd kernels.
72
73 - Bug fix to fitsverify utility.
74
75 Version 4.4.1 - Jun 2024
76
77 - Removed NOSA license and restored previous license file
78
79 Version 4.4.0 - Feb 2024
80
81 - Reorganization of helper utility code; added fitsverify
82
83 - CMakeLists.txt: Changed install location of cfitsio-targets.cmake
84 to conform with the one listed in cfitsio-config.cmake.in (i.e.
85 including the extra "cfitsio" subdir of lib/cmake).
86
87 - calculator functions that read GTIs do more correct validity
88 checking of GTI input files
89
90 - fits_insert_rows now works if input table starts with both no rows
91 and no columns
92
93 - Can now write internal memory files of size > 2^32 directly to a
94 gzip-compressed output file.
95
96 - Added support for unsigned long long types to fits_update_key.
97
98 - Added ability for Windows builds to handle UTF-8 needed for reading
99 filenames with non-ASCII characters.
100
101 - Added 2-byte int test to speed.c utility.
102
103 - Made fix to http file handler to expand the allowed URL length.
104
105 Version 4.3.1 - Nov 2023 (patch release)
106
107 - Patch fix needed for modify and delete keyword functions to fully
108 conform with v4.3.0 long string keyword read/write enhancements.
109
110 Version 4.3.0 - Jul 2023
111
112 - Bug fix to fits_make_hist[d] that was introduced in 4.2.0.
113
114 - Added overflow checking for case of reading images with 8-byte
115 float values into 4-byte float arrays.
116
117 - fits_write_key_longstr now handles case of writing a long keyword
118 in combination with a long keyword value string.
119
120 - Add conversion of French locale comma-to-period in corner cases
121 appearing in ffr2e and ffd2e functions.
122
123 - Increased the precision when writing version number to User-Agent
124 strings for http connections. This is needed to fully conform to
125 3-field version string format.
126
127 - Bug fix to GTIOVERLAP() calculator function, which was being
128 treated as a boolean value in expressions, and is now correctly
129 treated as a floating point result.
130
131 - Bug fix to ARRAY() calculator function, which caused a memory
132 overflow error
133
134 - Enhancement to the ARRAY function, such that ARRAY(V,d) can
135 apply new dimensions to V, as long as the total number
136 of array/vector elements does not change.
137
138 - Enhancement of long string keyword read/write functions to fully
139 conform with FITS standard specifications for multi-line value
140 and comment strings. Two new functions have been added to
141 implement this: fits_get_key_com_strlen and fits_read_string_key_com.
142
143 Version 4.2.0 - Nov 2022
144
145 - This release includes patches to security vulnerabilities. We
146 strongly encourage this upgrade, particularly for those running
147 CFITSIO in web accessible applications.
148
149 - Fix to fits_read_key function, which was failing to properly read
150 keywords declared type TUINT on compilers where sizeof(int) =
151 sizeof(long).
152
153 - Added new functions fits_read_cols and fits_write_cols to efficiently
154 read or write multiple columns in a single function call
155
156 - Added new function fits_copy_selrows to copy only selected rows, such
157 as the selected rows returned by fits_find_rows
158
159 - Added new calculator functions ERF(X), ERFC(X) and GAMMA(X), which are
160 mathematical special functions of the same name
161
162 - Added new calculator function GTIFIND() which reports which GTI row
163 brackets a given time sample
164
165 - Added new calculator functions which operate upon vector table
166 values NAXIS(V), NAXES(V,n), ELEMENTNUM(V) and AXISELEM(V,n),
167 and ARRAY(X,d) which promotes scalar X to a vector or array
168 with given dimensions.
169
170 - The CFITSIO histogramming code now handles binning by any
171 arbitrary calculator expression rather than just a column name.
172 Both the binned columns as well as the optional weights may be
173 calculator expressions, enclosed in parentheses.
174
175 - Binning of vector columns or expressions is now supported, as long
176 as all binned inputs (as well as the optional weighting) have the
177 same vector dimensions. Binning of variable-length columns remains
178 unsupported.
179
180 - A bug that caused histogram weights from columns that are null values
181 to be tallied along with non-null values has been fixed.
182
183 - The CFITSIO calculator and histogramming functionality is now
184 fully reentrant and does not require multithreading interlocks.
185
186 - A long-standing segmentation fault bug in the histogramming code
187 related to binning any value using the "reciprocal" /XXXX notation
188 has been fixed.
189
190 - Added mutex locks for thread safety in ftgiou and ftfiou.
191
192 - Added several Fortran wrappers to support image read/write when
193 'fpixel' and 'nelements' are 8-byte integers.
194
195 - Fixed bug which was adding spaces to some cases of long string key
196 value output.
197
198 Version 4.1.0 - Feb 2022
199
200 - Calls to the zlib inflate() function in zcompress.c now handle
201 the Z_BUF_ERROR return value rather than exiting.
202
203 - The SUBTRACTIVE_DITHER_2 option has been removed when using the
204 HCOMPRESS algorithm.
205
206 - Updated fits_get_version function to return a float calculated
207 from 3 version fields.
208
209 - Added handling of SBYTE_IMG and ULONGLONG_IMG types to the
210 fits_resize_img function.
211
212 - Updates made to C/Fortran interfacing in cfortran.h and f77_wrap.h
213 specifically driven by new Mac/ARM architecture.
214
215 - Fix to the fits_insert_col functions to handle columns with
216 TULONGLONG data.
217
218 Version 4.0.0 - May 2021
219
220 - Removed separate directory for zlib/gzip code, and updated
221 configuration to check for zlib on the user's system (required).
222 When use of cURL is enabled, it may also pull in zlib such
223 that user applications may not need to link with it separately.
224
225 - Changed version numbering to 3-field format.
226
227 - Added new calculator functions SETNULL(x,y) to allow substitution of
228 NULL values into tables, and GTIOVERLAP() for calculating the amount
229 of GTI overlap exposure for a time bin.
230
231 - Fix added for proper handling of string columns with zero repeat
232 count.
233
234 - Fix to column filtering expressions which write #NULL values to
235 columns of type (J) format.
236
237 - Fix to memory clearing when using polygon shapes in region files.
238
239 - Fix to fits_str2time function so that it now flags a particular case
240 of bad syntax which was previously getting through.
241
242 - In ffgclb and ffpclb (read/write byte columns), the "undocumented"
243 feature of being able to transfer columns 'A' string columnss as
244 byte arrays is now handled correctly, with improved error checking
245 via updates to ffgcprll. More documentation on string handling is
246 in cfitsio.tex.
247
248 - Fix bug in 'colfilter' functionality. When performing a
249 column deletion of the form -COLNAM*, and multiple matches
250 existed, then none of the matches got deleted. Now the
251 first is deleted as expected.
252
253 - Improved handling of corner case in ffpkn functions.
254
255 - In ffgky, modified TULONG case to allow it to read unsigned
256 values greater than the 8-byte signed limit.
257
258 - Fix to parsing of corner case of extended file syntax.
259
260 - Major updates to CMake configuration.
261
262 Version 3.49 - Aug 2020
263
264 - Fix to imcompress.c. It now turns off quantization if ZSCALE
265 and ZZERO columns are missing. Treatment will be the same as
266 if ZQUANTIZ were set to 'NONE', even if ZQUANTIZ is present
267 and set to something else.
268
269 - Added mutex to fits_execute_template() function so that the
270 creation of files using ASCII templates will be thread safe.
271
272 - In fpack when using -table flag, replaced warning message with a
273 more detailed description mentioning FITS format update.
274
275 - Added flag to CMake builds to disable curl dependency. Also
276 only add CURL_LIBRARIES to CMake link target if curl is found.
277
278 - Minor adjustment to download progress output.
279
280 Version 3.48 - Mar 2020
281
282 - Now can handle parentheses in path names rather than automatically
283 interpreting them as output file specifiers.
284
285 - Fixed bug in imcompress.c that wasn't properly handling conversion
286 between float and double types when reading from a gzip compressed
287 float or double image.
288
289 - Fixed bug that was preventing use of bracket and parentheses symbols
290 in pathnames when opening multiple READWRITE files, even when
291 requesting no-extended-syntax usage. *This fix necessitates a
292 library interface version number change.
293
294 - Fixed bug in ffmnhd / fits_movnam_hdu to properly handle wildcard
295 syntax.
296
297 - Fixed bug in fits_open_extlist to handle filename[EXT] syntax
298 properly. The hdutype parameter may now be null. More documentaion
299 for this function is in cfitsio.tex.
300
301 - Added new function fits_copy_hdutab to create a new table with the same
302 structure as an existing table.
303
304 - fits_copy_col / ffcpcl handles long long integer data types more
305 natively to prevent precision loss.
306
307 - histo.c routines now recognize integer columns that have been scaled by
308 TSCALn keywords and may be closer to floating point type.
309
310 - Added backward compatibility for very old Rice compressed files which
311 were not using the ZVAL2 keyword in the way that later became standard.
312
313 - Change made to cfitsio.pc.in to prevent forcing downstream libraries
314 to link against cfitsio's dependencies when using pkgconfig.
315
316 Version 3.47 - May 2019
317
318 - Added set of drivers for performing ftps file transfers.
319
320 - Tile sizes for compression may now be specified for any pair of
321 axes, where previously 2D tiles where limited to just X and y.
322
323 - Fix to ffgsky and ffgkls functions for case of keyword with long
324 string values where the final CONTINUE statement ended with '&'.
325 If the final CONTINUE also contained a comment, it was being
326 repeated twice when passed back through the 'comm' argument.
327
328 - Fix made to ffedit_columns() for case of multiple col filters
329 containing wildcards. Only the first filter was being searched.
330
331 - fits_copy_rows (ffcprw) can now handle 'P'-type variable-length
332 columns.
333
334 - Fix made to an obscure case in fits_modify_vector_len, where a
335 wrongly issued EOF error may occur.
336
337 - Added internal fffvcl() function.
338
339 Version 3.46 - Oct 2018 (Ftools release)
340
341 - Improved the algorithm for ensuring no tile dimensions are smaller
342 than 4 pixels for HCOMPRESS compression.
343
344 - Added new functions intended to assist in diagnosing (primarily
345 https) download issues: fits_show_download_progress,
346 fits_get_timeout, fits_set_timeout.
347
348 - Added the '-O <file>' option to fpack, which previously existed only
349 for funpack. Also added fpack/funpack auto-removal of .bz2 suffix
350 equivalent to what existed for .gz.
351
352 - For the fpack '-table' cases, warning message is now sent to stderr
353 instead of stdout. This is to allow users to pipe the results from
354 stdout in valid FITS format. (The warning message is otherwise placed
355 at the start of the FITS file and therefore corrupts it.)
356
357 - Fix made to the '-P' file prefix option in funpack.
358
359 - Added wildcard deletion syntax for columns, i.e. -COLNAM* will delete
360 the first matching column as always; -COLNAM*+ will delete all matching
361 columns (or none); exact symmetry with the keyword deletion syntax.
362
363 Version 3.45 - May 2018
364
365 - New support for reading and writing unsigned long long datatypes.
366 This includes 'implicit datatype conversion' between the unsigned long
367 long datatype and all the other datatypes.
368
369 - Increased the hardcoded NMAXFILES setting for maximum number of
370 open files from 1000 to 10000.
371
372 - Bug fix to fits_calc_binning wrapper function, which wasn't filling
373 in the returned float variables.
374
375 - Fixed a parsing bug for image subsection and column binning range
376 specifiers that was introduced in v3.44.
377
378 Version 3.44 - April 2018
379
380 - This release primarily patches security vulnerabilities. We
381 strongly encourage this upgrade, particularly for those running
382 CFITSIO in web accessible applications.
383
384 In addition, the following enhancements and fixes were made:
385
386 - Enhancement to 'template' and 'colfilter' functionality. It is now
387 possible to delete multiple keywords using wildcard syntax. See
388 "Column and Keyword Filtering Specification" section of manual for
389 details.
390
391 - histo.c uses double precision internally for all floating point
392 binning; new double-precision subroutines fits_calc_binningd(),
393 fits_rebin_wcsd(), and fits_make_histd(); existing
394 single-precision histogram functions still work but convert values
395 to double-precision internally.
396
397 - new subroutine fits_copy_cols() / ffccls() to copy multiple columns
398
399 - Fix in imcompress.c for HCOMPRESS and PLIO compression of unsigned
400 short integers.
401
402 - Fix to fits_insert_card(ffikey). It had wrongly been capitalizing
403 letters that appeared before an '=' sign on a CONTINUE line.
404
405 Version 3.43 - March 2018
406
407 The NASA security team requires the following warning to all users of
408 CFITSIO:
409
410 =====
411 The CFITSIO open source software project contains vulnerabilities
412 that could allow a remote, unauthenticated attacker to take control
413 of a server running the CFITSIO software. These vulnerabilities
414 affect all servers and products running the CFITSIO software.
415
416 The CFITSIO team has released software updates to address these
417 vulnerabilities. There are no workarounds to address these
418 vulnerabilities. In all cases, the CFITSIO team is recommending an
419 immediate update to resolve the issues.
420 =====
421
422 - Fixed security vulnerabilities.
423
424 - Calls to https driver functions in cfileio.c need to be macro-
425 protected by the HAVE_NET_SERVICES variable (as are the http and
426 ftp driver function calls). Otherwise CMake builds on native
427 Windows will fail since drvrnet.o is left empty.
428
429 - Bug fix to ffmvec function. Should be resetting a local colptr
430 variable after making a call to ffiblk (which can reallocate Ftpr->
431 tableptr). Originally reported by Willem van Straten.
432
433 - Ignore any attempted request to not quantize an image before
434 compressing it if the image has integer datatype pixels.
435
436 - Improved error message construction throughout CFITSIO.
437
438 Version 3.42 - August 2017 (Stand-alone release)
439
440 - added https support to the collection of drivers handled in cfileio.c
441 and drvrnet.c. This also handles the case where http transfers are
442 rerouted to https. Note that this enhancement introduces a dependency
443 on the libcurl development package. If this package is absent, CFITSIO
444 will still build but will not have https capability.
445
446 - made fix to imcomp_init_table function in imcompress.c. It now writes
447 ZSIMPLE keyword only to a compressed image that will be placed in the
448 primary header.
449
450 - fix made to fits_get_col_display_width for case of a vector column
451 of strings.
452
453 Version 3.42 - March 2017 (Ftools release only)
454
455 - in ftp_open_network and in ftp_file_exist, added code to repeatedly
456 attempt to make a ftp connection if the ftp server does not respond
457 to the first request. (some ftp servers don't appear to be 100% reliable).
458
459 - in drvrnet.c added many calls to 'fclose' to close unneeded files,
460 to avoid exceeding the maximum allowed number of files that can be
461 open at once.
462
463 - made substantial changes to the ftp_checkfile and http_checkfile routines
464 to streamline the process of checking for the existence of a .gz or .Z
465 compressed version of the file before opening the uncompressed file
466 (when using http or ftp to open the file).
467
468 - modified the code in ftp_open_network to send "\r\n" as end-of-line
469 characters instead of just "\n". Some ftp servers (in particular,
470 at heasarc.gsfc.nasa.gov) now require both characters, otherwise the
471 network connection simply hangs.
472
473 - modified the http_open_network routine to handle HTTP 301 or 302 redirects
474 to a FTP url. This is needed to support the new configuration on
475 the heasarc HTTP server which sometimes redirects http URLS to a ftp URL.
476
477 Version 3.41 - November 2016
478
479 - The change made in version 3.40 to include strings.h caused problems on
480 Windows (and other) platforms, so this change was backed out. The reason
481 for including it was to define the strcasecmp and strcasencmp functions, so
482 as an alternative, new equivalent functions called fits_strcasecmp and
483 fits_strncasecmp have been added to CFITSIO.as a substitute. All the
484 previous calls to the str[n]casecmp functions have been changed to
485 now call fits_str[n]casecmp. In addition, the previously defined
486 ngp_strcasecmp function (in grparser.c) has been removed and the calls to
487 it have been changed to fits_strcasecmp.
488
489 - The speed.c utility program was changed to correctly call
490 the gettimeofday function with a NULL second arguement.
491
492 Version 3.40 - October 2016
493
494 - fixed a bug when writing long string keywords with the CONTINUE convention
495 which caused the CONTINUE'd strings to only be 16 characters long, instead
496 of using up all the available space in the 80-character header record.
497
498 - fixed a missing 'defined' keyword in fitsio.h.
499
500 - replaced all calls to strtok (which is not threadsafe) with a new ffstrtok
501 function which internally calls the threadsafe strtok_r function. One
502 byproduct of this change is that <strings.h> must also be included
503 in several of the C source code files.
504
505 - modified the ffphbn function in putkey.c to support TFORM specifiers that
506 use lowercase 'p' (instead of uppercase) when referring to a variable-length
507 array column.
508
509 - modified the lexical parser in eval.y and eval_y.c to support bit array
510 columns (with TFORMn = 'X') with greater than 256 elements. Fix to bitcmp
511 function: The internal 'stream' array is now
512 allocated dynamically rather than statically fixed at size 256.
513 This was failing when users attempted a row filtering of a bitcol
514 that was wider than 256X. In bitlgte, bitand, and bitor functions, replaced
515 static stream[256] array allocation with dynamic allocation.
516
517 - modified the ffiter function in putcol.c to fix a problem which could
518 cause the iterator function to incorrectly deal with null values. This
519 only affected TLONG type columns in cases where sizeof(long) = 8, as well
520 as for TLONGLONG type columns.
521
522 - Fix made to uncompress2mem function in zcomprss.c for case where output
523 uncompressed file expands to over the 2^32 (4Gb) limit. It now
524 checks for this case at the start, and implements a 4Gb paging
525 system through the output buffer. The problem was specifically
526 caused by the d_stream.avail_out member being of 4-byte type uInt,
527 and thus unable to handle any memory position values above 4Gb.
528
529 - fixed a bug in fpackutil.c when using the -i2f (integer to float) option
530 in fpack to compress an integer image that is scaled with non-default values
531 for BSCALE and BZERO. This required an additional call to ffrhdu to reset
532 the internal structures that describe the input FITS file.
533
534 - modified fits_uncompress_table in imcompress.c to silently ignore the
535 ZTILELEN keyword value if it larger than the number of rows in the table
536
537 - Tweak strcasecmp/strncasecmp ifdefs to exclude 64-bit MINGW
538 environment, as it does not lack those functions. (eval_l.c,
539 fitsio2.h)
540
541 - CMakeLists.txt: Set M_LIB to "" for MINGW build environment (in
542 addition to MSVC).
543
544 - Makefile.in: Add *.dSYM (non-XCode gcc leftovers on Macs) to
545 clean list. Install libs by name rather than using a wildcard.
546
547 - configure: Fix rpath token usage for XCode vs. non-XCode gcc on Macs.
548
549
550 Version 3.39 - April 2016
551
552 - added 2 new routines suggested by Eric Mandel:
553 ffhisto3 is similar to ffhisto2, except that it does not close the
554 original file.
555 fits_open_extlist is similar to fits_open_data except that it opens
556 the FITS file and then moves to the first extension in the user-input
557 list of 'interesting' extensions.
558
559 - in ffpsvc and ffprec, it is necessary to treat CONTINUE, COMMENT, HISTORY,
560 and blank name keywords as a special case which must be treated differently
561 from other keywords because they have no value field and, by definition,
562 have keyword names that are strictly limited in length.
563
564 - added the Fortran wrapper routines for the 2 new string keyword reading
565 routines (FTGSKY and FTGKSL), and documented all the routines in the
566 FITSIO and CFITSIO users guides.
567
568 - in ffinttyp, added explicit initialization of the input 'negative'
569 argument to 0.
570
571 - added new routine to return the length of the keyword value string:
572 fits_get_key_strlen / ffgksl.
573 This is primarily intended for use with string keywords
574 that use the CONTINUE convention to continue the
575 value over multiple header records, but this routine can be used
576 to get the length of the value string for any type keyword.
577
578 - added new routine to read string-valued keywords:
579 fits_read_string_key / ffgsky
580 This routine supports normal string keywords as well as long string
581 keywords that use the CONTINUE convention. In many cases this routine
582 may be more convenient to use then the older fits_read_key_longstr
583 routine.
584
585 - changed the prototype of fits_register_driver in fitsio2.h so that the
586 pointer definition argument does not have the same name as the pointer
587 itself (to work around a bug in the pgcc compiler).
588
589 - added the missing FTDTDM fortran wrapper definition to f77_wrap3.c.
590
591 - modified Makefile.in and configure.in to add LDFLAGS_BIN for task linker
592 flages, which will be the same as LDFLAGS except on newer Mac OS X where
593 an rpath flag is added.
594
595 - modified Makefile.in to add a new "make utils" command which will build
596 fpack, funpack, cookbook, fitscopy, imcopy, smem, speed, and testprog.
597 These programs will be installed into $prfix/bin.
598
599 - fixed a bug when attempting to modify the values in a variable-length
600 bit ("X") column in a binary table.
601
602 - reinstated the ability to write HIERARCH keywords that contain characters
603 that would not be allowed in a normal 8-character keyword name, which had
604 been disabled in the previous release.
605
606 Version 3.38 - February 2016
607
608 - CRITICAL BUG FIX:
609 The Intel 15 and 16 compilers (and potentially other compilers) may silently
610 produce incorrect assembly code when compiling CFITSIO with the -O2 (or
611 higher) optimization flag. In particular, this problem could cause CFITSIO
612 to incorrectly read the values of arrays of 32-bit integers in a FITS file
613 (i.e., images with BITPIX = 32 or table columns with TFORM = 'J') when the
614 array is being read into a 'long' integer array in cases where the long
615 array elements are 8 bytes long.
616
617 One way to test if a particular system is affected by this problem is to
618 compile CFITSIO V3.37 (or earlier) with optimization enabled, and then
619 compare the output of the testprog.c program with the testprog.out file
620 that is distributed with CFITSIO. If there are any differences in the
621 files, then this system might be affected by this bug. Further tests
622 should be performed to determine the exact cause.
623
624 The root cause of this problem was traced to the fact that CFITSIO was
625 aliasing an array of 32-bit integers and an array of 64-bit integers to the
626 same memory location in order to obtain better data I/O efficiency when
627 reading FITS files. When CFITSIO modified the values in these arrays, it
628 was essential that the processing be done in strict sequential order from
629 one end of the array to the other end, as was implicit in the C code
630 algorithm. In this case, however, the compiler adopted certain loop
631 optimization techniques that produced assembly code that violated this
632 assumption. Technically, the CFITSIO code violates the "strict aliasing"
633 assumption in ANSI C99, therefore the affected CFITSIO routines have been
634 modified so that the aliasing of different data types to the same memory
635 location no longer occurs.
636
637 - fixed problem in configure and configure.in which caused the programs that
638 are distributed with CFITSIO (most notably, fack and funpack) to be build
639 without using any compiler optimization options, which could make them
640 run more slowly than expected.
641
642 - in imcompress.c, fixed bug where the rowspertile variable (declared as 'long')
643 was mistakenly declared as a TLONGLONG variable in a call to fits_write_key.
644 This could have caused the ZTILELEN keyword to be written incorrectly in
645 the header of tile-compressed FITS tables on systems where sizeof(long) = 4.
646
647 - in imcompress.c, implemented a new set of routines that safely convert
648 shorter integer arrays into a longer integer arrays (e.g. short to int)
649 where both arrays are aliased to the same memory location. These
650 special routines were needed to guard against certain compiler optimization
651 techniques that could produce incorrect code.
652
653 - modified the 4 FnNoise5_(type) routines in quantize.c to correctly
654 count the number of non-null pixels in the input array. Previously the
655 count could be inaccurate if the image mainly consisted of null pixels.
656 This could have caused certain floating point image tiles to be
657 quantized during the image compression process, when in fact the tile
658 did not satisfy all the criteria to be safely quantized.
659
660 - in imcomp_copy_comp2img, added THEAP to the list of binary table
661 keywords that may be present in the header of a compressed image
662 and should not be copied to the uncompressed image header.
663
664 - modified fits_copy_col to check that when copying a vector column, the
665 vector length in the output column is the same as in the input column.
666 Also modified the code to support the case where a column is being copied
667 to an earlier position in the same table (which shifts the input column
668 over 1 space).
669
670 - added configure option (--with-bzip2) to support reading bzip2 compressed
671 FITS files. This also required modifications to drvrmem.c and drvrfile.c
672 This depends on having the bzlib library installed on the
673 local machine. This patch was submitted by Dustin Lang.
674
675 - replaced calls to 'memcpy' by 'memmove' in getcolb.c, getcold.c,
676 getcole.c, and getcoli.c to support cases where the 2 memory areas
677 overlap. (submitted by Aurelien Jarno)
678
679 - modified the FITS keyword reading and writing routines to potentially
680 support keywords with names longer than 8-characters. This was implemented
681 in anticipation of a new experimental FITS convention which allows longer
682 keyword names.
683
684 - in fits_quantize_double in quantize.c, test if iseed == N_RANDOM,
685 to avoid the (unlikely) possibility of overflowing the random number
686 array bounds. (The corresponding fits_quantize_float routine already
687 performed this test).
688
689 - in the FnNoise5_short routine in quantize.c, change the first 'if'
690 statement from "if (nx < 5)" to "if )nx < 9)", in order to support the
691 (very rare) case where the tile is from 5 to 8 pixels wide. Also make
692 the same change in the 3 other similar FnNoise5_* routines.
693
694 - in the qtree_bitins64 routine in fits_hdecompress.c, must declare the
695 plane_val variable as 'LONGLONG' instead of int. This bug could have
696 caused integer overflow errors when uncompressing integer*4 images that
697 had been compressed with the Hcompress algorithm, but only in cases
698 where the image contains large regions of pixels whose values are close
699 to the maximum integer*4 value of 2**31.
700
701 - in fits_hcompress.c, call the calloc function instead of malloc when
702 allocating the signbits array, to eliminate the need to individually
703 set each byte to zero.
704
705 - in the ffinit routine, and in a couple other routines that call ffinit,
706 initialize the *fptr input parameter to NULL, even if the input
707 status parameter value is greater than zero. This helps prevent
708 errors later on if that fptr value is passed to ffclos.
709
710 - modified ftcopy, in edithdu.c, to only abort if status > 0 rather
711 than if status != 0. This had caused a problem in funpack in rare
712 circumstances.
713
714 - in imcompress.c changed all the calls to ffgdes to ffgdesll, to support
715 compressed files greater than 2.1 GB in size.
716
717 - fixed bug in ffeqtyll when it is called with 4th and 5th arguments
718 set to NULL.
719
720 - in fitsio.h, added the standard C++ guard around the declaration of the
721 function fits_read_wcstab. (reported by Tammo Jan Dijkema, Astron.)
722
723 - in fitsio.h, changed the prototype variable name "zero" to "zeroval" to
724 avoid conflict in code that uses a literal definition of 'zero' to mean 0.
725
726 - tweaked Makefile.in and configure.in to use LDFLAGS instead of CFLAGS
727 for linking, use Macros for library name, and let fpack and funpack
728 link with shared library.
729
730 - modified an 'ifdef' statement in cfileio.c to test for '__GLIBC__'
731 instead of 'linux' when initializing support for multi-threading.
732
733 - modified ffeqtyll to return an effective column data type of TDOUBLE
734 in the case of a 'K' (64-bit integer) column that has non-integer
735 TSCALn or TZEROn keywords.
736
737 - modified ffgcls (which returns the value in a column as a formatted string)
738 so that when reading a 'K' (TLONGLONG) column it returns a long long integer
739 value if the column is not scaled, but returns a double floating point
740 value if the column has non-integer TSCALn or TZEROn values.
741
742 - modified fitsio.h to correctly define "OFF_T long long" when using
743 the Borland compiler
744
745 - converted the 'end of line' characters in simplerng.c file to the unix
746 style, instead of PC DOS.
747
748 - updated CMakeLists.txt CMake build file which is primarily used to
749 build CFITSIO on Windows machines.
750
751 - modified fits_get_keyclass to recognize ZQUANTIZ and ZDITHER0 as
752 TYP_CMPRS_KEY type keywords, i.e., keywords used in tile compressed
753 image files.
754
755 - added test to see if HAVE_UNISTD_H is defined, as a condition for
756 including unistd.h in drvrfile.c drvrnet.c, drvrsmem.c, and group.c.
757
758 - modified the CMakelist.txt file to fix several issues (primarily for
759 building CFITSIO on Windows machines)..
760
761 - fixed bug when reading tile-compressed images that were compressed with
762 the IRAF PLIO algorithm. This bug did not affect fpack or funpack, but
763 other software that reads the compressed image could be affected. The
764 bug would cause the data values to be offset by 32768 from the actual
765 pixel values.
766
767 Version 3.37 - 3 June 2014
768
769 - replaced the random Gaussian and Poissonian distribution functions with
770 new code written by Craig Markwardt derived from public domain C++ functions
771 written by John D Cook.
772
773 - patched fitsio2.h to support CFITSIO on AArch64 (64-bit ARM)
774 architecture (both big and little endian). Supplied by
775 Marcin Juszkiewicz and Sergio Pascual Ramirez, with further update
776 by Michel Normand.
777
778 - fixed bug in fpackutil.c that caused fpack to exit prematurely if
779 the FZALGOR directive keyword was present in the HDU header.
780
781 Version 3.36 - 6 December 2013
782
783 - added 9 Dec: small change to the fileseek function in drvrfile.c to
784 support large files > 2 GB when building CFITSIO with MinGW on Windows
785
786 - reorganized the CFITSIO code directory structure; added a 'docs'
787 subdirectory for all the documentation, and a 'zlib' directory
788 for the zlib/gzip file compression code.
789
790 - made major changes to the compression code for FITS binary table
791 to support all types of columns, including variable-length arrays.
792 This code is mainly used via the fpack and funpack programs.
793
794 - increased the number of FITS files that can be opened as one
795 time to 1000, as defined by NMAXFILES in fitsio2.h.
796
797 - made small configuration changes to configure.in, configure,
798 fitsio.h, and drvrfile.c to support large files (64-bit file
799 offsets} when using the mingw-w64 compiler (provided by
800 Benjamin Gilbert).
801
802 - made small change to fits_delete_file to more completely ignore
803 any non-zero input status value.
804
805 - fixed a logic error in a 'if' test when parsing a keyword name
806 in the ngp_keyword_is_write function in grparser.c (provided
807 by David Binderman).
808
809 - when specifying the image compression parameters as part of the
810 compressed image file name (using the "[compress]" qualifier
811 after the name of the file), the quantization level value, if
812 specified, was not being recognized by the CFITSIO compression
813 routines. The image would always be compressed with the default
814 quantization level of 4.0, regardless of what was specified. This
815 affected the imcopy program, and potentially other user-generated
816 application programs that used this method to specify the
817 compression parameters. This bug did not affect fpack or
818 funpack. This was fixed in the imcomp_get_compressed_image_par
819 routine in the imcompress.c file. (reported by Sean Peters)
820
821 - defined a new CFITS_API macro in fitsio.h which is used to export the
822 public symbols when building CFITSIO on Windows systems with CMake. This
823 works in conjunction with the new Windows CMake build procedure that
824 is described in the README.win32 file. This complete revamping of the
825 way CFITSIO is built under Windows now supports building 64-bit
826 versions of the library. Thanks to Daniel Kaneider (Luminance HDR
827 Team) for providing these new CMake build procedures.
828
829 - modified the way that the low-level file_create routine works when
830 running in the Hera environment to ensure that the FITS file that is
831 created is within the allow user data disk area.
832
833 - modified fits_get_compression_type so that it does not return an error
834 if the HDU is a normal FITS IMAGE extension, and is not a tile-compressed
835 image.
836
837 - modified the low-level ffgcl* and ffpcl* routines to ensure that they
838 never try ro read or write more than 2**31 bytes from disk at one time,
839 as might happen with very large images, to avoid integer overflow errors.
840 Fix kindly provided by Fred Gutsche at NanoFocus AG (www.nanofocus.de).
841
842 - modified Makefile.in so that doing 'make distclean' does not delete
843 new config.sub and config.guess files that were recently added.
844
845 - adopted a patch from Debian in zcompress.c to "define" the values of
846 GZBUFSIZE and BUFFINCR, instead of exporting the symbols as 'int's.
847
848 Version 3.35 - 26 June 2013 (1st beta release was on 24 May)
849
850 - fixed problem with the default tile size when compressing images with
851 fpack using the Hcompress algorithm.
852
853 - fixed returned value ("status" instead of "*status")
854
855 - in imcompress.c, declared some arrays that are used to store the dimensions
856 of the image from 'int' to 'long', to support very large images (at least
857 on systems where sizeof(long) = 8),
858
859 - modified the routines that convert a string value to a float or double
860 to prevent them from returning a NaN or Inf value if the
861 string is "NaN" or "Inf" (as can happen with gcc implementation of the
862 strtod function).
863
864 - removed/replaced the use of the assert() functions when locking or
865 unlocking threads because they did not work correctly if NDEBUG is
866 defined.
867
868 - made modifications to the way the command-line file filters are parsed to
869 1) remove the 1024-character limit when specifying a column filter,
870 2) fixed a potential character buffer-overflow risk in fits_get_token, and
871 3) improved the parsing logic to remove any possible of confusing
872 2 slash characters ("//") in the string as the beginning of a
873 comment string.
874
875 - modified configure and Makefile.in so that when building CFITSIO
876 as a shared library on linux or Mac platforms, it will use the SONAME
877 convention to indicate whether each new release of the CFITSIO
878 library is binary-compatible with the previous version. Application
879 programs that link with the shared library will not need to be
880 recompiled as long as the versions are compatible. In practice,
881 this means that the shared library binary file that is created (on
882 Linux systems) will have a name like 'libcfitsio.so.I.J.K', where I is the
883 SONAME version number, J is the major CFITSIO version number (e.g. 3),
884 and K is the minor CFITSIO version number (e.g., 34). Two link
885 files will also be created such that
886 libcfitsio.so -> libcfitsio.so.I, and
887 libcfitsio.so.I -> libcfitsio.I.J.K
888 Application programs will still run correctly with the new version of
889 CFITSIO as long as the 'I' version number remains the same, but the
890 applications will fail to run if the 'I' number changes, thus alerting
891 the user that the application must be rebuilt.
892
893 - fixed bug in fits_insert_col when computing the new table row width
894 when inserting a '1Q' variable length array column.
895
896 - modified the image compression routines so that the output compressed
897 image (stored in a FITS binary table) uses the '1Q' variable length
898 array format (instead of '1P') when the input file is larger than 4 GB.
899
900 - added support for "compression directive" keywords which indicate how
901 that HDU should be compressed (e.g., which compression algorithm to use,
902 what tiling pattern to use, etc.). The values of these keywords will
903 override the compression parameters that were specified on the command
904 line when running the fpack FITS file compression program.
905
906 - globally changed the variable and/or subroutine name "dither_offset"
907 to "dither_seed" and "quantize_dither" to "quantize_method" so
908 that the names more accurately reflects their purpose.
909
910 - added support for a new SUBTRACTIVE_DITHER_2 method when compressing
911 floating point images. The only difference with the previous method
912 is that pixels with a value exactly equal to 0.0 will not be dithered,
913 and instead will be exactly preserved when the image is compressed.
914
915 - added support for an alias of "RICE_ONE" for "RICE_1" as the value
916 of the ZCMPTYPE keyword, which gives the name of the image compression
917 algorithm. This alias is used if the new SUBTRACTIVE_DITHER_2 option
918 is used, to prevent old versions of funpack from creating a corrupted
919 uncompressed image file. Only newer versions of funpack will recognize
920 this alias and be able to uncompress the image.
921
922 - made performance improvement to fits_read_compressed_img so that
923 when reading a section of an compressed image that includes only
924 every nth pixel in some dimension, it will only uncompressed a tile
925 if there are actually any pixels of interest in that tile.
926
927 - fixed several issues with the beta FITS binary table compression code
928 that is used by fpack: added support for zero-length vector columns,
929 made improvements to the output report when using the -T option in fpack,
930 changed the default table compression method to 'Rice' instead of
931 'Best', and now writes the 'ZTILELEN' keyword to document the number
932 of table rows in each tile.
933
934 - fixed error in ffbinit in calculating the total length of the binary
935 table extension if the THEAP keyword was used to override the
936 default starting location of the heap.
937
938 Version 3.34 - 20 March 2013
939
940 - modified configure and configure.in to support cross-compiled cfitsio
941 as a static library for Windows on a Linux platform using MXE
942 (http://mxe.cc) - a build environment for mingw32. (contributed by
943 Niels Kristian Bech Jensen)
944
945 - added conditional compilation statementsfor the mingw32 environment in
946 drvrfile.c because mingw32 does not include the ftello and fseeko functions.
947 (contributed by Niels Kristian Bech Jensen)
948
949 - fixed a potential bug in ffcpcl (routine to copy a column from one table
950 to another table) when dealing with the rare case of a '0X' column (zero
951 length bit column).
952
953 - fixed an issue in the routines that update or modify string-valued
954 keyword values, as a result of the change to ffc2s in the previous
955 release. These routines would exit with a 204 error status if the
956 current value of the keyword to be updated or modified is null.
957
958 - fixed typo in the previous modification that was intended to ignore
959 numerical overflows in Hcompress when decompressing an image.
960
961 - moved the 'startcol' static variable out of the ffgcnn routine and
962 instead added it as a member of the 'FITSfile' structure that is defined
963 in fitsio.h. This removes a possible race condition in ffgcnn in
964 multi-threaded environments.
965
966 Version 3.33 - 14 Feb 2013
967
968 - modified the imcomp_decompress_tile routine to ignore any numerical
969 overflows that might occur when using Hcompress to decompress the
970 image. If Hcompress is used in its 'lossy' mode, the uncompressed
971 image pixel values may slightly exceed the range of an integer*2
972 variable. This is generally of no consequence, so we can safely ignore
973 any overflows in this case and just clip the values to the legal range.
974
975 - the default tiling pattern when writing a tile-compressed image
976 has been changed. The old behavior was to compress the whole image
977 as one single large tile. This is often not optimal when dealing
978 with large images, so the new default behavior is to treat each
979 row of the image as one tile. This is the same default behavior
980 as in the standalone fpack program. The default tile size can
981 be overridden by calling fits_set_tile_dim.
982
983 - fixed bug that resulted in a corrupted output FITS image when
984 attempting to write a float or double array of values to a
985 tile-compressed integer data type image. CFITSIO does not support
986 implicit data type conversion in this case and now correctly
987 returns an appropriate error status.
988
989 - modified ricecomp.c to define the nonzero_count lookup table as an
990 external variable, rather then dynamically allocating it within the
991 3 routines that use it. This simplifies the code and eliminates the
992 need for special thread locking and unlocking statements. (Thanks to
993 Lars Kr. Lundin for this suggestion).
994
995 - modified how the uncompressed size of a gzipped file is computed in the
996 mem_compress_open routine in drvrmem.c. Since gzip only uses 4 bytes
997 in the compressed file header to store the original file size, one may
998 need to apply a modulo 2^32 byte correction in some cases. The logic
999 here was modified to allow for corner cases (e.g., very small files, and
1000 when running on 32-bit platforms that do not support files larger than
1001 2^31 bytes in size).
1002
1003 - added new public routine to construct a 80 keyword record from the 3 input
1004 component strings, i.e, the keyword name string, the value string, and
1005 the comment string: fits_make_key/ffmkky. (This was already an undocumented
1006 internal routine in previous versions of CFITSIO).
1007
1008 - modified ffc2s so that if the input keyword value string is a null string,
1009 then it will return a VALUE_UNDEFINED (204) status value. This makes it
1010 consistent with the behavior when attempting to read a null keyword
1011 (which has no value) as a logical or as a number (which also returns
1012 the 204 error). This should only affect cases where the header keyword
1013 does not have an equal sign followed by a space character in columns 9
1014 and 10 of the header record.
1015
1016 - Changed the "char *" parameter declarations to "const char *" in many
1017 of the routines (mainly the routines that modify or update keywords) to
1018 avoid compiler warnings or errors from C++ programs that tend to be more
1019 rigorous about using "const char *" when appropriate.
1020
1021 - added support for caching uncompressed image tiles, so that the tile does
1022 not need to be uncompressed again if the application program wants
1023 to read more data from the same tile. This required changes to the
1024 main FITS file structure that is defined in fitsio.h, as well as
1025 changes to imcompress.c.
1026
1027 - enhanced the previous modification to drvrfile.c to handle additional user
1028 cases when running in the HEASARC's Hera environment.
1029
1030 Version 3.32 - Oct 2012
1031
1032 - fixed flaw in the way logical columns (TFORM = 'L') in binary tables
1033 were read which caused an illegal value of 1 in the column to be interpreted
1034 as a 'T' (TRUE) value.
1035
1036 - extended the column filtering syntax in the CFITSIO file name parser to
1037 enable users and scripts to append new COMMENT or HISTORY keyword into the
1038 header of the filtered file (provided by Craig Markwardt). For example,
1039 fcopy "infile.fits[col #HISTORY='Processed on 2012-10-05']" outfile.fits
1040 will append this header keyword: "HISTORY Processed on 2012-10-05"
1041
1042 - small change to the code that opens and reads an ASCII region file to
1043 return an error if the file is empty.
1044
1045 - fixed obscure sign propagation error when attempting to read the
1046 uncompressed size of a gzipped FITS file. This resulted in a memory
1047 allocation error if the gzipped file had an uncompressed file
1048 size between 2^31 and 2^32 bytes. Fix supplied by Gudlaugur Johannesson
1049 (Stanford).
1050
1051 Version 3.31 - 18 July 2012
1052
1053 - enhanced the CFITSIO column filtering syntax to allow the comma, in addition
1054 to the semi-colon, to be used to separate clauses, for example:
1055 [col X,Y;Z = max(X,Y)]. This was done because users are not allowed to
1056 enter the semi-colon character in the on-line Hera data processing
1057 system due to computer security concerns.
1058
1059 - enhanced the CFITSIO extended filename syntax to allow specifying image
1060 compression parameters (e.g. '[compress Rice]') when opening an existing
1061 FITS file with write access. The specified compression parameters will
1062 be used by default if more images are appended to the existing file.
1063
1064 - modified drvrfile.c to do additional file security checks when CFITSIO
1065 is running within the HEASARC's Hera software system. In this case
1066 CFITSIO will not allow FITS files to be created outside of the user's
1067 individual Hera data directory area.
1068
1069 - fixed an issue in fpack and funpack on Windows machines, caused by
1070 the fact that the 'rename' function behaves differently on Windows
1071 in that it does not clobber an existing file, as it does on Unix
1072 platforms.
1073
1074 - fixed bug in the way byte-swapping was being performed when writing
1075 integer*8 null values to an image or binary table column.
1076
1077 - added the missing macro definition for fffree to fitsio.h.
1078
1079 - modified the low level table read and write functions in getcol*.c and
1080 putcol*.c to remove the 32-bit limitation on the number of elements.
1081 These routines now support reading and writing more than 2**31 elements
1082 at one time. Thanks to Keh-Cheng Chu (Stanford U.) for the patch.
1083
1084 - modified Makefile.in so that the shared libcfitsio.so is linked against
1085 pthreads and libm.
1086
1087 Version 3.30 - 11 April 2012
1088
1089 Enhancements
1090
1091 - Added new routine called fits_is_reentrant which returns 1 or 0 depending on
1092 whether or not CFITSIO was compiled with the -D_REENTRANT directive. This can
1093 be used to determine if it is safe to use CFITSIO in multi-threaded programs.
1094
1095 - Implemented much faster byte-swapping algorithms in swapproc.c based on code
1096 provided by Julian Taylor at ESO, Garching. These routines significantly
1097 improve the FITS image read and write speed (by more than a factor of 2 in
1098 some cases) on little-endian machines (e.g., Linux and Microsoft Windows and
1099 Macs running on x86 CPUs) where byte-swapping is required when reading and
1100 writing data in FITS files. This has no effect on big-endian machines
1101 (e.g. Motorola CPUs and some IBM systems). Even faster byte-swapping
1102 performance can be achieved in some cases by invoking the new "--enable-sse2"
1103 or "--enable-ssse3" configure options when building CFITSIO on machines that
1104 have CPUs and compilers that support the SSE2 and SSSE3 machine instructions.
1105
1106 - added additional support for implicit data type conversion in cases where
1107 the floating point image has been losslessly compressed with gzip. The
1108 pixels in these compressed images can now be read back as arrays of short,
1109 int, and long integers as well as single and double precision floating-point.
1110
1111 - modified fitsio2.h and f77_wrap.h to recognize IBM System z mainframes by
1112 testing if __s390x__ or __s390__ is defined.
1113
1114 - small change to ffgcrd in getkey.c so that it supports reading a blank
1115 keyword (e.g., a keyword whose name simply contains 8 space characters).
1116
1117 Bug Fixes
1118
1119 - fixed a bug in imcomp_decompress_tile that caused the tile-compressed image
1120 to be uncompressed incorrectly (even though the tile-compressed image itself
1121 was written correctly) under the following specific conditions:
1122 - the original FITS image has a "float" datatype (R*4)
1123 - one or more of the image tiles cannot be compressed using the standard
1124 quantization method and instead are losslessly compressed with gzip
1125 - the pixels in these tiles are not all equal to zero (this bug does
1126 affect tiles where all the pixels are equal to zero)
1127 - the program that is reading the compressed image uses CFITSIO's
1128 "implicit datatype conversion" feature to read the "float" image
1129 back into an array of "double" pixel values.
1130 If all these conditions are met, then the returned pixel values in the
1131 affected image tiles will be garbage, with values often ranging
1132 up to 10**34. Note that this bug does not affect the fpack/funpack
1133 programs, because funpack does not use CFITSIO's implicit datatype
1134 conversion feature when uncompressing the image.
1135
1136 Version 3.29 - 2 December 2011
1137
1138 Enhancements
1139
1140 - modified Makefile.in to allow configure to override the lib and include
1141 destination directories.
1142
1143 - added (or restored actually) support for tile compression of 1-byte integer
1144 images in imcomp_compress_tile. Support for that data type was overlooked
1145 during recent updates to this routine.
1146
1147 - modified the fits_get_token command-line parsing routine to perform more
1148 rigorous checks to determine if the token can be interpreted as a number
1149 or not.
1150
1151 - made small modification to fpack.c to not allow the -i2f option (convert
1152 image from integer to floating point) with the "-g -q 0" option (do lossless
1153 gzip compression). It is more efficient to simply use the -g option alone.
1154
1155 - made modifications to fitsio.h and drvrfile.c to support reading and
1156 writing large FITS files (> 2.1 GB) when building CFITSIO using
1157 Microsoft Visual C++ on Windows platforms.
1158
1159 - added new WCS routine (ffgicsa) which returns the WCS keyword values
1160 for a particular WCS version ('A' - 'Z').
1161
1162 Bug Fixes
1163
1164 - fixed a problem with multi-threaded apps that open/close FITS files
1165 simultaneously by putting mutex locks around the call to
1166 fits_already_open and in fits_clear_Fptr.
1167
1168 - fixed a bug when using the 'regfilter' function to select a subset of the
1169 rows in a FITS table that have coordinates that lie within a specified
1170 spatial region on the sky. This bug only affects the rarely used panda
1171 (and epanda and bpanda) region shapes in which the region is defined by
1172 the intersection of an annulus and a pie-shaped wedge. The previous code
1173 (starting with version 3.181 of CFITSIO where support for the panda region
1174 was first introduced) only worked correctly if the 2 angles that define
1175 the wedge have values between -180 and +180. If not, then fewer rows than
1176 expected may have been selected from the table.
1177
1178 - fixed the extended filename parser so that when creating a histogram by
1179 binning 2 table columns, if a keyword or column name is given as the
1180 weighting factor, then the output histogram image will have a floating
1181 point datatype, not the default integer datatype as is the case when no
1182 weight is specified (e.g. with a filename like
1183 "myfile.fits[bin x,y; weight_column]"
1184
1185 - added fix to the code in imcompress.c to work around a problem with
1186 dereferencing the value of a pointer, in cases where the address of
1187 that pointer has not been defined (e.g., the nulval variable).
1188
1189 - modified the byte shuffling algorithm in fits_shuffle_8bytes to work
1190 around a strange bug in the proprietary SunStudioExpress C compiler
1191 under OpenSolaris.
1192
1193 - removed spurious messages on the CFITSIO error stack when opening a
1194 FITS file with FTP (in drvrnet.c);
1195
1196 Version 3.28 - 12 May 2011
1197
1198 - added an enhancement to the tiled-image compression method when compressing
1199 floating-point image using the standard (lossy) quantization method. In
1200 cases where an image tile cannot be quantized, The floating-point pixel values
1201 will be losslessly compressed with gzip before writing them to the tile-
1202 compressed file. Previously, the uncompressed pixel values would have
1203 been written to the file, which obviously requires more disk space.
1204
1205 - made significant internal changes to the structure of the tile compression
1206 and uncompression routines in imcompress.c to make them more modular and
1207 easier to maintain.
1208
1209 - modified configure.in and configure to force it to build a Universal
1210 binary on Mac OS X.
1211
1212 - modified the ffiter function in putcol.c to properly clean up allocated
1213 memory if an error occurs.
1214
1215 - in quantize.c, when searching for the min and max values in a float array,
1216 initialize the max value to -FLT_MAX instead of FLT_MIN (and similarly
1217 for double array).
1218
1219 Version 3.27 - 3 March 2011
1220
1221 Enhancements
1222
1223 - added new routines fits_read_str and fits_delete_str which read or
1224 delete, respectively, a header keyword record that contains a specified
1225 character string.
1226
1227 - added a new routine called fits_free_memory which frees the memory
1228 that fits_read_key_longstr allocated for the long string keyword value.
1229
1230 - enhanced the ffmkky routine in fitscore.c to not put a space before the
1231 equals sign when writing long string-valued keywords using the ESO
1232 HIERARCH keyword convention, if that extra character is needed to
1233 fit the length of the keyword name + value string within the 80-character
1234 FITS keyword record.
1235
1236 - made small change to fits_translate_keyword to support translation of
1237 blank keywords (where the name = 8 blank characters)
1238
1239 - modified fpack so that it uses the minimum of the 2nd, 3rd, and 5th order
1240 MAD noise values when quantizing and compressing a floating point image.
1241 This is more conservative than just using the 3rd order MAD value alone.
1242
1243 - added new routine imcomp_copy_prime2img to imcompress.c that is used by
1244 funpack to copy any keywords that may have been added to the primary
1245 array of the compressed image file (a null image) back into the header of
1246 the uncompressed image.
1247
1248 - enhanced the fits_quantize_float and fits_quantize_double routines in
1249 quantize.c to also compress the tile if it is completely filled with
1250 null values. Previously, this type of tile would have been written
1251 to the output compressed image without any compression.
1252
1253 - enhanced imcomp_decompress_tile to support implicit datatype conversion
1254 when reading a losslessly compressed (with gzip) real*4 image into an
1255 array of real*8 values.
1256
1257 - in imcompress.c, removed possible attempt to free memory that had not
1258 been allocated.
1259
1260
1261 Version 3.26 - 30 December 2010
1262
1263 Enhancements
1264
1265 - defined 2 new macros in fitsio.h:
1266 #define CFITSIO_MAJOR 3
1267 #define CFITSIO_MINOR 26
1268 These may be used within other macros to detect the CFITSIO
1269 version number at compile time.
1270
1271 - modified group.c to initialize the output URL to a null string in
1272 fits_url2relurl. Also added more robust tests to see if 2 file
1273 pointers point to the same file.
1274
1275 - enhanced the template keyword parsing code in grparser.c to support
1276 the 'D' exponent character in the ASCII representation of floating
1277 point keyword values (as in TVAL = 1.23D03). Previously, the parser
1278 would have written this keyword with a string value (TVAL = '1.23D03').
1279
1280 - modified the low-level routines that write a keyword record to a FITS
1281 header so that they silently replace any illegal characters (ASCII
1282 values less than 32 or greater than 126) with an ASCII space character.
1283 Previously, these routines would have returned with an error when
1284 encountering these illegal characters in the keyword record (most commonly
1285 tab, carriage return, and line feed characters).
1286
1287 - made substantial internal changes to imcompress.c in preparation for
1288 possible future support for compression methods for FITS tables analogous
1289 to the tiled image compression method.
1290
1291 - replaced all the source code in CFITSIO that was distributed under the
1292 GNU General Public License with freely available code. In particular,
1293 the gzip file compression and uncompression code was replaced by the
1294 zlib compression library. Thus, beginning with this version 3.26 of CFITSIO,
1295 other software applications may freely use CFITSIO without necessarily
1296 incurring any GNU licensing requirement. See the License.txt file for
1297 the CFITSIO licensing requirements.
1298
1299 - added support for using cfitsio in different 'locales' which use a
1300 comma, not a period, as the decimal point character in ASCII
1301 representation of a floating point number (e.g., France). This
1302 affects how floating point keyword values and floating point numbers
1303 in ASCII tables are read and written with the 'printf' and 'strtod'
1304 functions.
1305
1306 - added a new utility routine called fits_copy_rows/ffcprw that copies
1307 a specified range of rows from one table to another.
1308
1309 - enhanced the test for illegal ASCII characters in a header (fftrec) to
1310 print out the name of the offending character (e.g TAB or Line Feed) as
1311 well as the Hex value of the character.
1312
1313 - modified ffgtbc (in fitscore.c) to support nonstandard vector variable
1314 length array columns in binary tables (e.g. with TFORMn = 2000PE(500)').
1315
1316 - modified the configure file to add "-lm" when linking CFITSIO on
1317 Solaris machines.
1318
1319 - added new routine, fits_get_inttype, to parse an integer keyword value
1320 string and return the minimum integer datatype (TBYTE, TSHORT, TLONG,
1321 TLONGLONG) required to store the integer value.
1322
1323 - added new routine, fits_convert_hdr2str, which is similar to fits_hdr2str
1324 except that if the input HDU is a tile compressed image (stored
1325 in a binary table) then it will first convert that header back to
1326 that of a normal uncompressed FITS image before concatenating the header
1327 keyword records.
1328
1329 - modified the file template reading routine (ngp_line_from_file in
1330 grparser.c) so that it ignores any carriage return characters (\r)
1331 in the line, that might be present, e.g. if the file was created on a
1332 Windows machine that uses \r\n as end of line characters.
1333
1334 - modified the ffoptplt routine in cfileio.c to check if the PCOUNT
1335 keyword in the template file has a non-zero value, and if so, resets
1336 it to zero in the newly created file.
1337
1338 Bug Fixes
1339
1340 - fixed a bug when uncompressing floating-point images that contain Nan
1341 values on some 64-bit platforms.
1342
1343 - fixed a bug when updating the value of the CRPIXn world coordinate
1344 system keywords when extracting a subimage from larger FITS image, using the
1345 extended CFITSIO syntax (e.g. myimage[1:500:2, 1:500:2]). This bug only
1346 affects cases where the pixel increment value is not equal to 1, and caused
1347 the coordinate grid to be shifted by between 0.25 pixels (in the case of
1348 a pixel increment of 2) and 0.5 pixels (for large pixel increment values).
1349
1350 - fixed a potential string buffer overflow error in the ffmkls routine
1351 that modifies the value and comment strings in a keyword that uses
1352 the HEASARC long string keyword convention.
1353
1354 - fixed a bug in imcompress.c that could cause programs to abort on 64-bit
1355 machines when using gzip to tile-compress images. Changed the declaration
1356 of clen in imcomp_compress_tile from int to size_t.
1357
1358 Version 3.25 - 9 June 2010
1359
1360 - fixed bug that was introduced in version 3.13 that broke the ability
1361 to reverse an image section along the y-axis with an image section
1362 specifier like this: myimage.fits[*,-*]. This bug caused the output
1363 image to be filled with zeros.
1364
1365 - fixed typo in the definition of the ftgprh Fortran wrapper routine
1366 in f77_wrap3.c.
1367
1368 - modified the cfitsio.pc.in configuration file to make the lib path
1369 a variable instead of hard coding the path. The provides more
1370 flexibility for projects such as suse and fedora when building CFITSIO.
1371
1372 - fixed bug in imcomp_compress_tile in imcompress.c which caused
1373 null pixel values to be written incorrectly in the rare case where
1374 the floating-point tile of pixels could not be quantized into integers.
1375
1376 - modified imcompress.c to add a new specialized routine to uncompress
1377 an input image and then write it to a output image on a tile by tile basis.
1378 This appears to be faster than the old method of uncompressing the
1379 whole image into memory before writing it out. It also supports
1380 large images with more than 2**31 pixels.
1381
1382 - made trivial changes to 2 statements in drvrfile.c to suppress
1383 nuisance compiler warnings.
1384
1385 - some compilers define CLOCKS_PER_SEC as a double instead of an integer,
1386 so added an explicit integer type conversion to 2 statements in
1387 imcompress.c that used this macro.
1388
1389 - removed debugging printf statements in drvrnet.c (15 July)
1390
1391 Version 3.24 - 26 January 2010
1392
1393 - modified fits_translate_keywords so that it silently ignores any
1394 illegal ASCII characters in the value or comment fields of the input
1395 FITS file. Otherwise, fpack would abort without compressing input
1396 files that contained this minor violation of the FITS rules.
1397
1398 - added support for Super H cpu in fitsio2.h
1399
1400 - updated funpack to correctly handle the -S option, and to use a
1401 more robust algorithm for creating temporary output files.
1402
1403 - modified the imcomp_compress_tile routine to support the NOCOMPRESS
1404 debugging option for real*4 images.
1405
1406 Version 3.23 - 7 January 2010
1407
1408 - reduced the default value for the floating point image quantization
1409 parameter (q) from 16 to 4. This parameter is used when tile compressing
1410 floating point images. This change will increase the average compression
1411 ratio for floating point images from about 4.6 to about 6.5 without losing
1412 any significant information in the image.
1413
1414 - enhanced the template keyword parsing routine to reject a header
1415 template string that only contains a sequence of dashes.
1416
1417 - enhanced the ASCII region file reading routine to allow tabs as well
1418 as spaces between fields in the file.
1419
1420 - got rid of bogus error message when calling fits_update_key_longstr
1421
1422 - Made the error message more explicit when CFITSIO tries to write
1423 to a GZIP compressed file. Instead of just stating "cannot write
1424 to a READONLY file", it will say "cannot write to a GZIP compressed
1425 file".
1426
1427 Version 3.22 - 28 October 2009
1428
1429 - added an option (in imcompress.c) to losslessly compress floating
1430 point images, rather than using the default integer scaling method.
1431 This option is almost never useful in practice for astronomical
1432 images (because the amount of compression is so poor), but it has
1433 been added for test comparison purposes.
1434
1435 - enhanced the dithering option when quantizing and compressing
1436 floating point images so that a random dithering starting point
1437 is used, so that the same dithering pattern does not get used for
1438 every image.
1439
1440 - modified the architecture setup section of fitsio2.h to support the
1441 64-core 8x8-architecture Tile64 platform (thanks to Ken Mighell, NOAO)
1442
1443 Fixes
1444
1445 - fixed a problem that was introduced in version 3.13 of CFITSIO
1446 in cases where a program writes it own END keyword to the header
1447 instead of letting CFITSIO do it, as is strongly recommended. In
1448 one case this caused CFITSIO to rewrite the END keyword and any
1449 blank fill keywords in the header many times, causing a
1450 noticeable slow-down in the FITS file writing speed.
1451
1452 Version 3.21 - 24 September 2009
1453
1454 - fixed bug in cfileio.c that caused CFITSIO to crash with a bus error
1455 on Mac OS X if CFITSIO was compiled with multi-threaded support (with
1456 the --enable-reentrant configure option). The Mac requires an
1457 additional thread initialization step that is not required on Linux
1458 machines. Even with this fix, occasional bus errors have been seen on
1459 some Mac platforms, The bus errors are seen when running the
1460 thread_test.c program. The bus errors are very intermittent, and occur
1461 less than about 1% of the time, on the affected platforms.
1462 These bus errors have not been seen on Linux platforms.
1463
1464 - fixed invalid C comment delimiter ("//*" should have been "/*")
1465 in imcompress.c.
1466
1467 - Increased the CFITSIO version number string length
1468 in fpackutil.c, to fix problem on some platforms when running
1469 fpack -V or funpack -V. Also modified the output format of the
1470 fpack -L command.
1471
1472 Version 3.20 - 31 August 2009
1473
1474 - modified configure.in and configure so that it will build the Fortran
1475 interface routines by default, even if no Fortran compiler is found
1476 in the user's path. Building the interface routines may be disabled
1477 by specifying FC="none". This was done at the request of users who
1478 obtained CFITSIO from some other standard linux distributions, where
1479 CFITSIO was apparently built in an environment that had no Fortran
1480 compiler and hence did not build the Fortran wrappers.
1481
1482 - modified ffchdu (close HDU) so that it calls the routine to update
1483 the maximum length of variable length table columns in the TFORM
1484 values in all cases where the values may have changed. Previously
1485 it would not update the values if a value was already specified in
1486 the TFORM value.
1487
1488 - added 2 new string manipulation functions to the CFITSIO parser
1489 (contributed by Craig Markwardt): strmid extracts a substring
1490 from a string, and strstr searches for a substring within a string.
1491
1492 - removed the code in quantize.c that treated "floating-point integer"
1493 images as a special case (it would just do a datatype conversion from
1494 float to int, and not otherwise quantize the pixel values). This
1495 caused complications with the new subtractive dithering feature.
1496
1497 - enhanced the code for converting floating point images to quantized
1498 scaled integer prior to tile-compressing them, to apply a random
1499 subtractive dithering, which improves the photometric accuracy
1500 of the compressed images.
1501
1502 - added new internal routine, iraf_delete_file, for use by fpack to
1503 delete a pair of IRAF format header and pixel files.
1504
1505 - small change in cfileio.c in the way it recognizes an IRAF format
1506 .imh file. Instead of just requiring that the filename contain the
1507 ".imh" string, that string must occur at the end of the file name.
1508
1509 - fixed bug in the code that is used when tile-compressing real*4 FITS
1510 images, which quantizes the floating point pixel values into
1511 integer levels. The bug would only appear in the fairly rare
1512 circumstance of tile compressing a floating point image that contains
1513 null pixels (NaNs) and only when using the lossy Hcompress algorithm
1514 (with the s parameter not equal to 1). This could cause underflow of
1515 low valued pixels, causing them to appear as very large pixel values
1516 (e.g., > 10**30) in the compressed image
1517
1518 - changed the "if defined" blocks in fitsio.h, fitsio2.h and f77_wrap.h
1519 to correctly set the length of long variables on sparc64 machines.
1520 Patch contributed by Matthew Truch (U. Penn).
1521
1522 - modified the HTTP file access code in drvrnet.c to support basic
1523 HTTP authentication, where the user supplies a user name and
1524 password. The CFITSIO filename format in this case is:
1525 "http://username:password@hostname/..."
1526 Thanks to Jochen Liske (ESO) for the suggestion and the code.
1527
1528 Version 3.181 (BETA) - 12 May 2009
1529
1530 - modified region.c and region.h to add support for additional
1531 types of region shapes that are supported by ds9: panda, epanda,
1532 and bpanda.
1533
1534 - fixed compiler error when using the new _REENTRANT flag, having to
1535 do with the an attempted static definition of Fitsio_Lock in
1536 several source files, after declaring it to be non-static in fitsio2.h.
1537
1538 Version 3.18 (BETA) - 10 April 2009
1539
1540 - Made extensive changes to make CFITSIO thread safe. Previously,
1541 all opened FITS files shared a common pool of memory to store
1542 the most recently read or written FITS records in the files.
1543 In a multi-threaded environment different threads could
1544 simultaneously read or write to this common area causing
1545 unpredictable results. This was changed so that every opened
1546 FITS file has its own private memory area for buffering the
1547 file. Most of the changes were in buffers.c, fitsio.h, and
1548 fitsio2.h. Additional changes were made to cfileio.c, mainly
1549 to put locks around small sections of code when setting up the
1550 low-level drivers to read or write the FITS file. Also, locks
1551 were needed around the GZIP compression and uncompression code
1552 in compress.c., the error message stack access routine in
1553 fitscore.c, the encode and decode routines in fits_hcompress.c
1554 and fits_hdecompress.c, in ricecomp.c, and the table row
1555 selection and table calculator functions. Also, removed the
1556 'static' declaration of the local variables in pliocomp.c
1557 which did not appeared to be required and prevented the
1558 routines from being thread safe.
1559
1560 As a consequence of having a separate memory buffer for every
1561 FITS file (by default, about 115 kB per file), CFITSIO may now
1562 allocate more memory than previously when an application
1563 program opens multiple FITS files at once. The read and write
1564 speed may also be slightly faster, since the buffers are not
1565 shared between files.
1566
1567 - Added new families of Fortran wrapper routines to read and
1568 write values to large tables that have more than 2**31 rows.
1569 The arguments that define the first row and first element to
1570 read or write must be I*8 integers, not ordinary I*4
1571 integers. The names of these new routines have 'LL' appended
1572 to them, so for example, ftgcvb becomes ftgcvbll.
1573
1574 Fixes
1575
1576 - Corrected an obscure bug in imcompress.c that would have incorrectly
1577 written the null values only in the rare case of writing a signed
1578 byte array that is then tile compressed using the Hcompress or PLIO
1579 algorithm.
1580
1581 Version 3.14 - 18 March 2009
1582
1583 Enhancements
1584
1585 - modified the tiled-image compression and uncompression code to
1586 support compressing unsigned 16-bit integer images with PLIO.
1587 FITS unsigned integer arrays are offset by -32768, but the PLIO
1588 algorithm does not work with negative integer values. In this
1589 case, an offset of 32768 is added to the array before compression,
1590 and then subtracted again when reading the compressed array.
1591 IMPORTANT NOTE: This change is not backward compatible, so
1592 these PLIO compressed unsigned 16-bit integer images will not be
1593 read correctly by previous versions of CFITSIO; the pixel values
1594 will have an offset of +32768.
1595
1596 - minor changes to the fpack utility to print out more complete
1597 version information with the -V option, and format the report
1598 produced by the -T option more compactly.
1599
1600 Fixes
1601
1602 - Modified imcomp_compress_image (which is called by fpack) so that
1603 it will preserve any null values (NaNs) if the input image has
1604 a floating point datatype (BITPIX = -32 or -64). Null values in
1605 integer datatype images are handled correctly.
1606
1607 - Modified imcomp_copy_comp2img so that it does not copy the
1608 ZBLANK keyword, if present, from the compressed image header
1609 when uncompressing the image.
1610
1611 - Fixed typo in the Fortran wrapper macro for the ftexist function.
1612
1613 Version 3.13 - 5 January 2009
1614
1615 Enhancements
1616
1617 - updated the typedef of LONGLONG in fitsio.h and cfortran.h to
1618 support the Borland compiler which uses the __int64 data type.
1619
1620 - added new feature to the extended filename syntax so that when
1621 performing a filtering operation on specified HDU, if you add
1622 a '#' character after the name or number of the HDU, then ONLY
1623 that HDU (and the primary array if the HDU is a table) will be
1624 copied into the filtered version of the file in memory. Otherwise,
1625 by default CFITSIO copies all the HDUs from the input file into
1626 memory.
1627
1628 - when specifying a section, if the specified number of dimensions
1629 is less than the number of dimensions in the image, then CFITSIO
1630 will use the entire dimension, as if a '*' had been specified.
1631 Thus [1:100] is equivalent to [1:100,*] when specifying a section
1632 of 2 dimensional image.
1633
1634 - modified fits_copy_image_section to read/write the section 1 row
1635 at a time, instead of the whole section, to reduce memory usage.
1636
1637 - added new stream:// drivers for reading/writing to stdin/stdout.
1638 This driver is somewhat fragile, but for simple FITS read and
1639 write operations this driver streams the FITS file on stdin
1640 or stdout without first copying the entire file in memory, as is
1641 done when specifying the file name as "-".
1642
1643 - slight modification to ffcopy to make sure that the END keyword
1644 is correctly written before copying the data. This is required
1645 by the new stream driver.
1646
1647 - modified ffgcprll, so that when writing data to an HDU, it first
1648 checks that the END keyword has been written to the correct place.
1649 This is required by the new stream driver.
1650
1651 Fixes
1652
1653 - fixed bug in ffgcls2 when reading an ASCII string column in binary
1654 tables in cases where the width of the column is greater than 2880
1655 characters and when reading more than 1 row at a time. Similar
1656 change was made to ffpcls to fix same problem with writing to
1657 columns wider than 2880 characters.
1658
1659 - updated the source files listed in makepc.bat so that it can be
1660 used to build CFITSIO with the Borland C++ compiler.
1661
1662 - fixed overflow error in ffiblk that could cause writing to Large Files
1663 (> 2.1 GB) to fail with an error status.
1664
1665 - fixed a bug in the spatial region code (region.c) with the annulus
1666 region. This bug only affected specialized applications which
1667 directly use the internal region structure; it does not affect
1668 any CFITSIO functions directly.
1669
1670 - fixed memory corruption bug in region.c that was triggered if the
1671 region file contained a large number of excluded regions.
1672
1673 - got rid of a harmless error message that would appear if filtering
1674 a FITS table with a GTI file that has zero rows. (eval_f.c)
1675
1676 - modified fits_read_rgnfile so that it removes the error messages
1677 from the error stack if it is unable to open the region file as
1678 a FITS file. (region.c)
1679
1680 Version 3.12 - 8 October 2008
1681
1682 - modified the histogramming code so that the first pixel in the binned
1683 array is chosen as the reference pixel by default, if no other
1684 value is previously defined.
1685
1686 - modified ffitab and ffibin to allow a null pointer to the
1687 EXTNAME string, when inserting a table with no name.
1688
1689 Version 3.11 - 19 September 2008
1690
1691 - optimized the code when tile compressing real*4 images (which get
1692 scaled to integers). This produced a modest speed increase. For
1693 best performance, one must specify the absolute q quantization
1694 parameter, rather than relative to the noise in the tile (which
1695 is expensive to compute).
1696
1697 - modified the FITS region file reading code to check for NaN values,
1698 which signify the end of the array of points in a polygon region.
1699
1700 - removed the test for LONGSIZE == 64 from fitsio.h, since it may
1701 not be defined.
1702
1703 - modified imcompress.c to support unconventional floating point FITS
1704 images that also have BSCALE and BZERO keywords. The compressed
1705 floating point images are linearly scaled twice in this case.
1706
1707 Version 3.10 - 20 August 2008
1708
1709 - fixed a number of cases, mainly dealing with long input file names
1710 (> 1024 char), where unsafe usage of strcat and strcpy could have caused
1711 buffer overflows. These buffer overflows could cause the application
1712 to crash, and at least theoretically, could be exploited by a
1713 malicious user to execute arbitrary code. There are no known instances
1714 of this type of malicious attack on CFITSIO applications, and the
1715 likelihood of such an attack seems remote. None the less, it would
1716 be prudent for CFITSIO users to upgrade to this new version to guard
1717 against this possibility.
1718
1719 - modified some of the routines to define input character string
1720 parameters as "const char *" rather than just "char *" to eliminate
1721 some compiler warnings when the calling routine passes a constant
1722 string to the CFITSIO routine. Most of the changes were to the
1723 keyword name argument in the many routines that read or write keywords.
1724
1725 - fixed bug when tile-compressing a FITS image which caused all the
1726 completely blank keywords in the input header to be deleted from
1727 the output compressed image. Also added a feature to preserve any
1728 empty FITS blocks in the header (reserved space for future keywords)
1729 when compressing or uncompressing an image.
1730
1731 - fixed small bug in the way the default tile size is set in imcompress.c.
1732 (Fix sent in by Paul Price).
1733
1734 - added support for reading FITS format region files (in addition
1735 to the ASCII format that was previously supported). Thanks to
1736 Keith Arnaud for modifying region.c to do this.
1737
1738 Version 3.09 - 12 June 2008
1739
1740 - fixed bug in the calculator function, parse_data, that evaluates
1741 expressions then selecting rows or modifying values in table columns.
1742 This bug only appeared in unusual circumstances
1743 where the calculated value has a null value (= TNULLn). The bug
1744 could cause elements to not be flagged as having a null value, or
1745 in rare cases could cause valid elements to be flagged as null. This
1746 only appears to have affected 64-bit platforms (where size(long) = 8).
1747
1748 - fixed typo in imcomp_decompress_tile: call to fffi2r8 should have
1749 been to fffi4r8.
1750
1751 - in the imcopy_copy_comp2img routine, moved the call to
1752 fits_translate_keywords outside of the 'if' statement. This could
1753 affect reading compressed images that did not have a EXTNAME keyword
1754 in the header.
1755
1756 - fixed imcomp_compress_tile in imcompress.c to properly support
1757 writing unsigned integers, in place, to tile compressed images.
1758
1759 - modified fits_read_compressed_img so that if the calling routine
1760 specifies nullval = 0, then it will not check for null-valued
1761 pixels in the compressed FITS image. This mimics the same
1762 behavior when reading normal uncompressed FITS images.
1763
1764 Version 3.08 - 15 April 2008
1765
1766 - fixed backwards compatibility issue when uncompressing a Rice
1767 compressed image that was created with previous versions of
1768 CFITSIO (this late fix was added on May 18).
1769
1770 - small change to cfortran.h to add "extern" to the common block
1771 definition. This was done for compatibility with the version
1772 of cfortran.h that is distributed by the Debian project.
1773
1774 - relaxed the requirement that a string valued keyword must have a
1775 closing quote character. If the quote is missing, CFITSIO will silently
1776 append a quote at the end of the keyword record. This change was made
1777 because otherwise it is very difficult to correct the keyword
1778 because CFITSIO would exit with an error before making the fix.
1779
1780 - added a new BYTEPIX compression parameter when tile-compressing
1781 images with the Rice algorithm.
1782
1783 - cached the NAXIS and NAXISn keyword values in the fitsio structure
1784 for efficiency, to eliminate duplicates reads of these keywords.
1785
1786 - added variants of the Rice compression and uncompression routines to
1787 support short int images (in addition to the routines that support int).
1788
1789 - moved the definition of LONGLONG_MIN and LONGLONG_MAX from fitsio2.h
1790 to fitsio.h, to make it accessible to application programs.
1791
1792 - make efficiency improvements to fitscore.c, to avoid needless searches
1793 through the entire header when reading the required keywords that must
1794 be near the beginning of the header.
1795
1796 - made several improvements to getcol.c to optimize reading of compressed
1797 and uncompressed images.
1798
1799 - changed the compression level in the gzip code from 6 to 1. In most
1800 cases this will provide nearly the same amount of compression, but is
1801 significantly faster in some cases.
1802
1803 - added new "helper routines' to imcompress.c to allow applications to
1804 specified the "quantize level" and Hcompress scaling and smoothing
1805 parameters
1806
1807 - modified the extended filename syntax to support the "quantize level"
1808 and Hcompress scaling and smoothing parameters. The parser in
1809 cfileio.c was extensively modified.
1810
1811 - extensive changes to quantize.c:
1812 - replace the "nbits" parameter with "quantize level"
1813 - the quantize level is now relative to the RMS noise in the image
1814 - the HCOMPRESS scale factor is now relative to the RMS noise
1815 - added routines to calculate RMS noise in image
1816 (these changes require a change to the main file structure in fitsio.h)
1817
1818 - initialize errno = 0 before the call to strtol in ffext, in case errno
1819 has previously been set by an unrelated error condition.
1820
1821 - added the corresponding long name for the ffgkyjj routine to longnam.h.
1822
1823 - changed imcomp_copy_comp2img (in imcompress.c) to not require the
1824 presence of the EXTNAME keyword in the input compressed image header.
1825
1826 - modified imcompress.c to only write the UNCOMPRESSED_DATA column
1827 in tile-compressed images if it is actually needed. This eliminates
1828 the need to subsequently delete the column if it is not used
1829 (which is almost always the case).
1830
1831 - found that it is necessary to seek to the EOF of a file after
1832 truncating the size of the file, to reestablish a definite
1833 current location in the file. The required small changes to 3
1834 routines: file_truncate (to seek to EOF) and fftrun (to set io_pos)
1835 and the truncation routine in drvrmem.c.
1836
1837 - improved the efficiency when compressing integer images with
1838 gzip. Previously, the image was always represented using integer*4
1839 pixels, which were then compressed. Now, if the range of pixel
1840 values can be represented with integer*2 pixels or integer*1 pixels,
1841 then that is used. This change is backward compatible with any
1842 compressed images that used the previous method.
1843
1844 - changed the default tiling pattern when using Hcompress from
1845 large squares (200 to 600 pixels wide) to 16 rows of the image.
1846 This generally requires less memory, compresses faster, and is more
1847 consistent with the default row by row tiling when using the other
1848 compression methods.
1849
1850 - modified imcomp_init_table in imcompress.c to enforce a restriction
1851 when using the Hcompress algorithm that the 1st 2 dimensions of sll
1852 image tiles must be at least 4 pixels long. Hcompress becomes very
1853 inefficient for smaller dimensions, and does not work at all with
1854 1D images.
1855
1856 - fixed bug in the Hcompress compression algorithm that could affect
1857 compression of I*4 images, using non-square compression tiles
1858 (in the encode64 routine).
1859
1860 Version 3.07 - 6 December 2007 (internal release)
1861
1862 - fixed bug with the PLIO image compression routine which silently
1863 produced a corrupted compressed image if the uncompressed image pixels
1864 were not all in the range 0 to 2**24. (fixed in November)
1865
1866 - fixed several 'for' loops in imcompress.c which were exceeding the
1867 bounds of an array by 1. (fixed in November)
1868
1869 - fixed a possible, but unlikely, memory overflow issue in iraffits.c.
1870
1871 - added a clarification to the cfortran.doc file that cfortran.h
1872 may be used and distributed under the terms of the GNU Library
1873 General Public License.
1874
1875 - fixed bug in the fits_modify_vector_len routine when modifying
1876 the vector length of a 'X' bit column.
1877
1878 Version 3.06 - 27 August 2007
1879
1880 - modified the imcopy.c utility program (to tile-compress images)
1881 so that it writes the default EXTNAME = 'COMPRESSED_IMAGE'
1882 keyword in the compressed images, to preserve the behavior of
1883 earlier versions of imcopy.
1884
1885 - modified the angsep function in the FITS calculator (in eval.y)
1886 to use haversines, instead of the 'law of cosines', to provide
1887 more precision at small angles (< 0.1 arcsec).
1888
1889 Version 3.05 - July 2007 (internal release only)
1890
1891 - extensive changes to imcompress.c to fully support implicit data
1892 type conversion when reading and writing arrays of data to FITS
1893 images, where the data type of the array is not the same as the
1894 data type of the FITS image. This includes support for null pixels,
1895 and data scaling via the BSCALE and BZERO keywords.
1896
1897 - rewrote the fits_read_tbl_coord routine in wcssub.c, that gets the
1898 standard set of WCS keywords appropriate to a pair of columns in a
1899 table, to better support the full set of officially approved WCS keywords.
1900
1901 - made significant changes to histo.c, which creates an image by binning
1902 columns of a table, to better translate the WCS keywords in the table
1903 header into the WCS keywords that are appropriate for an image HDU.
1904
1905 - modified imcompress.c so that when pixels are written to a
1906 tile-compressed image, the appropriate BSCALE and BZERO values of
1907 that image are applied. This fixes a bug in which writing to
1908 an unsigned integer datatype image (with BZERO = 32768) was not
1909 done correctly.
1910
1911 Version 3.04 - 3 April 2007
1912
1913 - The various table calculator routines (fits_select_rows, etc.) implicitly
1914 assumed that the input table has not been modified immediately prior to
1915 the call. To cover cases where the table has been modified a call to
1916 ffrdef has been added to ffprs. IN UNUSUAL CASES THIS CHANGE COULD
1917 CAUSE CFITSIO TO BEHAVE DIFFERENTLY THAN IN PREVIOUS VERSIONS. For
1918 example, opening a FITS table with this column-editing virtual file
1919 expression:
1920 myfile.fits[3][col A==X; B = sqrt(X)]
1921 no longer works, because the X column does not exist when the
1922 sqrt expression is evaluated. The correct expression in this case is
1923 myfile.fits[3][col A==X; B = sqrt(A)]
1924
1925 - modified putkey.c to support USHORT_IMG when calling fits_create_img
1926 to create a signed byte datatype image.
1927
1928 - enhanced the column histogramming function to propagate any TCn_k and
1929 TPn_k keywords in the table header to the corresponding CDi_j and PCi_j
1930 keywords in the image header.
1931
1932 - enhanced the random, randomn, and randomp functions in the lexical
1933 parser to take a vector column name argument to specify the length
1934 of the vector of random numbers that should be generated (provided by
1935 Craig Markwardt, GSFC)
1936
1937 - enhanced the ffmcrd routine (to modify an existing header card) to
1938 support long string keywords so that any CONTINUE keywords associated
1939 with the previous keyword will be deleted.
1940
1941 - modified the ffgtbp routine to recognize the TDIMn keyword for
1942 ASCII string columns in a binary table. The first dimension is
1943 taken to be the size of a unit string. (The TFORMn = 'rAw'
1944 syntax may also be used to specify the unit string size).
1945
1946 - in fits_img_decompress, the fits_get_img_param function was called
1947 with an invalid dimension size, which caused a fatal error on at
1948 least 1 platform.
1949
1950 - in ffopentest, set the status value before returning in case of error.
1951
1952 - in the drvrnet.c file, the string terminators needed to be changed
1953 from "\n" to "\r\n" to support the strict interpretation of the
1954 http and ftp standard that is enforced by some newer web servers.
1955
1956 Version 3.03 - 11 December 2006
1957
1958 New Routine
1959
1960 - fits_write_hdu writes the current HDU to a FILE stream (e.g. stdout).
1961
1962 Changes
1963
1964 - modified the region parsing code to support region files where the
1965 keyword "physical" is on a separate line preceding the region shape
1966 token. (However, "physical" coordinates are not fully supported, and
1967 are treated identically to "image" coordinates).
1968
1969 - enhanced the iterator routines to support calculations on 64-bit
1970 integer columns and images. Currently, the values are cast to
1971 double precision when doing the calculations, which can cause a
1972 loss of precision for integer values greater than about 2**52.
1973
1974 - added support for accessing FITS files on the computational grid.
1975 Giuliano Taffoni and Andrea Barisani, at INAF, University of Trieste,
1976 Italy, implemented the necessary I/O driver routines in drvrgsiftp.c.
1977
1978 - modified the tiled image compression/uncompression routines to
1979 preserve/restore the original CHECKSUM and DATASUM keywords if they
1980 exist. (saved as ZHECKSUM and ZDATASUM in the compressed image)
1981
1982 - split fits_select_image_section into 2 routines: a higher level routine
1983 that creates the output file and copies other HDUs from the input file
1984 to the output file, and a lower level routine that extracts the image
1985 section from the input image into an output image HDU.
1986
1987 - Improved the error messages that get generated if one tries to
1988 use the lexical parser to perform calculations on variable-length
1989 array columns.
1990
1991 - added "#define MACHINE NATIVE" in fitsio2.h for all machines where
1992 BYTESWAPPED == FALSE. This may improve the file writing performance
1993 by eliminating the need to allocate a temporary buffer in some cases.
1994
1995 - modified the configure.in and configure script to fix problems with
1996 testing if network services are available, which affects the definition
1997 of the HAVE_NET_SERVICES flag.
1998
1999 - added explicit type casting to all malloc statements, and deleted
2000 declarations of unreferenced variables in the image compression code
2001 to suppress compiler warnings.
2002
2003 - fixed incorrect logic in fitsio2.h in the way it determined if numerical
2004 values are byteswapped or not on MIPS and ARM architectures.
2005
2006 - added __BORLANDC__ to the list of environments in fitsio.h that don't
2007 use %lld in printf for longlong integers
2008
2009 - added "#if defined(unix)" around "#include <usistd.h>" statements in
2010 several C source files, to make them compatible with Windows.
2011
2012
2013 Version 3.02 - 18 Sept 2006
2014
2015 - applied the security patch to the gzip code, available at
2016 http://security.FreeBSD.org/patches/SA-06:21/gzip.patch
2017 The insufficient bounds checks in buffer use can cause gzip to crash,
2018 and may permit the execution of arbitrary code. The NULL pointer
2019 deference can cause gzip to crash. The infinite loop can cause a
2020 Denial-of-Service situation where gzip uses all available CPU time.
2021
2022 - added HCOMPRESS as one of the compression algorithm options in the
2023 tiled image compression code. (code provided by Richard White (STScI))
2024 Made other improvements to preserve the exact header structure in the
2025 compressed image file so that the compressed-and-then-uncompressed FITS
2026 image will be as identical as possible to the original FITS image file.
2027
2028 New Routines
2029
2030 - the following new routines were added to support reading and writing
2031 non-standard extension types:
2032 fits_write_exthdr - write required keywords for a conforming extension
2033 fits_write_ext - write data to the extension
2034 fits_read_ext - read data from the extension
2035
2036 - added new routines to compute the RMS noise in the background pixels
2037 of an image: fits_rms_float and fits_rms_short (take an input
2038 array of floats or shorts, respectively).
2039
2040 Fixes
2041
2042 - added the missing 64-bit integer case to set of "if (datatype)"
2043 statements in the routine that returns information about a
2044 particular column (ffgbclll).
2045
2046 - fixed a parsing error in ffexts in cases where an extension number
2047 is followed by a semi-colon and then the column and row number of an
2048 array in a binary table. Also removed an extraneous HISTORY keyword
2049 that was being written when specifying an input image in a table cel.
2050
2051 - modified the routine that reads a table column returning a string
2052 value (ffgcls) so that if the displayed numerical value is too
2053 wide to fit in the specified length string, then it will return
2054 a string of "*" characters instead of the number string.
2055
2056 - small change to fitsio.h to support a particular Fortran and C
2057 compiler combination on a SGI Altix system
2058
2059 - added a test in the gunzip code to prevent seg. fault when trying
2060 to uncompress a corrupted file (at least in some cases).
2061
2062 - fixed a rarely-occurring bug in the routine that copies a table
2063 cell into an image; had to call the ffflsh call a few lines earlier.
2064
2065 Version 3.01 - (in FTOOLS 6.1 release)
2066
2067 - modified fits_copy_image2cell to correctly copy all the appropriate
2068 header keywords when copying an image into a table cell
2069
2070 - in eval.y, explicitly included the code for the lgamma function
2071 instead of assuming it is available in a system library (e.g., the
2072 lgamma function is currently not included in MS Visual++ libraries)
2073
2074 - modified the logic in fits_pixel_filter so that the default data
2075 type of the output image will be promoted to at least BITPIX = -32
2076 (a single precision floating point) if the expression that is being
2077 evaluated resolves to a floating point result. If the expression
2078 resolves to an integer result, the output image will have the same
2079 BITPIX as the input image.
2080
2081 - in fits_copy_cell2image, added 5 more WCS keywords to the list of
2082 keywords related to other columns that should be deleted in the
2083 output image header.
2084
2085 - disabled code in cfileio.c that would write HISTORY keywords to the
2086 output file in fits_copy_image2cell and cell2image, because some tasks
2087 would not want these extraneous HISTORY keywords.
2088
2089 - added 2 new random number functions to the CFITSIO parser
2090 RANDOMN() - produces a normal deviate (mean=0, stddev=1)
2091 RANDOMP(X) - produces a Poisson deviate for an expected # of counts X
2092
2093 - in f77_wrap.h, removed the restriction that "g77Fortran" must be
2094 defined on 64-bit Itanium machines before assuming that
2095 sizeof(long) = 8. It appears that "long"s are always
2096 8 bytes long on this machine, regardless of what compilers are used.
2097
2098 - added test in fitsio.h so that LONGLONG cannot be multiply defined
2099
2100 - modified longnam.h so that both "fits_write_nulrows" and
2101 "fits_write_nullrows" get replace by the string "ffprwu". This
2102 fixes a documentation error regarding the long name of this
2103 routine.
2104
2105 Bug fixes
2106
2107 - fixed a potential null character string dereferencing error in the
2108 the ffphtb and ffphbn routines that write the FITS table keywords.
2109 This concerned the optional TUNITn keywords.
2110
2111 - fixed a few issues in fits_copy_cell2image and fits_copy_image2cell
2112 related to converting some WCS keyword between the image extension
2113 form and the table cell form of the keyword. (cfileio.c)
2114
2115 - fixed bug in fits_translate_keyword (fitscore.c) that, e.g., caused
2116 'EQUINOX' to be translated to EQUINOXA' if the pattern is 'EQUINOXa'
2117
2118 - fixed 2 bugs that could affect 'tile compressed' floating point
2119 images that contain NaN pixels (null pixels). First, the
2120 ZBLANK keyword was not being written, and second, an integer
2121 overflow could occur when computing the BZERO offset in the
2122 compressed array. (quantize.c and imcompress.c)
2123
2124 Version 3.006 - 20 February 2006 -(first full release of v3)
2125
2126 - enhanced the 'col' extended filename syntax to support keyword name
2127 expressions like
2128 [col error=sqrt(rate); #TUNIT# = 'counts/s'],
2129 in which the trailing '#' will be replaced by the column number
2130 of the most recently referenced column.
2131
2132 - fixed bug in the parse_data iterator work function that caused it
2133 to fail to return a value of -1 in cases where only a selected
2134 set of rows were to be processed. (affected Fv)
2135
2136 - added code to fitsio.h and cfortran.h to typedef LONGLONG to
2137 the appropriate 8-byte integer data type. Most compilers now
2138 support the 'long long' data type, but older MS Visual C++
2139 compilers used '__int64' instead.
2140
2141 - made several small changes based on testing by Martin Reinecke:
2142 o in eval.y, change 'int undef' to 'long undef'
2143 o in getcold.c and getcole.c, fixed a couple format conversion
2144 specifiers when displaying the value of long long variables.
2145 o in fitsio.h, modified the definition of USE_LL_SUFFIX in the
2146 case of Athon64 machines.
2147 o in fitsio2.h, defined BYTESWAPPED in the case of SGI machines.
2148 o in group.c, added 'include unistd.h' to get rid of compiler warning.
2149
2150 Version 3.005 - 20 December 2005 (beta)
2151
2152 - cfortran.h has been enhanced to support 64-bit integer parameters
2153 when calling C routines from Fortran. This modification was kindly
2154 provided by Martin Reinecke (MPE, Garching).
2155
2156 - Many new Fortran wrapper routines have been added to support reading
2157 and writing 64-bit integer values in FITS files. These new routines
2158 are documented in the updated version of the 'FITSIO User's Guide'
2159 for Fortran programmers.
2160
2161 - fixed a problem in the fits_get_keyclass routine that caused it
2162 to not recognize the special COMMENT keywords at the beginning
2163 of most FITS files that defines the FITS format.
2164
2165 - added a new check to the ffifile routine that parses the
2166 input extended file name, to distinguish between a FITS extension
2167 name that begins with 'pix', and a pixel filtering operator that
2168 begins with the 'pix' keyword.
2169
2170 - small change to the WCSLIB interface routine, fits_read_wcstab, to
2171 be more permissive in allowing the TDIMn keyword to be omitted for
2172 degenerate coordinate array.
2173
2174 Version 3.004 - 16 September 2005 (3rd public beta release)
2175
2176 - a major enhancement to the CFITSIO virtual file parser was provided
2177 by Robert Wiegand (GSFC). One can now specify filtering operations
2178 that will be applied on the fly to the pixel values in a FITS image.
2179 For example [pix sqrt(X)] will create a virtual FITS image where the
2180 pixel values are the square root of the input image pixels.
2181
2182 - modified region.c so that it interprets the position angles of regions
2183 in a SAO style region file in the same way as DS9. In particular, if
2184 the region parameters are given in WCS units, then the position angle
2185 should be relative to the WCS coordinates of the image (increasing CCW
2186 from West) instead of relative to the X/Y pixel coordinate system.
2187 This only affects rotated images (e.g. with non-zero CROTA2 keyword)
2188 with elliptical or rectangular regions.
2189
2190 - cleaned up fitsio.h and fitsio2.h to make the definition of LONGLONG
2191 and BYTESWAPPED and MACHINE more logical.
2192
2193 - removed HAVE_LONGLONG everywhere since it is no longer needed (the
2194 compiler now must have an 8-byte integer datatype to build CFITSIO).
2195
2196 - added support for the 64-bit IBM AIX platform
2197
2198 - modified eval.y so that the circle, ellipse, box, and near functions
2199 can operate on vectors as well as scalars. This allows region filtering
2200 on images that are stored in a vector cell in a binary table.
2201 (provided by Craig Markwardt, GSFC)
2202
2203 New Routines
2204
2205 - added new fits_read_wcstab routine that serves as an interface to
2206 Mark Calabretta's wcslib library for reading WCS information when
2207 the -TAB table lookup convention is used in the FITS file.
2208
2209 - added new fits_write_nullrows routine, which writes null values into
2210 every column of a specified range of rows in a FITS table.
2211
2212 - added the fits_translate_keyword and fits_translate_keywords utility
2213 routines for converting the names of keywords when moving columns and
2214 images around.
2215
2216 - added fits_copy_cell2image and fits_copy_image2cell routines for
2217 copying an image extension (or primary array) to or from a cell
2218 in a binary table vector column.
2219
2220 Bug fixes
2221
2222 - fixed a memory leak in eval.y; was fixed by changing a call to malloc
2223 to cmalloc instead.
2224
2225 - changed the definition of several global variables at the beginning
2226 of buffers.c to make them 'static' and thus invisible to applications
2227 programs.
2228
2229 - in fits_copy_image_cell, added a call to flush the internal buffers
2230 before reading from the file, in case any records had been modified.
2231
2232 Version 3.003 - 28 July 2005 - 2nd public beta release (used in HEASOFT)
2233
2234 Enhancements
2235
2236 - enhanced the string column reading routing fits_get_col_str to
2237 support cases where the user enters a null pointer (rather than
2238 a null string) as the nulval parameter.
2239
2240 - modified the low level ffread and ffwrite routines that physically
2241 read and write data from the FITS file so that they write the name
2242 of the file to the CFITSIO error stack if an error occurs.
2243
2244 - changed the definition of fits_open_file into a macro that will test
2245 that the version of the fitsio.h include file that was used to
2246 build the CFITSIO library is the same version as included when
2247 compiling the application program.
2248
2249 - made a simple modification to region.c to support regions files
2250 of type "linear", for compatibility with ds9 and fv.
2251
2252 - modified the internal ffgpr routine (and renamed it ffgprll) so
2253 that it returns the TNULL value as a LONGLONG parameter instead
2254 of 'long'.
2255
2256 - in fits_get_col_display_width, added support for TFORM = 'k'
2257
2258 - modified fitsio.h, fitsio2.h, and f77_wrap.h to add test for (_SX)
2259 to identify NEC SX supercomputers.
2260
2261 - modified eval_f.c to treat table columns of TULONG (unsigned long)
2262 as a double. Also added support for TLONGLONG (8-byte integers) as
2263 a double, which is only a temporary fix, since doubles only have about
2264 52 bits of precision.
2265
2266 - changed the 'blank' parameter in the internal ffgphd function to
2267 to type LONGLONG to support integer*8 FITS images.
2268
2269 - when reading the TNULL keyword value, now use ffc2jj instead of
2270 ffc2ii, to support integer*8 values.
2271
2272 Bug fixes
2273
2274 - fixed a significant bug when writing character strings to a variable
2275 length array column of a binary table. This bug would result in some
2276 unused space in the variable length heap, making the heap somewhat
2277 larger than necessary. This in itself is usually a minor issue, since
2278 the FITS files are perfectly valid, and other software should have
2279 no problems reading back the characters strings. In some cases, however,
2280 this problem could cause the program that is writing the table
2281 to exit with a status = 108 disk read error.
2282
2283 - modified the standalone imcopy.c utility program to fix a memory allocation
2284 bug when running on 64-bit platforms where sizeof(long) = 8 bytes.
2285
2286 - added an immediate 'return' statement to ffgtcl if the input status >0,
2287 to prevent a segfault on some platforms.
2288
2289 Version 3.002 - 15 April 2005 - first public beta release
2290
2291 - in drvrfile.c, if it fails to open the file for some reason, then
2292 it should reset file_outfile to a null string, to avoid errors on
2293 a subsequent call to open a file.
2294
2295 - updated fits_get_keyclass to recognize most of the WCS keywords
2296 defined in the WCS Papers I and II.
2297
2298 Version 3.001 - 15 March 2005 - released with HEASOFT 6.0
2299
2300 - numerous minor changes to the code to get rid of compiler warning
2301 messages, mainly dealing with numerical data type casting and the
2302 subsequent possible loss of precision in the result.
2303
2304 Version 3.000 - 1 March 2005 (internal beta release)
2305
2306 Enhancements:
2307
2308 - Made major changes to many of the CFITSIO routines to more generally
2309 support Large Files (> 2.1 GB). These changes are intended to
2310 be 100% backward compatible with software that used the previous
2311 versions of CFITSIO. The datatype of many of the integer parameters
2312 in the CFITSIO functions has been changed from 'long' to 'LONGLONG',
2313 which is typedef'ed to be equivalent to an 8-byte integer datatype on
2314 each platform. With these changes, CFITSIO supports the following:
2315 - integer FITS keywords with absolute values > 2**31
2316 - FITS files with total sizes > 2**31 bytes
2317 - FITS tables in which the number of rows, the row width, or
2318 the size of the heap is > 2**31 bytes
2319 - FITS images with dimensions > 2**31 bytes (support is still
2320 somewhat limited, with full support to be added later).
2321
2322 - added another lexical parser function (thanks to Craig Markwardt,
2323 GSFC): angsep computes the angular separation between 2 positions
2324 on the celestial sphere.
2325
2326 - modified the image subset extraction code (e.g., when specifying
2327 an image subregion when opening the file, such as
2328 'myimage.fits[21:40, 81:90]') so that in addition to
2329 updating the values of the primary WCS keywords CRPIXk, CDELTi, and
2330 CDj_i in the extracted/binned image, it also looks for and updates
2331 any secondary WCS keywords (e.g., 'CRPIX1P').
2332
2333 - made cosmetic change to group.c, so that when a group table is
2334 copied, any extra columns will be appended after the last existing
2335 column, instead of being inserted before the last column.
2336
2337 - modified the routines that read tile compressed images to support
2338 NULL as the input value for the 'anynul' parameter (meaning the
2339 calling program does not want the value of 'anynul' returned to it).
2340
2341 - when constructing or parsing a year/month/day character string,
2342 (e.g, when writing the DATE keyword) the routines now rigorously
2343 verify that the input day value is valid for the given month
2344 (including leap years).
2345
2346 - added some checks in cfileio.c to detect if some vital parameters
2347 that are stored in memory have been corrupted. This can occur if
2348 a user's program writes to areas of memory that it did not allocate.
2349
2350 - added the wcsutil_alternate.c source code file which contains
2351 non-working stubs for the 2 Classic AIPS world coordinate
2352 conversion routines that are distributed under the GNU General
2353 Public License. Users who are unwilling or unable to distribute
2354 their software under the General Public License may use this
2355 alternate source file which has no GPL restrictions, instead
2356 of wcsutil.c. This will have no effect on programs that use
2357 CFITSIO as long as they do not call the fits_pix_to_world/ffwldp
2358 or fits_world_to_pix/ffxypx routines.
2359
2360 Bug Fixes
2361
2362 - in ffdtdm (which parses the TDIMn keyword value), the check for
2363 consistency between the length of the array defined by TDIMn and
2364 the size of the TFORMn repeat value, is now not performed for variable
2365 length array columns (which always have repeat = 1).
2366
2367 - fixed byteswapping problem when writing null values to non-standard
2368 long integer FITS images with BITPIX = 64 and FITS table columns with
2369 TFORMn = 'K'.
2370
2371 - fixed buffer overflow problem in fits_parse_template/ffgthd that
2372 occurred only if the input template keyword value string was much
2373 longer than can fit in an 80-char header record.
2374
2375 Version 2.510 - 2 December 2004
2376
2377 New Routines:
2378
2379 - added fits_open_diskfile and fits_create_diskfile routines that simply
2380 open or create a FITS file with a specified name. CFITSIO does not
2381 try to parse the name using the extended filename syntax.
2382
2383 - 2 new C functions, CFITS2Unit and CUnit2FITS, were added to convert
2384 between the C fitsfile pointer value and the Fortran unit number.
2385 These functions may be useful in mixed language C and Fortran programs.
2386
2387 Enhancements:
2388
2389 - added the ability to recognize and open a compressed FITS file
2390 (compressed with gzip or unix compress) on the stdin standard input
2391 stream.
2392
2393 - Craig Markwardt (GSFC) provided 2 more lexical parser functions:
2394 accum(x) and seqdiff(x) that compute the cumulative sum and the
2395 sequential difference of the values of x.
2396
2397 - modified putcole.c and putcold.c so that when writing arrays of
2398 pixels to the FITS image or column that contain null values, and
2399 there are also numerical overflows when converting some of the
2400 non-null values to the FITS values, CFITSIO will now ignore the
2401 overflow error until after all the data have been written. Previously,
2402 in some circumstances CFITSIO would have simply stopped writing any
2403 data after the first overflow error.
2404
2405 - modified fitsio2.h to try to eliminate compiler warning messages
2406 on some platforms about the use of 'long long' constants when
2407 defining the value of LONGLONG_MAX (whether to use L or LL
2408 suffix).
2409
2410 - modified region.c to support 'physical' regions in addition to
2411 'image', 'fk4', etc.
2412
2413 - modified ffiurl (input filename parsing routine) to increase the
2414 maximum allowed extension number that can be specified from 9999
2415 to 99999 (e.g. 'myfile.fits+99999')
2416
2417 Bug Fixes:
2418
2419 - added check to fits_create_template to force it to start with
2420 the primary array in the template file, in case an extension
2421 number was specified as part of the template FITS file name.
2422
2423 Version 2.500 - 28 & 30 July 2004
2424
2425 New Routine:
2426
2427 - fits_file_exists tests whether the specified input file, or a
2428 compressed version of the file, exists on disk.
2429
2430 Enhancements:
2431
2432 - modified the way CFITSIO reads and writes data in COMPLEX ('C') and
2433 DBLCOMPLEX 'M' columns. Now, in all cases, when referring to the
2434 number of elements in the vector, or the value of the offset to a
2435 particular element within the vector, CFITSIO considers each pair of
2436 numbers (the imaginary and real parts) as a single element instead of
2437 treating each single number as an element. In particular, this changes
2438 the behavior of fits_write_col_null when writing to complex columns.
2439 It also changes the length of the 'nullarray' vector in the
2440 fits_read_colnull routine; it is now only 1/2 as long as before.
2441 Each element of the nullarray is set = 1 if either the real or
2442 imaginary parts of the corresponding complex value have a null
2443 value.(this change was added to version 2.500 on 30 July).
2444
2445 - Craig Markwardt, at GSFC, provided a number of significant enhancements
2446 to the CFITSIO lexical parser that is used to evaluate expressions:
2447
2448 - the parser now can operate on bit columns ('X') in a similar
2449 way as for other numeric columns (e.g., 'B' or 'I' columns)
2450
2451 - range checking has been implemented, so that the following
2452 conditions return a Null value, rather than returning an error:
2453 divide by zero, sqrt(negative), arccos(>1), arcsin(>1),
2454 log(negative), log10(negative)
2455
2456 - new vector functions: MEDIAN, AVERAGE, STDDEV, and
2457 NVALID (returns the number of non-null values in the vector)
2458
2459 - all the new functions (and SUM, MIN and MAX) ignore null values
2460
2461 - modified the iterator to support variable-length array columns
2462
2463 - modified configure to support AIX systems that have flock in a non-
2464 standard location.
2465
2466 - modified configure to remove the -D_FILE_OFFSET_BITS flag when running
2467 on Mac Darwin systems. This caused conflicts with the Fortran
2468 wrappers, and should only be needed in any case when using CFITSIO
2469 to read/write FITS files greater than 2.1 GB in size.
2470
2471 - modified fitsio2.h to support compilers that define LONG_LONG_MAX.
2472
2473 - modified ffrsim (resize an existing image) so that it supports changing
2474 the datatype to an unsigned integer image using the USHORT_IMG and
2475 ULONG_IMG definitions.
2476
2477 - modified the disk file driver (drvrfile.c) so that if an output
2478 file is specified when opening an ordinary file (e.g. with the syntax
2479 'myfile.fits(outputfile.fits)' then it will make a copy of the file,
2480 close the original file and open the copy. Previously, the
2481 specified output file would be ignored unless the file was compressed.
2482
2483 - modified f77_wrap.h and f77_wrap3.c to support the Fortran wrappers
2484 on 64-bit AMD Opteron machines
2485
2486 Bug fixes:
2487
2488 - made small change to ffsrow in eval_f.c to avoid potential array
2489 bounds overflow.
2490
2491 - made small change to group.c to fix problem where an 'int' was
2492 incorrectly being cast to a 'long'.
2493
2494 - corrected a memory allocation error in the new fits_hdr2str routine
2495 that was added in version 2.48
2496
2497 - The on-the-fly row-selection filtering would fail with a segfault
2498 if the length of a table row (NAXIS1 value) was greater than
2499 500000 bytes. A small change to eval_f.c was required to fix this.
2500
2501 Version 2.490 - 11 February 2004
2502
2503 Bug fixes:
2504
2505 - fixed a bug that was introduced in the previous release, which caused
2506 the CFITSIO parser to no longer move to a named extension when opening
2507 a FITS file, e.g., when opening myfile.fit[events] CFITSIO would just
2508 open the primary array instead of moving to the EVENTS extension.
2509
2510 - new group.c file from the INTEGRAL Science Data Center. It fixes
2511 a problem when you attach a child to a parent and they are both
2512 is the same file, but, that parent contains groups in other files.
2513 In certain cases the attach would not happen because it seemed that
2514 the new child was already in the parent group.
2515
2516 - fixed bug in fits_calculator_rng when performing a calculation
2517 on a range of rows in a table, so that it does not reset the
2518 value in all the other rows that are not in the range = 0.
2519
2520 - modified fits_write_chksum so that it updates the TFORMn
2521 keywords for any variable length vector table columns BEFORE
2522 calculating the CHECKSUM values. Otherwise the CHECKSUM
2523 value is invalidated when the HDU is subsequently closed.
2524
2525 Version 2.480 - 28 January 2004
2526
2527 New Routines:
2528
2529 - fits_get_img_equivtype - just like fits_get_img_type, except in
2530 the case of scaled integer images, it returns the 'equivalent'
2531 data type that is necessary to store the scaled data values.
2532
2533 - fits_hdr2str copies all the header keywords in the current HDU
2534 into a single long character string. This is a convenient method
2535 of passing the header information to other subroutines.
2536 The user may exclude any specified keywords from the list.
2537
2538 Enhancements:
2539
2540 - modified the filename parser so that it accepts extension
2541 names that begin with digits, as in 'myfile.fits[123TEST]'.
2542 In this case CFITSIO will try to open the extension with
2543 EXTNAME = '123TEST' instead of trying to move to the 123rd
2544 extension in the file.
2545
2546 - the template keyword parser now preserves the comments on the
2547 the mandatory FITS keywords if present, otherwise a standard
2548 default comment is provided.
2549
2550 - modified the ftp driver file (drvrnet.c) to overcome a timeout
2551 or hangup problem caused by some firewall software at the user's
2552 end (Thanks to Bruce O'Neel for this fix).
2553
2554 - modified iraffits.c to incorporate Doug Mink's latest changes to
2555 his wcstools library routines. The biggest change is that now
2556 the actual image dimensions, rather than the physically stored
2557 dimensions, are used when converting an IRAF file to FITS.
2558
2559 Bug fixes:
2560
2561 - when writing to ASCII FITS tables, the 'elemnum' parameter was
2562 supposed to be ignored if it did not have the default value of 1.
2563 In some cases however setting elemnum to a value other than 1
2564 could cause the wrong number of rows to be produced in the output
2565 table.
2566
2567 - If a cfitsio calculator expression was imported from a text file
2568 (e.g. using the extended filename syntax 'file.fits[col @file.calc]')
2569 and if any individual lines in that text file were greater than
2570 255 characters long, then a space character would be inserted
2571 after the 255th character. This could corrupt the line if the space
2572 was inserted within a column name or keyword name token.
2573
2574 Version 2.480beta (used in the FTOOLS 5.3 release, 1 Nov 2003)
2575
2576 New Routines:
2577
2578 - fits_get_eqcoltype - just like fits_get_coltype, except in the
2579 case of scaled integer columns, it returns the 'equivalent'
2580 data type that is necessary to store the scaled data values.
2581
2582 - fits_split_names - splits an input string containing a comma or
2583 space delimited list of names (typically file names or column
2584 names) into individual name tokens.
2585
2586 Enhancements:
2587
2588 - changed fhist in histo.c so that it can make histograms of ASCII
2589 table columns as well as binary table columns (as long as they
2590 contain numeric data).
2591
2592 Bug fixes:
2593
2594 - removed an erroneous reference to listhead.c in makefile.vcc, that is
2595 used to build the cfitsio dll under Windows. This caused a 'main'
2596 routine to be added to the library, which causes problems when linking
2597 fortran programs to cfitsio under windows.
2598
2599 - if an error occurs when opening for a 2nd time (with ffopen) a file that
2600 is already open (e.g., the specified extension doesn't exist), and
2601 if the file had been modified before attempting to reopen it, then
2602 the modified buffers may not get written to disk and the internal
2603 state of the file may become corrupted. ffclos was modified to
2604 always set status=0 before calling ffflsh if the file has been
2605 concurrently opened more than once.
2606
2607 Version 2.470 - 18 August 2003
2608
2609 Enhancements:
2610
2611 - defined 'TSBYTE' to represent the 'signed char' datatype (similar to
2612 'TBYTE' that represents the 'unsigned char' datatype) and added
2613 support for this datatype to all the routines that read or write
2614 data to a FITS image or table. This was implemented by adding 2
2615 new C source code files to the package: getcolsb.c and putcolsb.c.
2616
2617 - Defined a new '1S' shorthand data code for a signed byte column in
2618 a binary table. CFITSIO will write TFORMn = '1B' and
2619 TZEROn = -128 in this case, which is the convention used to
2620 store signed byte values in a 'B' type column.
2621
2622 - in fitsio2.h, added test of whether `__x86_64__` is defined, to
2623 support the new AMD Opteron 64-bit processor
2624
2625 - modified configure to not use the -fast compiler flag on Solaris
2626 platforms when using the proprietary Solaris cc compiler. This
2627 flag causes compilation problems in eval_y.c (compiler just
2628 hangs forever).
2629
2630 Bug fixes:
2631
2632 - In the special case of writing 0 elements to a vector table column
2633 that contains 0 rows, ffgcpr no longer adds a blank row to the table.
2634
2635 - added error checking code for cases where a ASCII string column
2636 in a binary table is greater than 28800 characters wide, to avoid
2637 going into an infinite loop.
2638
2639 - the fits_get_col_display_width routine was incorrectly returning
2640 width = 0 for a 'A' binary table column that did not have an
2641 explicit vector length character.
2642
2643 Version 2.460 - 20 May 2003
2644
2645 Enhancements:
2646
2647 - modified the HTTP driver in drvrnet.c so that CFITSIO can read
2648 FITS files via a proxy HTTP server. (This code was contributed by
2649 Philippe Prugniel, Obs. de Lyon). To use this feature, the
2650 'http_proxy' environment variable must be defined with the
2651 address (URL) and port number of the proxy server, i.e.,
2652 > setenv http_proxy http://heasarc.gsfc.nasa.gov:3128
2653 will use port 3128 on heasarc.gsfc.nasa.gov
2654
2655 - suppressed some compiler warnings by casting a variable of
2656 type 'size_t' to type 'int' in fftkey (in fitscore.c) and
2657 iraftofits and irafrdimge (in iraffits.c).
2658
2659 Version 2.450 - 30 April 2003
2660
2661 Enhancements:
2662
2663 - modified the WCS keyword reading routine (ffgics) to support cases
2664 where some of the CDi_j keywords are omitted (with an assumed
2665 value = 0).
2666
2667 - Made a change to http_open_network in drvrnet.c to add a 'Host: '
2668 string to the open request. This is required by newer HTTP 1.1
2669 servers (so-called virtual servers).
2670
2671 - modified ffgcll (read logical table column) to return the illegal
2672 character value itself if the FITS file contains a logical value that is
2673 not equal to T, F or zero. Previously it treated this case the
2674 same as if the FITS file value was = 0.
2675
2676 - modified fits_movnam_hdu (ffmnhd) so that it will move to a tile-
2677 compressed image (that is stored in a binary table) if the input
2678 desired HDU type is BINARY_TBL as well as if the HDU type = IMAGE_HDU.
2679
2680 Bug fixes:
2681
2682 - in the routine that checks the data fill bytes (ffcdfl), the call
2683 to ffmbyt should not ignore an EOF error when trying to read the bytes.
2684 This is a little-used routine that is not called by any other CFITSIO
2685 routine.
2686
2687 - fits_copy_file was not reporting an error if it hit the End Of File
2688 while copying the last extension in the input file to the output file.
2689
2690 - fixed inconsistencies in the virtual file column filter parser
2691 (ffedit_columns) to properly support expressions which create or
2692 modify a keyword, instead of a column. Previously it was only possible
2693 to modify keywords in a table extension (not an image), and the
2694 keyword filtering could cause some of the table columns to not
2695 get propagated into the virtual file. Also, spaces are now
2696 allowed within the specified keyword comment field.
2697
2698 - ffdtyp was incorrectly returning the data type of FITS keyword
2699 values of the form '1E-09' (i.e., an exponential value without
2700 a decimal point) as integer rather than floating point.
2701
2702 - The enhancement in the previous 2.440 release to allow more files to be
2703 opened at one time introduced a bug: if ffclos is called with
2704 a non-zero status value, then any subsequent call to ffopen will likely
2705 cause a segmentation fault. The fits_clear_Fptr routine was modified
2706 to fix this.
2707
2708 - rearranged the order of some computations in fits_resize_img so as
2709 to not exceed the range of a 32-bit integer when dealing with
2710 large images.
2711
2712 - the template parser routine, ngp_read_xtension, was testing for
2713 "ASCIITABLE" instead of "TABLE" as the XTENSION value of an ASCII
2714 table, and it did not allow for optional trailing spaces in the IMAGE"
2715 or "TABLE" string value.
2716
2717 Version 2.440 - 8 January 2003
2718
2719 Enhancements:
2720
2721 - modified the iterator function, ffiter, to operate on random
2722 groups files.
2723
2724 - decoupled the NIOBUF (= 40) parameter from the limit on the number
2725 FITS files that can be opened, so that more files may be opened
2726 without the overhead of having to increase the number of NIOBUF
2727 buffers. A new NMAXFILES parameter is defined in fitsio2.h which sets
2728 the maximum number of opened FITS files. It is set = 300 by default.
2729 Note however, that the underlying compiler or operating system may
2730 not allow this many files to be opened at one time.
2731
2732 - updated the version of cfortran.h that is distributed with CFITSIO from
2733 version 3.9 to version 4.4. This required changes to f77_wrap.h
2734 and f77_wrap3.c. The original cfortran.h v4.4 file was modified
2735 slightly to support CFITSIO and ftools (see comments in the header
2736 of cfortran.h).
2737
2738 - modified ffhist so that it copies all the non-structural keywords from
2739 the original binary table header to the binned image header.
2740
2741 - modified fits_get_keyclass so that it recognizes EXTNAME =
2742 COMPRESSED_IMAGE as a special tile compression keyword.
2743
2744 - modified Makefile.in to support the standard --prefix convention
2745 for specifying the install target directory.
2746
2747 Bug fixes:
2748
2749 - in fits_decompress_img, needed to add a call to ffpscl to turn
2750 off the BZERO and BSCALE scaling when reading the compressed image.
2751
2752 Version 2.430 - 4 November 2002
2753
2754 Enhancements:
2755
2756 - modified fits_create_hdu/ffcrhd so that it returns without doing
2757 anything and does not generate an error if the current HDU is
2758 already an empty HDU. There is no need in this case to append
2759 a new empty HDU to the file.
2760
2761 - new version of group.c (supplied by B. O'Neel at the ISDC) fixes 2
2762 limitations: 1 - Groups now have 256 characters rather than 160
2763 for the path lengths in the group tables. - ISDC SPR 1720. 2 -
2764 Groups now can have backpointers longer than 68 chars using the long
2765 string convention. - ISDC SPR 1738.
2766
2767 - small change to f77_wrap.h and f77_wrap3.c to support the fortran
2768 wrappers on SUN solaris 64-bit sparc systems (see also change to v2.033)
2769
2770 - small change to find_column in eval_f.c to support unsigned long
2771 columns in binary tables (with TZEROn = 2147483648.0)
2772
2773 - small modification to cfortran.h to support Mac OS-X, (Darwin)
2774
2775 Bug fixes:
2776
2777 - When reading tile-compress images, the BSCALE and BZERO scaling
2778 keywords were not being applied, if present.
2779
2780 - Previous changes to the error message stack code caused the
2781 tile compressed image routines to not clean up spurious error
2782 messages properly.
2783
2784 - fits_open_image was not skipping over null primary arrays.
2785
2786 Version 2.420 - 19 July 2002
2787
2788 Enhancements:
2789
2790 - modified the virtual filename parser to support exponential notation
2791 when specifying the min, max or binsize in a binning specifier, as in:
2792 myfile.fits[binr X=1:10:1.0E-01, Y=1:10:1.0E-01]
2793
2794 - removed the limitation on the maximum number of HDUs in a FITS file
2795 (limit used to be 1000 HDUs per file). Now any number of HDUs
2796 can be written/read in a FITS file. (BUT files that have huge numbers
2797 of HDUs can be difficult to manage and are not recommended);
2798
2799 - modified grparser.c to support HIERARCH keywords, based on
2800 code supplied by Richard Mathar (Max-Planck)
2801
2802 - moved the ffflsh (fits_flush_buffer) from the private to the
2803 public interface, since this routine may be useful for some
2804 applications. It is much faster than ffflus.
2805
2806 - small change to the definition of OFF_T in fitsio.h to support
2807 large files on IBM AIX operating systems.
2808
2809 Bug fixes:
2810
2811 - fixed potential problem reading beyond array bounds in ffpkls. This
2812 would not have affected the content of any previously generated FITS
2813 files.
2814
2815 - in the net driver code in drvrnet.c, the requested protocol string
2816 was changed from "http/1.0" to "HTTP/1.0" to support apache 1.3.26.
2817
2818 - When using the virtual file syntax to open a vector cell in a binary
2819 table as if it were a primary array image, there was a bug
2820 in fits_copy_image_cell which garbled the data if the vector
2821 was more than 30000 bytes long.
2822
2823 - fixed problem that caused fits_report_error to crash under Visual
2824 C++ on Windows systems. The fix is to use the '/MD' switch
2825 on the cl command line, or, in Visual Studio, under project
2826 settings / C++ select use runtime library multithreaded DLL
2827
2828 - modified ffpscl so it does not attempt to reset the scaling values
2829 in the internal structure if the image is tile-compressed.
2830
2831 - fixed multiple bugs in mem_rawfile_open which affected the case
2832 where a raw binary file is read and converted on the fly into
2833 a FITS file.
2834
2835 - several small changes to group.c to suppress compiler warnings.
2836
2837 Version 2.410 - 22 April 2002 (used in the FTOOLS 5.2 release)
2838
2839 New Routines:
2840
2841 - fits_open_data behaves similarly to fits_open_file except that it
2842 also will move to the first HDU containing significant data if
2843 and an explicit HDU name or number to open was not specified.
2844 This is useful for automatically skipping over a null primary
2845 array when opening the file.
2846
2847 - fits_open_table and fits_open_image behaves similarly to
2848 fits_open_data, except they move to the first table or image
2849 HDU in the file, respectively.
2850
2851 - fits_write_errmark and fits_clear_errmark routines can be use
2852 to write an invisible marker to the CFITSIO error stack, and
2853 then clear any more recent messages on the stack, back to
2854 that mark. This preserves any older messages on the stack.
2855
2856 - fits_parse_range utility routine parses a row list string
2857 and returns integer arrays giving the min and max row in each
2858 range.
2859
2860 - fits_delete_rowrange deletes a specified list of rows or row
2861 ranges.
2862
2863 - fits_copy_file copies all or part of the HDUs in the input file
2864 to the output file.
2865
2866 - added fits_insert_card/ffikey to the publicly defined set
2867 of routines (previously, it was a private routine).
2868
2869 Enhancements:
2870
2871 - changed the default numeric display format in ffgkys from 'E' format
2872 to 'G' format, and changed the format for 'X' columns to a
2873 string of 8 1s or 0s representing each bit value.
2874
2875 - modified ffflsh so the system 'fflush' call is not made in cases
2876 where the file was opened with 'READONLY' access.
2877
2878 - modified the output filename parser so the "-.gz", and "stdout.gz"
2879 now cause the output file to be initially created in memory,
2880 and then compressed and written out to the stdout stream when
2881 the file is closed.
2882
2883 - modified the routines that delete rows from a table to also
2884 update the variable length array heap, to remove any orphaned
2885 data from the heap.
2886
2887 - modified ffedit_columns so that wild card characters may be
2888 used when specifying column names in the 'col' file filter
2889 specifier (e.g., file.fits[col TIME; *RAW] will create a
2890 virtual table contain only the TIME column and any other columns
2891 whose name ends with 'RAW').
2892
2893 - modified the keyword classifier utility, fits_get_keyclass, to
2894 support cases where the input string is just the keyword name,
2895 not the entire 80-character card.
2896
2897 - modified configure.in and configure to see if a proprietary
2898 C compiler is available (e.g. 'cc'), and only use 'gcc' if not.
2899
2900 - modified ffcpcl (copy columns from one table to another) so that
2901 it also copies any WCS keywords related to that column.
2902
2903 - included an alternate source file that can be used to replace
2904 compress.c, which is distributed under the GNU General Public
2905 License. The alternate file contains non-functional stubs for
2906 the compression routines, which can be used to make a version of
2907 CFITSIO that does not have the GPL restrictions (and is also less
2908 functional since it cannot read or write compressed FITS files).
2909
2910 - modifications to the iterator routine (ffiter) to support writing
2911 tile compressed output images.
2912
2913 - modified ffourl to support the [compress] qualifier when specifying
2914 the optional output file name. E.g., file.fit(out.file[compress])[3]
2915
2916 - modified imcomp_compress_tile to fully support implicit data type
2917 conversion when writing to tile-compressed images. Previously,
2918 one could not write a floating point array to an integer compressed
2919 image.
2920
2921 - increased the number of internal 2880-byte I/O buffers allocated
2922 by CFITSIO from 25 to 40, in recognition of the larger amount
2923 of memory available on typical machines today compared with
2924 a few years ago. The number of buffers can be set by the user
2925 with the NIOBUF parameter in fitsio2.h. (Setting this too large
2926 can actually hurt performance).
2927
2928 - modified the #if statements in fitsio2.h, f77_wrap.h and f77_wrap1.c
2929 to support the new Itanium 64-bit Intel PC.
2930
2931 - a couple minor modifications to fitsio.h needed to support the off_t
2932 datatype on Debian linux systems.
2933
2934 - increased internal buffer sizes in ffshft and ffsrow to improve
2935 the I/O performance.
2936
2937 Bug fixes:
2938
2939 - fits_get_keyclass could sometimes try to append to an unterminated
2940 string, causing an overflow of a string array.
2941
2942 - fits_create_template no longer worked because of improvements made
2943 to other routines. Had to modify ffghdt to not try to rescan
2944 the header keywords if the file is still empty and contains no
2945 keywords yet.
2946
2947 - ffrtnm, which returns the root filename, sometimes did not work
2948 properly when testing if the 'filename+n' convention was used for
2949 specifying an extension number.
2950
2951 - fixed minor problem in the keyword template parsing routine, ffgthd
2952 which in rare cases could cause an improperly terminated string to
2953 be returned.
2954
2955 - the routine to compare 2 strings, ffcmps, failed to find a match
2956 in comparing strings like "*R" and "ERROR" where the match occurs
2957 on the last character, but where the same matching character occurs
2958 previously in the 2nd string.
2959
2960 - the region file reading routine (ffrrgn) did not work correctly if
2961 the region file (created by POW and perhaps other programs) had an
2962 'exclude' region (beginning with a '-' sign) as the first region
2963 in the file. In this case all points outside the excluded region
2964 should be accepted, but in fact no points were being accepted
2965 in this case.
2966
2967 Version 2.401 - 28 Jan 2002
2968
2969 - added the imcopy example program to the release (and Makefile)
2970
2971 Bug fixes:
2972
2973 - fixed typo in the imcompress code which affected compression
2974 of 3D datacubes.
2975
2976 - made small change to fficls (insert column) to allow colums with
2977 TFORMn = '1PU' and '1PV' to be inserted in a binary table. The
2978 'U' and 'V' are codes only used within CFITSIO to represent unsigned
2979 16-bit and 32-bit integers; They get replaced by '1PI' and '1PJ'
2980 respectively in the FITS table header, along with the appropriate
2981 TZEROn keyword.
2982
2983 Version 2.400 - 18 Jan 2002
2984
2985 (N.B.: Application programs must be recompiled, not just relinked
2986 with the new CFITSIO library because of changes made to fitsio.h)
2987
2988 New Routines:
2989
2990 - fits_write_subset/ffpss writes a rectangular subset (or the whole
2991 image) to a FITS image.
2992
2993 - added a whole new family of routines to read and write arrays of
2994 'long long' integers (64-bit) to FITS images or table columns. The
2995 new routine names all end in 'jj': ffpprjj, ffppnjj, ffp2djj,
2996 ffp3djj, ffppssjj, ffpgpjj, ffpcljj, ffpcnjj. ffgpvjj, ffgpfjj,
2997 ffg2djj, ffg3djj, ffgsvjj, ffgsfjj, ffggpjj, ffgcvjj, and ffgcfjj.
2998
2999 - added a set of helper routines that are used in conjunction with
3000 the new support for tiled image compression. 3 routines set the
3001 parameters that should be used when CFITSIO compresses an image:
3002 fits_set_compression_type
3003 fits_set_tile_dim
3004 fits_set_noise_bits
3005
3006 3 corresponding routines report back the current settings:
3007 fits_get_compression_type
3008 fits_get_tile_dim
3009 fits_get_noise_bits
3010
3011 Enhancements:
3012
3013 - major enhancement was made to support writing to tile-compressed
3014 images. In this format, the image is divided up into a rectangular
3015 grid of tiles, and each tile of pixels is compressed individually
3016 and stored in a row of a variable-length array column in a binary
3017 table. CFITSIO has been able to transparently read this compressed
3018 image format ever since version 2.1. Now all the CFITSIO image
3019 writing routines also transparently support this format. There are
3020 2 ways to force CFITSIO to write compressed images: 1) call the
3021 fits_set_compression_type routine before writing the image header
3022 keywords, or 2), specify that the image should be compressed when
3023 entering the name of the output FITS file, using a new extended
3024 filename syntax. (examples: "myfile.fits[compress]" will use the
3025 default compression parameters, and "myfile.fits[compress GZIP
3026 100,100] will use the GZIP compression algorithm with 100 x 100
3027 pixel tiles.
3028
3029 - added new driver to support creating output .gz compressed fits
3030 files. If the name of the output FITS file to be created ends with
3031 '.gz' then CFITSIO will initially write the FITS file in memory and
3032 then, when the FITS file is closed, CFITSIO will gzip the entire
3033 file before writing it out to disk.
3034
3035 - when over-writing vectors in a variable length array in a binary
3036 table, if the new vector to be written is less than or equal to
3037 the length of the previously written vector, then CFITSIO will now
3038 reuse the existing space in the heap, rather than always appending
3039 the new array to the end of the heap.
3040
3041 - modified configure.in to support building cfitsio as a dynamic
3042 library on Mac OS X. Use 'make shared' like on other UNIX platforms,
3043 but a .dylib file will be created instead of .so. If installed in a
3044 nonstandard location, add its location to the DYLD_LIBRARY_PATH
3045 environment variable so that the library can be found at run time.
3046
3047 - made various modifications to better support the 8-byte long integer
3048 datatype on more platforms. The 'LONGLONG' datatype is typedef'ed
3049 to equal 'long long' on most Unix platforms and MacOS, and equal
3050 to '__int64' on Windows machines.
3051
3052 - modified configure.in and makefile.in to better support cases
3053 where the system has no Fortran compiler and thus the f77 wrapper
3054 routines should not be compiled.
3055
3056 - made small modification to eval.y and eval_y.f to get rid of warning
3057 on some platforms about redefinition of the 'alloca'.
3058
3059 Bug fixes:
3060
3061 - other recent bug fixes in ffdblk (delete blocks) caused ffdhdu (delete
3062 HDU) to fail when trying to replace the primary array with a null
3063 primary array.
3064
3065 - fixed bug that prevented inserting a new variable length column
3066 into a table that already contained variable length data.
3067
3068 - modified fits_delete_file so that it will delete the file even if
3069 the input status value is not equal to zero.
3070
3071 - in fits_resize_image, it was sometimes necessary to call ffrdef to
3072 force the image structure to be defined.
3073
3074 - modified the filename parser to support input files with names like:
3075 "myfile.fits.gz(mem://tmp)" in which the url type is specified for
3076 the output file but not for the input file itself. This required
3077 modifications to ffiurl and ffrtnm.
3078
3079 Version 2.301 - 7 Dec 2001
3080
3081 Enhancements:
3082
3083 - modified the http file driver so that if the filename to be opened
3084 contains a '?' character (most likely a cgi related string) then it
3085 will not attempt to append a .gz or .Z as it would normally do.
3086
3087 - added support for the '!' clobber character when specifying
3088 the output disk file name in CFITSIO's extended filename syntax, e.g.,
3089 'http://a.b.c.d/myfile.fits.gz(!outfile.fits)'
3090
3091 - added new device driver which is used when opening a compressed FITS
3092 file on disk by uncompressing it into memory with READWRITE
3093 access. This happens when specifying an output filename
3094 'mem://'.
3095
3096 - added 2 other device drivers to open http and ftp files in memory
3097 with write access.
3098
3099 - improved the error trapping and reporting in cases where program
3100 attempts to write to a READONLY file (especially in cases where the
3101 'file' resides in memory, as is the case when opening an ftp or http
3102 file.
3103
3104 - modified the extended filename parser so that it is does not confuse
3105 the bracket character '[' which is sometimes used in the root name
3106 of files of type 'http://', as the start of an extname or row filter
3107 expression. If the file is of type 'http://', the parser now
3108 checks to see if the last character in the extended file name is
3109 a ')' or ']'. If not, it does not try to parse the file name
3110 any further.
3111
3112 - improved the efficiency when writing FITS files in memory, by
3113 initially allocating enough memory for the entire HDU when it is
3114 created, rather than incrementally reallocing memory 2880 bytes
3115 at a time (modified ffrhdu and mem_truncate). This change also
3116 means that the program will fail much sooner if it cannot allocate
3117 enough memory to hold the entire FITS HDU.
3118
3119 Bug fixes:
3120
3121 - There was an error in the definition of the Fortran ftphtb wrapper
3122 routine (writes required ASCII table header keywords) that caused
3123 it to fail on DEC OSF and other platforms where sizeof(long) = 8.
3124
3125 Version 2.300 - 23 Oct 2001
3126
3127 New Routines:
3128
3129 - fits_comp_img and fits_decomp_img are now fully supported and
3130 documented. These routine compress and decompress, respective,
3131 a FITS image using a new algorithm in which the image is first
3132 divided into a grid of rectangular tiles, then the compressed byte
3133 stream from each tile is stored in a row of a binary table.
3134 CFITSIO can transparently read FITS images stored in this
3135 compressed format. Compression ratios of 3 - 6 are typically
3136 achieved. Large compression ratios are achieved for floating
3137 point images by throwing away non-significant noise bits in the
3138 pixel values.
3139
3140 - fits_test_heap tests the integrity of the binary table heap and
3141 returns statistics on the amount of unused space in the heap and
3142 the amount of space that is pointed to by more than 1 descriptor.
3143
3144 - fits_compress_heap which will reorder the arrays in the binary
3145 table heap, recovering any unused space.
3146
3147 Enhancements:
3148
3149 - made substantial internal changes to the code to support FITS
3150 files containing 64-bit integer data values. These files have
3151 BITPIX = 64 or TFORMn = 'K'. This new feature in CFITSIO is
3152 currently only enabled if SUPPORT_64BIT_INTEGERS is defined = 1 in
3153 the beginning of the fitsio2.h file. By default support for
3154 64-bit integers is not enabled.
3155
3156 - improved the ability to read and return a table column value as a
3157 formatted string by supporting quasi-legal TDISPn values which
3158 have a lowercase format code letter, and by completely ignoring
3159 other unrecognizable TDISPn values. Previously, unrecognized
3160 TDISPn values could cause zero length strings to be returned.
3161
3162 - made fits_write_key_longstr more efficient when writing keywords
3163 using the long string CONTINUE convention. It previously did not
3164 use all the available space on each card when the string to be
3165 written contained many single quote characters.
3166
3167 - added a new "CFITSIO Quick Start Guide" which provides all the
3168 basic information needed to write C programs using CFITSIO.
3169
3170 - updated the standard COMMENT keywords that are written at the
3171 beginning of every primary array to refer to the newly published
3172 FITS Standard document in Astronomy and Astrophysics.
3173 Note: because of this change, any FITS file created with this
3174 version of CFITSIO will not be identical to the same file written
3175 with a previous version of CFITSIO.
3176
3177 - replaced the 2 routines in pliocomp.c with new versions provided by
3178 D Tody and N Zarate. These routines compress/uncompress image pixels
3179 using the IRAF pixel list compression algorithm.
3180
3181 - modified fits_copy_hdu so that when copying a Primary Array
3182 to an Image extension, the COMMENT cards which give the reference
3183 to the A&A journal article about FITS are not copied. In the
3184 inverse case the COMMENT keywords are inserted in the header.
3185
3186 - modified configure and Makefile.in to add capability to build a
3187 shared version of the CFITSIO library. Type 'make shared' or
3188 'make libcfitsio.so' to invoke this option.
3189
3190 - disabled some uninformative error messages on the error stack:
3191 1) when calling ffclos (and then ffchdu) with input status > 0
3192 2) when ffmahd tries to move beyond the end of file.
3193 The returned status value remains the same as before, but the
3194 annoying error messages no longer get written to the error stack.
3195
3196 - The syntax for column filtering has been modified so that
3197 if one only specifies a list of column names, then only those
3198 columns will be copied into the output file. This provides a simple
3199 way to make a copy of a table containing only a specified list of
3200 columns. If the column specifier explicitly deletes a column, however,
3201 than all the other columns will be copied to the filtered input
3202 file, regardless of whether the columns were listed or not.
3203 Similarly, if the expression specifies only a column to be modified
3204 or created, then all the other columns in the table will be
3205 copied.
3206
3207 mytable.fit[1][col Time;Rate] - only the Time and Rate
3208 columns will be copied to the filtered input file.
3209
3210 mytable.fit[1][col -Time ] - all but the Time column are copied
3211 to the filtered input file.
3212
3213 mytable.fit[1][col Rate;-Time] - same as above.
3214
3215 - changed a '#if defined' statement in f77_wrap.h and f77_wrap1.c
3216 to support the fortran wrappers on 64-bit IBM/RS6000 systems
3217
3218 - modified group.c so that when attaching one group (the child) to
3219 another (the parent), check in each file for the existence of a
3220 pointer to the other before adding the link. This is to prevent
3221 multiple links from forming under all circumstances.
3222
3223 - modified the filename parser to accept 'STDIN', 'stdin',
3224 'STDOUT' and 'stdout' in addition to '-' to mean read the
3225 file from standard input or write to standard output.
3226
3227 - Added support for reversing an axis when reading a subsection
3228 of a compressed image using the extended filename syntax, as in
3229 myfile.fits+1[-*, *] or myfile.fits+1[600:501,501:600]
3230
3231 - When copying a compressed image to a uncompressed image, the
3232 EXTNAME keyword is no longer copied if the value is equal to
3233 'COMPRESSED_IMAGE'.
3234
3235 - slight change to the comment field of the DATE keyword to reflect
3236 the fact that the Unix system date and time is not true UTC time.
3237
3238 Bug fixes:
3239
3240 - fits_write_key_longstr was not writing the keyword if a null
3241 input string value was given.
3242
3243 - writing data to a variable length column, if that binary table is not
3244 the last HDU in the FITS file, might overwrite the following HDU.
3245 Fixed this by changing the order of a couple operations in ffgcpr.
3246
3247 - deleting a column from a table containing variable length columns
3248 could cause the last few FITS blocks of the file to be reset = 0.
3249 This bug occurred as a result of modifications to ffdblk in v2.202.
3250 This mainly affects users of the 'compress_fits' utility
3251 program.
3252
3253 - fixed obscure problem when writing bits to a variable length 'B'
3254 column.
3255
3256 - when reading a subsection of an image, the BSCALE and BZERO pixel
3257 scaling may not have been applied when reading image pixel values
3258 (even though the scaling keywords were properly written in the
3259 header).
3260
3261 - fits_get_keyclass was not returning 'TYP_STRUCT_KEY' for the
3262 END keyword.
3263
3264 Version 2.204 - 26 July 2001
3265
3266 Bug fixes:
3267
3268 - Re-write of fits_clean_url in group.c to solve various problems
3269 with invalid bounds checking.
3270
3271 Version 2.203 - 19 July 2001 (version in FTOOLS v5.1)
3272
3273 Enhancements:
3274
3275 - When a row selection or calculator expression is written in
3276 an external file (and read by CFITSIO with the '@filename' syntax)
3277 the file can now contain comment lines. The comment line must
3278 begin with 2 slash characters as the first 2 characters on the
3279 line. CFITSIO will ignore the entire line when reading the
3280 expression.
3281
3282 Bug fixes:
3283
3284 - With previous versions of CFITSIO, the pixel values in a FITS
3285 image could be read incorrectly in the following case: when
3286 opening a subset of a FITS image (using the
3287 'filename.fits[Xmin:Xmax,Ymin:Ymax]' notation) on a PC linux, PC
3288 Windows, or DEC OSF machine (but not on a SUN or Mac). This
3289 problem only occurs when reading more than 8640 bytes of data
3290 (2160 4-byte integers) at a time, and usually only occurs if the
3291 reading program reads the pixel data immediately after opening the
3292 file, without first reading any header keywords. This error would
3293 cause strips of zero valued pixels to appear at semi-random
3294 positions in the image, where each strip usually would be 2880
3295 bytes long. This problem does not affect cases where the input
3296 subsetted image is simply copied to a new output FITS file.
3297
3298
3299 Version 2.202 - 22 May 2001
3300
3301 Enhancements:
3302
3303 - revised the logic in the routine that tests if a point is
3304 within a region: if the first region is an excluded region,
3305 then it implicitly assumes a prior include region covering
3306 the entire detector. It also now supports cases where a
3307 smaller include region is within a prior exclude region.
3308
3309 - made enhancement to ffgclb (read bytes) so that it can
3310 also read values from a logical column, returning an array
3311 of 1s and 0s.
3312
3313 - defined 2 new grouping error status values (349, 350) in
3314 cfitsio.h and made minor changes to group.c to use these new
3315 status values.
3316
3317 - modified fits_open_file so that if it encounters an error while
3318 trying to move to a user-specified extension (or select a subset
3319 of the rows in an input table, or make a histogram of the
3320 column values) it will close the input file instead of leaving
3321 it open.
3322
3323 - when using the extended filename syntax to filter the rows in
3324 an input table, or create a histogram image from the values in
3325 a table column, CFITSIO now writes HISTORY keywords in the
3326 output file to document the filtering expression that was used.
3327
3328 Bug fixes:
3329
3330 - ffdblk (called by ffdrow) could overwrite the last FITS block(s) in
3331 the file in some cases where one writes data to a variable length
3332 column and then calls ffdrow to delete rows in the table. This
3333 bug was similar to the ffiblk bug that was fixed in v2.033.
3334
3335 - modified fits_write_col_null to fix a problem which under unusual
3336 circumstances would cause a End-of-File error when trying to
3337 read back the value in an ASCII string column, after initializing
3338 if by writing a null value to it.
3339
3340 - fixed obscure bug in the calculator function that caused an
3341 error when trying to modify the value of a keyword in a HDU
3342 that does not have a NAXIS2 keyword (e.g., a null primary array).
3343
3344 - the iterator function (in putcol.c) had a bug when calculating
3345 the optimum number rows to process in the case where the table
3346 has very wide rows (>33120 bytes) and the calculator expression
3347 involves columns from more than one FITS table. This could
3348 cause an infinite loop in calls to the ffcalc calculator function.
3349
3350 - fixed bug in ffmvec, which modifies the length of an
3351 existing vector column in a binary table. If the vector
3352 was reduced in length, the FITS file could sometimes be left
3353 in a corrupted state, and in all cases the values in the remaining
3354 vector elements of that column would be altered.
3355
3356 - in drvrfile.c, replaced calls to fsetpos and fgetpos with
3357 fseek and ftell (or fseeko and ftello) because the fpos_t
3358 filetype used in fsetpos is incompatible with the off_t
3359 filetype used in fseek, at least on some platforms (Linux 7.0).
3360 (This fix was inserted into the V2.201 release on April 4).
3361
3362 - added "#define fits_write_pixnull ffppxn" to longnam.h
3363
3364 Version 2.201 - 15 March 2001
3365
3366 Enhancements
3367
3368 - enhanced the keyword reading routines so that they will do
3369 implicit datatype conversion from a string keyword value
3370 to a numeric keyword value, if the string consist of a
3371 valid number enclosed in quotes. For example, the keyword
3372 mykey = '37.5' can be read by ffgkye.
3373
3374 - modified ffiimg so that it is possible to insert a new
3375 primary array at the beginning of the file. The original
3376 primary array is then converted into an IMAGE extension.
3377
3378 - modified ffcpdt (copy data unit) to support the case where
3379 the data unit is being copied between 2 HDUs in the same file.
3380
3381 - enhanced the fits_read_pix and fits_read_pixnull routines so
3382 that they support the tiled image compression format that the
3383 other image reading routines also support.
3384
3385 - modified the Extended File Name syntax to also accept a
3386 minus sign (-) as well as an exclamation point (!) as
3387 the leading character when specifying a column or or keyword
3388 to be deleted, as in [col -time] will delete the TIME column.
3389
3390 - now completely support reading subimages, including pixel
3391 increments in each dimension, for tile-compressed images
3392 (where the compressed image tiles are stored in a binary
3393 table).
3394
3395 Bug fixes:
3396
3397 - fixed confusion in the use of the fpos_t and off_t datatypes
3398 in the fgetpos and fsetpos routines in drvrfile.c which caused
3399 problems with the Windows VC++ compiler. (fpos_t is not
3400 necessarily identical to off_t)
3401
3402 - fixed a typo in the fits_get_url function in group.c which
3403 caused problems when determining the relative URL to a compressed
3404 FITS file.
3405
3406 - included fitsio.h in the shared memory utility program,
3407 smem.c, in order to define OFF_T.
3408
3409 - fixed typo in the datatype of 'nullvalue' in ffgsvi, which caused
3410 attempts to read subsections of a short integer tiled compressed
3411 image to fail with a bus error.
3412
3413 - fixed bug in ffdkey which sometimes worked incorrectly if one
3414 tried to delete a nonexistent keyword beyond the end of the header.
3415
3416 - fixed problem in fits_select_image_section when it writes a dummy
3417 value to the last pixel of the section. If the image contains
3418 scaled integer pixels, then in some cases the pixel value could end
3419 up out of range.
3420
3421 - fixed obscure bug in the ffpcn_ family of routines which gave
3422 a floating exception when trying to write zero number of pixels to
3423 a zero length array (why would anyone do this?)
3424
3425 Version 2.200 - 26 Jan 2001
3426
3427 Enhancements
3428
3429 - updated the region filtering code to support the latest region
3430 file formats that are generated by the POW, SAOtng and ds9
3431 programs. Region positions may now be given in HH:MM:SS.s,
3432 DD:MM:SS.s format, and region sizes may be given arcsec or arcmin
3433 instead of only in pixel units. Also changed the logic so that if
3434 multiple 'include' regions are specified in the region file, they
3435 are ORed together, instead of ANDed, so that the filtering keeps
3436 points that are located within any of the 'include' regions, not
3437 just the intersection of the regions.
3438
3439 - added support for reading raw binary data arrays by converting
3440 them on the fly into virtual FITS files.
3441
3442 - modified ffpmsg, which writes error messages to CFITSIO's internal
3443 error stack, so that messages > 80 characters long will be wrapped
3444 around into multiple 80 character messages, instead of just
3445 being truncated at 80 characters.
3446
3447 - modified the CFITSIO parser so that expression which involve
3448 scaled integer columns get cast to double rather than int.
3449
3450 - Modified the keyword template parsing routine, ffgthd, to
3451 support the HIERARCH keyword.
3452
3453 - modified ffainit and ffbinit so that they don't unnecessarily
3454 allocate 0 bytes of memory if there are no columns (TFIELDS = 0)
3455 in the table that is being opened.
3456
3457 - modified fitsio2.h to support NetBSD on Alpha OSF platforms
3458 (NetBSD does not define the '__unix__' symbol).
3459
3460 - changed the way OFF_T is defined in fitsio.h for greater
3461 portability.
3462
3463 - changed drvrsmem.c so it is compiled only when HAVE_SHMEM_SERVICES
3464 is defined in order to removed the conditional logic from the Makefile
3465
3466 - reorganized the CFITSIO User's guide to make it
3467 clearer and easier for new users to learn the basic routines.
3468
3469 - fixed ffhdef (which reserves space for more header keywords) so
3470 that is also updates the start position of the next HDU. This
3471 affected the offset values returned by ffghof.
3472
3473 Version 2.100 - 18 Oct 2000
3474
3475 Enhancements
3476
3477 - made substantial modification to the code to support Large files,
3478 i.e., files larger than 2**31 bytes = 2.1GB. FITS files up to
3479 6 terabytes in size may now be read and written on platforms
3480 that support Large files (currently only Solaris).
3481
3482 - modified ffpcom and ffphis, which write COMMENT and HISTORY
3483 keywords, respectively, so that they now use columns 9 - 80,
3484 instead of only columns 11 - 80. Previously, these routines
3485 avoided using columns 9 and 10, but this is was unnecessarily
3486 restrictive.
3487
3488 - modified ffdhdu so that instead of refusing to delete the
3489 primary array, it will replace the current primary array
3490 with a null primary array containing the bare minimum of
3491 required keywords and no data.
3492
3493 New Routines
3494
3495 - fits_read_pix, fits_read_pixnull, fits_read_subset, and fits_write_pix
3496 routines were added to enable reading and writing of Large images,
3497 with more than 2.1e9 pixels. These new routines are now recommended
3498 as the basic routines for reading and writing all images.
3499
3500 - fits_get_hduoff returns the byte offset in the file to
3501 the start and end of the current HDU. This routine replaces the
3502 now obsolete fits_get_hduaddr routine; it uses 'off_t' instead of
3503 'long' as the datatype of the arguments and can support offsets
3504 in files greater than 2.1GB in size.
3505
3506 Bug fixes:
3507
3508 - fixed bug in fits_select_image_section that caused an integer
3509 overflow when reading very large image sections (bigger than
3510 8192 x 8192 4-byte pixels).
3511
3512 - improved ffptbb, the low-level table writing routine, so that
3513 it will insert additional rows in the table if the table is
3514 not already big enough. Previously it would have just over-
3515 written any HDUs following the table in the FITS file.
3516
3517 - fixed a bug in the fits_write_col_bit/ffpclx routine which
3518 could not write to a bit 'X' column if that was the first column
3519 in the table to be written to. This bug would not appear if
3520 any other datatype column was written to first.
3521
3522 - non-sensible (but still formally legal) binary table TFORM values
3523 such as '8A15', or '1A8' or 'A8' would confuse CFITSIO and cause it
3524 to return a 308 error. When parsing the TFORMn = 'rAw' value,
3525 the ffbnfm routine has been modified to ignore the 'w' value in cases
3526 where w > r.
3527
3528 - fixed bug in the blsearch routine in iraffits.c which sometimes
3529 caused an out-of-bounds string pointer to be returned when searching
3530 for blank space in the header just before the 'END' keyword.
3531
3532 - fixed minor problem in ffgtcr in group.c, which sometimes failed
3533 while trying to move to the end of file before appending a
3534 grouping table.
3535
3536 - on Solaris, with Sun CC 5.0, one must check for '__unix' rather
3537 than '__unix__' or 'unix' as it's symbol. Needed to modify this
3538 in drvrfile.c in 3 places.
3539
3540 - in ffextn, the FITS file would be left open if the named
3541 extension doesn't exist, thus preventing the file from being
3542 opened again later with write access.
3543
3544 - fixed bug in ffiimg that would cause attempts to insert a new
3545 image extension following a table extension, and in front of any
3546 other type of extension, to fail.
3547
3548 Version 2.037 - 6 July 2000
3549
3550 Enhancements
3551
3552 - added support in the extended filename syntax for flipping
3553 an image along any axis either by specifying a starting
3554 section pixel number greater than the ending pixel number,
3555 or by using '-*' to flip the whole axis. Examples:
3556 "myfile.fits[1:100, 50:10]" or "myfile.fits[-*,*]".
3557
3558 - when reading a section of an image with the extended filename
3559 syntax (e.g. image.fits[1:100:2, 1:100:2), any CDi_j WCS keywords
3560 will be updated if necessary to transfer the world coordinate
3561 system from the input image to the output image section.
3562
3563 - on UNIX platforms, added support for filenames that begin
3564 with "~/" or "~user/". The "~" symbol will get expanded
3565 into a string that gives the user's home directory.
3566
3567 - changed the filename parser to support disk file names that
3568 begin with a minus sign. Previously, the leading minus sign would
3569 cause CFITSIO to try to read/write the file from/to stdin/stdout.
3570
3571 - modified the general fits_update_key routine, which writes
3572 or updates a keyword value, to use the 'G' display format
3573 instead of the 'E' format for floating point keyword values.
3574 This will eliminate trailing zeros from appearing in the value.
3575
3576 - added support for the "-CAR" celestial coordinate projection
3577 in the ffwldp and ffxypx routines. The "-CAR" projection is
3578 the default simplest possible linear projection.
3579
3580 - added new fits_create_memfile/ffimem routine to create a new
3581 fits file at a designated memory location.
3582
3583 - ported f77_wrap.h and f77_wrap1.c so that the Fortran interface
3584 wrappers work correctly on 64-bit SGI operating systems. In this
3585 environment, C 'long's are 8-bytes long, but Fortran 'integers'
3586 are still only 4-bytes long, so the words have to be converted
3587 by the wrappers.
3588
3589 - minor modification to cfortran.h to automatically detect when it
3590 is running on a linux platform, and then define f2cFortran in that
3591 case. This eliminates the need to define -Df2cFortran on the
3592 command line.
3593
3594 - modified group.c to support multiple "/" characters in
3595 the path name of the file to be opened/created.
3596
3597 - minor modifications to the parser (eval.y, eval_f.c, eval_y.c)
3598 to a) add the unary '+' operator, and b) support copying the
3599 TDIMn keyword from the input to the output image under certain
3600 circumstances.
3601
3602 - modified the lexical parser in eval_l.y and eval_l.c to
3603 support #NULL and #SNULL constants which act to set the
3604 value to Null. Support was also added for the C-conditional
3605 expression: 'Boolean ? trueVal : falseVal'.
3606
3607 - small modification to eval_f.c to write an error message to
3608 the error stack if numerical overflow occurs when evaluating
3609 an expression.
3610
3611 - configure and configure.in now support the egcs g77 compiler
3612 on Linux platforms.
3613
3614 Bug fixes:
3615
3616 - fixed a significant bug when using the extended filename binning
3617 syntax to generate a 2-dimensional image from a histogram of the
3618 values in 2 table columns. This bug would cause table events that
3619 should have been located in the row just below the bottom row of
3620 the image (and thus should have been excluded from the histogram)
3621 to be instead added into the first row of the image. Similarly,
3622 the first plane of a 3-D or 4-D data cube would include the events
3623 that should have been excluded as falling in the previous plane of
3624 the cube.
3625
3626 - fixed minor bug when parsing an extended filename that contains
3627 nested pairs of square brackets (e.g., '[col newcol=oldcol[9]]').
3628
3629 - fixed bug when reading unsigned integer values from a table or
3630 image with fits_read_col_uint/ffgcvuk. This bug only occurred on
3631 systems like Digital Unix (now Tru64 Unix) in which 'long'
3632 integers are 8 bytes long, and only when reading more than 7200
3633 elements at a time. This bug would generally cause the program to
3634 crash with a segmentation fault.
3635
3636 - modified ffgcpr to update 'heapstart' as well as 'numrows' when
3637 writing more rows beyond the end of the table. heapstart
3638 is needed to calculate if more space needs to be inserted in the
3639 table when inserting columns into the table.
3640
3641 - modified fficls (insert column), ffmvec, ffdrow and ffdcol to
3642 not use the value of the NAXIS2 keyword as the number of rows
3643 in the table, and instead use the value that is stored in
3644 an internal structure, because the keyword value may not
3645 be up to date.
3646
3647 - Fixed bug in the iterator function that affected the handling
3648 of null values in string columns in ASCII and binary tables.
3649
3650 - Reading a subsample of pixels in very large images, (e.g.,
3651 file = myfile.fits[1:10000:10,1:10000:10], could cause a
3652 long integer overflow (value > 2**31) in the computation of the
3653 starting byte offset in the file, and cause a return error status
3654 = 304 (negative byte address). This was fixed by changing the
3655 order of the arithmetic operations in calculating the value of
3656 'readptr' in the ffgcli, ffgclj, ffgcle, ffgcld, etc. routines.
3657
3658 - In version 2.031, a fix to prevent compressed files from being
3659 opened with write privilege was implemented incorrectly. The fix
3660 was intended to not allow a compressed FITS file to be opened
3661 except when a local uncompressed copy of the file is being
3662 produced (then the copy is opened with write access), but in fact
3663 the opposite behavior occurred: Compressed files could be opened
3664 with write access, EXCEPT when a local copy is produced. This
3665 has been fixed in the mem_compress_open and file_compress_open
3666 routines.
3667
3668 - in iraffits.c, a global variable called 'val' caused multiply
3669 defined symbols warning when linking cfitsio and IRAF libraries.
3670 This was fixed by making 'val' a local variable within the
3671 routine.
3672
3673 Version 2.036 - 1 Feb 2000
3674
3675 - added 2 new generic routines, ffgpf and ffgcf which are analogous
3676 to ffgpv and ffgcv but return an array of null flag values instead
3677 of setting null pixels to a reserved value.
3678
3679 - minor change to eval_y.c and eval.y to "define alloca malloc"
3680 on all platforms, not just VMS.
3681
3682 - added support for the unsigned int datatype (TUINT) in the
3683 generic ffuky routine and changed ffpky so that unsigned ints
3684 are cast to double instead of long before being written to
3685 the header.
3686
3687 - modified ffs2c so that if a null string is given as input then
3688 a null FITS string (2 successive single quotes) will be returned.
3689 Previously this routine would just return a string with a single
3690 quote, which could cause an illegal keyword record to be written.
3691
3692 - The file flush operation on Windows platforms apparently
3693 changes the internal file position pointer (!) in violation of the
3694 C standard. Put a patch into the file_flush routine to explicitly
3695 seek back to the original file position.
3696
3697 - changed the name of imcomp_get_compressed_image_parms to
3698 imcomp_get_compressed_image_par to not exceed the 31 character
3699 limit on some compilers.
3700
3701 - modified the filename parser (which is used when moving to a
3702 named HDU) to support EXTNAME values which contain embedded blanks.
3703
3704 - modified drvrnet.c to deal with ftp compressed files better so
3705 that even fits files returned from cgi queries which have the wrong
3706 mime types and/or wrong types of file names should still decompress.
3707
3708 - modified ffgics to reduce the tolerance for acceptable skewness
3709 between the axes, and added a new warning return status =
3710 APPROX_WCS_KEY in cases where there is significant skewness
3711 between the axes.
3712
3713 - fixed bug in ffgics that affected cases where the first coordinate
3714 axis was DEC, not RA, and the image was a mirror image of the sky.
3715
3716 - fixed bug in ffhist when trying to read the default binning
3717 factor keyword, TDBIN.
3718
3719 - modified ffhist so that is correctly computes the rotation angle
3720 in a 2-D image if the first histogram column has a CROTA type
3721 keyword but the 2nd column does not.
3722
3723 - modified ffcpcl so that it preserves the comment fields on the
3724 TTYPE and TFORM keywords when the column is copied to a new file.
3725
3726 - make small change to configure.in to support FreeBSD Linux
3727 by setting CFLAGS = -Df2cFortran instead of -Dg77Fortran. Then
3728 regenerated configure with autoconf 2.13 instead of 2.12.
3729
3730 Version 2.035 - 7 Dec 1999 (internal release only, FTOOLS 5.0.2)
3731
3732 - added new routine called fits_get_keyclass/ffgkcl that returns
3733 the general class of the keyword, e.g., required structural
3734 keyword, WCS keyword, Comment keyword, etc. 15 classes of
3735 keywords have been defined in fitsio.h
3736
3737 - added new routine called fits_get_img_parm/ffgipr that is similar
3738 to ffgphd but it only return the bitpix, naxis, and naxisn values.
3739
3740 - added 3 new routines that support the long string keyword
3741 convention: fits_insert_key_longstr, fits_modify_key_longstr
3742 fits_update_key_longstr.
3743
3744 - modified ffgphd which reads image header keywords to support
3745 the new experimental compressed image format.
3746
3747 - when opening a .Z compressed file, CFITSIO tries to allocate
3748 memory equal to 3 times the file size, which may be excessive
3749 in some cases. This was changed so that if the allocation fails,
3750 then CFITSIO will try again to allocate only enough memory
3751 equal to 1 times the file size. More memory will be allocated
3752 later if this turns out to be too small.
3753
3754 - improved the error checking in the fits_insert_key routine
3755 to check for illegal characters in the keyword.
3756
3757 Version 2.034 - 23 Nov 1999
3758
3759 - enhanced support for the new 'CD' matrix world coordinate system
3760 keywords in the ffigics routine. This routine has been enhanced
3761 to look for the new 'CD' keywords, if present, and convert them
3762 back to the old CDELTn and CROTAn values, which are then returned.
3763 The routine will also swap the WCS parameters for the 2 axes if
3764 the declination-like axis is the first WCS axis.
3765
3766 - modified ffphbn in putkey.c to support the 'U' and 'V" TFORM characters
3767 (which represent unsigned short and unsigned int columns) in variable
3768 length array columns. (previously only supported these types in
3769 fixed length columns).
3770
3771 - added checks when reading gzipped files to detect unexpected EOF.
3772 Previously, the 'inflate_codes' routine would just sit in an infinite
3773 loop if the file ended unexpectedly.
3774
3775 - modified fits_verify_chksum/ffvcks so that checksum keywords with
3776 a blank value string are treated as undefined, the same as
3777 if the keyword did not exist at all.
3778
3779 - fixed ffghtb and ffghbn so that they return the extname value
3780 in cases where there are no columns in the table.
3781
3782 - fixed bug in the ffgtwcs routine (this is a little utility
3783 routine to aid in interfacing to Doug Mink's WCS routines);
3784 it was not correctly padding the length of string-valued keywords
3785 in the returned string.
3786
3787 - fixed bug in 'iraffits.c' that prevented Type-2 IRAF images from
3788 being correctly byte-swapped on PCs and DEC-OSF machines.
3789
3790 - fixed tiny memory leak in irafncmp in iraffits.c. Only relevant when
3791 reading IRAF .imh files.
3792
3793 - fixed a bug (introduced in version 2.027) that caused the keyword
3794 reading routines to sometimes not find a matching keyword if the
3795 input name template used the '*' wildcard as the last character.
3796 (e.g., if input name = 'COMMENT*' then it would not find the
3797 'COMMENT' keywords. (It would have found longer keywords like
3798 'COMMENTX' correctly). The fix required a minor change to ffgcrd
3799 in getkey.c
3800
3801 - modified the routine (ffswap8) that does byteswapping of
3802 double precision numbers. Some linux systems have reported floating
3803 point exceptions because they were trying to interpret the bytes
3804 as a double before the bytes had been swapped.
3805
3806 - fixed bug in the calculation of the position of the last byte
3807 in the string of bits to be read in ffgcxuk and ffgcxui. This
3808 bug generally caused no harm, but could cause the routine to
3809 exit with an invalid error message about trying to read
3810 beyond the size of the field.
3811
3812 - If a unix machine did not have '__unix__', 'unix', or '__unix'
3813 C preprocessor symbols defined, then CFITSIO would correctly open
3814 one FITS file, but would not correctly open subsequent files. Instead
3815 it would think that the same file was being opened multiple times.
3816 This problem has only been seen on an IBM/AIX machine. The fits_path2url
3817 and fits_url2path routines in group.c were modified to fix the problem.
3818
3819 - fixed bug in group.c, which affected WINDOWS platforms only, that
3820 caused programs to go into infinite loop when trying to open
3821 certain files.
3822
3823 - the ftrsim Fortran wrapper routine to ffrsim was not defined
3824 correctly, which caused the naxis(2) value to be passed incorrectly
3825 on Dec OSF machines, where sizeof(long) != sizeof(int).
3826
3827 Version 2.033 - 17 Sept 1999
3828
3829 - New Feature: enhanced the row selection parser so that comparisons
3830 between values in different rows of the table are allowed, and the
3831 string comparisons with <, >, <=, and >= are supported.
3832
3833 - added new routine the returns the name of the keyword in the
3834 input keyword record string. The name is usually the first
3835 8 characters of the record, except if the HIERARCH convention
3836 is being used in which case the name may be up to 67 characters
3837 long.
3838
3839 - added new routine called fits_null_check/ffnchk that checks to
3840 see if the current header contains any null (ASCII 0) characters.
3841 These characters are illegal in FITS headers, but they go undetected
3842 by the other CFITSIO routines that read the header keywords.
3843
3844 - the group.c file has been replaced with a new version as supplied
3845 by the ISDC. The changes are mainly to support partial URLs and
3846 absolute URLs more robustly. Host dependent directory paths are
3847 now converted to true URLs before being read from/written to
3848 grouping tables.
3849
3850 - modified ffnmhd slightly so that it will move to the first extension
3851 in which either the EXTNAME or the HDUNAME keyword is equal to the
3852 user-specified name. Previously, it only checked for HDUNAME if
3853 the EXTNAME keyword did not exist.
3854
3855 - made small change to drvrnet.c so that it uncompress files
3856 which end in .Z and .gz just as for ftp files.
3857
3858 - rewrote ffcphd (copy header) to handle the case where the
3859 input and output HDU are in the same physical FITS file.
3860
3861 - fixed bug in how long string keyword values (using the CONTINUE
3862 convention) were read. If the string keyword value ended in an
3863 '&' character, then fits_read_key_longstr, fits_modify_key_str,
3864 and fits_delete_key would interpret the following keyword as
3865 a continuation, regardless of whether that keyword name was
3866 'CONTINUE' as required by this convention. There was also a bug
3867 in that if the string keyword value was all blanks, then
3868 fits_modify_key_str could in certain unusual cases think
3869 that the keyword ended in an '&' and go into an infinite loop.
3870
3871 - modified ffgpv so that it calls the higher level ffgpv_ routine
3872 rather than directly calling the lower level ffgcl_ routine. This
3873 change is needed to eventually support reading compressed images.
3874
3875 - added 3 new routines to get the image datatype, image dimensions,
3876 and image axes length. These support the case where the image is
3877 compressed and stored in a binary table.
3878
3879 - fixed bug in ffiblk that could sometimes cause it to insert a
3880 new block in a file somewhere in the middle of the data, instead
3881 of at the end of the HDU. This fortunately is a rare problem,
3882 mainly only occurring in certain cases when inserting rows in a binary
3883 table that contains variable length array data (i.e., has a heap).
3884
3885 - modified fits_write_tdim so that it double checks the TFORMn
3886 value directly if the column repeat count stored in the internal
3887 structure is not equal to the product of all the dimensions.
3888
3889 - fixed bug that prevented ffitab or ffibin from inserting a new
3890 table after a null primary array (can't read NAXIS2 keyword).
3891 Required a small change to ffrdef.
3892
3893 - modified testprog.c so that it will continue to run even if
3894 it cannot open or process the template file testprog.tpt.
3895
3896 - modified the logic in lines 1182-1185 of grparser.c so that
3897 it returns the correct status value in case of an error.
3898
3899 - added test in fitsio2.h to see if __sparcv9 is defined; this
3900 identifies a machine running Solaris 7 in 64-bit mode where
3901 long integers are 64 bits long.
3902
3903 Version 2.032 - 25 May 1999
3904
3905 - the distribution .tar file was changed so that all the files
3906 will be untarred into a subdirectory by default instead of
3907 into the current directory.
3908
3909 - modified ffclos so that it always frees the space allocated by
3910 the fptr pointer, even when another fptr points to the same file.
3911
3912 - plugged a potential (but rare in practice) memory leak in ffpinit
3913
3914 - fixed bug in all the ffp3d_ and ffg3d_ routines in cases where
3915 the data cube that has been allocated in memory has more planes
3916 than the data cube in the FITS file.
3917
3918 - modified drvrsmem.c so that it allocates a small shared
3919 memory segment only if CFITSIO tries to read or write a
3920 FITS file in shared memory. Previously it always allocated
3921 the segment whether it was needed or not. Also, this small
3922 segment is removed if 0 shared memory segments remain in
3923 the system.
3924
3925 - put "static" in front of 7 DECLARE macros in compress.c
3926 because these global variables were causing conflicts with other
3927 applications programs that had variables with the same names.
3928
3929 - modified ffasfm to return datatype = TDOUBLE instead of TFLOAT
3930 if the ASCII table column has TFORMn = 'Ew.d' with d > 6.
3931
3932 - modified the column reading routines to a) print out the offending
3933 entry if an error occurs when trying to read a numeric ASCII table
3934 column, and b) print out the column number that had the error
3935 (the messages are written to CFITSIOs error stack)
3936
3937 - major updates to the Fortran FITSIO User's Guide to include many
3938 new functions that have been added to CFITSIO in the past year.
3939
3940 - modified fitsio2.h so that the test for __D_FLOAT etc. is only
3941 made on Alpha VMS machines, to avoid syntax errors on some other
3942 platforms.
3943
3944 - modified ffgthd so that it recognizes a floating point value
3945 that uses the 'd' or 'D' exponent character.
3946
3947 - removed the range check in fftm2s that returned an error if
3948 'decimals' was less than zero. A negative value is OK and is
3949 used to return only the date and not the time in the string.
3950
3951 Version 2.031 - 31 Mar 1999
3952
3953 - moved the code that updates the NAXIS2 and PCOUNT keywords from
3954 ffchdu into the lower lever ffrdef routine. This ensures that
3955 other routines which call ffrdef will correctly update these 2
3956 keywords if required. Otherwise, for instance, calling
3957 fits_write_checksum before closing the HDU could cause the NAXIS2
3958 keyword (number of rows in the table) to not be updated.
3959
3960 - fixed bug (introduced in version 2.030) when writing null values
3961 to a primary array or image extension. If trying to set more
3962 than 1 pixel to null at a time, then typically only 1 null would
3963 be written. Also fixed related bug when writing null values to
3964 rows in a table that are beyond the currently defined size of the
3965 table (the size of the table was not being expanded properly).
3966
3967 - enhanced the extended filename parser to support '*' in image
3968 section specifiers, to mean use the whole range of the axis.
3969 myfile.fits[*,1:100] means use the whole range of the first
3970 axis and pixels 1 to 100 in the second axis. Also supports
3971 an increment, as in myfile.fits[*:2, *:2] to use just the
3972 odd numbered rows and columns.
3973
3974 - modified fitscore.c to set the initial max size of the header, when
3975 first reading it, to the current size of the file, rather than to
3976 2 x 10**9 to avoid rare cases where CFITSIO ends up writing a huge
3977 file to disk.
3978
3979 - modified file_compress_open so that it will not allow a compressed
3980 FITS file to be opened with write access. Otherwise, a program
3981 could write to the temporary copy of the uncompressed file, but
3982 the modification would be lost when the program exits.
3983
3984 Version 2.030 - 24 Feb 1999
3985
3986 - fixed bug in ffpclu when trying to write a null value to a row
3987 beyond the current size of the table (wouldn't append new rows
3988 like it should).
3989
3990 - major new feature: enhanced the routines that read ASCII string
3991 columns in tables so that they can read any table column, including
3992 logical and numeric valued columns. The column values are returned
3993 as a formatted string. The format is determined by the TDISPn
3994 keyword if present, otherwise a default format based on the
3995 datatype of the column is used.
3996
3997 - new routine: fits_get_col_display_width/ffgcdw returns the length
3998 of the formatted strings that will be returned by the routines that
3999 read table columns as strings.
4000
4001 - major new feature: added support for specifying an 'image section'
4002 when opening an image: e.g, myfile.fits[1:512:2,2:512:2] to
4003 open a 256x256 pixel image consisting of the odd columns and the
4004 even numbered rows of the input image.
4005
4006 - added supporting project files and instructions for building
4007 CFITSIO under Windows NT with the Microsoft Visual C++ compiler.
4008
4009 - changed the variable 'template' to 'templt' in testprog.c since
4010 it conflicted with a reserved word on some compilers.
4011
4012 - modified group.c to conditionally include sys/stat.h only on
4013 unix platforms
4014
4015 - fixed bug in the ffiter iterator function that caused it to always
4016 pass 'firstn' = 1 to the work function when reading from the
4017 primary array or IMAGE extension. It worked correctly for tables.
4018
4019 - fixed bug in the template header keyword parser (ffgthd) in cases
4020 where the input template line contains a logical valued keyword
4021 (T or F) without any following comment string. It was previously
4022 interpreting this as a string-valued keyword.
4023
4024 - modified ffrhdu that reads and opens a new HDU, so that it
4025 ignores any leading blank characters in the XTENSION name, e.g.,
4026 XTENSION= ' BINTABLE' will not cause any errors, even though
4027 this technically violates the FITS Standard.
4028
4029 - modified ffgtbp that reads the required table keywords to make
4030 it more lenient and not exit with an error if the THEAP keyword
4031 in binary tables cannot be read as an integer. Now it will
4032 simply ignore this keyword if it cannot be read.
4033
4034 - added test for 'WIN32' as well as '__WIN32__' in fitsio2.h,
4035 eval.l and eval_l.c in a preprocessor statement.
4036
4037 - changed definition of strcasecmp and strncasecmp in fitsio2.h,
4038 eval.l and eval_l.c to conform to the function prototypes under
4039 the Alpha VMS v7.1 compiler.
4040
4041 - corrected the long function names in longnam.h for the new WCS
4042 utility functions in wcssubs.c
4043
4044 Version 2.029 - 11 Feb 1999
4045
4046 - fixed bug in the way NANs and underflows were being detected on
4047 VAX and Alpha VMS machines.
4048
4049 - enhanced the filename parser to distinguish between a VMS-style
4050 directory name (e.g. disk:[directory]myfile.fits) and a CFITSIO
4051 filter specifier at the end of the name.
4052
4053 - modified ffgthd to support the HIERARCH convention for keyword
4054 names that are longer than 8 characters or contain characters
4055 that would be illegal in standard FITS keyword names.
4056
4057 - modified the include statements in grparser.c so that malloc.h
4058 and memory.h are only included on the few platforms that really
4059 need them.
4060
4061 - modified the file_read routine in drvrfile.c to ignore the last
4062 record in the FITS file it it only contains a single character that
4063 is equal to 0, 10 or 32. Text editors sometimes append a character
4064 like this to the end of the file, so CFITSIO will ignore it and
4065 treat it as if it had reached the end of file.
4066
4067 - minor modifications to fitsio.h to help support the ROOT environment.
4068
4069 - installed new version of group.c and group.h; the main change
4070 is to support relative paths (e.g. "../filename") in the URLs
4071
4072 - modified the histogramming routines so that it looks for the
4073 default preferred column axes in a keyword of the form
4074 CPREF = 'Xcol, Ycol'
4075 instead of separate keywords of the form
4076 CPREF1 = 'Xcol'
4077 CPREF2 = 'Ycol'
4078
4079 - fixed bug so that if the binning spec is just a single integer,
4080 as in [bin 4] then this will be interpreted as meaning to make
4081 a 2D histogram using the preferred or default axes, with the
4082 integer taken as the binning factor in both axes.
4083
4084 Version 2.028 - 27 Jan 1999
4085
4086 - if the TNULLn keyword value was outside the range of a 'I' or 'B'
4087 column, an overflow would occur when setting the short or char
4088 to the TNULLn value, leading to incorrect values being flagged as
4089 being undefined. This has been fixed so that CFITSIO will ignore
4090 TNULLn values that are beyond the range of the column data type.
4091
4092 - changed a few instances of the string {"\0"} to {'\0'} in the
4093 file groups.c
4094
4095 - installed new version of the grparser.c file from the ISDC
4096
4097 - added new WCS support routines (in wcssub.c) which make it easier
4098 to call Doug Mink's WCSlib routines for converting between plate
4099 and sky coordinates. The CFITSIO routines themselves never
4100 call a WCSlib routine, so CFITSIO is not dependent on WCSlib.
4101
4102 - modified ffopen so that if you use the extended filename
4103 syntax to both select rows in a table and then bin columns into
4104 a histogram, then CFITSIO will simply construct an array listing
4105 the good row numbers to be used when making the histogram,
4106 instead of making a whole new temporary FITS file containing
4107 the selected rows.
4108
4109 - modified ffgphd which parses the primary array header keywords
4110 when opening a file, to not choke on minor format errors in
4111 optional keywords. Otherwise, this prevents CFITSIO from
4112 even opening the file.
4113
4114 - changed a few more variable declarations in compress.c from global
4115 to static.
4116
4117 Version 2.027 - 12 Jan 1999
4118
4119 - modified the usage of the output filename specifier so that it,
4120 a) gives the name of the binned image, if specified, else,
4121 b) gives the name of column filtered and/or row filtered table, if
4122 specified, else
4123 c) is the name for a local copy of the ftp or http file, else,
4124 d) is the name for the local uncompressed version of the compressed
4125 FITS file, else,
4126 e) the output filename is ignored.
4127
4128 - fixed minor bug in ffcmps, when comparing 2 strings while using
4129 a '*' wild card character.
4130
4131 - fixed bug in ftgthd that affected cases where the template string
4132 started with a minus sign and contained 2 tokens (to rename a
4133 keyword).
4134
4135 - added support for the HIERARCH keyword convention for reading
4136 and writing keywords longer than 8 characters or that contain
4137 ASCII characters not allowed in normal FITS keywords.
4138
4139 - modified the extended filename syntax to support opening images
4140 that are contained in a single cell of a binary table with syntax:
4141 filename.fits[extname; col_name(row_expression)]
4142
4143 Version 2.026 - 23 Dec 1998
4144
4145 - modified the group parser to:
4146 a) support CFITSIO_INCLUDE_FILES environment variable, which can
4147 point to the location of template files, and,
4148 b) the FITS file parameter passed to the parser no longer has to point
4149 to an empty file. If there are already HDUs in the file, then the
4150 parser appends new HDUs to the end of the file.
4151
4152 - make a small change to the drvrnet.c file to accommodate creating
4153 a static version of the CFITSIO library.
4154
4155 - added 2 new routines to read consecutive bits as an unsigned integer
4156 from a Bit 'X' or Byte 'B' column (ffgcxui and ffgcxuk).
4157
4158 - modified the logic for determining histogram boundaries in ffhisto
4159 to add one more bin by default, to catch values that are right on
4160 the upper boundary of the histogram, or are in the last partial bin.
4161
4162 - modified cfitsio2.h to support the new Solaris 7 64-bit mode operating
4163 system.
4164
4165 - Add utility routine, CFits2Unit, to the Fortran wrappers which searches
4166 the gFitsFiles array for a fptr, returning its element (Fortran unit
4167 number), or allocating a new element if one doesn't already
4168 exists... for C calling Fortran calling CFITSIO.
4169
4170 - modified configure so that it does not use the compiler optimizer
4171 when using gcc 2.8.x on Linux
4172
4173 - (re)added the fitsio.* documentation files that describe the
4174 Fortran-callable FITSIO interface to the C routines.
4175
4176 - modified the lexical parser in eval_f.c to fix bug in null detections
4177 and bug in ffsrow when nrows = 0.
4178
4179 - modified ffcalc so that it creates a TNULLn keyword if appropriate
4180 when a new column is created. Also fixed detection of OVERFLOWs
4181 so that it ignores null values.
4182
4183 - added hyperbolic trig and rounding functions to
4184 the lexical parser in the eval* files.
4185
4186 - improved error message that gets written when the group number is
4187 out of range when reading a 'random groups' array.
4188
4189 - added description of shared memory, grouping, and template parsing
4190 error messages to ffgerr and to the User's Guide. Moved the error
4191 code definitions from drvsmem.h to fitsio.h.
4192
4193 - modified grparser.c to compile correctly on Alpha/OSF machines
4194
4195 - modified drvrnet.c to eliminate compiler warnings
4196
4197 - Modified Makefile.in to include targets for building all the sample
4198 programs that are included with CFITSIO.
4199
4200 Version 2.025 - 1 Dec 1998
4201
4202 - modified ffgphd and ffgtbp so that they ignores BLANK and TNULLn keywords
4203 that do not have a valid integer value. Also, any error while reading
4204 the BSCALE, BZERO, TSCALn, or TZEROn keywords will be ignored.
4205 Previously, CFITSIO would have simply refused to read an HDU that had
4206 such an invalid keyword.
4207
4208 - modified the parser in eval_f.c to accept out of order times in GTIs
4209
4210 - updated cfitsio_mac.sit.hqx to fix bad target parameters for Mac's
4211 speed test program
4212
4213 - modified template parser in grparser.c to: 1) not write GRPNAME keyword
4214 twice, and 2) assign correct value for EXTVERS keyword.
4215
4216 - fixed minor bugs in group.c; mainly would only affect users of the
4217 INTEGRAL Data Access Layer.
4218
4219 - temporarily removed the prototype for ffiwcs from fitsio.h until
4220 full WCS support is added to CFITSIO in the near future.
4221
4222 - modified the HTTP driver to send a User-Agent string:
4223 HEASARC/CFITSIO/<version number>
4224
4225 - declared local variables in compress.c as 'static' to avoid
4226 conflicts with other libraries.
4227
4228 Version 2.024 - 9 Nov 1998
4229
4230 - added new function fits_url_type which returns the driver prefix string
4231 associated with a particular FITS file pointer.
4232
4233 Version 2.023 - 1 Nov 1998 - first full release of CFITSIO 2.0
4234
4235 - slightly modified the way real keyword values are formatted, to ensure
4236 that it includes a decimal point. E.g., '1.0E-09' instead of '1E-09'
4237
4238 - added new function to support template files when creating new FITS files.
4239
4240 - support the TCROTn WCS keyword in tables, when reading the WCS keywords.
4241
4242 - modified the iterator to support null values in logical columns in
4243 binary tables.
4244
4245 - fixed bug in iterator to support null values in integer columns in
4246 ASCII tables.
4247
4248 - changed the values for FLOATNULLVALUE and DOUBLENULLVALUE to make them
4249 less likely to duplicate actual values in the data.
4250
4251 - fixed major bug when freeing memory in the iterator function. It caused
4252 mysterious crashes on a few platforms, but had no effect on most others.
4253
4254 - added support for reading IRAF format image (.imh files)
4255
4256 - added more error checking to return an error if the size of the FITS
4257 file exceeds the largest value of a long integer (2.1 GB on 32-bit
4258 platforms).
4259
4260 - CFITSIO now will automatically insert space for additional table rows
4261 or add space to the data heap, if one writes beyond the current end
4262 of the table or heap. This prevents any HDUs which might follow
4263 the current HDU from being overwritten. It is thus no longer necessary
4264 to explicitly call fits_insert_rows before writing new rows of data
4265 to the FITS file.
4266
4267 - CFITSIO now automatically keeps track of the number of rows that have
4268 been written to a FITS table, and updates the NAXIS2 keyword accordingly
4269 when the table is closed. It is no longer necessary for the application
4270 program to updated NAXIS2.
4271
4272 - When reading from a FITS table, CFITSIO will now return an error if the
4273 application tries to read beyond the end of the table.
4274
4275 - added 2 routines to get the number of rows or columns in a table.
4276
4277 - improved the undocumented feature that allows a '20A' column to be
4278 read as though it were a '20B' column by fits_read_col_byt.
4279
4280 - added overflow error checking when reading keywords. Previously, the
4281 returned value could be silently truncated to the maximum allowed value
4282 for that data type. Now an error status is returned whenever an
4283 overflow occurs.
4284
4285 - added new set of routines dealing with hierarchical groups of files.
4286 These were provided by Don Jennings of the INTEGRAL Science Data Center.
4287
4288 - added new URL parsing routines.
4289
4290 - changed the calling sequence to ffghad (get HDU address) from
4291 ffghad(fitsfile *fptr, > long *headstart, long *dataend) to
4292 ffghad(fitsfile *fptr, > long *headstart, long datastart,
4293 long *dataend, int *status)
4294
4295 - major modification to support opening the same FITS file more
4296 than once. Now one can open the same file multiple times and
4297 read and write simultaneously to different HDUs within the file.
4298 fits_open_file automatically detects if the file is already opened.
4299
4300 - added the ability to clobber/overwrite an existing file
4301 with the same name when creating a new output file. Just
4302 precede the output file name with '!' (an exclamation mark)
4303
4304 - changed the ffpdat routine which writes the DATE keyword
4305 to use the new 'YYYY-MM-DDThh:mm:ss' format.
4306
4307 - added several new routines to create or parse the new date/time
4308 format string.
4309
4310 - changed ifdef for DECFortran in f77_wrap.h and f77_wrap1.c:
4311 expanded to recognize Linux/Alpha
4312
4313 - added new lexical parsing routines (from Peter Wilson):
4314 eval_l.c, eval_y.c, eval_f.c, eval_defs.h, and eval_tab.h.
4315 These are used when doing on-the-fly table row selections.
4316
4317 - added new family of routines to support reading and writing
4318 'unsigned int' data type values in keywords, images or tables.
4319
4320 - restructured all the putcol and getcol routines to provide
4321 simpler and more robust support for machines which have
4322 sizeof(long) = 8. Defined a new datatype INT32BIT which is
4323 always 32 bits long (platform independent) and is used internally
4324 in CFITSIO when reading or writing BITPIX = 32 images or 'J'
4325 columns. This eliminated the need for specialize routines like
4326 ffswaplong, ffunswaplong, and ffpacklong.
4327
4328 - overhauled cfileio.c (and other files) to use loadable drivers for
4329 doing data I/O to different devices. Now CFITSIO support network
4330 access to ftp:// and http:// files, and to shared memory files.
4331
4332 - removed the ffsmem routine and replaced it with ffomem. This will
4333 only affect software that reads an existing file in core memory.
4334 (written there by some other process).
4335
4336 - modified all the ffgkn[] routines (get an array of keywords) so
4337 that the 'nfound' parameter is = the number of keywords returned,
4338 not the highest index value on the returned keywords. This makes
4339 no difference if the starting index value to look for = 1.
4340 This change is not backward compatible with previous versions
4341 of CFITSIO, but is the way that FITSIO behaved.
4342
4343 - added new error code = 1 for any application error external
4344 to CFITSIO. Also reports "unknown error status" if the
4345 value doesn't match a known CFITSIO error.
4346
4347 Version 1.42 - 30 April 1998 (included in FTOOLS 4.1 release)
4348
4349 - modified the routines which read a FITS float values into
4350 a float array, or read FITS double values into a double array,
4351 so that the array value is also explicitly set in addition
4352 to setting the array of flag values, if the FITS value is a NaN.
4353 This ensures that no NaN values get passed back to the calling
4354 program, which can cause serious problems on some platforms (OSF).
4355
4356 - added calls to ffrdef at the beginning of the insert
4357 or delete rows or columns routines in editcol.c to make sure
4358 that CFITSIO has correctly initialized the HDU information.
4359
4360 - added new routine ffdrws to delete a list of rows in a table
4361
4362 - added ffcphd to copy the header keywords from one hdu to another
4363
4364 - made the anynul parameter in the ffgcl* routines optional
4365 by first checking to see if the pointer is not null before
4366 initializing it.
4367
4368 - modified ffbinit and ffainit to ignore minor format
4369 errors in header keywords so that cfitsio can at least
4370 move to an extension that contains illegal keywords.
4371
4372 - modified all the ffgcl* routines to simply return without
4373 error if nelem = 0.
4374
4375 - added check to ffclose to check the validity of the fitsfile
4376 pointer before closing it. This should prevent program crashes
4377 when someone tries to close the same file more than once.
4378
4379 - replaced calls to strcmp and strncmp with macros FSTRCMP and
4380 FSTRNCMP in a few places to improve performance when reading
4381 header keywords (suggested by Mike Noble)
4382
4383 Bug Fixes:
4384
4385 - fixed typo in macro definition of error 504 in the file fitsio.h.
4386
4387 - in ffopen, reserved space for 4 more characters in the input
4388 file name in case a '.zip' suffix needs to be added.
4389
4390 - small changes to ffpclx to fix problems when writing bit (X) data
4391 columns beyond the current end of file.
4392
4393 - fixed small bug in ffcrhd where a dummy pointer was not initialized
4394
4395 - initialized the dummy variable in ffgcfe and ffgcfd which
4396 was causing crashes under OSF in some cases.
4397
4398 - increased the length of the allocated string ffgkls by 2
4399 to support the case of reading a numeric keyword as a string
4400 which doesn't have the enclosing quote characters.
4401
4402 Version 1.4 - 6 Feb 1998
4403
4404 - major restructuring of the CFITSIO User's Guide
4405
4406 - added the new 'iterator' function. The fortran wrapper is
4407 in f77_iter.c for now.
4408
4409 - enhanced ffcrtb so that it writes a dummy primary array
4410 if none currently exists before appending the table.
4411
4412 - removed the ffgcl routine and replaced it with ffgcvl
4413
4414 - modified ffpcnl to just take a single input null value instead
4415 of an entire array of null value flags.
4416
4417 - modified ffcmps and ffgnxk so that, for example, the string 'rate'
4418 is not considered a match to the string 'rate2', and 'rate*'
4419 is a match to the string 'rate'.
4420
4421 - modified ffgrsz to also work with images, in which case
4422 it returns the optimum number of pixels to process at
4423 one time.
4424
4425 - modified ffgthd to support null valued keywords
4426
4427 - added a new source file 'f77_wrap.c' that includes all the
4428 Fortran77 wrapper routines for calling CFITSIO. This will
4429 eventually replace the Fortran FITSIO library.
4430
4431 - added new routines:
4432 ffppn - generic write primary array with null values
4433 ffpprn - write null values to primary array
4434
4435 ffuky - 'update' a keyword value, with any specified datatype.
4436
4437 ffrprt - write out report of error status and error messages
4438 ffiter - apply a user function iteratively to all the rows of a table
4439 ffpkyc - write complex-valued keyword
4440 ffpkym - write double complex-valued keyword
4441 ffpkfc - write complex-valued keyword in fixed format
4442 ffpkfm - write double complex-valued keyword in fixed format
4443
4444 ffgkyc - read complex-valued keyword
4445 ffgkym - read double complex-valued keyword
4446
4447 ffmkyc - modify complex-valued keyword
4448 ffmkym - modify double complex-valued keyword
4449 ffmkfc - modify complex-valued keyword in fixed format
4450 ffmkfm - modify double complex-valued keyword in fixed format
4451
4452 ffukyc - update complex-valued keyword
4453 ffukym - update double complex-valued keyword
4454 ffukfc - update complex-valued keyword in fixed format
4455 ffukfm - update double complex-valued keyword in fixed format
4456
4457 ffikyc - insert complex-valued keyword
4458 ffikym - insert double complex-valued keyword
4459 ffikfc - insert complex-valued keyword in fixed format
4460 ffikfm - insert double complex-valued keyword in fixed format
4461
4462 ffpktp - write or modify keywords using ASCII template file
4463 ffcpcl - copy a column from one table to another
4464 ffcpky - copy an indexed keyword from one HDU to another
4465 ffpcnl - write logical values, including nulls, to binary table
4466 ffpcns - write string values, including nulls, to table
4467 ffmnhd - move to HDU with given exttype, EXTNAME and EXTVERS values
4468 ffthdu - return the total number of HDUs in the file
4469 ffghdt - return the type of the CHDU
4470 ffflnm - return the name of the open FITS file
4471 ffflmd - return the mode of the file (READONLY or READWRITE)
4472
4473 - modified ffmahd and ffmrhd (to move to a new extension) so that
4474 a null pointer may be given for the returned HDUTYPE argument.
4475
4476 - worked around a bug in the Mac CWpro2 compiler by changing all
4477 the statements like "#if BYTESWAPPED == TRUE" to "if BYTESWAPPED".
4478
4479 - modified ffitab (insert new ASCII table) to allow tables with
4480 zero number of columns
4481
4482 - modified Makefile.in and configure to define the -Dg77Fortran
4483 CFLAGS variable on Linux platforms. This is needed to
4484 compile the new f77_wrap.c file (which includes cfortran.h)
4485
4486 Bug Fixes:
4487
4488 - fixed small bug in ffgrz (get optimum row size) which sometimes
4489 caused it to return slightly less than the maximum optimum size.
4490 This bug would have done no harm to application programs.
4491
4492 - fixed bug in ffpclk and ffgclk to add an 'else' case
4493 if size of int is not equal to size of short or size of long.
4494
4495 - added test to ffgkls to check if the input string is not null before
4496 allocating memory for it.
4497
4498 Version 1.32 - 21 November 1997 (internal release only)
4499
4500 - fixed bug in the memory deallocation (free) statements
4501 in the ffopen routine in the cfileio.c file.
4502
4503 - modified ffgphd to tolerate minor violations of the FITS
4504 standard in the format of the XTENSION = 'IMAGE '
4505 keyword when reading FITS files. Extra trailing spaces
4506 are now allowed in the keyword value. (FITS standard
4507 will be changed so that this is not a violation).
4508
4509 Version 1.31 - 4 November 1997 (internal release only)
4510
4511 Enhancements:
4512
4513 - added support for directly reading compressed FITS files
4514 by copying the algorithms from the gzip program. This
4515 supports the Unix compress, gzip and pkzip algorithms.
4516
4517 - modified ffiimg, ffitab, and ffibin (insert HDUs into
4518 a FITS file) so that if the inserted HDU is at the end of
4519 the FITS file, then it simply appends a new empty HDU
4520 and writes the required keywords. This allows space
4521 to be reserved for additional keywords in the header
4522 if desired.
4523
4524 - added the ffchfl and ffcdfl routines to check the header and
4525 data fill values, for compatibility with the Fortran FITSIO
4526 library.
4527
4528 - added the ffgsdt routine to return the system date
4529 for compatibility with the Fortran FITSIO library.
4530
4531 - added a diagnostic error message (written to the error stack)
4532 if the routines that read data from image or column fail.
4533
4534 - modified ffgclb so that it simply copies the bytes from
4535 an ASCII 'nA' or 'An' format column into the user's byte
4536 array. Previously, CFITSIO would return an error when
4537 trying to read an 'A' column with ffgclb.
4538
4539 - modified ffpclb so that it simply copies the input array
4540 of bytes to an ASCII 'nA' or 'An' format column.
4541 Previously, CFITSIO would return an error when
4542 trying to write to an 'A' column with ffpclb.
4543
4544 Bug Fixes:
4545
4546 - ffgkls was allocating one too few bytes when reading continued
4547 string keyword values.
4548
4549 - in testprog.c added code to properly free the memory that
4550 had been allocated for string arrays.
4551
4552 - corrected typographical errors in the User's Guide.
4553
4554 Version 1.30 - 11 September 1997
4555
4556 - major overhaul to support reading and writing FITS files
4557 in memory. The new routines fits_set_mem_buff and
4558 fits_write_mem_buff have been added to initialize and
4559 copy out the memory buffer, respectively.
4560
4561 - added support for reading FITS files piped in on 'stdin'
4562 and piped out on 'stdout'. Just specify the file name as '-'
4563 when opening or creating the FITS file.
4564
4565 - added support for 64-bit SGI IRIX machines. This required
4566 adding routines to pack and unpack 32-bit integers into
4567 64-bit integers.
4568
4569 - cleaned up the code that supports G_FLOAT and IEEE_FLOAT
4570 on Alpha VMS systems. Now, the type of float is determined
4571 at compile time, not run time.
4572
4573 Bug Fixes:
4574
4575 - replaced the malloc calls in the error message stack routines
4576 with a static fixed size array. The malloc's cause more
4577 problems than they solved, and were prone to cause memory
4578 leaks if users don't clear the error message stack when
4579 closing the FITS file.
4580
4581 - when writing float or double keywords, test that the value
4582 is not a special IEEE value such as a NaN. Some
4583 compilers would write the string 'NaN' in this case into
4584 the output value string.
4585
4586 - fixed bug in ffiblk, to ignore EOF status return if it is
4587 inserting blocks at the end of the file.
4588
4589 - removed the 'l' from printf format string that is constructed
4590 in the ffcfmt routine. This 'l' is non-standard and causes problems
4591 with the Metrowerks compiler on a Mac.
4592
4593 - the default null value in images was mistakenly being set
4594 equal to NO_NULL = 314, rather than NULL_UNDEFINED = 1234554321
4595 in the ffgphd routine.
4596
4597 - check status value in ffgkls to make sure the keyword exists
4598 before allocating memory for the value string.
4599
4600 - fixed the support for writing and reading unsigned long integer
4601 keyword values in ffpky and ffgky by internally treating
4602 the values as doubles. This required changes to ffc2r and
4603 ffc2d as well.
4604
4605 - added explicit cast to 'double' in one place in putcolb.c and
4606 6 places in pubcolui.c, to get rid of warning messages issued
4607 by one compiler.
4608
4609 - in ffbinit and ffainit, it is necessary to test that tfield > 0
4610 before trying to allocate memory with calloc. Otherwise, some
4611 compilers return a null pointer which CFITSIO interprets to
4612 mean the memory allocation failed.
4613
4614 - had to explicitly cast the null buffer pointer to a char
4615 pointer (cptr = (char *)buffer;) in 4 places in the buffers.c
4616 file to satisfy a picky C++ compiler.
4617
4618 - changed the test for an ALPHA VMS system to see if
4619 '__VMS' is defined, rather than 'VMS'. The latter
4620 is not defined by at least one C++ compiler.
4621
4622 - modified ffpcls so that it can write a null string to
4623 a variable length string column, without going into
4624 an infinite loop.
4625
4626 - fixed bug in ffgcfl that caused the 'next' variable to be
4627 incremented twice.
4628
4629 - fixed bug in ffgcpr that caused it write 2x the number of
4630 complex elements into the descriptor when writing to
4631 a complex or double complex variable length array column.
4632
4633 - added call to ffrdef at the end of ffrsim to ensure that
4634 the internal structures are updated to correspond to the
4635 modified header keywords
4636
4637 Version 1.25 - 7 July 1997
4638
4639 - improved the efficiency of the ffiblk routine, when inserting
4640 more than one block into the file.
4641
4642 - fixed bug in ffwend that in rare instances caused the beginning
4643 of the following extension to be overwritten by blank fill.
4644
4645 - added new routine to modify the size of an existing primary
4646 array or image extension: fits_resize_img/ffrsim.
4647
4648 - added support for null-valued keywords, e.g., keywords that
4649 have no defined value. These keywords have an equal sign and
4650 space in columns 9-10, but have not value string. Example:
4651 KEYNAME = / null-valued keyword
4652 Support for this feature required the following changes:
4653 - modified ffpsvc to return a null value string without error
4654 - modified ffc2[ilrd] to return error VALUE_UNDEFINED in this case
4655 - modified ffgkn[sljed] to continue reading additional keywords
4656 even if one or more keywords have undefined values.
4657 - added 4 new routines: ffpkyu, ffikyu, ffmkyu, ffukyu to
4658 write, insert, modify, or update an undefined keyword
4659
4660 - a new makefile.os2 file was added, for building CFITSIO
4661 on OS/2 systems.
4662
4663 - modified ffgtkn so that if it finds an unexpected keyword
4664 name, the returned error status = BAD_ORDER instead of
4665 NOT_POS_INT.
4666
4667 - added 2 new routines, fits_write_key_unit/ffpunt and
4668 fits_read_key_unit/ffgunt to write/read the physical
4669 units of a keyword value. These routines use a local
4670 FITS convention for storing the units in square brackets
4671 following the '/' comment field separator, as in:
4672 VELOCITY= 12 / [km/s] orbit speed
4673 The testprog.c program was modified to test these
4674 new routines.
4675
4676 - in the test of Alpha OSF/1 machines in fitsio2.h,
4677 change 'defined(unix)' to 'defined(__unix__)' which
4678 appears to be a more robust test.
4679
4680 - remove test for linux environment variable from fitsio2.h
4681
4682 Version 1.24 - 2 May 1997
4683
4684 - fixed bug in ffpbyt that incorrectly computed the current
4685 location in the FITS file when writing > 10000 bytes.
4686
4687 - changed the datatype of the 'nbytes' parameter in ffpbyt
4688 from 'int' to 'long'. Made corresponding datatype change
4689 to some internal variables in ffshft.
4690
4691 - changed '(unsigned short *)' to '(short *)' in getcolui.c, and
4692 changed '(unsigned long *)' to '(long *)' in getcoluj.c, to
4693 work around problem with the VAX/VMS cc compiler.
4694
4695 Version 1.23 - 24 April 1997
4696
4697 - modified ffcins and ffdins (in editcol.c) to simply return
4698 without error if there are no (zero) rows in the table.
4699
4700 Version 1.22 - 18 April 1997
4701
4702 - fixed bug in ffgcpr that caused it to think that all values were
4703 undefined in ASCII tables columns that have TNULLn = ' '
4704 (i.e., the TNULLn keyword value is a string of blanks.
4705
4706 - fixed bug in the ffgcl[bdeijk,ui,uj] family of routines
4707 when parsing a numeric value in an ASCII table. The
4708 returned values would have the decimal place shifted to
4709 the left if the table field contained an explicit decimal
4710 point followed by blanks. Example: in an F5.2 column,
4711 the value '16. ' would be returned as 0.16. If the
4712 trailing zeros were present, then cfitsio returned the
4713 correct value (e.g., '16.00' returns 16.).
4714
4715 - fixed another bug in the ffgcl[bdeijk,ui,uj] family of routines
4716 that caused them to misread values in an ASCII table in rows
4717 following an undefined value when all the values were read
4718 at once in a single call to the routine.
4719
4720 Version 1.21 - 26 March 1997
4721
4722 - added general support for reading and writing unsigned integer
4723 keywords, images, and binary table column values.
4724
4725 - fixed bug in the way the column number was used in ffgsve and
4726 similar routines. This bug caused cfitsio to read (colnum - 1)
4727 rather than the desired column.
4728
4729 - fixed a bug in ftgkls that prevented it from reading more than one
4730 continuation line of a long string keyword value.
4731
4732 - fixed the definition of fits_write_longwarn in longnam.h
4733
4734 Version 1.20 - 29 Jan 1997
4735
4736 - when creating a binary table with variable length vector columns, if the
4737 calling routine does not specify a value for the maximum length of
4738 the vector (e.g., TFORMn = '1PE(400)') then cfitsio will automatically
4739 calculate the maximum value and append it to the TFORM value
4740 when the binary table is first closed.
4741
4742 - added the set of routines to do coordinate system transformations
4743
4744 - added support for wildcards ('*', '?', and '#') in the input
4745 keyword name when reading, modifying, or deleting keywords.
4746
4747 - added new general keyword reading routine, ffgnxk, to return
4748 the next keyword whose name matches a list of template names,
4749 but does not match any names on a second template list.
4750
4751 - modified ftgrec so that it simply moves to the beginning
4752 of the header if the input keyword number = 0
4753
4754 - added check in ffdelt to make sure the input fits file pointer is
4755 not already null
4756
4757 - added check in ffcopy to make sure the output HDU does not
4758 already contain any keywords (it must be empty).
4759
4760 - modified ffgcls so that it does not test if each string column
4761 value equals the null string value if the null string value
4762 is longer than the width of the column.
4763
4764 - fixed bug in ftgtdm that caused it to fail if the TDIMn
4765 keyword did not exist in the FITS file
4766
4767 - modified testprog.c to include tests of keyword wildcards
4768 and the WCS coordinate transformation routines.
4769
4770 - added a test for 'EMX' in fitsio2.h so that cfitsio builds
4771 correctly on a PC running OS/2.
4772
4773 Version 1.11 - 04 Dec 1996
4774
4775 - modified the testprog.c program that is included with the
4776 distribution, so that the output FITS file is identical to
4777 that produced by the Fortran FITSIO test program.
4778
4779 - changed all instances of the 'extname' variable to 'extnm'
4780 to avoid a conflict with the -Dextname switch in cfortran.h
4781 on HP machines.
4782
4783 - in all the routines like ffi4fi1, which convert an array
4784 of values to integers just prior to writing them to the FITS
4785 file, the integer value is now rounded to the nearest integer
4786 rather than truncated. (ffi4fi1, ffi4fi2, ffi4fi4, etc)
4787
4788 - changed ffgcfl (and hence ffgcl) so that the input value
4789 of the logical array element is not changed if the corresponding
4790 FITS value is undefined.
4791
4792 - in ffgacl, the returned value of TBCOL was off by 1 (too small)
4793
4794 - fixed the comment of EXTNAME keyword to read 'binary table'
4795 instead of 'ASCII table' in the header of binary tables.
4796
4797 Version 1.101 - 17 Nov 1996
4798
4799 - Made major I/O efficiency improvements by adding internal buffers
4800 rather than directly reading or writing to disk. Access to
4801 columns in binary tables is now 50 - 150 times faster. Access to
4802 FITS image is also slightly faster.
4803
4804 - made significant speed improvements when reading numerical data
4805 in FITS ASCII tables by writing my own number parsing routines
4806 rather than using the sscanf C library routine. This change
4807 requires that the -lm argument now be included when linking
4808 a program that calls cfitsio (under UNIX).
4809
4810 - regrouped the source files into logically related sets of routines.
4811 The Makefile now runs much faster since every single routine is
4812 not split into a separate file.
4813
4814 - now use the memcpy function, rather than a 'for' loop in several
4815 places for added efficiency
4816
4817 - redesigned the low-level binary table read and write routines
4818 (ffpbytoff and ffgbytoff) for greater efficiency.
4819
4820 - added a new error status: 103 = too many open FITS files.
4821
4822 - added a 'extern "C"' statement around the function prototypes
4823 in fitsio.h, to support use of cfitsio by C++ compilers.
4824
4825 - fixed routines for writing or reading fixed-length substrings
4826 within a binary table ASCII column, with TFORM values of
4827 of the form 'rAw' where 'r' is the total width of the ASCII
4828 column and 'w' is the width of a substring within the column.
4829
4830 - no longer automatically rewrite the END card and following fill
4831 values if they are already correct.
4832
4833 - all the 'get keyword value and comment' routines have been changed
4834 so that the comment is not returned if the input pointer is NULL.
4835
4836 - added new routine to return the optimum number of tables rows
4837 that should be read or written at one time for optimum efficiency.
4838
4839 - modified the way numerical values in ASCII tables are parsed so
4840 that embedded spaces in the value are ignored, and implicit
4841 decimal points are now supported. (e.g, the string '123E 12'
4842 in a 'E10.2' format column will be interpreted as 1.23 * 10**12).
4843
4844 - modified ffpcl and ffgcl to support binary table columns of
4845 all datatype (added logical, bit, complex, and double complex)
4846
4847 - when writing numerical data to ASCII table columns, the ffpcl_
4848 routines now return an overflow error if a value is too large
4849 to be expressed in the column format.
4850
4851 - closed small memory leak in ffpcls.
4852
4853 - initialized the 'incre' variable in ffgcpr to eliminate compiler warning.
4854
4855 Version 1.04 - 17 Sept 1996
4856
4857 - added README.MacOS and cfitsio_mac.sit.hqx to the distribution
4858 to support the Mac platforms.
4859
4860 - fixed bug in ffpdfl that caused an EOF error (107) when a program
4861 creates a new extension that is an exact multiple of 2880 bytes long,
4862 AND the program does not write a value to the last element
4863 in the table or image.
4864
4865 - fixed bug in all the ffgsf* and ffgcv* routines which caused
4866 core dumps when reading null values in a table.
4867
4868 Version 1.03 - 20 August 1996
4869
4870 - added full support for reading and writing the C 'int'
4871 data type. This was a problem on Alpha/OSF where short,
4872 int, and long datatypes are 2, 4, and 8 bytes long, respectively.
4873
4874 - cleaned up the code in the byte-swapping routines.
4875
4876 - renamed the file 'longname.h' to 'longnam.h' to avoid conflict
4877 with a file with the same name in another unrelated package.
4878
4879 Version 1.02 - 15 August 1996
4880
4881 - ffgtbp was not correctly reading the THEAP keyword, hence would
4882 not correctly read variable length data in binary tables if
4883 the heap was not at the default starting location (i.e.,
4884 starting immediately after the fixed length table).
4885
4886 - now force the cbuff variable in ffpcl_ and ffgcl_ to be
4887 aligned on a double word boundary. Non-alignment can
4888 cause program to crash on some systems.
4889
4890 Version 1.01 - 12 August 1996
4891
4892 - initial public release