This directory contains the C code for 3 different utilities for IDL programming, contained in eight source files, and a makefile that may be used to compile some or all of the utilities. In order to compile all three just use the command "make" in this directory. The programs are: Nice -- Used to parse IDL programs and indent blocks of statements. Use: unix> Nice idlprog.pro Current indentation rules: PRO ... END and FUNCTION ... END blocks: 2 characters. BEGIN ... END and CASE ... ENDCASE blocks: 4 characters. The indentation is done with tabs where possible. Series of blank spaces (to align comments etc) are also tabified. Continued ($) lines/statements are always indented precisely as much as the beginning of the statements, so that alignments are preserved, e.g.: begin begin test,x,y,$ test,x,y,$ a,b,$ --> a,b,$ c,d c,d test2,x,y test2,x,y end end In addition, the program can be used to enforce lower/upper case policies, by the use of a .Nicerc file either in the working directory, or in the home directory. The .Nicerc file has one line for each word that has a special policy. Words in the source program with the same spelling are converted into the form that occurs in the .Nicerc file. A file with the following entries: BEGIN END Test TEst2 would produce the following (from the above example): begin BEGIN test,x,y,$ Test,x,y,$ a,b,$ --> a,b,$ c,d c,d test2,x,y TEst2,x,y end END The program does not do any changes to words that have no explicit policy in the .Nicerc file. Defines -- Used to sneak out what procedures and functions an IDL file defines. This may be used on separate files: unix> Defines idlfile.pro The output is a list of capitalized names of all routines that are defined in the file, with parentheses appended to signify functions instead of procedures. The program may also be used on all files in an IDL path, with the same syntax as the IDL_PATH specification: unix> Defines +. This will produce a list of all routines defined in all the *.pro files in the current directory. If you have a list of file names in a file (filelist.txt), you can ask Defines to search through these with the command unix> Defines @filelist.txt To get a list of all routines available for a given IDL_PATH, written to the file "list", write: unix> Defines $IDL_PATH > list The specification of where Defines should look may also be mixed, ie.: unix> Defines $IDL_PATH @filelist The program may also be used to report multiple definitions of procedures/functions, by using: unix> Defines - $IDL_PATH The program will produce three or more lines of output for each multiple definition: one line with the name of the routine, and one line for each of the files with a definition of it. Calls -- Used to find the functions/procedures that an IDL program file calls externally. It needs a file produced by Defines as a definition of what external procedures to care about. Use: unix> Defines $IDL_PATH > definedfiles unix> Calls definedfiles idlfile.pro The output is a list of the routines defined in $IDL_PATH that are called from idlfile.pro. The parsing done by the program is very much "dumb". The output is not always correct and needs to be cross-checked manually, as for example the use of a variable "X" in idlfile.pro will result in a report that the file refers to the _routine_ X if such a routine exists in the IDL path. 11-Dec-94: The parsing is now a lot smarter -- the output is now cleared from most aliasing effects. Be aware, however, that if you use variables with function names, AND call the functions as well, you won't be told! Callers -- Used to find those IDL program files that reference a specified function/procedure. Supply the name of the function, plus a path, as for Defines: unix> Callers detdata $IDL_PATH Will report all routines in the IDL_PATH that contain the symbol detdata. Upper and lower case is not significant. Written by Stein Vidar Haugan, 26 April 1994 Mod. (SVHH) 11-Dec-94