UNIX/32V—Summary March9,1979 A.What’snew:highlightsoftheUNIX†/32VSystem 32-bitworld.UNIX/32Vhandles32-bitaddressesand32-bitdata.Devicesareaddressableto 231bytes,filesto230bytes. Portability.Codeoftheoperatingsystemandmostutilitieshasbeenextensivelyrevisedto minimizeitsdependenceonparticularhardware.UNIX/32VishighlycompatiblewithUNIXversion7. Fortran77.F77compilerforthenewstandardlanguageiscompatiblewithCattheobject level.AFortranstructurer,STRUCT,convertsold,uglyFortranintoRATFOR,astructured dialectusablewithF77. Shell.CompletelynewSHprogramsupportsstringvariables,traphandling,structuredprogramming,userprofiles,settablesearchpath,multilevelfilenamegeneration,etc. Documentpreparation.TROFFphototypesetterutilityisstandard.NROFF(forterminals) isnowhighlycompatiblewithTROFF.MSmacropackageprovidescannedcommandsformany commonformattingandlayoutsituations.TBLprovidesaneasytolearnlanguageforpreparing complicatedtabularmaterial.REFERfillsinbibliographiccitationsfromadatabase. UNIX-to-UNIXfilecopy.UUCPperformsspooledfiletransfersbetweenanytwomachines. Dataprocessing.SEDstreameditordoesmultipleeditingfunctionsinparallelonadata streamofindefinitelength.AWKreportgeneratordoesfree-fieldpatternselectionandarithmetic operations. Programdevelopment.MAKEcontrolsre-creationofcomplicatedsoftware,arrangingformin-imalrecompilation. Debugging.ADBdoespostmortemandbreakpointdebugging. Clanguage.Thelanguagenowsupportsdefinabledatatypes,generalizedinitialization,block structure,longintegers,unions,explicittypeconversions.TheLINTverifierdoesstrongtype checkinganddetectionofprobableerrorsandportabilityproblemsevenacrossseparatelycompiledfunctions. Lexicalanalyzergenerator.LEXconvertsspecificationofregularexpressionsandsemantic actionsintoarecognizingsubroutine.AnalogoustoYACC. Graphics.Simplegraph-drawingutility,graphicsubroutines,andgeneralizedplottingfilters adaptedtovariousdevicesarenowstandard. Standardinput-outputpackage.HighlyefficientbufferedstreamI/Oisintegratedwithfor-mattedinputandoutput. Other.Theoperatingsystemandutilitieshavebeenenhancedandfreedofrestrictionsinmany otherwaystoonumeroustorelate. †UNIXisaTrademarkofBellLaboratories.

-2-B.Hardware TheUNIX/32VoperatingsystemrunsonaDECVAX-11/780*withatleastthefollowing equipment: memory:256Kbytesormore. disk:RP06,RM03,orequivalent. tape:any9-trackMASSBUS-compatibletapedrive. Thefollowingequipmentisstronglyrecommended: communicationscontrollersuchasDZ11orDL11. fullduplex96-characterASCIIterminals. extradiskforsystembackup. Thesystemisnormallydistributedon9-tracktape.Theminimummemoryanddiskspacespeci-fiedisenoughtorunandmaintainUNIX/32V,andtokeepallsourceonline.Morememorywill beneededtohandlealargenumberofusers,bigdatabases,diversifiedcomplementsofdevices,or largeprograms.Theresidentcodeoccupies40-55Kbytesdependingonconfiguration;system dataalsooccupies30-55Kbytes. C.Software MostoftheprogramsavailableasUNIX/32Vcommandsarelisted.Sourcecodeandprinted manualsaredistributedforallofthelistedsoftwareexceptgames.AlmostallofthecodeiswritteninC.Commandsareself-containedanddonotrequireextrasetupinformation,unlessspecifi-callynotedas‘‘interactive.’’Interactiveprogramscanbemadetorunfromapreparedscriptsim-plybyredirectinginput.Mostprogramsintendedforinteractiveuse(e.g.,theeditor)allowforan escapetocommandlevel(theShell).Mostfileprocessingcommandscanalsogofromstandard inputtostandardoutput(‘‘filters’’).ThepipingfacilityoftheShellmaybeusedtoconnectsuch filtersdirectlytotheinputoroutputofotherprograms. 1.BasicSoftware Thisincludesthetime-sharingoperatingsystemwithutilities,andacompilerforthepro-gramminglanguageC—enoughsoftwaretowriteandrunnewapplicationsandtomaintainor modifyUNIX/32Vitself. 1.1.OperatingSystem UNIXThebasicresidentcodeonwhicheverythingelsedepends.Supportsthesystem calls,andmaintainsthefilesystem.AgeneraldescriptionofUNIXdesignphilosophyandsystemfacilitiesappearedintheCommunicationsoftheACM,July, 1974.AmoreextensivesurveyisintheBellSystemTechnicalJournalforJuly-August1978.Capabilitiesinclude: ◯ Reentrantcodeforuserprocesses. ◯ ‘‘Group’’accesspermissionsforcooperativeprojects,withoverlappingmemberships. ◯ Alarm-clocktimeouts. ◯ Timer-interruptsamplingandinterprocessmonitoringfordebuggingandmea-surement. ◯ MultiplexedI/Oformachine-to-machinecommunication. *VAXisaTrademarkofDigitalEquipmentCorporation.

-3-DEVICESAllI/Oislogicallysynchronous.I/Odevicesaresimplyfilesinthefilesystem. Normally,invisiblebufferingmakesallphysicalrecordstructureanddevicecharacteristicstransparentandexploitsthehardware’sabilitytodooverlappedI/O. UnbufferedphysicalrecordI/Oisavailableforunusualapplications.Driversfor thesedevicesareavailable: ◯ Asynchronousinterfaces:DZ11,DL11.SupportformostcommonASCIIterminals. ◯ Automaticcallingunitinterface:DN11. ◯ Printer/plotter:Versatek. ◯ Magnetictape:TE16. ◯ Packtypedisk:RP06,RM03;minimum-latencyseekscheduling. ◯ PhysicalmemoryofVAX-11,ormappedmemoryinresidentsystem. ◯ Nulldevice. ◯ Recipiesaresuppliedtoaidtheconstructionofdriversfor: Asynchronousinterface:DH11. Synchronousinterface:DU11. DECtape:TC11. Fixedheaddisk:RS11,RS03andRS04. Cartridge-typedisk:RK05. Phototypesetter:GraphicSystemsSystem/1throughDR11C. BOOTProcedurestogetUNIX/32Vstarted. 1.2.UserAccessControl LOGINSignonasanewuser. ◯ Verifypasswordandestablishuser’sindividualandgroup(project)identity. ◯ Adapttocharacteristicsofterminal. ◯ Establishworkingdirectory. ◯ Announcepresenceofmail(fromMAIL). ◯ Publishmessageoftheday. ◯ Executeuser-specifiedprofile. ◯ Startcommandinterpreterorotherinitialprogram. PASSWDChangeapassword. ◯ Usercanchangehisownpassword. ◯ Passwordsarekeptencryptedforsecurity.

-4-NEWGRPChangeworkinggroup(project).Protectsagainstunauthorizedchangestopro-jects. 1.3.TerminalHandling TABSSettabstopsappropriatelyforspecifiedterminaltype. STTYSetupoptionsforoptimalcontrolofaterminal.Insofarastheyarededucible fromtheinput,theseoptionsaresetautomaticallybyLOGIN. ◯ Halfvs.fullduplex. ◯ Carriagereturn+linefeedvs.newline. ◯ Interpretationoftabs. ◯ Parity. ◯ Mappingofuppercasetolower. ◯ Rawvs.editedinput. ◯ Delaysfortabs,newlinesandcarriagereturns. 1.4.FileManipulation CATConcatenateoneormorefilesontostandardoutput.Particularlyusedfor unadornedprinting,forinsertingdataintoapipeline,andforbufferingoutput thatcomesindribsanddrabs.Worksonanyfileregardlessofcontents. CPCopyonefiletoanother,orasetoffilestoadirectory.Worksonanyfileregardlessofcontents. PRPrintfileswithtitle,date,andpagenumberoneverypage. ◯ Multicolumnoutput. ◯ Parallelcolumnmergeofseveralfiles. LPROff-lineprint.Spoolsarbitraryfilestothelineprinter. CMPComparetwofilesandreportifdifferent. TAILPrintlastnlinesofinput ◯ Mayprintlastncharacters,orfromnlinesorcharacterstoend. SPLITSplitalargefileintomoremanageablepieces.Occasionallynecessaryforediting (ED). DDPhysicalfileformattranslator,forexchangingdatawithforeignsystems,especiallyIBM370’s. SUMSumthewordsofafile. 1.5.ManipulationofDirectoriesandFileNames RMRemoveafile.Onlythenamegoesawayifanyothernamesarelinkedtothefile.

-5- ◯ Stepthroughadirectorydeletingfilesinteractively. ◯ Deleteentiredirectoryhierarchies. LN‘‘Link’’anothername(alias)toanexistingfile. MVMoveafileorfiles.Usedforrenamingfiles. CHMODChangepermissionsononeormorefiles.Executablebyfiles’owner. CHOWNChangeownerofoneormorefiles. CHGRPChangegroup(project)towhichafilebelongs. MKDIRMakeanewdirectory. RMDIRRemoveadirectory. CDChangeworkingdirectory. FINDProwlthedirectoryhierarchyfindingeveryfilethatmeetsspecifiedcriteria. ◯ Criteriainclude: namematchesagivenpattern, creationdateingivenrange, dateoflastuseingivenrange, givenpermissions, givenowner, givenspecialfilecharacteristics, booleancombinationsofabove. ◯ Anydirectorymaybeconsideredtobetheroot. ◯ Performspecifiedcommandoneachfilefound. 1.6.RunningofPrograms SHTheShell,orcommandlanguageinterpreter. ◯ Supplyargumentstoandrunanyexecutableprogram. ◯ Redirectstandardinput,standardoutput,andstandarderrorfiles. ◯ Pipes:simultaneousexecutionwithoutputofoneprocessconnectedtothe inputofanother. ◯ Composecompoundcommandsusing:if...then...else, caseswitches, whileloops, forloopsoverlists, break,continueandexit, parenthesesforgrouping. ◯ Initiatebackgroundprocesses. ◯ PerformShellprograms,i.e.,commandscriptswithsubstitutablearguments. ◯ Constructargumentlistsfromallfilenamessatisfyingspecifiedpatterns.

-6- ◯ Takespecialactionontrapsandinterrupts. ◯ User-settablesearchpathforfindingcommands. ◯ Executesuser-settableprofileuponlogin. ◯ Optionallyannouncespresenceofmailasitarrives. ◯ Providesvariablesandparameterswithdefaultsetting. TESTTestsforuseinShellconditionals. ◯ Stringcomparison. ◯ Filenatureandaccessibility. ◯ Booleancombinationsoftheabove. EXPRStringcomputationsforcalculatingcommandarguments. ◯ Integerarithmetic ◯ Patternmatching WAITWaitforterminationofasynchronouslyrunningprocesses. READReadalinefromterminal,forinteractiveShellprocedure. ECHOPrintremainderofcommandline.UsefulfordiagnosticsorpromptsinShellprograms,orforinsertingdataintoapipeline. SLEEPSuspendexecutionforaspecifiedtime. NOHUPRunacommandimmunetohanginguptheterminal. NICERunacommandinlow(orhigh)priority. KILLTerminatenamedprocesses. CRONScheduleregularactionsatspecifiedtimes. ◯ Actionsarearbitraryprograms. ◯ Timesareconjunctionsofmonth,dayofmonth,dayofweek,hourandminute. Rangesarespecifiableforeach. ATScheduleaone-shotactionforanarbitrarytime. TEEPassdatabetweenprocessesanddivertacopyintooneormorefiles. 1.7.StatusInquiries LSListthenamesofone,several,orallfilesinoneormoredirectories. ◯ Alphabeticortemporalsorting,upordown. ◯ Optionalinformation:size,owner,group,datelastmodified,datelastaccessed, permissions,i-nodenumber.

-7-FILETrytodeterminewhatkindofinformationisinafilebyconsultingthefilesys-temindexandbyreadingthefileitself. DATEPrinttoday’sdateandtime.Hasconsiderableknowledgeofcalendricandhorologicalpeculiarities. ◯ MaysetUNIX/32V’sideaofdateandtime. DFReportamountoffreespaceonfilesystemdevices. DUPrintasummaryoftotalspaceoccupiedbyallfilesinahierarchy. QUOTPrintsummaryoffilespaceusagebyuserid. WHOTellwho’sonthesystem. ◯ Listofpresentlyloggedinusers,portsandtimeson. ◯ Optionalhistoryofallloginsandlogouts. PSReportonactiveprocesses. ◯ Listyourownoreverybody’sprocesses. ◯ Tellwhatcommandsarebeingexecuted. ◯ Optionalstatusinformation:stateandschedulinginfo,priority,attachedterminal,whatit’swaitingfor,size. IOSTATPrintstatisticsaboutsystemI/Oactivity. TTYPrintnameofyourterminal. PWDPrintnameofyourworkingdirectory. 1.8.BackupandMaintenance MOUNTAttachadevicecontainingafilesystemtothetreeofdirectories.Protects againstnonsensearrangements. UMOUNTRemovethefilesystemcontainedonadevicefromthetreeofdirectories.Protectsagainstremovingabusydevice. MKFSMakeanewfilesystemonadevice. MKNODMakeani-node(filesystementry)foraspecialfile.Specialfilesarephysical devices,virtualdevices,physicalmemory,etc. TP TARManagefilearchivesonmagnetictapeorDECtape.TARisnewer. ◯ Collectfilesintoanarchive. ◯ UpdateDECtapearchivebydate. ◯ ReplaceordeleteDECtapefiles. ◯ Printtableofcontents. ◯ Retrievefromarchive.

-8-DUMPDumpthefilesystemstoredonaspecifieddevice,selectivelybydate,orindis-criminately. RESTORRestoreadumpedfilesystem,orselectivelyretrievepartsthereof. SUTemporarilybecomethesuperuserwithalltherightsandprivilegesthereof. Requiresapassword. DCHECK ICHECK NCHECKCheckconsistencyoffilesystem. ◯ Printgrossstatistics:numberoffiles,numberofdirectories,numberofspecial files,spaceused,spacefree. ◯ Reportduplicateuseofspace. ◯ Retrievelostspace. ◯ Reportinaccessiblefiles. ◯ Checkconsistencyofdirectories. ◯ Listnamesofallfiles. CLRIPeremptorilyexpungeafileanditsspacefromafilesystem.Usedtorepairdamagedfilesystems. SYNCForcealloutstandingI/Oonthesystemtocompletion.Usedtoshutdowngracefully. 1.9.Accounting Thetiminginformationonwhichthereportsarebasedcanbemanuallyclearedorshutoffcompletely. ACPublishcumulativeconnecttimereport. ◯ Connecttimebyuserorbyday. ◯ Forallusersorforselectedusers. SAPublishShellaccountingreport.Givesusageinformationoneachcommandexecuted. ◯ Numberoftimesused. ◯ Totalsystemtime,usertimeandelapsedtime. ◯ Optionalaveragesandpercentages. ◯ Sortingonvariousfields. 1.10.Communication MAILMailamessagetooneormoreusers.Alsousedtoreadanddisposeofincoming mail.ThepresenceofmailisannouncedbyLOGINandoptionallybySH.

-9- ◯ Eachmessagecanbedisposedofindividually. ◯ Messagescanbesavedinfilesorforwarded. CALENDARAutomaticreminderserviceforeventsoftodayandtomorrow. WRITEEstablishdirectterminalcommunicationwithanotheruser. WALLWritetoallusers. MESGInhibitreceiptofmessagesfromWRITEandWALL. CUCallupanothertime-sharingsystem. ◯ Transparentinterfacetoremotemachine. ◯ Filetransmission. ◯ Takeremoteinputfromlocalfileorputremoteoutputintolocalfile. ◯ RemotesystemneednotbeUNIX/32V. UUCPUNIXtoUNIXcopy. ◯ Automaticqueuinguntillinebecomesavailableandremotemachineisup. ◯ Copybetweentworemotemachines. ◯ Differences,mail,etc.,betweentwomachines. 1.11.BasicProgramDevelopmentTools Someoftheseutilitiesareusedasintegralpartsofthehigherlevellanguagesdescribedinsection 2. ARMaintainarchivesandlibraries.Combinesseveralfilesintooneforhousekeeping efficiency. ◯ Createnewarchive. ◯ Updatearchivebydate. ◯ Replaceordeletefiles. ◯ Printtableofcontents. ◯ Retrievefromarchive. ASAssembler. ◯ Createsobjectprogramconsistingof code,normallyread-onlyandsharable, initializeddataorread-writecode, uninitializeddata. ◯ Relocatableobjectcodeisdirectlyexecutablewithoutfurthertransformation. ◯ Objectcodenormallyincludesasymboltable.

-10- ◯ ‘‘Conditionaljump’’instructionsbecomebranchesorbranchesplusjumps dependingondistance. LibraryThebasicrun-timelibrary.Theseroutinesareusedfreelybyallsoftware. ◯ Bufferedcharacter-by-characterI/O. ◯ Formattedinputandoutputconversion(SCANFandPRINTF)forstandard inputandoutput,files,in-memoryconversion. ◯ Storageallocator. ◯ Timeconversions. ◯ Numberconversions. ◯ Passwordencryption. ◯ Quicksort. ◯ Randomnumbergenerator. ◯ Mathematicalfunctionlibrary,includingtrigonometricfunctionsandinverses, exponential,logarithm,squareroot,besselfunctions. ADBInteractivedebugger. ◯ Postmortemdumping. ◯ Examinationofarbitraryfiles,withnolimitonsize. ◯ Interactivebreakpointdebuggingwiththedebuggerasaseparateprocess. ◯ Symbolicreferencetolocalandglobalvariables. ◯ StacktraceforCprograms. ◯ Outputformats: 1-,2-,or4-byteintegersinoctal,decimal,orhex singleanddoublefloatingpoint characterandstring disassembledmachineinstructions ◯ Patching. ◯ Searchingforinteger,character,orfloatingpatterns. ODDumpanyfile.Outputoptionsincludeanycombinationofoctalordecimalor hexbywords,octalbybytes,ASCII,opcodes,hexadecimal. ◯ Rangeofdumpingiscontrollable. LDLinkedit.Combinerelocatableobjectfiles.Insertrequiredroutinesfromspecifiedlibraries.

-11- ◯ Resultingcodeissharablebydefault. LORDERPlacesobjectfilenamesinproperorderforloading,sothatfilesdependingon otherscomeafterthem. NMPrintthenamelist(symboltable)ofanobjectprogram.Providescontrolover thestyleandorderofnamesthatareprinted. SIZEReportthememoryrequirementsofoneormoreobjectfiles. STRIPRemovetherelocationandsymboltableinformationfromanobjectfiletosave space. TIMERunacommandandreporttiminginformationonit. PROFConstructaprofileoftimespentperroutinefromstatisticsgatheredbytimesamplingtheexecutionofaprogram. ◯ SubroutinecallfrequencyandaveragetimesforCprograms. MAKEControlscreationoflargeprograms.Usesacontrolfilespecifyingsourcefile dependenciestomakenewversion;usestimelastchangedtodeduceminimum amountofworknecessary. ◯ KnowsaboutCC,YACC,LEX,etc. 1.12.UNIX/32VProgrammer’sManual ManualMachine-readableversionoftheUNIX/32VProgrammer’sManual. ◯ Systemoverview. ◯ Allcommands. ◯ Allsystemcalls. ◯ AllsubroutinesinCandassemblerlibraries. ◯ Alldevicesandotherspecialfiles. ◯ Formatsoffilesystemandkindsoffilesknowntosystemsoftware. ◯ Bootandmaintenanceprocedures. MANPrintspecifiedmanualsectiononyourterminal. 1.13.Computer-AidedInstruction LEARNAprogramforinterpretingCAIscripts,plusscriptsforlearningaboutUNIX/32V byusingit. ◯ Scriptsforbasicfilesandcommands,editor,advancedfilesandcommands, EQN,MSmacros,Cprogramminglanguage. 2.Languages -12-2.1.TheCLanguage CCCompileand/orlinkeditprogramsintheClanguage.TheUNIX/32Voperating system,mostofthesubsystemsandCitselfarewritteninC.ForafulldescriptionofC,readTheCProgrammingLanguage,BrianW.KernighanandDennis M.Ritchie,Prentice-Hall,1978. ◯ Generalpurposelanguagedesignedforstructuredprogramming. ◯ Datatypesincludecharacter,integer,float,double,pointerstoalltypes,functionsreturningabovetypes,arraysofalltypes,structuresandunionsofall types. ◯ Operationsintendedtogivemachine-independentcontroloffullmachinefacil-ity,includingto-memoryoperationsandpointerarithmetic. ◯ Macropreprocessorforparameterizedcodeandinclusionofstandardfiles. ◯ Allproceduresrecursive,withparametersbyvalue. ◯ Machine-independentpointermanipulation. ◯ ObjectcodeusesfulladdressingcapabilityoftheVAX-11. ◯ Runtimelibrarygivesaccesstoallsystemfacilities. ◯ Definabledatatypes. ◯ Blockstructure LINTVerifierforCprograms.Reportsquestionableornonportableusagesuchas: Mismatcheddatadeclarationsandprocedureinterfaces. Nonportabletypeconversions. Unusedvariables,unreachablecode,no-effectoperations. Mistypedpointers. Obsoletesyntax. ◯ Fullcross-modulecheckingofseparatelycompiledprograms. CBAbeautifierforCprograms.Doesproperindentationandplacementofbraces. 2.2.Fortran F77AfullcompilerforANSIStandardFortran77. ◯ CompatiblewithCandsupportingtoolsatobjectlevel. ◯ OptionalsourcecompatibilitywithFortran66. ◯ Freeformatsource. ◯ Optionalsubscript-rangechecking,detectionofuninitializedvariables. ◯ Allwidthsofarithmetic:2-and4-byteinteger;4-and8-bytereal;8-and 16-bytecomplex.

-13-RATFORRatforaddsrationalcontrolstructurea` laCtoFortran. ◯ Compoundstatements. ◯ If-else,do,for,while,repeat-until,break,nextstatements. ◯ Symbolicconstants. ◯ Fileinsertion. ◯ Freeformatsource ◯ Translationofrelationalslike>,>=. ◯ ProducesgenuineFortrantocarryaway. ◯ MaybeusedwithF77. STRUCTConvertsordinaryuglyFortranintostructuredFortran(i.e.,Ratfor),usingstatementgrouping,if-else,while,for,repeat-until. 2.3.OtherAlgorithmicLanguages DCInteractiveprogrammabledeskcalculator.Hasnamedstoragelocationsaswellas conventionalstackforholdingintegersorprograms. ◯ Unlimitedprecisiondecimalarithmetic. ◯ Appropriatetreatmentofdecimalfractions. ◯ Arbitraryinputandoutputradices,inparticularbinary,octal,decimaland hexadecimal. ◯ ReversePolishoperators: +−*/ remainder,power,squareroot, load,store,duplicate,clear, print,enterprogramtext,execute. BCAC-likeinteractiveinterfacetothedeskcalculatorDC. ◯ AllthecapabilitiesofDCwithahigh-levelsyntax. ◯ Arraysandrecursivefunctions. ◯ Immediateevaluationofexpressionsandevaluationoffunctionsuponcall. ◯ Arbitraryprecisionelementaryfunctions:exp,sin,cos,atan. ◯ Go-to-lessprogramming. 2.4.Macroprocessing M4Ageneralpurposemacroprocessor. ◯ Stream-oriented,recognizesmacrosanywhereintext.

-14- ◯ Syntaxfitswithfunctionalsyntaxofmosthigher-levellanguages. ◯ Canevaluateintegerarithmeticexpressions. 2.5.Compiler-compilers YACCAnLR(1)-basedcompilerwritingsystem.Duringexecutionofresultingparsers, arbitraryCfunctionsmaybecalledtodocodegenerationorsemanticactions. ◯ BNFsyntaxspecifications. ◯ Precedencerelations. ◯ Acceptsformallyambiguousgrammarswithnon-BNFresolutionrules. LEXGeneratoroflexicalanalyzers.ArbitraryCfunctionsmaybecalleduponisolationofeachlexicaltoken. ◯ Fullregularexpression,plusleftandrightcontextdependence. ◯ ResultinglexicalanalysersinterfacecleanlywithYACCparsers. 3.TextProcessing 3.1.DocumentPreparation EDInteractivecontexteditor.Randomaccesstoalllinesofafile. ◯ Findlinesbynumberorpattern.Patternsmayinclude:specifiedcharacters, don’tcarecharacters,choicesamongcharacters,repetitionsoftheseconstructs, beginningofline,endofline. ◯ Add,delete,change,copy,moveorjoinlines. ◯ Permuteorsplitcontentsofaline. ◯ Replaceoneorallinstancesofapatternwithinaline. ◯ Combineorsplitfiles. ◯ EscapetoShell(commandlanguage)duringediting. ◯ Doanyofaboveoperationsoneverypattern-selectedlineinagivenrange. ◯ Optionalencryptionforextrasecurity. PTXMakeapermuted(keywordincontext)index. SPELLLookforspellingerrorsbycomparingeachwordinadocumentagainstaword list. ◯ 25,000-wordlistincludespropernames. ◯ Handlescommonprefixesandsuffixes.

-15- ◯ Collectswordstohelptailorlocalspellinglists. LOOKSearchforwordsindictionarythatbeginwithspecifiedprefix. CRYPTEncryptanddecryptfilesforsecurity. 3.2.DocumentFormatting TROFF NROFFAdvancedtypesetting.TROFFdrivesaGraphicSystemsphototypesetter; NROFFdrivesasciiterminalsofalltypes.Thissummarywastypesetusing TROFF.TROFFandNROFFarecapableofelaboratefeatsofformatting,when appropriatelyprogrammed.TROFFandNROFFacceptthesameinputlanguage. ◯ Completelydefinablepageformatkeyedtodynamicallyplanted‘‘interrupts’’at specifiedlines. ◯ Maintainsseveralseparatelydefinabletypesettingenvironments(e.g.,onefor bodytext,oneforfootnotes,andoneforunusuallyelaborateheadings). ◯ Arbitrarynumberofoutputpoolscanbecombinedatwill. ◯ Macroswithsubstitutablearguments,andmacrosinvocableinmid-line. ◯ Computationandprintingofnumericalquantities. ◯ Conditionalexecutionofmacros. ◯ Tabularlayoutfacility. ◯ Positionsexpressibleininches,centimeters,ems,points,machineunitsorarithmeticcombinationsthereof. ◯ Accesstocharacter-widthcomputationforunusuallydifficultlayoutproblems. ◯ Overstrikes,built-upbrackets,horizontalandverticallinedrawing. ◯ Dynamicrelativeorabsolutepositioningandsizeselection,globallyoratthe characterlevel. ◯ Canexploitthecharacteristicsoftheterminalbeingused,forapproximating specialcharacters,reversemotions,proportionalspacing,etc. TheGraphicSystemstypesetterhasavocabularyofseveral102-characterfonts(4simultaneously) in15sizes.TROFFprovidesterminaloutputforroughsamplingoftheproduct. NROFFwillproducemulticolumnoutputonterminalscapableofreverselinefeed,orthroughthe postprocessorCOL. HighprogrammingskillisrequiredtoexploittheformattingcapabilitiesofTROFFandNROFF, althoughunskilledpersonnelcaneasilybetrainedtoenterdocumentsaccordingtocannedformatssuchasthoseprovidedbyMS,below.TROFFandEQNareessentiallyidenticaltoNROFF andNEQNsoitisusuallypossibletodefineinterchangeableformatstoproduceapproximate proofcopyonterminalsbeforeactualtypesetting.ThepreprocessorsMS,TBL,andREFERare -16-fullycompatiblewithTROFFandNROFF. MSAstandardizedmanuscriptlayoutpackageforusewithNROFF/TROFF.This documentwasformattedwithMS. ◯ Pagenumbersanddraftdates. ◯ Automaticallynumberedsubheads. ◯ Footnotes. ◯ Singleordoublecolumn. ◯ Paragraphing,displayandindentation. ◯ Numberedequations. EQNAmathematicaltypesettingpreprocessorforTROFF.Translateseasilyreadable formulas,eitherin-lineordisplayed,intodetailedtypesettinginstructions.For-mulasarewritteninastylelikethis: sigmasup2˜ =˜ 1overNsumfromi=1toN(xsubi−xbar)sup2 whichproduces: σ2=1NNi=1Σ(xi−x)2 ◯ Automaticcalculationofsizechangesforsubscripts,sub-subscripts,etc. ◯ FullvocabularyofGreeklettersandspecialsymbols,suchas‘gamma’, ‘GAMMA’,‘integral’. ◯ Automaticcalculationoflargebracketsizes. ◯ Vertical‘‘piling’’offormulaeformatrices,conditionalalternatives,etc. ◯ Integrals,sums,etc.,witharbitrarilycomplexlimits. ◯ Diacriticals:dots,doubledots,hats,bars,etc. ◯ Easilylearnedbynonprogrammersandmathematicaltypists. NEQNAversionofEQNforNROFF;acceptsthesameinputlanguage.PreparesformulasfordisplayonanyterminalthatNROFFknowsabout,forexample,those basedonDiabloprintingmechanism. ◯ SamefacilitiesasEQNwithingraphicalcapabilityofterminal. TBLApreprocessorforNROFF/TROFFthattranslatessimpledescriptionsoftable layoutsandcontentsintodetailedtypesettinginstructions. ◯ Computescolumnwidths. ◯ Handlesleft-andright-justifiedcolumns,centeredcolumnsanddecimal-point alignment.

-17- ◯ Placescolumntitles. ◯ Tableentriescanbetext,whichisadjustedtofit. ◯ Canboxallorpartsoftable. REFERFillsinbibliographiccitationsinadocumentfromadatabase(notsupplied). ◯ Referencesmaybeprintedinanystyle,astheyoccurorcollectedattheend. ◯ Maybenumberedsequentially,bynameofauthor,etc. TCSimulateGraphicSystemstypesetteronTektronix4014scope.UsefulforcheckingTROFFpagelayoutbeforetypesetting. COLCanonicalizefileswithreverselinefeedsforone-passprinting. DEROFFRemoveallTROFFcommandsfrominput. CHECKEQCheckdocumentforpossibleerrorsinEQNusage. 4.InformationHandling SORTSortormergeASCIIfilesline-by-line.Nolimitoninputsize. ◯ Sortupordown. ◯ Sortlexicographicallyoronnumerickey. ◯ Multiplekeyslocatedbydelimitersorbycharacterposition. ◯ Maysortuppercasetogetherwithlowerintodictionaryorder. ◯ Optionallysuppressduplicatedata. TSORTTopologicalsort—convertsapartialorderintoatotalorder. UNIQCollapsesuccessiveduplicatelinesinafileintooneline. ◯ Publishlinesthatwereoriginallyunique,duplicated,orboth. ◯ Maygiveredundancycountforeachline. TRDoone-to-onecharactertranslationaccordingtoanarbitrarycode. ◯ Maycoalesceselectedrepeatedcharacters. ◯ Maydeleteselectedcharacters. DIFFReportlinechanges,additionsanddeletionsnecessarytobringtwofilesinto agreement. ◯ Mayproduceaneditorscripttoconvertonefileintoanother. ◯ Avariantcomparestwonewversionsagainstoneoldone. COMMIdentifycommonlinesintwosortedfiles.Outputinupto3columnsshowslines presentinfirstfileonly,presentinboth,and/orpresentinsecondonly.

-18-JOINCombinetwofilesbyjoiningrecordsthathaveidenticalkeys. GREPPrintalllinesinafilethatsatisfyapatternasusedintheeditorED. ◯ Mayprintalllinesthatfailtomatch. ◯ Mayprintcountofhits. ◯ Mayprintfirsthitineachfile. LOOKBinarysearchinsortedfileforlineswithspecifiedprefix. WCCountthelines,‘‘words’’(blank-separatedstrings)andcharactersinafile. SEDStream-orientedversionofED.Canperformasequenceofeditingoperationson eachlineofaninputstreamofunboundedlength. ◯ Linesmaybeselectedbyaddressorrangeofaddresses. ◯ Controlflowandconditionaltesting. ◯ Multipleoutputstreams. ◯ Multi-linecapability. AWKPatternscanningandprocessinglanguage.Searchesinputforpatterns,andperformsactionsoneachlineofinputthatsatisfiesthepattern. ◯ Patternsincluderegularexpressions,arithmeticandlexicographicconditions, booleancombinationsandrangesofthese. ◯ Datatreatedasstringornumericasappropriate. ◯ Canbreakinputintofields;fieldsarevariables. ◯ Variablesandarrays(withnon-numericsubscripts). ◯ Fullsetofarithmeticoperatorsandcontrolflow. ◯ Multipleoutputstreamstofilesandpipes. ◯ Outputcanbeformattedasdesired. ◯ Multi-linecapabilities. 5.Graphics TheprogramsinthissectionarepredominantlyintendedforusewithTektronix4014storage scopes. GRAPHPreparesagraphofasetofinputnumbers. ◯ Inputscaledtofitstandardplottingarea. ◯ Abscissaemaybesuppliedautomatically. ◯ Graphmaybelabeled.

-19- ◯ Controlovergridstyle,linestyle,graphorientation,etc. SPLINEProvidesasmoothcurvethroughasetofpointsintendedforGRAPH. PLOTAsetoffiltersforprintinggraphsproducedbyGRAPHandotherprogramson variousterminals.Filtersprovidedfor4014,DASIterminals,Versatec printer/plotter. 6.Novelties,Games,andThingsThatDidn’tFitAnywhereElse BACKGAMMON Aplayerofmodestaccomplishment. BCDConvertsasciitocard-imageform. CALPrintacalendarofspecifiedmonthandyear. CHINGTheIChing.Placeyourowninterpretationontheoutput. FORTUNEPresentsarandomfortunecookieoneachinvocation.Limitedjarofcookies included. UNITSConvertamountsbetweendifferentscalesofmeasurement.Knowshundredsof units.Forexample,howmanykm/secisaparsec/megayear? ARITHMETIC Speedandaccuracytestfornumberfacts. QUIZTestyourknowledgeofShakespeare,Presidents,capitals,etc. WUMPHuntthewumpus,thrillingsearchinadangerouscave. HANGMANWord-guessinggame.UsesadictionarysuppliedwithSPELL. FISHChildren’scard-guessinggame.