07/18/89 - JR - DB3.C Fixed bug in define_format(): forgot to copy format element name to allocated string--may cause FORMAT_ERROR during SHOWDB 07/24/89 - JR - DB4.C Problem in shbde() introduced when print_select() was modified to add NULL to string before print TEXT type-- producer_id doesn't display correctly with SHOWDB Fixed by changing producer_id from being STRUCT_VALUE_CODE, where each field was of type TEXT, to TEXT_VALUE_CODE. 07/26/89 - JR - DB3.C Modified error-handling routines in load_structure_definition so it will be callable from programs that do not access any database (for read/write/create, as in scanping.exe); old version set db->error_code & db->error_data--new version simply return the error code (since db may not be defined) - DB5.C Added line to error-handling routine in DBLOADSD so it sets db->error_data if an error was found during load_structure_definition (since the latter no longer does this). 08/15/89 - JR - DB1.C & DB0.C Modified DBSRCH by time supporting routines lock_on_time, search_for_profile_by_time, DSRCHGE, dir_search_GE_file, and search_for_block_by_time. Problem with old version: Because block time ranges are rounded to the nearest minute, DBSRCH may zero in too early on a block, when the profile with time equal to or greater than the desired time is still in the succeeding block--hence, locking on one profile too early. search_for_profile_by_time now signals this condition and lock_on_time makes the necessary adjustments. The directory searching functions had to be modified to return -1 only if all entries have keys > (not >=) to the key so search_for_profile_by_time can detect the above condition. For consistency, search_for_block_by_time uses this signal to further detect SEARCH_BEYOND_END conditions (that may have gone unflagged due to rounding). 09/22/89 - JR - DB1.C, DB5.C, DB7.C Modified DBGET, DBGET_F, get_profile_data and getf_profile_data to set no. of bytes/values returned to user to zero when an error condition is detected. (This seems especially useful in the case where the error is INVALID_TYPE_REQUEST, meaning the variable requested is not in the database.) 12/05/89 - JR - DB1.C Fixed bug in strcmp() statement of match_formats() function which unnecessarily caused FORMAT_ERROR when processing DEFINE_FORMAT statements in an external structure definition file. 02/15/90 - JR - DB5.C & DB6.C Revised to use lowercase on database file names to avoid problems with PC-NFS 04/12/90 - JR - DBPRINT.C print_select(): Fixed error in format string for complex missing 'g' 04/24/90 - JR - DB1.C added entry for no error in ERROR_CODE and DATA_CODE structures so get_name returns with a null string rather than a null pointer when the error and data numeric codes are not set (otherwise causes problems on Sun 4 when it tries to print a string at address NULL) 05/15/90 - JR - DB*.C added Eric and myself as authors 06/07/90 - JR - DB6.C DBENDBLK() - added check for empty profile directory prior to allocating memory (otherwise, get misleading INSUFFICIENT_MEMORY error if attempt to alloc 0 bytes) 06/13/90 - JR - DB1.C close_block(), load_block_strdef(), put_struct_def(): old version sometimes freed db->profile_dir or db->block_strdef without unsetting the db->*_loaded flag; on the pc, this causes memory to be clobbered and not reloaded with good data 06/18/90 - JR - DB2.C, DB6.C transferred the incrementing of block_hdr.block_nbytes from write_profile_dir() to DBENDPRF(); during database creation, the old version resulted in an underreporting of the block file size because write_profile_dir() is called after the last call to write_block_hdr()--causing the block header to record a smaller size, while the entry for that block in the block directory file was correct; during updates that cause the profile directory to be rewritten more than once, the old version would presumably have caused the block header and the block directory entry to eventually record a larger than actual file size. In any case, this field is not used for anything other than recordkeeping so such errors would be of no consequence. 06/26/90 - JR - DB5.C added DBGET STRUCTURE_DEF 06-29-90 - JR - DBDIR.C added Numerical Recipes copyright notice ------------------------------------------------------------------------------- 07/12/90 - JR - db6.c now uses tmpnam() to generate temporary data file name during database creation 07/27/90 - JR - db*.c: switch all UNIX I/O to standard I/O 08/02/90 - JR - db1.c: release_block(): added reset of db->struct_def to NULL if (db->struct_def == db->block_strdef) right before freeing db->block_strdef 09/20/90 - JR - *.c: reorganized into smaller modules to optimize for size the grouping is based primarily on access mode (create vs. read-only vs. update) all source files that are independent of the CODAS database have been renamed without the leading 'db' deleted unnecessary functions (create_file, flush_block_file, identify_ms_code, getline, skip_newline) 02/22/91 - JR - misc.c: changed bad return value of get_code from -1 to BADINT so can return negative values also - dbcreate.c, defstruc.c: modified test of get_code() result because of above change 91.09.20 - JR - dbshow.c: modified SHDB() to accept either a variable name or numeric code in response to the GET DATA--VARIABLE option 93/06/16 - JR - io_nc.c: changed decl. of c from char to int in strip_comments() and in get_quotation(); this may be a problem when porting to the SGI 93/10/12 - JR - dbcreate.c, dbopsrch.c: changed DBOPEN() and DBCREATE() so it won't replace the db_name arg with just the root part It's annoying to find the db_name stripped upon returning to the calling function. 95/08 - JR - added support for reading databases in non-HOST_ENVIRONMENT format: everytime a block file or block directory file is opened, the producer_host field is recorded in 2 new fields of the db structure, block_host and block_dir_host. Every time anything is read from a file, these fields are checked and, if needed, the appropriate byte swaps are done in place. Currently, this is limited to READ_ONLY accesses. The block directory header had to be modified: the unused5 field is now used to store producer_host (like in the block header). For existing databases loaded prior to this change, this field will be improperly set (all NULL); in such cases the program is set to assume that the block directory file is in HOST_ENVIRONMENT format and continues. If the assumption is wrong, then it will fail with the usual READ_ERROR. (This is how it behaved prior to these modifications.) 96/02/01 - EF - time_.c, dbshow.c: Modified get_ymdhms_time to accept "year decimal-day" as an alternative to Y M D H M S.