SSSoooffftttwwwaaarrreee TTToooooolllsss SSSuuubbbsssyyysssttteeemmm VVVeeerrrsssiiiooonnn 666 tttooo VVVeeerrrsssiiiooonnn 777 CCCooonnnvvveeerrrsssiiiooonnn GGGuuuiiidddeee Daniel H. Forsyth, Jr. T. Allen Akin School of Information and Computer Science Georgia Institute of Technology Atlanta, Georgia 30332 March, 1980 Version 7 Conversion Guide IIInnntttrrroooddduuuccctttiiiooonnn The release of Version 7 of the Software Tools Subsystem marks the end of a period of intensive development. A number of changes and enhancements have been made to the Subsystem since the August, 1979 release of Version 6; they should provide considerably improved performance and increased functionality. The price that must be paid for this improved system is the effort required to resolve a number of incompatibilities. All Subsystem object code must be relinked (in some cases recom- piled), and all shell programs must be checked for changes caused by additions to existing commands. This Conversion Guide represents an attempt to outline the incompatibilities and the means for upgrading from Version 6 to Version 7. There are four major areas of incompatibility: Subsystem pathname syntax has been changed to allow references to disks by packname and to access devices other than disk; a number of com- mands have been deleted, altered, or enhanced; several library routines have been changed; and a new Ratfor preprocessor accept- ing a slightly different language is now the standard tool for Subsystem programming. As a learning aid for conversion, starting with Version 7 the Reference Manual and the User's Guide will be marked with revision bars and deletion asterisks. Careful perusal of both documents is recommended. EEExxxttteeennnsssiiiooonnnsss tttooo PPPaaattthhhnnnaaammmeee SSSyyynnntttaaaxxx After the Version 6 release, it became necessary to extend Subsystem pathnames to handle disk selection in a more flexible way. In addition, the ability to specify devices other than disk was desirable. Unfortunately, this could not be done in a clean, upward-compatible manner. The following subsections outline the differences and extensions that most affect the Version 6 user. All users are referred to the _U_s_e_r_'_s _G_u_i_d_e _t_o _t_h_e _P_r_i_m_o_s _F_i_l_e _S_y_s_t_e_m for additional information; type guide -p fs | os >/dev/lps/f PPPaaattthhhnnnaaammmeeesss RRReeefffeeerrrrrriiinnnggg tttooo DDDiiissskkk FFFiiillleeesss Perhaps the most inconvenient feature of Version 6 pathnames was the lack of the ability to specify a logical disk by its pac- kname. One would frequently have to scan a "status disks" list- ing looking for the appropriate pack, then convert the octal logical disk number to decimal for the Subsystem pathname hand- ler. - 1 - Version 7 Conversion Guide The old-style full pathname looked something like /ufd/dir/.../dir/file The new-style pathname assumes that there is a "root" directory above all started-up disks, and that this directory is named "/". There are then four alternatives for a full pathname: //ufd/dir/.../dir/file //ufd/dir/.../dir/file /*/ufd/dir/.../dir/file //ufd/dir/.../dir/file You may now identify a file on a particular logical disk by specifying the packname or logical disk number of that disk as the first node of the pathname. Note that new-style disk numbers are in _o_c_t_a_l, not decimal; thus, the disk numbers in a "status disks" listing may be used without conversion. Furthermore, you may identify a file on the disk to which you are currently attached by using a star ("*") in place of a packname. If you require the old top-level directory search procedure, you must specify an empty packname; this causes the MFDs of all logical disks to be searched for the first directory in the path- name. To illustrate, the Version 6 pathname /system must be specified in Version 7 as //system This is the primary area of incompatibility between Version 6 and Version 7 pathnames, and the one which will probably give you the most difficulty; not only must you convert pathnames hidden in any existing programs and command files, but you must also retrain yourself to use the new syntax. As with Version 6, backslashes at the beginning of a path- name may be used to "back up" the directory tree before beginning the search for a file. However, at Version 7 the "dot file" kluge used to implement this feature is no longer needed. If you have any dot files (files named "." containing the full pathname of the directory in which they appear), you should delete them. PPPaaattthhhnnnaaammmeeesss RRReeefffeeerrrrrriiinnnggg tttooo OOOttthhheeerrr DDDeeevvviiiccceeesss As a special case, full pathnames beginning with "/dev" are interpreted as names of additional file system "devices." For example, "/dev/null" refers to a "null" device, which sinks all data written to it and always returns end-of-file when read. The standard ports may be named by pathnames of the form "/dev/stdin" or "/dev/stdout". Furthermore, the user's terminal now has the name "/dev/tty". - 2 - Version 7 Conversion Guide The most useful of file system devices at the moment is the line printer spooler device. This device has the name "/dev/lps", possibly followed by a number of spooler options separated by slashes, blanks, or dashes. For example, "/dev/lps/f" refers to a print file with Fortran forms control. Use of "/dev/lps" rather than one of the spooling programs 'sp' or 'pr' is highly recommended, since it typically eliminates one entire copy of the data to be spooled, thus improving run time and disk space utilization. In fact, 'sp' and 'pr' have been re- implemented as shell programs that use "/dev/lps"; this has caused some minor changes in their command-line syntax. See the Reference Manual entries for 'sp', 'pr', and 'open' for further details. SSStttaaatttuuusss ooofff VVVeeerrrsssiiiooonnn 666 CCCooommmmmmaaannndddsss This section summarizes the user-visible changes that have been made to Subsystem commands for Version 7. It is divided into several subsections: obsolete commands, superseded com- mands, modified commands, enhanced commands, and unchanged com- mands. The final subsection is a summary of commands that are new for the Version 7 release. OOObbbsssooollleeettteee CCCooommmmmmaaannndddsss The commands in this subsection were part of the Version 6 Subsystem, but are not included in the Version 7 release. Most of them were used only by certain shell programs and have out- lived their usefulness. In the other cases, the commands were relics of past Subsystems, and either were no longer useful, or no longer worked. aaalllllldddoooccc Its use was restricted to "system" and "=doc=/print/man" and "=doc=/print/guide" now perform its function. eeedddiiittt It was a proper subset of 'ed' and it didn't work. fffiiixxxdddooottt Dot files are gone. (three cheers!) ggglllooossssss Didn't seem to be useful. hhhssscccrrriiipppttt It was used only by 'help' to strip out the description part of a reference manual entry. - 3 - Version 7 Conversion Guide lllnnneeewwwsss System 'news' serves its purpose just as well. lllooogggiiinnn Anyone running an accounting package prohibits 'login' while logged in. lllpppuuubbbllliiissshhh System 'publish' serves its purpose just as well. lllsssuuubbbssscccrrriiibbbeee System 'subscribe' serves its purpose just as well. mmmkkkccciii This command hasn't been useful for about three years. tttaaabbbsss No one ever implemented tab expansion. wwwhhhoooaaammmiii 'Login_name' does exactly the same thing, and is faster. SSSuuupppeeerrrssseeedddeeeddd CCCooommmmmmaaannndddsss The commands in this section are not part of the Version 7 Subsystem; their functionality has been subsumed by other com- mands. Each entry describes the command and options you can use to get the same results. cccaaatttllliiisssttt Use "cat -n". ccccccnnnttt Use "tc -c". cccooommmpppaaarrreee Use "diff -vc". ddduuu Use "lf -w". ddduuuppp Use "term -noecho" or "term -echo". lllcccnnnttt Use "tc -l". mmmooonnniiitttooorrr Use "mon". pppsssppp Use 'lps' or Primos 'prop' and 'spool'. - 4 - Version 7 Conversion Guide tttoootttaaalll Use "stats -tq". wwwcccnnnttt Use "tc -w". MMMooodddiiifffiiieeeddd CCCooommmmmmaaannndddsss The commands listed in this section have been modified for the Version 7 release and are no longer completely compatible with their Version 6 counterparts. Each entry gives a brief description of the changes, but before using any of these com- mands, please check the corresponding Reference Manual entry to be sure of the command's exact behavior. aaasss666888000000 The 6800 cross-assembler now accepts a "-l" option, causing an assembly listing to be produced on standard output. ccchhhaaattt The syntax for protection attributes has been changed to "{t|w|r|a}[/{t|w|r|a}]". dddaaayyy The argument syntax has been slightly changed. fffiiinnnddd Output lines are not labelled with the input file name unless the "-v" option is specified. hhhddd 'Hd' now accepts packnames or logical disk numbers. hhheeelllppp It runs much faster and can now access the subroutines section of the Reference Manual and search for an arbitrary pattern in the manual index. Argument syntax is slightly different. lllaaammm 'Lam' can laminate more than two files and can insert arbitrary delimiters between lines. It no longer reuses the last line of the shorter of two input files. lllfff The output format of the file type and protection attributes have been changed. llloooggg Log files now reside in the user's profile directory, rather than in his login directory. - 5 - Version 7 Conversion Guide mmmkkkdddiiirrr 'Mkdir' has a slightly different argument syntax. ssseee 'Se' now has support for the IBM 3101 ASCII terminal, and has an "m" option for reading messages sent by the 'to' command. The "insert newline" (control-n) key has been redefined to control-underscore to allow for several more control characters. sssllliiiccceee 'Slice' now accepts arbitrary patterns for starting and ending delimiters, and allows a choice as to whether the delimiting lines are included in the output. sssppp 'Sp' now requires an argument consisting of a single slash to separate its list of file names from its list of spool options. You may want to use the pathname "/dev/lps" instead of 'sp' anyway. EEEnnnhhhaaannnccceeeddd CCCooommmmmmaaannndddsss Commands in this section have been functionally enhanced for Version 7, but remain compatible with their Version 6 counterparts. cccaaattt 'Cat' can now accept lists of file names and can print a heading line between files. ccchhhooowwwnnn 'Chown' can change the owner passwords in an entire subtree of the file system. cccmmmppp New alternatives for relational operators have been added. cccppp 'Cp' can now copy file system subtrees, including seg- ment directories. 'Cp' now always copies date of modification and protection attributes. dddeeelll 'Del' can delete file system subtrees, including seg- ment directories. dddnnnuuummm 'Dnum' handles cartridge module disk numbers and does considerable error checking. dddppprrriiinnnttt 'Dprint' can print acceptable overstruck graphics for many Greek letters and can handle subscripting and - 6 - Version 7 Conversion Guide superscripting from the text formatter. eeerrrrrrooorrr 'Error' can now pass back a user-selectable error status to the shell. fffccc 'Fc' has options for controlling debugging mode and optimization. fffmmmttt 'Fmt' now has nestable functions, diversions, number registers and several new commands. It can produce most Greek letters and subscripting and superscripting on a Diablo using 'dprint'. hhhiiissstttooorrryyy 'History' now uses 'fmt' to format new history entries, and 'phist' to print the history file. iiioootttaaa 'Iota' can now generate a sequence of numbers in an arbitrary range, in an arbitrary output format. lllddd 'Ld' can link PL/I Subset G programs. mmmaaaiiilll 'Mail' accepts multiple addressees and checks the validity of each one. mmmkkkllliiibbb 'Mklib' now accepts arbitrary pathnames, rather than being restricted to names in the current directory. ppprrr 'Pr' is now a shell program, and can also accept spool options. ppprrriiinnnttt 'Print' has an option to produce output suited either for a terminal or a line printer. ssshhhtttrrraaaccceee There are more shell trace options. ssspppeeellliiinnnggg 'Speling' now accepts file name arguments. ssstttaaacccccc 'Stacc' now has an 'ext_term' declaration to declare externally-defined terminal symbols, and accepts actions after a production. - 7 - Version 7 Conversion Guide sssuuubbbssscccrrriiibbbeee 'Subscribe' now balks at duplicate subscriptions. ttteeerrrmmm 'Term' now handles changing "escape" and "retype" control characters. It can also set and display the disposition of the QUIT key. tttooo 'To' now checks for a legal user name before sending the message. xxxrrreeefff 'Xref' can now cross-reference extremely large programs without killing itself. UUUnnnccchhhaaannngggeeeddd CCCooommmmmmaaannndddsss This section lists the commands that have no user-visible changes made for Version 7. - 8 - Version 7 Conversion Guide aaarrr   aaarrrggg   aaarrrgggsss aaasss111111   aaasss888000888000   bbbaaannnnnneeerrr bbbaaasssyyysss   bbbyyyeee   cccaaassseee cccddd   ccchhhaaannngggeee   cccllloooccckkk cccnnn   cccooommmmmmooonnn   cccooommmooo cccooopppyyy   cccrrryyypppttt   ccctttiiimmmeee ccctttooo   dddeeeccclllaaarrreee   dddeeeccclllaaarrreeeddd dddeeetttaaabbb   dddrrroooppp   ddduuummmppplllsss ddduuummmpppsssvvv   eee   eeeccchhhooo eeeddd   eeekkk   eeelllssseee eeennntttaaabbb   eeevvvaaalll   eeexxxiiittt fffdddmmmppp   fffiiieeelllddd   fffiiillleee fffiiillleeesss   fffooorrrgggeeettt   fffooosss gggoootttooo   hhhppp   iiifff iiinnncccllluuudddeee   iiinnndddeeexxx   iiinnnssstttaaallllllaaatttiiiooonnn iiinnnttteeelll   jjjoooiiinnn   kkkiiillllll kkkwwwiiiccc   llleeennngggttthhh   llleeexxx llliiibbb   llliiinnneee   lllkkk lllooocccaaattteee   lllooogggiiinnn___nnnaaammmeee   mmmaaacccrrrooo mmmkkkuuusssrrr   mmmooottt   mmmttt nnneeewwwsss   nnnaaarrrgggsss   ooopppttt666888000000 ooopppttt888000888000   ooosss   ooouuuttt pppaaauuussseee   pppggg   ppphhh ppprrrooofffiiillleee   pppuuubbbllliiissshhh   pppwwwddd pppwwwooorrrddd   qqquuuooottteee   rrrccclll rrrfff   rrrmmmuuusssrrr   rrrnnnddd rrrooottt   sssaaavvveee   ssscccrrrooollllll ssseeemmmaaa   ssseeettt   ssshhh sssiiizzzeee   sssooorrrttt   sssooouuurrrccceee ssssssppplll   ssssssrrr   ssstttoooppp sssuuubbbssstttrrr   sssyyymmmbbbooolllsss   sssyyyssstttaaattt tttaaaiiilll   tttaaakkkeee   ttteeeeee ttteeerrrmmm___tttyyypppeee   tttllliiittt   tttiiimmmeee tttsss   uuunnniiiqqq   uuunnnooocccttt uuunnnrrrooottt   uuusss   uuusssaaagggeee vvvaaarrrsss   wwwhhheeennn   wwwhhheeerrreeeiiisss wwwhhhooo   wwwhhhoooiiisss   xxx NNNeeewww CCCooommmmmmaaannndddsss This section list commands that are new for Version 7. aaalllaaarrrmmm Makes a terminal into a very expensive alarm clock. aaarrrgggssstttooo Prints arguments up to a user-specifiable delimiting argument. bbbaaatttccchhh Interface to the Primos batch subsystem. - 9 - Version 7 Conversion Guide cccllleeeaaarrr Clears the terminal screen. cccooolll Produces multi-column output. cccooopppyyyooouuuttt Copies command output directly to a file in the spool queue. dddiiiffffff Compares files. ggguuuiiidddeee Accesses the Subsystem User's Guides. iiimmmiii Produces down-line load stream for an IMI Prom Program- mer. lllpppsss Lists spool queues and cancels print files. mmmeeemmmooo Maintains files of personal reminders. mmmkkktttrrreeeeee Converts a Subsystem path name into a Primos tree name. mmmooonnn Displays system usage statistics. mmmoooooottt Initial version of a teleconferencing system. pppaaasssssswwwddd Sets non-owner passwords. ppphhhiiisssttt Prints the Subsystem history file in a readable format. ppplll111ccc Compiles PL/I Subset G programs. ppplll111ccclll Compiles and links PL/I Subset G programs. rrrffflll Preprocesses, compiles, and links programs written in the "new" Ratfor. rrrppp Preprocesses programs written in the "new" Ratfor. - 10 - Version 7 Conversion Guide ssseeeppp Supports separate compilation of parts of large programs. sssttt___ppprrrooofffiiillleee Analyzes Ratfor statement count profiles. ssstttaaatttsss Performs simple statistical analyses. tttccc Counts pages, lines, words, and characters in text files. SSStttaaatttuuusss ooofff VVVeeerrrsssiiiooonnn 666 SSSuuubbbrrrooouuutttiiinnneeesss This section summarizes the user-visible changes to the Sub- system library routines. It is divided into several subsections: obsolete routines, superseded routines, modified routines, enhanced routines, and unchanged routines. The final subsection is a summary of routines that are new for the Version 7 release. OOObbbsssooollleeettteee RRRooouuutttiiinnneeesss The routines listed here were only used by other library routines. Since their services are no longer required, they have been deleted. dddiiinnn$$$   dddiiinnnccc$$$   dddooouuuttt$$$ dddooouuutttccc$$$   fffbbbuuufff$$$   gggbbbuuufff$$$ gggeeetttnnnoooddd   iiibbbuuufff$$$   iiinnnpppeeerrrrrr ssspppoooooolll   tttiiinnnccc$$$   tttooouuutttccc$$$ SSSuuupppeeerrrssseeedddeeeddd RRRooouuutttiiinnneeesss The following routines have been subsumed by other more powerful routines. Each entry names the Version 7 routine that performs the same function. aaatttooofff Use 'ctod' or 'decode'. aaatttoooiii Use 'ctoi', 'gctoi', or 'decode'. aaatttooolll Use 'ctol', 'gctol', or 'decode'. - 11 - Version 7 Conversion Guide aaatttooorrr Use 'ctor' or 'decode'. ccctttooofff Use 'ctod' or 'decode'. fffiiinnnddd Use 'findf$'. fffllluuussshhh Use 'flush$'. ffftttoooccc Use 'dtoc' or 'encode'. gggaaatttoooiii Use 'gctoi' or 'decode'. gggaaatttooolll Use 'gctol' or 'decode'. gggeeetttffflllttt Use 'input'. gggeeetttiiinnnttt Use 'input'. gggeeetttlllnnnttt Use 'input'. gggeeetttrrreeeaaa Use 'input'. gggeeetttssstttrrr Use 'input'. pppuuutttffflllttt Use 'print'. pppuuutttiiinnnttt Use 'print'. pppuuutttllliiittt Will be obsolete in Version 8. Use 'putlin' instead. pppuuutttlllnnnttt Use 'print'. pppuuutttooocccttt Use 'print'. pppuuutttpppaaakkk Use 'print'. - 12 - Version 7 Conversion Guide pppuuutttrrreeeaaa Use 'print'. ssstttrrriiinnnggg Use 'ptoc'. MMMooodddiiifffiiieeeddd RRRooouuutttiiinnneeesss The routines listed in this section have been modified so that they are no longer compatible with their Version 6 counterparts. Although each entry briefly describes the changes that have been made, you should examine the corresponding Reference Manual entries to determine the exact behavior of the routines. ccchhhkkkaaarrrggg 'Chkarg's behavior when no key-letter arguments are found has been changed. dddgggeeetttlll$$$ 'Dgetl$' has been completely rewritten. See the Reference Manual entry for complete details. dddpppuuutttlll$$$ 'Dputl$' has been completely rewritten. See the Reference Manual entry for complete details. eeerrrrrrooorrr A call to 'error' now terminates all currently execut- ing shell files by passing an error status back to the shell. It also accepts either an EOS-terminated unpac- ked string, or a period-terminated packed string. gggccctttoooiii The argument order has been changed from "gctoi (str, base, i)" to "gctoi (str, i, base)". Optional base indicators in the input are separated from the number by the letter 'r' instead of being enclosed by parentheses (e.g., '16rff' instead of '(16)ff'). gggccctttooolll The argument order has been changed from "gctol (str, base, i)" to "gctol (str, i, base)". Optional base indicators in the input are separated from the number by the letter 'r' instead of being enclosed by parentheses (e.g., '16rff' instead of '(16)ff'). gggeeettttttooo 'Getto' now takes two additional arguments: it returns a password associated with the last node of the path and returns a flag indicating whether it changed the attach point. - 13 - Version 7 Conversion Guide gggiiitttoooccc 'Gitoc' now takes four arguments instead of five. If the "base" argument is negative, the number to be con- verted is assumed to be unsigned; otherwise, it assumed to be signed two's complement. gggllltttoooccc 'Gltoc' now takes four arguments instead of five. If the "base" argument is negative, the number to be con- verted is assumed to be unsigned; otherwise, it assumed to be signed two's complement. iiinnnpppuuuttt 'Input' has been completely rewritten. See the Reference Manual entry for complete details. mmmkkkdddiiirrr$$$ 'Mkdir$'s calling sequence has been changed. See the Reference Manual entry for complete details. tttgggeeetttlll$$$ 'Tgetl$' has been completely rewritten. See the Reference Manual entry for complete details. tttpppuuutttlll$$$ 'Tputl$' has been completely rewritten. See the Reference Manual entry for complete details. EEEnnnhhhaaannnccceeeddd RRRooouuutttiiinnneeesss The routines listed in this section have additional func- tionality in the Version 7 release, but remain compatible with their Version 6 counterparts. dddaaattteee A new key has been added to 'date' to retrieve the current date in the format "Monday, January 31, 1980". gggeeetttaaarrrggg It is now possible to retrieve the command name as argument 0. ooopppeeennn Files can be opened to the terminal, line printer spooler, and other devices. ppprrriiinnnttt A number of new format codes and options have been added. rrreeemmmaaarrrkkk 'Remark' now also accepts an unpacked string for an argument. - 14 - Version 7 Conversion Guide rrreeemmmooovvveee 'Remove' is now capable of removing segment direc- tories. UUUnnnccchhhaaannngggeeeddd RRRooouuutttiiinnneeesss No user-visible changes have been made to the routines listed in this section. cccaaallllll$$$$$$   cccaaannnttt   ccchhhkkkiiinnnppp ccclllooossseee   cccrrreeeaaattteee   ccctttoooiii ccctttooolll   ccctttooorrr   dddeeellleeettteee dddsssdddbbbiiiuuu   dddsssddduuummmppp   dddsssfffrrreeeeee dddsssgggeeettt   dddsssiiinnniiittt   eeennnttteeerrr eeeqqquuuaaalll   eeexxxeeeccc   eeexxxeeecccnnn fffcccooopppyyy   fffooollllllooowww   gggeeetttccchhh gggeeetttkkkwwwddd   gggeeetttllliiinnn   iiinnndddeeexxx iiinnniiittt   iiitttoooccc   iiitttoooccc000 iiitttoooccc888   llleeennngggttthhh   lllooooookkkuuuppp llltttoooccc   mmmaaapppdddnnn   mmmaaapppssstttrrr mmmaaapppsssuuu   mmmaaapppuuuppp   mmmiiissssssiiinnn mmmkkktttaaabbblll   mmmkkkttteeemmmppp   pppuuutttccchhh pppuuutttdddeeeccc   pppuuutttllliiinnn   rrreeewwwiiinnnddd rrrmmmtttaaabbblll   rrrmmmttteeemmmppp   rrrtttoooccc ssscccooopppyyy   sssttt$$$llluuu   sssuuubbbssstttrrr ssswwwttt   ttt$$$cccllluuuppp   ttt$$$eeennntttrrr ttt$$$eeexxxiiittt   ttt$$$tttiiimmmeee   ttt$$$tttrrraaaccc tttrrruuunnnccc   tttyyypppeee   wwwiiinnnddd NNNeeewww RRRooouuutttiiinnneeesss The routines listed in this section are new for the Version 7 release. aaatttoooccc Convert address to character string. ccc$$$eeennnddd Run-time support routine for Ratfor statement count profile. ccc$$$iiinnncccrrr Run-time support routine for Ratfor statement count profile. cccooofff$$$ Close all files opened since last call to 'iofl$'. cccpppfffiiilll$$$ Copy an open file. - 15 - Version 7 Conversion Guide cccpppssseeeggg$$$ Copy an open segment directory. ccctttoooaaa Convert from character string to address. ccctttoooccc Copy character string to character string, paying attention to maximum length. ccctttoooddd Convert from character to double precision floating point. ccctttooommmnnn Convert form non-printing character to ASCII mnemonic. ccctttoooppp Convert from character string to packed string. ccctttooovvv Convert from character string to PL/I varying character string. dddeeecccooodddeee Convert from character string to various other formats. dddeeelllaaarrrggg Delete a command line argument. dddmmmaaarrrkkk$$$ Return the position of a disk file. dddooopppeeennn$$$ Open a disk file. dddrrreeeaaaddd$$$ Read words from a disk file. dddssseeeeeekkk$$$ Position a disk file. dddtttoooccc Convert double precision floating point to character string. dddwwwrrriiittt$$$ Write words to a disk file. eeennncccooodddeee Convert from various data formats to a character string. eeexxxpppaaannnddd Expand templates in a string. - 16 - Version 7 Conversion Guide fffiiilllcccpppyyy Copy a file or a segment directory. fffiiillltttsssttt Test a file for various conditions. fffiiinnndddfff$$$ Test file existence. fffiiinnnfffooo$$$ Get information on a file. fffllluuussshhh$$$ Flush a file's Subsystem buffer. gggcccdddiiirrr$$$ Get the path name of the current directory. gggeeetttvvvdddnnn Get the name of a file in a user's variables directory. gggfffnnnaaarrrggg Parse file name arguments on the command line. gggkkklllaaarrrggg Parse key-letter arguments on the command line. gggvvvlllaaarrrggg Obtain the next argument not beginning with a hyphen. iiicccooommmnnn$$$ Initialize the Subsystem common blocks. iiinnnllloooccc$$$ Initialize a two word array with a long integer. iiioooffflll$$$ Mark all currently open files. iiioooiiinnniiittt Initialize the Subsystem i/o routines. jjjdddaaattteee Compute a Julian date. lllooopppeeennn$$$ Open a line printer spooler file. llluuuttteeemmmppp Obtain value for a template. mmmaaapppfffddd Obtain the Primos file unit number of a disk file. - 17 - Version 7 Conversion Guide mmmaaarrrkkkfff Obtain the current position of a file. mmmkkkfffddd$$$ Make an open Primos file unit into a Subsystem file. mmmkkkpppaaa$$$ Convert a Primos tree name into a Subsystem path name. mmmkkktttrrr$$$ Convert a Subsystem path name into a Primos tree name. mmmnnntttoooccc Convert ASCII mnemonic to a character. mmmooovvveee$$$ Move a block of words quickly. pppaaarrrsssccclll Parse the command line. pppaaarrrsssdddttt Parse a character string containing a date. pppaaarrrssstttmmm Parse a character string containing a time. ppprrrooottt$$$ Set protection attributes on a file. ppptttoooccc Convert a packed string into a character string. rrreeeaaadddfff Read raw words from a file. rrrmmmfffiiilll$$$ Remove a file. rrrmmmssseeeggg$$$ Remove a segment directory. sssccctttaaabbblll Return all entries in a symbol table one at a time. sssdddrrroooppp Drop characters from a character string. ssseeeeeekkkfff Position a file. ssseeettteeerrrrrr Set the program error return code. - 18 - Version 7 Conversion Guide ssstttaaakkkeee Take characters from a character string. ssstttrrrbbbsssrrr Search a string table using a binary search. ssstttrrrcccmmmppp Compare two strings. ssstttrrriiimmm Drop trailing blanks from a string. ssstttrrrlllsssrrr Search a string table using a linear search. tttmmmaaarrrkkk$$$ Return the position of a terminal file. tttrrreeeaaaddd$$$ Read words from a terminal file. tttssscccaaannn$$$ Traverse a subtree of the file system. tttssseeeeeekkk$$$ Set the position of a terminal file. tttwwwrrriiittt$$$ Write words to a terminal file. uuupppkkkfffnnn$$$ Unpack a Primos file name. vvvfffyyyuuusssrrr Verify a Subsystem user name. vvvtttoooccc Convert a PL/I varying string to an EOS-terminated string. wwwkkkdddaaayyy Calculate the day of the week of a given date. wwwrrriiittteeefff Write raw words to a file. CCCooonnnvvveeerrrtttiiinnnggg '''RRRfff''' PPPrrrooogggrrraaammmsss tttooo '''RRRppp''' The language that 'rp', the new Ratfor preprocessor, handles is not exactly a superset of the language that 'rf' accepts. You will probably find that existing 'rf' programs must be slightly changed if they are to be preprocessed with 'rp'. Nevertheless, there are several reasons for making this conversion: - 19 - Version 7 Conversion Guide ... 'Rp's lexical conventions are more consistent. ... A program can run up to 10% faster when preprocessed with 'rp'. ... 'Rp' provides a richer set of declaration and control struc- tures. ... 'Rp' produces much more readable Fortran. ... 'Rp' runs slightly faster and provides better diagnostics. One additional impetus for converting 'rf' programs is that although 'rf' still exists in the Version 7 Subsystem, it is now considered a "locally supported" program. The major points to consider when converting 'rf' programs are: ... Character constants are represented differently ('a'c instead of LETA, ';'c instead of SEMICOL, etc.) The old format character constants must be replaced throughout the program. This applies to printable characters only; the non-printing characters (such as TAB and NEWLINE) still have the same names. ... The keywords aaannndddiiifff and ooorrriiifff are no longer recognized. They must be replaced with the '&&' and '||' operators. When removing these old forms, be careful not to change the order of evaluation by removing sets of parentheses. 'Rp' also allows nesting of '&&' and '||'; but it dddoooeeesss nnnooottt allow them to be nested withing the scope of the '&' and '|' operators. Thus, (a == b || a == c) && (d == e || d == f) is allowed, but (a == b || a == c) & (d == e || d == f) is not. Nor is the use of expressions containing '&&' and '||' allowed on the right-hand side of assignments. ... The cccaaassseee statement, although currently accepted by 'rp', is not officially supported. All occurrences of cccaaassseee statements should be replaced with ssseeellleeecccttt statements. Keep in mind that a chain of iiifff ... eeelllssseee iiifff ... eeelllssseee statements can be replaced by a ssseeellleeecccttt statement with a significant increase in performance. ... Ratfor and Fortran keywords are now really reserved. Their use as identifiers can cause syntax errors or misordered code. ... Alphabetic case is significant in 'rp' identifiers. - 20 - Version 7 Conversion Guide ... Compound statements may be included in the and clauses of fffooorrr statement. ... 'Rp' automatically includes the standard Subsystem definitions by default; the "include '/syscom/defi'" statement should be removed from existing programs. Note that all Subsystem include files now reside in the directory "=incl=" (nominally "//extra/incl"), not in "//syscom"; if you have iiinnncccllluuudddeee statements that reference any of these files, you must change them. ... 'Rp' automatically includes a "call init" in every main program; existing calls to 'init' should be removed. ... Subroutines and functions, especially when used as program structuring devices, can often be replaced by internal procedures for significant savings in code space and execu- tion time. - 21 - ___TTT___AAA___BBB___LLL___EEE___ ___OOO___FFF___ ___CCC___OOO___NNN___TTT___EEE___NNN___TTT___SSS IIInnntttrrroooddduuuccctttiiiooonnn ............................................. 1 EEExxxttteeennnsssiiiooonnnsss tttooo PPPaaattthhhnnnaaammmeee SSSyyynnntttaaaxxx ............................ 1 Pathnames Referring to Disk Files ..................... 1 Pathnames Referring to Other Devices .................. 2 SSStttaaatttuuusss ooofff VVVeeerrrsssiiiooonnn 666 CCCooommmmmmaaannndddsss ............................. 3 Obsolete Commands ..................................... 3 Superseded Commands ................................... 4 Modified Commands ..................................... 5 Enhanced Commands ..................................... 6 Unchanged Commands .................................... 8 New Commands .......................................... 9 SSStttaaatttuuusss ooofff VVVeeerrrsssiiiooonnn 666 SSSuuubbbrrrooouuutttiiinnneeesss .......................... 11 Obsolete Routines ..................................... 11 Superseded Routines ................................... 11 Modified Routines ..................................... 13 Enhanced Routines ..................................... 14 Unchanged Routines .................................... 15 New Routines .......................................... 15 CCCooonnnvvveeerrrtttiiinnnggg '''RRRfff''' PPPrrrooogggrrraaammmsss tttooo '''RRRppp''' ......................... 19 - iii -