diff options
Diffstat (limited to 'doc/rev2.txt')
-rw-r--r-- | doc/rev2.txt | 7524 |
1 files changed, 7524 insertions, 0 deletions
diff --git a/doc/rev2.txt b/doc/rev2.txt new file mode 100644 index 00000000..1feda120 --- /dev/null +++ b/doc/rev2.txt @@ -0,0 +1,7524 @@ + +------------ +From: /usr/tody/ Thu 18:35:41 29-Dec-83 +Package: system +Title: software release notices (revisions) + +Task 'revisions' added to the system package. Please use to record all +revisions and modifications to a released package. It is not necessary +to record revisions to a package which is still under development and has +not yet been released. + +Usage is very similar to 'bugmail'. Type 'rev' to read all revision notices +added since your last 'rev'. Type 'rev package_name' to add a revision notice +for the named package. Note that '~e' can be typed while entering a revision +notice to edit the text that has been entered, just as '~v' is used in the UNIX +mail utility. + +------------ +From: /usr/tody/ Thu 18:41:47 29-Dec-83 +Package: cl +Title: config change + +Stack size increased from 1000 to 4000. Note that scripts are compiled onto +the stack, hence lots of stack space is needed to run large, nested scripts. +If you see a message something like "pc exceeds topcs", that means that the +control stack has overflowed; report it with bugmail system. + +------------ +From: /usr/tody/ Thu 19:14:32 29-Dec-83 +Package: system +Title: tail + +The task 'tail' has been modified to permit negative 'nlines'. If nlines is +positive (default), the last nlines lines of the file are printed. If nlines +is negative, the first nlines lines are skipped, then the remainder of the +file is printed. + +------------ +From: /usr/tody/ Mon 16:33:01 02-Jan-84 +Package: softools +Title: syntax bug in spp fixed + +The SPP would not recognize BEGIN and END statements unless they were +all alone on a line, i.e., comments were not permitted on the same line. +Edited lexical definition of XPP (xpp.l) and remade XPP. + +------------ +From: /usr/tody/ Mon 19:06:20 02-Jan-84 +Package: system +Title: full sysgen + +I did a full sysgen of the system today; the system libraries, the CL, +the SPP compiler, and the SYSTEM package were all recompiled. The value +of SZ_FNAME has been increased from 33 to 63, the value of SZ_PATHNAME +from 81 to 127. Several minor bugs were discovered in the process +(some of this stuff has not been recompiled for months and months). + +------------ +From: /usr/tody/ Mon 19:09:48 02-Jan-84 +Package: system +Title: system errors + +The system error handling code has been extensively revised. The error code +is now stored in the system error message file (lib$syserrmsg) on the same +line as the message. For example, + + 572 Out of memory + +whereas before we had + + Out of memory + +and where the error code is defined in <syserr.h> as + + define SYS_MFULL 572 + +This increases the reliability of message fetch significantly, and makes +it easy to leave lots of space for new messages, and to add new messages. + +A companion routine to "SYSERR (errcode)" was also added. The new routine +"SYSERRS (errcode, string)" looks up the error message string in the +system error message file and concatenates the user supplied string, +producing an error message of the form "errmsg (string)". The FILERR +routine is similar but I have never felt that it should be used outside +the FIO package, and I have replaced all non file i/o references to FILERR +with calls to SYSERRS. Additional routines, i.e., SYSERRI, may be added +in the future if needed. + +Any changes to the error codes in <syserr.h> require a full sysgen, which +is why I waited until now to make this revision. + +------------ +From: /usr/valdes/iraf/ Thu 10:17:56 05-Jan-84 +Package: xtools +Title: Bug fix in ranges + +The routine decode_ranges in ranges.x had a bug which did not allow proper +decoding. This bug has been fixed. If any further problems are noted +please check with me. The old version of ranges has been (temporarily) +saved as ranges.old.x. + +------------ +From: /usr/valdes/iraf/ Fri 11:06:02 06-Jan-84 +Package: xtools +Title: Bug fix in ranges + +decode_ranges +Additional info about bug fix in procedure decode_ranges in file ranges.x. + +The old version had incorrect braces. It turned everything into +a range. Thus, "1, 4, 7" became "1 - 4, 7 - MAXINT" +It also did not skip arbitrary delimiters after a '-'. Thus, "1 -, 8" +would be wrong. + +Old version: + # Get last limit of current range. + # Skip delimiters + while (IS_WHITE(str[ip]) || str[ip] == ',') + ip = ip + 1 + if (str[ip] == '-') { + ip = ip + 1 + if (ctoi (str, ip, last) == 0) + last = MAX_INT +---> } else if (IS_DIGIT(str[ip])) { # ,-n, + if (ctoi (str, ip, last) == 0) # can't happen + return (ERR) + } else + last = first + +The new version recognizes all the following cases: +"1, 3 5" = 1, 3, and 5 +"- 6" = 1 through 6 +"-" = 1 through MAX_INT +"1 ,, -, 7 , 9 -" = 1 through 7 and 9 through MAX_INT. +"1 - END" = 1 through MAX_INT + +The most useful form is "-" to denote all values. + +New version: + + # Get last limit of current range. + # Skip delimiters + while (IS_WHITE(str[ip]) || str[ip] == ',') + ip = ip + 1 + if (str[ip] == '-') { +---> while (IS_WHITE(str[ip]) || str[ip] == ',' || str[ip] == '-') + ip = ip + 1 + if (str[ip] == EOS) + last = MAX_INT +---> else if (IS_DIGIT(str[ip])) { + if (ctoi (str, ip, last) == 0) +---> last = MAX_INT +---> } else +---> return (ERR) + } else + last = first + +------------ +From: /usr/tody/ Fri 17:43:07 06-Jan-84 +Package: cl +Title: logout procedure + +The system logout script no longer attempts to delete the graphics +descriptor files if they do not exist, avoiding the warning message issued +by delete in verify mode. + +------------ +From: /usr/tody/ Fri 18:37:48 06-Jan-84 +Package: system +Title: new software development tools + +The softools package is now available. Currently, the package contains only +two programs, MAKE and XCOMPILE. Make talks directly to the UNIX make, +sending zero, one, or two arguments on to the UNIX make without modification. +This version of make will someday be replaced by a completely IRAF version. + +XCOMPILE is more sophisticated, attempting to provide a machine independent +compiler function at the CL level. Usage is as follows: + + xcompile (files) + +The following hidden parameters are provided: + + files = file1,file2 list of files to be compiled or linked + (xcompiler = xxc) name of OS compiler program + (output_file = first) name of executable output file + (optimize = yes) run the object code optimizer +(compile_only = no) produce only object modules + (fortran = no) keep fortran source + (libraries = none) list of user libraries to be referenced + (osflags = none) OS compiler flags + (debug = no) print but do not execute OS command + (verbose = no) print OS command for verification + (fname = ) + (syscmd = xxc -F -O file1 file2 -ldeboor -lxtools) + (file_list = /usr/irafx/tmp/xcr027809) + (mode = ql) + +Usage is straightforward and should be obvious to the experienced CL user, +given the above param declarations. There is one restriction; if a file +template is used, it should reference only files in the current directory. +Files in other directories should be referenced only by an OS pathname. +Libraries are referenced as a simple quoted list, i.e., + + xc file.x, lib='deboor,xtools' + +Special OS compiler flags may be passed via the osflags parameter, as in + + xc "file1,file2", os = '-S' + +If no output file is named and linking is to occur, the name of the process +file is taken from the name of the first file referenced by the files template. + +------------ +From: /usr/tody/ Sat 12:45:03 07-Jan-84 +Package: system +Title: 'bad mode spec' bug fixed + +I finally tracked down the bug that was causing the 'bad mode spec' +warning message on exit from a package. After a lengthy and abstruse +examination of the CL code, guess what it turned out to be -- the mode +parameter in the parameter file was actually bad!! The moral of the story +is, try not to overlook the obvious when tracking down a bug. Mode params +are treated a bit differently than other params by the CL, and I was assuming +that there was a bug having to do with that difference. + +------------ +From: /usr/tody/ Wed 09:19:51 11-Jan-84 +Package: system +Title: stdimage modified + +The device "iis70" has been renamed "iism70" throughout the system. +In particular, the environment definition stdimage has been changed to iism70. + +------------ +From: /usr/tody/ Wed 09:38:22 11-Jan-84 +Package: system +Title: magtape deallocation at logout time + +Bug fix; the device was being deallocated within IRAF but not within +UNIX, when automatically deallocated at logout time. Replaced task +"_mtdeallocate" by "deallocate" in lib$cllogout.cl. + +------------ +From: /usr/tody/ Wed 22:00:17 11-Jan-84 +Package: imio +Title: imdelete added + +The "imdelete(imagefile)" procedure has been added to the IMIO interface. +Use this to delete imagefiles, rather than "delete(imagefile)", which +currently leaves headerless pixel storage files lying about. + +------------ +From: /usr/valdes/iraf/ Fri 10:49:39 20-Jan-84 +Package: xtools +Title: New ranges + +The range parsing procedures have been rewritten, improved, and documented. +The main change is that the syntax allows both ranges and steps. Thus, +to select every third number in the range 1 to 15 the range string is +1-15x3 or -15x3. The documentation is in the source text and also +in the subdirectory doc. In addition to the original procedures-- +decode_range and get_next_number -- a new procedure -- is_in_range -- +returns a boolean value for whether the specified number is in the +range array. + +------------ +From: /usr/tody/ Wed 18:13:02 25-Jan-84 +Package: system +Title: llsq library + +Lawson's and Hanson's linear least squares routines have been compiled and +installed in the system library as the library "llsq". Reference the library +on the xcompile command line as "lib=llsq". See me for documentation. +Minor modifications to the software were necessary to remove i/o, and the +only record of the modifications is in the book describing the routines. + +------------ +From: /usr/tody/ Thu 13:53:38 26-Jan-84 +Package: system +Title: exception handlers + +The call given for a user exception handler in the crib sheet was in error +and has been fixed. A handler should return the entry point address of the +next handler to be executed, or the magic value X_IGNORE, as the second +argument rather than as the function value. The correct call is thus + + procedure user_exception_handler (exception, next_handler) + + begin + (handle exception) + next_handler = (old_handler or X_IGNORE) + end + +This is posted with a call of the form shown below. The value of +"old_handler" must be passed to the user handler to be returned as shown +above when the exception is handled. + + call xwhen (exception, user_exception_handler, old_handler) + +In general, handlers should be chained by saving the old_handler address +and passing it back to the system in each handler. This is the only way +that all handlers can be called when an exception occurs. + + In addition to the error in the crib sheet, there was a bug in ZXWHEN +which prevented chaining; this has been fixed and a new sysgen performed. + +------------ +From: /usr/tody/ Thu 14:24:08 26-Jan-84 +Package: imio +Title: bug in immap fixed + +The variable "mode" (the file access mode) was being used in place of +"acmode" (the image access mode) in several places, preventing special +image access mode NEW_COPY from being recognized. Sections of the code +for new copy images were therefore unreachable. Mode was changed to acmode +in several places, but the code has not yet been tested in NEW_COPY mode. + +------------ +From: /usr/tody/ Sun 12:58:32 29-Jan-84 +Package: fio,system +Title: file deletion + +It is now an error to attempt to delete a nonexistent file (previously, +such an attempt was silently ignored). + +------------ +From: /usr/tody/ Mon 11:14:00 30-Jan-84 +Package: system +Title: bug in errcode() + +The old errcode() procedure would return status OK if an error condition +was not actually in effect, making it unusable in error handlers. +Errcode now returns the integer error code of the last error posted. +Whenever an IFERR block is entered, the error code is cleared, i.e., +set to OK. The system error codes are defined in <syserr.h>. + +------------ +From: /usr/tody/ Mon 20:58:46 30-Jan-84 +Package: system,clio,softools +Title: bug in "xcompile" + +Several mods were made to fix a bug in xcompile. The bug was caused by +"files", called by xcompile to expand the list of files to be compiled or +linked. Files would always sort the file list; this was improper since +the first file has a special significance (it provides the default root +name of the output executable file). Revs: + + (1) FILES and PATHNAMES were modified by the addition of the hidden + parameter "sort", type boolean, default value "yes". + + (2) CLIO was modified by the addition of the procedure CLPOPNU (open + list unsorted) to the usual CLPOPN[IS]. + + (3) XCOMPILE no longer sorts either the files list or the libraries + list. + +------------ +From: /usr/tody/ Tue 22:19:50 31-Jan-84 +Package: system +Title: error recovery: file cleanup + +The file cleanup routine, called during error recovery, did not know the +difference between a "string" (sprintf or stropen) file and a normal file. +When error recovery occurred while a string was opened as a file, the +message "No write permission on file (StringFile)" would be given, misleading +one as to the the cause of the error. Fio$fio_cleanup.x was modified so +that it merely closes a string file, rather than trying to flush the output, +close, and sometimes delete the file. + +------------ +From: /usr/tody/ Fri 19:42:28 03-Feb-84 +Package: fio +Title: byte-oriented i/o + +The following procedures have been added to the FIO interface: + + areadb (fd, buffer, maxbytes, byte_offset) + awriteb (fd, buffer, nbytes, byte_offset) + nbytes = awaitb (fd) + +The old AREAD, AWRITE, and AWAIT are still available, are unchanged, and should +continue to be used for programs which can work in units of chars. The new +routines are identical except that they are byte-oriented, like the device +z-routines. Using these routines, byte-oriented asynchronous block i/o can +now be done in a device independent manner (i.e., as opposed to calling the +z-routines directly), with full error checking. + +------------ +From: /usr/tody/ Sun 12:06:41 05-Feb-84 +Package: system, tty +Title: New TTY package installed + +A completely new version of the TTY package has been installed, supplanting +the old interface. The new version interfaces directly to the UNIX termcap +file, which will be exported with IRAF. The termcap file concisely describes +the characteristics of many terminals, and is in wide use. This interface +change is not upward compatible; all programs which used the old TTY +interface must be modified. + +The system is configured for a system defined default terminal when you log +onto the CL (i.e., the VT100 on our systems). Default values are provided for +the following variables in the CL environment: + + terminal termcap name of terminal in use (i.e., vt100) + ttybaud baud rate for the terminal (9600) + ttynlines number of lines on the screen (24) + ttyncols number of chars per line (80) + termcap filename of termcap file (dev$termcap) + printer termcap name of default printer (i.e., imagen) + +PAGE, CLEAR, LPRINT, DELETE, etc. all use the new device independent TTY +interface. All programs which print tabular data on the terminal, i.e., ?, +lparam, etc. in the CL, use the environment variable ttyncols to format +the table. The line printer facilities are described in a separate revision +notice. + +If you are using a terminal other than the system default, system.stty +should be used to select the terminal. The command + + stty tek4012 + +for example, would change the values of the TTY environment variables +as required for the Tektronix 4012 series terminals. The command +"stty baud=1200" would tell the system that the baud rate is 1200, +for example when working over a modem (the system must know the baud +rate to be able to generate delays). STTY without any arguments prints +the terminal status. + +The TTY interface is described in tty$TTY.hlp, where tty="sys$tty/". + +------------ +From: /usr/tody/ Sun 12:36:20 05-Feb-84 +Package: system +Title: line printer interface + +The LPRINT task is now installed. LPRINT provides a device independent +line-printer interface. + +usage: + lprint (files) + +params: + files = *.x list of files to be printed + (device = printer) name of output device + (map_cc = yes) make unknown control chars printable + (header = yes) enable printing of header on each page + (mode = ql) + +examples: + program | lprint # direct output of program to printer + lprint "*.x,*.cl" # make package source listing + +If called with a file list, Lprint by default prints each file starting +on a new page and breaks pages, putting a one-line header at the top of +each page (like the UNIX pr). If used in a pipe, Lprint copies lines +of text to the printer, but does not break pages or print headers. Escape +sequences are still mapped, however. Page breaks and headers may be +disabled with the hidden parameter lprint.header. + +The following control characters have a special significance in text input +to Lprint (also to TYPE): + + FF=formfeed advance to new page + SO=<ctrl/n> begin standout mode + SI=<ctrl/o> end standout mode + +The TTY interface is used to translate such directives as required for the +device. Programs like HELP, MANPAGE, and LROFF insert these three directives +into output text to break pages and embolden text in a device independent +fashion. TTY is also used to determine whether tabs must be expanded, to +define the number of lines per printer page, the number of chars per line +(long lines are broken), and so on. + +The parameter lprint.device determines the printer device to be used. If +the value is the string "printer", the system defined default printer device +is used (defined in the environment). Some other printer may be explicitly +named if desired. For a printer to be accessible, there must be a termcap entry +for the device, and the device must be installed in the ZOPNLP printer device +table. The devices currently installed are "imagen" and "versatec". Output +for both devices is currently spooled and printed asynchronously. + +Low level interface routines installed in this release include the line +printer z-routines (os$zfiolp.c), and the device FIO open procedure LPOPEN, +source in "sys$system/lpopen.x". + +------------ +From: /usr/tody/ Sun 13:02:54 05-Feb-84 +Package: fio +Title: bug fixes + +The following bugs|restrictions were found and fixed in the process of +installing and testing the new TTY interface and LPRINT program: + + (1) If a binary file is opened in APPEND mode, and the file does + not exist, one will be created and opened for WRITE_ONLY access. + Previously, the file had to exist be be opened for appending. + This bug did not pertain to text files, which have a different + interface. + + (2) AREADB/AWRITEB: if file is a streaming (sequential only) file, + the offset parameter passed to the z-routine is now guaranteed + to be zero. The old routines were passing the offset argument + from FIO (which is nonzero) on the z-routine unchanged, and the + z-routine would perform an illegal seek (ignored on a streaming + device, but would cause a write error for the printer). + +------------ +From: /usr/tody/ Thu 19:35:24 09-Feb-84 +Package: os +Title: debug routine added to memory allocator + +A routine ZMEMCK has been added to the OS package to aid in debugging +programs which use dynamic memory. The operation of ZMEMCK is highly +system dependent. In the current implementation, the UNIX memory allocator +keeps a list of memory regions (malloc'ed buffers and other areas). +ZMEMCK traverses the list and prints the address and size in bytes (both +in octal) of each region, and tells whether or not the region is "busy" +(in use) or not. Only regions which have been released with "mfree" +will show up as not busy. If memory is corrupted, the list will be +trashed near the area of memory where the buffer overflow or underflow +occurred. SALLOC stack segments show up in the list as regions with +a length of 4004 (octal) bytes. + +------------ +From: /usr/tody/ Sun 20:33:43 12-Feb-84 +Package: system,memio,os +Title: bug fixes: malloc,realloc + +The MALLOC and REALLOC routines were checking for an ERR return, +while the OS routine ZMALOC and ZRALOC were returning the NULL pointer in +the event of an error. I added a third argument "status" to each z-routine, +returning OK or ERR, and changed malloc and realloc to properly check +the status parameter. + +------------ +From: /usr/tody/ Mon 13:17:56 13-Feb-84 +Package: fio +Title: asynchronous i/o + +Awrite/await bug: file size was being incremented by await when called after +a write. Ok, but the FIO buffer offset was being used by await to determine +the final offset as boffset+nbytes_written. This meant that FIO could not +keep track of the file size when writing a file using only awrite/await. + +I moved the updating of the file size into awrite, deleting it from await. +This is ok since it is an error if fewer bytes are written than requested. +A couple new test programs can be found in debug$afio.x. + +------------ +From: /usr/tody/ Tue 09:52:36 14-Feb-84 +Package: cl +Title: radix intrinsic function + +RADIX has been changed to format the operand as an unsigned integer for +non decimal output bases. Thus, "radix(-1,10)" produces "-1" as output, +whereas "radix(-1,8)" produces something like "37777777777". + +------------ +From: /usr/tody/ Wed 15:48:27 15-Feb-84 +Package: fio +Title: stropen bug fix + +Stropen had a bug when opening a string with read access. There was a loop +in the routine which searched for the EOS; the loop was infinite because +the input pointer was not being bumped. Fixed and did a new sysgen. + +------------ +From: /usr/tody/ Thu 16:28:44 16-Feb-84 +Package: softools +Title: lroff utility installed + +A preliminary version of the lroff utility has been installed +in the Softools package. This version does not break pages and +print page headers, but it is useful nonetheless. This is the +new version of Lroff, including support for standout mode, and +numbered section headers. + +The Troff font change escapes \fB, \fI, and \fR are recognized in help text. +The .nh or .NH directive is used for numbered sections. Output must be +passed through type, page, or lprint to make the font changes +"visible". The control chars SO (control-N) and SI (control-O) may be +inserted in text to be processed by one of the above output programs to turn +standout mode on and off. Processing of control directives is under +control of the new TTY interface and is quite device independent. + +------------ +From: /usr/tody/ Fri 00:05:03 17-Feb-84 +Package: system +Title: lprint modified + +Several hidden params were added to lprint. By default, pages are broken +only if the standard input is not redirected, i.e., if one or named files +are to be printed. It is now possible to explicitly specify that pages +are to be broken or not broken. If reading from the standard input, +a file name label string may be given, else the file name will appear as +"STDIN". + +------------ +From: /usr/tody/ Tue 19:55:57 21-Feb-84 +Package: fmtio +Title: gctol, lexnum mods + +The following modifications were made to the FMTIO routines gctol and +lexnum: + + (1) GCTOL would only recognize the B and X suffixes (for octal and + hex numbers) if the suffix chars were in lower case. The procedure + now recognizes the suffixes in either case. + + (2) LEXNUM is a lexical analysis routine which figures out whether a + string is an IRAF number, and if so, what kind (octal, decimal, real, + etc). The calling sequence is "lexnum (numstr, ip, nchars)". + Formerly, the IP arg was input only. Lexnum was changed to always + advance IP over any leading whitespace, so that the routine can + be used to find the start of a token as well as decide whether or + not it is a number. + +------------ +From: /usr/tody/ Tue 20:03:01 21-Feb-84 +Package: softools +Title: YACC compiler compiler now available for SPP + +The Yacc compiler has been modified to produce parsers in the SPP language, +and is now installed in softools (this was done because the prototype image +calculator needs a parser, as will the database tools, etc.) This is a full +implementation, and an SPP parser can be every bit as sophisticated as a C +parser, with a parser token value stack of arbitrary structures, the usual +error recovery tools, and so on. In combination with the Lexnum lexical +analysis routine (used to build lexical analysers), it is straightforward +to build compilers for sophisticated applications programs. + +The standard Yacc documentation remains valid; a list of differences in the +SPP version are given in "softools$yacc/README". A complete working example +of an SPP/Yacc algebraic desk calculator is given in "yacc/debug/dc.y". +This example resembles that given in the Yacc reference manual. + +------------ +From: /usr/davis/ Wed 13:15:40 22-Feb-84 +Package: dataio +Title: mtexamine + +The task mtexamine has been installed in the dataio package. Documentation +can be found in mtexamine.hlp. + +------------ +From: /usr/davis/ Wed 13:24:33 22-Feb-84 +Package: dataio +Title: rfits, pdsread, rcamera + +A bug was found and fixed in the error handling code of rfits, pdsread +and rcamera. When an error occurred in reading a tape file the +routines returned control to the main program without closing the file +in which the error was encountered. Any attempt to process the next +tape file in the list resulted in a "doubly_opened magtape" error +and an abort. + +------------ +From: /usr/tody/ Sun 13:12:12 26-Feb-84 +Package: system +Title: hidden param added to type, page + +The hidden parameter "device", default value "terminal", has been added to +the parameter files for the TYPE and PAGE utilities. This parameter may be +used to specify that output be processed according to a termcap entry other +than that for the terminal. I also added a termcap entry for the pseudodevice +"text", which is a device with no capabilities at all (i.e., the capabilities +of the final device are unknown). This is useful for removing standout mode +escapes from Lroff output, producing a pure text file as output. When +producing output for a device which cannot overstrike, embolden, etc., TTY +renders standout mode as upper case. Thus, to remove the standout mode +escapes from Lroff output, saving the result in a text file which can be +printed on any device or system: + + lroff file | type device=text, > textfile + +------------ +From: /usr/tody/ Wed 22:26:43 29-Feb-84 +Package: system +Title: name of LOC function changed to ZLOC + +The names of the LOC and LOCC functions (OS pkg) have been changed to +ZLOC and ZLOCC, to eliminate a library conflict with the NCAR function LOC. +Hopefully all references in the sys and pkg directory systems have been +found and modified. As far as I know, these functions have only been used +in system code thus far, so I doubt if anyone's code will be affected. + +------------ +From: /usr/tody/ Fri 22:14:43 02-Mar-84 +Package: softools +Title: xcompile modification + +The XCOMPILE utility has been modified to permit compilation of Fortran +source files without checking for undeclared variables and functions. +The old version would complain about undeclared variables, and stop the +compilation, whether the source file was SPP or F77. Now the checking +is only done for SPP sources. + +------------ +From: /usr/tody/ Mon 17:41:11 05-Mar-84 +Package: memio +Title: bug discovered and fixed + +Woops.. I missed a few occurrences of the function LOC in MEMIO (recall the +recent name change to ZLOC). Did not cause any problems because the old +object module for LOC was still in the system library, and would get +linked in in any case. Fixed memio routines; will leave old loc in library +until I am sure all occurences of the old function have been changed. + +------------ +From: /usr/tody/ Mon 18:44:02 05-Mar-84 +Package: softools +Title: bug fix in XCOMPILE + +XCOMPILE had the following bug: if asked to compile a nonexistent file "file.x" +when there was a file "file.f" in the directory, it would proceed to add the +file "file.f" to its list of intermediate Fortran files to be deleted, and +then delete the user's Fortran source! The program has been modified to check +for the existence of files. If a file does not exist, a warning is issued, +and the file name is not added to any of the internal lists. + +------------ +From: /usr/tody/ Wed 18:58:58 07-Mar-84 +Package: system +Title: magtape allocation bug fix + +The allocate task has been smartened up to determine when the drive has +been allocated outside of IRAF. If the OS error message "mt? already +allocated to..." appears, the IRAF system will no longer think that it +has successfully allocated the drive. Related mods: rewinding has been +made an option under control of a hidden param to deallocate. The argument +"rewind_tape" has been added to the argument list of the "mtdeallocate" +procedure in MTIO, and a sysgen performed. + +------------ +From: /usr/tody/ Wed 21:16:28 07-Mar-84 +Package: system +Title: match speeded up + +The pattern matching utility 'match' was noticeably slow when searching large +files or lists of files. I have speeded it up some by treating searching for +an alphanumeric string as a special case. A new pattern matching utility, +STRSEARCH, calling sequence identical to STRMATCH and PATMATCH, has been +added to FMTIO for searching for substrings that do not use metacharacters. +MATCH examines the pattern you give it and automatically determines the +most efficient searching procedure to use. A new hidden param 'metacharacters', +default =yes, was added to permit disabling pattern matching metacharacters +entirely. + +Comparative timings of the three procedures, searching for a simple string +in a list of 5000 full length lines: + + strsearch 9.4 sec, cpu + strmatch 43.5 sec + patmatch 66.1 sec + +Real timings, searching for a simple string in a 3711 line Fortran program: + + old 'match' 20.5 sec, cpu + new 'match' 7.8 sec + unix 'grep' 4.3 sec + unix 'egrep' 2.8 sec + +Hmm... Looks like we still have a ways to go, but a significant improvement +nonetheless. + +------------ +From: /usr/tody/ Sun 17:28:25 11-Mar-84 +Package: system +Title: LPRINT no longer spools versatec output + +LPRINT has been modified to write directly to the versatec (like the UNIX +VPR), rather than writing a spool file and disposing of it to the printer +when closed. This is desirable for making listings, in which case it is +inefficient to spool the output. If spooling of versatec output is desired, +run LPRINT with device=lpr; this is the versatec with spooling. Note that +in IRAF, pipes are a spooling mechanism (because they are temp files), +so spooling with device lpr is generally not necessary. + +------------ +From: /usr/tody/ Tue 15:22:34 13-Mar-84 +Package: fio +Title: 'access' modified + +The behavior of 'access' for the null string and for the standard files +has been modified slightly. The behavior for ordinary files is unchanged. +The new behavior is as follows: + + yes/no = access (fname, mode, type) + +If fname is the null string or a string containing only whitespace, access +returns NO (the file is not accessible). If fname is one of STDIN, STDOUT, +etc., and the mode and type are given as zero, the function returns YES. +If the mode and type arguments are given and a standard stream is named, +the mode and type must agree with those given by FSTATI or the function will +return NO. Thus, "STDIN" always exists, is accessible with mode READ_ONLY, +is of type BINARY_FILE when a task is run from the CL, and TEXT_FILE when +run in debug mode. + +------------ +From: /usr/tody/ Wed 19:58:26 14-Mar-84 +Package: fio +Title: tempfiles + +Previously if a tempfile were opened with mode TEMP_FILE and deleted +explicitly before task termination, the system would print a warning +message when it found (during the file cleanup which occurs at task +termination time) that it could not delete the file. File "fio$fsvtfn.x" +was modified to silently ignore files in the tempfile list which do +not exist at fio cleanup time. + +------------ +From: /usr/tody/ Wed 20:44:30 14-Mar-84 +Package: clio +Title: clcmd now flushes STDOUT + +The clcmd procedure, used by system utilities to send commands to the +CL, was modified to flush the standard output before sending the command. + + +------------ +From: /usr/davis/ Thu 14:51:22 15-Mar-84 +Package: dataio +Title: rcardimage, wcardimage mods + +Rcardimage and wcardimage can now read and write EBCDIC cardimage tapes +as well as ASCII tapes. + +------------ +From: /usr/tody/ Thu 22:55:09 15-Mar-84 +Package: vops +Title: bug fix in acht_b.c, efficiency enhancement in achtb_.c. + +Fixed a bug in the ".. to unsigned byte" type conversion vector primitives. +The npix argument, used as a loop counter, is a pointer variable and the +pointer was being used as the loop counter rather than the array length, +causing the output array to be overrun. While I was at it, I also modified +achtb_ to put the loop counter in a register for greater efficiency. + +------------ +From: /usr/davis/ Fri 15:32:29 16-Mar-84 +Package: dataio +Title: task reblock + +The task reblock has been added to the dataio package. Reblock can be +used to copy tape or disk files, optionally changing the blocking factor, +padding blocks and/or records or changing the density in the case of a +tape file. See directory /usr/irafx/pkg/dataio/reblock for documentation. + +------------ +From: /usr/tody/ Fri 17:46:57 16-Mar-84 +Package: imio +Title: imunmap bug fix + +When unmapping a new image which had never been written into, IMUNMAP +would attempt to close the pixel storage file even though it had never +been written into. The close is no longer attempted unless the pixel +storage file is open. + +------------ +From: /usr/davis/ Mon 14:56:31 19-Mar-84 +Package: dataio +Title: rfits bugfix + +A bug in reading FITS files with long headers has been fixed. FITS +header parameters with unknown keywords were being added to the user +area of the IRAF image header. However insufficient space was being +allocated to accomodate the EOS on the character string and the +buffer would occasionally overflow. + +------------ +From: /usr/davis/ Mon 15:07:44 19-Mar-84 +Package: dataio +Title: rfits mods + +Rfits now applies bscale and bzero to the integers on tape. If no output +data type is specified rfits selects one based on the bits per pixel on +tape and bscale and bzero. Rfits now initializes the coordinate trans- +formation parameters. + +------------ +From: /usr/tody/ Tue 19:40:19 20-Mar-84 +Package: system +Title: eprintf now flushes the standard output + +A call to flush STDOUT has been added to EPRINTF, so that warning messages +will be synchronized with interactive output. Note that writing to STDERR, +however (i.e. with putline), does not flush STDOUT. + +------------ +From: /usr/tody/ Sat 11:14:54 24-Mar-84 +Package: fmtio +Title: lexnum did not recognize indefs + +The LEXNUM procedure, used to lexically analyse a string to determine +if it is a number, did not recognize the special number "INDEF". +It now returns the token LEX_REAL when given INDEF as input. This bug +was discovered when trying to read a list containing indefinites using +SCANR or SCAND. The scan routines (and GCTOD) will now interpret INDEF +as a legal number with the value INDEFR, INDEFD, etc. depending on the +datatype requested. + +------------ +From: /usr/tody/ Sat 21:08:47 24-Mar-84 +Package: fmtio +Title: printf was not autoscaling properly + +The printf routines, when presented with a number which will not fit within +the given field width, are supposed to automatically decrease the precision +until the number fits, and if that fails, print out the number anyway in a +larger field (as opposed to printing "******" which is silly in a language +with free format i/o). This was not working when printing reals, i.e., +"%10g" would result in ********** when printing a very large or very small +number, because a real in E format would not fit in a field width of 10 +using the default precision (7 digits). The bug has been fixed and a format +of %Ng should work without overflowing the field for any N >= 7. + +------------ +From: /usr/tody/ Sun 22:55:37 25-Mar-84 +Package: system +Title: package reorganization + +The ultimate decomposition of the IMAGES package into subpackages has not +yet been defined. As a first step, the following changes have been made: + + [1] The graphics utilities have been moved out of images into a new + system package called PLOT. + + [2] A new images subpackage called TV has been created to hold all + programs having to do with the image display. The package name + TV is reasonably descriptive and has an unambiguous abbreviation. + +The utilities in the TV package have been reworked somewhat to more closely +resemble their expected final form. Type "help tv" for a brief description +of the contents of the package. + +------------ +From: /usr/tody/ Sun 23:06:25 25-Mar-84 +Package: plot +Title: new package PLOT + +Testing of the new plotting utilities introduced last week has now been +completed, and the three utilities are fully up. Note that new parameters +have been added to CONTOUR and SURFACE to give more control over the plot +(floor and ceiling levels can be specified, the number of contours can be +specified, and so on). + +GRAPH can now overplot several curves (lists or image sections), compute +projections, draw dashed lines, log scale the axes, annotate plots, and lots +more. Manual pages for all these utilities will be available soon. + +------------ +From: /usr/tody/ Mon 00:08:33 26-Mar-84 +Package: plot +Title: handy-dandy routines for plotting lines and columns of images + +Versions of the ever popular Forth/Camera routines PROW, PROWS, PCOL, +and PCOLS have been added to the PLOT package. These are implemented +as scripts calling GRAPH. GRAPH itself should be called if you want +to do anything fancy. + +------------ +From: /usr/tody/ Mon 10:08:34 26-Mar-84 +Package: utilities +Title: utilities package online + +The UTILITIES package has been brought online. UCASE and LCASE were moved +from the LISTS package into utilities. We are in the process of adding +TRANSLIT, DETAB, ENTAB, PRECESS, and AIRMASS. + +------------ +From: /usr/davis/ Mon 17:10:45 26-Mar-84 +Package: dataio +Title: tasks txtbin, bintxt + +The tasks txtbin and bintxt have been added to the dataio package. +Bintxt converts binary files containing only text to text files +and txtbin does the inverse. + +------------ +From: /usr/tody/ Mon 23:20:16 26-Mar-84 +Package: softools +Title: new task MKMANPAGE + +A new utility MKMANPAGE is available in softools. Use as follows: + + mkman taskname + +This copies the manual page template into the new file "taskname.hlp", +leaving you in the editor ready to fill in the blanks. + +------------ +From: /usr/davis/ Tue 13:15:17 27-Mar-84 +Package: utilities +Title: task translit + +The task translit has been added to the utilities package. Translit can +be used to delete or replace characters in text file(s). Documentation +in translit.hlp in the utilities directory. + +------------ +From: /usr/davis/ Tue 16:31:16 27-Mar-84 +Package: utilities +Title: tasks detab, entab + +Tasks detab and entab have been added to the utilities package. See +detab.hlp and entab.hlp for documentation. + +------------ +From: /usr/tody/ Wed 19:25:49 28-Mar-84 +Package: system +Title: HELP moved to system; package LOCAL added to root + +The HELP program has been moved into the system package, with the new +package LOCAL taking its place. LOCAL provides a place for users or +remote sites to add their own software, without having to modify the +system itself. It also provides a way to get software into the system +so that people can use it, without having to meet the strict standards +required for mainline software. + +------------ +From: /usr/tody/ Wed 19:29:25 28-Mar-84 +Package: local +Title: new utility URAND + +A new utility program URAND (uniform random number generator) has been +added to the UTILITIES package. URAND is particularly useful for generating +lists to test software. Try the example given in the manual page. + +------------ +From: /usr/tody/ Thu 01:27:13 29-Mar-84 +Package: os +Title: zfpath modified + +The calling sequence for the ZFPATH primitive has been changed from + + call zfpath (fname, pathname, maxch, status) +to + call zfpath (fname, pathname, maxch, isdir, status) + +If the "isdir" argument is XYES, the pathname returned by the primitive +will be a directory name, suitable for prepending to a file name to +generate a pathame for the file (i.e., on UNIX, the directory pathname +will have a '/' as the last character). + +------------ +From: /usr/tody/ Thu 01:30:38 29-Mar-84 +Package: system +Title: copy, rename modified; movefiles added + +The COPY and RENAME tasks in the system package have long been tricky +to use, because it was hard to predict when there had to be a $ in a +directory name. These programs have been smartened up so that they +will always know when a file is a directory. For example, + + copy files, '.' + +will suffice to copy the named files to the current directory on our +UNIX systems. + + copy file, lib + +would make a copy "lib" of the file "file", while + + copy files, lib + +would copy the named files to the lib$ directory (provided there is more +than one file matching the template). + +RENAME can no longer be used to move a list of files to another directory; +use MOVEFILES for that function instead. If RENAME is called with a list +of files, the default action is to change the root name of each file: + + rename 'task.*', newtask + +might be used to change 'task.cl' to 'newtask.cl', and 'task.par' to +'newtask.par', all in the same command. A hidden param makes it possible +to change the extension instead. If a single file is named, it is +simply renamed. + +MOVEFILES moves the named files to the destination directory. The destination +must be a directory or it will abort. A command like + + move '*.x', name + +will move the file the subdirectory 'name' if there is one; otherwise the +program looks for a logical directory 'name$' and if it finds one, moves +the files there (but not across file systems at present). + +------------ +From: /usr/davis/ Thu 15:33:40 29-Mar-84 +Package: xtools +Title: gstrsettab bugfix + +Gstrsettab has been fixed so that it will accept an arbitrary first tabstop +and tab size. + +------------ +From: /usr/tody/ Thu 22:26:21 29-Mar-84 +Package: cl +Title: fix to avoid deadlock when killing a nonexistent process + +The CL would sometimes get into a strange state where, in response to +a ctrl/c interrupt, it would try to kill a process which had already +been killed. Deadlock would occur waiting for the nonexistent process +to die; additional interrupts would only result in more attempts to kill +the nonexistent process. To be honest, I do not understand why this +happens in the first place, but nonetheless the OSKILL primitive has +been modified to detect and avoid this kind of deadlock. + +------------ +From: /usr/tody/ Wed 10:03:36 04-Apr-84 +Package: fmtio +Title: LEXNUM did not recognize INDEF at the end of a line + +LEXNUM was using streq to compare its input with "INDEF", thus the test +would return false if the input string was longer than 5 characters. +Replaced the call to streq with one to strncmp. Indefinites should now +be properly recognized in formatted input. + +------------ +From: /usr/tody/ Fri 11:25:31 06-Apr-84 +Package: plot +Title: bug in graphics output to batch devices + +We have been experiencing intermittent failures of the graphics programs +when writing to the batch devices (versatec, imagen). The problem has +been traced to the system metacode translators (Jan's Fortran programs), +which evidently create temporary files in the current directory. I modified +the IRAF interface to these routines to call them from /tmp, so that +the graphics software will not abort when used in someone else's directory. + +------------ +From: /usr/tody/ Thu 16:15:00 12-Apr-84 +Package: fio +Title: bug fix: stderr was being directed to stdgraph output + +The recent addition of the pseudofile STDGRAPH introduced a bug into +file i/o causing the standard error output to be directed to STDGRAPH +instead of STDERR. The current CL does not differentiate between STDOUT +and STDGRAPH for output, so the ultimate effect was to direct STDERR to +the same destination as STDOUT. The file clio.clstdio.x was edited to +fix the bug (a missing goto after the entry point for the pseudofile +stderr was causing control to pass to the entry point for stdgraph). + +------------ +From: /usr/tody/ Tue 16:39:09 17-Apr-84 +Package: imio +Title: readwrite access to an image trashes the user area + +When opening an existing image for read write access, specifying the +size of the user area as zero (because it does not need to be used by +the calling program) IMIO would read only the standard header, but +would then write out the full header at imunmap time. The user area +would thus be overwritten with uninitialized data. Immap was modified +to record the amount of header data actually read if opening an existing +image, and imunmap was modified to write only that amount out when updating +the header. + +------------ +From: /usr/tody/ Tue 16:43:55 17-Apr-84 +Package: mii +Title: bug fix in miipak + +The wrong array was being byte swapped in the call to bswaps. A simple +error, fixed by replacing the name of the unpacked data array (spp) by +the name of the packed array (mii). + +------------ +From: /usr/tody/ Thu 20:05:06 26-Apr-84 +Package: vops +Title: bug in ARAV, the rejection average procedure + +A bug in ARAV caused all pixels to be rejected in the first iteration +(it was never tested and never worked). + +------------ +From: /usr/tody/ Fri 13:41:26 27-Apr-84 +Package: system +Title: "sleep" task added to system package + +The new task system.sleep provides a means for generating delays. The +single integer argument specifies the number of seconds of delay desired. + +------------ +From: /usr/tody/ Tue 22:03:33 01-May-84 +Package: imio +Title: bug fixes + +Problems were reported accessing images of more than 2 dimensions: the data +was not being written into the image properly. The problem turned out to be +the routine which calculates the char offset into the image given the coords +of a line. The routine would use the size of axis 3 in the calculation when +it was supposed to be using 2. It would also use 2 when it was supposed to +be using 1, but we have not seen it up until now because the test images have +all been square. All programs which access images of 2 or more dimensions +should be relinked. + +A second problem, reported some time ago, was also fixed. Imdelete would +crash when trying to delete an image with a zero length header. Problem was +lack of a return statement or error checking in immap after call to imerr; +added return statement and it works fine now when there is a header read +error. + +------------ +From: /usr/davis/ Mon 13:12:38 07-May-84 +Package: dataio +Title: pdsread mods + +For the sake of uniformity the pdsread task in dataio has been renamed +rpds. Rpds now calculates the minimum and maximum data values in the +pds image and enters them in the header. + +------------ +From: /usr/davis/ Mon 13:41:38 07-May-84 +Package: dataio +Title: rcamera mods + +Rcamera now calculates the maximum and minimum data values in the camera +image and inserts these values in the IRAF image header. + +------------ +From: /usr/davis/ Mon 16:21:05 07-May-84 +Package: dataio +Title: rfits mods + +Rfits in the dataio package now calculates the data minimum and maximum +values and puts these in the IRAF image header. + +------------ +From: /usr/valdes/iraf/ Tue 10:52:31 08-May-84 +Package: system +Title: interpolator routine + +The image interpolator library /usr/irafx/math/interp has a clget routine +to select one of the interpolator types. The routine is called +clginterp. + + interpolator_type = clginterp (param) + + char param[ARB] + +The CL request the parameter param, which is a string type parameter. +The string is interpreted into one of the interpolator types in interpdef.h. +The possible strings including abbreviations are: + + nearest + linear + 3rd order poly + 5th order poly + cubic spline + +This routine is implemented using clgwrd and will set an error condition +if the input string does not match any of the allowed strings. + +------------ +From: /usr/davis/ Thu 17:58:52 10-May-84 +Package: dataio +Title: FITS writer + +Task wfits has been added to the dataio package. + +------------ +From: /usr/tody/ Fri 09:07:24 11-May-84 +Package: system +Title: count would not read from STDIN + +Count would no longer read from the standard input because of a recent change +to ACCESS. Deleted all the file type checking from COUNT; now it counts each +file in the list whether or not it is a text file, just like any other utility +which operates on a list of files. + +------------ +From: /usr/tody/ Fri 10:06:11 11-May-84 +Package: images +Title: imdelete now works in verify mode + +The IMDELETE utility has been modified to fix a bug in verify mode. +The code was using the old TTY routines and had to be modified to +open and close the termcap database. While I was at it, I modified the +SYSTEM.DELETE program to only access the termcap database in verify +mode, making noninteractive deletes more efficient. + +------------ +From: /usr/davis/ Wed 09:58:49 16-May-84 +Package: dataio +Title: rcamera bugfix + +A bug in rcamera resulting in picture that were shifted left one column +has been fixed. The problem was that rcamera was reading the first data +value as the last header value causing all the pixels to be offset by one. + +------------ +From: /usr/tody/ Fri 11:41:18 18-May-84 +Package: fio +Title: file fault bug fix + +FIO divides a binary file up into a sequence of segments the size of the file +buffer. When seeking to the very last char in a segment, FFAULT would fault +in the next segment, and then write the first char of data into the char +preceeding the first char of the buffer, overwriting the MEMIO header word. +When the buffer was subsequently deallocated MEMIO would detect the overwrite +and a fatal error would result. There was no problem when seeking (faulting) +to any other char in a segment. + +------------ +From: /usr/tody/ Mon 10:21:25 21-May-84 +Package: math +Title: bevington library installed + +The Bevington library has been installed in lib$ for our scientific users. +The limit on the number of datapoints the REGRES procedure can handle has +been increased from 100 to 1000 points. These routines should not be used +in serious software. + +------------ +From: /usr/tody/ Thu 13:15:47 24-May-84 +Package: softools +Title: bug fix in SPP compiler + +When called with the -F flag followed by one or more filenames and then +some libraries, i.e., + + xcompile file.x, fort+, lib=library + +which is translated to + + xc -F file.x -llibrary + +the compiler would not set the -o file because by the time it saw "file.x" +it thought it should only make the fortran. Fixed so that it always sets +the -o file if it sees a filename. + +------------ +From: /usr/tody/ Sat 12:47:10 26-May-84 +Package: system +Title: handy type coercion functions for booleans + +We often need to convert the return value from procedures like clgetb +into one of the integer values YES or NO, and vice versa. To make this +easier I have added the following functions to the system: + + bool = itob (integer_value) + int = btoi (boolean_value) + +------------ +From: /usr/tody/ Sat 12:58:24 26-May-84 +Package: system +Title: database package renamed + +The DATABASE package has been renamed DBMS (for database management system, +as in all the trade journals). This yields a package prefix of "db>" for +the package, and makes it possible to abbreviate DATAIO. + +------------ +From: /usr/tody/ Sat 16:55:06 26-May-84 +Package: system +Title: enhancements to HELP + +The HELP utility now handles paging of multiple help blocks or source files +(option op=source) properly. The original program would pause at the end +of every screen of text but not at the end of every help block or file. +The program also discriminates now between the "more" prompt at the end of +a screen of text and that at the end of a block or file. If one answers +no to the "more" prompt at the end of a screen, the rest of the block or file +in question is skipped, i.e., the program advances to the next block or file. +If no is given in response to the prompt at the end of a block or file, +HELP quits. + +Help blocks with multiple keywords are now handled a bit differently too. +A single help block may be referenced by several keywords in the help +directory; the same block will be printed regardless of which keyword the +user enters. Previously HELP would always use the first keyword as the +title name, producing an identical manual page regardless of the keyword +requested. Now the program prints a manual page named for the keyword +requested; and it just so happens that several keywords are linked to the +same manual page. An entry is made in the printed manual for each keyword +so that the user does not have to know what keyword to look under to find +the documentation. + +------------ +From: /usr/tody/ Tue 20:28:04 29-May-84 +Package: system +Title: more enhancements to HELP + +The following enhancements have been made to the HELP utility: + + [1] Help now generates "manual page" style output, if the standard + output is redirected and pagination is enabled. Just pipe the + Help output to Page or Lprint and Help will generate manpage + output by default. A command such as + + help 'package.*' | lprint + + will print all of the manual pages for the named package. + + [2] Help can now be run on a file or files not installed in the help + database. This is useful for developmental packages, for + specifications documents, and so on. The "file_template" switch, + if enabled, causes the template to be interpreted as a filename + template rather than as a module name template. For example, + + help doc$crib.hlp, f+ | lprint + + will print the current version of the crib sheet on the line printer. + +------------ +From: /usr/davis/ Mon 08:35:51 18-Jun-84 +Package: dataio +Title: reblock bugfix + +Reblock was not appending the tape file number to the input file correctly when +the parameter file list contained only a single entry. + +------------ +From: /usr/tody/ Tue 11:38:41 19-Jun-84 +Package: vops +Title: call to error removed from the ACHT routines + +The call to "error" has been removed from the ACHT routines so that they can +be called from Fortran programs (they are used in the new Fortran simple +interface to IRAF images). If an ACHT routine is called to convert to an +unknown datatype it does nothing. This is in keeping with the convention +that the string operators, vector operators, formatted i/o operators, and +math library routines be purely numerical procedures. + +------------ +From: /usr/tody/ Sat 16:33:03 23-Jun-84 +Package: vops +Title: interface modification + +The calling sequence of the ABAV (block average) vector operator has been +changed and the code has been internally modified. The new calling sequence +is + abav[silrdx] (a, b, nblocks, npix_per_block) + +and partial blocks are not permitted. Computation of the block sum is +carried out in enough precision internally to guarantee that there will be +no problems with overflow for the integer types. + +------------ +From: /usr/tody/ Sat 21:46:08 23-Jun-84 +Package: imio +Title: bug fix in IMIO + +When opening a new or new copy image the image dimensions were not getting +copied into the internal array IM_SVLEN, used in the IMIO code where the +full (non-section) image dimensions are required. IMIOFF was modified to +set this array when the dimensions of a new image are processed. + +------------ +From: /usr/tody/ Sun 18:41:04 24-Jun-84 +Package: memio +Title: error checking added to SALLOC + +The SALLOC procedure will now detect a bad datatype code (arg 3), producing +a fatal error. + +------------ +From: /usr/tody/ Tue 10:41:20 26-Jun-84 +Package: system +Title: minor mod to RENAME + +RENAME has been modified so that it queries for the old filename(s) before +the new name(s). The order of the queries now agrees with the order of the +positional parameters. + +------------ +From: /usr/hammond/iraf/ Tue 16:53:24 26-Jun-84 +Package: dataio +Title: new task installed: rrcopy + +Task "rrcopy" has been installed in the dataio package. This task will +read IPPS rasters stored on rcopy tapes and convert the rasters to IRAF +images. A rcopy format disk file can also be converted. + +------------ +From: /usr/hammond/iraf/ Tue 16:56:37 26-Jun-84 +Package: local +Title: new task installed: fields + +Task "fields" has been installed in the local package. This task is a +list processing tool used to extract whitespace separated fields from +the specified files. + +------------ + +------------ +From: /usr/davis/ Wed 08:31:28 27-Jun-84 +Package: dataio +Title: new parameter in dataio readers + +It is now possible to specify a tape file number offset in the dataio +tasks rpds, rfits, rcamera and rcardimage. The readers will begin begin +numbering the output files at "offset + tape file number" instead of +"tape file number as before". The offset parameter is useful in cases +where one wishes to maintain the same root output file name but read +from a different tape. + +------------ +From: /usr/tody/ Thu 17:49:07 28-Jun-84 +Package: fio +Title: file fault now zero-fills on a write-only file + +The file fault procedure was modified to zero the file buffer when +faulting "in" a block on a write only file. Previously the contents +of the file buffer were uninitialized and if the buffer was not completely +written into, garbage would be written out to the file. + +------------ +From: /usr/tody/ Mon 14:49:47 02-Jul-84 +Package: help +Title: bug fixes in HELP + +The following two bug fixes were made to the HELP utility: + + [1] File mode will now find unnamed help blocks, i.e., blocks + beginning with a ".help" not followed by a keyword. + + [2] Help block name keywords may now contain underscore as well + as alphanumeric characters. + +------------ +From: /usr/tody/ Mon 14:52:40 02-Jul-84 +Package: fio, imio +Title: optimization + +A number of small mods were made to FIO and IMIO to enchance efficiency. +No interface changes were involved. + +------------ +From: /usr/tody/ Tue 14:20:23 03-Jul-84 +Package: fio +Title: whitespace in filenames, numbered files + +The filename mapping procedure now deletes trailing whitespace from a +filename. It no longer maps numbered files, hence numbered files may +now be referenced just like any other file. + +------------ +From: /usr/tody/ Wed 16:44:53 04-Jul-84 +Package: images +Title: improvements to IMHEADER utility + +The IMHEADER utility program now accepts filename templates, and hence can be +used to print the headers of a list of images. There is both a long and a +short form. The name of the pixel storage file is printed, along with a note +telling whether or not the file exists. + +------------ +From: /usr/tody/ Thu 19:27:24 12-Jul-84 +Package: spp +Title: buffer space in compiler increased + +The size of the dynamic memory area in the RPP phase of the SPP compiler +has been increased to avoid the "in dsget: out of memory" compiler errors +we have been getting occasionally. + +------------ +From: /usr/tody/ Thu 19:38:04 12-Jul-84 +Package: plot +Title: GRAPH can now put image title on a plot + +If the parameter graph.title is set to "@imtitle" and the first operand in +the list of operands to be graphed is an image, GRAPH will now use the title +of the first image as the plot title. This has been changed to be the default +action. + +------------ +From: /usr/tody/ Thu 22:12:43 12-Jul-84 +Package: plot +Title: variable line widths + +The plotting interface to the versatec has been changed to permit variable +line widths. The appearance of plots on the versatec is much improved, +particularly the contour plots. Try it! + +------------ +From: /usr/tody/ Fri 21:21:38 13-Jul-84 +Package: plot +Title: new parameter for CONTOUR + +A new hidden parameter has been added to CONTOUR permitting a zero point +shift to be applied to the data before plotting. This makes it easy to +adjust the percentage of dashed (negative) contour lines in the plot. + +------------ +From: /usr/tody/ Thu 16:51:39 19-Jul-84 +Package: plot +Title: minor mods and bug fixes + +CONTOUR and SURFACE will now print a warning message if used to operate +on a very large subraster; possibly the user did not know about image +sections or forgot to use one. The warning message can be disabled with +the hidden parameter "verbose". GRAPH had a bug (now fixed) introduced by +the recent mod to use the image title as the default plot title. If called +to graph a list from the standard input, GRAPH would try to immap the input +operand (STDIN) and would discover that it was not an image, which is fine, +but then there would be no data left to plot since STDIN is sequential. + +------------ +From: /usr/tody/ Fri 10:41:45 20-Jul-84 +Package: cl +Title: new _curpack builtin + +A new builtin task "_curpack" has been added to the language package in the CL. +The function of this task is to print the name of the current package. Used by +HELP to order searches of the help database. + +------------ +From: /usr/tody/ Sun 22:41:02 22-Jul-84 +Package: mkmanpage +Title: now supports both CL format and SPP (procedure) formats + +The MKMANPAGE utility can now be used to generate manual page templates +for both CL programs and library procedures. Do an lparam for additional +details. + +------------ +From: /usr/tody/ Sun 22:43:44 22-Jul-84 +Package: xtools +Title: cleanup + +The XTOOLS package has been reorganized and the code cleaned up somewhat. +The package is now online in HELP too. The CLGINTERP routine has been +moved from math$interp into XTOOLS. + +------------ +From: /usr/tody/ Sun 22:46:07 22-Jul-84 +Package: help +Title: new relase of the HELP program + +The HELP program has undergone a major revision. Highlights include +pre-compilation of the help database, improved error diagnostics, +a much larger help database, and speedy response (but it still takes +forever to spawn the process the first time). Details will follow soon. +Try "help '*.', op=dir" or softools.hdbexamine for a peek at the database. + +------------ +From: /usr/tody/ Mon 19:28:52 23-Jul-84 +Package: cl +Title: dictionary size increased, process cache more efficient + +We had a dictionary overrun recently so I doubled the size of the CL +dictionary (which is currently fixed in size at startup time) from 7500 ints +to 15000 ints (60 Kb). This will permit more complex CL scripts to be run. +The stack area is also fixed in size but judging from the report I heard +it was the dictionary which was being overrun. + +While I was at it I made a mod to improve the efficiency of the process +cache. The process cache is no longer flushed when a command is sent to +the OS with a "!" escape. The improvement in response should be significant. +The process cache is still flushed by CHDIR or when the environment list +is modified. Both of these cases will be fixed in the future as well. + +The builtin command FLPRCACHE has been added to flush the process cache. +An explicit command to flush the process cache has been added to XCOMPILE +and MAKE to avoid a UNIX abort while trying to rebuild a process which is +sitting in the cache. There may be other times when this is a problem, +however; beware that the executable file is protected while the process is +running, and that an occasional "flpr" may be necessary to explicitly flush +the cache. The inconvience should be minor compared to the significant +improvement in response we should see for commonly used commands like dir, +clear, etc. + +In particular, the following will not work when a process is running: + + - The file cannot be written into, e.g., by COPY or even by + the UNIX "cp". + + - The process can be run under the debugger, but you cannot set + a breakpoint (cannot write into the executable file which + is mapped into memory). + +Beware of these sorts of problems, it can be hard to figure out what is +going on! + +Finally, a new intrinsic function STRIDX was added. Function is similar +to the program interface version. The EDIT script was recoded to use this +function, eliminating the use of a temporary file and speeding up EDIT a bit +(we still have a ways to go, though). +math/bevington/*.f + Changed illegal unix style continuation in several Fortran files to + Fortran continuation. + +math/llsq/sva.f + Fixed hollerith fields of format statements at end of procedure. + +sys/clio/zfiocl.x + Variable 'nchars' was multiply declared. + +sys/clio/clgfil.x + This file (and the FNTGFN code) was completely rewritten as noted + elsewhere in the revs notices. + +sys/fio/filopn.x + The VFN (mapping file) was being opened with read write access even + when the file was to be opened read only. This would cause an + unnecessary delay when multiple users would try to read from the + same file at the same time. + +sys/fio/vfnmap.x + Variable file_exists was never used in vfnmap due to the commenting + out of the .zmd file code. The declaration was commented out as well. + +sys/fio/fcopy.x + The call to fmkcopy would fail when the input file was a standard + stream. Changed to use fstdfile() to test for a standard file, + calling fmkcopy only if not a standard file. + +sys/fio/vfntrans.x + Escape character processing was mapping \X into X for all X, causing + file.\X extensions to in effect not be escaped (a later routine would + map the extension). Changed to allow escaping of the $ metacharacter + but no other, i.e., \$ maps to $ without logical directory expansion, + but \X maps to \X for all X != $. + +sys/fmtio/fmtstr.x +sys/fmtio/strtbl.x + Did away with the experimental ; in argument lists, using ',' instead. + This feature turned out not be useful and has been deleted from the + SPP language. + +sys/fmtio/strtbl.x + Modified to use STRSRT to sort the field list. + +sys/fmtio/fmt_setcol.x +sys/fmtio/fprfmt.x + Deleted declaration for unused variable 'i'. + +sys/gio/glabax/glbverify.x + Deleted commented out code used to test if log scaling made sense. + The associated function gt_linearity() was declared but never used, + causing a warning message. + +sys/gio/gtickr.x + Similar problem with variable 'nticks'. + +sys/gio/nspp/mcscale.x + min/max type mismatch fixed. + +sys/gio/cursor/grccommand.x + The unreachable code should have disappeard with the completion + of all the grccommand options, hence this routine was not changed. + +sys/gio/nsppkern/pwry.for + This routine was deleted when the new character generator was + intalled recently, hence the illegal \\ in fortran problem is gone. + +sys/mtio/mtupdlock.x + Could cause no write perm problem on tmp$ as temporary file name + "tmp$mtlok1234ll" was too long for VMS and would cause a mapping + file reference. Changed the "mtlock" to "mt" to eliminate the + mapping file reference. This is supposed to be a low level routine + (it is called by a FIO device driver) hence full filename mapping + is not desired here. + +sys/mtio/rewind.x + This was changed in the VMS version of IRAF because the SIRM + specified a channel number for the argument to ZZRWMT, rather than + the unit number used in the code. No changes were made as it + is the SIRM which is in error. REWIND takes as argument a drive + name such as "mta", rather than the file descriptor of an open file. + + call rewind ("mta") + + This permits rewinding of a drive which is not open, and + forbids rewinding of a drive which IS open. This consistent with + the philosophy of MTIO in which MTOPEN can only be used to access + a single file at a time. It is not safe to assume that a tape + drive can be rewound while opened to a particular file on the tape; + this does not work on some systems (e.g., AOS, at least as of 2 + years ago). + +sys/libc/mathc.c +lib/libc/libc.h,math.h + Found a way to eliminate the extra procedure call without adding + VMS dependence. The LIBC stuff is nearly machine independent and + we should strive to keep it so. The (&(x),&(y)) construct used + here (where x and y may be constants) is nonstandard C and should + be avoided. + +sys/libc/cfchdr.c + In the VMS version XOK was always returned since FCHDIR does not + return a function value. This is not right because FCHDIR takes + an error action if it cannot change the directory. I modified + c_fchdir() to error check FCHDIR and return ERR if an error occurs. + CHDIR in builtin.c checks for this function value. + +sys/libc/free.c + Reference to 'ptr' changed to 'buf'. + +sys/tty/ttyctrl.x + Remove declaration for unused variable 'i'. There were other + modifications to the TTY files as a result of the recent effort + to eliminate unix like filenames from the system directories. + +pkg/softools/boot/spp + Many changes here. The missing argument in errchk.f was fixed + a long time ago. There was also a missing argument in xppcode.c. + The 'elusive rpp bug' (jiand problem) was fixed some time ago. + Other changes for reordering declarations were reported in the + revs notices recently. + +pkg/softools/boot/spp/rpp/rpprat/lndict.r +pkg/softools/boot/spp/rpp/rpprat/outstr.r + The declarations for 'cupper' were deleted in the VMS version to + avoid a 'declareed but never used' warning message from the + compiler. This was an error because the integer function cupper() + is conditionally used in the body of the procedure if a switch + definition is defined in the rpp include file. I replaced the + declaration but put a conditional compilation around it to that + it would be declared only if used. + +pkg/cl/exec.c + There was a typo: operator '*' used where '&' was intended. + This was fixed some time ago but not recorded. + +pkg/cl/builtin.c + The error checking of the return value from c_fchdir was removed + in the VMS version due to a related change to c_fchdir(). I left + the error checking in for the reasons noted above. + +pkg/cl/pfiles.c + The operator '&&' was used where '&' was intended, resulting in a + nasty bug in pfcopyback(). The weak typing in C strikes again. + +sys/fmtio/parg.x + Changed the default precision of a %f from 1 decimal places to + full precision. The former default was causing numbers such as + "0.01" to be printed as "0.0". + +dev/graphcap + Added entries for vt100s,vt240,vt240o,vt100so from the VMS graphcap. + +dev/termcap + Added entries for printronix,qms from the VMS graphcap. + +dev/ + Added files edt.ed, emacs.ed. + +lib/cl.par + Made cosmetic changes as in the VMS version. + +lib/cllogout.cl + Commented out automatic magtape deallocation as in VMS. This has + caused problems for users multiply logged in, and greatly slows + down logout as well. + +lib/clpackage.cl + Added SET defs for "language", "showall", and "editor". Added + a "lexmodes = yes" to make command mode the default. + +lib/login.cl + Did NOT add the statement + + set logfile = uparm$logfile" + + because the logfile name is controlled by a CL parameter rather than + by an environment name. I do not understand why this set stmt was + present in the default VMS login.cl file. + +lig/make.h + Added a CFLAGS macro and a .c.o entry which uses it. + +lib/libc/ctype.h + Added #ifdef vms condtional to define "vms_ctype_defs" as a globalvalue. + Presumably this is necessary for the VMS C compiler to be able to link + in the initialization module ctype.o from the library. + +lib/libc/iraf.h + Added a def "UNIX42BSD" to specify the exact version of UNIX used on + the host system. Not yet used anywhere. + +lib/libc/kernel.h + Modifed plotter table entries for the NSPP devices to submit the + rasterization tasks as a reduced priority (UNIX only). + +lib/libc/[kx]names.h + Not modified - VMS needs a different version of these files. + +lib/libc/spp.h + Changed define of INDEFL for VMS, added VFN definitions. + +lib/libc/stdio.h + Modified getchar(), putchar() macros to use fgetc() and fputc(). + Don't know why this is necessary on VMS, but it cannot hurt and + these routines are used too infrequently for it to be worth worrying + about efficiency. + +pkg/help/ +pkg/help/lroff/ + There were a number of changes recently to make structure definitions + more portable, to eliminate ENTRY statements, and to avoid type + mismatches in argument lists. + +pkg/help/lroff/lroff.hlp + The documentation for ".in" incorrectly specifed the action as move + to col "n+1". Changed to move to "current+n". + +pkg/language/ + Moved in the entire VMS version of this directory to capture the + new manual pages therein. Deleted the junk file "words" from the + root directory. + +pkg/lists/ + Added the SDAS task "columns" to the package. Some source changes + were required, in particular the task was installed int the x_lists.e + executable to save disk space. Not tested. + +pkg/lists/words.x + The variable last_nscan was incorrectly declared to be a function. + +sys/gio/stdgraph/stg[gr]cur.x +sys/gio/stdgraph/stginit.x +sys/gio/cursor/grccmd.x + A new cursor mode option ":.cursor N" was added to allow the user + to select the logical device cursor to be used for cursor mode input. + The cursor may also be selected under program control by using GSETI + to set the desired cursor number and then calling GSCUR to set both + the cursor number and position. The kernel will continue to use the + indicated cursor so long as cursor reads request cursor number 0; + this is always the case for cursor mode cursor reads. For cursor + selection to work for STDGRAPH devices, the graphcap entry for RC + should be implemented as a case statement, with logical cursor numbers + of 1, 2, etc (see the entry for the device "vt640" for an example). + +sys/dev/graphcap.vt640 +sys/gio/stdgraph +sys/gio/cursor + More changes were required to support setting of logical cursors in + cursor mode. Setting a logical cursor with :.cursor now locks the + logical cursor until unlocked by a subsequent ":.cur 0" or ":.init", + i.e., the locked cursor N will always be referenced regardless of + the cursor number specified in a GIO call. + + In the process of debugging this feature a bug was discovered in + the stdgraph encoder. The encoder case statement ($1..$2..$$) was + not being processed correctly. + +sys/pkg/plot + A new task SHOWCAP was added to the PLOT package. SHOWCAP is used + to interactively inspect and check out graphcap entries. Complex + graphcap entries can be encoded and the output dumped in ASCII + (rather than graphically) to verify that the correct codes will be + are are being sent to the terminal. The task is implemented as an + interactive interpreter and is self documenting. + + SHOWCAP accesses the graphcap database like any graphics task, hence + any errors in the links to the database should be detectable by running + SHOWCAP. It may be necessary to relink both SHOWCAP and the CL to + make sure that both are using the same version of tty$cacheg.dat. + Graphcap entries may be cached in object form in libsys.a by running + the task MKTTYDATA in package softools, then rebuilding libsys.a. + +sys/osb/bytmov.s +sys/vops/lz/amov.s + The VAX memory copy instruction AMOVC3 cannot move more than 65K bytes + in a single call. All routines which use this instruction were + modified to check for very large blocks and to call AMOVC3 repeatedly + to copy such blocks in 65K or smaller segments. + +sys/etc/symtab/* ***** NEW PACKAGE!! ***** + A new system package SYMTAB was added to the system library libsys. + SYMTAB is a very general and efficient symbol table package for use + in IRAF system utilities, applications, and other places (possibly in + HELP for faster help database searches, or a future version of the CL + which implements macro expansion). + +sys/etc/environ.x + The hash function used in the environment package was replaced by the + function used in the new SYMTAB package, which is simpler and better. + +pkg/softools/* + This entire package has diverged so far from the UNIX version that I + have decided (for the present) to support two completely different + implementations of the SOFTOOLS tasks, one for VMS and one for + other systems. At some point this package will have to be cleaned + up and the existing (gawdawful) code thrown away. + +sys/fio/fmkdir.x +pkg/system/mkdir.x +sys/libc/cfmkdir.c + A new library procedure FMKDIR was added to the FIO package for + creating new directories. A new task MKDIR was added to the system + package to provide the same facility at the CL level. The FMKDIR + procedure was added to xnames.h and a new procedure c_fmkdir() + was added to the C runtime library. + +pkg/system/edit.* + The edit script was changed to pick up the name of the editor from + the environment, rather than from a parameter. This permits use of + a single global variable to select the editor everywhere. + +pkg/system/lprint.x + For reasons I don't understand (despite the comments in the code) + the VMS version of this task insists on a separate LPOPEN call + for each INPUT file to be printed. This does not make any sense - + it should not matter to the LP driver where the input is coming + from, or how many files input is coming from. Furthermore, printing + each file as a separate VMS print job (presumably with a separate + job header etc.) is a drastic change to the LPRINT utility which would + render it unusable for making listings of packages (a directory full + of files). The typical command to print a full listing of a package + is "lprint *.x,*.h,*.com": these files must be submitted to the system + as a single print job. + + I will check into this further when testing the merged system. + +pkg/system/stty.cl + Modified to permit setting the baud rate, screen size, etc. on the + same command line when the terminal type is set. STTY with no + arguments shows the status; STTY with any combination of arguments + sets the arguments. The VMS version of this mod was not quite + right, by the way, because hidden parameters are not counted in + $nargs. Hence a "stty baud=1200" has $nargs=0 (no positional args), + and "stty baud=1200" was being treated the same as "stty". + + Note: STTY should not be used in the login.cl file because it is + slow (it has to spawn the system process to access termcap). Use + explicit SET statements in the login.cl file instead, leaving STTY + for the interactive user. + +sys/Makelib +sys/gio/Makelib + Added entries for the system libraries libcur.a (cursor mode) and + libstg.a (the stdgraph kernel). These libraries are required to + link the CL hence are installed in the system library. I did not + add the library libgkt.a (NSPP kernel) because it is really just + a "pkg.a" type library, and is not used outside of the package. + Updating of this package shoud done by some sort of make facility, + since MKLIB cannot link and install the process. + +sys/fmtio/cto[il].x + I agree that CTOI and CTOL should have the same semantics and that + neither should call GCTOL, which is different. Rather than + implement CTOI as a call to CTOL I have simply duplicated the same + code in both CTOI and CTOL. One does not really save any memory + by having CTOI call CTOL because mostly likely a process will only + link in one or the other, and it will almost always be CTOI which + gets used. If CTOI calls CTOL then the result is something which + not only runs slower but which requires MORE core memory. CTOI, by + the way, was originally implemented as a call to GCTOL (like CTOL). + I wanted something simple and fast (formatted i/o is the slowest + thing around), hence I don't like the extra procedure call in this + context, even though I admit it is better software engineering (more + structured). + + I noticed in the VMS CTOL that the "if (str[ip] == 'I')" was + commented out, presumably because the code works the same whether + it is there or not. The reason it is there is for efficiency - + it is much faster to compare two integers and branch than to + call an external procedure like STRNCMP. The test for 'I' eliminates + the call to STRNCMP in virtually all calls to CTOL, since indefinite + numbers are rare. + + By the way, I noticed that the new version of CTOI did use the new + IS_INDEF macros, which indicates that somebody out there in VMS land + reads the revs notices pretty carefully. Good show. + +sys/fmtio/* + All occurrences of (NNN == INDEF_) were replaced by equivalent + IS_INDEF constructs. Probably still a lot of the old constructs + left in the other parts of the system. + +sys/libc/ato[il].c + These LIBC procedures were NOT converted to calls to CTOI and CTOL. + Formatted i/o is a major consumer of cpu cycles and the original + C versions of ATOI and ATOL are optimal C code. The VMS version + of ATOI has to pack the numeric string, call CTOI which calls CTOL + which makes an unnecessary call to STRNCMP - 5 procedure calls where + formerly there was only one. The amount of memory saved is not + enough to be worth modifying an existing, functional library procedure, + even if it did not make things slower. + +sys/libc/calloc.c + The type coercion (char *)NULL added here and elsewhere is strange - + UNIX lint accepts just a NULL which is a legal pointer value in C + (see K&R pg. 192 and the example on pg. 97). The type coercion + added is probably harmless but should not be necessary - does the + VMS C compiler issue a warning message or something? If not and + the message is only from VMS lint, then we should leave the NULL + as is. I suspect that the VMS C does not realize that 0 is a special + number in C and is complaining about an integer to pointer assignment. + If that is the case, the problem is with the VMS C compiler and the + code should not be changed (unless we are forced to do something + because the compiler treats the "error" as fatal). + +sys/libc/cclose.c + Added error checking and function value. + +sys/libc/cnvtime.c + Move c_cnvdate out into a separate file. + +sys/libc/cenvget.c (and elsewhere) + It is common in C sources at many sites to declare C functions as + follows + + typespec + function_name (arglist) + + rather than as + + typespec function_name (arglist) + + This is done because [1] there are software tools, e.g., a cross + reference utility, which can only recognize a function declaration + of the first form, and [2] when editing the file, a "beginning of line" + pattern match will find the function declaration (rather than every + call to the function plus the declaration for the procedure itself). + The C syntax is so subtle that without this convention it is difficult + to find things in C source files containing many functions. + + If C had a PROCEDURE keyword like SPP then I would use the second + form, but since it does not and the ^func style is common in UNIX + land, I would like to keep things as in the first example. + +sys/libc/cenvget.c (and elsewhere) + I did not change the + + if (...) + return (a); + else + return (b); + + constructs to the form + + if (...) + return (a); + return (b); + + The first form is more readable and does not bother UNIX lint. Modern + compilers are smart enough to compile the same code in either case, + hence there is no efficiency gain in the second form. If the VMS C + compiler or lint complains it is in error and should be fixed (rather + than IRAF). + +sys/libc/cerror.c + Moved each procedure into a separate file. Added NCHARS as in VMS + version. Went one step further and changed all the "return(strlen())" + to "return (nchars)" since we now have the NCHARS. + +sys/libc/cread.c,cwrite.c + Did not replace the calls to c_erract and c_error by direct calls + to the SPP ERRACT and ERROR procedures. Since errors rarely occur + doing so does nothing to make the code go faster; no memory is + saved since c_erract is very small (5 longwords) and its size is + offset by the extra code needed to call the Fortran procedures by + reference. Also the code is prettier if the C binding is used. + +pkg/dataio/imtext/* + This task was found to be extremely inefficient and the output code + (ascii encoding) was rewritten, speeding the task up by more than a + factor of 10. + +sys/fio/putline.x + In the process of profiling the optimized version of WTEXTIMAGE it + was discovered that text file i/o is now dominating the timings (the + output text file is enormous). Examination of PUTLINE revealed that + it could be optimized substantially, hence the procedure was largely + rewritten. This is a major output procedure hence is worth careful + coding. I rewrote PUTLINE, speeding it up by more than a factor of 2. + +sys/os/zfiotx.c + Examination of the UNIX version of ZPUTTX revealed some considerable + inefficiencies. Every character was being compared to newline even + when it was known in advance that this was not necessary. Characters + were being output one at a time with PUTC. I moved the test for + newline outside the loop, making a loop where newline is checked for + and another where it is not. In the latter case data is now output + in a block without using PUTC. + +sys/libc/cxwhen.c + Moved c_xgmes() out into a separate file. + +sys/libc/fclose.c,fflush.c,fopen.c,etc. + Modified to make direct calls to the SPP procedures (as in the VMS + version) to eliminate the slight overhead involved in the extra call + to the procedures of the C binding. + +sys/libc/* + Did not modify these routines to use FGETC,FPUTC rather than GETC,PUTC, + since the inline macros are more efficient. Why was this changed for + VMS? If it was to save a little memory I think that is a bad tradeoff, + the amount of memory saved is insignificant and cpu cycles are usually + in shorter supply. + +sys/libc/system.c + Eliminated the call to c_oscmd to avoid an unnecessary and redundant + string unpack/pack operation. + +sys/osb/*.c + A number of procedures were changed in the VMS version of the system, + converting register variable declarations to register argument + declarations. I did not keep these mods as the resultant code is the + same in either case and I prefer the former style. + +sys/etc/main.x + A variable was placed in a fake common to defeat optimizations by + the VMS fortran compiler that would cause failure in a future magic + return from ZSVJMP during error recovery (a very subtle bug found + by Jay T. at STScI, after a great effort). + +sys/etc/qsort.x + The array argument x[nelem] where X and NELEM are both arguments would + cause a VMS Fortran runtime error when QSORT was called with NELEM=0 + (I am surprised that the compiler makes such a check at runtime). X is + now dimensioned ARB hence this error should no longer occur, even if + QSORT is called to sort an array of length 0. I did not add the test + for NELEM==0 since the routine as written will work for this limiting + case (the array X will never be referenced). + +sys/fio/rename.x + A change was made to this routine to force the host system dependent + mapped filename to come out a certain way. I did not keep the rev + because FIO does not guarantee that a filename will be mapped in a + certain way, and the external world should not depend upon names always + being mapped in a certain way. A change which would slow down rename + by a factor of two is not justified. + +sys/fio/vfnmap.x + A number of changes were made here to fix bugs which were independently + fixed on our UNIX system. In particular there was a bug where a null + length mapping file would be created when a VFN was opened for updating + but no update ever occurred. I fixed that independently some time ago + (apparently with fewer changes) and will wait and test my version of + the routine on VMS. + +sys/fio/vfntrans.x + It was not correct to remove the handling of \ escapes completely in + the routine which expands logical directory names. The problem was + fixed by having \$ map to $ as before (allowing $ in filenames), but + having all \C map to \C rather than C, preserving escaped filename + extensions. + +sys/fio/isdir.x + I did not add this routine to FIO, but may do so at some time in the + future if it proves useful enough (the name would have to be changed). + It was improper for the Makefile in IMAGES to refer to the routine + directly in the SYSTEM package, since SYSTEM is a package and not a + library (I was not aware of the reference to ISDIR in the IMAGES + makefile). The solution for the present is to duplicate the code in + both packages. There are an infinite number of routines that could + be added to the system libraries; the libraries must be kept small to + be comprehensible by programmers, hence I never add a procedure to a + library until it becomes clear that it is best to do so. + +sys/fio/fseti.x +sys/fio/fset.h +sys/os/zfiomt.c [UNIX] + A new fset option F_VALIDATE was added. This is used to validate the + contents of the active FIO buffer after a read error, in order to + try to recover at least part of the record. The caller must tell + FIO how many chars to validate. The next read will return the contents + of the buffer. The UNIX magtape driver routine ZZRDMT was also modified + to backspace a record and retry the read if a read error occurs. The + output buffer (usually the FIO buffer) is zeroed prior to the retry + to avoid garbage data in the buffer if error recovery is attempted. + My thinking is that the magtape drive will get partially through a + dma transfer, detect a parity error, and then abort the rest of the + dma transfer, in which case at least part of the buffer should be + valid. + + # If a read error occurs validate whatever is in the buffer + # and repeat the read, returning data from the validated + # buffer w/o any more io. + + iferr (status = read (magtape, outbuf, maxchars)) { + call fseti (magtape, F_VALIDATE, record_length_in_chars) + status = read (magtape, outbuf, maxchars) + } + + The caller must know the expected record length for this type of + error recovery to be successful. + +--------------------------- +CL2 integration +Phase 1: quick onceover of code and first compile. +--------------------------- + +Moved in new CL wholesale. +Deleted all junk files. +Inspected Makefile; looked up to date. + +Tried to compile the CL. Died on first file, "cl.x" (would not compile on +UNIX for some reason - I did not investigate). Looked therein and horror of +horrors, a hacked version of the IRAF Main. I do not want to support two +versions of this very important procedure, so I deleted the hacked version +so that The Real One will be pulled in from libsys. + +It looks like the hacked version of the iraf main was used to avoid the +reference to the library routine "cmain" in LIBC (a funny library reference +was required to link this module which perhaps caused problems on VMS). +I guess a better solution is needed, but it must not involve a second copy +of the iraf main. Doing so violates the LIBC interface, resulting in possible +failure of the CL whenever changes are made to the iraf VOS. + +Second try. + +Lots of error messages, shown below. Actions taken to fix each bug are shown +in parenthesis. + + *.c: CLDEBUG redefined everywhere +(-DCLDEBUG compiler flag removed in UNIX Makefile) + + grammar.y: 120: RETURN redefined + ./lexyy.c: 3: BEGIN redefined + ./ytab.h: 22: RETURN redefined + (etc) +(RETURN is also defined as an opcode in opcodes.h. BEGIN is an internal +(definition produced by YACC. Solution was to use Y_ consistently for all +(tokens in the parser. Incidentally, RETURN is also defined in eparam.h. +(Should have been called CR there, since CR is the standard ASCII name for +(that key). + + linker unsatisfied external: _AMOVI +(The CL used to have a C function called "amovi" in main.c. This was removed +(in the VMS version and a direct call to the VOS procedure AMOVI substituted +(instead, presumably in reponse to a library conflict on VMS caused by VMS +(not distinguishing between C and Fortran externals in libraries. This is a +(violation of the LIBC interface; I solved the problem by changing the name +(of the C function to "cl_amovi".) +( +(NOTE: the fact that we are doing this at all (playing with the ZSVJMP vector) +(is a subtle violation of the LIBC interface, more serious than the use of +(amovi, and should be changed (this one is my fault)). + + "gram.c", line 1116: + warning: struct/union or struct/union pointer required +(typo: misplaced parenthesis in statement 'curr = coderef(curr->c_args);' +(should have been 'curr = coderef(curr)->c_args;') + + "eparam.c", line 311: + warning: illegal combination of pointer and integer, op = + +It was not obvious what was causing this error, but I decided to postpone that +for the moment to clean up the EPARAM code. This code stands out in the CL +like a sore thumb, as it is written in a style completely different than the +rest of the CL (and at odds with the iraf standard). Even worse, the style +is not consistent as if several people with different coding styles had worked +on the code. Now that the code is written and people other than the original +author(s) have to maintain it, it must conform to the rest of the CL. + +(busy reworking eparam) + Added call to c_ttycdes to ttyexit() to close tty descriptor. + Old code was allocating a new tty descriptor on every call, + never returning old ones. + Replaced environment variables "standout" and "showall" by + the single variable "epinit". A name such as "standout" + has no obvious association with EPARAM and could easily + conflict with other names. For example, use SET declaration + "set epinit = nostandout showall" to disable standout and + enable showall. Additional parameters can easily be added + without cluttering the environment list. Usage is consistent + with "cminit", used to init cursor mode. + Simplified the code a bit in various spots; some pretty messy + stuff in there (admittedly the rest of the CL is messy too). + Obviously will have to check this when I get it running again + against the original version to see if it operates mostly the + same. + Added "ehinit" to give user control over EHIST. Current parameters + [no]standout, bol, eol. + +(now for edcap.c) + Warning message is now printed if editor is named for which an + edcap file cannot be found. + Input EDCAP format for keystrokes generalized. Now supports the more + readable ^X, \[befnrt] formats as well as octal escapes. + + GRIPE: The string editing facility is really tied into its use in + EPARAM and EHIST, with all sorts of changes occurring internally + to the values of global variables used by the calling program. + The string editor should have been coded as a self-contained, + general purpose subroutine that modifies a string using the EDCAP + screen editor interface. + +(edcap.c and eparam.c now cleaned up and compile with no errors. I am familiar +(with them now and ready to tune them when the CL runs (from looking at the +(code I am sure that some tuning will be necessary). The rest of the new +(code looks pretty good, with the exception of numerous ELSE clauses which +(are not connected to the preceding ifs. Try again to make the CL...) + + CL runs! Sill getting compile time warning messages, however. + The warning messages are as follows (numerous occurrences in several + files): + + "globals.c", lines 45-97 + warning: illegal combination of pointer and integer, op = + + The problem is statements like + + char array[] = "string"; + + which get converted by XSTR into + + char array[] = (&xstr[N]); + + This causes our compiler to issue a warning message and seems like + rather a dangerous construct (I am not even sure it is even legal). + The following is however ok: + + char *array = (&xstr[N]); + + I converted a few of the array[] to *array to avoid this class of + problem. The EDCAP initialization remained a problem; the question + is, is XSTR worth all this? It makes the compile go MUCH slower, + but how much memory does it really save? + + no xstr text data bss dec hex + 267264 56320 115556 439140 6b364 + xstr text data bss dec hex + 267264 55296 114832 437392 6ac90 + ----- ------ ------ + 1024 724 1748 + + For less than 2K I don't think its worth it. Bye bye xstr, at least + for now. For comparison, here is CL1.x (current version, no eparm): + + text data bss dec hex + cl1.x 237568 49152 109744 396464 60cb0 + + There was a time once when the CL fit in a 64K partition. Now the + CL grows by almost 64K every time we add a new feature! + +-------------------------- +Phase 2: Test and tune CL2 + +history.c + Removed the "#ifdef ST" dealing with the logfile. Put a compile time + switch called SHARELOG in config.h. Define this when history.c is + compiled if logfile sharing amongst processes is desired. + +BUG - system package is not getting defined at cl startup time + parser never sees the 'package' statement in system.cl + + Found it - in decl.c, the procedure procscript() tries to seek to the + beginning of the current line with the statement + + fseek (fp, ftell(fp), 0L); + + This is illegal in UNIX and in IRAF too, since LIBC emulates UNIX + with very few exceptions. What this does is seek to the current + position in the file; the file pointer is not moved. I think the VMS + kernel has a bug. The original SIRM specified that ZNOTTX returns + the offset of the current line, rather than of the next line; + I changed that long ago to be consistent with UNIX and other systems + and sent you all some mail noting the change. + + How many occurrences of this bug are there? + + decl.c: fseek(fp, ftell(fp), 0L); + decl.c: fseek (fp, posit, 0L); + + Only two in CL. Fixed; will fix VMS kernel later. + +BUG - in eparam. Eparam is not catching interrupts. When an interrupt occurs + eparam is simply interrupted, leaving the terminal with echoing turned + off in raw mode, reverse video, etc. Evidently the VMS text file + driver is turning off interrupts in raw mode, i.e., returning <ctrl/c> + to the program as a character rather than generating an interrupt. + Eparam 'knows' this and hence does not post an interrupt handler. + + The easiest fix is to change the UNIX text file driver to behave the + same way in raw mode. The problem is that editors generally work in + raw mode but do need to be able to catch interrupts. There are some + subtle problems to be solved to provide a nice interface that does + all this. I will make the following changes to the kernels to fix + the problem. + +********************************************************************* +Kernel change + + [1] The terminal is placed in raw mode when ZGETTX receives a request + to read 1 character (rather than, e.g., SZ_LINE characters). + In raw mode echoing is turned off, control codes are not mapped + by the OS driver (e.g. CR to newline on UNIX systems), *interrupt + is disabled and the interrupt code or codes are returned like + any other control characters*, and each character is returned as + it is typed, one at a time. + + [2] Raw mode is terminated when any of the following events occur: + + - When a ZGETTX call is issued to read more than a single + character. + + - When a special escape sequence is "output" with ZPUTTX. + The sequence is arbitrary and should be chosen such that + it does not conflict with the sequences used by the terminal. + The sequence is only recognized when passed as a record, + i.e., ZPUTTX checks for the sequence only if called to write + exactly the number of characters in the sequence. The sequence + is recognized and filtered out whether or not raw mode is in + effect. The actual escape sequence selected is "\e-rAw" + (5 characters) where \e signifies ESC (escape). + + Output of a newline no longer disables raw mode. This eliminates the + need to scan the output for occurrences of newline when raw mode is + in effect. + + +Raw mode is turned on and off by the character count, rather than by a +control function, so that the terminal interface may be totally data driven. +The result of a data driven mode switch is that a process may easily command +raw mode in a remote process or on a remote node in a network, without +complex special control codes. +********************************************************************* + + +os/zfiotx.c (UNIX) + Changed to disable interrupts during raw mode. + +sys/fio/fseti.x + If the operand FD is STDIN fseti(fd,F_RAW,NO) will now send the + sequence \e-rAw to STDOUT followed by a flush to immediately turn + raw mode off. If FD != STDIN but has write permission than the + sequence is sent to FD. + +lib/chars.h + Added a new define called INTCHAR to define the interrupt character + for SPP programs. + +sys/gio/stdgraph/stgrcur.x + Will now terminate the cursor read when INTCHAR is received. The old + interrupt handler was left in for the time being. Also added a + putline call to write two null to the terminal after turning raw mode + off with FSETI, to physically turn raw mode off in case the CL is + interrupted before normal iraf i/o to the terminal occurs. + +pkg/cl/builtin.c + Removed the ifdef vms around the beep, clear, etc. tasks. For the + moment the ifdef remains for the magtape allocation code but I will + get rid of that soon too. + +pkg/system/ + Removed the beep, clear, sleep, and time tasks from this package since + they have been moved into the CL language task. + +pkg/cl/edcap.c + Changed show_edithelp to sort the command list and print it in two + column format using STRTBL (like the package menus). This makes it + easier to find commands in the list, and duplicate entries (e.g., + several different ways of moving down) appear in the same place in + the table. + +pkg/cl/eparam.c + Displaying a large parameter set seemed slow, particularly when + toggling back and forth between the help screen and the parameters. + I tried to speed it up by optimizing the e_display_key routine to + output fewer characters; helped only a little. The name of + E_DISPLAY_KEY was changed to E_DRAWKEY to avoid a name conflict with + E_DISPLAY on systems that only keep 7 or 8 characters of a C identifier. + +pkg/cl/eparam.c + The action EPARAM takes when incorrect input is entered is as follows + (integer value entered for a boolean parameter): + + [1] message is printed at bottom of screen, says respond with + yes or no. + [2] I type anything. + [3] Screen is repainted, then immediately repainted again, + leaving the cursor positioned to the first parameter even + though I was several parameters into the set. + + I tried this on both the (unchanged) VMS system and on the UNIX version + of CL2, with the same results. Certainly this must not be the way + errors are supposed to be handled. + + I changed the error handling code to print the error message at the + bottom of the screen and ring the bell (IRAF uses the bell to bring + errors to the attention of the user), leaving the cursor at the + former keyline so that a different value can be entered. The error + message is limited to one line of text. + +(EPARAM seems to work pretty well now, although I have yet to test the rarely +(used features - multiline prompts, arrays, etc. Now lets have a look at +(EHIST). + + +History Editor +------------------------------------ + + I added an environment variable EHINIT to initialize the history editor, +with "standout", "nostandout", "bol", and "eol" forming the set of currently +recognized switches. If EHINIT is not defined at all then history editing +is turned off and the old CSH style history mechanism is in effect. +The history editor is quite useful for its most common function - editing one +line command blocks - but has some serious limitations, as noted below. +Please note that despite all the criticism recorded here, I feel that the +current history editor fulfills its primary function admirably and am quite +happy with it. + +The current history editor has two major problems: [1] it cannot emulate VI, +and [2], it is not useful for editing multiline command blocks. The editor +as coded knows that is an "insert mode" editor, rather than a "command mode" +editor or an editor which supports both modes. Hence I can prepare an EDCAP +file for part of VI but the commands never get executed, since they are not +escape sequences. There is no mechanism for switching between command and +insert mode, which VI requires. In VI one types "i", "a", "A", "o", "O", +"cw", "r", "s", etc. to insert, add, or change characters. Escape is used +to terminate insert mode and return to command mode. The current string +editor is always in insert mode (it doesn't know about modes). In VI there +is no undelete char, word, line, etc. Instead there is the much more powerful +"undo", which undoes the last modify command, no matter what kind of operation +it was. + +Despite the fact that ehist cannot emulate VI, I was able to prepare an insert +mode, control code type EDCAP file called "dev$vi.ed" which is easy for VI +users to learn to use but which does not emulate VI. This is acceptable for +editing single line history records. + +Editing of multiline command blocks does not work well enough to be useful. +True VI emulation is a must for this type of application. The help feature +does not work for history editing. Upon returning from help the current +line is drawn in the middle of the help text; if editing a command block, +only that one line is drawn and the rest of the block is editable but not +displayed. Tabs are common in command blocks but are not handled correctly +by the editor (they are treated as spaces - I added a klude fix to map them +into spaces so that at least the cursor will be positioned correctly). + +It would be nice if the command block to be edited could be printed at the +current position rather than at the bottom of the screen, although I realize +there are technical problems in doing this. Relative rather than absolute +cursor motions should solve the problem and are more efficient than absolute +cursor addressing. + +My impression from using the history editor and studying the code is that it +may have been a mistake to try to use the same editor for both EPARAM and +EHISTORY. The parameter editor is really quite a different beast, more of +a forms editor than a text editor. All that is really needed for EPARAM are +cursor motions and field replacement (and the help facility). + +I would like eventually to have a history editor which emulates VI and and be +used to edit multiline command blocks. We should strip the current EPARAM +code down, producing a compact package which is used only to edit CL parameter +sets. A general screen editing facility should be generated from scratch +which has no ties whatsoever to EPARAM (it could be called by EPARAM to edit +withing a single field - parameter value- if desired, but not to navigate +about a parameter set). The screen editor subroutine, e.g., SCREDIT, would +take as input a sequence of chars and produce a sequence of chars as output, +using a self contained screen editing capability to perform the transformation. + + scredit (in, out, start, editor) + + int in, out # input and output file descriptors + char start[] # defines initial cursor position + char editor[] # editor language to be used + +Here, IN and OUT are FIO file descriptors which in the case of the CL would +be associated with memory resident strings with STROPEN. START is a string +symbolically defining the position within the file (line, column) to which +the cursor is initially to be positioned. Without further study I cannot say +whether the same code should be used to support both command mode and insert +mode editor languages, or whether two separate codes should be used internally. + +The SCREDIT facility should be coded in SPP and placed in a system library +since it would be self contained and usable in any program, e.g., in a portable +IRAF text editor, or in a DBIO table editor. + +I suggest we leave EPARAM and EHIST much as they are now, for the moment. +I will add the string editor subroutine to the program interface as part +of the DBIO implementation. When this becomes available, the EPARAM and EHIST +code will be restructured to use the new facilities, and we will also be able +to start providing screen editing in the user interfaces to various IRAF +programs. In particular, we will then have a simple but useful text editor +as part of IRAF, usable on all IRAF systems (probably limited to small files, +e.g., < 100K) and usable to edit files resident on remote nodes accessed by +the kernel server (this is a problem we currently face with our network here). +--------------------------------------------------- + +Now we proceed on to the language features. + +1. Packages, Tasks, Parameters + + The CL handling of these checks out ok as far as I could determine. +I tried package loading and unloading, verified that package list was as it +should be, storage is being freed as it should be. The naming syntax +package.task.param.p_field works as it used to. Parameters may be used in +expressions and set in assigment statements as they used to. Have not yet +retested parameter indirection, but we have packages that use it so will +find out soon. + + +2. Expressions + + Simple expressions worked fine, however I did find some problems with +the more subtle forms; these are discussed below in the context of bug fixes. + + +3. Control Flow + + A goto with an undeclared label causes an access violation. Trying to +declare the label (with syntax "label:") caused a syntax error. FOR, BREAK, +NEXT check out. Haven't checked SWITCH CASE yet. + + +4. Procedures + + I could not get procedures to work at all, at least when entered +interactively from the terminal. Perhaps I will try again later, but this +feature is not needed at this point and I have little time. I always get +the message "illegal variable defn's". Typing in a procedure with null +arglist and no declarations caused "illegal parser state" after the "begin". +The declaration "int procedure junk()" was a syntax error. + + By the way, there are two reduce/reduce warnings in the grammar. In case +I don't have time to look into these, I should point out that these usually +indicate a serious problem in the grammar. Shift/reduce conflicts on the +other hand are normal and are no problem provided the precedences have been +defined properly. +------------------------------------- + +pkg/cl/gram.c + The following statements would fail with a syntax error: + + = gcur # cl parameter - global graphics cursor + + I can see that the recent introduction of declarations forces us to + reserve the type specifiers as keywords, else a declaration would + look like a task statement. I could not bring myself to change the + name of either the datatype "gcur" or the global cursor parameter + of the same name, so I built the damn things into the grammar. + I hate to do that but we would have a poorer user interface if we + used different names in the two contexts. Having to reference + "cl.gcur" is not acceptable. The keywords "gcur" and "imcur" are + now recognized in expressions, permitting both "= gcur" and statements + like "print (gcur // 'abc')". The form "gcur=" is however not + permitted. + +sys/clio/clreqpar.x + Changed the form of a runtime parameter request from "param=" to + "=param". Perhaps we can do away with the former type of statement + at some point, as it is no longer used anywhere. This was changed + at this time so that the CL will receive "=gcur" requests rather + than "gcur=" requests; the latter form will now cause a syntax error + since gcur is a keyword marking the start of a variable declaration. + +pkg/cl/grammar.y + The declarations syntax looks more complex than it ought to be. + The parser now has twice as many states as it used to. This is not + necessarily a problem but could indicate a "syntax error" prone + grammar and/or a slow grammar. The last time I profiled the CL the + parser turned out to be the biggest consumer of cpu cycles. + Just turn on yydebug and see how many states it visits to parse a + trivial statement and you will see why. + + NOTES on the grammar: + + [1] The form of an initializer should be "var = const" or + "var = { key=value [, key=value] }", i.e., there should + always be an '=' following the variable or array specifier + if there are any initializations, whether or not these + are compound. + + Always using '=' for initializations should simplify the + grammar, in addition to making the CL consistent with C + and SPP+. + + ------------------------------------------------------------ + [Added Later] On second thought I am not sure about this + one. I can see why the current syntax was chosen - it is + because the initializer is a list of assignments rather than + values as in C. The syntax is that of a structure with + initializers for the individual elements, although it does + not look like it when entered all on one line, e.g.: + + int param { + default = 0, (alias ??) + min = 0, + max = 1, + prompt = "prompt" + } + + I missed that earlier - I guess the syntax chosen is the best + after all. + ------------------------------------------------------------ + + [2] I note that "char" is being used to declare string variables. + This seems wrong; char is an integer datatype in SPP, as in C. + There should be an explicit "string" typespec corresponding + to type "s" in the parameter files. Note that SPP also has + a string type. Syntax, e.g., + + string alpha = "text" (1) + string beta[5] = { "a", "b", "c" } (2) + char zeta[100] = "text" (3) + + In case (1) the length of the alpha string variable is the + default, e.g., 64 chars. In case (2) BETA is an array of + strings, each of the default length. In case (3) ZETA is + a conventional character array as in SPP or C + (****** but the actual amount of storage allocated should + (****** be 101 chars, as in SPP). + + [3] It looked like the grammar included some support for array + constants, e.g., + + int array[n]; + + array = (1,2,3,4) (1) + + or + userproc (a, b, (1,2,3,4), c, de) (2) + + Case (1) assigns an array constant expression to an array + variable. Case (2) passes such a constant in an argument + list. If you folks are already doing that, congratulations, + it is a great idea. By the way, can the N in "[n]" be a + runtime variable or an argument, if "array" is a local variable? + + If we are going to support arrays and expressions involving + arrays in the language (and we already do), then clearly we + need to support array valued constants as well. + +-------------------------------------- +Run time testing +-------------------------------------- + +pkg/cl/builtin.c + Put checking for error status return back in chdir. + Deleted all the _static in the procedure declarations. Why bother? + Static procedures have caused portability problems, and as long as the + iraf procedure naming convention is followed (using a package prefix), + there should be no problem with name collisions with other externals. + Using static procedure names has one very real disadvantage, namely + you cannot debug these procedures normally with the debugger since + the symbol table info aint there no mo. + +pkg/cl/opcodes.c + Deleted all the "_static" and the #ifdef vms. Add an "o_" prefix + to all the opcode function names to avoid name collisions with other + externals. + +pkg/cl/config.h + Deleted the #ifdef vms definition for _static. + +lib/libc/libc.h + No change, just some comments while checking up on LIBC due to a bug. + There were a couple of things in the VMS libc which I did not keep: + defines for u_upkstr,u_upksize (not used anywhere, defined locally + in c_sppstr), and an #ifdef vms to define import_xnames. I suspect + the latter was just because someone got lazy - in any event, iraf + standard does not permit nested includes since I feel include file + dependencies are potentially very dangerous and should be evident + from looking at a file. Also, by avoiding nested includes, it is + easy to prepare the list of dependency files for the Makelib files. + +sys/fio/fstati.x + Was erroneously using "fp" rather than "ffp" when returning the value + of F_MAXBUFSIZE. + +sys/mtio/* +sys/os/zfiomt.c [UNIX] + The datatype of the "drive" argument to the MTIO zz-routines ZZOPMT + and ZZRWMT was changed from integer to character string. This is + consistent with all of the other ZOPEN procedures, and provides more + flexibility in how the drive is named. The magtape naming convention + was also changed slightly to reflect this change, e.g., if the magtape + is named as + + mta.1600[3] + + then file three of magtape unit A will be opened at 1600 bpi. The + former syntax was "mta1600[3]". The significance of the new syntax + is that everything between the "mt" and the "." (or EOS) comprises + the DRIVE string sent to the kernel to access a drive. The contents + of the DRIVE string are therefore no longer constrained to be "a", + "b", "c", etc. and the string may be used to convey additional + information. + + In particular (and this is the primary reason for the change), the + drive string may now contain a node name prefix, permitting use of + a drive on a remote node. For example, to reference logical unix A + on node "draco" (drive "draco@a") either of the following will work: + + mtdraco@a.1600[3] + mt.draco@a.1600[3] + + The syntax "draco@mta.1600[3]" would have been more pleasing and + more consistent with node names in filenames, but the original MTIO + specifications guaranteed that magtape names passed to MTOPEN must + begin with the prefix "mt", hence the former syntax was chosen. + Note that the usual magtape references "mta", "mtb", etc. are still + recognized (the "." delimiter after the "mt" is optional). + +-------------------------------------------------------------------------- +KERNEL CHANGES + +sys/os/zfiomt.c + Change the "drive" argument of procedures ZZOPMT and ZZRWMT from an + integer to a string. Change device table accordingly to permit + table lookup via string match. Use of "a", "b", etc. for logical + drives on a node is still recommended for consistency, although + additional flexibility is now possible. +-------------------------------------------------------------------------- + + +sys/osb/mii.x + Moved each procedure in this file into its own file to avoid loading + the whole thing in each image. Modified the low level routines + MIIPAK16, etc. to be self contained so that they can be called by + the user rather than load the entire package. This involved moving + the byte swapping code into these lower level procedures. + +sys/osb/bytmov.c + This routine had a bug which was never discovered since we use an + assembler version instead on the VAX. Rewritten to eliminate the bug. + +sys/gio/gopen.c +dev/graphcap + Added device "stdvdm" (alias "vdm") to the graphcap. VDM is the virtual + device metafile, used to spool graphics output in a file. GOPEN was + modified to accept "vdm" as an abbreviation for "stdvdm" and to use + a default file ("uparm$vdm") if stdvdm is not defined in the + environment. + +sys/gio/stdgraph/* + Replaced all calls to TTYCTRL with calls to STG_CTRL, to permit use + of graphcap encode/decode instructions in all graphcap entries. + +sys/etc/onentry.x + Bkg filename was not being packed before call to ZOPNTX. Noticed this + in passing; the standard onentry has never been tested as a means for + running iraf tasks in the background. + +------------------------------------------------------------------------------- +Commencing installation of networking software (package KI) +The KI is a sysgen option, not required for operation of iraf. +------------------------------------------------------------------------------- + +sys/ki/ + Added package KI (the kernel interface). + +sys/os/zfioks.c + Added a new device driver ZFIOKS, the kernel server device driver. + This driver is the iraf interface to the networking facilities + provided by the host system. + +sys/cl/prcache.c + Changed the names of the CONNECT and DISCONNECT procedures to PR_CONNECT + and PR_DISCONNECT. The unix networking system library includes a + connect procedure, causing a library conflict. + +lib/knet.h +lib/libc/knames.h +sys/*/*.x + Added <knet.h> to LIB and added includes of this file to all VOS + procedures which do kernel i/o. Added a KNET section to the C include + file <libc/knames.h>. These two include files determine whether or + not a system is to be configured with networking capabilities. + A system can be configured without networking simply by defined + "NOKNET" before knames.h is loaded in a C file and by commenting out + the defines in <knet.h>. + +sys/etc/main.x + The inchan, outchan, device, etc. arguments passed to the IRAF Main + by ZMAIN refer to the real kernel; if networking is used these must + refer to the kernel interface instead. A subroutine call was added + to map these values is networking is in use. This was done in such + a way that the kernel itself did not have to be modified. One of the + goals of the kernel interface design was that the KI shall require no + modifications to the kernel beyond the addition of the ZFIOKS driver. + +sys/etc/envnext.x,environ.x,Makelib + Two new procedures env_first and env_next were added to the environ + package to permit traversal of the environment list by external + programs. + +sys/etc/envscan.x + Changed to use stropen to open the input string as a file, so that + a string buffer containing many set statements may be processed in + a single call. + +sys/fio/getline.x + Getline was assuming that ZGETTX returns an EOS delimited string; + this just happened to be the case with the unix kernel, but is not + required by the si specs. Changed to EOS delimit the string using + the count returned by zgettx. + +sys/libc/ckimapc.c + Added ki_mapchan to LIBC to permit recovery of the host system channel + code or pid and node name in the CL, e.g., for "prcache" output. + Note that when the KI is in use KI channel numbers are returned to + the VOS rather than OS channel numbers. + +pkg/cl/prcache.c + Modified the prcache output display to print both the OS pid in both + decimal and hex and the node name. The display formatting was + improved to eliminate the blank area associated with the hex number. + This code will work the same whether or not the system is configured + with networking enabled. + + The information now printed for each process in the cache is the + following: + + [v] node@pid(pidX) bits processname + + where V is the VOS pid (a small integer, typically one digit), NODE is + the name of the node on which the process is running, PID is the host + pid in decimal, PIDx is the host pid in hex, BITS are the process + status bits (hibernating, running, etc.), and PROCESSNAME is the + name of the process. A process may be flushed or locked by referencing + either the number V or the name of a task in the process. + +dev/graphcap,termcap + Added a new kernel string type parameter DD to the entry for each + plotter or printer. This string is passed to the device driver at + device open time and replaces the device tables formerly given in + kernel.h (and should replace the table used in VMS as well). + + The scenario is as follows: the device open procedure GOPEN, LPOPEN, + etc. (or a graphics kernel such as the NSPP kernel) calls TTY to fetch + the graphcap or termcap entry for the device. The value of the + parameter DD is obtained and passed as the "osfn" argument to the + device open Z-routine, e.g, ZOPNPL or ZOPNLP. + + The syntax of the DD entry is determined by the device driver. For the + existing drivers I have adopted the following syntax: + + :DD=node@device,string,string,...: + + where the comma delimiter may be any character, the value being set by + the first alphanumeric character following the device name. The colon + character : may not be used in the entry, of course, because it is a + termcap metacharacter. The node name and delimiter are optional and + are removed from the string by the kernel interface; the z-routine sees + only the characters following the node delimter character @. + + The two logical nodes names "plot" and "print" are reserved for use to + identify the node to be used to process graphics output or print text. + The graphcap entries, for example, usually reference the "plot" node, + e.g., ":DD=plot@versatec,...". The plot node is identified in the host + name table dev$host (see KI documentation). If no node has the alias + "plot", the default node will be used instead, e.g., the local node. + +sys/tty + Given the above revision, it is no longer necessary to place any system + level information in the environment entries for devices - nobody made + use of that capability in any case. The name parsing code in TTY is + however harmless and will be left in for the time being (in fact I + extended the syntax for some reason before adopting the graphcap type + solution). + +sys/gio/nsppkern + Added support for the DD parameter. The value of this parameter is + now passed to ZOPNPL at device open time; formerly only the device + name string was passed. + +pkg/system/lprint.x + Ditto; added support for DD parameter. + +pkg/images/display/tv/iisopen.x +pkg/images/display/new/iism70/iisopen.x + (throwaway or prototype interfaces). Added explicit node reference + for the IIS so that the affected programs will work on all NOAO nodes. + This is good enough for these interfaces since they are due to be + replaced later this year. The only change required was to replace + the (explicit UNIX) pathname "/dev/iis" with "lyra@/dev/iis". + +lib/libc/kernel.h [UNIX] + The device tables for the plotter and printer devices were deleted + since this information has been moved to graphcap and termcap. + + [Probably there should be printcap, rather than putting the printers] + [in termcap, but that can wait... ] + + +----------------------------------------------------------------------------- +KERNEL CHANGE + +sys/os/zfiopl.c [UNIX] +sys/os/zfiolp.c [UNIX] + Kernel drivers rewritten to obtain plotter information from the ZOPN + argument rather than from the kernel.h table. +----------------------------------------------------------------------------- + +sys/tty/ttyopen.x + In the process of revising graphcap and termcap I found and removed + several unnecessary restrictions on the termcap format. Blank lines + are now permitted, a capability entry may now extend over several lines + and each line need no longer begin with a colon (leading whitespace on + each line is omitted), and the colon character may be included in an + entry via a conventional backslash escape \:. For some reason the + original UNIX termcap format was more restrictive but I see no reason + to preserve these restrictions. + +sys/gio/cursor + If the system failed to open a plotter subkernel during a :.snap the + graphics system would be left in a bad state. This would usually + happen when the user entered an invalid device name for the snap output. + Cursor mode will now recover properly from such an error. + +pkg/cl/builtin.c + Reinstalled builtin task "gflush"; this was lost when the new CL was + installed. + +pkg/cl/errs.c + Reinstalled call to XER_RESET in errs.c to initialize the error stack + when error recovery takes place (necessary since the iraf main is not + being allowed to do error recovery). There should be a LIBC mechanism + for doing this. + +pkg/cl/edcap.c + Had to turn off raw mode to print the editor keystrokes because UNIX + disables output processing of the newlines when in raw mode. IRAF + kernel drivers which have to do such output processing themselves + should also disable such processing when in raw mode, like UNIX. + +pkg/cl/main.c + Added a call to gflush to the shutdown procedure to flush graphics + output and terminate any graphics subkernels when the user logs out. + +pkg/cl/lexicon.c + Added some context mode logic to recognize [] as command mode + metacharacters only when they occur on the left hand side of an + assignment statement. Hence an array reference such as + + v[4] = 123 + + is legal in command mode, as is + + contour m74[*:8,*:8] + + A reference to an array element on the right hand side of an assignment + is legal since the rhs is interpreted in compute mode. An array + reference in an argument list or expression must be parenthesized to + be recognized as such, like *, /, etc. + +sys/gio/cursor/grcpage.x + The help cursor mode feature used to display a "[hit return to + continue]" message at the end of the help screen. This has been + changed to a more informative message which includes prompts for + the hidden keystrokes - in particular it is now easy to get cursor + mode help. + +sys/etc/main.x +sys/clio/clcache.x +sys/fmtio/clscan.x + Added parameter caching to CLIO. The iraf main now permits parameters + to be set on the command line when a task in invoked. If a parameter + is set on the command line when the task is invoked then CLIO will + automatically satisfy all CLGET requests with the cached value of the + parameter without generating a query. + + This is useful for tasks that have many (dozens of) parameters, since + all of the parameters with values set at task invocation time (e.g., + hidden params or params set on the command line) can be cached, + greatly reducing the number of runtime queries to the CL and speeding + task execution. This might save several seconds of clock time when + executing a task with a couple of dozen parameters, since handshaking + over the IPC is expensive. + + Parameter cacheing is implemented in CLIO using the new SYMTAB package, + providing efficient hash table lookup. This was probably not necessary + but I computed the object size overhead associated with using SYMTAB + and it probably only adds 1K or so (SYMTAB is compact). + + The iraf main command line syntax now permits both i/o redirection and + parameter set arguments of the form param=value and param[+-]. + Whitespace delimits arguments. Newline may be escaped for multiline + command blocks. + + For example: + + taskname 3 < $ 6 > mc\ + param1=value\ + param2+ + + This executes task "taskname" indicating that the stdin (pseudofile 3) + has been redirected in the parent (dummy $ filename), stdgraph (6) + is to be redirected by the iraf main to the file "mc", the value + of the parameter param1 is to be set to "value" (may be quoted) and + the value of param2 is to be set to "yes". In the case of a task with + many static parameters the CL will pass a command consisting of many + lines, but it takes only one IPC packet for the entire command block + hence all the parameters are set with no additional expense. + + ----------------------------------------------------------------------- + *** N O T E *** + None of this changes the semantics of CLIO in the slightest and the + changes are all internal. Note however that as soon as the revisions + are made in the CL all executables will have to be relinked before + they can be used with the new CL, or a syntax error will occur due to + the multiline command blocks. + ----------------------------------------------------------------------- + +pkg/cl/exec.c + Modified task execution via pr_connect() to support parameter cacheing. + The startup command is now a multiline command, hence all old + executables must be relinked. I expect that runtime parameter cacheing + will be a significant optimization, noticeable even for tasks with + only a half dozen or so arguments. + +pkg/cl/cl.x +pkg/cl/main.c + Modified to eliminate the reference to the LIBC procedure "c_main", + used to provide the ONENTRY procedure to gain control during process + startup. I moved the ONENTRY into cl.x instead, elimating the funny + backwards linking used formerly. The new configuration is straight- + forward and should be portable. + + At some point I would like to replace this construct by an emulation + of the K&R C main, i.e., with argc,argv. This would not be difficult + and would make it much easier to port C programs to the IRAF + environment. XC and MKLIB, for example, could be nice UNIX/C programs + (actually iraf programs internally) callable from either the host system + or the CL. This has been attempted in the VMS version of softools but + we do not have a good interface yet. + +pkg/cl/main.c + There has been a bug in the system for some time now that goes like + this: [1] interrupt, nothing happens; [2] interrupt again, CL complains + about unknown task `xmit', goes through error recovery; [3] IPC + protocol is trashed and syntax error occurs at next attempt to run + a task in the affected subprocess, [4] flpr and get write to IPC error + from child. I suspect this is due to the way PRPSIO (pseudofile i/o) + handles the input buffer; the buffer pointers are not updated until + sometime after the "xmit" command was first read, and an interrupt in + between states causes the XMIT directive to be read as data by the CL. + The fix was however not to modify PRPSIO, but to call F_CANCEL on the + t_in and t_out to the subprocess in ONINT when X_INT is sent to the + subprocess. + +pkg/cl/prcache.c + In pr_connect, the call to fprintf to format and output the startup + command to the subprocess was replaced by calls to fputc and fputs. + Fprintf has a builtin limit on the size of a %s string which could be + a problem in this application (due to the long list of parameter + assignments). Also, the flexibility of fprintf is not needed and + fputs is more efficient. + +pkg/cl/eparam.c + Recall that in raw mode, no output processing is performed hence + newlines are not converted into crlf. Modified the repaint code + to output \r\n instead of \n (switch to raw mode could also have + been used). + +pkg/cl/history.c + This code was assuming "ehistory" whenever a command beginning with + "ehi" was entered, regardless of the characters following the "ehi". + Hence a command such as "ehinit" would cause ehistory to be run + instead. Changed to do a rigorous match. Any abbreviation is + permitted, including "e", hence ehistory is a very privledged command + indeed (I guess that is what was intended, else the normal minimum + match would have been used instead). + +sys/ki/* +lib/chars.h + The network node delimiter was changed from @ to !, in response to a + request from STScI. Either metacharacter will do just as well, but + ! is a bit easier for a touch typist to type, is used for similar + purposes in other networking software, but is not used in filenames + on any of our major host systems. + +sys/fio/fntgfn.x + Removed the code for the !...! escape notation. The decision has been + made to not implement filename escapes using this notation. + Conventional backslash escapes will be used instead; the code for this + is already largely in place and all we really need to do is test it. + +pkg/system/edit.cl + Tried to write a version of the editor script which uses the new array + stuff to manipulate filename strings. I entered the declaration + + char fname[80] + + to define a character array for holding filename. Turns out the CL + understood an array of 80 strings, each of some default length. + This is supposed to be compatible with SPP? (see notes on string + variables earlier). + + Dropped out into the CL to try some things interactively, since it was + clear I do not understand the new features. Typed a "cl" to push a + new context on the stack; made some declarations; when I typed "bye" + I expected the variables to go away but they did not. Should have. + Tried it again with integer decls and those went away at the bye. + Cannot redeclare a variable within a block; I understand why but should + be able to. + + First decl or so worked but then I got a segmentation violation in + strcmp from paramfind. Did not look into it, perhaps it is a bug I + introduced into the CL. Repeated the experiment somewhat differently + and it worked fine. + + Logged out and back in to initialize things (ugh). Typed "char ss" + to get a char array. Tried "ss = 'abcdef'; =ss" which worked as + expected. Tried "=ss[3]" and it printed the entire string, rather + than just one char. Also, if the [3] is a string rather than char + index, it should have given an out of bounds error. + + Perhaps it was my own undoing (although I don't think I changed much + that could cause such problems), but even without the bugs I think + we have a serious problem here. We need to resolve the syntax and + semantics of these new features before they are released for people + to use. + + Here it is: + + char fname[80] + int i1, i2 + + while (fscan (file_list, fname) != EOF) { + # Determine starting and ending indices of filename. + i1 = 1 + for (i2=1; fname[i2] != 0; i2=i2+1) + if (fname[i2] == '!') + i1 = i2 + 1 + fname = substr (fname, i1, i2) + + # Call host system editor. (wanted to use fname[i1] + # in arglist but didn't dare). + + print ("!!", editor, " ", osflags, " ", fname) | cl + } + + (and I still haven't figured out how to strip node prefixes from + pathnames in the editor). + +---------------------------------------------------------------------------- +Snapshot of system sent to STScI +---------------------------------------------------------------------------- + +dev/graphcap + Set the multifile count parameter MF to one for the dicomed. + The default MF count (16) was causing overflow of the scratch area + since the dicomed frames can be very large. + +pkg/cl/main.c +pkg/cl/history.c + A bus error would occur during CL logout when attempting to close the + logfile. Removed the "ifdef ST" stuff in main.c (when !ST close_logfile + was being closed without the logfile name argument, causing the crash). + Also added error checking and a warning message to the open logfile + code in history.c, in case the logfile cannot be opened. + +sys/os/zfioks.c [UNIX] + The kernel server device driver was modified to post a handler for + X_IPC and X_INT during a read or write on a KS channel. If one of these + signals occurs while reading or writing a KS channel the signal is + caught and converted into an i/o error (status ERR) on the channel. + +sys/os/zfioks.c [UNIX] + The KS driver was further modified to use the user login to authenticate + on a remote node (formerly a fixed public login was used). The login + name and password are taken from a file ".irafhosts" in the user's home + directory on the local node. If this file is not found a similar file + in dev$ is read to obtain the name of a public login. The user may + instruct the system to query for the password rather than risk placing + their password in their .irafhosts file, even though the .irafhosts file + would normally be read protected. + + The format of the .irafhosts file is as follows: + + alias1 alias2 ... aliasN : loginname password + (etc.) + + If the host alias "*" is encountered the login name and password given + in that record are used. If the password "?" is encountered the actual + password is obtained by querying the user terminal (this will fail for + a batch job). Comments lines and blank lines are permitted. + + Since this mechanism is implemented at the OS device driver level it + is considered to be machine dependent, although it expected that a + similar mechanism will be used on non-UNIX IRAF hosts. + +sys/fio/fwatio.x + Modified to mark the file buffer empty if an error occurs on a file + write. If this is not done then close() will try again to flush the + buffer during error recovery, possibly causing error recursion. + +sys/ki/kbzard.x + Fixed a typo, ks_awrite was being called where ks_await was intended. + +sys/fio/awaitb.x + The fill code, used to pad reads out to an integral number of chars, + was being executed even if zawait returned ERR. + +sys/ki/kbzcls.x +sys/ki/ktzcls.x + Modified to not return a close status of ERR if the error bit is set on + the kernel server channel. Close is called during error recovery, and + close would post a second error before the error message associated with + the original read or write error was output. + +sys/ki/ksawait.x + In the event of an i/o error on the kernel server channel, was setting + the error bit on the channel when it should have been calling ki_error() + instead. Because of this the error recovery designed into the KI was + not being exercised. + +sys/ki/kghost.x + The syntax of the host name table was changed to a better form which + is also closer to the form of the irafhosts file. Formerly the format + of a line was + + node@server_startup : alias1 alias2 ... aliasN + + This was changed to + + alias1 alias2 ... aliasN : node@server_startup + + This is more logical since the server startup string is logically a + function of the node names. It is also simpler because the startup + string is delimited by EOL rather than colon, hence it is no longer + necessary to escape colons to include them in the startup string. + +(Rebuilt the image display task and tried it over the ethernet - worked as ) +(advertised. Speed is only slightly slower than a direct connection. ) + + + ******************************************* + *** EDIT *** + *** decent editor interface surfaces !! *** + ******************************************* + +pkg/cl/builtin.c +pkg/system/system.cl + Since the old edit.cl script converts vfn's into pathnames, and + pathnames now include nodenames, it is no longer possible with the + current script to edit files not in the current directory. The edit + script is glacially slow in any case, and offers a poor interface + to the host editor. EDIT has been changed to a builtin task with no + parameter file. The editor name is taken from the environment. + + The argument list is a list of strings. Each argument string is + filtered through FMAPFN to convert VFN's into OSFN's, and then + appended to the OSCMD string with a leading space. Most non-filename + strings are unaffected by the filename mapping, hence system dependent + arguments can be passed through to the host editor. Most importantly, + this interface allows the editor to be called up about as fast as an + OS escape or even a host command language call. + + To edit a list of files (note each file is a separate argument, unlike + most iraf commands): + + cl> ed file1 file2 file3 + + To edit via a template: + + cl> ed *.x + + Note that this template is merely a string to the editor interface, + i.e., it is expanded by the host editor rather than by IRAF. Filename + mapping is passing the character * on through unchanged - it is not + a VFN metachararacter. This is fast and (at least on UNIX) is a much + better interface to the host editor, since the host editor will retain + its context when called once to edit a set of files, but will lose its + context when called N times to edit N files. + +pkg/cl/builtin.c + A new task BACK has been added to the language package. BACK is used + in conjunction with CHDIR (aka cd) to return to the previous default + directory. BACK;BACK toggles between two directories. + +sys/libc/cfpath.c + Added C_FPATHNAME to the LIBC interface (req'd by BACK). + + NOTE -- It would be useful to be able to define "cd" as "chdir", + "pd" as "back", "pwd" as "cd;back", etc., etc., in one's login.cl + file. Given that we now have string pushback in FIO (ungetline) + and general hashed symbol table facilities (SYMTAB), little work + remains to implement DEFINE in the CL. Note that SYMTAB maintains + its database in a position independent form suitable for passing + to bkg CLs. + + BUT -- The semantics of the CL define facility, in particular the + scoping rules, have yet to be worked out. + +pkg/system/system.cl +pkg/system/help/* +pkg/help (defunct) + Moved the HELP directories from pkg$ to pkg$system. Merged x_help.e + into x_system.e. Hence, one executable now contains all of the + system tasks required by the typical user. The intention is that + the x_system.e process be locked in the process cache upon login. + HELP, DIRECTORY, TYPE, PAGE, etc. will then be perpetually available + without having to do a process spawn (although on a busy system + considerable pagein may be required if the process has been idle for + a while). + + TODO -- Rework HELP to use the new SYMTAB package to maintain the + help database. This will greatly speed up the database search, + the main efficiency bottleneck remaining in HELP. + + TODO -- All VMS IRAF process should have a large page fault cluster + (and large working set size) to decrease pagein time, due to the large + text segments involved. Shared libraries would be even better... + +lib/login.cl + Added commands to the default login.cl file to spawn the system proc + and lock it into the process cache (leaving 3 open slots). Also + cached pfiles for directory, help, type, and page. In combination + with runtime parameter cacheing and the fast edit this should produce + a noticeably faster system. + + NOTE -- The MKIRAF host system task should use (does use on UNIX) this + default login.cl file as input. When the new version of the system is + released we should request that all users run MKIRAF to insure that + all the new goodies are functional and that the user's old parameter + files do not cause problems. When installing a new version of the + system it is possible for a user's obsolete parameter file to test + as newer than the package parameter file, since the user's pfile is + updated continually. This can cause a task to abort myseriously with + no obvious connection to the pfile. + +pkg/system/doc/*.hlp + Changed all manual pages to reflect the recent change to command + mode as the default input mode of the CL. The SYNTAX of the command + in the USAGE section is given formally using parens, commas, and + square brackets (for optional args). This is arguable; perhaps the + parenthesis and commas should be dropped from the syntax. Only the + positional arguments are shown in the command syntax. The EXAMPLES + are given in command mode and typical abbreviations are permitted. + + (The System seemed noticeably more responsive when editing all these + (help files.) + + NOTE -- The new manual pages in the language package are written + in style inconsistent with that of the rest of IRAF (not SDAS). + They should either be brought into conformance with the rest of the + system, the standard manual page format should be amended, or some + combination of the above. + + NOTE -- All manual pages for the IRAF applications packages will be + updated within the next couple of weeks. + +BUG IN CL PARSER + While not strictly speaking a bug, this is a serious problem. The + CL recognizes "for", "next", etc. as keywords regardless of their + position in the input text. Use of these strings as parameter or + task name abbreviations or as data strings causes an EXTREMELY subtle + syntax error, which most users will be unable to cope with. Perhaps + some additional context sensitivity in the lexical input is required. + +pkg/cl/history.c + Using the existence of the "ehinit" environment variable to trigger + automatic editing of the recalled command is incorrect. If the user + does not wish to verify and/or edit when using the normal history + mechanism, they should still be able to define EHINIT to set the + parameters for EHISTORY. The solution was to change the history + code to autoedit recalled history records only if "ehinit" is defined + and the switch "verify" is included in its value string, e.g., + + set ehinit = "nostandout eol verify" + + If autoedit is not desired the verify keyword may be omitted, or + alternatively "noverify" may be substituted. + +pkg/cl/history.c + A long standing bug in the history mechanism was fixed. The bug would + cause a history record to be trashed every now and then; the record + would print as garbage and would be unrecoverable. The cause of the + bug was the fetch_history() function, which was unaware that it was + reading from a circular buffer. + +sys/gio/cursor/prpsio.x + Fixed a horrendous bug in PRPSIO that I am sure has been there for + months (the bug is still present in the old system; I have been working + at the system level for ages so was not aware of it). The bug would + cause the CL to hang up during error recovery following an interrupt + of a subprocess. It would be necessary to interrupt twice and then + flush the process from the cache, because the IPC protocol would be + trashed. + +BUG (unresolved) + Twice now the CL has gotten into a funny state where it can no longer + map any filename. This bug is NOT present in the old system. I have + not been able to trace the bug down yet (it does not happen very often), + but it is quite serious as the user must log out when it occurs. + The symptoms are misleading; it appears to be a bug with FILEWAIT but + in fact it is more serious. + +pkg/softools/make.cl + Changed to set IRAFDIR rather than IRAFLIB, since the makefiles now + build all pathnames using IRAFDIR. + +BUG (unresolved) + Once again, when a subprocess died, the CL (which was reading from the + process) was fed garbage input in the form of a single letter duplicated + many times. The lexical analyzer, given this input, tries to build a + very long identifier token and overflows its token buffer, corrupting + memory. This is awkward to fix since the standard LEX lexical analyser + does not do bounds checking. The best solution is probably to not use + LEX, but use a hand crafted lexical analyzer for compute mode (we are + already using one for command mode). YACC is useful, but LEX is + generally not worthwhile for production software. + + NOTE: Infinite error recursion occurs when a parser error occurs + causing error restart. The ERRLEV variable in main.c, used to detect + error recursion, is cleared just before the parser is called under + the assumption that error restart has completed. I have yet to find + any surefire way to detect and prevent error recursion. + +sys/os/zfmkdr.c [UNIX] + The MODEBITS are improper for a directory file. Replaced with a + mode value suitable for a directory file on UNIX. + +---------------------------------------------------------------------------- +Snapshot of system sent to ST. +Identical snapshot (minus binaries) saved in lyra!/tmp2/tody (for diffs). +---------------------------------------------------------------------------- + +sys/mtio/mtgetpos.x + The pointer "drive" was not being dereferenced as "Memc[drive]" in + two procedure calls. + +sys/ki/kopdpr.x + The node name of the second filename argument "bkgfile" was not + being stripped before the call to zopdpr to spawn a detached process + (e.g., bkg cl) on the local node. + +sys/mtio/*.x,Makelib +sys/os/zfiomt.c +sys/ki/(kiextnode.x,kzopmt.x,kignode.x) + The revised MTIO was tested and a number of bugs were found and fixed. + Since I already had to do that I went ahead and changed the drive name + syntax to + + node ! mt... + + The explicit test for a "mt" prefix to determine if a file is a MTIO + file or not (as is currently done in many of the DATAIO programs) is + now considered a violation of the MTIO interface. A new integer + function MTFILE has been added to the interface to perform this test + without need to build explicit knowledge of the filename syntax into an + applications program. + + YES|NO = mtfile (filename) + +-------------- +26 Aug 85 + +sys/gio/cursor/prpsio.x + When reading 0 chars from a stream, would return 0 as function value. + Changed to return EOF when 0 chars are read, since that is what the + caller expects. + +sys/mtio/mtalloc.x,mtdealloc.x + These routines were not dereferencing the pointer "drive". + +-------------- +27 Aug 85 + +sys/ki/kzwrmt.x + Was calling zawrbf when it should have been calling kzwrmt. + +sys/etc/(sysid.x,gethost.x,Makelib) + Added GETHOST; high level interface to zghost. + Added SYSID, used to format labels for various type of output, + e.g., plots. Returns a string which identifies the version of IRAF, + the user, the host machine, and the time and date. + SYSID should be used routinely to label science plots and other output. + +sys/etc/envscan.x + Envscan would truncate the value string at the first whitespace + encountered, even if the value string was quoted. This bug has been + lying there undiscovered since the code was first written. + +sys/fio/fmapfn.x +sys/fio/vfnmap.x + Modified FMAPFN to return a legal host system filename if the file + resides on the local node, i.e., the node name is stripped from the + osfn if the file is local. FPATHNAME should be called if an absolute + pathname, including node prefix, is desired. The packing action of + vfnmap was a nuisance here. Vfnmap was split into two procedures, + vfnmap (unchanged) and vfnmapu (vfnmap w/o packing of the osfn). + Fmapfn now calls vfnmapu to get an unpacked OS filename. (this packing + and unpacking is of course a mess - everything should be unpacked until + the kernel is called). + + [This bug was discovered when trying to edit with "ed lib$*.h" - the ] + [resultant unix command was "vi lyra!/tmp3/unix/lib/*.h" which would ] + [have worked were it not for the node prefix. ] + +--------------------- +28 Aug 85 + +sys/mtio/mtfilspec.x + The generalized magtape name syntax turns out not to be quite upward + compatible with the orignal syntax. An old name such as "mta1600" + must be given as "mta.1600". There is no good reason to subject the + users to such a forced change in the syntax, hence mtfilspec.x was + changed to be compatible with the old syntax while still permitting + general drive name strings. The new rule is: [1] if the first character + following the "mt" is a letter, the drive name is a sequence of letters + delimited by the first nonalpha; [2] if the first character following + the mt is not a letter, it is taken to be the drive name delimiter + character and characters are accumulated until the delimiter is + reached. + + The result is the obvious syntax, e.g.: + + mta, mta1600, mta1600[1], (etc.) # local node + or + node!mta, node!mta1600 # remote node + +sys/os/doc/os.hd + An error in the pathname for the logical directory doc was preventing + access to the OS manual pages via help. + + USAGE NOTE - When you recompile the help database you must flush the + system task (containing HELP) from the process cache before the + changes take effect (the old database may still be in a buffer in + the process memory). + +sys/fio/fwtacc.x + The file wait code was not correctly testing (via FINFO) for a file's + permanent access permissions before entering the wait loop to wait + for access to the file. + +lib/finfo.h + Added defines for the file permission bits. + +sys/clio/clcache.x + If a task has no pfile the CL will send its command line arguments + on in the command line passed to the IRAF main using the parameter + names "$1", "$2", etc. Modified parameter cacheing to support this + type of parameter to avoid unnecessary CL queries. + +------------------- +29 Aug 85 + +sys/imio/imrdpx.x +sys/imio/imwrpx.x + The computation of the max physical pixel index, used to check for + an out of bounds reference, was in error. + +-------------------- +30 Aug 85 + +sys/imio/db/idbpstr.x + A ficticious image header parameter "IM_NAXIS" was being set when + IM_NDIM was clearly intended. + +sys/tty/ttyputs.x + AND was being called with an argument of type CHAR. + +----------------- +3 Sep 85 + +------------------------------------------------------------------------------- +TODO * TODO * TODO * TODO * TODO * TODO * TODO * TODO * TODO * TODO * TODO +------------------------------------------------------------------------------- + This is a continuation of a bug report given earlier. I plan to fix + this sometime in Sep-Oct before releasing the new system (on UNIX) + for general use. + + The bug is the syntax error caused by use of reserved keywords in + expressions and argument lists. This happens with "gcur", "for", + "next", "min", "max", etc., etc. The solution is to add context + sensitivity to crackident(), the function used to turn idents into + keywords. When the parser recognizes a statement it will push a + new context and the lexical analyzer (crackident in this case) will + change its actions accordingly. + + +BUG (cl) + =gcur aborts with an `EOF while evaluating expression' when EOF is + returned in a cursor read. Should just return "EOF". I fixed this + already in the old system and will transfer the fix to the new CL. + + +---------------- +08 Sep 85 + +sys/fio/awaitb.x +sys/fio/await.x + This is not really a bug, but a logical inconsistency. AWAIT, when + called after an AREAD has completed, is supposed to zero fill the + last char of data if the number of bytes read was not enough to fill + a char. The filling operation was being performed in AWAITB instead + of AWAIT, but it does not make any sense for the byte oriented routine + to be zero filling chars. The zero fill code was moved from AWAITB + to AWAIT. + +----------------------- +17 Sep 85 + +lib/fio.h +fseti.x +prpsio.x + Raw mode to the terminal from a subprocess via the CL was not working, + it was never being turned on in PRPSIO. Added code to turn raw mode + on and off to PRPSIO. Moved define for RAWOFF from fseti.x to fio.h + so that it could be used both in fseti.x and prpsio.x. (tested) + +sys/gio/gki/gkigetwcs.x +sys/gio/cursor/gtrctrl.x + Discovered that APPEND mode (gopen) was never tested. In append mode + the subprocess reads the world coord information back from the CL via + the PSIOCTRL pseudofile. gki_getwcs had a bug; I also changed the + operation to return the WCS data without a header on the process CLIN, + which is easier than trying to return a SETWCS instruction via the + pseudofile, as the GIO specs state. Only system code uses the GETWCS + instruction so this mod should not affect any existing software. + +----------------------- +20 Sep 85 + +sys/etc/main.x + The main was calling clc_mark once and then calling clc_free after + each task call to free storage, without doing another mark. This + is illegal because clc_mark calls STMARK which creates a marker + in the symbol table. STFREE frees this marker; calling STFREE + again without another STMARK causes whatever was at the marker + position to be used as if it were a marker, causing the symbol + table pointers to be corrupted. The solution was to add a call + to mark after the call to free in the main, e.g., + + call clc_free (clc_marker) + call clc_mark (clc_marker) + + +------------------------ +27 Sep 85 + +pkg/softools/mktags.x + A new task MKTAGS was added to the softools package. This task will + find all procedures declared in a set of files, printing either + [1] a sorted listing giving for each procedure the name, source + file, line in the file, and the declaration, or [2] a "tags" database + file, used by VI to edit procedures rather than files. + + +------------------------ +8 Oct 85 + +sys/clio/gexfls.x + This file was moved from GIO to CLIO to avoid a library conflict. + The object module is referenced by code in libsys but formerly it + was archived in libex, which is searched before libsys at link time. + +sys/tty/ttyputs.x + PUTC was being called to write the value returned by the integer + function AND, causing an integer argument to be passed to a procedure + expecting a short integer argument. Changed the PUTC to PUTCI. + +------------------------ +9 Oct 85 + +sys/vops/absu.x +sys/vops/Makefile +sys/vops/vops.men +sys/vops/vops.syn +sys/vops/ak/Makelib + Added a new vector operator ABSU for block-summing a vector (like a + block average but not normalized). + +pkg/cl/config.h + The size of the CL dictionary was increased from 15000 to 20000 due + to dictionary overflow in a large script. + +pkg/cl/exec.c + The parameter cacheing code would pass the ")param" literal value of + an indirect parameter, rather than the value of the referenced + parameter. Changed to not cache parameters which are indirect. + +pkg/cl/opcodes.c + When testing the previous bug fix the CL crashed in debug mode due + to an invalid OT_STRING test inside an if(cldebug) block in procedure + o_inspect. Changed to ((p_type&OT_BASIC)==OT_STRING) which should + fix the problem. + +----------------------- +13 Oct 85 + +sys/ki/irafks.x + The kernel server would die on a segmentation violation when it + received a garbage datagram, due to lack of error checking on the + p_sbuflen parameter used to unpack the text buffer. Added a min(SZ_SBUF + to prevent this. + +sys/fio/fredir.x + Added a subprocedure FREDIRO which is like FREDIR, but redirects a + stream onto an already opened stream. (10/23) + +sys/os/zoscmd.c [UNIX] + Minor changes. Will print error message if stream cannot be + redirected. Uses fork instead of vfork when possible for a + little more speed. Moved some code to before the fork in the + hopes of making the apparent ZOSCMD related bug go away; I cannot + find anything wrong with the code nor make it fail in tests. + +sys/os/zpanic.c [UNIX] + Panic shutdown messages from bkg jobs are now echoed on the console + to provide a permanent record. + +sys/os/zmain.c [UNIX] + SIGTSTP is now ignored in bkg processes. Hopefully this will prevent + bkg jobs from being suspended when the CL is suspended. + +sys/os/zmain.c [UNIX] + Bkg processes are now spawned at a reduced priority. + +sys/os/zoscmd.c [UNIX] + The local files of the parent were being inherited by the child (SH), + causing OS commands to fail unpredictably due to no more file + descriptors. Added FCNTL calls to close files >=3 if exec succeeds. + (10/31) + +sys/osb/f77pak.f + OP was not getting set if the loop terminated without seeing the EOS. + (11/4) +---------- +Thu Nov 1 21:23:16 MST 1984 + +1. CL Modifications + + A new version of the system has been released on all three 4.2 BSD UNIX +vaxes at NOAO. The system has undergone major revisions, primarily to +remove UNIX dependencies in preparation for the port to VMS. A number +of enhancements have also been made in the process. Those modifications +or extensions of most interest to the user are summarized below. + +1.1 Process Cache: + + The process cache is the key to good interactive response. While the +operation of the process cache is completely automated and need not be +understood, the sophisticated user can obtain improved interactive response +by tuning the cache. + + prcache show what is in the cache + prcache task [,task] lock a task in the cache + flprcache flush cache (except locked tasks) + flprcache task [,task] unlock a task and remove from cache + +Where "task" is the name of a logical task, e.g. "directory". +When task A is present (locked) in the cache all tasks present in +the same physical process as task A are also cached (locked). +If one locks too many processes in the cache deadlock will occur. +Flushing a task from the cache initializes the process and may +fix certain classes of bugs. + +The process cache is no longer flushed when the current directory +is changed, when the environment changes (except when a +redefinition is uncovered by a bye), or when a task aborts. + + +1.2 Background Jobs: + + Background jobs are submitted by appending & to the command line, +as has always been the case. There is a limit on the number of +bkg jobs that can be running at any one time (currently 4). + + cmd & run command "cmd" in the background + jobs show status of background jobs + service service a query from the last bkg job + submitted + service N service a query from job N + kill N [,M,...] kill job number N + +A bkg job needing service (waiting for parameter input) will +timeout and abort after a set period of time (currently 3 hours). + + +1.3 I/O Redirection: + + Is now compatible with the cshell, e.g., >& to redirect both the +standard output and the standard error output, ditto |& and >>&. +The standard error output of an OS escape issued from a script +task or subprocess is now redirected properly, hence output from +XC and MAKE may be spooled. + + +1.4 OS Escapes: + + !command Now sends "command" to the shell defined by the UNIX + environment variable SHELL or to /bin/sh if SHELL is + not found. The cshell user can therefore now issue + + ! cmd >& spool & + + from within the CL. + + !!command Always sends the command to the Bourne shell (/bin/sh). + + +1.5 Timing Tasks + + The cpu and clock time consumed by a compiled task may now be +measured by prefixing the task name with a $, e.g.: + + set | $sort | $match tty | $count + +The times given are measured by the IRAF Main and hence do not +include the overhead of process initiation if it occurs. This +feature is currently only available for external compiled tasks. +It is not currently available for script tasks, intrinsic +functions, or builtin tasks. + + +1.6 Package Loading and Logout + + The original package loading protocol has returned without the +drawbacks of the original. When you type the name of a package +the package will become the "current package" (first package +searched when looking for a task), the prompt will change to +reflect the new current package, and a "bye" will be necessary +to return to the package. It is no longer necessary to issue +a whole series of "bye" commands to log out of the CL, just +type "logout". + + packages name the packages currently loaded + ?? print menus for all loaded packages + ?sys print menu for (e.g.) package 'sys' + +A package is "loaded" by typing its name, making the tasks +therein known to the CL. Any number of packages may be +simultaneously loaded and referenced without continually +changing the "current package". + +Programmers: use the new "clbye" in package script tasks in +place of "cl" if the "cl" is the last command in the file, +i.e., if there is no epilogue. This saves a file descriptor. +The function of "clbye" is otherwise completely identical to +that of "cl". + + +1.7 The Null File, Standard Streams + + IRAF now has a null file, known as "dev$null". This is useful +for discarding the output of commands. The null file may be +referenced anywhere an IRAF filename may be used. The special +files "STDIN", "STDOUT", and "STDERR" are also quite useful. +These reference the standard i/o streams of the task in which +they are found but may be used wherever an ordinary filename +would be used, including in compiled programs. + + +2. C Runtime Library + +3. New Process Control Facilities + +4. Environment Facilities + +5. Error Recovery + +6. File I/O Modifications + +7. Formatted I/O Modifications + +8. Bit and Byte Primitives + +9. Vector Operators + +10. Kernel Modifications + +11. Configuration Control Procedures + + +### Revision 1.1 Wed Oct 31 23:29:14 MST 1984 + +------------ +From: /u2/valdes/iraf/ Fri 13:49:39 02-Nov-84 +Package: system +Title: WIDSOUT: dataio and multispec packages + +The task 'toiids' in the multispec package has been moved to the +dataio package and renamed 'widsout'. It converts IRAF images to +IDSOUT text format. It is complementary to 'ridsout'. + +------------ +From: /u2/valdes/iraf/ Fri 13:54:22 02-Nov-84 +Package: plot +Title: _imaxes + +The task _imaxes, used in scripts dealing with the sizes and number of +dimensions in images, has been moved from the plot package to the images +package. The plot package automatically loads the images package now. +The reason for this change is that there are possible uses for _imaxes +in scripts, particularly in the imred package, which also use many of +the images tasks but rarely need any of the plot tasks. + +------------ +From: /u2/valdes/iraf/ Fri 13:58:48 02-Nov-84 +Package: images +Title: imcopy and imtransform + +The tasks imcopy and imtransform have been generalized to allow +multiple input and output image templates. The parameter names +are input and output respectively. Each image in the input list +is matched, in order, with each image name in the output list. If +the input image and output image are the same then the operation +is performed to a temporary file in tmp$ and, when the operation is complete, +the temporary file replaces the input image. Image sections are allowed +in the input list and are ignored in the output list. For simple +uses these tasks work just as they did before (except for the change +in the parameter names). This system is also used in imlinefit. + +A help entry is now available for imcopy. + +------------ +From: /u2/valdes/iraf/ Fri 14:05:18 02-Nov-84 +Package: generic +Title: new tasks colbckgrnd and chimages + +The new tasks colbckgrnd and chimages have been added. Colbckgrnd is +a companion to linebckgrnd. They apply imlinefit to determine and +subtract a line by line or column by column background for the specified +images. They supply a generalized form of a function available on the +CYBER. The task chimages is a script application of imcopy and imtransform +suitable for in place modifications of images. This task can trim, flip, +rotate, transpose, and subsample a list of images. The default function +can be set by the user to always perform the same function on the images +(such as a standard trim and rotation). Help entries are available for +these and other generic tasks. + +------------ +From: /u2/valdes/iraf/ Tue 13:13:00 06-Nov-84 +Package: images +Title: shiftlines + +A new task, shiftlines, is available in the images package. It shifts +image lines by a specified amount. There are five choices for the +image interpolation and two choices for boundary extension. See +the help page for further information. + +------------ +From: /u2/davis/ Thu 16:30:26 08-Nov-84 +Package: curfit +Title: curfit mods + +A piecewise linear (SPLINE1) polynomial fitting function has been added +to the CURFIT package. A new routine CVSET can take coefficients derived +external to the CURFIT package and store them in the curve descriptor +for use by the CVEVAL and CVVECTOR routines. + +------------ +From: /u2/davis/ Thu 16:35:58 08-Nov-84 +Package: local +Title: Imsurfit installed in local + +A new task, IMSURFIT, which fits surfaces to IRAF images has been +added to the local package. See manual pages for more documentation. + +------------ +From: /u2/valdes/iraf/ Fri 10:12:52 09-Nov-84 +Package: multispec +Title: New parameter in findpeaks + +A new parameter, edge, was added to the task findpeaks. This parameter +specifies a minimum distance to the edge of the image for peaks found. + +------------ +From: /u2/tody/ Sun 21:29:59 11-Nov-84 +Package: cl +Title: parameter indirection, enumerated values + +Two new features affecting parameter access have been added to the CL, +parameter indirection and enumeration of the legal types of a string valued +parameter. + +1. Parameter Indirection + + Parameter indirection allows a parameter to take any combination of its +value, minimum, or maximum fields from another parameter. Indirection is +signalled by an '@' prefixed field in the parameter file, e.g., + + order,i,h,@param + +specifies that the value of parameter "order" is the value of the parameter +"param", which is located by the usual search path (task, package, cl). +More general forms include + + order,i,h,@task.param +and + order,i,h,@pack.task.param.field + +The taskname of the current package my be specified by the shorthand name "_", +e.g.: + + order,i,h,@_.order + +states that the default value of the task parameter "order" defaults to the +same value as the package parameter of the same name. + +Minimum and maximum fields may be specified in the same fashion, e.g.: + + alpha,i,h,5 + beta,i,h,10,@alpha + +Indirection may be overridden permanently via an assignment statement or +temporarily on the command line. + + +1.1 Caveats + + Indirection requires string storage for the p_value, p_minimum, and +p_maximum fields of a parameter. String storage for these fields is +allocated only if indirection is specified in the parameter file (except +for the value field of a string parameter which is always allocated string +storage of SZ_FNAME chars). In general a parameter may not be made indirect +after loading the parameter file. + +Multiple indirection is permitted. Infinite recursion will occur if a +field of a parameter indirectly references itself. A field of a parameter +may indirectly reference another field of the same parameter. + +Implementing parameter indirection was surprisingly difficult and involved +substantial modifications to the CL. The most common cases have been +tested but further bugs caused by these modifications can be expected to +turn up. + + +2. Enumerating the Values of a Parameter + + The legal values of a string type parameter may now be enumerated in +the parameter file. For example, + + device,s,a,"mta","mta|mtb|tty" +or + order,s,a,"5","3|5|7" + +The CL will accept only values enumerated in the list found in the p_minimum +field. Minimum match abbreviations are permitted, with the CL always +returning the full value of the matched substring. While enumeration of +values is currently supported only for string valued parameters, integer +values may be stored as strings (with restrictions on the use of such a +parameter in CL expressions) as shown in the example above. + +------------ +From: /u2/tody/ Sun 22:23:42 11-Nov-84 +Package: cl +Title: parameter file names in UPARM + +The underscore has been omitted from the parameter file names stored in +the UPARM directory. Old parameter files can no longer be referenced and +the contents of the UPARM should therefore be deleted. + +------------ +From: /u2/tody/ Sun 22:26:34 11-Nov-84 +Package: cl +Title: command mode versus compute mode in the CL + +A new lexical analyzer has been added to the CL to permit a more terse +mode for entering simple commands. The CL now distinguishes between two +distinct modes of command input, known as "command mode" and "compute mode". + + +1. Command Mode + + Command mode is useful when interactively entering commands because it is +the most terse mode of input. There are few special characters, most strings +do not have to be quoted, and command arguments are delimited by whitespace +rather than commas. Command mode is permitted only when working interactively, +i.e., it is turned off when running a script task or an external compiled +task. The features of command mode are summarized below: + + o Unquoted strings may contain any nonwhite character except "'\(|><{};=#. + The characters !^&+- may be embedded in strings but are recognized as + the OS escape, history metacharacter, etc. when the occur in the + obvious context. + + o Whitespace delimits arguments, not comma. Commas may be embedded + within argument strings. For example, + + delete file1,file2,file.* v+ + + would delete all files matching the template given as the first + argument with verification enabled. + + o The sequence \c is replaced by the character c. A lone \ at the end + of a line causes continuation on the next line. Quotes may also be + used to escape characters but a quoted string is a distinct token + (e.g. argument or value). + + o The OS escape need no longer appear at the beginning of an input line + of text, e.g., sequences such as "time;!w" are now permitted. Newline + may be escaped when building up long OS escape commands. When not used + to escape newline the escape character is left alone, i.e., \c equates + to \c. An unescaped newline marks the end of the command. + + o A string constant appearing on the righthand side of an assignment + statement need not be quoted. Only the simple assignment statement + is recognized in command mode (i.e., += etc are not recognized). + +The command mode syntax is consistent with the that of many command languages, +including the UNIX shell and cshell, and VMS DCL. + + +2. Compute Mode + + The original command form of the CL is now known as "compute mode". +In compute mode arguments must be delimited by commas and general expressions +are recognized. Compute mode is automatically entered in any of the following +circumstances: + + o Within parentheses. Compute mode expressions may be embedded within + command mode commands. + + o Within braces. Command mode is turned off in a compound statement, + e.g. within the body of a while loop. + + o Within scripts or when executing an external compiled task. Command + mode may not be used within a script; the old compute mode scripts + need not be changed. + + o When the CL parameter "lexmodes" is set to NO. This is currently the + default since command mode is not fully tested and the documentation + all pertains to compute mode. + + +3. CL Syntax + + The grammar (syntax) of the CL is the same for both command and compute +mode. Mode switching is implemented by two separate lexical analysis filters. +The lexical filter to be used depends on the runtime context and is selected +upon entry to a command block. + +The only change to the grammar of the CL made to implement command mode was +the elimination of the need to quote a string constant appearing on the right +side of an assignment statement. String constants appearing in assignment +statements within braces ({}) must be quoted regardless of the lexical mode +of the CL. Conversely, a parameter name appearing on the righthand side +of an assignment statement outside of a block must be enclosed in parenthesis +to be interpreted as a parameter name rather than as a string constant. + +This change affects any existing CL scripts which assign a parameter to a +parameter outside of a brace delimited block. Within a block the syntax +and lexical form of the CL is that of a conventional programming language. + + +### Revision 1.1 Mon Nov 12 04:42:52 MST 1984 + + +### Revision 1.2 Tue Nov 13 04:10:28 MST 1984 + +------------ +From: /u2/tody/ Wed 10:42:07 14-Nov-84 +Package: system +Title: help for the system package + +Thanks to Richard Wolff, manual pages have been installed for the tasks +in the system package. + +------------ +From: /u2/tody/ Wed 20:46:43 14-Nov-84 +Package: plot +Title: graph mods + +The x-clipping feature lost during the switch to the new system has been +restored. If xautoscale is turned off and ux1,ux2 are set to points within +the plot, no data is plotted to the left or right of the window. + +The default value of the parameter "title" has been changed from "@imtitle" +to simply "imtitle". The @ was causing parameter indirection with the +result that graph could not find the parameter "imtitle". + +This points out a serious weakness of the parameter indirection scheme; the +value of a parameter may no longer begin with an @ as a normal character. +On the other hand it is nice to be able to respond to a query with @param. +This will have to be resolved at some point, hence the current scheme for +implementing parameter indirection must be regarded as experimental. We are +committed to having the capability, but how it is implemented may change. + +------------ +From: /u2/tody/ Wed 20:54:07 14-Nov-84 +Package: cl +Title: bug fixes + +The bug involving INDEF's in parameter files has been fixed. The new MAGNIFY +task and others like now work properly again. Beware that if you ran any of +these tasks while the bug was active, the parameter file may have to be +unlearned. + +------------ +From: /u2/tody/ Wed 20:56:30 14-Nov-84 +Package: system +Title: allocate, deallocate bug fixes + +The system tasks allocate and deallocate had two bugs related to the system +modifications made last weekend. They should be working properly now. + +------------ +From: /u2/tody/ Wed 22:57:26 14-Nov-84 +Package: cl +Title: cl bug fixes + +The following CL bug fixes have been made. Examples of statements that +formerly did not work are shown. + + +Bugs in the new lexical analyzer (lexmodes=yes): + + [1] spawning background tasks (& at end of line), e.g., + + make >& spool & + + [2] what is a number, e.g., + + x = .5 + + [3] the ? and ?? tasks work again. ? anywhere but at the beginning + of a statement is not special, i.e., ? can be embedded in strings. + + +Assignment statement bugs: + + [1] both of the following would formerly fail: + + s1 = [*:16,-*] + and + s1 = identifier + +Other: + + [1] An invalid CD or CHDIR is no longer passed to a child process. + This turned out to be a kernel bug rather than a CL bug, but + should not affect processes other than the CL. + +------------ +From: /u2/tody/ Tue 22:02:07 20-Nov-84 +Package: fio +Title: freadp, fwritep added + +The two i/o procedures FREADP and FWRITEP have been added to FIO to support +direct access by IMIO of pixel data in the FIO buffers. These new procedures +are useful in operations where performance is critical, but usage is a bit +tricky hence their use in applications code is not recommended. + + charp = freadp (fd, offset, nchars) + charp = fwritep (fd, offset, nchars) + +Both routines cause the FIO buffer to be filled with the file buffer sized +file block containing the portion of the file starting at "offset" and +extending for "nchars" chars. The referenced segment must fall entirely +within a file buffer. An error action is taken if offset+nchars falls +at a point outside the file buffer, or if the segment referenced is beyond +BOF or EOF. A char pointer to the first char of data is returned as the +function value. The referenced data must be used before FIO reuses the +file buffer for a different region of the file. + +Successive calls to data segments lying within a single large buffer, i.e., +which do not result in a file fault, cost about 180 microseconds per call +for FREADP and 240 microseconds per call for FWRITEP on the VAX 11/750. +No seek is required since the file offset is included in the call. + +------------ +From: /u2/tody/ Tue 22:19:22 20-Nov-84 +Package: plot +Title: plot expansion in GRAPH + +The modifications to GRAPH made to permit proper autoscaling in Y when +specifiying an X subrange of data to be plotted were lost in the disk +crash over the weekend. This mod has been repeated and plots should be +properly scaled when GRAPH is used to expand a portion of a plot. + +------------ +From: /u2/valdes/iraf/ Thu 17:37:39 06-Dec-84 +Package: images +Title: Enhancements to imarith + +Imarith has been greatly enhanced. The enhancements are in performance, +flexibility, and use of lists for operands and resultant images. +Performance has been enhanced by providing type specific operators +to perform the operation in any desired datatype. If the calculation +datatype matches the operand and result pixel datatypes then no +datatype conversions are performed and the operation is particularly +efficient. The flexibility enhancement allows the user to select the +pixel datatype of the resultant image(s) and the calculation datatype(s). +Specially recognized datatypes allow defaulting to the datatype of +highest precedence from the operand images or to the datatype of +either operand. The list enhancement allows either operand to be +a list of images and constants (they can even be mixed). The +result parameter can also be a list of images. The number of +operand elements can be either one (in which case it is used repeatedly) +or match the number of elements in the result list (in which case +the elements are match one-to-one). + +It is also possible to have the result image match one of the operand +images (apart from sections). In this case the operation is performed +to a temporary image and, when completed successfully, the temporary image +replaces the operand image being overwritten. + +There are options to print the operations being performed as diagnositics +and to print the operations without performing the operation for debugging. + +------------ +From: /u2/valdes/iraf/ Thu 17:47:55 06-Dec-84 +Package: images +Title: Enhancements to imcopy + +Imcopy has been enhanced to use general image template lists. The +number of input images can be either one (in which case the input +image is repeatedly copied to each element of the output list) or +or match the number of output images (in which case the image lists +are matched one-to-one). If the input image and output images are the +same (except for sections) then the copy is performed to a temporary +image and, when completed successfully, the temporary image replaces +the original input image. + +------------ +From: /u2/tody/ Fri 18:09:13 07-Dec-84 +Package: imio +Title: optimized version of IMIO installed + +Testing of the optimized version of IMIO has been completed and the new +interface installed. The optimizations improve the efficiency of line by +line i/o, the most common type if i/o to images. In short, the overhead +required to access the pixels will be minimal provided no image section is +given, datatype conversion is not necessary, there is only one input line +buffer, boundary extension is not in use, bad pixels are not being set to +INDEF, etc. If all these conditions are true IMIO can skip a lot of code +and the pointer returned by a get/put line or section call will point +directly into the FIO buffer, eliminating a memory to memory copy. If any +of the fancy IMIO options are used additional expense will of course be +incurred. There is little difference in the timings for the integer and real +datatypes. + +All modifications to IMIO were internal to the interface, hence only relinking +is necessary to take advantage of the increased efficiency provided by the new +interface. The IMAGES and TV packages have been relinked. Loading a 512**2 +type short image into the image display now takes only 2-3 cpu seconds in +the simplest case (ztran=none). Clock time for this image load operation is +still a minimum of 10-12 seconds due to the limitations imposed by the UNIX +file system. Image arithmetic operations typically require several cpu seconds +per operation. The inefficiencies of the UNIX file system will be overcome when +a low level IRAF static file driver is implemented for 4.2BSD UNIX in coming +months. + +------------ +From: /u2/tody/ Fri 19:04:42 07-Dec-84 +Package: imio +Title: image sections + +Minor changes have been made to the image section code in IMIO to make the +section notation more deterministic and to remove unecessary restrictions on +the use of sections. A section of the form [5] no longer refers to the +highest physical dimension of the image; this was nondeterministic and +required advance knowledge of the dimensionality of the image. In the new +release of IMIO the number of dimensions referenced in an image section need +not match the number of physical dimensions in the image. If too few +dimensions are specified in the section then the higher dimensions will be +set to 1. If too many dimensions are specified then the higher dimensions +must be set 1 explicitly or it is an error. + +For example, if A is a 2-dim image, A[10:20] is equivalent to A[10:20,1], +i.e., the section is 1-dim. If B is 1-dim B[*,1] is a legal section but +B[*,2] is not. + +------------ +From: /u2/tody/ Fri 19:12:41 07-Dec-84 +Package: libsys +Title: error recursion + +A bug has been fixed in etc$xerfmt.x which would cause error recursion when +error recovery occurred under certain circumstances. The error recovery +code was calling ENVGETS, which takes an error action under certain +cirumstances, causing error recursion. The call to ENVGETS was replaced +by a call to ENVFIND which is functionally identical but does not query or +abort if it cannot find an environment variable. + +------------ +From: /u2/tody/ Sat 14:41:37 08-Dec-84 +Package: lprint +Title: bug fix + +The bug which caused LPRINT to output garbage following the normal text has +been fixed for the second time. Evidently this bug fix was lost in the disk +crash in November. + +------------ +From: /u2/tody/ Sat 14:44:32 08-Dec-84 +Package: libsys +Title: process control bug fix + +Error checking was missing in PROPEN, used to open a connected subprocess. +This would cause a segmentation violation in the CL when trying to open +a nonexistent executable process file. + +------------ +From: /u2/hammond/iraf/ Mon 10:58:21 10-Dec-84 +Package: dataio +Title: wtextimage installed + +Task wtextimage has been installed in the dataio package for converting +IRAF images to text files. The text file written consists of an optional +FITS header followed by the pixel values. + +------------ +From: /u2/tody/ Mon 17:16:57 10-Dec-84 +Package: cl +Title: flprcache bug fix + +The flprcache (flush process cache) task had a bug that caused it to flush +only the top process from the cache. The corrected function is to flush +all processes not locked in the cache (locked processes can be flushed if +a flag is set to break the locks). + +This bug may have been responsible for background jobs leaving dreg processes +running after termination of the bkg CL. + +------------ +From: /u2/tody/ Wed 10:33:48 12-Dec-84 +Package: images +Title: new package IMDEBUG + +A new subpackage IMDEBUG has been added to IMAGES. This is a slightly +cleanup version of the image i/o debugging tasks formerly stored with the +IMIO source. Tasks MKTEST and CUBE are particularly useful for testing +image operators. No param files or manual pages are presently available +for these routines. + +------------ +From: /u2/tody/ Wed 17:45:55 12-Dec-84 +Package: IMIO +Title: bug fix + +The new (optimized) version of IMIO had a bug which was not discovered and +fixed until today. The bug would cause image sections to be ignored (in +effect). + + +------------ +From: /u2/tody/ Wed 17:48:47 12-Dec-84 +Package: images +Title: IMCOPY can now mosaic images + +IMCOPY has been modified to permit use of an image section on the output +image, which must be an existing image if a section is used. The input +image or image section will be copied into the output section. Both +sections must be the same size. This facility is particularly useful for +mosaicing images, i.e., placing several small images into a larger image +to form a single large image. + +------------ +From: /u2/tody/ Tue 15:35:41 18-Dec-84 +Package: libbev +Title: bug fix in regres.f + +The Bevington library procedure REGRES had an error in the Fortran source +(a * that should have been a **) causing the coefficient errors to be +computed incorrectly. The bug has been fixed and the task POLYFIT in +local relinked to use the new version of the library. + +------------ +From: /u2/tody/ Thu 21:09:02 20-Dec-84 +Package: fio +Title: filename mapping bug fix + +The FIO filename mapping code had a bug which caused the mapping file (used +for long filenames) to be corrupted when deleting a file with a name too +long for the host OS. The mapping file would be unreadable with a checksum +error following the deletion. The file vfnmap.x was modified in two places +to fix this bug. This bug was discovered by the guys at STScI in the +process of testing the new VMS version of IRAF. + +------------ +From: /u2/tody/ Thu 21:12:16 20-Dec-84 +Package: system +Title: obscure bug in the IRAF Main + +The IRAF Main, when passed a command using i/o redirection on the command +line, would include the newline in the filename used for redirection. +The code which extracts the filename was modified to recognize newline as +a filename delimiter. + +------------ +From: /u2/tody/ Mon 13:42:05 24-Dec-84 +Package: fio +Title: bug fix in the filename mapping code + +The filename mapping package had a bug causing the mapping file to be left +open when opened for writing but never modified. Procedure vfnclose in +file fio$vfnmap.x was modified to close and unlock the mapping file in +this case, as well as when it is modified and has to be rewritten. + +------------ +From: /u2/tody/ Mon 15:20:45 24-Dec-84 +Package: spp +Title: portability problems with INDEF + +Equality comparisions of the form + + if (pixval == INDEF) + ... + +involve a comparison of two floating point numbers for equality and hence may +not be portable to some machines or to some compilers. The following macro +has been added to the SPP language definitions to make such constructs more +portable: + + bool = IS_INDEFt (value) + +where the "t" stands for one of the standard type suffixes. One such macro +is provided for each data type, e.g., IS_INDEFS, IS_INDEFR, and so on. The +macro IS_INDEF with no type suffix is equivalent to IS_INDEFR. All programs +which make equality comparisons involving indefinites should eventually be +converted to use these new constructs. + + +### Revision 1.3 Mon Dec 24 22:13:31 MST 1984 + +------------ +From: /u2/valdes/iraf/ Thu 10:58:27 27-Dec-84 +Package: local +Title: imreplace + +Imreplace has been changed in several ways: + +1. There is no output file. The replacement operation is done in place. +2. The input images may have sections to select the part of the image to + be operated upon. This eliminates the need for the column parameters. +3. The lower and upper limits are hidden parameters. +4. The operation is more efficient. + +------------ +From: /u2/tody/ Wed 19:30:38 02-Jan-85 +Package: fmtio +Title: procedure CTOR added + +A new procedure CTOR has been added to FMTIO. This procedure merely calls +CTOD and is provided for the sake of convenience, to avoid having to deal +with double precision numbers in simple conversions. + +------------ +From: /u2/tody/ Thu 18:54:36 03-Jan-85 +Package: images +Title: magnify parameter file replaced + +The parameter file for the task MAGNIFY somehow got filled with zeros. +I copied the version of the file from /u2/valdes/iraf/images into +pkg$images. + +------------ +From: valdes$iraf/ Fri 17:42:46 04-Jan-85 +Package: images +Title: magnify + +Magnify has been fixed. The bug dealt with changing + +delta = (x2 - x1 ) / (npix - 1) + +to + +delta = (x2 - x1 + 1) / npix + +------------ +From: /u2/tody/ Fri 21:06:39 04-Jan-85 +Package: system +Title: new system functions + +Two new system functions, LOCPR and LOCVA, have been added to the ETC package. +These integer functions are more convenient to use than the subroutines ZLOCPR +and ZLOCVA, and they eliminate the need to call the kernel routines directly +in the higher level packages. Use of these new functions should probably be +restricted primarily to system code. + +------------ +From: valdes$iraf/ Thu 15:25:53 10-Jan-85 +Package: images +Title: imstatistics + +When using a large number of pixels the accumulation of the sum of the +pixel values and the sum of the squares of the pixel values may suffer +from roundoff error. This causes the standard deviation to be zero when +the true standard deviation is less than a percent of the mean. This +has been improved by changing to accumulation in double precision. + +------------ +From: /u2/tody/ Fri 12:38:59 11-Jan-85 +Package: system +Title: removal of filename restriction in IRAF Main + +The IRAF Main formerly restricted filenames in the context + + task > filename + +to only those filename beginning with a letter. This prevented the use +of pathnames such as ../filename. The restriction has been removed and +now the filename may contain any characters except whitespace, newline, +or the redirection characters. + +------------ +From: /u2/tody/ Mon 10:43:09 14-Jan-85 +Package: system +Title: GIO installed + +The new GIO (graphics i/o) interface has been installed in a system library. +Up to date documentation is available in gio$Gio.hlp. GIO is functional in +the sense that the library is complete and programs written to use GIO can +be compiled and run. The CL has not yet been modified to interactively +interpret GIO metacode, however, so GIO can only be used at present to spool +metacode into a file. Metacode produced in this fashion can be decoded with +the GKIDECODE task in "gio$stdgraph/x_kernel.e" for debugging purposes. +The task STDGRAPH in the same process is a mockup of the stdgraph kernel, +and may be used (noninteractively) to make crude plots on the terminal from +GIO metacode. + + +### Revision 1.4 Tue Jan 15 04:57:57 MST 1985 + +------------ +From: valdes$iraf/ Wed 17:45:04 16-Jan-85 +Package: images +Title: new output type for imlinefit + +A new output type for imlinefit has been added. The output type is called +normfit. It outputs the fitted line normalized to have a unit mean. This +is used to generate calibration corrections; for slit profiles in longslit +spectroscopy in particular. Also the output pixel type is now always real. + +------------ +From: /u2/tody/ Wed 18:15:15 16-Jan-85 +Package: cl +Title: bug affecting list structured parameters + +A bug fix has been made to 'paramset' to permit setting the filename of a +non-string datatype list structured parameter. This bug was the source +of the problems experienced earlier this week with NORMALIZE and NORMFLAT +(generic package). + +------------ +From: /u2/tody/ Mon 23:09:30 21-Jan-85 +Package: system +Title: error recovery bug fixes + +I spent several hours tracking down several of the "bugs" that have been +annoying us when interrupting subprocesses. Specifically, a task will now +stop spewing out output immediately when interrupted, and interrupt should +no longer get stuck off. + +Software modifications: + + [1] etc$main.x + Added an fseti call to cancel STDOUT during error recovery. + + [2] cl$pfiles.c + Failure to write pfile was a fatal error for some reason; changed it + to an internal error. + + [3] cl$main.c + Calls added to the ONINT interrupt handler for the case interrupt + of a subprocess: + + c_fseti to cancel stdout + c_prredir to redirect stdin, stdout, stdgraph to 0. This causes + etc$prfilbuf to ignore pseudofile directives buffered in + IPC at the time the interrupt occurs. + + [4] fio$fseti.x + The F_CANCEL code in fseti formerly did an LNOTE, LSEEK before + and after clearing the buffer, to preserve the file offset. + Removed these to force iop to point to beginning of buffer if + i/o cancelled. + + [5] cl$prcache.c + If a process was interrupted during startup IPC would be trashed, + causing endless "IRAF Main: unknown task name" errors from the + subprocess. Make the call to c_propen in cl$prcache.c a critical + section to prevent interrupt of the child process until startup + is completed (a critical section is a section of code which is + uninterruptable). The effect of this is noticeable: a ctrl/c typed + immediately after entering a command which causes a process to be + spawned will be ignored. + + In the process of fixing this one I discovered a flaw in the + exception handling code, which is patterned after the UNIX "signal" + facilities. The idea was that one could call + + xwhen (signal, newhandler, oldhandler) + .... + xwhen (signal, oldhandler, junk) + + with some code in between, and the oldhander would be restored by + the second call. This does not work if the code in between calls + XWHEN for the same signal. + + [6] os$zxwhen.c + A bkg process is spawned with SIGINT disabled. ZXWHEN would check + to see if the signal was disabled when posting a new one. If the + signal was disabled it would ignore the posting and leave the signal + disabled. The bug occurred when ZXWHEN was called to disable the + signal temporarily to protect a critical section; once turned off + a handler could never be posted. Added a "first_time" flag to make + the test only in the first call to SIGNAL for SIGINT. + + +Zombie processes are still occuring. I found and fixed a bug some time ago +which may have solved this problem, but many tasks have yet to be relinked +and hence the fix has not been propagated. I will relink the whole system +when the visitors currently using the system finish their reductions. + +------------ +From: valdes$iraf/ Tue 09:04:28 22-Jan-85 +Package: images +Title: New task blkaverage + +A new task specifically for block averaging two dimensional images has +been added. + +------------ +From: valdes$iraf/ Tue 09:07:32 22-Jan-85 +Package: images +Title: Bug fix in sigl2 + +A bug in the sigl2 package for image block averaging and linear interpolation +has been fixed. The partial blocks at the ends of the image were not +being truncated so that the code was trying to read outside the image. +This package is used in magnify and display. + +------------ +From: valdes$iraf/ Thu 17:33:02 24-Jan-85 +Package: local +Title: fixpix + +A new task called fixpix has been added to the local package. It +replaces pixels in a set of bad pixel regions by linear interpolation +from nearby pixels. The bad pixel regions are specified via a file +(which may be STDIN) by lines of four coordinates consisting of the +first and last columns and the first and last lines of the bad region. +The direction of interpolation is determined by the shape of the region; +i.e. it interpolates across the narrower dimension of the bad region. +This task should be very useful in imred type applications for detectors +with consistent bad full and partial columns and lines. + +------------ +From: /u2/tody/ Thu 20:25:18 24-Jan-85 +Package: system +Title: more bug fixes + +Many bug fixes have been made in the past two days to make the system more +reliable, particularly where error recovery is concerned. A summary of +the software revisions follows. + + [1] fio$xerputc.x + Would overrun buffer if called repeatedly without a newline terminator. + Modified to flush buffer when it fills, even if newline not seen. + Buffer overrun was supposed to be impossible, but it turned out it + could happen during error recursion. + + [2] etc$erract.x + More logic was added to improve the heuristic for detecting error + recursion. + + [3] cl$builtin.c + The CLERROR procedure was modified to pop the last task off the + control stack. Both BYE and ERROR signal task termination. It is + necessary to pop the task to keep KILLTASK from sending X_INT to + interrupt a task which has already terminated, if the task is an + external executable. + + [4] os$zxwhen.c (UNIX kernel) + The SIGTERM signal was getting blocked after the first exception, + causing the process to become uninterruptable. For some reason + UNIX identifies the signal as SIGINT in the argument list of the + exception handler, even though it is the SIGTERM signal which + was caught. The handler would unblock SIGINT rather than SIGTERM, + leaving SIGTERM blocked. + + [5] cl$errs.c + The ONINT cl interrupt handler is now reposted whenever CL_ERROR is + called. This is necessary as CL_ERROR might be called while interrupts + are disabled in a critical section. Additional logic was added to + detect error recursion. The tests for an error occurring during + process startup or shutdown were moved to the beginning of the + procedure. + + [6] etc$main.x + Modified to block interrupts during process startup, to prevent + loss of sync of the IPC protocol. Added F_CANCEL calls for the + standard streams during error recovery. Added a call to repost + the standard exception handlers during error recovery (this will + reenable interrupts if error recovery takes place while interrupts + are blocked). + + [7] cl$exec.c + The test to prevent "bye" from logging out of the CL was not working + due to a precedence error in the test for a bkg CL. The CL will once + again print the "use 'logout' ..." message if one accidentally types + "bye" in the CL menu. + + [8] cl$main.c + The ZDOJMP jump buffer of the IRAF Main is now restored when the CL + main exits, in case an error occurs during process shutdown. + A bug was fixed which would cause the LOGGINGOUT flag to be cleared + when EXECUTE was called to process the logout.cl file. + New routines INTR_DISABLE, INTR_ENABLE were added to make it + convenient to protect critical sections of CL code. + + [9] cl$prcache.c + The STDGRAPH stream of a task is now initialized to STDOUT by + default when an external task is connected. + + [10] cl$pfiles.c + Writing a parameter file is now a critical section to prevent + learning of truncated parameter files. + + [11] cl$bkg.c + The command to be executed in the background is now saved in the + bkg file header to permit spying on what the task is doing with + the octal dump program. Use PS to get the pathname of the bkgfile + and then "od -c" to print the first few bytes of the file. + + [12] cl$bkg.c + Various critical sections were identified and protected. + The filenames of the bkg query files are now generated and deleted + at bkg job spawn time, just in case there are any dreg files left + over in uparm from a previous bkg job. If this were to happen + JOBS might print a misleading status for the job. + + [13] fio$ delete.x, falloc.x, fmkcopy.x, frename.x, filopn.x + All code segments that have the VFN database opened for writing + are now critical sections, and all error checking in these sections + is done explicitly. This is necessary to prevent an interrupt from + corrupting the mapping file, to ensure that the lock on the mapping + file is removed, and to ensure that the mapping file is closed by + the process so that the same or another process does not block waiting + for access to the file. + + [14] fio$rename.x + RENAME will now copy the file and delete the original if the ZFRNAM + (move) operation fails, allowing files to be renamed to different + filesystems. + + [15] os$zoscmd.c (UNIX kernel) + Will now trap interrupts and kill the OS command and then the parent + process. + +------------ +From: /u2/tody/ Sat 19:27:06 26-Jan-85 +Package: os +Title: zfsubd smartened up + +The ZFSUBD kernel procedure, used to add a subdirectory to a pathname to +produce the pathname of the subdirectory, has been smartened up to back up +a pathname when the subdirectory is given as "..". Thus, if the current +directory is "/iraf/sys/fio/" and the subdirectory is "..", the output +pathname will be "/iraf/sys/" rather than "/iraf/sys/fio/../". The second +form is a legal UNIX pathname equivalent to the first, but it is less +efficient to evaluate and would lead to long pathnames and eventual overflow +of a filename buffer. + +------------ +From: /u2/tody/ Sat 20:31:59 26-Jan-85 +Package: fio +Title: filename mapping bug discovered + +A filename mapping bug (file fio$vfntrans.x, procedure vfn_translate) has +been discovered and fixed. The bug would cause sometimes cause a subdirectory +name to appear twice in the mapped filename. I discovered it when the +filename ".." was mapped to "../..", but the same bug could be expected for +ordinary subdirectory names as well, provided they were recognizable as +subdirectory names and appeared as the last field in a filename. + +------------ +From: /u2/tody/ Sat 20:41:08 26-Jan-85 +Package: imio +Title: modification date was not getting initialized + +A bug causing the image modification date to not be initialized at image +create time has been discovered and fixed. The symptom was that the +modify date would show up as zero (=1970). Tests for invalid minimum and +maximum pixel values would consequently fail since an invalid limits time +would also be set to zero, which would not test as older than the modify +date. + +------------ +From: /u2/tody/ Sat 20:44:07 26-Jan-85 +Package: images +Title: new task MINMAX installed + +A new task named MINMAX has been added to the IMAGES package. The new task +is used to compute or recompute the mininum and maximum pixel values in an +image or set of images. The computed values may be printed, used to update +the image header, or accessed from a CL script. + +------------ +From: /u2/tody/ Mon 21:26:43 28-Jan-85 +Package: imio +Title: error recovery bugfix in IMMAP + +The IMMAP procedure would not always close the header file when taking an error +action, e.g., when the file opened turned out to not be an image header. + +------------ +From: /u2/tody/ Mon 21:30:26 28-Jan-85 +Package: images +Title: prettyprinting of title strings in IMHEADER + +The IMHEADER task will now strip trailing newlines and whitespace from +title strings, printing the final string with a single newline. This +results in a consistent looking title regardless of the DATAIO reader +used to create the image (some readers blank fill to 80 columns, others +add an unneeded newline). + +------------ +From: valdes$iraf/ Wed 14:52:04 30-Jan-85 +Package: images +Title: imsum replaces imaverage + +The task imaverage has been replaced by the task imsum. This new task provides +several improvements. + +1. The sum of the input images is provided. +2. The average of the input images is provided. +3. The median of the input images is provided. +4. The output pixel datatype is selectable and defaults to the appropriate + highest precedence datatype of the input images. +5. The calculation type is selectable and defaults to the appropriate + highest precedence datatype of the input images. +6. When all images are of the same datatype and the calculation is done + in the same type then this operation is particularly efficient. + +------------ +From: /u2/tody/ Thu 19:13:33 31-Jan-85 +Package: images +Title: new task IMGETS added + +The new task IMGETS has been added to the IMAGES package. The new task is +used to get parameters by name from the image header. The function of the +task is not expected to be greatly affected by the upcoming DBIO mods. +IMGETS returns the value of the parameter as a string in the parameter +"imgets.value". + +To coerce this string into some other datatype, e.g., int or real, reference +it in an expression with the either the "int" or "real" type coercion function +(as in F77), e.g.: + + cl> imgets image HA + cl> = real (imgets.value) + 5.67544 + cl> + +Note that the DATAIO readers tend to write the instrument parameters in the +header with upper case names, and you must get the case right. Use IMHEADER +to list the image parameters if there is a problem. The following standard +image header parameters may also be accessed with IMGETS: + + name datatype + + pixtype string + ndim int + len[1], len[2], etc. int + min real + max real + title string + pixfile string + +------------ +From: /u2/tody/ Thu 19:21:34 31-Jan-85 +Package: images +Title: task IMHEADER modified + +The IMHEADER task has been modified to print the "user area" of an image +header, if nonempty. The user area should be formatted as a string buffer +containing newline delimited entries of the form "keyword = value" for this +to work properly. + +------------ +From: /u2/tody/ Thu 19:58:17 31-Jan-85 +Package: imio +Title: changes to IMMAP + +The IMMAP procedure in IMIO has undergone the following modifications to +support IMGETS, etc: + + [1] When opening an existing image or a new image, space is always + allocated for a minimum size user area of 2880 struct units, + regardless of the value given in the argument list (a larger space + is allocated if the argument is larger than 2880). The purpose for + allocating the extra space is to permit automatic reading of the + user area regardless of the size given in the argument list, in case + the image is subsequently referenced in a NEW_COPY mode call to + IMMAP. + + [2] IMMAP will no longer abort if the size of the user area is different + than that specified in the argument list. + +The choice of 2880 struct units is arbitrary but since this code is expected +to be replaced shortly, I did the easy thing. The changes should not affect +any existing code. + +------------ +From: /u2/davis/ Fri 09:03:49 01-Feb-85 +Package: dataio +Title: rcamera mods + +RCAMERA has been modified to read old 9-track camera format where tape files +contained multiple images. A new parameter image_list has been added so the +user can specify which images to extract from a file. The camera header +parameters are now stored in the user area. + +------------ +From: /u2/tody/ Fri 18:22:40 01-Feb-85 +Package: vops +Title: modifications and additions to the VOPS package + + +The following VOPS procedures have been modified: + + [1] ASOK - selection of Kth smallest element in a vector. + Calling sequence changed to eliminate the internal vector copy, + modifying the single vector argument in place. The procedure was + tested and a bug found and fixed. + + [2] AMED - median of a vector + Calling sequence changed to eliminate the internal vector copy, + modifying the single vector argument in place. Calls ASOK. The cases + npix=1,2,3 were optimized. + + [3] ALTR - general linear transformation of a vector + Calling sequence modified to add a new constant making the + transformation completely general, i.e., + + call altri (a, b, npix, k1, k2, k3) + b[i] = (a[i] + k1) * k2 + k3 + + Examination of the optimized assembler source for the routines actually + installed in the library showed that the installed routines named ALTRS + and ALTRR were actually performing the function of AMAPS and AMAPR. + The names of the assembler versions were changed to AMAP. A search of + all IRAF source files showed that the modified vector operators were + used only in the DISPLAY program, which was also modified. + + +The following new vector operators were added: + + [1] ALTA - linear transformation via add and multiply + A variant of ALTR: b[i] = (a[i] + k1) * k2 + + [2] ALTM - linear transformation via multiply and add + A variant of ALTR: b[i] = (a[i] * k1) + k2 + + [3] AMED3 - vector median of three vectors + Calculates the vector median of three input vectors, i.e., each + point in the output vector is the median of the corresponding three + points in the input vectors. + + [4] AMED4 - vector median of four vectors + Calculates the vector median of four input vectors. + + [5] AMED5 - vector median of five vectors + Calculates the vector median of five input vectors. + +------------ +From: valdes$iraf/ Fri 18:36:01 01-Feb-85 +Package: images +Title: Task linefit replace imlinefit + +The task imlinefit has been replaced by an improved version call linefit. +The improvements are: + +1. Ability to specify the output columns. +2. Pixels rejected from the fit may or may not be replaced when computing + the output image lines. +3. The fitted points may be subsampled by binning them and taking the average + of the column positions as the ordinates and the median as the abscissas + for each bin. +4. The task efficiency has been somewhat enhanced. Greater efficiency + enhancements are expected shortly. + +The tasks linebckgrnd, colbckgrnd, lineflat, and colflat in the generic +package have been changed to use the new task. + +------------ +From: /u2/tody/ Sat 14:18:03 02-Feb-85 +Package: cl +Title: recent minor modifications + +The following modifications were recently made to the CL: + + [1] It was discovered that SCAN and FSCAN would recognize comma as a + field delimiter in addition to whitespace. While this might + occasionally be useful, it prevents the scanning of lists wherein + the fields contain embedded commas, e.g., image sections. + The scanner has been modified to recognize only whitespace as the + field delimiter. + + Todo: recognize quoted string fields. Add formatted scan capability + to permit more complex scans. + + [2] The iofinish procedure (exec.c), called when a task finishes, would + take an error action if an attempt was made to close one of the + standard streams. This interferred with the use of the special "files" + "STDIN", "STDOUT", and "STDERR". The checking has been removed. + The checking was put in back when the CL was interfaced to UNIX, which + will physically close a standard stream if you tell it to. The IRAF + i/o system works differently and the checking is no longer necessary. + +------------ +From: /u2/tody/ Sun 15:58:00 03-Feb-85 +Package: os +Title: interrupting a command sent to the OS + +The ZOSCMD kernel procedure has been modified in an attempt to fix the +bug that occurs sometimes when "edit" is interrupted. Interrupting a +command like "edit" at just the right point would sometimes leave both +the foreground CL and the forked child CL reading from the terminal at +the same time. The theory is that this occurs when the FORK system call +is interrupted, a definite possibility since a fork can take a while +for a process as large as the CL. Interrupts are now disabled before +the fork and reset in the child process before the execl. The parent CL +is now uninterruptable upon entry to the fork and until the child exits. + +I have given up on the attempt to kill a tree of child subprocesses when +an interrupt occurs as there does not seem to be any way to do this in +UNIX (e.g., a kill of a "make" command entered from the CL). It is easy +to kill the process at the root of the tree, but the children of that +process continue to run. Using process groups it is possible to kill all +processes in the tree but unfortunately the CL and all processes except +the CSH are killed too. Perhaps examination of the CSH source will uncover +a way to do this properly. + +------------ +From: /u2/tody/ Sun 16:11:45 03-Feb-85 +Package: softools +Title: mklib buffers changed + +The MKLIB buffers have been increased by a factor of two to accommodate +larger libraries. The recent additions to VOPS overflowed the old buffers +(which were set to hold 1000 object modules). + +------------ +From: /u2/tody/ Sun 19:10:34 03-Feb-85 +Package: tty +Title: logical device names + +The TTY package has been modified to permit logical device names containing +optional subunit, frame, etc. information in addition to the root TERMCAP or +GRAPHCAP name for the device. This feature is most useful when any of several +units of a device may be accessed, all of which have the same termcap or +graphcap entry. Thus, for example, we might have devices "versatec.1" and +"versatec.2". + +The format and contents of any subfields are device or installation dependent +(the extra fields are passed on to and interpreted by a kernel). All we +require is that the fields be set off from the root device name by a special +character. To make such distinctions possible the root device name may contain +only characters chosen from the set [a-zA-Z0-9_+_]. + +------------ +From: /u2/tody/ Mon 22:25:48 18-Feb-85 +Package: libc +Title: bug fix to FILBUF in the C runtime library + +I discovered that a section of code originally put into the FILBUF procedure +in the C runtime library for debugging purposes was never removed. Two lines +of code were deleted and the library updated. +rev + +------------ +From: /u2/tody/ Thu 02:33:09 21-Feb-85 +Package: os +Title: new devices added + +Two new logical printer devices were added to kernel.h, "vup" and "vdown", +used to select either the upstairs or downstairs versatec printers. The +names are the same as used in the UNIX commands vpr, lpr, etc. A new +plotter device named "dicomed" was added to the system to facilitate debugging +the NSPP kernel, although the host system metacode translator is not yet +installed. + +------------ +From: /u2/davis/ Fri 15:22:12 01-Mar-85 +Package: curfit +Title: curfit mods + +The CURFIT package has been revised. The routines should now run faster. +A new routine cvacpts has been added (see help facilities). + +------------ +From: /u2/tody/ Tue 20:14:02 05-Mar-85 +Package: system +Title: new task GRIPE installed; BUGMAIL deleted. + +Following a suggestion from STScI (no doubt under the influence of AIPS) +I have replaced the old, little used BUGMAIL task by a new task named +GRIPE. GRIPE writes into the file "doc$gripesfile", which anyone can +read, and in addition sends each gripe directly to a designated IRAF +person, currently me, to insure that the GRIPE is read promptly. Please +feel free to post gripes using the new task to ensure that they get +recorded properly. + +------------ +From: valdes$iraf/ Thu 11:47:13 14-Mar-85 +Package: images +Title: Changes to imcopy + +Imcopy has been changed as follows: + +1. The output name may be a directory in which case the input images are +copied to the directory. + +2. A verbose option has been added to print each copy operation as it +occurs. + +3. The choice of copying one file to several output files never really +worked and is now not allowed. Thus, the input is a list of images and +the output must be a list of matching images (the number of input and output +images must be the same) or a single directory. + +This task now is similar to the file copy except that the file copy does +not allow matching lists of input and output files. The help page has +been updated. + +------------ +From: valdes$iraf/ Tue 18:11:20 19-Mar-85 +Package: xtools$imt.x +Title: image template enhancement + +Tasks which accept image templates (most of those in images and longslit) +may now concatenate strings and templates to form new image names. This +is particularly useful for forming new output image names based on the +image names in the input image template. The concatenation operator is +the double slash (//). Some examples are: + + image -> image + image* -> image1, image2, etc. + image*[1,*] -> image1[1,*], image2[1,*], etc. + image*//.1 -> image1.1, image2.1, etc. + new//image*//.bck -> newimage1.bck, newimage2.bck, etc. + image01\[0-5] -> image010, image011, ..., image015 + +To test the image template expansion use the task "sections". +This change is effected in the imt.x procedures in the xtools package. + +------------ +From: /u2/tody/ Tue 21:35:46 19-Mar-85 +Package: osb +Title: string conversion between fortran and spp + +Two subroutines have been added to the OSB package (the bit and byte primitives) +for converting to and from SPP and Fortran strings. The new routines are named +F77PAK and F77UPK. Usage is very similar to the existing STRPAK and STRUPK, +used to convert to and from SPP and C strings. Unfortunately there is no +standard specifying the representation of strings in different languages, and +all three of the IRAF languages do in fact represent strings differently. + + f77pak (sppstr, f77str, maxch) + f77upk (f77str, sppstr, maxch) + +Note that these routines are only callable from a Fortran subprogram since +there is no (machine independent) way in SPP or C to declare a Fortran string +type argument (the only exception is the use of *" for Fortran character +constant arguments in SPP). + +------------ +From: /u2/tody/ Sat 14:47:18 23-Mar-85 +Package: vops +Title: histogram vector operator added to the VOPS package + +A new vector operator ahgm[csilrd] has been added to the VOPS package. +The function of this new operator is to accumulate the histogram of a +series of input vectors in the integer histogram output array. + + ahgm_ (data, npix, hgm, nbins, z1, z2) + +The range of the histogram is from greyscale values Z1 to Z2. Pixels with +values outside the range Z1 to Z2 are excluded from the histogram. + +------------ +From: /u2/tody/ Sat 17:24:55 23-Mar-85 +Package: images +Title: graphics added to the imhistogram task + +The imhistogram task in the images package has been rewritten to use GIO. +The default action is now to compute and plot the histogram of an image +on the standard graphics output. The histogram may optionally be output +as a list. + +------------ +From: /u2/tody/ Sun 18:28:56 31-Mar-85 +Package: cl, etc. +Title: recent mods + +A bug in the ABS function was fixed. In recent weeks many changes have +occurred in that portion of the graphics system resident in the CL, i.e., +the cursor read code, workstation transformation, pseudofile i/o, subkernel +control, and the stdgraph kernel. Virtually all of the revisions have been +isolated to the graphics subsystem. These revisions were not documented +since the graphics subsystem was actively being installed and tested. Now +that the graphics subsystem is stable I will begin to record revisions to +the subsystem. + +Nearly all of the GIO modifications/additions were in the following new +directories: + + sys$gio GIO library + sys$gio/glabax axis labelling and drawing + sys$gio/gki graphics kernel interface + sys$gio/cursor cursor mode, pseudofile i/o, subkernels + sys$gio/stdgraph the stdgraph kernel + sys$gio/nspp the nspp kernel + pkg$plot task implot added + +soon to be added: + + sys$gio/gkslib gks emulation + sys$gio/ncarutil ncar/gks utilities + sys$gio/display generic image display kernel + +The CL must now be linked with the libraries libcur.a (cursor) and libstg.a +(the stdgraph kernel). Changes to the CL itself were minor; the QUERY +procedure in modes.c was modified to read the cursor for gcur and imcur +type parameters. Minor modifications were required wherever the word STDGRAPH +appeared in the old CL. CL_ERROR was modified to call C_XONERR during +error recovery to give the i/o system a chance to clean things up (e.g., +turn off graphics mode). + +In addition to the graphics directories, minor changes were required in the +FIO, CLIO, and ETC directories. A new (internal) file type SPOOL_FILE was +added to FIO to support the wierd i/o required by the graphics system. +A new fset parameter was added to find out how man chars remain to be read +in the file buffer. CLOPEN and ZARDPS in CLIO were completely rewritten to +permit bidirectional i/o on the graphics streams and to add support for all +three graphics streams. A new stream PSIOCTRL was added; this is used by GIO +to send control instructions to connect subkernels to graphics streams, save +and restore WCS, and so on. CLOPEN will now direct graphics output to the +null file if a task is run standalone, thus preventing garbage from being +written to the terminal in debug mode. + +------------ +From: /u2/davis/ Mon 16:26:44 01-Apr-85 +Package: images +Title: imsurfit + +The task imsurfit have been moved from the local to the images +directory. New parameters to permit pixel rejection and region +growing have been addded. The user has the option of fitting selected +columns, rows, subsections or a border around the image. + +------------ +From: /u2/tody/ Wed 15:56:57 03-Apr-85 +Package: cl +Title: parameter indirection + +The metacharacter used to indicate parameter indirection has been changed +from @ to ) to eliminate confusion with list file indirection in a filename +template. For example, try setting the CL parameter "s1" to ")version", +i.e., and the command "=s1" will cause the value of "version" to be printed. + +------------ +From: /u2/tody/ Wed 15:59:39 03-Apr-85 +Package: vops +Title: additions to VOPS + +Two new vector operators have been added to the VOPS package. The ACNV +operator convolves a data vector with a kernel of the same datatype. +The ACNVR operator is similar but the kernel is always of type real. + + acnv[silrd] (a, b, npix, kernel, kpix) + acnvr[silrd] (a, b, npix, kernel, kpix) + +where + a[] pixel array of length npix+kpix-1 + b[] pixel array of length npix (output, accumulated) + kernel[] convolution kernel, type pixel or real + +For kpix=5, b[1] would be set to b[1] plus the dot product of the 5 point +kernel and the 5 points a[1:5]. The one dimensional convolution operators +may easily be used to implement higher dimensional convolutions. + + +### Revision 1.5 Wed Apr 3 23:59:56 MST 1985 + +------------ +From: /u2/tody/ Sun 17:30:28 07-Apr-85 +Package: system +Title: miscellaneous bug fixes + +A number of bug fixes were made to the system following written bug reports +from STScI (for the VMS port) and CTIO (for the AOS port). All bugs reported +by STScI were fixed with the exception of the asynchronous file i/o bug, +which will be easier to track down later when we have a system with asynch. +i/o. In particular the SPP bug which caused '&&' to be replaced by 'jiand' +has been fixed, hence it will no longer be necessary to use the typed functions +andi(), etc. in the VMS version of the system. The same bug would have cropped +up in AOS. + +The bugs reported by STScI are summarized in their report, which is reproduced +below. I have added comments enclosed in brackets, i.e., [[ ... ]]. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +From stsci Thu Jan 17 08:30:15 1985 +Received: by lyra.noao.UUCP (4.12/4.7) + id AA10600; Thu, 17 Jan 85 08:30:03 mst +Date: Thu, 17 Jan 85 08:30:03 mst +From: stsci (Space Telescope ) +Message-Id: <8501171530.AA10600@lyra.noao.UUCP> +To: tody +Status: R + + ------------------------ + NOTES file for IRAF (VMS) + ------------------------ + + +Contents: + 1. Bugs + + 2. Portability Considerations + + 3. Source file name changes + + +------------------------------------------------------------------------------- + + +1. Bugs + + /pkg/cl/bkg.c + In rbkgfile(), following fix: + ... fgets (set, fp) ... TO + ... fgets (set, SZ_LINE, fp) ... + + /sys/libc/qsort.c -- qcmp() --> (*qcmp)() + /sys/libc/cfilbuf.c -- filbuf() --> (*filbuf)() + + /sys/vops/advz.x -- '$t' missing for generic function + /sys/vops/advz*.x -- procedure advz[idx...] + + (extra files ?) + /sys/vops/ak/aif*.x -- aiftrrr.x + /sys/vops/ak/aff*.x -- afftrxx.x, afftxrr.x, afftxxx.x + /sys/vops/ak/acjgx.x -- acjgxx.x + + /sys/fio/fdebug.x -- "int and()" statement missing + /sys/fio/fputtx.x -- "int and()" statement missing + /sys/fio/fgetfd.x -- "int or()" statement missing + + /pkg/cl/pfiles.c -- pfcopyback() + 'pt' was going NULL before 'pf' in a for loop check; + was changed to check for 'pt' being NULL instead of 'pf' + + /pkg/cl/builtin.c, binop.c, bkg.c, history.c, lexicon.c, + debug.c, errs.c, exec.c, pfiles.c + + problem getting to next task by doing 'tp++'; due to VMS + alignment of structures. Fixed with a macro definition in + /pkg/cl/task.h for "next_task()", namely: + + #define next_task(tp) \ + ((struct task *)((unsigned)tp + (TASKSIZ * BPI))) + #define prevtask next_task(currentask) + +[[ not fixed; will be fixed when CL2 is merged (dct) ]] + + + /pkg/help/lroff/output.x -- references constant MAX_INT + "include <mach.h>" statement missing + + /pkg/lists/tokens.x -- last_nscan() --> last_nscan + + SPP/RPP compiler bug -- + + define and jiand (e.g. in <iraf.h>) + + if (x == FIVE && y == SIX) ... (SPP) + if (x == FIVE & y == SIX) ... (RPP) + if (x .eq. 5 .jiand. y .eq. 6) ... (FORTRAN) + + only occurs when a macro is replaced before the '&&', + in this case FIVE. + +[[ see spp/rpp/rpprat/pbstr.r for fix ]] + + /sys/fio/vfnmap.x + vfnunmap() -- when an OS extension was (un)mapped to a null + IRAF extension, the character count returned + was not right: + (e.g.) doc.dir --> doc but nchars = 7 + This caused problems later on in the directory + task of the system package. + The fix: + ... { + vfn[extn_offset-1] = EOS + op = extn_offset - 1 <-- was missing + } ... + + /sys/fio/vfntrans.x + filename mapping for directories sometimes doesn't work; + sys$ --> drb4:[irafx.sys]sys instead of + drb4:[irafx.sys] + made a quick fix in zopdir() and zfchdr() to deal with this + for now; can't seem to locate the exact problem in vfntrans.x + +[[ this was fixed sometime ago ]] + + /sys/fio/vfnmap.x + When deleting a file and the parameter subfiles=yes, and + no mapping file is currently in directory, a null mapping + file is (sometimes) created. Then doing a system.directory + fails when trying to read this null mapping file. + + E.g. cl> delete aaabbb.ccc + subfiles=yes (default .par file) + + delete() is called with 'aaabbb.ccc' and then + 'aaabbb.ccc.zsf', which is degenerate; + therefore, if a mapping file doesn't + exist, it is created. + + Haven't fixed this yet; not sure about the best way to go. + Some simple suggestions: + + -- Could somehow figure out whether the file is being + added or deleted (i.e. was vfnmap() called from + vfnadd() or vfndel()?). + + -- Or, whenever a mapping file is created, it has the + appropriate header info in it rather than being null? + + -- Or, some special case of reading null mapping files? + +[[ the mapping file is now deleted if it contains no filenames ]] + + /sys/etc/environ.x + env_hash() + return (sum**2 / CONSTANT) + + causes integer overflow on VMS; changed to: (for now) + return ( int( float(sum) / CONSTANT * float(sum) ) ) + +[[ changed to sum / constant * sum ]] + + arithmetic overflows: + /sys/etc/urand.x and others... + + These seem to occur in a few places, sometimes purposely. + An easy VMS fix is to use "FORTRAN/NOCHECK file", but it's + a pain to have to remember which files need this special + treatment. + +[[ no action; overflow in URAND is not supposed to happen ]] + + /sys/fio/ + Seems to be a bug in the file i/o related to writing + asynchronously to binary files. In VMS, this is REALLY + asynchronous, and it caused problems when trying to write + the help database; making VMS do it synchronously (like + UNIX) fixed the problem, for now anyway. + + It may be that a single buffer is being played with between + the write and the wait; at least that's what it looks like + in some of the binary files that were written -- there were + missing blocks and misaligned data, which were there when + displayed on the terminal. + + I don't think it's a problem with RMS, since double buffering + was used to test the binary file driver, with success. + +[[ no action ]] + + /pkg/system/directory.x + - call strcat ("$", Memc[template]) --> + call strcat ("$", Memc[template], SZ_FNAME) + + - should sort and output the file name list ONLY + if (nfiles > 0) + otherwise, an "adjustable array error" occurs in qsort() + (i.e. an array with dimension of 0 is passed to qsort, + causing VMS to complain) + + +------------------------------------------------------------------------------- + + +2. Portability Considerations + + + (life would be easier if most source files and include files did + not need to be mapped ... especially C source files) + + -- no underscores + -- only alphanumeric + -- case insensitive (i.e. lower case) + -- (9 chars).(3 chars) + + (Notes: Some source file names and references to include files + had to be changed to create the filename mapping in the + first place, see list below. + + This is not so crucial now, since XC and XPP have been + written/modified to handle filename mapping. But, it + still does cause problems when making bug fixes to source + files with degenerate names and trying to keep track of + them with RCS. Of course, 99% of the mapping problems will + disappear with VMS V4.0.) + +[[ I am considering eliminating all nonportable filenames in the system ]] +[[ directories, though not in the applications directories. This would ]] +[[ make it easier to move the system software, and once the system is up ]] +[[ the system itself would map the filenames in the applications programs. ]] + + also, directories should be case insensitive: + /sys/vops/AK --> ak + /sys/vops/LZ --> lz + +[[ subdirectory names in VOPS, IMIO changed to lower case ]] + + sys/libc/cfilbuf.c -- filbuf --> vfilbuf (VMS) + since 'FILBUF' gets translated to + 'filbuf' on VMS, not 'filbuf_', + which causes a conflict: + FILBUF and (*filbuf)() + + + SPP coding conventions that cause problems for VMS FORTRAN compiler: + +[[ the following are all bugs, not SPP features; all have been fixed ]] + + a) multiple declarations, e.g. + + int ip + ... + int ip, this, that + + files: /sys/fmtio/ctoi.x + /sys/fmtio/sscan.x + /sys/fmtio/chdeposit.x + /pkg/system/sort.x + + b) 'real' function, e.g. + + real (dval, 0) --> real (dval, 0.0) + /sys/fmtio/gctod.x + + c) array declarations in procedures, e.g. + + procedure proc1 (array, count) + type array (count) + int count # should be BEFORE array declaration + # (tries to use 'count' as a REAL) + /sys/fmtio/patmatch.x + /pkg/utilities/t_translit.x + makeset(), filset() + +[[ all such arrays that I could find are now dimensioned ARB ]] + + and(), or(), not() --> andi(), ori(), noti() ??? + lots of references in /sys/fio/ to these procedures + (added them for VMS, using andi(),...) + xor() referenced in /sys/vops/...axorki.x + (added xor() for VMS, using xori()) + + FIO + file mode "APPEND" -- create the file if non-existent?? + UNIX (and now VMS) do this automatically, but system + reference document isn't clear about this. Without this + feature, /pkg/system/bugmail.cl and revisions.cl don't work. + +[[ kernel should create nonexistent file opened in APPEND mode ]] + + I/O drivers + ZMAIN passes the EPA of the read driver to IRAF_MAIN() ... + + This is OK in UNIX (and VMS, for now), but may have cases + where I/O is to different devices and the drivers are NOT + compatible. (I don't know enough of the internals of + other operating systems to say for sure that this is a + problem, but it seems like it could be.) + + Eg. STDIN from a file and STDOUT to terminal + + If the file and terminal drivers are incompatible, then + things won't work. We may eventually have some problems + in this area with VMS, especially if we start to support + some network I/O access. Eventually, we may store the + actual read/write function in the channel structure and + check it whenever a read/write function is called; that is, + override the higher level IRAF I/O at the kernel level. + +[[ this is unlikely to be a problem and can be fixed at kernel level if nec ]] + + zardlp() function referenced in /sys/etc/lpopen.x ?? + (added dummy function for VMS) + +[[ no action ]] + + modf() function used in /pkg/cl/unop.c + was missing from /sys/libc/ + (added modf.mar to /sys/os/ for VMS) + +[[ call to modf deleted; modf.mar should be removed from kernel ]] + +------------------------------------------------------------------------------- + + +3. Source file name changes + + + /pkg/softools/boot/spp/xpp/xpp_main.c --> xppmain.c + +[[ removed underscore in C file name ]] + + Necessary for file name mapping: + + /sys/memio/ty_size.dat --> tysize.dat + + /sys/memio/coerce.x, salloc.x, sizeof.x + include "ty_size.dat" --> include "tysize.dat" + + +[[ used "include <lib$szdtype.dat>" ]] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + +In addition, Nelson Zarate at CTIO reported the following minor bugs which +I have fixed. The AOS port is only just beginning. Once again a lot of +code compiled with only a few errors. + + [1] libc$cfredir.c + redundant "int fd" declaration. + + [2] libc$cfilbuf.c, libc$qsort.c + pointer to function returning pointer to int problem + + [3] softools$boot/spp/rpp/rppfor/indent.f77 + local variable LOGICO redefining common variable of the same name. + + [4] softools$boot/spp/rpp/ratlibf/catsub.f + array argument declaration out of order, as reported by ST in + other parts of the system. + + [5] softools$boot/spp/rpp/ratlibc/ create.c,open.c + reference to UNIX stdio hidden structure field _file. Replaced + by use of "fileno(fp)". + + +### Revision 1.6 Mon Apr 8 22:27:58 MST 1985 + +------------ +From: /u2/tody/ Wed 10:15:40 10-Apr-85 +Package: softools +Title: bug in the SPP compiler + +A bug was fixed in the first pass of the SPP compiler as a result of the +effort to get IRAF running on the Jupiter supermicro system at JPL. The +bug would cause a spurious "too many strings" error to occur during the +processing of a large number of include files. + +------------ +From: /u2/tody/ Mon 21:44:33 15-Apr-85 +Package: sys +Title: use of ENTRY statement considered harmful + +In trying to port IRAF to the Jupiter / 4.2BSD system I found that the +F77 compiler on that system could not compile ENTRY statements. This is +not the first time I have had trouble with compilers and entry statements, +hence I was forced to conclude that use of such statements compromises the +portability of our software, despite the fact that entry statements are +part of the Fortran 77 standard. I have removed all the entry statements +from the files in the sys$ directories (the system libraries), and am in +the process of removing them from HELP and XTOOLS (the latter so that I can +compile the images package). Hereafter the use of ENTRY statements in +SPP or Fortran code in IRAF is discouraged. + +------------ +From: /u2/tody/ Thu 00:21:31 25-Apr-85 +Package: gio +Title: new version of NSPP kernel installed + +The latest version of the NSPP/GIO kernel has been installed. This version +differs from the previous one primarily in the way it handles put cell array. + +------------ +From: /u2/tody/ Thu 00:22:52 25-Apr-85 +Package: clio,gio +Title: nasty bug found and fixed + +The nasty bug that was keeping cursor mode SNAP from working has finally +been found and fixed. The recent removal of ENTRY statements caused this +bug (a memory overwrite bug) to resurface as a cascade of "Warning: cannot +delete file" messages when writing to STDPLOT or PSIOCTRL (bug reported by +both Dyer and Suzanne). In this form it was straightforward to find and fix. +The bug dates back to the addition of the pseudofiles STDIMAGE, STDPLOT, and +PSIOCTRL to the pseudofile i/o code in CLIO. The parameter defining the +number of pseudofiles was not increased to allow for these new files, +causing a write off the end of an array. + +All graphics applications programs should be relinked to capture the bug +fix. All such programs are currently overwriting either part of the FIO or +environment list data structures, depending on how they are being used. + +------------ +From: /u2/tody/ Thu 11:11:36 25-Apr-85 +Package: softools +Title: XCOMPILE enhancement + +The XC task will now produce, by default, an output executable file with +extension ".e", unless the output file name is explicitly set on the command +line with the "-o" switch. + +------------ +From: /u2/tody/ Thu 22:22:50 25-Apr-85 +Package: graphcap +Title: dicomed device entry + +The graphcap entry for the dicomed device has been modifed to use the NSPP +kernel, allowing it to drive the physical dicomed device. Formerly the +output was directed to the gkidecode kernel since the low level code was +not then working. + +------------ +From: /u2/tody/ Thu 22:24:51 25-Apr-85 +Package: gio +Title: cursor mode enhancements + +1. Snap + + The SNAP function in cursor mode is now fully functional. The cursor mode +snap makes a hardcopy of the graphics on your screen on a batch plotter, e.g., +the imagen or versatec. This gives a much higher resolution plot then is +achievable with a video hardcopy device, and of course snap works from any +graphics terminal. The snap will work at any magnification and will capture +key A style axes, T or D text and lines, etc. Syntax is + + :.snap [device] + +where [device], if absent, defaults to stdplot or to the device currently +connected to the STDPLOT graphics stream, if any (type :.sh to check the +status of the streams). For example, + + :.sn imagen + +makes a snap on the imagen, and + + :.sn + +is the shortest form of the command. It takes only a fraction of a second +to make a snap, but it may take several minutes for it to appear on the +plotter. Versatec snaps are much more expensive to generate than imagen +ones due to the need to digitize the plots (but the versatec makes prettier +plots). Avoid generating a lot of snaps to the versatec all at once, or you +will swamp the VAX with "vplot" rasterization tasks. SNAP does a frame +advance after each snap, hence there is no buffering of the last snap in +the kernel, as is the case for ordinary output to STDPLOT. + + +With the implementation of SNAP cursor mode is now fully functional. I do +plan, however, to add a DISPOSE function to flush the last plot out of +STDPLOT. There are also still some bugs in the cursor mode code waiting +to be fixed, e.g., =gcur before any graphics does not currently work, +nor does it work after a :.init. The backup and undo commands, used to +discard graphics instructions, do not always erase the graphics at present +(a full screen redraw will however show that the line or text string is +gone). + + +2. Waitpage + + The [hit return to continue] wait is now implemented as a text mode +getline rather than as a cursor read. The cursor read would cause a switch +to graphics mode, blanking the text memory on some terminals (giving the +user no chance to read the text). + + +------------ +From: /u2/tody/ Thu 22:42:47 25-Apr-85 +Package: gio +Title: nspp kernel + +The NSPP kernel will now generate lines of different widths. More precisely, +linewidths less than 1.5 are drawn in "low" intensity, and everything else +is drawn in "high" intensity. By default, the axes and tick labels of a plot +are drawn in high intensity and the data in low intensity. Variable lien +widths are not currently supported for the imagen and dicomed. + +------------ +From: /u2/tody/ Fri 17:38:19 26-Apr-85 +Package: gio +Title: more bug fixes + +The "write to IPC with no reader" bug, which would formerly appear at logout +after a write to a plotter device, has been fixed. The bug was in the IRAF +Main, i.e., file etc$main.x. GIO calls ONEXIT to post a procedure which +is supposed to shutdown the graphics system at process exit. The procedure +posted by ONEXIT was not getting called, however, until the main called +the FIO cleanup procedure, which would close down the graphics kernel +rudely, causing the error messages. The main has been modifed to call the +ONEXIT procedures before cleaning up FIO. + +Typing "=gcur" at login, before generating any graphics, now works. The +graphics kernel was being opened but the open workstation command was not +being sent to the kernel, hence an attempt to read the cursor would cause +EOF to be returned. + +A new builtin task called GFLUSH has been added to the CL package language. +This may be called to flush any graphics buffered in STDPLOT to the plotter. + +------------ +From: /u2/tody/ Sat 15:12:41 27-Apr-85 +Package: gio +Title: new command .gflush + +A new : escape ":.gflush" has been added to the cursor mode escapes. This is +the cursor mode equivalent of the "gflush" command in the CL, permitting +disposal of plotter output from within cursor mode w/o having to exit to the +CL. + +------------ +From: /u2/tody/ Mon 09:40:45 29-Apr-85 +Package: fmtio/str +Title: string sorting utility + +A new procedure has been added to the STR subpackage of FMTIO for sorting +arrays of strings. + + strsrt (strp, sbuf, nstr) + + int strp[ARB] # array of indices of strings + pointer sbuf # pointer to string buffer + int nstr # number of strings + +Sorting is carried out by permutation of the indices of the strings in STRP. +String storage is in SBUF. + +------------ +From: /u2/davis/ Mon 11:05:43 29-Apr-85 +Package: dataio +Title: rfits,wfits mods + +WFITS will now store the IRAF image name in the FITS parameter IRAFNAME. +RFITS will optionally restore image files to disk with the old IRAF name +if the parameter oldirafname is set. A new parameter scale has been added +to RFITS. If the scale switch is set to no RFITS will dump the FITS integers +directly to tape regardless of the value of bscale and bzero. Otherwise +RFITS will check the bscale and bzero factors before deciding whether or +not to scale the data. + +------------ +From: /u2/tody/ Mon 22:48:03 29-Apr-85 +Package: fmtio +Title: bug fix in patmatch + +PATMATCH was found to be grossly inefficient for a match at the beginning +of a line, and was optimized accordingly. + +------------ +From: /u2/davis/ Tue 14:31:06 30-Apr-85 +Package: images +Title: new 2-D shift operator + +A new task IMSHIFT has been added to the images package. IMSHIFT will shift +an image by fractional pixel shifts in both x and y using a set of 2-D +interpolation routines. See the help file for more info. + +------------ +From: /u2/tody/ Mon 22:36:38 06-May-85 +Package: cl +Title: bug fix affecting i/o redirection + +A bug was discovered that would cause commands of the form + + task < file + +to fail. In such a case, the CL would open "file" as a binary file rather +than as a text file, causing every other character to be discarded on our +machine. The bug was due to a typo in exec.c with the operator "*" typed +when "&" was meant (see the code which sets the STDINB flag). + +------------ +From: valdes$iraf/ Wed 16:13:37 08-May-85 +Package: imred +Title: bias package + +There has been a great deal of confusion about removing bias from CCD +images. This has led to use of several different IRAF operators for +this purpose. In particular a contant bias subtraction and a line-by-line +bias subtraction have been used. Neither of these is correct. The bias +does vary (at least for some detectors) so a constant is not appropriate. +However, line-by-line subtraction introduces noise because the bias +variations are expected to be low frequency. After discussion with George +Jacoby and Roger Davies the following approach seems to be the correct one. +For this discussion assume that the bias region occupies a set of columns. +Average the bias columns to produce an average bias column. Fit a function +of the line number to the average bias column. Subtract this average function +from each column of the image. Note that this method encompasses the constant +bias and high frequency line-by-line subtraction with a suitable choice +of the fitting function (i.e. a polynomial of order 1 or a very high +order function respectively). + +I have implemented this algorithm using the general curve fit package with +interactive extensions. In the imred package there is a package called +bias. In the bias package are two tasks colbias and linebias. Help +information is available for these tasks. Because trimming of the bias +region and unwanted portions of the image is very commonly desired +and can result in considerable savings in execution time these tasks +provide for specifying a "trim" region to be bias subtracted and output. +The tasks can be run non-interactively, interactively, or partially +interactive and partially non-interactive. + +I would like to remove the following tasks from the imred.generic package: + +dcbias, btt, chimages, biassub + +If there are no objections I will do this in a week or so. + +------------ +From: /u2/tody/ Wed 23:50:51 08-May-85 +Package: plot +Title: additions to IMPLOT task + +The IMPLOT task has been modified to generate a two line plot title, the first +line of which tells whether the plot is a line or column plot, gives the line +or column number (or numbers in the case of an average), and gives the image +name. The image title appears on the second line. + +The :l and :c commands now permit a second numeric argument. If two numeric +arguments are given, the indicated range of lines or columns will be averaged. + +------------ +From: valdes$iraf/ Thu 14:27:51 09-May-85 +Package: curfit +Title: New stat procedures + +Two procedure have been added to the curfit package. These are +CVSTATI and CVSTATR. They are used to get parameters from the +curfit package. The parameter macro values are defined in curfit.h. +The parameters currently defined are: + +define CVTYPE 1 # curve type +define CVORDER 2 # order +define CVNSAVE 3 # Length of save buffer +define CVXMIN 4 # minimum ordinate +define CVXMAX 5 # maximum ordinate + +Primary usages are to get the length of the buffer needed for a CVSAVE +and to determine the properties of a curve which has been restored +by a CVRESTORE. + +------------ +From: /u2/tody/ Thu 18:07:47 09-May-85 +Package: images +Title: minor mod to HEDIT + +The interactive verification feature of HEDIT has been slightly modified +since some users turned out to be confused by the original way things were +done. One can now respond to the field update query with either "yes" or +"no", in addition to explicitly entering a new value string. Either "yes", +"y", or carriage return serves to accept the prompted value. + +A editing sequence involving many images can now be terminated prematurely +by typing "q" in response to the "update header" query given after all +fields in a particular image have been edited. The task will exit +immediately without editing the remaining images. + +------------ +From: /u2/tody/ Thu 22:12:31 09-May-85 +Package: imio +Title: new release of IMIO installed + +A new release of IMIO was installed in the system on 29 April. The major +changes in the new version of IMIO are summarized below. + + [1] IMIO now has the ability to perform (optionally) automatic boundary + extension to satisfy out of bounds pixel references. + + [2] A preliminary database interface has been added to IMIO. Image headers + are now variable length and use only the amount of disk space required + to store the header (excluding byte packing). + + [3] Two new database utility tasks HEDIT and HSELECT have been added to + the IMAGES package. Both use the new library subroutine EVEXPR, + now installed in the FMTIO package. + +The new release of IMIO is upward compatible with previous versions and should +require no changes to or even recompilation of existing code. The basic image +header structure is unchanged hence existing images and image headers are still +accessible. Copying of old images still on disk with IMCOPY may however be +desirable to reduce disk consumption (the old headers were wasteful of storage). + +This release of IMIO introduces some database tools and concepts which +should help us understand the role the DBIO interface and DBMS package will +play in image processing applications in the near future. The current database +interface has serious functional limitations and is inefficient for operations +which operate upon entire databases (e.g., the select operation), but does +provide a basic and much needed image database capability. + + +1. Modifications to the Current Interface + +1.1 Boundary extension + + Automatic boundary extension is useful in applications such as filtering +via convolution, since the convolution kernel will extend beyond the boundary +of the image when near the boundary, and in applications which operate upon +subrasters, for the same reason. When reading from an image with boundary +extension in effect, IMIO will generate artificial values for the out of bounds +pixels using one of the techniques listed below. When writing to an image +with boundary extension in effect, the out of bounds pixels are discarded. + +By default, an out of bounds pixel reference will result in an error message +from IMIO. Consider an image line of length 5 pixels. The statement + + buf = imgs1r (im, -1, 7) + +references out of bounds by 2 pixels on either end of the image line, +referencing a total of 5+2+2=9 pixels. If boundary extension is enabled +and the get section completes successfully then Memr[buf] will reference +the pixel at X = -1, and Memr[buf+2] will reference the first inbounds +pixel. + +When an image is first opened zero pixels of boundary extension are +selected, and any out of bounds references will result in an error. +To enable boundary extension imseti must be called on the open +image to specify the number of pixels of boundary extension permitted +before an out of bounds error occurs. + + include <imset.h> + call imseti (im, IM_NBNDRYPIX, 2) + +If boundary extension is enabled the type of boundary extension desired +should also be set. The possibilities are defined in <imset.h> and +are summarized below. + + + BT_CONSTANT return constant if out of bounds + BT_NEAREST return nearest boundary pixel + BT_REFLECT reflect back into image + BT_WRAP wrap around to other side + BT_PROJECT project about boundary + + Types of Boundary Extension + + +The type of boundary extension is set with the imset parameter IM_TYBNDRY. +If the BT_CONSTANT option is selected the constant value should be set with +an imseti or imsetr call to set the parameter IM_BNDRYPIXVAL. +Boundary extension works for images of any dimension up to 7 (the current +IMIO limit). A single IM_NBNDRYPIX value is used for all dimensions. +This value is used only for bounds checking, hence the value should be set +to the maximum out of bounds reference expected for any dimension. +Larger values do not "cost more" than small ones. An actual out of bounds +reference is however more expensive than an inbounds reference. + + +1.2 Image Database Interface + + The image database interface is the IMIO interface to the database +containing the image headers. In this implementation the image header is +a variable length binary structure. The first, fixed format, part of the +image header contains the standard fields in binary and is fixed in size. +This is followed by the so called "user area", a string buffer containing +a sequence of variable length, newline delimited FITS format keyword=value +header cards. When an image is opened a large user area is allocated to permit +the addition of new parameters without filling up the buffer. When the +header is subsequently updated on disk only as much disk space is used as +is needed to store the actual header. + +The new header format is upwards compatible with the old image header format, +hence old images and programs do not have to be modified to use the latest +release of IMIO. In the future image headers will be maintained under DBIO, +but the routines in the image header database interface described in this +section are not exected to change. The actual disk format of images will of +course change when we switch over to the DBIO headers. While the physical +storage format of header will change completely under DBIO, the logical schema +will change very little, i.e., our mental picture of an image header will be +much as it is now. The main difference will be the consolidation of many +images into a few files, and real support in the image header for bad pixels, +history, and coordinate transformations. In addition a number of restrictions +on the "user fields" will be lifted, the remaining distinctions between the +standard and user fields will disappear, and database operations will be much +more efficient than they are now. + + +1.2.1 Library Procedures + + The IMIO library procedures comprising the current image database interface +are summarized in the table below. + + + value = imget[bcsilrd_] (im, field) + imgstr (im, field, outstr, maxch) + imput[bcsilrd_] (im, field, value) + impstr (im, field, value) + imadd[bcsilrd_] (im, field, def_value) + imastr (im, field, def_value) + imaddf (im, field, datatype) + imdelf (im, field) + y/n = imaccf (im, field) + + list = imofnl[su] (im, template) + nchars/EOF = imgnfn (list, fieldname, maxch) + imcfnl (list) + +where + pointer im, list + char[] field, outstr, datatype, template, fieldname + + + Image Database Interface Procedures + + +New parameters will typically be added to the image header with either +one of the typed imadd procedures or with the lower level imaddf +procedure. + +The former procedures permit the parameter to be created and the value +initialized all in one call, while the latter only creates the parameter. +In addition, the typed imadd procedures may be used to update the values +of existing parameters, i.e., it is not considered an error if the parameter +already exists. The principal limitation of the typed procedures is that +they may only be used to add or set parameters of a standard datatype. +The imaddf procedure will permit creation of parameters with more +descriptive datatypes (abstract datatypes or domains) when the interface is +recut upon DBIO. There is no support in the current interface for domains. + +The value of any parameter may be fetched with one of the imget functions. +Be careful not to confuse imgets with imgstr (or imputs with impstr ) +when fetching or storing the string value of a field . Full automatic type +conversion is provided. Any field may be read or written as a string, +and the usual type conversions are permitted for the numeric datatypes. + +The imaccf function may be used (like the FIO access procedure) +to determine whether a field exists. Fields are deleted with imdelf ; +it is an error to attempt to delete a nonexistent field. + +The field name list procedures imofnl[su] , imgnfn , and imcfnl procedures +are similar to the familiar file template facilities, except that the @file +notation is not supported. The template is expanded upon an image header +rather than a directory. Unsorted lists are the most useful for image header +fields. If sorting is enabled each comma delimited pattern in the template +is sorted separately, rather than globally sorting the entire template after +expansion. Minimum match is permitted when expanding the template, another +difference from file templates. Only actual, full length field names are +placed in the output list. + + +1.2.2 Standard Fields + + The database interface may be used to access any field of the image header, +including the following standard fields. Note that the nomenclature has been +changed slightly to make it more consistent with FITS. Additional standard +fields will be defined in the future. These names and their usage may change +in the next release of IMIO. + + + keyword type description + + i_ctime l time of image creation + i_history s history string buffer + i_limtime l time when limits (minmax) were last updated + i_maxpixval r maximum pixel value + i_minpixval r minimum pixel value + i_mtime l time of last modify + i_naxis i number of axes (dimensionality) + i_naxis[1-7] l length of an axis ("i_naxis1", etc.) + i_pixfile s pixel storage file + i_pixtype i pixel datatype (SPP integer code) + i_title s title string + + + +The names of the standard fields share an "i_" prefix to reduce the possibility +of collisions with user field names, to identify the standard fields in +sorted listings, to allow use of pattern matching to discriminate between the +standard fields and user fields, and so on. For the convenience of the user, +the "i_" prefix may be omitted provided the resultant name does not match the +name of a user parameter. It is however recommended that the full name be +used in all applications software. + + +1.2.3 Restrictions + + The use of FITS format as the internal format for storing fields in this +version of the interface places restrictions on the size of field names and +of the string value of string valued parameters. Field names are currently +limited to eight characters or less and case is ignored (since FITS requires +upper case). The eight character limit does not apply to the standard fields. +String values are limited to at most 68 characters. If put string is passed +a longer string it will be silently truncated. Trailing whitespace and +newlines are chopped when a string value is read. + + +2. Database Utility Tasks + + Two image database utility tasks have been implemented, hedit and +hselect. Hedit is the so called header editor, used to modify, add, or +delete selected fields of selected images. The hselect task is used to +select images that satisfy a selection criteria given as a boolean +expression, printing a subset of the fields of these images on the +standard output in list form. + +Both of these tasks gain most of their power from use of the evexpr +utility procedure, now available in FMTIO. The evexpr procedure takes +as input an algebraic expression (character string), parses and evaluates +the expression, and returns as output the value of the expression. + + + include <evexpr.h> + pointer evexpr() + + o = evexpr (expr, getop, ufcn) + +where + o Is a pointer to an operand structure + expr Is a character string + getop Is either NULL or the locpr address + of a user supplied procedure called during + expression evaluation to get the value of + an external operand. + ufcn Is either NULL or the locpr address + of a user supplied procedure called during + expression evaluation to satisfy a call to + an external function. + + +The operand structure is defined in <evexpr.h> . The best documentation +currently available for the operators and functions provided by evexpr +will be found in the manual page(s) for hedit . Additional documentation +will be found with the sources. The expression evaluation procedure is +probably the single largest procedure in the system (in terms of kilobytes +added to an executable) and should not be used unless it is needed, but it can +greatly increase the power of a task in the right application. + +------------ +From: /u2/tody/ Fri 20:32:55 10-May-85 +Package: gio +Title: spooling of plotter output + +Plotter output is now spooled many plots to a metafile rather than being +processed to the plotter a plot at a time. You will no longer get a plot +out immediately after a cursor mode snap. Spooling many plots into a single +metafile is much more efficient, reduces the load on the system, and produces +more pleasing output since the plots will come out on successive pages of +paper as a single print job (with no wasted paper). All plotter output is +spooled, e.g., cursor mode snaps, plots written to devices such as "stdplot", +"vup", "imagen", etc., and plots written to the dicomed (e.g., by crtpict). +Versatec plots are also now more closely centered on a page (formerly part +of the plot would be in the perforations between pages of paper). + +The spooled plotter output will be disposed of to the plotter device when +any of the following events occur: + + [1] When you type the command "gflush" in the CL, or enter colon escape + ":.gflush" while in cursor mode. A ":.init" will also do it. + + [2] When you log off. + + [3] When the graphics device assigned to the stream STDPLOT changes. + This happens when a new device name is assigned to the "device" + parameter of a graphics task which writes to STDPLOT, or when + you make a "snap" on a different device. + + [4] When the "maximum frame count" for a device is exceeded. This can + be specified individually for the different plotter devices, with + the default value currently being 16 frames per metafile. This is + enough frames to make things efficient, but not so many that we + run out of disk space or lose everything in a system crash. + +If the system should crash before plotter output is disposed of to the system, +the metafile should still be intact in the /tmp directory (e.g., "/tmp/gvp...") +and may be disposed of manually with a command such as the following (this +would plot on the upstairs versatec): + + plotX -Tver -W=3 /tmp/gvp* | plot -Tver -M75 -Pvup + +These comments apply only to the plotter devices. The plotter (NSPP) devices +currently supported are the following: + + calcomp + dicomed + imagen + versatec + vdown + vup + +------------ +From: /u2/tody/ Sat 00:23:44 11-May-85 +Package: gio +Title: bug fix, log scaling, etc. + +A serious bug in pseudofile i/o to STDPLOT (gio$cursor/prpsio.x) was preventing +plots written to STDPLOT by a task from being sent properly to the NSPP kernel. +This was fixed and in addition, the following enhancements were made: + + [1] Log ticks are now labelled as powers of 10 rather than in linear units, + i.e., as a 10 followed by the exponent one half character higher. + + [2] The EPSILON tolerance test in FP_EQUAL[DR] and FP_NORM[DR] was relaxed + to 10*EPSILON to make these routines useful in real life situations + where there is typically a small accumulation of error to be allowed + for. + +------------ +From: /u2/tody/ Sun 20:19:38 12-May-85 +Package: plot +Title: graphics kernels added to PLOT package + +The three existing graphics kernels have been added to the PLOT package as +the following tasks: + + gkidecode + stdgraph + stdplot + +These tasks are used to process metacode, either from a file or from the +standard input (e.g., from a pipe). At present, however, there is no way +to redirect a graphics stream on the command line. + +In the process of installing these tasks the name of the old NSPP task was +changed to STDPLOT. These tasks will already be useful for metacode +translation. In the future the CL i/o redirection syntax will be extended +to permit redirection of graphics output, e.g., + + plottask arg arg | stdplot dev=vup cell+ + +------------ +From: /u2/tody/ Thu 10:08:43 16-May-85 +Package: gio +Title: degenerate windows + +If a window (world coordinate system) is degenerate in either axis GIO will +now increase the upper limit of the window in steps of EPSILON until there +is enough separation between the edges of the window to define the coordinate +system. Formerly GIO would take an error action ("no range in [XY]") when +given a degenerate coordinate system. + +------------ +From: valdes$iraf/ Fri 13:37:34 17-May-85 +Package: lib +Title: Subdirectory for include files of xtools + +To keep the lib directory managable we plan to make subdirectories of +lib available as standard search places for include files and libraries. +As a start include files for the xtools procedures have been placed in +the subdirectory xtools. Currently these include files must be +reference with an OS path name. This will change later to be OS +independent. The usage (in UNIX) is: + + include <xtools/icfit.h> + +------------ +From: valdes$iraf/ Fri 13:42:33 17-May-85 +Package: xtools +Title: New xtools + +Three packages of xtools have been added to xtools. These packages are +in subdirectories of xtools. The new xtools are as follows. + +ranges (rg_ prefix procedures): + + A ranges package using : as the range delimiter (like image sections) +and without steps. It contains tools for parsing ranges, merging ranges, +ordering ranges, packing and unpacking arrays, and doing median and averaging +of sets of points within ranges. It is used in the icfit tools and in +some of the longslit tasks. Indirectly through icfit it is used in a number +of other tasks. + +gtools (gt_ prefix procedures): + + Graphics tools. These tools provide for printing help files in response +to : cursor commands, paging (clearing the terminal) text, and tools to use +a structure containing window and axis transformation parameters. These +tools are used in icfit and indirectly through icfit in a number of tasks. + +icfit (ic_ and icg_ prefix procedures): + + Interactive curve fitting. These tools provide a somewhat higher level +interface to the curfit math package. It has been designed to be efficient +and to use a set of standard parameters (sample points, median and subsample +averaging, functions, orders, deviant point rejection, and rejection growing. +A subset of the package provides an interactive GIO interface. These tools +are used in linefit, lineclean, identify, response, illumination, background, +linebias, colbias, lineflat, colflat, linebckgrnd, and colbckgrnd in the +images, longslit, bias, and generic packages. A good example of usage is +t_linefit.x in the images package. + + The source code is moderately well commented but there is little other +documentation as yet. Include files for the various set and get calls are +in lib$xtools. If you have any interest in using them see Frank Valdes. + +------------ +From: valdes$iraf/ Fri 13:44:31 17-May-85 +Package: images +Title: Linefit and lineclean + +The linefit task has been changed again. It now has interactive graphics +options and is greatly simplified. The previous version tried to do too +many things and was difficult to understand. The new task fits image +lines and creates output images with the fit, the difference or residuals, +or the ratio of the image values to the fit values. Cleaning of deviant +pixels has been moved to the task lineclean (though elimination of bad +points from the fits is still available). There is no minimum +division threshold and no output column selection. It uses the icfit +tools for interactively setting the fitting parameters. + +A new task lineclean has been added to use curve fitting to detect and +replace deviant pixels. It is similar to linefit and uses the same icfit +tools and interactive fitting parameter approach. + +These tasks are also used in the generic scripts lineflat, colflat, +Linebckgrnd, and colbckgrnd. + +------------ +From: valdes$iraf/ Fri 13:45:48 17-May-85 +Package: generic +Title: Changes + +The generic package has been revised. The tasks dcbias, chimages, btt, +and biassub have been removed. Note that bias strip corrections are +available in the imred.bias package. The tasks lineflat, colflat, +linebckgrnd, and colbckgrnd have been changed to use the new linefit +task in the images package. + +------------ +From: valdes$iraf/ Fri 16:20:06 17-May-85 +Package: icfit +Title: Help for interactive graphics in icfit package + +Help for the cursor mode keys and colon commands in the interactive +graphics of the icfit package is available as ichelp. This package +is used in numerous tasks and this help page is relevent to all these +tasks: linefit, lineclean, colbias, linebias, colflat, lineflat, linebckgrnd, +colbckgrnd, identify, response, illumination, background. + +------------ +From: /u2/tody/ Wed 17:48:07 29-May-85 +Package: clpackage +Title: revision of the root package (clpackage) + +The DTOI package has been moved from the root to IMRED, where it more +properly belongs. The SDAS package has been added to the root and will +eventually contain the applications software from our friends at the +Space Telescope. + +------------ +From: /u2/tody/ Thu 00:57:22 30-May-85 +Package: plot +Title: IMPLOT enhancements + +A new keystroke 'e' has been added to IMPLOT to permit plot expansion with a +completely redrawn box (makes a prettier plot than the 'E' and 'A' keystrokes +in cursor mode). Two new colon escapes ":x x1 x2" and ":y y1 y2" have been +added to permit fixing of the plot scale in X or Y, disabling autoscaling. +A bug was fixed which was preventing log scaling from working. The ? help +text was moved out into the file "plot$implot.keys". The manual page was +updated. + +------------ +From: /u2/tody/ Thu 17:45:52 30-May-85 +Package: clio,fio +Title: filename templates + +The filename template expansion code has been rewritten with the results +outlined below. The external specifications of the packages involved have +not changed. + + [1] Sorting, if enabled, is now done only when expanding a pattern rather + than globally over the entire template. Thus a template such as + + *.h,*.x + + will be expanded with all the .h files first in alphabetical order, + followed by all the .x files in alphabetical order. File lists are + no longer sorted, e.g., forms "a,b,c", and "@filelist". + + [2] Template expansion is now substantially more efficient. One result + of this is that directory listings are now somewhat faster. + + [3] The new routine CLPREW has been added to the CLGFIL package. The + new entry point may be used to rewind the file list. + + [4] An OS escape syntax has been added to permit "quoting" if OS filenames + containing template metacharacters, e.g., $ and []. Anything enclosed + by OS escape characters, e.g., '!', is treated as a filename string. + Hence, templates such as + + !vmsdir$file!,!drb0:[dir]file! + or + !vmsfile + + are now permitted. The only effect of the ! are to turn metacharacters + off and back on; beyond that the ! are just stripped out. + + [5] A new "buffered" FNT package has been added, to permit convenient + filename template expansion for templates not necessarily bound to + CL string parameters. + + Procedures: + + fntopnb - Expand template, open a buffered filename list + fntclsb - Close buffered list + fntgfnb - Get next filename from buffered list + fntlenb - Get number of filenames in a buffered list + fntrewb - Rewind the list + + Calling sequences: + + list = fntopnb (template, sortflag) + fntclsb (list) + nchars|EOF = fntgfnb (list, outstr, maxch) + nfiles = fntlenb (list) + fntrewb (list) + + These entry points are provided only for extra flexibility. The old + CLPOPN[ISU] should continue to be used for the common case when the + template is a CL parameter, or when the list is associated with the + standard input, which might be redirected. + + +In other changes, the CLGFIL sources in CLIO have become somewhat smaller and +simpler. A couple include files were removed from CLIO. The FNT package was +moved from CLIO to FIO. + +------------ +From: /u2/tody/ Thu 18:19:17 30-May-85 +Package: gio +Title: bug fix to polymarker in NSPP kernel + +The polymarker function in the NSPP kernel turned out to be the same as +polyline; was changed to draw points rather than vectors. + +------------ +From: /u2/tody/ Fri 20:12:34 31-May-85 +Package: gio +Title: gio bug fix + +The GINIT procedure was using an invalid struct pointer to initialize the +current text attribute structure. + +------------ +From: /u2/tody/ Fri 20:14:09 31-May-85 +Package: hedit,imio +Title: bug fix involving addition of parameters to image headers + +The image database interface routines in IMIO were not properly adding +new parameters to image headers. There were a couple of bugs, i.e., +the newline of the new record was being overwritten with a blank, and +the datatypes of string and numeric fields were not being set properly. +A bug was also fixed in HEDIT that would cause a cryptic "parameter not found" +message when attempting to "add" (edit) an existing image header parameter. +HEDIT will now invoke the edit function when an attempt is made to add +a parameter to an image that already contains such a parameter. + +------------ +From: /u2/tody/ Sat 20:07:58 01-Jun-85 +Package: gio +Title: new font installed in NSPP kernel + +The original character font of the NSPP kernel has been replaced by a new +font from NCAR/GKS. The new font is generally better than the old one, +particularly the lower case letters and certain digits, although there +appear to be certain characters in the new font which could stand some +tweaking (i.e., the characters ";:#"). Roman, bold, and italic versions +of the new font are available via gseti-G_TXFONT and \f[RIB] escape sequences +in text strings. + +------------ +From: /u2/tody/ Sun 18:37:36 02-Jun-85 +Package: gio +Title: postprocessing of metacode files + +The graphics kernels have been modified to permit processing of metacode +files which do not contain the open workstation instruction. Such metafiles +are commonly produced by the ":.write" command in cursor mode. + +------------ +From: /u2/tody/ Sun 18:39:53 02-Jun-85 +Package: gio +Title: new NSPP device "tek" added + +A new graphics device using the NSPP kernel has been added. The new device, +named "tek", is useful for interactively inspecting fully vectorized plots +such as would they would appear on the imagen, versatec, dicomed, or other +NSPP devices. In particular, character generation is done by the NSPP +kernel rather than by the graphics terminal. + +------------ +From: /u2/tody/ Mon 15:49:33 03-Jun-85 +Package: gio +Title: text generation in the STDGRAPH kernel + +The text generator developed for the NSPP kernel has been installed also in +the STDGRAPH kernel. The "normal" text quality for the stdgraph kernel is +whatever is provided by the hardware character generator on the graphics +terminal. Hardware character generation will be used if the text quality +(G_TXQUALITY) is normal or low; the software character generator is selected +if the quality is set to medium or high. Software character generation +permits arbitrarily sized characters with arbitrary up vectors, making it +possible to prepare plots just as they will appear on when drawn on a plotter +device which does not have hardware character generation. The new character +generator also fixes errors in string justification present in the old +kernel. Strings will now be justified correctly regardless of the text +quality. + +The text quality may be selected by setting the G_TXQUALITY parameter before +calling GTEXT. When working interactively, however, it will be easier to +override the runtime quality attribute by setting the text quality in +cursor mode. A new cursor mode command ".txquality" has been added for +this purpose. For example, after drawing a plot with hardware character +generation and while in cursor mode, type ":.txq h" followed by a 0 to +redraw the plot using software character generation. The "T" keystroke +may be used to interactively draw characters and inspect the font, etc. + +------------ +From: /u2/tody/ Mon 15:59:27 03-Jun-85 +Package: cl +Title: error handling bug fix + +A bug has been fixed in the CL affecting error handling. When error recovery +takes place while within an IFERR in SPP, e.g., after a <ctrl/c> when the +CL has called a system service which uses error handling, it is necessary +to reinitialize the error handling system. In normal programs this is done +by the error restart code in the IRAF Main, but since the CL has its own +error recovery code it must perform the reinitialization itself during +error recovery. + +------------ +From: /u2/tody/ Mon 16:35:51 03-Jun-85 +Package: gio +Title: character size adjusted + +Ideally the size 1.0 character should be the same size in NDC units on all +graphics devices, otherwise text which is scaled relative to the size 1 +character will come out a different size on the different devices. The NSPP +devices turned out to have character sizes some 20% bigger than the normal +character size for the VT640, our reference graphics device. The hardware +character size of the VT640 could of course not be changed, so I adjusted +the character size in the graphcap entry of each NSPP device to make it agree +with the VT640/4012. + +As as result of this change default size characters on plots will now appear +both taller and narrower than before (note that the aspect ratio of a plotter +device is different than that of the terminal). An entirely reasonable plot +still results. If precise control over the character size is desired, the +character size may in NDC units may be set explicitly, rather than scaling +relative to the device size-1 character. There is currently no way to change +the aspect ratio of a character, since only one size parameter is used for +both axes (this is consistent with GKS). + +------------ +From: /u2/tody/ Mon 18:51:33 03-Jun-85 +Package: gio +Title: error checking of ":.snap" + +The cursor mode command ":.snap" now checks for an error when trying to open +the snap device, printing a warning message if there is a problem rather than +going through error recovery. + +------------ +From: /u2/tody/ Tue 22:51:26 04-Jun-85 +Package: gio +Title: bug fix affecting log scaling + +A case turned up in which glabax would fail to log scale correctly. The +step size between minor ticks was so small that the next major tick +would never be reached, resulting in an infinite loop. This bug has been +fixed and the log scaling code has been extensively tested. + +------------ +From: /u2/tody/ Wed 15:51:50 05-Jun-85 +Package: cl +Title: bug fix in CL + +The internal CL function "breakout" breaks a long form parameter name into +fields, returning a pointer to each field (a long form parameter name is +"task.param" or "package.task.param"). In order to return a pointer to an +EOS delimited string the routine overwrites the periods in the input string +with EOS, returning a pointer to each substring (needless to say, not a good +practice). A bug was found and fixed involving the use of the breakout +procedure in the run time opcode procedures. When such a procedure is +passed an operand which is compiled into the dictionary, the first call to +breakout was modifying the input operand but functioning successfully. +In the second call the same input operand was passed (but modified in the +first call), hence the bug. I added a new procedure called "breakcopy" +which calls breakout on a local copy of the input operand. All calls to +the breakout function in the CL were examined and parcelled into three +cases: [1] breakout called on a local copy, no changes; [2] reentrant call +to breakcopy possible, routine changed to make local copy of operand and +call breakout directly; and [3] simple reference to a nonlocal operand, +call to breakout replaced by equivalent call to breakcopy. Most changes +were of the latter type and occurred in the file opcodes.c. + +------------ +From: /u2/tody/ Wed 16:06:37 05-Jun-85 +Package: fio +Title: bug fix in binary file i/o + +The procedure FWATIO was modified to mark the FIO buffer inactive regardless +of the status returned by an i/o transfer to the buffer. Formerly the +routine would not mark the buffer inactive following an i/o transfer +which returned an error. This would cause the error to "stick" when trying +to read the file (and probably when trying to write it too). + +------------ +From: /u2/tody/ Wed 19:03:06 05-Jun-85 +Package: library +Title: mathematical constants + +A new file <math.h> has been installed in the system library. This file +contains definitions of various constants and macros useful in numerical +applications. + +------------ +From: /u2/tody/ Thu 20:27:16 06-Jun-85 +Package: fmtio +Title: bug fix in CTOWRD (hence also CTOTOK, GARGTOK) + +The CTOWRD procedure was recognizing newline as a word delimiter even when +the "word" in question was a quoted string or character constant. Since +newlines are permitted in strings and character constants this was an error. +CTOWRD is called by both CTOTOK and GARGTOK, hence the bug affected both +of these routines as well. + +------------ +From: /u2/tody/ Fri 11:44:20 07-Jun-85 +Package: spp +Title: pointer conversions in structures + +Several macros have been added to <iraf.h> to facilitate pointer conversions +within structure definitions. These macros convert a struct pointer into a +pointer to some other datatype, e.g., to reference a field of a structure. + + P2C(p) *(struct) -> *char + P2S(p) *(struct) -> *short + P2L(p) *(struct) -> *long + P2D(p) *(struct) -> *double + P2X(p) *(struct) -> *complex + +By definition pointer to struct is equivalent to a pointer to int hence there +is no conversion for integer fields. Also by definition int and real occupy +the same amount of storage, hence pointer conversions are not necessary to +reference fields of type real. Since an SPP pointer is implemented as an +integer it may be stored in an integer field within a structure (we are taking +liberties within struct declarations that should not be taken in regular code). + +Sufficient storage should be allocated for each CHAR or SHORT field of a +structure to permit variations in the actual size of a char or short on the +host machine. Allocate one full struct unit for each storage element of +type char, short, int, long, or real. Allocate two struct units per double +or complex element. When storing character strings in a structure, dimension +the string odd and allow one extra char for the EOS. Double and complex fields +must have double alignment with the pointer to the start of the structure, +i.e., a double or complex field must be placed at an offset of 0, 2, 4, etc. +struct units from the start of the structure. + +Example: + + define LEN_ASTRUCT (10+40+40) + define SZ_NAME 39 + + define A_FD Memi[$1] + define A_STATUS Memi[$1+1] + define A_SCALE Memd[P2D($1+2)] + define A_OFFSET Memd[P2D($1+4)] + # (extra space) + define A_NAME1 Memc[P2C($1+10)] + define A_NAME2 Memc[P2C($1+50)] + + +Note that the offset into the structure is always given in struct units. +It is good practice to allow extra space for expansion. Likewise it is +advisable to place char storage at the end of the structure to allow for +expansion without having to recompute the offsets of the scalar fields. + +If these rules are followed the resulting structure definitions should be +portable to most or all IRAF host machines without change. + +------------ +From: /u2/tody/ Sun 22:31:53 09-Jun-85 +Package: fmtio +Title: new procedures added to the strings package + +Two new procedures have been added to the strings subpackage of FMTIO. The +new procedures, more general versions of the old routines STRIDX and STRLDX, +are called STRIDXS and STRLDXS and differ from the original routines in that +the first argument is a string defining a set of characters to be searched +for, rather than a single character. + + index = stridx (ch, str) # first occurrence of CH in STR + index = stridxs (set, str) # first occurrence of SET[i] in STR + index = strldx (ch, str) # last occurrence of CH in STR + index = stridxs (set, str) # last occurrence of SET[i] in STR + +I have been thinking of adding these procedures for some time since there +have been numerous occasions on which they would have been useful. The addition +of the new routines at this particular time was prompted by the redefinition +of a character constant as an integer value. The following statement is now +illegal since the first argument is an integer rather than char scalar: + + ip = stridx ('a', str) # BAD!! + +Rather than define a char variable to convert this into a legal statement, +the following form may be used instead: + + ip = stridxs ("a", str) + +------------ +From: /u2/tody/ Sun 22:42:40 09-Jun-85 +Package: spp +Title: revision to the SPP language standard + +The original standard for the SPP language, which has remained unchanged since +its first definition several years ago, defined a character constant (e.g., 'a') +as a numeric constant of type CHAR. It has recently become apparent that +the SPP language can be simplified by redefining the character constant as an +integer constant. With this new definition the following are all legal +integer constants, equating to 32 decimal: + + 32 + 40B + 20X + ' ' + +Likewise, the following are all equivalent to the decimal integer 49 (SPP +specifies that characters are represented internally in ASCII): + + 49 + 61B + 31X + '0' + 1 + TO_DIGIT(1) + +This change requires that all existing code which uses character constants +in argument lists be changed, since it is illegal to pass an integer argument +to a procedure expecting an argument of type char. A complete list of all +such (newly) illegal statements has been prepared by automatic means and +the affected code is in the process of being revised. + +------------ +From: /u2/tody/ Mon 19:23:58 10-Jun-85 +Package: fio +Title: new routines added to FIO + +Two new procedures PUTCI and GETCI have been added to the FIO interface. +These are integer versions of the old procedures PUTC and GETC. + + ch/EOF = getci (fd, ch) # int fd, ch, getci() + putci (fd, ch) + + ch/EOF = getc (fd, ch) # int fd; char ch, getc() + putc (fd, ch) + +The new routines are functionally identical to the old ones but eliminate +the char scalar argument and function value (which can cause portability +problems). PUTCI is particularly useful for the output of character +constants, e.g.: + + call putci (fd, '\n') + +This is certainly a kludge, but both types of procedures are useful depending +on the application, and the revision is upwards compatible. In the ideal +world a better solution would be for SPP to accept either char or integer +scalar arguments but always pass an integer in the argument list, like C. +This is beyond the capabilities of the current preprocessor because it does +not parse expressions and keep track of their datatypes. + +------------ +From: /u2/tody/ Tue 09:53:06 11-Jun-85 +Package: fmtio +Title: argument datatype changed in DTOC, XTOC + +The datatype of the "format" argument to DTOC and XTOC has been changed from +CHAR to INT, since the actual argument in typical calls is usually an explicit +character constant, e.g., 'f', 'e', or 'g'. + +------------ +From: /u2/tody/ Tue 13:19:28 11-Jun-85 +Package: system +Title: minor revisions to match argument types + +Approximately 75 lines of code were modified to match argument datatypes +(char to char, int to int) as a result of the recent change in the SPP +language standard. The count of number of lines of code modified does not +include numerous related modifications made in declarations, etc. Some of +the affected routines were quite old and were cleaned up and made more +efficient in the process. Most of the changes were procedure name changes, +e.g.: + + putc -> putci + stridx -> stridxs + +The following files were affected. + + +PKG: + utilities + decod_tablst.x t_translit.x + help/lroff + breakline.x center.x justify.x lroff.x section.x + do_ls.x output.x skiplines.x + help + prblkhdr.x hbgetblk.x hbgetblk.x hinput.x + manout.x manout.x manout.x modtemp.x + images + imheader.x hedit.x + imdebug/dump.x + tv/display zopnim.x + softools/yacc/debug + ytab.x(dc.y) + system + page.x directory.x match.x beep.x + plot + graph.x + +SYS: + clio + clcmd.x zfiocl.x + fmtio + ctocc.x dtoc.x xtoc.x strtbl.x fmtstr.x parg.x + gio + nspp/encode.x stdgraph/stgencode.x glabax/glbtitle.x + cursor/(rcursor.x,grcstatus.x,grccommand.x) + debug + realio.x nop.x clio.x strings.x fio.x fio2.x words.x plot.x + mtio + mtgetpos.x + tty + ttyputline.x ttyinit.x debug.x + etc + erract.x sys_ptime.x x_debug.x envlist.x propen.x main.x + xerstmt.x + fio + x_debug.x, fchdir.x vfntrans.x + imio + immap.x db/imgetb.x db/imaddf.x db/imdelf.x + fmtio + chrupr.x chrlwr.x dtoc.x fpradv.x patmatch.x pargx.x + mtio + mtposition.x mtdevlist.x + tty + ttyputline.x + + +For the most part the modifications were trivial and should not cause any +problems. Routines where were more heavily modifed include the pattern +matching code in FMTIO and the character output code in LROFF (HELP). + +------------ +From: valdes$iraf/ Thu 10:29:36 13-Jun-85 +Package: xtools +Title: Simple text database tools + +Some simple text database tools have been added to the xtools library. +Some help text under the name dttext is available through the help task. +The source code is in dttext.x in the xtools directory. These tools are +useful for keeping multiple database text entries in one file. These tools +are in use in the longslit package. + +------------ +From: /u2/tody/ Fri 13:26:57 14-Jun-85 +Package: spp +Title: SPP compiler revisions + +The first pass of the SPP compiler, i.e., the C program XPP, has been +modified as follows: + + [1] A new file "decl.c" was added containing a package of routines for + parsing argument lists and declaration statements. As arguments and + declarations are parsed each argument or local variable is added to + an internal symbol table. When a procedure has been fully processed + a code generation routine is called to output the RPP declarations + required by the second pass. + + Declarations are output in the following order: (1) scalar arguments, + (2) array arguments, (3) local variables, (4) miscellaneous + declarations (commons, errchk, etc.), (5) switch variables and string + array names, (6) data statements. This ordering is independent of + the order in which these items occur in the source. The output + ordering is as required by Fortran. + + This revision was made to permit correct generation of Fortran code + for the following type of case, which is quite common in IRAF: + + procedure alpha (fd, x, xlen) + + pointer im + real x[xlen] + int xlen + + begin + + + Previously the Fortran generated for this procedure would have + declared the OUTSTR array and then the MAXCH scalar. This is illegal + Fortran because the length argument XLEN would be used to dimension + X before being declared as an integer argument; some compilers would + accept such a construct and compile it correctly, while others would + conclude that XLEN was a real by applying the autotyping convention of + Fortran. This is no longer a problem because SPP will reorder the + argument list to suit Fortran. + + [2] In addition to reordering argument lists, the new code will also + detect multiple declarations of the same identifier, printing a + warning message for each such case found. + + [3] XPP (the first pass of the preprocessor) now prints the name of each + procedure as it is processed, in addition to the name of each file + processed. This gives the user more feedback on the progress of the + compile, particularly when a large file is being compiled on a slow + machine. Typically the filename will appear, then there will be a + delay while all the header includes are read in, then the individual + procedures in the file will be processed, then there will be a delay + while RPP is called to generate the Fortran output file. + +Related changes were required in the lexical analyzer (file xpp.l) and in the +file xppcode.c. In particular the way in which context sensitivity is handled +was completely changed, removing all of the old context variables and replacing +them with a single multistate variable named "context". Additional buffering +was added (the symbol table and another buffer for miscellaneous declarations), +hence now an entire procedure is buffered internally before any output is +generated. Comments are no longer passed to RPP. By stripping comments and +optimizing character output the performance of XPP was improved by 25%. + +------------ +From: tody$ Fri 21:48:40 14-Jun-85 +Package: vops +Title: precision of VOPS projection functions increased + +The VOPS function procedures ASSQ, ASUM, and ADOT have been changed to +accumulate the sum of squares, sum, or dot product as a variable of type +real, double, or complex depending upon the datatype of the procedure. +The function value was also changed to return a floating point value of +the correct precision. Formerly both the sum and the function value +were of type PIXEL, making the procedures of little value for integer +vectors. + +------------ +From: tody$ Sun 21:13:22 16-Jun-85 +Package: system +Title: filename changes + +All files in the lib$ and sys$ directories (excluding lib$xtools) with names +longer than 9 characters or which contained underscore characters were renamed. +This eliminates the need to mess with filename mapping (except for filename +extensions) when bootstraping the system on a foreign host. There is no need +to do the same thing for the applications packages since the IRAF VOS will +handle the filename mapping once the core system is up. + +------------ +From: tody$ Sun 21:17:32 16-Jun-85 +Package: math +Title: nonportable constructs fixed in math packages + +The bevington fortran sources had nonstandard UNIX continuation (& in col 1). +This was changed to Fortran standard continuation (char in col 6). +The file llsq/sva.f was found to have errors in the hollerith format +statements at the end of the file. The version of the file from VMS IRAF +was substituted for the UNIX version, after verifying that the only +differences were in the format statements. Neither library has been +recompiled as yet. + +------------ +From: /u2/tody/ Thu 19:34:06 20-Jun-85 +Package: cl +Title: logout change, bug fix + +The CL will no longer automatically deallocate magtape drives when logging +out. This greatly speeds up logout and permits the same user to logout +of a second CL while the first still has a tape drive allocated (formerly +the drive would be deallocated). + +Since deallocation is no longer automatic, people will inevitably forget +to deallocate the tape drive. The next user to attempt to allocate the +drive will get a "drive already allocated" error message, even if the user +has deallocated the drive at the host system level. When this occurs +delete the file "dev$mta.lok" or "dev$mtb.lok", making certain by first +typing the file that it is not in use. If this file does not exist IRAF +assumes that the drive can be allocated to someone else. The file MUST +exist while a drive is being accessed. + +A recent bug fix has been made which will probably cure the bug which has +been causing parameter values to be overwritten with garbage when a task +exits. + +------------ +From: tody$ Thu 19:42:41 20-Jun-85 +Package: gio +Title: graphics kernels + +Recently all filenames in the iraf VOS were changed which were longer than +9 characters or which contained underscores. Some runtime files were affected, +in particular the graphics kernels, "lib$x_stdplot.e" and "lib$x_stdgraph.e". +These are now named "lib$xstdplot.e" and "lib$xstdgraph.e". + +The system tasks spawned by the graphics kernels when "gflush" is typed +are now submitted with a reduced priority of 4. + +------------ +From: tody$ Thu 19:42:41 20-Jun-85 +Package: system +Title: merge + +A merge of the VMS and UNIX versions of IRAF is in progress. A number of +changes have been made which have not yet been recorded by revisions notices. +These will be summarized when the merge is complete. + + +------------ +From: valdes$iraf/ Mon 14:11:37 01-Jul-85 +Package: generic +Title: Changes to lineflat and colflat + +The task lineflat for creating flat fields by ratioing the image lines +by function fits to the image lines has been changed. It used to be +a simple script calling the task linefit in the images package. Now it +it is a complied task which is similar to linefit. This allowed the +addition of a new parameter specific to the flat field problem. The +new parameter is call minflat. If the fitted value is less than the +value of this parameter the flat field value is set to unity. + +The task colflat used to be a script calling linefit. Now it calls lineflat +and, hence, has the minflat parameter. + +------------ +From: valdes$iraf/ Tue 16:49:50 02-Jul-85 +Package: gtools +Title: Expanded gtools structure + +The gtools structure has been expanded to include a title, xlabel, and +ylabel. The call gtlabax in place of glabax will call glabax with the +appropriate strings. If the gtools pointer is null then glabax will +be called with no strings. The initialization is null strings. +Calls to gt_sets and gt_gets are used to set and get the strings +with the parameters GTTITLE, GTXLABEL, and GTYLABEL from gtools.h. +gt_colon has also been modified to respond to :title, :xlabel, and +:ylabel. These changes do not affect any code except those which +use the colon parameters title, xlabel, and ylabel. + +------------ +From: valdes$iraf/ Mon 15:28:57 08-Jul-85 +Package: images +Title: New magnify + +The magnify task has been rewritten using the new two dimensional interpolation +and boundary extension packages. Thus, magnify will now do true two +dimensional interpolation. The block averaging aspect of the old magnify +has been eliminated (use blkaverage first if desired). + +------------ +From: valdes$iraf/ Tue 14:18:36 09-Jul-85 +Package: local +Title: New task imfunction + +A new task called imfunction has been added to the local package. It +applies a function to the input pixel values to produce an output image. +Currently only the log (base 10) function is available but other functions +can easily be added. This task differs from imarith in that imarith is +a binary operator and imfunction is a unary operator. + +------------ +From: /u2/davis/ Fri 15:25:04 12-Jul-85 +Package: dataio +Title: rcamera mod + +RCAMERA now writes the total time since last readout, and the total shutter +open time in the IRAF image header as well as the integration time. + +------------ +From: /u2/davis/ Wed 11:51:13 17-Jul-85 +Package: images +Title: shiftlines bug + +Shiftlines was not calculating the fractional pixel shifts correctly in +the case of boundary extension. Instead it was shifting by the nearest +integer, i.e 1 if shift=1.5. + +------------ +From: /u2/davis/ Mon 09:32:44 22-Jul-85 +Package: dataio +Title: rfits mod + +The parameters blank has been added to the RFITS task. Blank values in the +FITS image will be replaced in the IRAF image by the user defined quantity +blank. Appropriate type conversion will be performed on blank. For example +if blank = -1.5 and the output image type is real, blank pixels will have +the value -1.5; if the output image type is integer, blank pixel values will +have the value -1. + +------------ +From: valdes$iraf/ Mon 14:15:47 29-Jul-85 +Package: images +Title: Changes + +1. The task revisions has been added to page revisions to the images +package. The intent is that each package will have a revisions task. +Note that this means there may be multiple tasks named revisions loaded +at one time. Typing revisions alone will give the revisions for the +current package. To get the system revisions type system.revisions. + +2. A new task called fit1d replaces linefit. It is essentially the same +as linefit except for an extra parameter "axis" which selects the axis along +which the functions are to be fit. Axis 1 is lines and axis 2 is columns. +The advantages of this change are: + + a. Column fitting can now be done without transposing the image. + This allows linefit to be used with image sections along + both axes. + b. For 1D images there is no prompt for the line number. + +------------ +From: valdes$iraf/ Mon 14:17:40 29-Jul-85 +Package: generic +Title: Changes + +July 26, 1985: + +1. Help page available for flat1d. + +2. Background has been modified to use new fit1d task. It now does +column backgrounds without transposes and allows image sections. +------ +July 25, 1985: + +1. A new task called flat1d replaces lineflat and colflat. It is +essentially the same as lineflat except for an extra parameter "axis" +which selects the axis along which the 1D functions are to be fit. +Axis 1 is lines and axis 2 is columns. The advantages of this change are: + + a. Column fitting is done without transposing the image. + b. The colflat script using image transpositions would not + work the same as lineflat when used with sections. Now + it is possible to mosaic several flat fields as need with + multiple slits or apertures. + c. Because no transpose is needed and it is not a script + flat1d should work faster than colflat. + d. The prompts for interactive fitting are now correct when + doing column fits. +------ +July 23, 1985: + +1. The task revisions has been added to page revisions to the generic +package. The intent is that each package will have a revisions task. +Note that this means there may be multiple tasks named revisions loaded +at one time. Typing revisions alone will give the revisions for the +current package. To get the system revisions type system.revisions. + +2. The tasks linebckgrnd and colbckgrnd have been combined into one +task with the extra hidden parameter "axis". With axis=1 the task +is the same as linebckgrnd and with axis=2 the task is the same as +colbckgrnd. + |