# psu_tae_mods.txt -- PSU modificatiions to TAE 2007 Aug. 13 This file summarizes the procedures followed to build and customize TAE for use with LAS 7.4 at the Pennsylvania State University, Center for Environmental Informatics. To build the Linux version of TAE we applied the file tae_build_74.patch distributed by USGS/EDC to the TAE source tree, edited the TAE installation script installtae to reactivate #!/bin/sh, and executed installtae. We modified a few of the TAE source files to provide additional functionality needed at PSU. In addition, many files have been modified to avoid compiler warnings; the TAE installation script now executes without producing any warnings under gcc version 3.4. The top tae/ directory and each subdirectory in which files have been modified contains a PSUmods file listing all modified files and the changes made. The unmodified versions of the files have ".orig" appended to their names. The changes to TAE function are as follows: - Expand Linux environmental variables when executing the TAE CHDIR command (tae/src/tm/hostcmd.np.c). - Do not convert the directory part of the file specification for a process or procedure to lower case (tae/src/tm/process.np.c). - Reset the errno external variable before executing a process, to avoid problems with the gdb debugger (tae/src/tm/process.np.c). - Extract the first element of the host computer name from either the bash environment variable HOSTNAME or the csh variable HOST (tae/src/tm/pdflog.c). - Eliminated locking of the PDF log file when appending to it; attempting to lock a file on a network-mounted RAID array on a remote host caused taetm process to hang (tae/src/tm/pdflog.c). To improve the interface to the PSU version of LAS, we - Created a symbolic link named tae/bin/csh/setup_las to las.setup; this script is invoked from the PSU version of the LAS lasinit script. - Rewrote tae/pdf/slogon as a minimal proc which invokes the LAS-specific proc laslogon.pdf. - Modified tae/pdf/slogoff to invoke proc laslogoff.pdf. The following modifications were made to avoid compiler warnings: - tae/config/ TAEmake.tmpl -- Commented out confusing redefinition of TerminalLibrary which caused redefinition warnings. - tae/include: chartype.inc -- Added (int) cast to subscripts in is* macro definitions. inttaelib.h -- Added prototype for s_upper() to support change in tae/src/tm/process.np.c. taelib.h -- Added prototypes from lib/tae/local_protos.h for parm_err() and p_string() to support msgbld/msgbld.c. - tae/src/bin/ msgbld/msgbld.c -- Declared main() type int, #included taelib.h, and fixed calls to parm_err() and p_string() to match current protoypes. - tae/src/lib/tae/ Imakefile -- Removed all x... modules except x_error(), and also mparm.c and wrtstd.c, from list of modules to compile, since these modules are not needed by any LAS programs and gave many compilation warnings (which have not been fixed). comm.np.c, file.np.c, hostutil.np.c -- Removed references to unsupported external variable sys_nerr. getprim.c -- Changed subscript declaration from TINY to TAEINT. hostutil.np.c, string.c, syntax.c -- Added (int) cast for subscripts. parmgen.c -- Fixed STR_EQUAL definition. stringcnv.c -- Added parens in complex logical expression. terminal.np.c -- Changed type of ospeed from short to unsigned to match libcurses. termlib.c -- Removed extraneous text after #endif. - tae/src/lib/taec/ cmput.c--Added prototype references for m_msg and m_msgout; changed p_msgout() to type void to match void return from m_msgout. - tae/src/tm/ tm.c -- changed apparently incorrect argugment to parmmrg(); change not tested, since applies only to async mode. log.c -- Commented out declaration of unused init[] structure and some associated variable declarations. asyncport.c, batch.np.c, declare.c, menuport.c, misccmd.c, tclwindows.c, tutcmd.c, tutdisp.c, tutorport.c, tutselect.c -- Added cast before .v_cvp argument in function calls. helpsubs.c, util.c -- Changed subscript declaration from TINY to TAEINT. hostcmd.np.c-- Added comment delimiters around text after #endif declarations. intrinsic.c, misccmd.c, symbol.c, util.c -- Added (int) cast to array subscript. saveres.c, tm.c, tmsubs.c -- Added casts before address-type arguments of function calls. setcheck.c, vcopy.c -- #included inttaelib.h. tm.c, tutorport.c -- Added extra parentheses suggested by compile for compound logical expressions. tutselect.c -- Fixed reference to string field of sturucture in printf() call.