ckuus2.c 543 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742
  1. #ifdef SSHTEST
  2. #define SSHBUILTIN
  3. #endif /* SSHTEST */
  4. /* C K U U S 2 -- User interface strings & help text module for C-Kermit */
  5. /*
  6. Authors:
  7. Frank da Cruz <fdc@columbia.edu>,
  8. The Kermit Project, New York City
  9. Jeffrey E Altman <jaltman@secure-endpoints.com>
  10. Secure Endpoints Inc., New York City
  11. Copyright (C) 1985, 2017,
  12. Trustees of Columbia University in the City of New York.
  13. All rights reserved. See the C-Kermit COPYING.TXT file or the
  14. copyright text in the ckcmai.c module for disclaimer and permissions.
  15. This module contains HELP command and other long text strings.
  16. IMPORTANT: Character string constants longer than about 250 are not portable.
  17. Longer strings should be broken up into arrays of strings and accessed with
  18. hmsga() rather than hmsg(). (This statement was true in the 1980s and
  19. probably is not a big concern in the 21st Century, but you never know;
  20. there still might exist some 16-bit platforms and C compilers that have
  21. restrictions like this.
  22. */
  23. #include "ckcsym.h"
  24. #include "ckcdeb.h"
  25. #include "ckcnet.h"
  26. #include "ckcasc.h"
  27. #include "ckcker.h"
  28. #include "ckuusr.h"
  29. #include "ckcxla.h"
  30. #ifdef OS2
  31. #ifdef NT
  32. #include <windows.h>
  33. #else /* not NT */
  34. #define INCL_KBD
  35. #ifdef OS2MOUSE
  36. #define INCL_MOU
  37. #endif /* OS2MOUSE */
  38. #define INCL_DOSMISC
  39. #define INCL_DOSDEVICES
  40. #include <os2.h> /* This pulls in a whole load of stuff */
  41. #undef COMMENT
  42. #endif /* NT */
  43. #include "ckocon.h"
  44. #include "ckokvb.h"
  45. #include "ckokey.h"
  46. #endif /* OS2 */
  47. extern char * ck_cryear; /* For copyright notice */
  48. extern xx_strp xxstring;
  49. extern char * ccntab[];
  50. /*
  51. hlptok contains the string for which the user requested help. This is
  52. useful for distinguishing synonyms, in case different help text is needed
  53. depending on which synonym was given.
  54. */
  55. extern char * hlptok;
  56. #ifndef NOIKSD
  57. extern int inserver;
  58. #endif /* IKSD */
  59. #ifndef NOICP
  60. extern int cmflgs;
  61. #ifdef DCMDBUF
  62. extern char *cmdbuf, *atmbuf;
  63. #else
  64. extern char cmdbuf[], atmbuf[];
  65. #endif /* DCMDBUF */
  66. #endif /* NOICP */
  67. extern char *xarg0;
  68. extern int nrmt, nprm, dfloc, local, parity, escape;
  69. extern int turn, flow;
  70. extern int binary, quiet, keep;
  71. extern int success, xaskmore;
  72. #ifdef OS2
  73. extern int tt_rows[], tt_cols[];
  74. #else /* OS2 */
  75. extern int tt_rows, tt_cols;
  76. #endif /* OS2 */
  77. extern int cmd_rows, cmd_cols;
  78. extern long speed;
  79. extern char *dftty, *versio, *ckxsys;
  80. #ifndef NOHELP
  81. extern char *helpfile;
  82. #endif /* NOHELP */
  83. extern struct keytab prmtab[];
  84. #ifndef NOXFER
  85. extern struct keytab remcmd[];
  86. #endif /* NOXFER */
  87. #ifndef NOICP
  88. /* Interactive help strings */
  89. /* Top-level HELP text. IMPORTANT: Also see tophlpi[] for IKSD. */
  90. static char *tophlp[] = {
  91. "Trustees of Columbia University in the City of New York.\n",
  92. #ifndef NOHELP
  93. " Type EXIT to exit.",
  94. #ifdef OS2
  95. " Type INTRO for a brief introduction to the C-Kermit Command screen.",
  96. #else
  97. " Type INTRO for a brief introduction to C-Kermit.",
  98. #endif /* OS2 */
  99. " Type LICENSE to see the C-Kermit license.",
  100. " Type HELP followed by a command name for help about a specific command.",
  101. #ifndef NOPUSH
  102. #ifdef UNIX
  103. " Type MANUAL to access the C-Kermit manual page.",
  104. #else
  105. #ifdef VMS
  106. " Type MANUAL to access the C-Kermit help topic.",
  107. #else
  108. " Type MANUAL to access the C-Kermit manual.",
  109. #endif /* VMS */
  110. #endif /* UNIX */
  111. #endif /* NOPUSH */
  112. " Type NEWS for news about new features.",
  113. " Type SUPPORT to learn how to get technical support.",
  114. " Press ? (question mark) at the prompt, or anywhere within a command,",
  115. " for a menu (context-sensitive help, menu on demand).",
  116. #else
  117. "Press ? for a list of commands; see documentation for detailed descriptions.",
  118. #endif /* NOHELP */
  119. #ifndef NOCMDL
  120. #ifndef NOHELP
  121. " ",
  122. " Type HELP OPTIONS for help with command-line options.",
  123. #endif /* NOHELP */
  124. #endif /* NOCMDL */
  125. " ",
  126. #ifndef OS2
  127. #ifdef MAC
  128. "Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
  129. "Christine M. Gianone, Digital Press, 1997, ISBN: 1-55558-164-1",
  130. #else
  131. "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
  132. "2nd Edition, Digital Press / Butterworth-Heinemann 1997, ISBN 1-55558-164-1,",
  133. "plus supplements at http://www.kermitproject.org/ckermit.html#doc.",
  134. #endif /* MAC */
  135. #endif /* OS2 */
  136. #ifdef MAC
  137. " ",
  138. "Also see the Mac Kermit Doc and Bwr files on the Mac Kermit diskette.\n",
  139. #else
  140. #ifdef HPUX10
  141. " ",
  142. "See the files in /usr/share/lib/kermit/ for additional information.",
  143. #endif /* HPUX10 */
  144. #endif /* MAC */
  145. ""
  146. };
  147. #ifndef NOIKSD
  148. static char *tophlpi[] = { /* Top-level help for IKSD */
  149. "Trustees of Columbia University in the City of New York.\n",
  150. #ifndef NOHELP
  151. " Type INTRO for a brief introduction to Kermit commands.",
  152. " Type VERSION for version and copyright information.",
  153. " Type HELP followed by a command name for help about a specific command.",
  154. " Type SUPPORT to learn how to get technical support.",
  155. " Type LOGOUT (or EXIT) to log out.",
  156. " Press ? (question mark) at the prompt, or anywhere within a command,",
  157. " for a menu (context-sensitive help, menu on demand).",
  158. #else
  159. "Press ? for a list of commands; see documentation for detailed descriptions.",
  160. #endif /* NOHELP */
  161. " ",
  162. "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
  163. "2nd Edition, Digital Press (1997), ISBN 1-55558-164-1. More info at the",
  164. "Kermit Project website, http://www.kermitproject.org/.",
  165. ""
  166. };
  167. #endif /* NOIKSD */
  168. #ifndef NOHELP
  169. char *newstxt[] = {
  170. #ifdef OS2
  171. "Welcome to C-Kermit for Windows, the Open-Source successor to",
  172. "Columbia University's Kermit 95 package.",
  173. #ifdef BETATEST
  174. " ",
  175. "THIS IS A PRERELEASE TEST VERSION NOT SUITABLE FOR PRODUCTION."
  176. "FOR DETAILS, SEE http://www.kermitproject.org/ckwindows.html",
  177. #endif /* BETATEST */
  178. " ",
  179. "Major new features since the final Kermit 95 release include:",
  180. #else
  181. "Welcome to C-Kermit 9.0.304. New features since 8.0.211 include:",
  182. #endif /* OS2 */
  183. " . Open Source Simplified 3-Clause BSD License",
  184. #ifdef OS2
  185. " . Source code! The Windows edition of C-Kermit, formerly known",
  186. " as Kermit 95 or K-95, is now available under the Revised 3-Clause",
  187. " BSD Open Source license.",
  188. #endif /* OS2 */
  189. #ifndef OS2
  190. " . Full 64-bit memory model on platforms that support it",
  191. " . Large file support (64-bit file size) on most platforms",
  192. " . Long integer variables and constants in commands and scripts",
  193. #endif /* OS2 */
  194. " . Bigger maximum command and macro lengths",
  195. " . Bigger filename expansion space",
  196. " . New super-flexible RENAME command (HELP RENAME)",
  197. " . New CHANGE command for changing text files (HELP CHANGE)",
  198. " . New COPY and DIRECTORY command options (HELP COPY, HELP DIRECTORY)",
  199. " . New TOUCH command (HELP TOUCH)",
  200. #ifdef UNIX
  201. " . Limited Unix Locale support (HELP SET LOCALE)",
  202. #endif /* UNIX */
  203. #ifdef CK_SSL
  204. " . Raw SSL/TLS connections for connecting to POP3 and similar services",
  205. #endif /* CK_SSL */
  206. " . At the prompt, Ctrl-K recalls most recent filename",
  207. " . Scripting and performance improvements",
  208. " . Bug fixes",
  209. " ",
  210. "Documentation:",
  211. " 1. http://www.kermitproject.org/usingckermit.html",
  212. " \"Using C-Kermit\", second edition (1997), current with C-Kermit 6.0.",
  213. " ",
  214. " 2. http://www.kermitproject.org/ckermit70.html",
  215. " which documents the new features of C-Kermit 7.0.",
  216. " ",
  217. " 3. http://www.kermitproject.org/ckermit80.html",
  218. " which documents the new features of C-Kermit 8.0.",
  219. " ",
  220. " 4. http://www.kermitproject.org/ckermit90.html",
  221. " which documents the new features of C-Kermit 9.0.",
  222. " ",
  223. "If the release date shown by the VERSION command is long past, be sure to",
  224. "check the Kermit website to see if there have been updates:",
  225. " ",
  226. " http://www.kermitproject.org/ (Kermit Project home page)",
  227. " http://www.kermitproject.org/ckermit.html (C-Kermit home page)",
  228. " http://www.kermitproject.org/ckdaily.html (C-Kermit development)",
  229. ""
  230. };
  231. #endif /* NOHELP */
  232. #ifndef NOHELP
  233. char *introtxt[] = {
  234. #ifdef OS2
  235. "Welcome to C-Kermit for Windows, communication software for:",
  236. #else
  237. #ifdef UNIX
  238. "Welcome to UNIX C-Kermit communications software for:",
  239. #else
  240. #ifdef VMS
  241. "Welcome to VMS C-Kermit communications software for:",
  242. #else
  243. #ifdef VOS
  244. "Welcome to VOS C-Kermit communications software for:",
  245. #else
  246. #ifdef MAC
  247. "Welcome to Mac Kermit communications software for:",
  248. #else
  249. "Welcome to C-Kermit communications software for:",
  250. #endif /* MAC */
  251. #endif /* VOS */
  252. #endif /* VMS */
  253. #endif /* UNIX */
  254. #endif /* OS2 */
  255. #ifndef NOXFER
  256. " . Error-free and efficient file transfer",
  257. #endif /* NOXFER */
  258. #ifndef NOLOCAL
  259. #ifdef OS2
  260. " . VT320/220/102/100/52, ANSI, Wyse, Linux, Televideo, and other emulations",
  261. #else
  262. #ifdef MAC
  263. " . VT220 terminal emulation",
  264. #else
  265. " . Terminal connection",
  266. #endif /* MAC */
  267. #endif /* OS2 */
  268. #endif /* NOLOCAL */
  269. #ifndef NOSPL
  270. " . Script programming",
  271. #endif /* NOSPL */
  272. #ifndef NOICS
  273. " . International character set conversion",
  274. #endif /* NOICS */
  275. #ifndef NODIAL
  276. #ifndef NOSPL
  277. " . Numeric and alphanumeric paging",
  278. #endif /* NOSPL */
  279. #endif /* NODIAL */
  280. #ifndef NOLOCAL
  281. " ",
  282. "Supporting:",
  283. " . Serial connections, direct or dialed.",
  284. #ifndef NODIAL
  285. " . Automatic modem dialing",
  286. #endif /* NODIAL */
  287. #ifdef TCPSOCKET
  288. " . TCP/IP network connections:",
  289. #ifdef TNCODE
  290. " - Telnet sessions",
  291. #endif /* TNCODE */
  292. #ifdef SSHBUILTIN
  293. " - SSH v1 and v2 connections",
  294. #else
  295. #ifdef ANYSSH
  296. " - SSH connections via external agent",
  297. #endif /* ANYSSH */
  298. #endif /* SSHBUILTIN */
  299. #ifdef RLOGCODE
  300. " - Rlogin sessions",
  301. #endif /* RLOGCODE */
  302. #ifdef NEWFTP
  303. " - FTP sessions",
  304. #endif /* NEWFTP */
  305. #ifdef CKHTTP
  306. " - HTTP 1.1 sessions",
  307. #endif /* CKHTTP */
  308. #ifdef IKSD
  309. " - Internet Kermit Service",
  310. #endif /* IKSD */
  311. #endif /* TCPSOCKET */
  312. #ifdef ANYX25
  313. " . X.25 network connections",
  314. #endif /* ANYX25 */
  315. #ifdef OS2
  316. #ifdef DECNET
  317. " . DECnet/PATHWORKS LAT Ethernet connections",
  318. #endif /* DECNET */
  319. #ifdef SUPERLAT
  320. " . Meridian Technologies' SuperLAT connections",
  321. #endif /* SUPERLAT */
  322. #ifdef NPIPE
  323. " . Named-pipe connections",
  324. #endif /* NPIPE */
  325. #ifdef CK_NETBIOS
  326. " . NETBIOS connections",
  327. #endif /* CK_NETBIOS */
  328. #endif /* OS2 */
  329. #endif /* NOLOCAL */
  330. " ",
  331. "While typing commands, you may use the following special characters:",
  332. " . DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
  333. " . CTRL-W: Delete the most recent word typed.",
  334. " . CTRL-U: Delete the current line.",
  335. " . CTRL-R: Redisplay the current line.",
  336. #ifdef CK_RECALL
  337. #ifdef OS2
  338. " . Uparrow: Command recall - go backwards in command recall buffer.",
  339. " . Downarrow: Command recall - go forward in command recall buffer.",
  340. #ifndef NOIKSD
  341. " (Note: Arrow keys can be used only on the PC's physical keyboard.)",
  342. #endif /* NOIKSD */
  343. #endif /* OS2 */
  344. " . CTRL-P: Command recall - go backwards in command recall buffer.",
  345. " . CTRL-B: Command recall - same as Ctrl-P.",
  346. " . CTRL-N: Command recall - go forward in command recall buffer.",
  347. #endif /* CK_RECALL */
  348. #ifndef NOLASTFILE
  349. " . CTRL-K: Insert the most recently entered local file specifiction.",
  350. #endif /* NOLASTFILE */
  351. " . ? (question mark) Display a menu for the current command field."
  352. ,
  353. " . ESC (or TAB or Ctrl-I) Attempt to complete the current field.",
  354. " . \\ (backslash) include the following character literally",
  355. #ifndef NOSPL
  356. " or introduce a backslash code, variable, or function.",
  357. #else
  358. " or introduce a numeric backslash code.",
  359. #endif /* NOSPL */
  360. " ",
  361. "IMPORTANT: Since backslash (\\) is Kermit's command-line escape character,",
  362. "you must enter DOS, Windows, or OS/2 pathnames using either forward slash (/)"
  363. ,
  364. "or double backslash (\\\\) as the directory separator in most contexts.",
  365. "Examples: C:/TMP/README.TXT, C:\\\\TMP\\\\README.TXT.",
  366. " ",
  367. "Command words other than filenames can be abbreviated in most contexts.",
  368. " ",
  369. "Basic commands:",
  370. " EXIT Exit from Kermit",
  371. " HELP Request general help",
  372. " HELP command Request help about the given command",
  373. " TAKE Execute commands from a file",
  374. " TYPE Display a file on your screen",
  375. " ORIENTATION Explains directory structure",
  376. " ",
  377. #ifndef NOXFER
  378. "Commands for file transfer:",
  379. " SEND Send files",
  380. " RECEIVE Receive files",
  381. " GET Get files from a Kermit server",
  382. #ifdef CK_RESEND
  383. " RESEND Recover an interrupted send",
  384. " REGET Recover an interrupted get from a server",
  385. #endif /* CK_RESEND */
  386. #ifndef NOSERVER
  387. " SERVER Be a Kermit server",
  388. #endif /* NOSERVER */
  389. " ",
  390. "File-transfer speed selection:",
  391. " FAST Use fast settings -- THIS IS THE DEFAULT",
  392. " CAUTIOUS Use slower, more cautious settings",
  393. " ROBUST Use extremely slow and cautious settings",
  394. " ",
  395. "File-transfer performance fine tuning:",
  396. " SET RECEIVE PACKET-LENGTH Kermit packet size",
  397. " SET WINDOW Number of sliding window slots",
  398. " SET PREFIXING Amount of control-character prefixing",
  399. #endif /* NOXFER */
  400. #ifndef NOLOCAL
  401. " ",
  402. "To make a direct serial connection:",
  403. #ifdef OS2
  404. #ifdef NT
  405. #ifdef CK_TAPI
  406. " SET PORT TAPI Select TAPI communication device",
  407. #endif /* CK_TAPI */
  408. " SET PORT Select serial communication device",
  409. #else
  410. " SET PORT Select serial communication port or server",
  411. #endif /* NT */
  412. #else
  413. " SET LINE Select serial communication device",
  414. #endif /* OS2 */
  415. " SET SPEED Select communication speed",
  416. " SET PARITY Communications parity (if necessary)",
  417. #ifdef CK_RTSCTS
  418. " SET FLOW Communications flow control, such as RTS/CTS",
  419. #else
  420. " SET FLOW Communications flow control, such as XON/XOFF",
  421. #endif /* CK_RTSCTS */
  422. " CONNECT Begin terminal connection",
  423. #ifndef NODIAL
  424. " ",
  425. "To dial out with a modem:",
  426. " SET DIAL DIRECTORY Specify dialing directory file (optional)",
  427. " SET DIAL COUNTRY-CODE Country you are dialing from (*)",
  428. " SET DIAL AREA-CODE Area-code you are dialing from (*)",
  429. " LOOKUP Lookup entries in your dialing directory (*)",
  430. " SET MODEM TYPE Select modem type",
  431. #ifdef OS2
  432. #ifdef NT
  433. #ifdef CK_TAPI
  434. " SET PORT TAPI Select TAPI communication device",
  435. #endif /* CK_TAPI */
  436. " SET PORT Select serial communication device",
  437. #else
  438. " SET PORT Select serial communication port or server",
  439. #endif /* NT */
  440. #else
  441. " SET LINE Select serial communication device",
  442. #endif /* OS2 */
  443. " SET SPEED Select communication speed",
  444. " SET PARITY Communications parity (if necessary)",
  445. " DIAL Dial the phone number",
  446. " CONNECT Begin terminal connection",
  447. " ",
  448. #ifdef OS2
  449. "Further info: HELP DIAL, HELP SET MODEM, HELP SET PORT, HELP SET DIAL",
  450. #else
  451. "Further info: HELP DIAL, HELP SET MODEM, HELP SET LINE, HELP SET DIAL",
  452. #endif /* OS2 */
  453. "(*) (For use with optional dialing directory)",
  454. #endif /* NODIAL */
  455. #ifdef NETCONN
  456. " ",
  457. "To make a network connection:",
  458. #ifndef NODIAL
  459. " SET NETWORK DIRECTORY Specify a network services directory (optional)",
  460. " LOOKUP Lookup entries in your network directory",
  461. #endif /* NODIAL */
  462. " SET NETWORK TYPE Select network type (if more than one available)",
  463. " SET HOST Make a network connection but stay in command mode",
  464. " CONNECT Begin terminal connection",
  465. #ifdef TNCODE
  466. " TELNET Select a Telnet host and CONNECT to it",
  467. #endif /* TNCODE */
  468. #ifdef RLOGCODE
  469. " RLOGIN Select an Rlogin host and CONNECT to it",
  470. #endif /* RLOGCODE */
  471. #ifdef ANYSSH
  472. " SSH [ OPEN ] Select an SSH host and CONNECT to it",
  473. #endif /* ANYSSH */
  474. #ifdef NEWFTP
  475. " FTP [ OPEN ] Make an FTP connection",
  476. #endif /* NEWFTP */
  477. #ifdef CKHTTP
  478. " HTTP OPEN Make an HTTP connection",
  479. #endif /* CKHTTP */
  480. #endif /* NETCONN */
  481. #ifdef NT
  482. " ",
  483. "To return from the terminal window to the C-Kermit> prompt:",
  484. #else
  485. #ifdef OS2
  486. " ",
  487. "To return from the terminal window to the C-Kermit> prompt:",
  488. #else
  489. " ",
  490. "To return from a terminal connection to the C-Kermit prompt:",
  491. #endif /* OS2 */
  492. #endif /* NT */
  493. #ifdef OS2
  494. " \
  495. Press the key or key-combination shown after \"Command:\" in the status line",
  496. " (such as Alt-x) or type your escape character followed by the letter C.",
  497. #else
  498. " Type your escape character followed by the letter C.",
  499. #endif /* OS2 */
  500. " ",
  501. "To display your escape character:",
  502. " SHOW ESCAPE",
  503. " ",
  504. "To display other settings:",
  505. " SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
  506. #else /* !NOLOCAL */
  507. " ",
  508. "To display settings:",
  509. " SHOW COMMUNICATIONS, SHOW FILE, SHOW PROTOCOL, etc.",
  510. #endif /* NOLOCAL */
  511. " ",
  512. "The manual for C-Kermit is the book \"Using C-Kermit\". For information",
  513. "about the manual, visit:",
  514. " http://www.kermitproject.org/usingckermit.html",
  515. " ",
  516. "For an online C-Kermit tutorial, visit:",
  517. " http://www.kermitproject.org/ckututor.html",
  518. " ",
  519. "To learn about script programming and automation:",
  520. " http://www.kermitproject.org/ckscripts.html",
  521. " ",
  522. "For further information about a particular command, type HELP xxx,",
  523. "where xxx is the name of the command. For documentation, news of new",
  524. "releases, and information about other Kermit software, visit the",
  525. "Kermit Project website:",
  526. " ",
  527. " http://www.kermitproject.org/",
  528. " ",
  529. "For information about technical support please visit this page:",
  530. " ",
  531. " http://www.kermitproject.org/support.html",
  532. ""
  533. };
  534. static char * hmxymatch[] = {
  535. "SET MATCH { DOTFILE, FIFO } { ON, OFF }",
  536. " Tells whether wildcards should match dotfiles (files whose names begin",
  537. " with period) or UNIX FIFO special files. MATCH FIFO default is OFF.",
  538. " MATCH DOTFILE default is OFF in UNIX, ON elsewhere.",
  539. ""
  540. };
  541. #ifndef NOSEXP
  542. static char * hmxysexp[] = {
  543. "SET SEXPRESSION { DEPTH-LIMIT, ECHO-RESULT, TRUNCATE-ALL-RESULTS }",
  544. " DEPTH-LIMIT sets a limit on the depth of nesting or recursion in",
  545. " S-Expressions to prevent the program from crashing from memory exhaustion.",
  546. " ECHO-RESULT tells whether S-Expression results should be displayed as",
  547. " a result of evaluating an expression; the default is to display only at",
  548. " top (interactive) level; OFF means never display; ON means always display.",
  549. " TRUNCATE-ALL-RESULTS ON means the results of all arithmetic operations",
  550. " should be forced to integers (whole numbers) by discarding any fractional",
  551. " part. The default is OFF. SHOW SEXPRESSION displays the current settings."
  552. ,""
  553. };
  554. #endif /* NOSEXP */
  555. #ifdef OS2
  556. #ifdef KUI
  557. static char * hmxygui[] = {
  558. "SET GUI CLOSE OFF",
  559. " Disables the System Menu Close and File->Exit functions which could be",
  560. " used to exit Kermit. Once disabled these functions cannot be re-enabled",
  561. " and the only way to exit Kermit is via the Kermit Script EXIT command.",
  562. " ",
  563. "SET GUI DIALOGS { ON, OFF }",
  564. " ON means that popups, alerts, use GUI dialogs; OFF means to use",
  565. " text-mode popups or prompts. ON by default.",
  566. " ",
  567. "SET GUI FONT name size",
  568. " Chooses the font and size. Type \"set gui font ?\" to see the list of",
  569. " choices. The size can be a whole number or can contain a decimal point",
  570. " and a fraction (which is rounded to the nearest half point).",
  571. " ",
  572. "SET GUI MENUBAR OFF",
  573. " Disables menubar functions which could be used to modify the Kermit",
  574. " session configuration. Once disabled the menubar functions cannot be",
  575. " re-enabled.",
  576. " ",
  577. "SET GUI RGBCOLOR colorname redvalue greenvalue bluevalue",
  578. " Specifies the red-green-blue mixture to be used to render the given",
  579. " color name. Type \"set gui rgbcolor\" to see a list of colornames.",
  580. " the RGB values are whole numbers from 0 to 255.",
  581. " ",
  582. "SET GUI TOOLBAR OFF",
  583. " Disables toolbar functions which could be used to modify the Kermit",
  584. " session configuration. Once disabled the toolbar functions cannot be",
  585. " re-enabled.",
  586. " ",
  587. "SET GUI WINDOW POSITION x y",
  588. " Moves the C-Kermit window to the given X,Y coordinates, pixels from top",
  589. " left. (Not yet implemented -- use command-line options to do this.)",
  590. " ",
  591. "SET GUI WINDOW RESIZE-MODE { CHANGE-DIMENSIONS, SCALE-FONT }",
  592. " Default is CHANGE-DIMENSIONS.",
  593. "",
  594. "SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE }",
  595. " Changes the run mode state of the GUI window.",
  596. ""
  597. };
  598. #endif /* KUI */
  599. #endif /* OS2 */
  600. static char * hmxxfunc[] = {
  601. "KERMIT FUNCTIONS",
  602. " ",
  603. " Functions are part of Kermit's programming language used in writing",
  604. " scripts. They are like functions in other programming languages like C",
  605. " and Perl; each function has a name and an argument list, and it returns",
  606. " (is replaced by) a value. In a Kermit script, the function name preceded",
  607. " by a backslash (\\) and then the letter F; for example:",
  608. " ",
  609. " \\Findex(string1,string2).",
  610. " ",
  611. " The argument list is in parentheses. In this example the name of the",
  612. " function is 'index', the arguments are string1 and string2, and the return",
  613. " value is the starting position of string2 in string1; type HELP FUNC INDEX",
  614. " for details.",
  615. " ",
  616. " Type SHOW FUNCTIONS to see a list of available functions.",
  617. " ",
  618. " Type HELP FUNCTION xxx more information about specific functions:",
  619. " ",
  620. " . If xxx matches only one function name the documentation for that",
  621. " function is printed; example: HELP FUNCTION INDEX.",
  622. " ",
  623. " . If xxx matches more than one function name, a list of all functions",
  624. " whose names contain xxx is printed; example: HELP FUNCTION DATE.",
  625. ""
  626. };
  627. #ifdef ANYSSH
  628. static char * hmxxssh[] = {
  629. #ifdef SSHBUILTIN
  630. "Syntax: SSH { ADD, AGENT, CLEAR, KEY, [ OPEN ], V2 } operands...",
  631. " Performs an SSH-related action, depending on the keyword that follows:",
  632. " ",
  633. "SSH ADD LOCAL-PORT-FORWARD local-port host port",
  634. " Adds a port forwarding triplet to the local port forwarding list.",
  635. " The triplet specifies a local port to be forwarded and the hostname /",
  636. " ip-address and port number to which the port should be forwarded from",
  637. " the remote host. Port forwarding is activated at connection",
  638. " establishment and continues until the connection is terminated.",
  639. " ",
  640. "SSH ADD REMOTE-PORT-FORWARD remote-port host port",
  641. " Adds a port forwarding triplet to the remote port forwarding list.",
  642. " The triplet specifies a remote port to be forwarded and the",
  643. " hostname/ip-address and port number to which the port should be",
  644. " forwarded from the local machine. Port forwarding is activated at",
  645. " connection establishment and continues until the connection is",
  646. " terminated.",
  647. " ",
  648. "SSH AGENT ADD [ identity-file ]",
  649. " Adds the contents of the identity-file (if any) to the SSH AGENT",
  650. " private key cache. If no identity-file is specified, all files",
  651. " specified with SET SSH IDENTITY-FILE are added to the cache.",
  652. " ",
  653. "SSH AGENT DELETE [ identity-file ]",
  654. " Deletes the contents of the identity-file (if any) from the SSH AGENT",
  655. " private key cache. If no identity-file is specified, all files",
  656. " specified with SET SSH IDENTITY-FILE are deleted from the cache.",
  657. " ",
  658. "SSH AGENT LIST [ /FINGERPRINT ]",
  659. " Lists the contents of the SSH AGENT private key cache. If /FINGERPRINT",
  660. " is specified, the fingerprint of the private keys are displayed instead",
  661. " of the keys.",
  662. " ",
  663. "SSH CLEAR LOCAL-PORT-FORWARD",
  664. " Clears the local port forwarding list.",
  665. " ",
  666. "SSH CLEAR REMOTE-PORT-FORWARD",
  667. " Clears the remote port forwarding list.",
  668. " ",
  669. "SSH KEY commands:",
  670. " The SSH KEY commands create and manage public and private key pairs",
  671. " (identities). There are three forms of SSH keys. Each key pair is",
  672. " stored in its own set of files:",
  673. " ",
  674. " Key Type Private Key File Public Key File",
  675. " v1 RSA keys \\v(appdata)ssh/identity \\v(appdata)ssh/identity.pub",
  676. " v2 RSA keys \\v(appdata)ssh/id_rsa \\v(appdata)ssh/id_rsa.pub",
  677. " v2 DSA keys \\v(appdata)ssh/id_dsa \\v(appdata)ssh/id_dsa.pub",
  678. " ",
  679. " Keys are stored using the OpenSSH keyfile format. The private key",
  680. " files can be (optionally) protected by specifying a passphrase. A",
  681. " passphrase is a longer version of a password. English text provides",
  682. " no more than 2 bits of key data per character. 56-bit keys can be",
  683. " broken by a brute force attack in approximately 24 hours. When used,",
  684. " private key files should therefore be protected by a passphrase of at",
  685. " least 40 characters (about 80 bits).",
  686. " ",
  687. " To install a public key file on the host, you must transfer the file",
  688. " to the host and append it to your \"authorized_keys\" file. The file",
  689. " permissions must be 600 (or equivalent).",
  690. " ",
  691. "SSH KEY CHANGE-PASSPHRASE [ /NEW-PASSPHRASE:passphrase",
  692. " /OLD-PASSPHRASE:passphrase ] filename",
  693. " This re-encrypts the specified private key file with a new passphrase.",
  694. " The old passphrase is required. If the passphrases (and filename) are",
  695. " not provided Kermit prompts your for them.",
  696. " ",
  697. "SSH KEY CREATE [ /BITS:bits /PASSPHRASE:passphrase",
  698. " /TYPE:{ V1-RSA, V2-DSA, V2-RSA } /V1-RSA-COMMENT:comment ] filename",
  699. " This command creates a new private/public key pair. The defaults are:",
  700. " BITS:1024 and TYPE:V2-RSA. The filename is the name of the private",
  701. " key file. The public key is created with the same name with .pub",
  702. " appended to it. If a filename is not specified Kermit prompts you for",
  703. " it. V1 RSA key files may have an optional comment, which is ignored",
  704. " for other key types.",
  705. " ",
  706. "SSH KEY DISPLAY [ /FORMAT:{FINGERPRINT,IETF,OPENSSH,SSH.COM} ] filename",
  707. " This command displays the contents of a public or private key file.",
  708. " The default format is OPENSSH.",
  709. " ",
  710. "SSH KEY V1 SET-COMMENT filename comment",
  711. " This command replaces the comment associated with a V1 RSA key file.",
  712. " ",
  713. "SSH [ OPEN ] host [ port ] [ /COMMAND:command /USER:username",
  714. " /PASSWORD:pwd /VERSION:{ 1, 2 } /X11-FORWARDING:{ ON, OFF } ]",
  715. " This command establishes a new connection using SSH version 1 or",
  716. " version 2 protocol. The connection is made to the specified host on",
  717. " the SSH port (you can override the port by including a port name or",
  718. " number after the host name). Once the connection is established the",
  719. " authentication negotiations begin. If the authentication is accepted,",
  720. " the local and remote port forwarding lists are used to establish the",
  721. " desired connections. If X11 Forwarding is active, this results in a",
  722. " remote port forwarding between the X11 clients on the remote host and",
  723. " X11 Server on the local machine. If a /COMMAND is provided, the",
  724. " command is executed on the remote host in place of your default shell.",
  725. " ",
  726. " An example of a /COMMAND to execute C-Kermit in SERVER mode is:",
  727. " SSH OPEN hostname /COMMAND:{kermit -x -l 0}",
  728. " ",
  729. "SSH V2 REKEY",
  730. " Requests that an existing SSH V2 connection generate new session keys.",
  731. #else /* SSHBUILTIN */
  732. "Syntax: SSH [ options ] <hostname> [ command ]",
  733. " Makes an SSH connection using the external ssh program via the SET SSH",
  734. " COMMAND string, which is \"ssh -e none\" by default. Options for the",
  735. " external ssh program may be included. If the hostname is followed by a",
  736. " command, the command is executed on the host instead of an interactive",
  737. " shell.",
  738. #endif /* SSHBUILTIN */
  739. ""
  740. };
  741. static char *hmxyssh[] = {
  742. #ifdef SSHBUILTIN
  743. "SET SSH AGENT-FORWARDING { ON, OFF }",
  744. " If an authentication agent is in use, setting this value to ON",
  745. " results in the connection to the agent being forwarded to the remote",
  746. " computer. The default is OFF.",
  747. " ",
  748. "SET SSH CHECK-HOST-IP { ON, OFF }",
  749. " Specifies whether the remote host's ip-address should be checked",
  750. " against the matching host key in the known_hosts file. This can be",
  751. " used to determine if the host key changed as a result of DNS spoofing.",
  752. " The default is ON.",
  753. " ",
  754. "SET SSH COMPRESSION { ON, OFF }",
  755. " Specifies whether compression will be used. The default is ON.",
  756. " ",
  757. "SET SSH DYNAMIC-FORWARDING { ON, OFF }",
  758. " Specifies whether Kermit is to act as a SOCKS4 service on port 1080",
  759. " when connected to a remote host via SSH. When Kermit acts as a SOCKS4",
  760. " service, it accepts connection requests and forwards the connections",
  761. " through the remote host. The default is OFF.",
  762. " ",
  763. "SET SSH GATEWAY-PORTS { ON, OFF }",
  764. " Specifies whether Kermit should act as a gateway for forwarded",
  765. " connections received from the remote host. The default is OFF.",
  766. " ",
  767. "SET SSH GSSAPI DELEGATE-CREDENTIALS { ON, OFF }",
  768. " Specifies whether Kermit should delegate GSSAPI credentials to ",
  769. " the remote host after authentication. Delegating credentials allows",
  770. " the credentials to be used from the remote host. The default is OFF.",
  771. " ",
  772. "SET SSH HEARTBEAT-INTERVAL <seconds>",
  773. " Specifies a number of seconds of idle time after which an IGNORE",
  774. " message will be sent to the server. This pulse is useful for",
  775. " maintaining connections through HTTP Proxy servers and Network",
  776. " Address Translators. The default is OFF (0 seconds).",
  777. " ",
  778. "SET SSH IDENTITY-FILE filename [ filename [ ... ] ]",
  779. " Specifies one or more files from which the user's authorization",
  780. " identities (private keys) are to be read when using public key",
  781. " authorization. These are files used in addition to the default files:",
  782. " ",
  783. " \\v(appdata)ssh/identity V1 RSA",
  784. " \\v(appdata)ssh/id_rsa V2 RSA",
  785. " \\v(appdata)ssh/id_dsa V2 DSA",
  786. " ",
  787. "SET SSH KERBEROS4 TGT-PASSING { ON, OFF }",
  788. " Specifies whether Kermit should forward Kerberos 4 TGTs to the host.",
  789. " The default is OFF.",
  790. " ",
  791. "SET SSH KERBEROS5 TGT-PASSING { ON, OFF }",
  792. " Specifies whether Kermit should forward Kerberos 5 TGTs to to the",
  793. " host. The default is OFF.",
  794. " ",
  795. "SET SSH PRIVILEGED-PORT { ON, OFF }",
  796. " Specifies whether a privileged port (less than 1024) should be used",
  797. " when connecting to the host. Privileged ports are not required except",
  798. " when using SSH V1 with Rhosts or RhostsRSA authorization. The default",
  799. " is OFF.",
  800. " ",
  801. "SET SSH QUIET { ON, OFF }",
  802. " Specifies whether all messages generated in conjunction with SSH",
  803. " protocols should be suppressed. The default is OFF.",
  804. " ",
  805. "SET SSH STRICT-HOST-KEY-CHECK { ASK, ON, OFF }",
  806. " Specifies how Kermit should behave if the the host key check fails.",
  807. " When strict host key checking is OFF, the new host key is added to the",
  808. " protocol-version-specific user-known-hosts-file. When strict host key",
  809. " checking is ON, the new host key is refused and the connection is",
  810. " dropped. When set to ASK, Kermit prompt you to say whether the new",
  811. " host key should be accepted. The default is ASK.",
  812. " ",
  813. " Strict host key checking protects you against Trojan horse attacks.",
  814. " It depends on you to maintain the contents of the known-hosts-file",
  815. " with current and trusted host keys.",
  816. " ",
  817. "SET SSH USE-OPENSSH-CONFIG { ON, OFF }",
  818. " Specifies whether Kermit should parse an OpenSSH configuration file",
  819. " after applying Kermit's SET SSH commands. The configuration file",
  820. " would be located at \\v(home)ssh/ssh_config. The default is OFF.",
  821. " ",
  822. "SET SSH V1 CIPHER { 3DES, BLOWFISH, DES }",
  823. " Specifies which cipher should be used to protect SSH version 1",
  824. " connections. The default is 3DES.",
  825. " ",
  826. "SET SSH V1 GLOBAL-KNOWN-HOSTS-FILE filename",
  827. " Specifies the location of the system-wide known-hosts file. The",
  828. " default is:",
  829. " ",
  830. " \v(common)ssh_known_hosts",
  831. " ",
  832. "SET SSH V1 USER-KNOWN-HOSTS-FILE filename",
  833. " Specifies the location of the user-known-hosts-file. The default",
  834. " location is:",
  835. " ",
  836. " \\v(appdata)ssh/known_hosts",
  837. " ",
  838. "SET SSH V2 AUTHENTICATION { EXTERNAL-KEYX, GSSAPI, HOSTBASED, ",
  839. " KEYBOARD-INTERACTIVE, PASSWORD, PUBKEY, SRP-GEX-SHA1 } [ ... ]",
  840. " Specifies an ordered list of SSH version 2 authentication methods to",
  841. " be used when connecting to the remote host. The default list is:",
  842. " ",
  843. " external-keyx gssapi hostbased publickey srp-gex-sha1 publickey",
  844. " keyboard-interactive password none",
  845. " ",
  846. "SET SSH V2 AUTO-REKEY { ON, OFF }",
  847. " Specifies whether Kermit automatically issues rekeying requests",
  848. " once an hour when SSH version 2 in in use. The default is ON.",
  849. " ",
  850. "SET SSH V2 CIPHERS { 3DES-CBC, AES128-CBC AES192-CBC AES256-CBC",
  851. " ARCFOUR BLOWFISH-CBC CAST128-CBC RIJNDAEL128-CBC RIJNDAEL192-CBC",
  852. " RIJNDAEL256-CBC }",
  853. " Specifies an ordered list of SSH version ciphers to be used to encrypt",
  854. " the established connection. The default list is:",
  855. " ",
  856. " aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour aes192-cbc",
  857. " aes256-cbc",
  858. " ",
  859. " \"rijndael\" is an alias for \"aes\".",
  860. " ",
  861. "SET SSH V2 GLOBAL-KNOWN-HOSTS-FILE filename",
  862. " Specifies the location of the system-wide known-hosts file. The default",
  863. " location is:",
  864. " ",
  865. " \\v(common)ssh/known_hosts2",
  866. " ",
  867. "SET SSH V2 HOSTKEY-ALGORITHMS { SSH-DSS, SSH-RSA }",
  868. " Specifies an ordered list of hostkey algorithms to be used to verify",
  869. " the identity of the host. The default list is",
  870. " ",
  871. " ssh-rsa ssh-dss",
  872. " ",
  873. "SET SSH V2 MACS { HMAC-MD5 HMAC-MD5-96 HMAC-RIPEMD160 HMAC-SHA1",
  874. " HMAC-SHA1-96 }",
  875. " Specifies an ordered list of Message Authentication Code algorithms to",
  876. " be used for integrity protection of the established connection. The",
  877. " default list is:",
  878. " ",
  879. " hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 hmac-md5-96",
  880. " ",
  881. "SET SSH V2 USER-KNOWN-HOSTS-FILE filename",
  882. " Specifies the location of the user-known-hosts file. The default",
  883. " location is:",
  884. " ",
  885. " \\v(appdata)ssh/known_hosts2",
  886. " ",
  887. "SET SSH VERBOSE level",
  888. " Specifies how many messages should be generated by the OpenSSH engine.",
  889. " The level can range from 0 to 7. The default value is 2.",
  890. " ",
  891. "SET SSH VERSION { 1, 2, AUTOMATIC }",
  892. " Specifies which SSH version should be negotiated. The default is",
  893. " AUTOMATIC which means use version 2 if supported; otherwise to fall",
  894. " back to version 1.",
  895. " ",
  896. "SET SSH X11-FORWARDING { ON, OFF }",
  897. " Specifies whether X Windows System Data is to be forwarded across the",
  898. " established SSH connection. The default is OFF. When ON, the DISPLAY",
  899. " value is either set using the SET TELNET ENV DISPLAY command or read",
  900. " from the DISPLAY environment variable.",
  901. " ",
  902. "SET SSH XAUTH-LOCATION filename",
  903. " Specifies the location of the xauth executable (if provided with the",
  904. " X11 Server software.)",
  905. #else /* SSHBUILTIN */
  906. "Syntax: SET SSH COMMAND command",
  907. " Specifies the external command to be used to make an SSH connection.",
  908. " By default it is \"ssh -e none\" (ssh with no escape character).",
  909. #endif /* SSHBUILTIN */
  910. ""
  911. };
  912. #endif /* ANYSSH */
  913. #ifdef NEWFTP
  914. static char *hmxygpr[] = {
  915. "Syntax: SET GET-PUT-REMOTE { AUTO, FTP, KERMIT}",
  916. " Tells Kermit whether GET, PUT, and REMOTE commands should be directed",
  917. " at a Kermit server or an FTP server. The default is AUTO, meaning that",
  918. " if you have only one active connection, the appropriate action is taken",
  919. " when you give a GET, PUT, or REMOTE command. SET GET-PUT-REMOTE FTP forces"
  920. ,
  921. " Kermit to treat GET, PUT, and REMOTE as FTP client commands; setting this",
  922. " to KERMIT forces these commands to be treated as Kermit client commands.",
  923. " NOTE: PUT includes SEND, MPUT, MSEND, and all other similar commands.",
  924. " Also see HELP REMOTE, HELP SET LOCUS, HELP FTP.",
  925. ""
  926. };
  927. #endif /* NEWFTP */
  928. #ifdef LOCUS
  929. static char *hmxylocus[] = {
  930. #ifdef KUI
  931. "Syntax: SET LOCUS { ASK, AUTO, LOCAL, REMOTE }",
  932. #else
  933. "Syntax: SET LOCUS { AUTO, LOCAL, REMOTE }",
  934. #endif /* KUI */
  935. " Specifies whether unprefixed file management commands should operate",
  936. " locally or (when there is a connection to a remote FTP or Kermit",
  937. " server) sent to the server. The affected commands are: CD (CWD), PWD,",
  938. " CDUP, DIRECTORY, DELETE, RENAME, MKDIR, and RMDIR. To force any of",
  939. " these commands to be executed locally, give it an L-prefix: LCD, LDIR,",
  940. " etc. To force remote execution, use the R-prefix: RCD, RDIR, and so",
  941. " on. SHOW COMMAND shows the current Locus.",
  942. " ",
  943. " By default, the Locus for file management commands is switched",
  944. " automatically whenever you make or close a connection: if you make an",
  945. " FTP connection, the Locus becomes REMOTE; if you close an FTP connection",
  946. " or make any other kind of connection, the Locus becomes LOCAL.",
  947. #ifdef KUI
  948. " ",
  949. " There are two kinds of automatic switching: ASK (the default) which",
  950. " asks you if it's OK to switch, and AUTO, which switches without asking.",
  951. #endif /* KUI */
  952. " ",
  953. " If you give a SET LOCUS LOCAL or SET LOCUS REMOTE command, this sets",
  954. " the locus as indicated and disables automatic switching.",
  955. #ifdef KUI
  956. " SET LOCUS AUTO or SET LOCUS ASK restores automatic switching.",
  957. " You can also change Locus switching and behavior in the Actions menu.",
  958. #else
  959. " SET LOCUS AUTO restores automatic switching.",
  960. #endif /* KUI */
  961. "",
  962. };
  963. #endif /* LOCUS */
  964. #ifdef UNIX
  965. #ifndef NOPUTENV
  966. static char *hmxxputenv[] = {
  967. "Syntax: PUTENV name value",
  968. " Creates or modifies the environment variable with the given name to have",
  969. " the given value. Purpose: to pass parameters to subprocesses without",
  970. " having them appear on the command line. If the value is blank (empty),",
  971. " the variable is deleted. The result is visible to this instantiation of",
  972. " C-Kermit via \\$(name) and to any inferior processes by whatever method",
  973. " they use to access environment variables. The value may be enclosed in",
  974. " doublequotes or braces, but it need not be; if it is the outermost",
  975. " doublequotes or braces are removed.",
  976. " ",
  977. " Note the syntax:",
  978. " PUTENV name value",
  979. " not:",
  980. " PUTENV name=value",
  981. " ",
  982. " There is no equal sign between name and value, and the name itself may",
  983. " not include an equal sign.",
  984. "",
  985. };
  986. #endif /* NOPUTENV */
  987. #endif /* UNIX */
  988. static char *hmxxtak[] = {
  989. "Syntax: TAKE filename [ arguments ]",
  990. " Tells Kermit to execute commands from the named file. Optional argument",
  991. " words, are automatically assigned to the macro argument variables \\%1",
  992. " through \\%9. Kermit command files may themselves contain TAKE commands,",
  993. " up to any reasonable depth of nesting.",
  994. ""
  995. };
  996. #ifdef TCPSOCKET
  997. static char *hmxxfirew[] = {
  998. "Firewall Traversal in C-Kermit",
  999. " ",
  1000. #ifndef NEWFTP
  1001. #ifndef CKHTTP
  1002. #ifndef CK_SOCKS
  1003. #define NOFIREWALL
  1004. #endif
  1005. #endif
  1006. #endif
  1007. #ifdef NOFIREWALL
  1008. "This version of Kermit was built with no support for firewall traversal",
  1009. "protocols. Kermit can be built with support for HTTP Proxy Servers,",
  1010. "SOCKS authorized firewall traversal, and FTP Passive connection modes.",
  1011. " ",
  1012. #else /* NOFIREWALL */
  1013. #ifdef CKHTTP
  1014. "The simplist form of firewall traversal is the HTTP CONNECT command. The",
  1015. "CONNECT command was implemented to allow a public web server which usually",
  1016. "resides on the boundary between the public and private networks to forward",
  1017. "HTTP requests from clients on the private network to public web sites. To",
  1018. "allow secure web connections, the HTTP CONNECT command authenticates the",
  1019. "client with a username/password and then establishes a tunnel to the",
  1020. "desired host.",
  1021. " ",
  1022. "Web servers that support the CONNECT command can be configured to allow",
  1023. "outbound connections for authenticated users to any TCP/IP hostname-port",
  1024. "combination accessible to the Web server. HTTP CONNECT can be used only",
  1025. "with TCP-based protocols. Protocols such as Kerberos authentication that",
  1026. "use UDP/IP cannot be tunneled using HTTP CONNECT.",
  1027. " ",
  1028. "SET TCP HTTP-PROXY [switches] [<hostname or ip-address>[:<port>]]",
  1029. " If a hostname or ip-address is specified, Kermit uses the given",
  1030. " proxy server when attempting outgoing TCP connections. If no hostnamer",
  1031. " or ip-address is specified, any previously specified Proxy server is",
  1032. " removed. If no port number is specified, the \"http\" service is used.",
  1033. " [switches] can be one or more of:",
  1034. " /AGENT:<agent> /USER:<user> /PASSWORD:<password>",
  1035. " Switch parameters are used when connecting to the proxy server and",
  1036. " override any other values associated with the connection.",
  1037. " ",
  1038. #endif /* CKHTTP */
  1039. #ifdef CK_SOCKS
  1040. "In the early 1990s as firewalls were becoming prevalent, David Koblas",
  1041. "developed the SOCKS protocol for TCP/IP firewall traversal. Two versions",
  1042. "of SOCKS are currently in use: Version 4.2 lets TCP/IP client applications",
  1043. "traverse firewalls, similar to HTTP CONNECT, except that the SOCKS client",
  1044. "is aware of the public source IP address and port, which can be used within",
  1045. "the application protocol to assist in securing the connection (e.g. FTP",
  1046. "sessions secured with GSSAPI Kerberos 5).",
  1047. " ",
  1048. "In 1995 the IETF issued SOCKS Protocol Version 5 (RFC 1928), which is",
  1049. "significantly more general than version 4. Besides supporting client-",
  1050. "to-server TCP/IP connections, it also includes:",
  1051. " ",
  1052. " . Authenticated firewall traversal of UDP/IP packets.",
  1053. " . Authenticated binding of incoming public ports on the firewall.",
  1054. " ",
  1055. "This lets a service on the private network offer public services. It also",
  1056. "lets client applications like FTP establish a temporary public presence",
  1057. "that can be used by the FTP server to create a data channel. By allowing",
  1058. "the client to bind to a public port on the firewall and be aware of the",
  1059. "public address, SOCKS 5 lets the application protocol communicate this",
  1060. "information to the server.",
  1061. " ",
  1062. #ifdef OS2
  1063. #ifdef NT
  1064. "C-Kermit for Windows supports SOCKS 4.2. The SOCKS Server is specified with:",
  1065. " ",
  1066. " SET TCP SOCKS-SERVER hostname/ip-address",
  1067. " ",
  1068. "The SOCKS.CONF file is found by examining the ETC environment variable;",
  1069. "searching in \\WINDOWS on Windows 95/98/ME; or the",
  1070. "\\WINDOWS\\SYSTEM\\DRIVERS\\ETC directory on NT\\2000\\XP systems.",
  1071. #else /* NT */
  1072. "C-Kermit provides support for SOCKS 4.2 servers when using IBM TCP/IP 2.0,",
  1073. "IBM OS/2 WARP, or a compatible protocol stack. SOCKS is one popular means",
  1074. "of implementing a firewall between a private network and the Internet.",
  1075. " ",
  1076. "C-Kermit shares the same SOCKS environment variables as IBM Gopher. It also",
  1077. "supports the use of local SOCKS configuration files.",
  1078. " ",
  1079. "To specify the default SOCKS Server, add SET SOCKS_SERVER= to your",
  1080. "CONFIG.SYS file.",
  1081. " ",
  1082. "If you must use a SOCKS Distributed Name Server, add SET SOCKS_NS= to your",
  1083. "CONFIG.SYS file.",
  1084. " ",
  1085. "If you must use a specific with your SOCKS server, be sure to add SET USER=",
  1086. "to your CONFIG.SYS file. Otherwise, \"os2user\" is used by default.",
  1087. " ",
  1088. "The SOCKS configuration file must be placed in the directory pointed to by",
  1089. "the ETC environment variable as declared in your CONFIG.SYS file. The name",
  1090. "should be SOCKS.CONF. On a FAT file system, use SOCKS.CNF.",
  1091. " ",
  1092. "The format of the lines in the SOCKS configuration file are as follows:",
  1093. " ",
  1094. " . # comments",
  1095. " . deny [*=userlist] dst_addr dst_mask [op port]",
  1096. " . direct [*=userlist] dst_addr dst_mask [op port]",
  1097. " . sockd [@=serverlist] [*=userlist] dst_addr dst_mask [op port]",
  1098. " ",
  1099. "op must be one of 'eq', 'neq', 'lt', 'gt', 'le', or 'ge'. dst_addr,",
  1100. "dst_mask, and port may be either numeric or name equivalents.",
  1101. " ",
  1102. "C-Kermit ignores the [*=userlist] and [@=serverlist] fields. Matches are",
  1103. "determined on a first match not a best match basis. Addresses for which no",
  1104. "match is found default to \"sockd\".",
  1105. " ",
  1106. "For completeness: Fields in square brackets are optional. The optional",
  1107. "@=serverlist field with a 'sockd' line specifies the list of SOCKS servers",
  1108. "the client should try (in the given order) instead of the default SOCKS",
  1109. "server. If the @=serverlist part is omitted, then the default SOCKS server",
  1110. "is used. Commas are used in the userlist and serverlist as separators, no",
  1111. "white spaces are allowed.",
  1112. #endif /* NT */
  1113. " ",
  1114. #else /* OS2 */
  1115. #ifdef CK_SOCKS5
  1116. "This version of C-Kermit supports SOCKS version 5.",
  1117. #else /* CK_SOCKS5 */
  1118. "This version of C-Kermit supports SOCKS version 4.",
  1119. #endif /* CK_SOCKS5 */
  1120. "See the man page (or other system documentation) for information on",
  1121. "configuring the SOCKS library via the /etc/socks.conf file.",
  1122. #endif /* OS2 */
  1123. " ",
  1124. #endif /* CK_SOCKS */
  1125. #ifdef NEWFTP
  1126. "FTP is one of the few well-known Internet services that requires",
  1127. "multiple connections. As described above, FTP originally required the",
  1128. "server to establish the data connection to the client using a destination",
  1129. "address and port provided by the client. This doesn't work with port",
  1130. "filtering firewalls.",
  1131. " ",
  1132. "Later, FTP protocol added a \"passive\" mode, in which connections for",
  1133. "the data channels are created in the reverse direction. Instead of the",
  1134. "server establishing a connection to the client, the client makes a second",
  1135. "connection with the server as the destination. This works just fine as",
  1136. "long as the client is behind the firewall and the server is in public",
  1137. "address space. If the server is behind a firewall then the traditional",
  1138. "active mode must be used. If both the client and server are behind their",
  1139. "own port filtering firewalls then data channels cannot be established.",
  1140. " ",
  1141. "In Kermit's FTP client, passive mode is controlled with the command:",
  1142. " ",
  1143. " SET FTP PASSIVE-MODE { ON, OFF }",
  1144. " ",
  1145. "The default is ON, meaning to use passive mode.",
  1146. #endif /* NEWFTP */
  1147. #endif /* NOFIREWALL */
  1148. ""
  1149. };
  1150. #endif /* TCPSOCKET */
  1151. static char *hmxxsave[] = {
  1152. "Syntax: SAVE item filename { NEW, APPEND }",
  1153. " Saves the requested material in the given file. A new file is created",
  1154. " by default; include APPEND at the end of the command to append to an",
  1155. " existing file. Items:",
  1156. #ifndef NOSETKEY
  1157. " KEYMAP Saves the current key settings.",
  1158. #endif /* NOSETKEY */
  1159. #ifdef CK_RECALL
  1160. " COMMAND HISTORY Saves the current command recall (history) buffer",
  1161. #endif /* CK_RECALL */
  1162. #ifdef OS2
  1163. " COMMAND SCROLLBACK Saves the current command-screen scrollback buffer",
  1164. " TERMINAL SCROLLBACK Saves the current terminal-screen scrollback buffer",
  1165. #endif /* OS2 */
  1166. ""
  1167. };
  1168. #ifdef CKROOT
  1169. static char *hmxxchroot[] = {
  1170. "Syntax: SET ROOT directoryname",
  1171. " Sets the root for file access to the given directory and disables access",
  1172. " to system and shell commands and external programs. Once this command",
  1173. " is given, no files or directories outside the tree rooted by the given",
  1174. " directory can be opened, read, listed, deleted, renamed, or accessed in",
  1175. " any other way. This command can not be undone by a subsequent SET ROOT",
  1176. " command. Primarily for use with server mode, to restrict access of",
  1177. " clients to a particular directory tree. Synonym: CHROOT.",
  1178. ""
  1179. };
  1180. #endif /* CKROOT */
  1181. static char *hmxxscrn[] = {
  1182. "Syntax: SCREEN { CLEAR, CLEOL, MOVE row column }",
  1183. #ifdef OS2
  1184. " Performs screen-formatting actions.",
  1185. #else
  1186. " Performs screen-formatting actions. Correct operation of these commands",
  1187. " depends on proper terminal setup on both ends of the connection -- mainly",
  1188. " that the host terminal type is set to agree with the kind of terminal or",
  1189. " the emulation you are viewing C-Kermit through.",
  1190. #endif /* OS2 */
  1191. " ",
  1192. "SCREEN CLEAR",
  1193. " Moves the cursor to home position and clears the entire screen.",
  1194. #ifdef OS2
  1195. " Synonyms: CLS, CLEAR SCREEN, CLEAR COMMAND-SCREEN ALL",
  1196. #else
  1197. " Synonyms: CLS, CLEAR SCREEN.",
  1198. #endif /* OS2 */
  1199. " ",
  1200. "SCREEN CLEOL",
  1201. " Clears from the current cursor position to the end of the line.",
  1202. #ifdef OS2
  1203. " Synonym: CLEAR COMMAND-SCREEN EOL",
  1204. #endif /* OS2 */
  1205. " ",
  1206. "SCREEN MOVE row column",
  1207. " Moves the cursor to the indicated row and column. The row and column",
  1208. " numbers are 1-based so on a 24x80 screen, the home position is 1 1 and",
  1209. " the lower right corner is 24 80. If a row or column number is given that",
  1210. " too large for what Kermit or the operating system thinks is your screen",
  1211. " size, the appropriate number is substituted.",
  1212. " ",
  1213. "Also see:",
  1214. #ifdef OS2
  1215. " HELP FUNCTION SCRNCURX, HELP FUNCTION SCRNCURY, HELP FUNCTION SCRSTR,",
  1216. #endif /* OS2 */
  1217. " SHOW VARIABLE TERMINAL, SHOW VARIABLE COLS, SHOW VAR ROWS, SHOW COMMAND.",
  1218. ""
  1219. };
  1220. #ifndef NOSPL
  1221. static char *hmfword[] = {
  1222. "Function \\fword(s1,n1,s2,s3,n2,n3) - Extracts a word from a string.",
  1223. " s1 = source string.",
  1224. " n1 = word number (1-based) counting from left; if negative, from right.",
  1225. " s2 = optional break set.",
  1226. " s3 = optional include set (or ALL, CSV, or TSV).",
  1227. " n2 = optional grouping mask.",
  1228. " n3 = optional separator flag:",
  1229. " 0 = collapse adjacent separators;",
  1230. " 1 = don't collapse adjacent separators.",
  1231. " ",
  1232. " \\fword() returns the n1th \"word\" of the string s1, according to the",
  1233. " criteria specified by the other parameters.",
  1234. " ",
  1235. " The BREAK SET is the set of all characters that separate words. The",
  1236. " default break set is all characters except ASCII letters and digits.",
  1237. " ASCII (C0) control characters are treated as break characters by default,",
  1238. " as are spacing and punctuation characters, brackets, and so on, and",
  1239. " all 8-bit characters.",
  1240. " ",
  1241. " The INCLUDE SET is the set of characters that are to be treated as ",
  1242. " parts of words even though they normally would be separators. The",
  1243. " default include set is empty. Three special symbolic include sets are",
  1244. " also allowed:",
  1245. " ",
  1246. " ALL (meaning include all bytes that are not in the break set)",
  1247. " CSV (special treatment for Comma-Separated-Value records)",
  1248. " TSV (special treatment for Tab-Separated-Value records)",
  1249. " ",
  1250. " For operating on 8-bit character sets, the include set should be ALL.",
  1251. " ",
  1252. " If the GROUPING MASK is given and is nonzero, words can be grouped by",
  1253. " quotes or brackets selected by the sum of the following:",
  1254. " ",
  1255. " 1 = doublequotes: \"a b c\"",
  1256. " 2 = braces: {a b c}",
  1257. " 4 = apostrophes: 'a b c'",
  1258. " 8 = parentheses: (a b c)",
  1259. " 16 = square brackets: [a b c]",
  1260. " 32 = angle brackets: <a b c>",
  1261. " ",
  1262. " Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
  1263. " ",
  1264. "Returns string:",
  1265. " Word number n1, if there is one, otherwise an empty string.",
  1266. " ",
  1267. "Also see:",
  1268. " HELP FUNCTION SPLIT",
  1269. ""
  1270. };
  1271. static char *hmxxprompt[] = {
  1272. "Syntax: PROMPT [ text ]",
  1273. " Enters interactive command level from within a script in such a way that",
  1274. " the script can be continued with an END or RETURN command. STOP, EXIT,",
  1275. " SHOW STACK, TRACE, and Ctrl-C all have their normal effects. The PROMPT",
  1276. " command allows variables to be examined or changed, or any other commands",
  1277. " to be given, in any number, prior to returning to the script, allowing",
  1278. " Kermit to serve as its own debugger; adding the PROMPT command to a script",
  1279. " is like setting a breakpoint. If the optional text is included, it is",
  1280. " used as the new prompt for this level, e.g. \"prompt Breakpoint_1>\".",
  1281. ""
  1282. };
  1283. static char *hxxinp[] = {
  1284. "Syntax: INPUT [ /COUNT:n /CLEAR /NOMATCH /NOWRAP ] \
  1285. { number-of-seconds, time-of-day } [ text ]",
  1286. " ",
  1287. "Examples:",
  1288. " INPUT 5 Login:",
  1289. " INPUT 23:59:59 RING",
  1290. " INPUT /NOMATCH 10",
  1291. " INPUT /CLEAR 10 \\13\\10",
  1292. " INPUT /CLEAR 10 \\13\\10$\32",
  1293. " INPUT /COUNT:256 10",
  1294. " INPUT 10 \\fpattern(<*@*.*>)",
  1295. " ",
  1296. " Waits up to the given number of seconds, or until the given time of day,",
  1297. " for the given text to arrive on the connection. For use in script programs",
  1298. " with IF FAILURE or IF SUCCESS, which tell whether the desired text arrived",
  1299. " within the given amount of time.",
  1300. " ",
  1301. " The text, if given, can be a regular text or it can be a \\pattern()",
  1302. " invocation, in which case it is treated as a pattern rather than a literal",
  1303. " string (HELP PATTERNS for details).",
  1304. " ",
  1305. " If the /COUNT: switch is included, INPUT waits for the given number of",
  1306. " characters to arrive.",
  1307. " ",
  1308. " If no text is specified, INPUT waits for the first character that arrives",
  1309. " and makes it available in the \\v(inchar) variable. This is equivalent to",
  1310. " including a /COUNT: switch with an argument of 1.",
  1311. " ",
  1312. " If the /NOMATCH switch is included, INPUT does not attempt to match any",
  1313. " characters, but continues reading from the communication connection until",
  1314. " the timeout interval expires. If the timeout interval is 0, the INPUT",
  1315. " command does not wait; i.e. the given text must already be available for",
  1316. " reading for the INPUT command to succeed. If the interval is negative,",
  1317. " the INPUT command waits forever.",
  1318. " ",
  1319. " The INPUT buffer, \\v(input), is normally circular. Incoming material is",
  1320. " appended to it until it reaches the end, and then it wraps around to the",
  1321. " beginning. If the /CLEAR switch is given, INPUT clears its buffer before",
  1322. " reading from the connection.",
  1323. " ",
  1324. " Typical example of use:",
  1325. " ",
  1326. " INPUT 10 login:",
  1327. " IF FAIL EXIT 1 \"Timed out waiting for login prompt\"",
  1328. " LINEOUT myuserid",
  1329. " INPUT 10 Password:",
  1330. " IF FAIL EXIT 1 \"Timed out waiting for Password prompt\"",
  1331. " LINEOUT xxxxxxx",
  1332. " ",
  1333. " The /NOWRAP switch means that INPUT should return with failure status",
  1334. " and with \\v(instatus) set to 6 if its internal buffer fills up before",
  1335. " any of the other completion criteria are met. This allows for capture",
  1336. " of the complete incoming data stream (except NUL bytes, which are",
  1337. " discarded). CAUTION: if the search target (if any) spans the INPUT buffer",
  1338. " boundary, INPUT will not succeed.",
  1339. " ",
  1340. " \
  1341. \\v(instatus) values are: 0 (success), 1 (timed out), 2 (keyboard interrupt),",
  1342. " 3 (internal error), 4 (I/O error or connection lost), 5 (INPUT disabled),",
  1343. " and 6 (buffer filled and /NOWRAP set); these are shown by \\v(inmessage).",
  1344. " ",
  1345. " Also see OUTPUT, MINPUT, REINPUT, SET INPUT and CLEAR. See HELP PAUSE for",
  1346. " details on time-of-day format and HELP PATTERNS for pattern syntax.",
  1347. ""};
  1348. static char *hxxout[] = {
  1349. "Syntax: OUTPUT text",
  1350. " Sends the text out the communications connection, as if you had typed it",
  1351. " during CONNECT mode. The text may contain backslash codes, variables,",
  1352. " etc, plus the following special codes:",
  1353. " ",
  1354. " \\N - Send a NUL (ASCII 0) character (you can't use \\0 for this).",
  1355. " \\B - Send a BREAK signal.",
  1356. " \\L - Send a Long BREAK signal.",
  1357. " ",
  1358. "Also see SET OUTPUT.",
  1359. "" };
  1360. #endif /* NOSPL */
  1361. static char *hxypari[] = {
  1362. "SET PARITY NONE",
  1363. " Chooses 8 data bits and no parity.",
  1364. " ",
  1365. "SET PARITY { EVEN, ODD, MARK, SPACE }",
  1366. " Chooses 7 data bits plus the indicated kind of parity.",
  1367. " Forces 8th-bit prefixing during file transfer.",
  1368. " ",
  1369. #ifdef HWPARITY
  1370. "SET PARITY HARDWARE { EVEN, ODD }",
  1371. " Chooses 8 data bits plus the indicated kind of parity.",
  1372. " ",
  1373. "Also see SET TERMINAL BYTESIZE, SET SERIAL, and SET STOP-BITS.",
  1374. #else
  1375. "Also see SET TERMINAL BYTESIZE and SET SERIAL.",
  1376. #endif /* HWPARITY */
  1377. ""};
  1378. #ifndef NOLOCAL
  1379. static char *hxyesc[] = {
  1380. #ifdef OS2
  1381. "Syntax: SET ESCAPE number",
  1382. " Decimal ASCII value for escape character during CONNECT, normally 29",
  1383. " (Control-]). Type the escape character followed by C to get back to the",
  1384. " C-Kermit prompt or followed by ? to see other options, or use the \\Kexit",
  1385. " keyboard verb, normally assigned to Alt-x.",
  1386. #else
  1387. #ifdef NEXT
  1388. "Syntax: SET ESCAPE number",
  1389. " Decimal ASCII value for escape character during CONNECT, normally 29",
  1390. " (Control-]). Type the escape character followed by C to get back to the",
  1391. " C-Kermit prompt or followed by ? to see other options.",
  1392. #else
  1393. "Syntax: SET ESCAPE number",
  1394. " Decimal ASCII value for escape character during CONNECT, normally 28",
  1395. " (Control-\\). Type the escape character followed by C to get back to the",
  1396. " C-Kermit prompt or followed by ? to see other options.",
  1397. #endif /* NEXT */
  1398. #endif /* OS2 */
  1399. " ",
  1400. "You may also enter the escape character as ^X (circumflex followed by a",
  1401. "letter or one of: @, ^, _, [, \\, or ], to indicate a control character;",
  1402. "for example, SET ESC ^_ sets your escape character to Ctrl-Underscore.",
  1403. " ",
  1404. "You can also specify an 8-bit character (128-255) as your escape character,",
  1405. "either by typing it literally or by entering its numeric code.",
  1406. "" };
  1407. #endif /* NOLOCAL */
  1408. #ifndef NOSPL
  1409. static char *hxyout[] = {
  1410. "SET OUTPUT PACING <number>",
  1411. " How many milliseconds to pause after sending each OUTPUT character,",
  1412. " normally 0.",
  1413. " ",
  1414. "SET OUTPUT SPECIAL-ESCAPES { ON, OFF }",
  1415. " Whether to process the special OUTPUT-only escapes \\B, \\L, and \\N.",
  1416. " Normally ON (they are processed).",
  1417. "" };
  1418. static char *hxyinp[] = {
  1419. "Syntax: SET INPUT parameter value",
  1420. " ",
  1421. #ifdef CK_AUTODL
  1422. "SET INPUT AUTODOWNLOAD { ON, OFF }",
  1423. " Controls whether autodownloads are allowed during INPUT command execution.",
  1424. " ",
  1425. #endif /* CK_AUTODL */
  1426. "SET INPUT BUFFER-LENGTH number-of-bytes",
  1427. " Removes the old INPUT buffer and creates a new one with the given length.",
  1428. " ",
  1429. "SET INPUT CANCELLATION { ON, OFF }",
  1430. " Whether an INPUT in progress can be can interrupted from the keyboard.",
  1431. " ",
  1432. "SET INPUT CASE { IGNORE, OBSERVE }",
  1433. " Tells whether alphabetic case is to be significant in string comparisons.",
  1434. " This setting is local to the current macro or command file, and is",
  1435. " inherited by subordinate macros and take files.",
  1436. " ",
  1437. "SET INPUT ECHO { ON, OFF }",
  1438. " Tells whether to display arriving characters read by INPUT on the screen.",
  1439. " ",
  1440. #ifdef CKFLOAT
  1441. "SET INPUT SCALE-FACTOR <number>",
  1442. " A number to multiply all INPUT timeouts by, which may include a fractional",
  1443. " part, e.g. 2.5. All INPUT commands that specify a timeout in seconds",
  1444. " (as opposed to a specific time of day) have their time limit adjusted",
  1445. " automatically by this factor, which is also available in the built-in",
  1446. " read-only variable \\v(inscale). The default value is 1.0.",
  1447. " ",
  1448. #endif /* CKFLOAT */
  1449. "SET INPUT SILENCE <number>",
  1450. " The maximum number to seconds of silence (no input at all) before the",
  1451. " INPUT command times out, 0 for no maximum.",
  1452. " ",
  1453. #ifdef OS2
  1454. "SET INPUT TERMINAL { ON, OFF }",
  1455. " Determines whether the data received during an INPUT command is displayed",
  1456. " in the terminal window. Default is ON.",
  1457. " ",
  1458. #endif /* OS2 */
  1459. "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
  1460. " Tells whether to proceed or quit from a script program if an INPUT command",
  1461. " fails. PROCEED (default) allows use of IF SUCCESS / IF FAILURE commands.",
  1462. " This setting is local to the current macro or command file, and is",
  1463. " inherited by subordinate macros and take files.",
  1464. "" };
  1465. static char *hxyfunc[] = {
  1466. "SET FUNCTION DIAGNOSTICS { ON, OFF }",
  1467. " Whether to issue diagnostic messages for illegal function calls and",
  1468. " references to nonexistent built-in variables. ON by default.",
  1469. " ",
  1470. "SET FUNCTION ERROR { ON, OFF }",
  1471. " Whether an illegal function call or reference to a nonexistent built-in",
  1472. " variable should cause a command to fail. OFF by default.",
  1473. "" };
  1474. #endif /* NOSPL */
  1475. static char *hxyxyz[] = {
  1476. #ifdef CK_XYZ
  1477. #ifdef XYZ_INTERNAL
  1478. /* This is for built-in protocols */
  1479. "Syntax: SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 [ s3 ] ]",
  1480. " Selects protocol to use for transferring files. String s1 is a command to",
  1481. " send to the remote host prior to SENDing files with this protocol in",
  1482. " binary mode; string s2 is the same thing but for text mode. Use \"%s\" in",
  1483. " any of these strings to represent the filename(s). If the protocol is",
  1484. " KERMIT, you may also specify a string s3, the command to start a Kermit",
  1485. " server on the remote host when you give a GET, REGET, REMOTE, or other",
  1486. " client command. Use { braces } if any command contains spaces. Examples:",
  1487. " ",
  1488. " set proto xmodem {rx %s} {rx -a %s}",
  1489. " set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
  1490. #else /* This is for when non-Kermit protocols are external */
  1491. "Syntax: \
  1492. SET PROTOCOL { KERMIT, XMODEM, YMODEM, ZMODEM } [ s1 s2 s3 s4 s5 s6 ]",
  1493. " Selects protocol to use for transferring files. s1 and s2 are commands to",
  1494. " output prior to SENDing with this protocol, to automatically start the",
  1495. " RECEIVE process on the other end in binary or text mode, respectively.",
  1496. " If the protocol is KERMIT, s3 is the command to start a Kermit server on",
  1497. " the remote computer, and there are no s4-s6 commands. Otherwise, s3 and",
  1498. " s4 are commands used on this computer for sending files with this protocol",
  1499. " in binary or text mode, respectively; s5 and s6 are the commands for",
  1500. " receiving files with this protocol. Use \"%s\" in any of these strings",
  1501. " to represent the filename(s). Use { braces } if any command contains",
  1502. " spaces. Examples:",
  1503. " ",
  1504. " set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}",
  1505. " set proto ymodem rb {rb -a} {sb %s} {sb -a %s} rb rb",
  1506. " ",
  1507. "External protocols require REDIRECT and external file transfer programs that",
  1508. "use redirectable standard input/output.",
  1509. #endif /* XYZ_INTERNAL */
  1510. #else
  1511. "Syntax: \
  1512. SET PROTOCOL KERMIT [ s1 [ s2 [ s3 ] ] ]",
  1513. " Lets you specify the autoupload binary, autoupload text, and autoserver",
  1514. " command strings to be sent to the remote system in advance of any SEND",
  1515. " or GET commands. By default these are \"kermit -ir\", \"kermit -r\", and",
  1516. " \"kermit -x\". Use { braces } around any command that contains spaces.",
  1517. " Example:",
  1518. " ",
  1519. " set proto kermit {kermit -Yir} {kermit -YTr} {kermit -Yx}",
  1520. #endif /* CK_XYZ */
  1521. " ",
  1522. " SHOW PROTOCOL displays the current settings.",
  1523. ""};
  1524. static char *hmxxbye = "Syntax: BYE\n\
  1525. Shut down and log out a remote Kermit server";
  1526. #ifdef CK_PERMS
  1527. #ifdef UNIX
  1528. static char *hmxxchmod[] = {
  1529. "Syntax: CHMOD [ switches ] code filespec",
  1530. " UNIX only. Changes permissions of the given file(s) to the given code,",
  1531. " which must be an octal number such as 664 or 775. Optional switches:",
  1532. " ",
  1533. " /FILES Only change permissions of regular files.",
  1534. " /DIRECTORIES Only change permissions of directory files.",
  1535. " /TYPE:BINARY Only change permissions of binary files.",
  1536. " /TYPE:TEXT Only change permissions of text files.",
  1537. " /DOTFILES Include files whose names begin with dot (.).",
  1538. " /RECURSIVE Change permissions in subdirectories too.",
  1539. " /LIST List each file (synonym: /VERBOSE).",
  1540. " /NOLIST Operate silently (synonym: /QUIET).",
  1541. " /PAGE When listing, pause at end of each screen (implies /LIST).",
  1542. " /NOPAGE When listing, don't pause at end of each screen.",
  1543. " /SIMULATE Show what would be done but don't actually do it.",
  1544. ""
  1545. };
  1546. #endif /* UNIX */
  1547. #endif /* CK_PERMS */
  1548. #ifndef NOSPL
  1549. #ifndef NOSEXP
  1550. static char *hmxxsexp[] = {
  1551. "Syntax: (operation operand [ operand [ ... ] ])",
  1552. " ",
  1553. " C-Kermit includes a simple LISP-like S-Expression parser operating on",
  1554. " numbers only. An S-Expression is always enclosed in parentheses. The",
  1555. " parentheses can contain (a) a number, (b) a variable, (c) a function that",
  1556. " returns a number, or (d) an operator followed by one or more operands.",
  1557. " Operands can be any of (a) through (c) or an S-Expression. Numbers can be",
  1558. " integers or floating-point. Any operand that is not a number and does not",
  1559. " start with backslash (\\) is treated as a Kermit macro name. Operators:",
  1560. " ",
  1561. " Operator Action Example Value",
  1562. " EVAL (.) Returns the contained value (6) 6",
  1563. " QUOTE (') Inhibits evaluation of following value (quote a) a",
  1564. " SETQ Assigns a value to a global variable (setq a 2) 2",
  1565. " LET Assigns a value to a local variable (let b -1.3) -1.3",
  1566. " + Adds all operands (1 or more) (+ a b) 0.7",
  1567. " - Subtracts all operands (1 or more) (- 9 5 2 1) 1",
  1568. " * Multiplies all operands (1 or more) (* a (+ b 1) 3) -1.8",
  1569. " / Divides all operands (1 or more) (/ b a 2) -0.325",
  1570. " ^ Raise given number to given power (^ 3 2) 9",
  1571. " ++ Increments a variable (++ a 1.2) 3.2",
  1572. " -- Decrements a variable (-- a) 1",
  1573. " ABS Absolute value of 1 operand (abs (* a b 3)) 7.8",
  1574. " MAX Maximum of all operands (1 or more) (max 1 2 3 4) 4",
  1575. " MIN Minimum of all operands (1 or more) (min 1 2 3 4) 1",
  1576. " MOD Modulus of all operands (1 or more) (mod 7 4 2) 1",
  1577. " TRUNCATE Integer part of floating-point operand (truncate 1.333) 1",
  1578. " CEILING Ceiling of floating-point operand (ceiling 1.25) 2",
  1579. " FLOOR Floor of floating-point operand (floor 1.25) 1",
  1580. " ROUND Operand rounded to nearest integer (round 1.75) 2",
  1581. " ROUND ...or to given number of decimals (round 1.7584 2) 1.76",
  1582. " SQRT Square root of 1 operand (sqrt 2) 1.414..",
  1583. " EXP e (2.71828..) to the given power (exp -1) 0.367..",
  1584. " SIN Sine of angle expressed in radians (sin (/ pi 2)) 1.0",
  1585. " COS Cosine of given number (cos pi) -1.0",
  1586. " TAN Tangent of given number (tan pi) 0.0",
  1587. " LOG Natural log (base e) of given number (log 2.7183) 1.000..",
  1588. " LOG10 Log base 10 of given number (log10 1000) 3.0",
  1589. " ",
  1590. "Predicate operators return 0 if false, 1 if true, and if it is the outermost",
  1591. "operator, sets SUCCESS or FAILURE accordingly:",
  1592. " ",
  1593. " < Operands in strictly descending order (< 6 5 4 3 2 1) 1",
  1594. " <= Operands in descending order (<= 6 6 5 4 3 2) 1",
  1595. " != Operands are not equal (!= 1 1 1.0) 0",
  1596. " = (==) All operands are equal (= 3 3 3 3) 1",
  1597. " > Operands in strictly ascending order (> 1 2 3 4 5 6) 1",
  1598. " >= Operands in ascending order (> 1 1 2 3 4 5) 1",
  1599. " AND (&&) Operands are all true (and 1 1 1 1 0) 0",
  1600. " OR (||) At least one operand is true (or 1 1 1 1 0) 1",
  1601. " XOR Logical Exclusive OR (xor 3 1) 0",
  1602. " NOT (!) Reverses truth value of operand (not 3) 0",
  1603. " ",
  1604. "Bit-oriented operators:",
  1605. " ",
  1606. " & Bitwise AND (& 7 2) 2",
  1607. " | Bitwise OR (| 1 2 3 4) 7",
  1608. " # Bitwise Exclusive OR (# 3 1) 2",
  1609. " ~ Reverses all bits (~ 3) -4",
  1610. " ",
  1611. "Operators that work on truth values:",
  1612. " ",
  1613. " IF Conditional evaluation (if (1) 2 3) 2",
  1614. " ",
  1615. "Operators can also be names of Kermit macros that return either numeric",
  1616. "values or no value at all.",
  1617. " ",
  1618. "Built-in constants are:",
  1619. " ",
  1620. " t True (1)",
  1621. " nil False (empty)",
  1622. " pi The value of Pi (3.1415926...)",
  1623. " ",
  1624. "If SET SEXPRESSION TRUNCATE-ALL-RESULTS is ON, all results are trunctated",
  1625. "to integer values by discarding any fractional part. Otherwise results",
  1626. "are floating-point if there fractional part and integer otherwise.",
  1627. "If SET SEXPRESSION ECHO-RESULT is AUTO (the default), the value of the",
  1628. "S-Expression is printed if the S-Expression is given at top level; if ON,",
  1629. "it is printed at any level; if OFF it is not printed. At all levels, the",
  1630. "variable \\v(sexpression) is set to the most recent S-Expression, and",
  1631. "\\v(svalue) is set to its value. You can use the \\fsexpresssion() function",
  1632. "to evaluate an S-Expression anywhere in a Kermit command.",
  1633. ""
  1634. };
  1635. #endif /* NOSEXP */
  1636. #endif /* NOSPL */
  1637. static char *hmxxgrep[] = {
  1638. #ifdef UNIXOROSK
  1639. "Syntax: GREP [ options ] pattern filespec",
  1640. #else
  1641. "Syntax: FIND [ options ] pattern filespec",
  1642. #endif /* UNIXOROSK */
  1643. " Searches through the given file or files for the given character string",
  1644. " or pattern. In the normal case, all lines containing any text that matches"
  1645. ,
  1646. " the pattern are printed. Pattern syntax is as described in HELP PATTERNS",
  1647. " except that '*' is implied at the beginning unless the pattern starts with",
  1648. " '^' and also at the end unless the pattern ends with '$'. Therefore,",
  1649. " \"grep something *.txt\" lists all lines in all *.txt files that contain",
  1650. " the word \"something\", but \"grep ^something *.txt\" lists only the lines",
  1651. " that START with \"something\". The command succeeds if any of the given",
  1652. " files contained any lines that match the pattern, otherwise it fails.",
  1653. #ifdef UNIXOROSK
  1654. " Synonym: FIND.",
  1655. #else
  1656. " Synonym: GREP.",
  1657. #endif /* UNIXOROSK */
  1658. " ",
  1659. "File selection options:",
  1660. " /NOBACKUPFILES",
  1661. " Excludes backup files (like oofa.txt.~3~) from the search.",
  1662. " /DOTFILES",
  1663. " Includes files whose names start with dot (.) in the search.",
  1664. " /NODOTFILES",
  1665. " Excludes files whose names start with dot (.) from the search.",
  1666. #ifdef RECURSIVE
  1667. " /RECURSIVE",
  1668. " Searches through files in subdirectories too.",
  1669. #endif /* RECURSIVE */
  1670. " /TYPE:TEXT",
  1671. " Search only text files (requires FILE SCAN ON).",
  1672. " /TYPE:BINARY",
  1673. " Search only binary files (requires FILE SCAN ON).",
  1674. " ",
  1675. "Pattern-matching options:",
  1676. " /NOCASE",
  1677. " Ignores case of letters (ASCII only) when comparing.",
  1678. " /NOMATCH",
  1679. " Searches for lines that do NOT match the pattern.",
  1680. " /EXCEPT:pattern",
  1681. " Exclude lines that match the main pattern that also match this pattern.",
  1682. " ",
  1683. "Display options:",
  1684. " /COUNT:variable-name",
  1685. " For each file, prints only the filename and a count of matching lines",
  1686. " and assigns the total match count to the variable, if one is given.",
  1687. " /NAMEONLY",
  1688. " Prints the name of each file that contains at least one matching line,",
  1689. " one name per line, rather than showing each matching line.",
  1690. " /NOLIST",
  1691. " Doesn't print anything (but sets SUCCESS or FAILURE appropriately).",
  1692. " /LINENUMBERS",
  1693. " Precedes each file line by its line number within the file.",
  1694. " /PAGE",
  1695. " Pauses after each screenful.",
  1696. " /NOPAGE",
  1697. " Doesn't pause after each screenful.",
  1698. " /OUTPUT:name",
  1699. " Sends results to the given file. If this switch is omitted, the",
  1700. " results appear on your screen. This switch overrides any express or",
  1701. " implied /PAGE switch.",
  1702. ""};
  1703. static char *hmxxdir[] = {
  1704. #ifdef DOMYDIR
  1705. "Syntax: DIRECTORY [ switches ] [ filespec [ filespec [ ... ] ] ]",
  1706. #ifdef LOCUS
  1707. " If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
  1708. " this command is equivalent to REMOTE DIRECTORY (RDIR). Otherwise:",
  1709. " ",
  1710. #endif /* LOCUS */
  1711. " Lists local files. The filespec may be a filename, possibly containing",
  1712. " wildcard characters, or a directory name. If no filespec is given, all",
  1713. " files in the current directory are listed. If a directory name is given,",
  1714. " all the files in it are listed. Multiple filespecs can be given.",
  1715. " Optional switches:",
  1716. " ",
  1717. " /BRIEF List filenames only.",
  1718. #ifdef CK_PERMS
  1719. " /VERBOSE + Also list permissions, size, and date.",
  1720. #else
  1721. " /VERBOSE + Also list date and size.",
  1722. #endif /* CK_PERMS */
  1723. " /FILES Show files but not directories.",
  1724. " /DIRECTORIES Show directories but not files.",
  1725. " /ALL + Show both files and directories.",
  1726. " /ARRAY:&a Store file list in specified array (e.g. \\%a[]).",
  1727. " /PAGE Pause after each screenful.",
  1728. " /NOPAGE Don't pause after each screenful.",
  1729. " /TOP:n Only show the top n lines of the directory listing.",
  1730. #ifdef UNIXOROSK
  1731. " /DOTFILES Include files whose names start with dot (period).",
  1732. " /NODOTFILES + Don't include files whose names start with dot.",
  1733. " /FOLLOWLINKS Follow symbolic links.",
  1734. " /NOFOLLOWLINKS + Don't follow symbolic links.",
  1735. " /NOLINKS Don't list symbolic links at all.",
  1736. " /BACKUP + Include backup files (names end with .~n~).",
  1737. " /NOBACKUPFILES Don't include backup files.",
  1738. #endif /* UNIXOROSK */
  1739. " /OUTPUT:file Store directory listing in the given file.",
  1740. " /HEADING Include heading and summary.",
  1741. " /NOHEADING + Don't include heading or summary.",
  1742. " /COUNT:var Put the number of matching files in the given variable.",
  1743. " /SUMMARY Print only count and total size of matching files.",
  1744. " /XFERMODE Show pattern-based transfer mode (T=Text, B=Binary).",
  1745. " /TYPE: Show only files of the specified type (text or binary).",
  1746. " /MESSAGE:text Add brief message to each listing line.",
  1747. " /NOMESSAGE + Don't add message to each listing line.",
  1748. " /NOXFERMODE + Don't show pattern-based transfer mode",
  1749. " /ISODATE + In verbose listings, show date in ISO 8061 format.",
  1750. " /ENGLISHDATE In verbose listings, show date in \"English\" format.",
  1751. #ifdef RECURSIVE
  1752. " /RECURSIVE Descend through subdirectories.",
  1753. " /NORECURSIVE + Don't descend through subdirectories.",
  1754. #endif /* RECURSIVE */
  1755. " /SORT:key Sort by key, NAME, DATE, or SIZE; default key is NAME.",
  1756. " /NOSORT + Don't sort.",
  1757. " /ASCENDING + If sorting, sort in ascending order.",
  1758. " /REVERSE If sorting, sort in reverse order.",
  1759. " ",
  1760. "Factory defaults are marked with +. Default for paging depends on SET",
  1761. "COMMAND MORE-PROMPTING. Use SET OPTIONS DIRECTORY [ switches ] to change",
  1762. "defaults; use SHOW OPTIONS to display customized defaults. Also see",
  1763. "WDIRECTORY.",
  1764. #else
  1765. "Syntax: DIRECTORY [ filespec ]",
  1766. " Lists the specified file or files. If no filespec is given, all files",
  1767. " in the current directory are listed.",
  1768. #endif /* DOMYDIR */
  1769. ""};
  1770. static char *hmxxtouch[] = {
  1771. "Syntax: TOUCH [ switches ] filespec",
  1772. " Updates the modification time of the given file or files to the current",
  1773. " date and time or to the date and time specified in the /MODTIME: switch.",
  1774. " If the filespec is the name of a single file that does not exist, the file",
  1775. " is created. The following switches can be used to restrict the files",
  1776. " to be touched according to various criteria:",
  1777. " ",
  1778. " /FILES Select files but not directories.",
  1779. " /DIRECTORIES Select directories but not files.",
  1780. " /ALL + Select both files and directories.",
  1781. " /AFTER: Select files modified after the given date",
  1782. " /BEFORE: Select files modified before the given date",
  1783. " /LARGER: Select files larger than the given size in bytes",
  1784. " /SMALLER: Select files smaller than the given size in bytes",
  1785. " /EXCEPT: Exclude the given files (list or pattern)",
  1786. #ifdef UNIXOROSK
  1787. " /DOTFILES Include files whose names start with dot (period).",
  1788. " /NODOTFILES + Don't include files whose names start with dot.",
  1789. " /FOLLOWLINKS For symbolic link touch the linked-to file, not the link",
  1790. " /NOFOLLOWLINKS + Select the link itself, not the file it links to.",
  1791. " /NOLINKS Skip over symbolic links.",
  1792. " /BACKUP + Include backup files (names end with .~n~).",
  1793. " /NOBACKUPFILES Don't include backup files.",
  1794. #endif /* UNIXOROSK */
  1795. " /TYPE: Select only files of the given type, TEXT or BINARY.",
  1796. #ifdef RECURSIVE
  1797. " /RECURSIVE Descend through subdirectories.",
  1798. " /NORECURSIVE + Don't descend through subdirectories.",
  1799. " ",
  1800. " Action switches:",
  1801. " ",
  1802. " /MODTIME: Modification time for selected files.",
  1803. " /SIMULATE List files that would be touched, but don't touch them.",
  1804. " /LIST Show which files are being touched.",
  1805. #endif /* RECURSIVE */
  1806. " ",
  1807. "Factory defaults are marked with +. Use HELP DATE to learn the date-time",
  1808. "formats usable with /MODTIME:. If a /MODTIME: switch is not given, each",
  1809. "selected file gets a modification time equal to the current clock time.",
  1810. "You can use the /SIMULATE switch in combination with other switches to see",
  1811. "which files will be affected without actually changing their dates.",
  1812. ""};
  1813. static char *hmxxchange[] = {
  1814. "Syntax: CHANGE [ switches ] filespec string1 string2",
  1815. " Changes all occurrences of string1 to string2 in the given file or files.",
  1816. " Works line by line, does not do multiline or across-line substitutions.",
  1817. " To remove strings from files, specify string2 as \"\" or omit string2.",
  1818. " Temporary files are created in the directory indicated by \\v(tmpdir)",
  1819. " (show var tmpdir). You can select a different temporary directory with",
  1820. " the SET TEMP-DIRECTORY command. All temporary files are deleted after use."
  1821. ,
  1822. " ",
  1823. " String1 and String2 should be enclosed in doublequotes \"\" or braces {} if"
  1824. ,
  1825. " if they contain spaces. In the event that they already contain braces or",
  1826. " doublequotes, especially if these are not balanced, some quoting may be",
  1827. " required. Or you can assign the strings to variables and then use the",
  1828. " variable names in the CHANGE command; example:",
  1829. " ",
  1830. " .a = {value=\"./",
  1831. " .b = {value=\"../",
  1832. " change *.html \\m(a) \\m(b)",
  1833. " ",
  1834. " Since the CHANGE command works line by line, only text files can be",
  1835. " changed; C-Kermit automatically skips over binary files.",
  1836. " ",
  1837. " File selection switches (factory defaults are marked with +):",
  1838. " ",
  1839. " /AFTER: Select files modified after the given date",
  1840. " /BEFORE: Select files modified before the given date",
  1841. " /LARGER: Select files larger than the given size in bytes",
  1842. " /SMALLER: Select files smaller than the given size in bytes",
  1843. " /EXCEPT: Exclude the given files (list or pattern)",
  1844. #ifdef UNIXOROSK
  1845. " /DOTFILES Include files whose names start with dot (period).",
  1846. " /NODOTFILES + Don't include files whose names start with dot.",
  1847. #endif /* UNIXOROSK */
  1848. #ifdef RECURSIVE
  1849. " /RECURSIVE Descend through subdirectories.",
  1850. " /NORECURSIVE + Don't descend through subdirectories.",
  1851. #endif /* RECURSIVE */
  1852. " ",
  1853. " File disposition switches:",
  1854. " ",
  1855. " /BACKUP:name Back up original files to named directory.",
  1856. " /DESTINATION:name Store resulting changed files in named directory.",
  1857. " If neither of these options is given, original files are overwritten.",
  1858. " ",
  1859. " String selection switches:",
  1860. " ",
  1861. " /CASE:{ON,OFF} OFF (default) = ignore case in string1; \
  1862. ON = don't ignore",
  1863. " ",
  1864. " Action switches:",
  1865. " ",
  1866. " /COUNT:name Set named variable to number of files that were changed.",
  1867. " /SIMULATE List files that would be changed, but don't change them.",
  1868. " /LIST Show which files are being changed.",
  1869. " /MODTIME: Modification time for change files, PRESERVE or UPDATE.",
  1870. " ",
  1871. "You can use the /SIMULATE switch in combination with other switches to see",
  1872. "which files will be affected without actually changing them.",
  1873. ""};
  1874. #ifndef NOSPL
  1875. static char *hmxxkcd[] = {
  1876. "Syntax: KCD symbolic-directory-name",
  1877. " Kermit Change Directory: Like CD (q.v.) but (a) always acts locally, and",
  1878. " (b) takes a symbolic directory name rather than an actual directory name.",
  1879. " The symbolic names correspond to Kermit's directory-valued built-in",
  1880. " variables, such as \\v(download), \\v(exedir), and so on. Here's the list:"
  1881. ,
  1882. " ",
  1883. #ifdef NT
  1884. " appdata Your personal C-Kermit Windows application data directory",
  1885. " common C-Kermit's application data directory for all users",
  1886. " desktop Your Windows desktop",
  1887. #endif /* NT */
  1888. " download Your download directory (if any)",
  1889. #ifdef OS2ORUNIX
  1890. " exedir The directory where the Kermit executable resides",
  1891. #endif /* OS2ORUNIX */
  1892. " home Your home, login, or default directory",
  1893. " inidir The directory where Kermit's initialization was found",
  1894. #ifdef UNIX
  1895. " lockdir The UNIX UUCP lockfile directory on this computer",
  1896. #endif /* UNIX */
  1897. #ifdef NT
  1898. " personal Your \"My Documents\" directory",
  1899. #endif /* NT */
  1900. " startup Your current directory at the time Kermit started",
  1901. " textdir The directory where Kermit text files reside, if any",
  1902. " tmpdir Your temporary directory",
  1903. " ",
  1904. " Also see CD, SET FILE DOWNLOAD, SET TEMP-DIRECTORY.",
  1905. ""
  1906. };
  1907. #endif /* NOSPL */
  1908. static char *hmxxcwd[] = {
  1909. #ifdef LOCUS
  1910. " If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
  1911. " this command is equivalent to REMOTE CD (RCD). Otherwise:",
  1912. " ",
  1913. #endif /* LOCUS */
  1914. #ifdef vms
  1915. "Syntax: CD [ directory or device:directory ]",
  1916. " Change Working Directory. Equivalent to VMS SET DEFAULT command.",
  1917. #else
  1918. #ifdef datageneral
  1919. "Change Working Directory, equivalent to AOS/VS 'dir' command.",
  1920. #else
  1921. #ifdef OS2
  1922. "Syntax: CD [ disk or directory name ]",
  1923. " Change Disk or Directory. If a disk or directory name is not specified,",
  1924. " your current directory becomes the one specified by HOME environment",
  1925. " variable, if any. A disk letter must be followed by a colon.",
  1926. #else
  1927. "Syntax: CD [ directory name ]",
  1928. " Change Directory. Changes your current, working, default directory to the",
  1929. " one given, so that future non-absolute filename references are relative to",
  1930. " this directory. If the directory name is omitted, your home (login)",
  1931. " directory is supplied.",
  1932. #endif /* OS2 */
  1933. #endif /* datageneral */
  1934. #endif /* vms */
  1935. " C-Kermit's default prompt shows your current directory.",
  1936. " Synonyms: LCD, CWD.",
  1937. #ifdef LOCUS
  1938. " Also see: SET LOCUS, PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
  1939. #else
  1940. " Also see: PWD, CDUP, BACK, REMOTE CD (RCD), SET CD, SET PROMPT.",
  1941. #endif /* LOCUS */
  1942. #ifndef NOSPL
  1943. " And see: HELP KCD.",
  1944. #endif /* NOSPL */
  1945. " Relevant environment variables: CDPATH, HOME.",
  1946. ""};
  1947. static char *hmxxdel[] = {
  1948. "Syntax: DELETE [ switches... ] filespec",
  1949. #ifdef LOCUS
  1950. " If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
  1951. " this command is equivalent to REMOTE DELETE (RDELETE). Otherwise:",
  1952. " ",
  1953. #endif /* LOCUS */
  1954. " Deletes a file or files on the computer where C-Kermit is running.",
  1955. " The filespec may denote a single file or can include wildcard characters",
  1956. " to match multiple files. RM is a synonym for DELETE. Switches include:",
  1957. " ",
  1958. "/AFTER:date-time",
  1959. #ifdef VMS
  1960. " Specifies that only those files created after the given date-time are",
  1961. #else
  1962. " Specifies that only those files modified after the given date-time are",
  1963. #endif /* VMS */
  1964. " to be deleted. HELP DATE for info about date-time formats.",
  1965. " ",
  1966. "/BEFORE:date-time",
  1967. #ifdef VMS
  1968. " Specifies that only those files modified before the given date-time",
  1969. #else
  1970. " Specifies that only those files modified before the given date-time",
  1971. #endif /* VMS */
  1972. " are to be deleted.",
  1973. " ",
  1974. "/NOT-AFTER:date-time",
  1975. #ifdef VMS
  1976. " Specifies that only those files modified at or before the given date-time",
  1977. #else
  1978. " Specifies that only those files modified at or before the given date-time",
  1979. #endif /* VMS */
  1980. " are to be deleted.",
  1981. " ",
  1982. "/NOT-BEFORE:date-time",
  1983. #ifdef VMS
  1984. " Specifies that only those files modified at or after the given date-time",
  1985. #else
  1986. " Specifies that only those files modified at or after the given date-time",
  1987. #endif /* VMS */
  1988. " are to be deleted.",
  1989. " ",
  1990. "/LARGER-THAN:number",
  1991. " Specifies that only those files longer than the given number of bytes are",
  1992. " to be deleted.",
  1993. " ",
  1994. "/SMALLER-THAN:number",
  1995. " Specifies that only those files smaller than the given number of bytes are",
  1996. " to be sent.",
  1997. " ",
  1998. "/EXCEPT:pattern",
  1999. " Specifies that any files whose names match the pattern, which can be a",
  2000. " regular filename or may contain wildcards, are not to be deleted. To",
  2001. " specify multiple patterns (up to 8), use outer braces around the group",
  2002. " and inner braces around each pattern:",
  2003. " ",
  2004. " /EXCEPT:{{pattern1}{pattern2}...}",
  2005. " ",
  2006. #ifdef UNIXOROSK
  2007. "/DOTFILES",
  2008. " Include (delete) files whose names begin with \".\".",
  2009. " ",
  2010. "/NODOTFILES",
  2011. " Skip (don't delete) files whose names begin with \".\".",
  2012. " ",
  2013. #endif /* UNIXOROSK */
  2014. "/TYPE:TEXT",
  2015. " Delete only regular text files (requires FILE SCAN ON)",
  2016. " ",
  2017. "/TYPE:BINARY",
  2018. " Delete only regular binary files (requires FILE SCAN ON)",
  2019. " ",
  2020. "/DIRECTORIES",
  2021. " Include directories. If this switch is not given, only regular files",
  2022. " are deleted. If it is given, Kermit attempts to delete any directories",
  2023. " that match the given file specification, which succeeds only if the",
  2024. " directory is empty.",
  2025. " ",
  2026. #ifdef RECURSIVE
  2027. "/RECURSIVE",
  2028. " The DELETE command applies to the entire directory tree rooted in the",
  2029. " current or specified directory. When the /DIRECTORIES switch is also",
  2030. " given, Kermit deletes all the (matching) files in each directory before",
  2031. " attempting to delete the directory itself.",
  2032. " ",
  2033. #endif /* RECURSIVE */
  2034. #ifdef UNIX
  2035. #ifdef RECURSIVE
  2036. "/ALL",
  2037. " This is a shortcut for /RECURSIVE /DIRECTORIES /DOTFILES.",
  2038. #else
  2039. "/ALL",
  2040. " This is a shortcut for /DIRECTORIES /DOTFILES.",
  2041. #endif /* RECURSIVE */
  2042. #else /* !UNIX */
  2043. #ifdef RECURSIVE
  2044. "/ALL",
  2045. " This is a shortcut for /RECURSIVE /DIRECTORIES.",
  2046. #else
  2047. "/ALL",
  2048. " This is a synonym for /DIRECTORIES.",
  2049. #endif /* RECURSIVE */
  2050. #endif /* UNIX */
  2051. " ",
  2052. "/LIST",
  2053. " List each file and tell whether it was deleted. Synonyms: /LOG, /VERBOSE.",
  2054. " ",
  2055. "/NOLIST",
  2056. " Don't list files while deleting. Synonyms: /NOLOG, /QUIET.",
  2057. " ",
  2058. "/HEADING",
  2059. " Print heading and summary information.",
  2060. " ",
  2061. "/NOHEADING",
  2062. " Don't print heading and summary information.",
  2063. " ",
  2064. "/SUMMARY",
  2065. " Like /HEADING /NOLIST, but only prints the summary line.",
  2066. " ",
  2067. "/PAGE",
  2068. " If listing, pause after each screenful.",
  2069. " ",
  2070. "/NOPAGE",
  2071. " Don't pause after each screenful.",
  2072. " ",
  2073. "/ASK",
  2074. " Interactively ask permission to delete each file. Reply Yes or OK to",
  2075. " delete it, No not to delete it, Quit to cancel the DELETE command, and",
  2076. " Go to go ahead and delete all the rest of the files without asking.",
  2077. " ",
  2078. "/NOASK",
  2079. " Delete files without asking permission.",
  2080. " ",
  2081. "/SIMULATE",
  2082. " Preview files selected for deletion without actually deleting them.",
  2083. " Implies /LIST.",
  2084. " ",
  2085. "Use SET OPTIONS DELETE to make selected switches effective for every DELETE",
  2086. "command \
  2087. unless you override them; use SHOW OPTIONS to see selections currently",
  2088. #ifdef LOCUS
  2089. "in effect. Also see HELP SET LOCUS, HELP PURGE, HELP WILDCARD.",
  2090. #else
  2091. "in effect. Also see HELP PURGE, HELP WILDCARD.",
  2092. #endif /* LOCUS */
  2093. ""};
  2094. #ifndef NOHTTP
  2095. static char *hmxxhttp[] = {
  2096. "Syntax:",
  2097. #ifdef CK_SSL
  2098. "HTTP [ <switches> ] OPEN [{ /SSL, /TLS }] <hostname> <service/port>",
  2099. #else
  2100. "HTTP [ <switches> ] OPEN <hostname> <service/port>",
  2101. #endif /*CK_SSL */
  2102. " Instructs Kermit to open a new connection for HTTP communication with",
  2103. " the specified host on the specified port. The default port is \"http\".",
  2104. #ifdef CK_SSL
  2105. " If /SSL or /TLS are specified or if the service is \"https\" or port 443,",
  2106. " a secure connection will be established using the current authentication",
  2107. " settings. See HELP SET AUTH for details.",
  2108. #endif /* CK_SSL */
  2109. " If <switches> are specified, they are applied to all subsequent HTTP",
  2110. " actions (GET, PUT, ...) until an HTTP CLOSE command is executed.",
  2111. " A URL can be included in place of the hostname and service or port.",
  2112. " ",
  2113. "HTTP CLOSE",
  2114. " Instructs Kermit to close any open HTTP connection and clear any saved",
  2115. " switch values.",
  2116. " ",
  2117. "HTTP [ <switches> ] CONNECT <host>[:<port>]",
  2118. " Instructs the server to establish a connection with the specified host",
  2119. " and to redirect all data transmitted between Kermit and the host for the",
  2120. " life of the connection.",
  2121. " ",
  2122. "HTTP [ <switches> ] GET <remote-filename> [ <local-filename> ]",
  2123. " Retrieves the named file on the currently open HTTP connection. The",
  2124. " default local filename is the same as the remote filename, but with any",
  2125. " path stripped. If you want the file to be displayed on the screen instead",
  2126. " of stored on disk, include the /TOSCREEN switch and omit the local",
  2127. " filename. If you give a URL instead of a remote filename, this commands",
  2128. " opens the connection, GETs the file, and closes the connection; the same",
  2129. " is true for the remaining HTTP commands for which you can specify a",
  2130. " remote filename, directory name, or path.",
  2131. " ",
  2132. "HTTP [ <switches> ] HEAD <remote-filename> [ <local-filename> ]",
  2133. " Like GET except without actually getting the file; instead it gets only",
  2134. " the headers, storing them into the given file (if a local filename is",
  2135. " specified), one line per header item as shown in the /ARRAY: switch",
  2136. " description.",
  2137. " ",
  2138. "HTTP [ <switches> ] INDEX <remote-directory> [ <local-filename> ]",
  2139. " Retrieves the file listing for the given server directory.",
  2140. " NOTE: This command is not supported by most Web servers, and even when",
  2141. " the server understand it, there is no stardard response format.",
  2142. " ",
  2143. "HTTP [ <switches> ] POST [ /MIME-TYPE:<type> ] <local-file> <remote-path>",
  2144. " [ <dest-file> ]",
  2145. " Used to send a response as if it were sent from a form. The data to be",
  2146. " posted must be read from a file.",
  2147. " ",
  2148. "HTTP [ <switches> ] PUT [ /MIME-TYPE:<type> ] <local-file> <remote-file>",
  2149. " [ <dest-file> ]",
  2150. " Uploads the given local file to server file. If the remote filename is",
  2151. " omitted, the local name is used, but with any path stripped.",
  2152. " ",
  2153. "HTTP [ <switches> ] DELETE <remote-filename>",
  2154. " Instructs the server to delete the specified filename.",
  2155. " ",
  2156. "where <switches> are:",
  2157. "/AGENT:<user-agent>",
  2158. " Identifies the client to the server; \"C-Kermit\"",
  2159. " by default.",
  2160. " ",
  2161. "/HEADER:<header-line>",
  2162. " Used for specifying any optional headers. A list of headers is provided",
  2163. " using braces for grouping:",
  2164. " ",
  2165. " /HEADER:{{<tag>:<value>}{<tag>:<value>}...}",
  2166. " ",
  2167. " For a listing of valid <tag> value and <value> formats see RFC 1945:",
  2168. " \"Hypertext Transfer Protocol -- HTTP/1.0\". A maximum of eight headers",
  2169. " may be specified.",
  2170. " ",
  2171. "/TOSCREEN",
  2172. " Display server responses on the screen.",
  2173. " ",
  2174. "/USER:<name>",
  2175. " In case a page requires a username for access.",
  2176. " ",
  2177. "/PASSWORD:<password>",
  2178. " In case a page requires a password for access.",
  2179. " ",
  2180. "/ARRAY:<arrayname>",
  2181. " Tells Kermit to store the response headers in the given array, one line",
  2182. " per element. The array need not be declared in advance. Example:",
  2183. " ",
  2184. " http /array:c get kermit/index.html",
  2185. " show array c",
  2186. " Dimension = 9",
  2187. " 1. Date: Fri, 26 Nov 1999 23:12:22 GMT",
  2188. " 2. Server: Apache/1.3.4 (Unix)",
  2189. " 3. Last-Modified: Mon, 06 Sep 1999 22:35:58 GMT",
  2190. " 4. ETag: \"bc049-f72-37d441ce\"",
  2191. " 5. Accept-Ranges: bytes",
  2192. " 6. Content-Length: 3954",
  2193. " 7. Connection: close ",
  2194. " 8. Content-Type: text/html",
  2195. " ",
  2196. "As you can see, the header lines are like MIME e-mail header lines:",
  2197. "identifier, colon, value. The /ARRAY switch is the only method available",
  2198. "to a script to process the server responses for a POST or PUT command.",
  2199. " ",
  2200. ""
  2201. };
  2202. #endif /* NOHTTP */
  2203. #ifdef CK_KERBEROS
  2204. static char *hmxxauth[] = {
  2205. "Syntax:",
  2206. "AUTHENTICATE { KERBEROS4, KERBEROS5 [ switches ] } <action> [ switches ]",
  2207. " Obtains or destroys Kerberos tickets and lists information about them.",
  2208. " Actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS. KERBEROS4 can be",
  2209. " abbreviated K4 or KRB4; KERBEROS5 can be abbreviated K5 or KRB5. Use ? to",
  2210. " see which keywords, switches, or other quantities are valid at each point",
  2211. " in the command.",
  2212. " ",
  2213. " The actions are INITIALIZE, DESTROY, and LIST-CREDENTIALS:",
  2214. " ",
  2215. " AUTH { K4, K5 } { INITIALIZE [switches], DESTROY,",
  2216. " LIST-CREDENTIALS [switches] }",
  2217. " ",
  2218. " The INITIALIZE action is the most complex, and its format is different",
  2219. " for Kerberos 4 and Kerberos 5. The format for Kerberos 4 is:",
  2220. " ",
  2221. " AUTH K4 INITIALIZE [ /INSTANCE:<name> /LIFETIME:<minutes> -",
  2222. " /PASSWORD:<password> /PREAUTH /REALM:<name> <principal> ]",
  2223. " ",
  2224. " All switches are optional. Kerberos 4 INITIALIZE switches are:",
  2225. " ",
  2226. " /INSTANCE:<name>",
  2227. " Allows an Instance (such as a hostname) to be specified.",
  2228. " ",
  2229. " /LIFETIME:<number>",
  2230. " Specifies the requested lifetime in minutes for the ticket. If no",
  2231. " lifetime is specified, 600 minutes is used. If the lifetime is greater",
  2232. " than the maximum supported by the ticket granting service, the resulting",
  2233. " lifetime is shortened accordingly.",
  2234. " ",
  2235. " /NOT-PREAUTH",
  2236. " Instructs Kermit to send a ticket getting ticket (TGT) request to the",
  2237. " KDC without any preauthentication data.",
  2238. " ",
  2239. " /PASSWORD:<string>",
  2240. " Allows a password to be included on the command line or in a script",
  2241. " file. If no /PASSWORD switch is included, you are prompted on a separate"
  2242. ,
  2243. " line. The password switch is provided on a use-at-your-own-risk basis",
  2244. " for use in automated scripts. WARNING: Passwords should not be stored in"
  2245. ,
  2246. " files.",
  2247. " ",
  2248. " /PREAUTH",
  2249. " Instructs Kermit to send a preauthenticated Ticket-Getting Ticket (TGT)",
  2250. " request to the KDC instead of a plaintext request. The default when",
  2251. " supported by the Kerberos libraries.",
  2252. " ",
  2253. " /REALM:<name>",
  2254. " Allows a realm to be specified (overriding the default realm).",
  2255. " ",
  2256. " <principal>",
  2257. " Your identity in the given or default Kerberos realm, of the form:",
  2258. " userid[.instance[.instance]]@[realm] ",
  2259. " Can be omitted if it is the same as your username or SET LOGIN USERID",
  2260. " value on the client system.",
  2261. " ",
  2262. " The format for Kerberos 5 is as follows:",
  2263. " ",
  2264. " AUTH K5 [ /CACHE:<filename> ] { INITIALIZE [ switches ], DESTROY,",
  2265. " LIST-CREDENTIALS ...}",
  2266. " ",
  2267. "The INITIALIZE command for Kerberos 5 can include a number of switches;",
  2268. "all are optional:",
  2269. " ",
  2270. "AUTH K5 [ /CACHE:<filename> ] INITITIALIZE [ /ADDRESSES:<addr-list>",
  2271. " /FORWARDABLE /KERBEROS4 /LIFETIME:<minutes> /PASSWORD:<password>",
  2272. " /POSTDATE:<date-time> /PROXIABLE /REALM:<name> /RENEW /RENEWABLE:<minutes>",
  2273. " /SERVICE:<name> /VALIDATE <principal> ]",
  2274. " ",
  2275. " All Kerberos 5 INITIALIZE switches are optional:",
  2276. " ",
  2277. " /ADDRESSES:{list of ip-addresses}",
  2278. " Specifies a list of IP addresses that should be placed in the Ticket",
  2279. " Getting Ticket in addition to the local machine addresses.",
  2280. " ",
  2281. " /FORWARDABLE",
  2282. " Requests forwardable tickets.",
  2283. " ",
  2284. " /INSTANCE:<name>",
  2285. " Allows an Instance (such as a hostname) to be specified.",
  2286. " ",
  2287. " /KERBEROS4",
  2288. " Instructs Kermit to get Kerberos 4 tickets in addition to Kerberos 5",
  2289. " tickets. If Kerberos 5 tickets are not supported by the server, a",
  2290. " mild warning is printed and Kerberos 4 tickets are requested.",
  2291. " ",
  2292. " /LIFETIME:<number>",
  2293. " Specifies the requested lifetime in minutes for the ticket. If no",
  2294. " lifetime is specified, 600 minutes is used. If the lifetime is greater",
  2295. " than the maximum supported by the ticket granting service, the resulting",
  2296. " lifetime is shortened.",
  2297. " ",
  2298. " /NO-KERBEROS4",
  2299. " Instructs Kermit to not attempt to retrieve Kerberos 4 credentials.",
  2300. " ",
  2301. " /NOT-FORWARDABLE",
  2302. " Requests non-forwardable tickets.",
  2303. " ",
  2304. " /NOT-PROXIABLE",
  2305. " Requests non-proxiable tickets.",
  2306. " ",
  2307. " /PASSWORD:<string>",
  2308. " Allows a password to be included on the command line or in a script",
  2309. " file. If no /PASSWORD switch is included, you are prompted on a separate"
  2310. ,
  2311. " line. The password switch is provided on a use-at-your-own-risk basis",
  2312. " for use in automated scripts. WARNING: Passwords should not be stored in"
  2313. ,
  2314. " files.",
  2315. " ",
  2316. " /POSTDATE:<date-time>",
  2317. " Requests a postdated ticket, valid starting at <date-time>. Postdated",
  2318. " tickets are issued with the invalid flag set, and need to be fed back to",
  2319. " the KDC before use with the /VALIDATE switch. Type HELP DATE for info",
  2320. " on date-time formats.",
  2321. " ",
  2322. " /PROXIABLE",
  2323. " Requests proxiable tickets.",
  2324. " ",
  2325. " /REALM:<string>",
  2326. " Allows an alternative realm to be specified.",
  2327. " ",
  2328. " /RENEW",
  2329. " Requests renewal of a renewable Ticket-Granting Ticket. Note that ",
  2330. " an expired ticket cannot be renewed even if it is within its renewable ",
  2331. " lifetime.",
  2332. " ",
  2333. " /RENEWABLE:<number>",
  2334. " Requests renewable tickets, with a total lifetime of <number> minutes.",
  2335. " ",
  2336. " /SERVICE:<string>",
  2337. " Allows a service other than the ticket granting service to be specified.",
  2338. " ",
  2339. " /VALIDATE",
  2340. " Requests that the Ticket Granting Ticket in the cache (with the invalid",
  2341. " flag set) be passed to the KDC for validation. If the ticket is within",
  2342. " its requested time range, the cache is replaced with the validated",
  2343. " ticket.",
  2344. " ",
  2345. " <principal>",
  2346. " Your identity in the given or default Kerberos realm, of the form:",
  2347. " userid[/instance][@realm] ",
  2348. " Can be omitted if it is the same as your username or SET LOGIN USERID",
  2349. " value on the client system.",
  2350. " ",
  2351. " Note: Kerberos 5 always attempts to retrieve a Ticket-Getting Ticket (TGT)",
  2352. " using the preauthenticated TGT request.",
  2353. " ",
  2354. " AUTHORIZE K5 LIST-CREDENTIALS [ /ADDRESSES /FLAGS /ENCRYPTION ]",
  2355. " ",
  2356. " Shows start time, expiration time, service or principal name, plus",
  2357. " the following additional information depending the switches:",
  2358. " ",
  2359. " /ADDRESSES displays the hostnames and/or IP addresses embedded within",
  2360. " the tickets.",
  2361. " ",
  2362. " /FLAGS provides the following information (if applicable) for each ticket:",
  2363. " F - Ticket is Forwardable",
  2364. " f - Ticket was Forwarded",
  2365. " P - Ticket is Proxiable",
  2366. " p - Ticket is a Proxy",
  2367. " D - Ticket may be Postdated",
  2368. " d - Ticket has been Postdated",
  2369. " i - Ticket is Invalid",
  2370. " R - Ticket is Renewable",
  2371. " I - Ticket is the Initial Ticket",
  2372. " H - Ticket has been authenticated by Hardware",
  2373. " A - Ticket has been Pre-authenticated",
  2374. " ",
  2375. " /ENCRYPTION displays the encryption used by each ticket (if applicable):",
  2376. " DES-CBC-CRC",
  2377. " DES-CBC-MD4",
  2378. " DES-CBC-MD5",
  2379. " DES3-CBC-SHA",
  2380. ""
  2381. };
  2382. #endif /* CK_KERBEROS */
  2383. #ifndef NOCSETS
  2384. static char *hmxxassoc[] = {
  2385. "ASSOCIATE FILE-CHARACTER-SET <file-character-set> <transfer-character-set>",
  2386. " Tells C-Kermit that whenever the given file-character set is selected, and",
  2387. " SEND CHARACTER-SET (q.v.) is AUTOMATIC, the given transfer character-set",
  2388. " is selected automatically.",
  2389. " ",
  2390. "ASSOCIATE XFER-CHARACTER-SET <xfer-character-set> <file-character-set>",
  2391. " Tells C-Kermit that whenever the given transfer-character set is selected,",
  2392. " either by command or by an announcer attached to an incoming text file,",
  2393. " and SEND CHARACTER-SET is AUTOMATIC, the specified file character-set is",
  2394. " to be selected automatically. Synonym: ASSOCIATE TRANSFER-CHARACTER-SET.",
  2395. " ",
  2396. "Use SHOW ASSOCIATIONS to list the current character-set associations, and",
  2397. "SHOW CHARACTER-SETS to list the current settings.",
  2398. ""
  2399. };
  2400. #endif /* NOCSETS */
  2401. static char *hmxxpat[] = {
  2402. "A \"pattern\" is notation used in a search string when searching through",
  2403. "text. C-Kermit uses three kinds of patterns: floating patterns, anchored",
  2404. "patterns, and wildcards. Wildcards are anchored patterns that are used to",
  2405. "match file names; type HELP WILDCARD to learn about them.",
  2406. " ",
  2407. "In a pattern, certain characters are special:",
  2408. " ",
  2409. "* Matches any sequence of zero or more characters. For example, \"k*t\"",
  2410. " matches all strings that start with \"k\" and end with \"t\" including",
  2411. " \"kt\", \"kit\", \"knight\", or \"kermit\".",
  2412. " ",
  2413. #ifdef VMS
  2414. "% Matches any single character. For example, \"k%%%%t\" matches all strings",
  2415. #else
  2416. "? Matches any single character. For example, \"k????t\" matches all strings",
  2417. #endif /* VMS */
  2418. " that are exactly 6 characters long and start with \"k\" and end with",
  2419. #ifdef VMS
  2420. " with \"t\".",
  2421. #else
  2422. " with \"t\". When typing commands at the prompt, you must precede any",
  2423. " question mark to be used for matching by a backslash (\\) to override the",
  2424. " normal function of question mark in interactive commands, which is to",
  2425. " provide menus and file lists.",
  2426. #endif /* VMS */
  2427. " ",
  2428. #ifdef OS2ORUNIX
  2429. #ifdef CKREGEX
  2430. "[abc]",
  2431. " Square brackets enclosing a list of characters matches any character in",
  2432. " the list. Example: h[aou]t matches hat, hot, and hut.",
  2433. " ",
  2434. "[a-z]",
  2435. " Square brackets enclosing a range of characters matches any character in",
  2436. " the range; a hyphen (-) separates the low and high elements of the range.",
  2437. " For example, [a-z] matches any character from a to z.",
  2438. " ",
  2439. "[acdm-z]",
  2440. " Lists and ranges may be combined. This example matches a, c, d, or any",
  2441. " letter from m through z.",
  2442. " ",
  2443. "{string1,string2,...}",
  2444. " Braces enclose a list of strings to be matched. For example:",
  2445. " ker{mit,nel,beros} matches kermit, kernel, and kerberos. The strings",
  2446. " may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
  2447. #endif /* CKREGEX */
  2448. #endif /* OS2ORUNIX */
  2449. #ifndef NOSPL
  2450. " ",
  2451. "To force a special pattern character to be taken literally, precede it with",
  2452. "a backslash, e.g. [a\\-z] matches a, hyphen, or z rather than a through z.",
  2453. " ",
  2454. "A floating pattern can also include the following special characters:",
  2455. " ",
  2456. "^ (First character of pattern) Anchors the pattern at the beginning.",
  2457. "$ (Last character of pattern) Anchors the pattern at the end.",
  2458. " ",
  2459. "If a floating pattern does not start with \"^\", the pattern can match",
  2460. "anywhere in the string instead of only at the beginning; in other words, a",
  2461. "leading \"*\" is assumed. Similarly, if the pattern doesn't end with \"$\",",
  2462. "a trailing \"*\" is assumed.",
  2463. " ",
  2464. "The following commands and functions use floating patterns:",
  2465. " GREP [ <switches> ] <pattern> <filespec>",
  2466. " TYPE /MATCH:<pattern> <file>",
  2467. " \\farraylook(<pattern>,<arrayname>)",
  2468. " \\fsearch(<pattern>,<string>[,<offset>])",
  2469. " \\frsearch(<pattern>,<string>[,<offset>])",
  2470. " The /EXCEPT: clause in SEND, GET, DELETE, etc.",
  2471. " ",
  2472. "Example:",
  2473. " \\fsearch(abc,xxabcxxx) succeeds because xxabcxx contains abc.",
  2474. " \\fsearch(^abc,xxabcxx) fails because xxabcxx does not start with abc.",
  2475. " ",
  2476. "All other commands and functions use anchored patterns, meaning that ^ and $",
  2477. "are not treated specially, and * is not assumed at the beginning or end of",
  2478. "the pattern. This is true mainly of filename patterns (wildcards), since",
  2479. "you would not want a command like \"delete x\" to delete all files whose",
  2480. "names contained \"x\"!",
  2481. " ",
  2482. "You can use anchored patterns not only in filenames, but also in SWITCH",
  2483. "case labels, in the INPUT and MINPUT commands, and in file binary- and",
  2484. "text-patterns for filenames. The IF MATCH pattern is also anchored.",
  2485. #endif /* NOSPL */
  2486. "" };
  2487. static char *hmxxwild[] = {
  2488. "A \"wildcard\" is a notation used in a filename to match multiple files.",
  2489. "For example, in \"send *.txt\" the asterisk is a wildcard. Kermit commands",
  2490. "that accept filenames also accepts wildcards, except commands that are",
  2491. "allowed to operate on only one file, such as TRANSMIT.",
  2492. "This version of Kermit accepts the following wildcards:",
  2493. " ",
  2494. "* Matches any sequence of zero or more characters. For example, \"ck*.c\"",
  2495. " matches all files whose names start with \"ck\" and end with \".c\"",
  2496. " including \"ck.c\".",
  2497. " ",
  2498. #ifdef VMS
  2499. "% Matches any single character. For example, \"ck%.c\" matches all files",
  2500. #else
  2501. "? Matches any single character. For example, \"ck?.c\" matches all files",
  2502. #endif /* VMS */
  2503. " whose names are exactly 5 characters long and start with \"ck\" and end",
  2504. #ifdef VMS
  2505. " with \".c\".",
  2506. #else
  2507. " with \".c\". When typing commands at the prompt, you must precede any",
  2508. " question mark to be used for matching by a backslash (\\) to override the",
  2509. " normal function of question mark in interactive commands, which is to",
  2510. " provide menus and file lists. You don't, however, need to quote filename",
  2511. " question marks in command files (script programs).",
  2512. #endif /* VMS */
  2513. " ",
  2514. #ifdef OS2ORUNIX
  2515. #ifdef CKREGEX
  2516. "[abc]",
  2517. " Square brackets enclosing a list of characters matches any character in",
  2518. " the list. Example: ckuusr.[ch] matches ckuusr.c and ckuusr.h.",
  2519. " ",
  2520. "[a-z]",
  2521. " Square brackets enclosing a range of characters matches any character in",
  2522. " the range; a hyphen (-) separates the low and high elements of the range.",
  2523. " For example, [a-z] matches any character from a to z.",
  2524. " ",
  2525. "[acdm-z]",
  2526. " Lists and ranges may be combined. This example matches a, c, d, or any",
  2527. " letter from m through z.",
  2528. " ",
  2529. "{string1,string2,...}",
  2530. " Braces enclose a list of strings to be matched. For example:",
  2531. " ck{ufio,vcon,cmai}.c matches ckufio.c, ckvcon.c, or ckcmai.c. The strings",
  2532. " may themselves contain *, ?, [abc], [a-z], or other lists of strings.",
  2533. #endif /* CKREGEX */
  2534. #endif /* OS2ORUNIX */
  2535. " ",
  2536. "To force a special pattern character to be taken literally, precede it with",
  2537. "a backslash, e.g. [a\\-z] matches a, hyphen, or z rather than a through z.",
  2538. "Or tell Kermit to SET WILDCARD-EXPANSION OFF before entering or referring",
  2539. "to the filename.",
  2540. " ",
  2541. #ifndef NOSPL
  2542. "Similar notation can be used in general-purpose string matching. Type HELP",
  2543. "PATTERNS for details. Also see HELP SET MATCH.",
  2544. #endif /* NOSPL */
  2545. "" };
  2546. #ifndef NOXFER
  2547. static char *hmxxfast[] = {
  2548. "FAST, CAUTIOUS, and ROBUST are predefined macros that set several",
  2549. "file-transfer parameters at once to achieve the desired file-transfer goal.",
  2550. "FAST chooses a large packet size, a large window size, and a fair amount of",
  2551. "control-character unprefixing at the risk of possible failure on some",
  2552. "connections. FAST is the default tuning in C-Kermit 7.0 and later. In case",
  2553. "FAST file transfers fail for you on a particular connection, try CAUTIOUS.",
  2554. "If that fails too, try ROBUST. You can also change the definitions of each",
  2555. "macro with the DEFINE command. To see the current definitions, type",
  2556. "\"show macro fast\", \"show macro cautious\", or \"show macro robust\".",
  2557. ""
  2558. };
  2559. #endif /* NOXFER */
  2560. #ifdef VMS
  2561. static char * hmxxpurge[] = {
  2562. "Syntax: PURGE [ switches ] [ filespec ]",
  2563. " Runs the DCL PURGE command. Switches and filespec are not parsed or",
  2564. " verified by Kermit, but passed directly to DCL.",
  2565. ""
  2566. };
  2567. #else
  2568. #ifdef CKPURGE
  2569. static char * hmxxpurge[] = {
  2570. "Syntax: PURGE [ switches ] [ filespec ]",
  2571. " Deletes backup files; that is, files whose names end in \".~n~\", where",
  2572. " n is a number. PURGE by itself deletes all backup files in the current",
  2573. " directory. Switches:",
  2574. " ",
  2575. "/AFTER:date-time",
  2576. #ifdef VMS
  2577. " Specifies that only those files created after the given date-time are",
  2578. #else
  2579. " Specifies that only those files modified after the given date-time are",
  2580. #endif /* VMS */
  2581. " to be purged. HELP DATE for info about date-time formats.",
  2582. " ",
  2583. "/BEFORE:date-time",
  2584. #ifdef VMS
  2585. " Specifies that only those files modified before the given date-time",
  2586. #else
  2587. " Specifies that only those files modified before the given date-time",
  2588. #endif /* VMS */
  2589. " are to be purged.",
  2590. " ",
  2591. "/NOT-AFTER:date-time",
  2592. #ifdef VMS
  2593. " Specifies that only those files modified at or before the given date-time",
  2594. #else
  2595. " Specifies that only those files modified at or before the given date-time",
  2596. #endif /* VMS */
  2597. " are to be purged.",
  2598. " ",
  2599. "/NOT-BEFORE:date-time",
  2600. #ifdef VMS
  2601. " Specifies that only those files modified at or after the given date-time",
  2602. #else
  2603. " Specifies that only those files modified at or after the given date-time",
  2604. #endif /* VMS */
  2605. " are to be purged.",
  2606. " ",
  2607. "/LARGER-THAN:number",
  2608. " Specifies that only those files longer than the given number of bytes are",
  2609. " to be purged.",
  2610. " ",
  2611. "/SMALLER-THAN:number",
  2612. " Specifies that only those files smaller than the given number of bytes are",
  2613. " to be purged.",
  2614. " ",
  2615. "/EXCEPT:pattern",
  2616. " Specifies that any files whose names match the pattern, which can be a",
  2617. " regular filename or may contain wildcards, are not to be purged. To",
  2618. " specify multiple patterns (up to 8), use outer braces around the group",
  2619. " and inner braces around each pattern:",
  2620. " ",
  2621. " /EXCEPT:{{pattern1}{pattern2}...}",
  2622. " ",
  2623. #ifdef UNIXOROSK
  2624. "/DOTFILES",
  2625. " Include (purge) files whose names begin with \".\".",
  2626. " ",
  2627. "/NODOTFILES",
  2628. " Skip (don't purge) files whose names begin with \".\".",
  2629. " ",
  2630. #endif /* UNIXOROSK */
  2631. #ifdef RECURSIVE
  2632. "/RECURSIVE",
  2633. " Descends through the current or specified directory tree.",
  2634. " ",
  2635. #endif /* RECURSIVE */
  2636. "/KEEP:n",
  2637. " Retain the 'n' most recent (highest-numbered) backup files for each file.",
  2638. " By default, none are kept. If /KEEP is given without a number, 1 is used.",
  2639. " ",
  2640. "/LIST",
  2641. " Display each file as it is processed and say whether it is purged or kept.",
  2642. " Synonyms: /LOG, /VERBOSE.",
  2643. " ",
  2644. "/NOLIST",
  2645. " The PURGE command should operate silently (default).",
  2646. " Synonyms: /NOLOG, /QUIET.",
  2647. " ",
  2648. "/HEADING",
  2649. " Print heading and summary information.",
  2650. " ",
  2651. "/NOHEADING",
  2652. " Don't print heading and summary information.",
  2653. " ",
  2654. "/PAGE",
  2655. " When /LIST is in effect, pause at the end of each screenful, even if",
  2656. " COMMAND MORE-PROMPTING is OFF.",
  2657. " ",
  2658. "/NOPAGE",
  2659. " Don't pause, even if COMMAND MORE-PROMPTING is ON.",
  2660. " ",
  2661. "/ASK",
  2662. " Interactively ask permission to delete each backup file.",
  2663. " ",
  2664. "/NOASK",
  2665. " Purge backup files without asking permission.",
  2666. " ",
  2667. "/SIMULATE",
  2668. " Inhibits the actual deletion of files; use to preview which files would",
  2669. " actually be deleted. Implies /LIST.",
  2670. " ",
  2671. "Use SET OPTIONS PURGE [ switches ] to change defaults; use SHOW OPTIONS to",
  2672. "display customized defaults. Also see HELP DELETE, HELP WILDCARD.",
  2673. ""
  2674. };
  2675. #endif /* CKPURGE */
  2676. #endif /* VMS */
  2677. static char *hmxxclo[] = {
  2678. "Syntax: CLOSE [ item ]",
  2679. " Close the indicated item. The default item is CONNECTION, which is the",
  2680. " current SET LINE or SET HOST connection. The other items are:",
  2681. " ",
  2682. #ifdef CKLOGDIAL
  2683. " CX-LOG (connection log, opened with LOG CX)",
  2684. #endif /* CKLOGDIAL */
  2685. #ifndef NOLOCAL
  2686. " SESSION-LOG (opened with LOG SESSION)",
  2687. #endif /* NOLOCAL */
  2688. #ifdef TLOG
  2689. " TRANSACTION-LOG (opened with LOG TRANSACTIONS)",
  2690. #endif /* TLOG */
  2691. " PACKET-LOG (opened with LOG PACKETS)",
  2692. #ifdef DEBUG
  2693. " DEBUG-LOG (opened with LOG DEBUG)",
  2694. #endif /* DEBUG */
  2695. #ifndef NOSPL
  2696. " READ-FILE (opened with OPEN READ)",
  2697. " WRITE-FILE (opened with OPEN WRITE or OPEN APPEND)",
  2698. #endif /* NOSPL */
  2699. " ",
  2700. "Type HELP LOG and HELP OPEN for further info.",
  2701. ""
  2702. };
  2703. #ifdef CKLEARN
  2704. static char * hmxxlearn[] = {
  2705. "Syntax: LEARN [ /ON /OFF /CLOSE ] [ filename ]",
  2706. " Records a login script. If you give a filename, the file is opened for",
  2707. " subsequent recording. If you don't give any switches, /ON is assumed.",
  2708. " /ON enables recording to the current file (if any); /OFF disables",
  2709. " recording. /CLOSE closes the current file (if any). After LEARN /CLOSE",
  2710. " or exit from Kermit, your script is available for execution by the TAKE",
  2711. " command.",
  2712. ""
  2713. };
  2714. #endif /* CKLEARN */
  2715. #ifdef CK_MINPUT
  2716. static char *hmxxminp[] = {
  2717. "Syntax: MINPUT [ switches ] n [ string1 [ string2 [ ... ] ] ]",
  2718. "Example: MINPUT 5 Login: {Username: } {NO CARRIER} BUSY RING",
  2719. " For use in script programs. Waits up to n seconds for any one of the",
  2720. " strings to arrive on the communication device. If no strings are given,",
  2721. " the command waits for any character at all to arrive. Strings are",
  2722. " separated by spaces; use {braces} or \"doublequotes\" for grouping. If",
  2723. " any of the strings is encountered within the timeout interval, the command",
  2724. " succeeds and the \\v(minput) variable is set to the number of the string",
  2725. " that was matched: 1, 2, 3, etc. If none of the strings arrives, the",
  2726. " command times out, fails, and \\v(minput) is set to 0. In all other",
  2727. " respects, MINPUT is like INPUT. See HELP INPUT for the available switches",
  2728. " and other details of operation.",
  2729. "" };
  2730. #endif /* CK_MINPUT */
  2731. #ifndef NOLOCAL
  2732. static char *hmxxcon[] = {
  2733. "Syntax: CONNECT (or C, or CQ) [ switches ]",
  2734. " Connect to a remote computer via the serial communications device given in",
  2735. #ifdef OS2
  2736. " the most recent SET PORT command, or to the network host named in the most",
  2737. #else
  2738. " the most recent SET LINE command, or to the network host named in the most",
  2739. #endif /* OS2 */
  2740. " recent SET HOST command. Type the escape character followed by C to get",
  2741. " back to the C-Kermit prompt, or followed by ? for a list of CONNECT-mode",
  2742. #ifdef OS2
  2743. " escape commands. You can also assign the \\Kexit verb to the key or",
  2744. " key-combination of your choice; by default it is assigned to Alt-x.",
  2745. #else
  2746. " escape commands.",
  2747. " ",
  2748. "Include the /QUIETLY switch to suppress the informational message that",
  2749. "tells you how to escape back, etc. CQ is a synonym for CONNECT /QUIETLY.",
  2750. #endif /* OS2 */
  2751. " ",
  2752. "Other switches include:",
  2753. #ifdef CK_TRIGGER
  2754. " ",
  2755. "/TRIGGER:string",
  2756. " One or more strings to look for that will cause automatic return to",
  2757. " command mode. To specify one string, just put it right after the",
  2758. " colon, e.g. \"/TRIGGER:Goodbye\". If the string contains any spaces, you",
  2759. " must enclose it in braces, e.g. \"/TRIGGER:{READY TO SEND...}\". To",
  2760. " specify more than one trigger, use the following format:",
  2761. " ",
  2762. " /TRIGGER:{{string1}{string2}...{stringn}}",
  2763. " ",
  2764. " Upon return from CONNECT mode, the variable \\v(trigger) is set to the",
  2765. " trigger string, if any, that was actually encountered. This value, like",
  2766. " all other CONNECT switches applies only to the CONNECT command with which",
  2767. " it is given, and overrides (temporarily) any global SET TERMINAL TRIGGER",
  2768. " string that might be in effect.",
  2769. #endif /* CK_TRIGGER */
  2770. #ifdef OS2
  2771. " ",
  2772. "/IDLE-LIMIT:number",
  2773. " The number of seconds of idle time, after which Kermit returns",
  2774. " automatically to command mode; default 0 (no limit).",
  2775. " ",
  2776. "/IDLE-INTERVAL:number",
  2777. " The number of seconds of idle time, after which Kermit automatically",
  2778. " transmits the idle string.",
  2779. " ",
  2780. "/IDLE-STRING:string",
  2781. " The string to transmit whenever the idle interval has passed.",
  2782. " ",
  2783. "/TIME-LIMIT:number",
  2784. " The maximum number of seconds for which the CONNECT session may last.",
  2785. " The default is 0 (no limit). If a nonzero number is given, Kermit returns",
  2786. " automatically to command mode after this many seconds.",
  2787. #endif /* OS2 */
  2788. "" };
  2789. #endif /* NOLOCAL */
  2790. static char *hmxxmget[] = {
  2791. "Syntax: MGET [ switches... ] remote-filespec [ remote-filespec ... ]",
  2792. " ",
  2793. "Just like GET (q.v.) except allows a list of remote file specifications,",
  2794. "separated by spaces.",
  2795. ""
  2796. };
  2797. static char *hmxxget[] = {
  2798. "Syntax: GET [ switches... ] remote-filespec [ as-name ]",
  2799. " Tells the other Kermit, which must be in (or support autoswitching into)",
  2800. " server mode, to send the named file or files. If the remote-filespec or",
  2801. " the as-name contain spaces, they must be enclosed in braces. If as-name",
  2802. " is the name of an existing local directory, incoming files are placed in",
  2803. " that directory; if it is the name of directory that does not exist, Kermit",
  2804. " tries to create it. Optional switches include:",
  2805. " ",
  2806. "/AS-NAME:text",
  2807. " Specifies \"text\" as the name to store the incoming file under, or",
  2808. " directory to store it in. You can also specify the as-name as the second",
  2809. " filename on the GET command line.",
  2810. " ",
  2811. "/BINARY",
  2812. " Performs this transfer in binary mode without affecting the global",
  2813. " transfer mode.",
  2814. " ",
  2815. "/COMMAND",
  2816. " Receives the file into the standard input of a command, rather than saving",
  2817. " it on disk. The /AS-NAME or the second \"filename\" on the GET command",
  2818. " line is interpreted as the name of a command.",
  2819. " ",
  2820. "/DELETE",
  2821. " Asks the other Kermit to delete the file (or each file in the group)",
  2822. " after it has been transferred successfully.",
  2823. " ",
  2824. "/EXCEPT:pattern",
  2825. " Specifies that any files whose names match the pattern, which can be a",
  2826. " regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
  2827. " are to be refused. To specify multiple patterns (up to 8), use outer",
  2828. " braces around the group, and inner braces around each pattern:",
  2829. " ",
  2830. " /EXCEPT:{{pattern1}{pattern2}...}",
  2831. " ",
  2832. "/FILENAMES:{CONVERTED,LITERAL}",
  2833. " Overrides the global SET FILE NAMES setting for this transfer only.",
  2834. " ",
  2835. "/FILTER:command",
  2836. " Causes the incoming file to passed through the given command (standard",
  2837. " input/output filter) before being written to disk.",
  2838. " ",
  2839. #ifdef VMS
  2840. "/IMAGE",
  2841. " Transfer in image mode.",
  2842. " ",
  2843. #endif /* VMS */
  2844. #ifdef CK_LABELED
  2845. "/LABELED",
  2846. " VMS and OS/2 only: Specifies labeled transfer mode.",
  2847. " ",
  2848. #endif /* CK_LABELED */
  2849. "/MOVE-TO:directory-name",
  2850. " Specifies that each file that arrives should be moved to the specified",
  2851. " directory after, and only if, it has been received successfully.",
  2852. " ",
  2853. "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
  2854. " Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
  2855. " ",
  2856. "/PIPES:{ON,OFF}",
  2857. " Overrides the TRANSFER PIPES setting for this command only. ON allows",
  2858. " reception of files with names like \"!tar xf -\" to be automatically",
  2859. " directed to a pipeline.",
  2860. " ",
  2861. "/QUIET",
  2862. " When sending in local mode, this suppresses the file-transfer display.",
  2863. " ",
  2864. "/RECOVER",
  2865. " Used to recover from a previously interrupted transfer; GET /RECOVER",
  2866. " is equivalent REGET. Works only in binary mode.",
  2867. " ",
  2868. "/RECURSIVE",
  2869. " Tells the server to descend through the directory tree when locating",
  2870. " the files to be sent.",
  2871. " ",
  2872. "/RENAME-TO:string",
  2873. " Specifies that each file that arrives should be renamed as specified",
  2874. " after, and only if, it has been received successfully. The string should",
  2875. " normally contain variables like \\v(filename) or \\v(filenum).",
  2876. " ",
  2877. "/TEXT",
  2878. " Performs this transfer in text mode without affecting the global",
  2879. " transfer mode.",
  2880. " ",
  2881. "/TRANSPARENT",
  2882. " Inhibits character-set translation of incoming text files for the duration",
  2883. " of the GET command without affecting subsequent commands.",
  2884. " ",
  2885. "Also see HELP MGET, HELP SEND, HELP RECEIVE, HELP SERVER, HELP REMOTE.",
  2886. ""};
  2887. static char *hmxxlg[] = {
  2888. "Syntax: LOG (or L) log-type [ filename [ { NEW, APPEND } ] ]",
  2889. " ",
  2890. "Record information in a log file:",
  2891. " ",
  2892. #ifdef CKLOGDIAL
  2893. "CX",
  2894. " Connections made with SET LINE, SET PORT, SET HOST, DIAL, TELNET, etc.",
  2895. " The default filename is CX.LOG in your home directory and APPEND is the",
  2896. " default mode for opening.",
  2897. " ",
  2898. #endif /* CKLOGDIAL */
  2899. #ifdef DEBUG
  2900. "DEBUG",
  2901. " Debugging information, to help track down bugs in the C-Kermit program.",
  2902. " The default log name is debug.log in current directory.",
  2903. " ",
  2904. #endif /* DEBUG */
  2905. "PACKETS",
  2906. " Kermit packets, to help with protocol problems. The default filename is",
  2907. " packet.log in current directory.",
  2908. " ",
  2909. #ifndef NOLOCAL
  2910. "SESSION",
  2911. " Records your CONNECT session (default: session.log in current directory).",
  2912. " ",
  2913. #endif /* NOLOCAL */
  2914. #ifdef TLOG
  2915. "TRANSACTIONS",
  2916. " Names and statistics about files transferred (default: transact.log in",
  2917. " current directory; see HELP SET TRANSACTION-LOG for transaction-log format",
  2918. " options.)",
  2919. " ",
  2920. #endif /* TLOG */
  2921. "If you include the APPEND keyword after the filename, the existing log file,",
  2922. "if any, is appended to; otherwise a new file is created (except APPEND is",
  2923. "the default for the connection log). Use CLOSE <keyword> to stop logging.",
  2924. #ifdef OS2ORUNIX
  2925. " ",
  2926. "Note: The filename can also be a pipe, e.g.:",
  2927. " ",
  2928. " log transactions |lpr",
  2929. " log debug {| grep \"^TELNET\" > debug.log}",
  2930. " ",
  2931. "Braces are required if the pipeline or filename contains spaces.",
  2932. #endif /* OS2ORUNIX */
  2933. "" };
  2934. #ifndef NOSCRIPT
  2935. static char *hmxxlogi[] = { "\
  2936. Syntax: SCRIPT text",
  2937. " A limited and cryptic \"login assistant\", carried over from old C-Kermit",
  2938. " releases for comptability, but not recommended for use. Instead, please",
  2939. " use the full script programming language described in chapters 17-19 of",
  2940. " \"Using C-Kermit\".",
  2941. " ",
  2942. " Login to a remote system using the text provided. The login script",
  2943. " is intended to operate similarly to UNIX uucp \"L.sys\" entries.",
  2944. " A login script is a sequence of the form:",
  2945. " ",
  2946. " expect send [expect send] . . .",
  2947. " ",
  2948. " where 'expect' is a prompt or message to be issued by the remote site, and",
  2949. " 'send' is the names, numbers, etc, to return. The send may also be the",
  2950. " keyword EOT to send Control-D, or BREAK (or \\\\b) to send a break signal.",
  2951. " Letters in send may be prefixed by ~ to send special characters:",
  2952. " ",
  2953. " ~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
  2954. " append a return, and ~o[o[o]] for octal of a character. As with some",
  2955. " UUCP systems, sent strings are followed by ~r unless they end with ~c.",
  2956. " ",
  2957. " Only the last 7 characters in each expect are matched. A null expect,",
  2958. " e.g. ~0 or two adjacent dashes, causes a short delay. If you expect",
  2959. " that a sequence might not arrive, as with uucp, conditional sequences",
  2960. " may be expressed in the form:",
  2961. " ",
  2962. " -send-expect[-send-expect[...]]",
  2963. " ",
  2964. " where dashed sequences are followed as long as previous expects fail.",
  2965. "" };
  2966. #endif /* NOSCRIPT */
  2967. #ifndef NOFRILLS
  2968. static char * hmxxtyp[] = {
  2969. "Syntax: TYPE [ switches... ] file",
  2970. " Displays a file on the screen. Pauses automatically at end of each",
  2971. " screenful if COMMAND MORE-PROMPTING is ON. Optional switches:",
  2972. " ",
  2973. " /PAGE",
  2974. " Pause at the end of each screenful even if COMMAND MORE-PROMPTING OFF.",
  2975. " Synonym: /MORE",
  2976. " /NOPAGE",
  2977. " Don't pause at the end of each screen even if COMMAND MORE-PROMPTING ON."
  2978. ,
  2979. " /HEAD:n",
  2980. " Only type the first 'n' lines of the file.",
  2981. " /TAIL:n",
  2982. " Only type the last 'n' lines of the file.",
  2983. " /MATCH:pattern",
  2984. " Only type lines that match the given pattern. HELP WILDCARDS for info",
  2985. " info about patterns. /HEAD and /TAIL apply after /MATCH.",
  2986. " /PREFIX:string",
  2987. " Print the given string at the beginning of each line.",
  2988. " /NUMBER",
  2989. " Add line numbers (conflicts with /PREFIX)",
  2990. " /WIDTH:number",
  2991. " Truncate each line at the given column number before printing.",
  2992. #ifdef KUI
  2993. " Or when combined with /GUI specifies the width of the dialog box.",
  2994. " /HEIGHT:number",
  2995. " When combined with /GUI specifies the height of the dialog box.",
  2996. " /GUI:string",
  2997. " Specifies the title to use for the dialog box.",
  2998. #endif /* KUI */
  2999. " /COUNT",
  3000. " Count lines (and matches) and print the count(s) but not the lines.",
  3001. #ifdef UNICODE
  3002. " /CHARACTER-SET:name",
  3003. " Translates from the named character set.",
  3004. #ifndef OS2
  3005. " /TRANSLATE-TO:name",
  3006. " Translates to the named character set (default = current file charset).",
  3007. #endif /* OS2 */
  3008. " /TRANSPARENT",
  3009. " Inhibits character-set translation.",
  3010. #endif /* UNICODE */
  3011. " /OUTPUT:name",
  3012. " Sends results to the given file. If this switch is omitted, the",
  3013. " results appear on your screen. This switch overrides any express or",
  3014. " implied /PAGE switch.",
  3015. " ",
  3016. "You can use SET OPTIONS TYPE to set the defaults for /PAGE or /NOPAGE and",
  3017. "/WIDTH. Use SHOW OPTIONS to see current TYPE options.",
  3018. ""
  3019. };
  3020. static char * hmxxcle[] = {
  3021. "Syntax: CLEAR [ item-name ]",
  3022. " ",
  3023. "Clears the named item. If no item is named, DEVICE-AND-INPUT is assumed.",
  3024. " ",
  3025. " ALARM Clears any pending alarm (see SET ALARM).",
  3026. #ifdef CK_APC
  3027. " APC-STATUS Clears Application Program Command status.",
  3028. #endif /* CK_APC */
  3029. #ifdef PATTERNS
  3030. " BINARY-PATTERNS Clears the file binary-patterns list.",
  3031. #endif /* PATTERNS */
  3032. #ifdef OS2
  3033. " COMMAND-SCREEN Clears the current command screen.",
  3034. #endif /* OS2 */
  3035. " DEVICE Clears the current port or network input buffer.",
  3036. " DEVICE-AND-INPUT Clears both the device and the INPUT buffer.",
  3037. " DIAL-STATUS Clears the \\v(dialstatus) variable.",
  3038. " \
  3039. INPUT Clears the INPUT-command buffer and the \\v(input) variable.",
  3040. " KEYBOARD-BUFFER Clears the command terminal keyboard input buffer.",
  3041. #ifdef OS2
  3042. " \
  3043. SCROLLBACK empties the scrollback buffer including the current screen.",
  3044. #endif /* OS2 */
  3045. " SEND-LIST Clears the current SEND list (see ADD).",
  3046. #ifdef OS2
  3047. " \
  3048. TERMINAL-SCREEN Clears the current screen a places it into the scrollback.",
  3049. " buffer.",
  3050. #endif /* OS2 */
  3051. #ifdef PATTERNS
  3052. " TEXT-PATTERNS Clears the file text-patterns list.",
  3053. #endif /* PATTERNS */
  3054. ""};
  3055. #endif /* NOFRILLS */
  3056. static char * hmxxdate[] = {
  3057. "Syntax: DATE [ date-time [ timezone ] ] [ delta-time ]",
  3058. " Prints a date-time in standard format: yyyymmdd_hh:mm:ss.",
  3059. " Various date-time formats are accepted:",
  3060. " ",
  3061. " . The date, if given, must precede the time.",
  3062. " . The year must be four digits or else a 2-digit format dd mmm yy,",
  3063. " in which case if (yy < 50) yyyy = yy + 2000; else yyyy = yy + 1900.",
  3064. " . If the year comes first, the second field is the month.",
  3065. " . The day, month, and year may be separated by spaces, /, -, or underscore."
  3066. ," . The date and time may be separated by spaces or underscore.",
  3067. " . The month may be numeric (1 = January) or spelled out or abbreviated in",
  3068. " English.",
  3069. " . The time may be in 24-hour format or 12-hour format.",
  3070. " . If the hour is 12 or less, AM is assumed unless AM or PM is included.",
  3071. " . If the date is omitted but a time is given, the current date is supplied."
  3072. ,
  3073. " . If the time is given but date omitted, 00:00:00 is supplied.",
  3074. " . If both the date and time are omitted, the current date and time are",
  3075. " supplied.",
  3076. " ",
  3077. " The following shortcuts can also be used in place of dates:",
  3078. " ",
  3079. " NOW",
  3080. " Stands for the current date and time.",
  3081. " ",
  3082. " TODAY",
  3083. " Today's date, optionally followed by a time; 00:00:00 if no time given.",
  3084. " ",
  3085. " YESTERDAY",
  3086. " Yesterday's date, optionally followed by a time (default 00:00:00).",
  3087. " ",
  3088. " TOMORROW",
  3089. " Tomorrows's date, optionally followed by a time (default 00:00:00).",
  3090. " ",
  3091. " Timezone specifications are similar to those used in e-mail and HTTP",
  3092. " headers, either a USA timezone name, e.g. EST, or a signed four-digit",
  3093. " timezone offset, {+,-}hhmm, e.g., -0500; it is used to convert date-time,"
  3094. ,
  3095. " a local time in that timezone, to GMT which is then converted to the",
  3096. " local time at the host. If no timezone is given, the date-time is local."
  3097. ," To convert local time (or a time in a specified timezone) to UTC (GMT),",
  3098. " use the function \futcdate().",
  3099. " ",
  3100. " Delta times are given as {+,-}[number date-units][hh[:mm[:ss]]]",
  3101. " A date in the future/past relative to the date-time; date-units may be",
  3102. " DAYS, WEEKS, MONTHS, YEARS: +3days, -7weeks, +3:00, +1month 8:00.",
  3103. " ",
  3104. "All the formats shown above are acceptable as arguments to date-time switches"
  3105. ,
  3106. "such as /AFTER: or /BEFORE:, and to functions such as \\fcvtdate(),",
  3107. "\\fdiffdate(), and \\futcdate(), that take date-time strings as arguments.",
  3108. ""
  3109. };
  3110. #ifndef NOXFER
  3111. static char * hmxxsen[] = {
  3112. "Syntax: SEND (or S) [ switches...] [ filespec [ as-name ] ]",
  3113. " Sends the file or files specified by filespec. If the filespec is omitted",
  3114. " the SEND-LIST is used (HELP ADD for more info). The filespec may contain",
  3115. " wildcard characters. An 'as-name' may be given to specify the name(s)",
  3116. " the files(s) are sent under; if the as-name is omitted, each file is",
  3117. " sent under its own name. Also see HELP MSEND, HELP WILDCARD.",
  3118. " Optional switches include:",
  3119. " ",
  3120. #ifndef NOSPL
  3121. "/ARRAY:<arrayname>",
  3122. " Specifies that the data to be sent comes from the given array, such as",
  3123. " \\&a[]. A range may be specified, e.g. SEND /ARRAY:&a[100:199]. Leave",
  3124. " the brackets empty or omit them altogether to send the whole 1-based array."
  3125. ,
  3126. " Include /TEXT to have Kermit supply a line terminator at the end of each",
  3127. " array element (and translate character sets if character-set translations",
  3128. " are set up), or /BINARY to treat the array as one long string of characters"
  3129. ,
  3130. " to be sent as-is. If an as-name is not specified, the array is sent with",
  3131. " the name _ARRAY_X_, where \"X\" is replaced by actual array letter.",
  3132. " ",
  3133. #endif /* NOSPL */
  3134. "/AS-NAME:<text>",
  3135. " Specifies <text> as the name to send the file under instead of its real",
  3136. " name. This is equivalent to giving an as-name after the filespec.",
  3137. " ",
  3138. "/BINARY",
  3139. " Performs this transfer in binary mode without affecting the global",
  3140. " transfer mode.",
  3141. " ",
  3142. "/TEXT",
  3143. " Performs this transfer in text mode without affecting the global",
  3144. " transfer mode.",
  3145. " ",
  3146. "/TRANSPARENT",
  3147. " Inhibits character-set translation for text files for the duration of",
  3148. " the SEND command without affecting subsequent commands.",
  3149. " ",
  3150. "/NOBACKUPFILES",
  3151. " Skip (don't send) Kermit or EMACS backup files (files with names that",
  3152. " end with .~n~, where n is a number).",
  3153. " ",
  3154. #ifdef UNIXOROSK
  3155. "/DOTFILES",
  3156. " Include (send) files whose names begin with \".\".",
  3157. " ",
  3158. "/NODOTFILES",
  3159. " Don't send files whose names begin with \".\".",
  3160. " ",
  3161. "/FOLLOWLINKS",
  3162. " Send files that are pointed to by symbolic links.",
  3163. " ",
  3164. "/NOFOLLOWLINKS",
  3165. " Skip over symbolic links (default).",
  3166. " ",
  3167. #endif /* UNIXOROSK */
  3168. #ifdef VMS
  3169. "/IMAGE",
  3170. " Performs this transfer in image mode without affecting the global",
  3171. " transfer mode.",
  3172. " ",
  3173. #endif /* VMS */
  3174. #ifdef CK_LABELED
  3175. "/LABELED",
  3176. " Performs this transfer in labeled mode without affecting the global",
  3177. " transfer mode.",
  3178. " ",
  3179. #endif /* CK_LABELED */
  3180. "/COMMAND",
  3181. " Sends the output from a command, rather than the contents of a file.",
  3182. " The first \"filename\" on the SEND command line is interpreted as the name",
  3183. " of a command; the second (if any) is the as-name.",
  3184. " ",
  3185. "/FILENAMES:{CONVERTED,LITERAL}",
  3186. " Overrides the global SET FILE NAMES setting for this transfer only.",
  3187. " ",
  3188. "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE}",
  3189. " Overrides the global SET SEND PATHNAMES setting for this transfer.",
  3190. " ",
  3191. "/FILTER:command",
  3192. " Specifies a command \
  3193. (standard input/output filter) to pass the file through",
  3194. " before sending it.",
  3195. " ",
  3196. "/DELETE",
  3197. " Deletes the file (or each file in the group) after it has been sent",
  3198. " successfully (applies only to real files).",
  3199. " ",
  3200. "/QUIET",
  3201. " When sending in local mode, this suppresses the file-transfer display.",
  3202. " ",
  3203. "/RECOVER",
  3204. " Used to recover from a previously interrupted transfer; SEND /RECOVER",
  3205. " is equivalent RESEND (use in binary mode only).",
  3206. " ",
  3207. "/RECURSIVE",
  3208. " Tells C-Kermit to look not only in the given or current directory for",
  3209. " files that match the filespec, but also in all its subdirectories, and",
  3210. " all their subdirectories, etc.",
  3211. " ",
  3212. "/RENAME-TO:name",
  3213. " Tells C-Kermit to rename each source file that is sent successfully to",
  3214. " the given name (usually you should include \\v(filename) in the new name,",
  3215. " which is replaced by the original filename.",
  3216. " ",
  3217. "/MOVE-TO:directory",
  3218. " Tells C-Kermit to move each source file that is sent successfully to",
  3219. " the given directory.",
  3220. " ",
  3221. "/STARTING:number",
  3222. " Starts sending the file from the given byte position.",
  3223. " SEND /STARTING:n filename is equivalent to PSEND filename n.",
  3224. " ",
  3225. "/SUBJECT:text",
  3226. " Specifies the subject of an email message, to be used with /MAIL. If the",
  3227. " text contains spaces, it must be enclosed in braces.",
  3228. " ",
  3229. "/MAIL:address",
  3230. " Sends the file as e-mail to the given address; use with /SUBJECT:.",
  3231. " ",
  3232. "/PRINT:options",
  3233. " Sends the file to be printed, with optional options for the printer.",
  3234. " ",
  3235. #ifdef CK_XYZ
  3236. "/PROTOCOL:name",
  3237. " Uses the given protocol to send the file (Kermit, Zmodem, etc) for this",
  3238. " transfer without changing global protocol.",
  3239. " ",
  3240. #endif /* CK_XYZ */
  3241. "/AFTER:date-time",
  3242. #ifdef VMS
  3243. " Specifies that only those files created after the given date-time are",
  3244. #else
  3245. " Specifies that only those files modified after the given date-time are",
  3246. #endif /* VMS */
  3247. " to be sent. HELP DATE for info about date-time formats.",
  3248. " ",
  3249. "/BEFORE:date-time",
  3250. #ifdef VMS
  3251. " Specifies that only those files modified before the given date-time",
  3252. #else
  3253. " Specifies that only those files modified before the given date-time",
  3254. #endif /* VMS */
  3255. " are to be sent.",
  3256. " ",
  3257. "/NOT-AFTER:date-time",
  3258. #ifdef VMS
  3259. " Specifies that only those files modified at or before the given date-time",
  3260. #else
  3261. " Specifies that only those files modified at or before the given date-time",
  3262. #endif /* VMS */
  3263. " are to be sent.",
  3264. " ",
  3265. "/NOT-BEFORE:date-time",
  3266. #ifdef VMS
  3267. " Specifies that only those files modified at or after the given date-time",
  3268. #else
  3269. " Specifies that only those files modified at or after the given date-time",
  3270. #endif /* VMS */
  3271. " are to be sent.",
  3272. " ",
  3273. "/LARGER-THAN:number",
  3274. " Specifies that only those files longer than the given number of bytes are",
  3275. " to be sent.",
  3276. " ",
  3277. "/SMALLER-THAN:number",
  3278. " Specifies that only those files smaller than the given number of bytes are",
  3279. " to be sent.",
  3280. " ",
  3281. "/EXCEPT:pattern",
  3282. " Specifies that any files whose names match the pattern, which can be a",
  3283. " regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
  3284. " are not to be sent. To specify multiple patterns (up to 8), use outer",
  3285. " braces around the group, and inner braces around each pattern:",
  3286. " ",
  3287. " /EXCEPT:{{pattern1}{pattern2}...}",
  3288. " ",
  3289. "/TYPE:{ALL,TEXT,BINARY}",
  3290. " Send only files of the given type (see SET FILE SCAN).",
  3291. " ",
  3292. "/LISTFILE:filename",
  3293. " Specifies the name of a file that contains the list of names of files",
  3294. " that are to be sent. The filenames should be listed one name per line",
  3295. " in this file (but a name can contain wildcards).",
  3296. " ",
  3297. "Also see HELP RECEIVE, HELP GET, HELP SERVER, HELP REMOTE.",
  3298. ""};
  3299. static char *hmxxrc[] = {
  3300. "Syntax: RECEIVE (or R) [ switches... ] [ as-name ]",
  3301. " Wait for a file to arrive from the other Kermit, which must be given a",
  3302. " SEND command. If the optional as-name is given, the incoming file or",
  3303. " files are stored under that name, otherwise it will be stored under",
  3304. #ifndef CK_TMPDIR
  3305. " the name it arrives with.",
  3306. #else
  3307. #ifdef OS2
  3308. " the name it arrives with. If the filespec denotes a disk and/or",
  3309. " directory, the incoming file or files will be stored there.",
  3310. #else
  3311. " the name it arrives with. If the filespec denotes a directory, the",
  3312. " incoming file or files will be placed in that directory.",
  3313. #endif /* OS2 */
  3314. #endif /* CK_TMPDIR */
  3315. " ",
  3316. "Optional switches include:",
  3317. " ",
  3318. "/AS-NAME:text",
  3319. " Specifies \"text\" as the name to store the incoming file under.",
  3320. " You can also specify the as-name as a filename on the command line.",
  3321. " ",
  3322. "/BINARY",
  3323. " Skips text-mode conversions unless the incoming file arrives with binary",
  3324. " attribute",
  3325. " ",
  3326. "/COMMAND",
  3327. " Receives the file into the standard input of a command, rather than saving",
  3328. " it on disk. The /AS-NAME or the \"filename\" on the RECEIVE command line",
  3329. " is interpreted as the name of a command.",
  3330. " ",
  3331. "/EXCEPT:pattern",
  3332. " Specifies that any files whose names match the pattern, which can be a",
  3333. " regular filename, or may contain \"*\" and/or \"?\" metacharacters,",
  3334. " are to be refused. To specify multiple patterns (up to 8), use outer",
  3335. " braces around the group, and inner braces around each pattern:",
  3336. " ",
  3337. " /EXCEPT:{{pattern1}{pattern2}...}",
  3338. " ",
  3339. "/FILENAMES:{CONVERTED,LITERAL}",
  3340. " Overrides the global SET FILE NAMES setting for this transfer only.",
  3341. " ",
  3342. "/FILTER:command",
  3343. " Causes the incoming file to passed through the given command (standard",
  3344. " input/output filter) before being written to disk.",
  3345. " ",
  3346. #ifdef VMS
  3347. "/IMAGE",
  3348. " Receives the file in image mode.",
  3349. " ",
  3350. #endif /* VMS */
  3351. #ifdef CK_LABELED
  3352. "/LABELED",
  3353. " Specifies labeled transfer mode.",
  3354. " ",
  3355. #endif /* CK_LABELED */
  3356. "/MOVE-TO:directory-name",
  3357. " Specifies that each file that arrives should be moved to the specified",
  3358. " directory after, and only if, it has been received successfully.",
  3359. " ",
  3360. "/PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}",
  3361. " Overrides the global SET RECEIVE PATHNAMES setting for this transfer.",
  3362. " ",
  3363. "/PIPES:{ON,OFF}",
  3364. " Overrides the TRANSFER PIPES setting for this command only. ON allows",
  3365. " reception of files with names like \"!tar xf -\" to be automatically",
  3366. " directed to a pipeline.",
  3367. " ",
  3368. "/PROTOCOL:name",
  3369. " Use the given protocol to receive the incoming file(s).",
  3370. " ",
  3371. "/QUIET",
  3372. " When sending in local mode, this suppresses the file-transfer display.",
  3373. " ",
  3374. "/RECURSIVE",
  3375. " Equivalent to /PATHNAMES:RELATIVE.",
  3376. " ",
  3377. "/RENAME-TO:string",
  3378. " Specifies that each file that arrives should be renamed as specified",
  3379. " after, and only if, it has been received successfully. The string should",
  3380. " normally contain variables like \\v(filename) or \\v(filenum).",
  3381. " ",
  3382. "/TEXT",
  3383. " Forces text-mode conversions unless the incoming file has the binary",
  3384. " attribute",
  3385. " ",
  3386. "/TRANSPARENT",
  3387. " Inhibits character-set translation of incoming text files for the duration",
  3388. " of the RECEIVE command without affecting subsequent commands.",
  3389. " ",
  3390. "Also see HELP SEND, HELP GET, HELP SERVER, HELP REMOTE.",
  3391. "" };
  3392. #ifndef NORESEND
  3393. static char *hmxxrsen = "\
  3394. Syntax: RESEND filespec [name]\n\n\
  3395. Resends the file or files, whose previous transfer was interrupted.\n\
  3396. Picks up from where previous transfer left off, IF the receiver kept the\n\
  3397. partially received file. Works only for binary-mode transfers.\n\
  3398. Requires file-transfer partner to support recovery. Synonym: REPUT.";
  3399. static char *hmxxrget = "\
  3400. Syntax: REGET filespec\n\n\
  3401. Ask a server to RESEND a file to C-Kermit.";
  3402. static char *hmxxpsen = "\
  3403. Syntax: PSEND filespec position [name]\n\n\
  3404. Just like SEND, except sends the file starting at the given byte position.";
  3405. #endif /* NORESEND */
  3406. #ifndef NOMSEND
  3407. static char *hmxxmse[] = {
  3408. "Syntax: MSEND [ switches... ] filespec [ filespec [ ... ] ]",
  3409. " Sends the files specified by the filespecs. One or more filespecs may be",
  3410. " listed, separated by spaces. Any or all filespecs may contain wildcards",
  3411. " and they may be in different directories. Alternative names cannot be",
  3412. " given. Switches include /BINARY /DELETE /MAIL /PROTOCOL /QUIET /RECOVER",
  3413. " /TEXT /TYPE; see HELP SEND for descriptions.",
  3414. ""
  3415. };
  3416. #endif /* NOMSEND */
  3417. static char *hmxxadd[] = {
  3418. #ifndef NOMSEND
  3419. "ADD SEND-LIST filespec [ <mode> [ <as-name> ] ]",
  3420. " Adds the specified file or files to the current SEND list. Use SHOW",
  3421. " SEND-LIST and CLEAR SEND-LIST to display and clear the list; use SEND",
  3422. " by itself to send the files from it.",
  3423. " ",
  3424. #endif /* NOMSEND */
  3425. #ifdef PATTERNS
  3426. "ADD BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
  3427. " Adds the pattern(s), if any, to the SET FILE BINARY-PATTERNS list.",
  3428. " ",
  3429. "ADD TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
  3430. " Adds the pattern(s), if any, to the SET FILE TEXT-PATTERNS list.",
  3431. " Use SHOW PATTERNS to see the lists. See HELP SET FILE for further info.",
  3432. #endif /* PATTERNS */
  3433. ""};
  3434. static char *hmxxremv[] = {
  3435. #ifdef PATTERNS
  3436. "REMOVE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
  3437. " Removes the pattern(s), if any, from the SET FILE BINARY-PATTERNS list",
  3438. " ",
  3439. "REMOVE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
  3440. " Removes the given patterns from the SET FILE TEXT-PATTERNS list.",
  3441. " Use SHOW PATTERNS to see the lists. See HELP SET FILE for further info.",
  3442. #endif /* PATTERNS */
  3443. ""};
  3444. #endif /* NOXFER */
  3445. #ifndef NOSERVER
  3446. static char *hmxxser = "Syntax: SERVER\n\
  3447. Enter server mode on the current connection. All further commands\n\
  3448. are taken in packet form from the other Kermit program. Use FINISH,\n\
  3449. BYE, or REMOTE EXIT to get C-Kermit out of server mode.";
  3450. #endif /* NOSERVER */
  3451. static char *hmhset[] = {
  3452. " The SET command establishes communication, file, scripting, or other",
  3453. " parameters. The SHOW command can be used to display the values of",
  3454. " SET parameters. Help is available for each individual parameter;",
  3455. " type HELP SET ? to see what's available.",
  3456. "" };
  3457. #ifndef NOSETKEY
  3458. static char *hmhskey[] = {
  3459. "Syntax: SET KEY k text",
  3460. "Or: SET KEY CLEAR",
  3461. " Configure the key whose \"scan code\" is k to send the given text when",
  3462. " pressed during CONNECT mode. SET KEY CLEAR restores all the default",
  3463. " key mappings. If there is no text, the default key binding is restored",
  3464. #ifndef NOCSETS
  3465. " for the key k. SET KEY mappings take place before terminal character-set",
  3466. " translation.",
  3467. #else
  3468. " the key k.",
  3469. #endif /* NOCSETS */
  3470. #ifdef OS2
  3471. " ",
  3472. " The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
  3473. " keypad, function, or editing keys, etc. For a list of available keyboard",
  3474. " verbs, type SHOW KVERBS.",
  3475. #endif /* OS2 */
  3476. " ",
  3477. " To find out the scan code and mapping for a particular key, use the",
  3478. " SHOW KEY command.",
  3479. ""};
  3480. #endif /* NOSETKEY */
  3481. static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK number",
  3482. " ",
  3483. "Type of block check to be used for error detection on file-transfer",
  3484. "packets: 1, 2, 3, 4, or 5. This command must be given to the file",
  3485. "sender prior to the transfer.",
  3486. " ",
  3487. "Type 1 is standard and supported by all Kermit protocol implementations,",
  3488. " but it's only a 6-bit checksum, represented in a single printable ASCII",
  3489. " character. It's fine for reliable connections (error-correcting modems,",
  3490. " TCP/IP, etc) but type 3 is recommended for connections where errors can",
  3491. " occur.",
  3492. " ",
  3493. "Type 2 is a 12-bit checksum represented in two printable characters.",
  3494. " ",
  3495. "Type 3 is a 16-bit cyclic redundancy check, the strongest error",
  3496. " detection method supported by Kermit protocol, represented in three",
  3497. " printable characters.",
  3498. " ",
  3499. "Type 4 (alias \"BLANK-FREE-2\") is a 12-bit checksum guaranteed to",
  3500. " contain no blanks in its representation; this is needed for connections",
  3501. " where trailing blanks are stripped from incoming lines of text.",
  3502. " ",
  3503. "Type 5 (alias \"FORCE-3\") means to force a Type 3 block check on",
  3504. " every packet, including the first packet, which normally has a type 1",
  3505. " block check. This is for use in critical applications on noisy",
  3506. " connections. As with types 2, 3, and 4, if the Kermit file",
  3507. " transfer partner does not support this type, the transfer fails",
  3508. " immediately at the beginning of the transfer.",
  3509. "" };
  3510. static char * hmxydeb[] = {
  3511. "Syntax: SET DEBUG { SESSION, ON, OFF, TIMESTAMP, MESSAGES }",
  3512. " ",
  3513. "SET DEBUG ON",
  3514. #ifdef DEBUG
  3515. " Opens a debug log file named debug.log in the current directory.",
  3516. " Use LOG DEBUG if you want specify a different log file name or path.",
  3517. #else
  3518. " (Has no effect in this version of Kermit.)",
  3519. #endif /* DEBUG */
  3520. " ",
  3521. "SET DEBUG OFF",
  3522. " Stops debug logging and session debugging.",
  3523. " ",
  3524. "SET DEBUG SESSION",
  3525. #ifndef NOLOCAL
  3526. " Displays control and 8-bit characters symbolically during CONNECT mode.",
  3527. " Equivalent to SET TERMINAL DEBUG ON.",
  3528. #else
  3529. " (Has no effect in this version of Kermit.)",
  3530. #endif /* NOLOCAL */
  3531. " ",
  3532. "SET DEBUG TIMESTAMP { ON, OFF }",
  3533. " Enables/Disables timestamps on debug log entries.",
  3534. " ",
  3535. "SET DEBUG MESSAGES { ON, OFF, STDERR } [C-Kermit 9.0]",
  3536. " Enables/Disables messages printed by the DEBUG command.",
  3537. " SET DEBUG OFF causes DEBUG messages not to be printed.",
  3538. " SET DEBUG ON sends DEBUG messages to standard output (stdout);",
  3539. " SET DEBUG STDERR sends DEBUG messages to standard error (stderr);",
  3540. "" };
  3541. #ifdef CK_SPEED
  3542. static char *hmxyqctl[] = {
  3543. "Syntax: SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }",
  3544. " ",
  3545. " <code> is the numeric ASCII code for a control character 1-31,127-159,255."
  3546. ,
  3547. " The word \"ALL\" means all characters in this range.",
  3548. " ",
  3549. " PREFIXED <code> means the given control character must be converted to a",
  3550. " printable character and prefixed, the default for all control characters.",
  3551. " ",
  3552. " UNPREFIXED <code> means you think it is safe to send the given control",
  3553. " character as-is, without a prefix. USE THIS OPTION AT YOUR OWN RISK!",
  3554. " ",
  3555. " SHOW CONTROL to see current settings. SET CONTROL PREFIXED ALL is",
  3556. " recommended for safety. You can include multiple <code> values in one",
  3557. " command, separated by spaces.",
  3558. "" };
  3559. #endif /* CK_SPEED */
  3560. #ifndef NODIAL
  3561. static char *hxymodm[] = {
  3562. "Syntax: SET MODEM <parameter> <value> ...",
  3563. " ",
  3564. "Note: Many of the SET MODEM parameters are configured automatically when",
  3565. "you SET MODEM TYPE, according to the modem's capabilities. SHOW MODEM to",
  3566. "see them. Also see HELP DIAL and HELP SET DIAL.",
  3567. " ",
  3568. "SET MODEM TYPE <name>",
  3569. " Tells Kermit which kind of modem you have, so it can issue the",
  3570. " appropriate modem-specific commands for configuration, dialing, and",
  3571. " hanging up. For a list of the modem types known to Kermit, type \"set",
  3572. " modem type ?\". The default modem type is GENERIC, which should work",
  3573. " with any AT command-set modem that is configured for error correction,",
  3574. " data compression, and hardware flow control. Use SET MODEM TYPE NONE",
  3575. " for direct serial, connections. Use SET MODEM TYPE USER-DEFINED to use",
  3576. " a type of modem that is not built in to Kermit, and then use SET MODEM",
  3577. " CAPABILITIES, SET MODEM, DIAL-COMMAND, and SET MODEM COMMAND to tell",
  3578. " Kermit how to configure and control it.",
  3579. " ",
  3580. "SET MODEM CAPABILITIES <list>",
  3581. " Use this command for changing Kermit's idea of your modem's capabilities,",
  3582. " for example, if your modem is supposed to have built-in error correction",
  3583. " but in fact does not. Also use this command to define the capabilities",
  3584. " of a USER-DEFINED modem. Capabilities are:",
  3585. " ",
  3586. " AT AT-commands",
  3587. " DC data-compression",
  3588. " EC error-correction",
  3589. " HWFC hardware-flow",
  3590. " ITU v25bis-commands",
  3591. " SWFC software-flow",
  3592. " KS kermit-spoof",
  3593. " SB speed-buffering",
  3594. " TB Telebit",
  3595. " ",
  3596. "SET MODEM CARRIER-WATCH { AUTO, ON, OFF }",
  3597. " Synonym for SET CARRIER-WATCH (q.v.)",
  3598. " ",
  3599. "SET MODEM COMPRESSION { ON, OFF }",
  3600. " Enables/disables the modem's data compression feature, if any.",
  3601. " ",
  3602. "SET MODEM DIAL-COMMAND <text>",
  3603. " The text replaces Kermit's built-in modem dialing command. It must",
  3604. " include '%s' (percent s) as a place-holder for the telephone numbers",
  3605. " given in your DIAL commands.",
  3606. " ",
  3607. "SET MODEM ERROR-CORRECTION { ON, OFF }",
  3608. " Enables/disables the modem's error-correction feature, if any.",
  3609. " ",
  3610. "SET MODEM ESCAPE-CHARACTER number",
  3611. " Numeric ASCII value of modem's escape character, e.g. 43 for '+'.",
  3612. " For Hayes-compatible modems, Kermit uses three copies, e.g. \"+++\".",
  3613. " ",
  3614. "SET MODEM FLOW-CONTROL {AUTO, NONE, RTS/CTS, XON/XOFF}",
  3615. " Selects the type of local flow control to be used by the modem.",
  3616. " ",
  3617. "SET MODEM HANGUP-METHOD { MODEM-COMMAND, RS232-SIGNAL, DTR }",
  3618. " How hangup operations should be done. MODEM-COMMAND means try to",
  3619. " escape back to the modem's command processor and give a modem-specific",
  3620. " hangup command. RS232-SIGNAL means turn off the DTR signal. DTR is a",
  3621. " synonym for RS232-SIGNAL.",
  3622. " ",
  3623. "SET MODEM KERMIT-SPOOF {ON, OFF}",
  3624. " If the selected modem type supports the Kermit protocol directly,",
  3625. " use this command to turn its Kermit protocol function on or off.",
  3626. " ",
  3627. "SET MODEM MAXIMUM-SPEED <number>",
  3628. " Specify the maximum interface speed for the modem.",
  3629. " ",
  3630. "SET MODEM NAME <text>",
  3631. " Descriptive name for a USER-DEFINED modem.",
  3632. " ",
  3633. "SET MODEM SPEAKER {ON, OFF}",
  3634. " Turns the modem's speaker on or off during dialing.",
  3635. " ",
  3636. "SET MODEM SPEED-MATCHING {ON, OFF}",
  3637. " ON means that C-Kermit changes its serial interface speed to agree with",
  3638. " the speed reported by the modem's CONNECT message, if any. OFF means",
  3639. " Kermit should not change its interface speed.",
  3640. " ",
  3641. "SET MODEM VOLUME {LOW, MEDIUM, HIGH}",
  3642. " Selects the desired modem speaker volume for when the speaker is ON.",
  3643. " ",
  3644. "SET MODEM COMMAND commands are used to override built-in modem commands for",
  3645. "each modem type, or to fill in commands for the USER-DEFINED modem type.",
  3646. "Omitting the optional [ text ] restores the built-in modem-specific command,",
  3647. "if any:",
  3648. " ",
  3649. "SET MODEM COMMAND AUTOANSWER {ON, OFF} [ text ]",
  3650. " Modem commands to turn autoanswer on and off.",
  3651. " ",
  3652. "SET MODEM COMMAND COMPRESSION {ON, OFF} [ text ]",
  3653. " Modem commands to turn data compression on and off.",
  3654. " ",
  3655. "SET MODEM COMMAND ERROR-CORRECTION {ON, OFF} [ text ]",
  3656. " Modem commands to turn error correction on and off.",
  3657. " ",
  3658. "SET MODEM COMMAND HANGUP [ text ]",
  3659. " Command that tells the modem to hang up the connection.",
  3660. " ",
  3661. "SET MODEM COMMAND IGNORE-DIALTONE [ text ]",
  3662. " Command that tells the modem not to wait for dialtone before dialing.",
  3663. " ",
  3664. "SET MODEM COMMAND INIT-STRING [ text ]",
  3665. " The 'text' is a replacement for C-Kermit's built-in initialization command",
  3666. " for the modem.",
  3667. " ",
  3668. "SET MODEM COMMAND PREDIAL-INIT [ text ]",
  3669. " A second INIT-STRING that is to be sent to the modem just prior to \
  3670. dialing.",
  3671. " ",
  3672. "SET MODEM COMMAND HARDWARE-FLOW [ text ]",
  3673. " Modem command to enable hardware flow control (RTS/CTS) in the modem.",
  3674. " ",
  3675. "SET MODEM COMMAND SOFTWARE-FLOW [ text ]",
  3676. " Modem command to enable local software flow control (Xon/Xoff) in modem.",
  3677. " ",
  3678. "SET MODEM COMMAND SPEAKER { ON, OFF } [ text ]",
  3679. " Modem command to turn the modem's speaker on or off.",
  3680. " ",
  3681. "SET MODEM COMMAND NO-FLOW-CONTROL [ text ]",
  3682. " Modem command to disable local flow control in the modem.",
  3683. " ",
  3684. "SET MODEM COMMAND PULSE [ text ]",
  3685. " Modem command to select pulse dialing.",
  3686. " ",
  3687. "SET MODEM COMMAND TONE [ text ]",
  3688. " Modem command to select tone dialing.",
  3689. " ",
  3690. "SET MODEM COMMAND VOLUME { LOW, MEDIUM, HIGH } [ text ]",
  3691. " Modem command to set the modem's speaker volume.",
  3692. ""};
  3693. static char *hmxydial[] = {
  3694. "The SET DIAL command establishes or changes all parameters related to",
  3695. "dialing the telephone. Also see HELP DIAL and HELP SET MODEM. Use SHOW",
  3696. "DIAL to display all of the SET DIAL values.",
  3697. " ",
  3698. "SET DIAL COUNTRY-CODE <number>",
  3699. " Tells Kermit the telephonic country-code of the country you are dialing",
  3700. " from, so it can tell whether a portable-format phone number from your",
  3701. " dialing directory will result in a national or an international call.",
  3702. " Examples: 1 for USA, Canada, Puerto Rico, etc; 7 for Russia, 39 for Italy,",
  3703. " 351 for Portugal, 47 for Norway, 44 for the UK, 972 for Israel, 81 for",
  3704. " Japan, ...",
  3705. " ",
  3706. " If you have not already set your DIAL INTL-PREFIX and LD-PREFIX, then this",
  3707. " command sets default values for them: 011 and 1, respectively, for country",
  3708. " code 1; 00 and 0, respectively, for all other country codes. If these are",
  3709. " not your true international and long-distance dialing prefixes, then you",
  3710. " should follow this command by DIAL INTL-PREFIX and LD-PREFIX to let Kermit",
  3711. " know what they really are.",
  3712. " ",
  3713. "SET DIAL AREA-CODE [ <number> ]",
  3714. " Tells Kermit the area or city code that you are dialing from, so it can",
  3715. " tell whether a portable-format phone number from the dialing directory is",
  3716. " local or long distance. Be careful not to include your long-distance",
  3717. " dialing prefix as part of your area code; for example, the area code for",
  3718. " central London is 171, not 0171.",
  3719. " ",
  3720. "SET DIAL CONFIRMATION {ON, OFF}",
  3721. " Kermit does various transformations on a telephone number retrieved from",
  3722. " the dialing directory prior to dialing (use LOOKUP <name> to see them).",
  3723. " In case the result might be wrong, you can use SET DIAL CONFIRM ON to have",
  3724. " Kermit ask you if it is OK to dial the number, and if not, to let you type",
  3725. " in a replacement.",
  3726. " ",
  3727. "SET DIAL CONNECT { AUTO, ON, OFF }",
  3728. " Whether to CONNECT (enter terminal mode) automatically after successfully",
  3729. " dialing. ON means to do this; OFF means not to. AUTO (the default) means",
  3730. " do it if the DIAL command was given interactively, but don't do it if the",
  3731. " DIAL command was issued from a macro or command file. If you specify ON",
  3732. " or AUTO, you may follow this by one of the keywords VERBOSE or QUIET, to",
  3733. " indicate whether the verbose 4-line 'Connecting...' message is to be",
  3734. " displayed if DIAL succeeds and Kermit goes into CONNECT mode.",
  3735. " ",
  3736. "SET DIAL CONVERT-DIRECTORY {ASK, ON, OFF}",
  3737. " The format of Kermit's dialing directory changed in version 5A(192). This",
  3738. " command tells Kermit what to do when it encounters an old-style directory:",
  3739. " ASK you whether to convert it, or convert it automatically (ON), or leave",
  3740. " it alone (OFF). Old-style directories can still be used without",
  3741. " conversion, but the parity and speed fields are ignored.",
  3742. " ",
  3743. "SET DIAL DIRECTORY [ filename [ filename [ filename [ ... ] ] ] ]",
  3744. " The name(s) of your dialing directory file(s). If you do not supply any",
  3745. " filenames, the dialing directory feature is disabled and all numbers are",
  3746. " dialed literally as given in the DIAL command. If you supply more than",
  3747. " one directory, all of them are searched.",
  3748. " ",
  3749. "SET DIAL SORT {ON, OFF}",
  3750. " When multiple entries are obtained from your dialing directory, they are",
  3751. " sorted in \"cheapest-first\" order. If this does not produce the desired",
  3752. " effect, SET DIAL SORT OFF to disable sorting, and the numbers will be",
  3753. " dialed in the order in which they were found.",
  3754. " ",
  3755. "SET DIAL DISPLAY {ON, OFF}",
  3756. " Whether to display dialing progress on the screen; default is OFF.",
  3757. " ",
  3758. "SET DIAL HANGUP {ON, OFF}",
  3759. " Whether to hang up the phone prior to dialing; default is ON.",
  3760. " ",
  3761. "SET DIAL IGNORE-DIALTONE {ON, OFF}",
  3762. " Whether to ignore dialtone when dialing; default is OFF.",
  3763. " ",
  3764. #ifndef NOSPL
  3765. "SET DIAL MACRO [ name ]",
  3766. " Specify the name of a macro to execute on every phone number dialed, just",
  3767. " prior to dialing it, in order to perform any last-minute alterations.",
  3768. " ",
  3769. #endif /* NOSPL */
  3770. "SET DIAL METHOD {AUTO, DEFAULT, TONE, PULSE}",
  3771. " Whether to use the modem's DEFAULT dialing method, or to force TONE or",
  3772. " PULSE dialing. AUTO (the default) means to choose tone or pulse dialing",
  3773. " based on the country code. (Also see SET DIAL TONE-COUNTRIES and SET DIAL",
  3774. " PULSE-COUNTRIES.)",
  3775. " ",
  3776. "SET DIAL PACING number",
  3777. " How many milliseconds to pause between sending each character to the modem",
  3778. " dialer. The default is -1, meaning to use the number from the built-in",
  3779. " modem database.",
  3780. " ",
  3781. "SET DIAL PULSE-COUNTRIES [ cc [ cc [ ... ] ] ]",
  3782. " Sets the list of countries in which pulse dialing is required. Each cc",
  3783. " is a country code.",
  3784. " ",
  3785. "SET DIAL TEST { ON, OFF }",
  3786. " OFF for normal dialing. Set to ON to test dialing procedures without",
  3787. " actually dialing.",
  3788. " ",
  3789. "SET DIAL TONE-COUNTRIES [ cc [ cc [ ... ] ] ]",
  3790. " Sets the list of countries in which tone dialing is available. Each cc",
  3791. " is a country code.",
  3792. " ",
  3793. "SET DIAL TIMEOUT number",
  3794. " How many seconds to wait for a dialed call to complete. Use this command",
  3795. " to override the DIAL command's automatic timeout calculation. A value",
  3796. " of 0 turns off this feature and returns to Kermit's automatic dial",
  3797. " timeout calculation.",
  3798. " ",
  3799. "SET DIAL RESTRICT { INTERNATIONAL, LOCAL, LONG-DISTANCE, NONE }",
  3800. " Prevents placing calls of the type indicated, or greater. For example",
  3801. " SET DIAL RESTRICT LONG prevents placing of long-distance and international",
  3802. " calls. If this command is not given, there are no restrictions. Useful",
  3803. " when dialing a list of numbers fetched from a dialing directory.",
  3804. " ",
  3805. "SET DIAL RETRIES <number>",
  3806. " How many times to redial each number if the dialing result is busy or no",
  3807. " no answer, until the call is successfully answered. The default is 0",
  3808. " because automatic redialing is illegal in some countries.",
  3809. " ",
  3810. "SET DIAL INTERVAL <number>",
  3811. " How many seconds to pause between automatic redial attempts; default 10.",
  3812. " ",
  3813. "The following commands apply to all phone numbers, whether given literally",
  3814. "or found in the dialing directory:",
  3815. " ",
  3816. "SET DIAL PREFIX [ text ]",
  3817. " Establish a prefix to be applied to all phone numbers that are dialed,",
  3818. " for example to disable call waiting.",
  3819. " ",
  3820. "SET DIAL SUFFIX [ text ]",
  3821. " Establish a suffix to be added after all phone numbers that are dialed.",
  3822. " ",
  3823. "The following commands apply only to portable-format numbers obtained from",
  3824. "the dialing directory; i.e. numbers that start with a \"+\" sign and",
  3825. "country code, followed by area code in parentheses, followed by the phone",
  3826. "number.",
  3827. " ",
  3828. "SET DIAL LC-AREA-CODES [ <list> ]",
  3829. " Species a list of area codes to which dialing is local, i.e. does not",
  3830. " require the LD-PREFIX. Up to 32 area codes may be listed, separated by",
  3831. " spaces. Any area codes in this list will be included in the final dial",
  3832. " string so do not include your own area code if it should not be dialed.",
  3833. " ",
  3834. "SET DIAL LC-PREFIX [ <text> ]",
  3835. " Specifies a prefix to be applied to local calls made from portable dialing",
  3836. " directory entries. Normally no prefix is used for local calls.",
  3837. " ",
  3838. "SET DIAL LC-SUFFIX [ <text> ]",
  3839. " Specifies a suffix to be applied to local calls made from portable dialing",
  3840. " directory entries. Normally no suffix is used for local calls.",
  3841. " ",
  3842. "SET DIAL LD-PREFIX [ <text> ]",
  3843. " Your long-distance dialing prefix, to be used with portable dialing",
  3844. " directory entries that result in long-distance calls.",
  3845. " ",
  3846. "SET DIAL LD-SUFFIX [ <text> ]",
  3847. " Long-distance dialing suffix, if any, to be used with portable dialing",
  3848. " directory entries that result in long-distance calls. This would normally",
  3849. " be used for appending a calling-card number to the phone number.",
  3850. " ",
  3851. "SET DIAL FORCE-LONG-DISTANCE { ON, OFF }",
  3852. " Whether to force long-distance dialing for calls that normally would be",
  3853. " local. For use (e.g.) in France.",
  3854. " ",
  3855. "SET DIAL TOLL-FREE-AREA-CODE [ <number> [ <number> [ ... ] ] ]",
  3856. " Tells Kermit the toll-free area code(s) in your country.",
  3857. " ",
  3858. "SET DIAL TOLL-FREE-PREFIX [ <text> ]",
  3859. " You toll-free dialing prefix, in case it is different from your long-",
  3860. " distance dialing prefix.",
  3861. " ",
  3862. "SET DIAL INTL-PREFIX <text>",
  3863. " Your international dialing prefix, to be used with portable dialing",
  3864. " directory entries that result in international calls.",
  3865. " ",
  3866. "SET DIAL INTL-SUFFIX <text>",
  3867. " International dialing suffix, if any, to be used with portable dialing",
  3868. " directory entries that result in international calls.",
  3869. " ",
  3870. "SET DIAL PBX-OUTSIDE-PREFIX <text>",
  3871. " Use this to tell Kermit how to get an outside line when dialing from a",
  3872. " Private Branch Exchange (PBX).",
  3873. " ",
  3874. "SET DIAL PBX-EXCHANGE <text> [ <text> [ ... ] ]",
  3875. " If PBX-OUTSIDE-PREFIX is set, then you can use this command to tell Kermit",
  3876. " the leading digits of one or more local phone numbers that identify it as",
  3877. " being on your PBX, so it can make an internal call by deleting those digits"
  3878. ,
  3879. " from the phone number.",
  3880. " ",
  3881. "SET DIAL PBX-INTERNAL-PREFIX <text>",
  3882. " If PBX-EXCHANGE is set, and Kermit determines from it that a call is",
  3883. " internal, then this prefix, if any, is added to the number prior to",
  3884. " \
  3885. dialing. Use this if internal calls from your PBX require a special prefix.",
  3886. "" };
  3887. #endif /* NODIAL */
  3888. static char *hmxyflo[] = { "Syntax: SET FLOW [ switch ] value",
  3889. " ",
  3890. #ifndef NOLOCAL
  3891. " Selects the type of flow control to use during file transfer, terminal",
  3892. " connection, and script execution.",
  3893. #else
  3894. " Selects the type of flow control to use during file transfer.",
  3895. #endif /* NOLOCAL */
  3896. " ",
  3897. " Switches let you associate a particular kind of flow control with each",
  3898. " kind of connection: /REMOTE, /MODEM, /DIRECT-SERIAL, /TCPIP, etc; type",
  3899. " \"set flow ?\" for a list of available switches. Then whenever you make",
  3900. " a connection, the associated flow-control is chosen automatically.",
  3901. " The flow-control values are NONE, KEEP, XON/XOFF, and possibly RTS/CTS",
  3902. " and some others; again, type \"set flow ?\" for a list. KEEP tells Kermit",
  3903. " not to try to change the current flow-control method for the connection.",
  3904. " ",
  3905. " If you omit the switch and simply supply a value, this value becomes the",
  3906. " current flow control type, overriding any default value that might have",
  3907. " been chosen in your most recent SET LINE, SET PORT, or SET HOST, or other",
  3908. " connection-establishment command.",
  3909. " ",
  3910. " Type SHOW FLOW-CONTROL to see the current defaults for each connection type"
  3911. ,
  3912. " as well as the current connection type and flow-control setting. SHOW",
  3913. " COMMUNICATIONS also shows the current flow-control setting.",
  3914. ""};
  3915. static char *hmxyf[] = {
  3916. "Syntax: SET FILE parameter value",
  3917. " ",
  3918. "Sets file-related parameters. Use SHOW FILE to view them. Also see SET",
  3919. "(and SHOW) TRANSFER and PROTOCOL.",
  3920. " ",
  3921. #ifdef VMS
  3922. "SET FILE TYPE { TEXT, BINARY, IMAGE, LABELED }",
  3923. #else
  3924. #ifdef STRATUS
  3925. "SET FILE TYPE { TEXT, BINARY, LABELED }",
  3926. #else
  3927. #ifdef MAC
  3928. "SET FILE TYPE { TEXT, BINARY, MACBINARY }",
  3929. #else
  3930. "SET FILE TYPE { TEXT, BINARY }",
  3931. #endif /* STRATUS */
  3932. #endif /* MAC */
  3933. #endif /* VMS */
  3934. " How file contents are to be treated during file transfer in the absence",
  3935. " of any other indication. TYPE can be TEXT for conversion of record format",
  3936. " and character set, which is usually needed when transferring text files",
  3937. " between unlike platforms (such as UNIX and Windows), or BINARY for no",
  3938. " conversion if TRANSFER MODE is MANUAL, which is not the default. Use",
  3939. " BINARY with TRANSFER MODE MANUAL for executable programs or binary data or",
  3940. " whenever you wish to duplicate the original contents of the file, byte for"
  3941. ,
  3942. " byte. In most modern Kermit programs, the file sender informs the receiver"
  3943. ,
  3944. " of the file type automatically. However, when sending files from C-Kermit",
  3945. " to an ancient or non-Columbia Kermit implementation, you might need to set",
  3946. " the corresponding file type at the receiver as well.",
  3947. " ",
  3948. #ifdef VMS
  3949. " FILE TYPE settings of TEXT and BINARY have no effect when sending files,",
  3950. " since VMS C-Kermit determines each file's type automatically from its",
  3951. " record format: binary for fixed, text for others. For incoming files,",
  3952. " these settings are effective only in the absence of a file-type indication",
  3953. " from the sender.",
  3954. " ",
  3955. " You may include an optional record-format after the word BINARY. This may",
  3956. " be FIXED (the default) or UNDEFINED. UNDEFINED is used when you need to",
  3957. " receive binary files in binary mode and have them stored with UNDEFINED",
  3958. " record format, which is required by certain VMS applications.",
  3959. " ",
  3960. " Two additional VMS file types are also supported: IMAGE and LABELED.",
  3961. " IMAGE means raw block i/o, no interference from RMS, applies to file",
  3962. " transmission only, and overrides the normal automatica file type",
  3963. " determination. LABELED means to send or interpret RMS attributes",
  3964. " with the file.",
  3965. " ",
  3966. #else
  3967. " When TRANSFER MODE is AUTOMATIC (as it is by default), various automatic",
  3968. " methods (depending on the platform) are used to determine whether a file",
  3969. " is transferred in text or binary mode; these methods (which might include",
  3970. " content scan (see SET FILE SCAN below), filename pattern matching (SET FILE"
  3971. ,
  3972. " PATTERNS), client/server \"kindred-spirit\" recognition, or source file",
  3973. " record format) supersede the FILE TYPE setting but can, themselves, be",
  3974. " superseded by including a /BINARY or /TEXT switch in the SEND, GET, or",
  3975. " RECEIVE command.",
  3976. " ",
  3977. " When TRANSFER MODE is MANUAL, the automatic methods are skipped for sending"
  3978. ,
  3979. " files; the FILE TYPE setting is used instead, which can be superseded on",
  3980. " a per-command basis with a /TEXT or /BINARY switch.",
  3981. #endif /* VMS */
  3982. " ",
  3983. #ifndef NOXFER
  3984. "SET FILE BYTESIZE { 7, 8 }",
  3985. " Normally 8. If 7, Kermit truncates the 8th bit of all file bytes.",
  3986. " ",
  3987. #ifndef NOCSETS
  3988. "SET FILE CHARACTER-SET name",
  3989. " Tells the encoding of the local file, ASCII by default.",
  3990. " The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
  3991. " national character sets. LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
  3992. " for Western European languages.",
  3993. " NEXT is the 8-bit character set of the NeXT workstation.",
  3994. " The CPnnn sets are for PCs. MACINTOSH-LATIN is for the Macintosh.",
  3995. #ifndef NOLATIN2
  3996. " LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
  3997. " Roman letters. Mazovia is a PC code page used in Poland.",
  3998. #endif /* NOLATIN2 */
  3999. #ifdef CYRILLIC
  4000. " KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
  4001. " SHORT-KOI is a 7-bit ASCII coding for Cyrillic. BULGARIA-PC is a PC code",
  4002. " page used in Bulgaria",
  4003. #endif /* CYRILLIC */
  4004. #ifdef HEBREW
  4005. " HEBREW-ISO is ISO 8859-8 Latin/Hebrew. CP862 is the Hebrew PC code page.",
  4006. " HEBREW-7 is like ASCII with the lowercase letters replaced by Hebrew.",
  4007. #endif /* HEBREW */
  4008. #ifdef GREEK
  4009. " GREEK-ISO is ISO 8859-7 Latin/Greek. CP869 is the Greek PC code page.",
  4010. " ELOT-927 is like ASCII with the lowercase letters replaced by Greek.",
  4011. #endif /* GREEK */
  4012. #ifdef KANJI
  4013. " JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
  4014. " Kanji character sets.",
  4015. #endif /* KANJI */
  4016. #ifdef UNICODE
  4017. " UCS-2 is the 2-byte form of the Universal Character Set.",
  4018. " UTF-8 is the serialized form of the Universal Character Set.",
  4019. #endif /* UNICODE */
  4020. " Type SET FILE CHAR ? for a complete list of file character sets.",
  4021. " ",
  4022. "SET FILE DEFAULT 7BIT-CHARACTER-SET",
  4023. " When automatically switching among different kinds of files while sending",
  4024. " this tells the character set to be used for 7-bit text files.",
  4025. " ",
  4026. "SET FILE DEFAULT 8BIT-CHARACTER-SET",
  4027. " This tells the character set to be used for 8-bit text files when",
  4028. " switching automatically among different kinds of files.",
  4029. " ",
  4030. #endif /* NOCSETS */
  4031. "SET FILE COLLISION option",
  4032. " Tells what to do when a file arrives that has the same name as",
  4033. " an existing file. The options are:",
  4034. " BACKUP (default) - Rename the old file to a new, unique name and store",
  4035. " the incoming file under the name it was sent with.",
  4036. " OVERWRITE - Overwrite (replace) the existing file; doesn't work for",
  4037. " a Kermit server unless you also tell it to ENABLE DELETE.",
  4038. " APPEND - Append the incoming file to the end of the existing file.",
  4039. " REJECT - Refuse and/or discard the incoming file (= DISCARD).",
  4040. " RENAME - Give the incoming file a unique name.",
  4041. " UPDATE - Accept the incoming file only if newer than the existing file.",
  4042. " ",
  4043. "SET FILE DESTINATION { DISK, PRINTER, SCREEN, NOWHERE }",
  4044. " DISK (default): Store incoming files on disk.",
  4045. " PRINTER: Send incoming files to SET PRINTER device.",
  4046. " SCREEN: Display incoming files on screen (local mode only).",
  4047. " NOWHERE: Do not put incoming files anywhere (use for calibration).",
  4048. " ",
  4049. "SET FILE DISPLAY option",
  4050. " Selects the format of the file transfer display for local-mode file",
  4051. " transfer. The choices are:",
  4052. " ",
  4053. " BRIEF A line per file, showing size, mode, status, and throughput.",
  4054. " SERIAL One dot is printed for every K bytes transferred.",
  4055. " CRT Numbers are continuously updated on a single screen line.",
  4056. " This format can be used on any video display terminal.",
  4057. #ifdef CK_CURSES
  4058. " FULLSCREEN A fully formatted 24x80 screen showing lots of information.",
  4059. " This requires a terminal or terminal emulator.",
  4060. #endif /* CK_CURSES */
  4061. " NONE No file transfer display at all.",
  4062. " ",
  4063. "SET FILE DOWNLOAD-DIRECTORY [ <directory-name> ]",
  4064. " The directory into which all received files should be placed. By default,",
  4065. " received files go into your current directory.",
  4066. " ",
  4067. #endif /* NOXFER */
  4068. #ifdef CK_CTRLZ
  4069. "SET FILE EOF { CTRL-Z, LENGTH }",
  4070. " End-Of-File detection method, normally LENGTH. Applies only to text-mode",
  4071. " transfers. When set to CTRL-Z, this makes the file sender treat the first",
  4072. " Ctrl-Z in the input file as the end of file (EOF), and it makes the file",
  4073. " receiver tack a Ctrl-Z onto the end of the output file if it does not",
  4074. " already end with Ctrl-Z.",
  4075. " ",
  4076. #endif /* CK_CTRLZ */
  4077. "SET FILE END-OF-LINE { CR, CRLF, LF }",
  4078. " Use this command to specify nonstandard line terminators for text files.",
  4079. " ",
  4080. #ifndef NOXFER
  4081. "SET FILE INCOMPLETE { AUTO, KEEP, DISCARD }",
  4082. " What to do with an incompletely received file: KEEP, DISCARD, or AUTO.",
  4083. " AUTO (the default) means DISCARD if transfer is in text mode, KEEP if it",
  4084. " is in binary mode.",
  4085. " ",
  4086. #ifdef VMS
  4087. "SET FILE LABEL { ACL, BACKUP-DATE, NAME, OWNER, PATH } { ON, OFF }",
  4088. " Tells which items to include (ON) or exclude (OFF) in labeled file",
  4089. " transfers",
  4090. " ",
  4091. #else
  4092. #ifdef OS2
  4093. "SET FILE LABEL { ARCHIVE, READ-ONLY, HIDDEN, SYSTEM, EXTENDED } { ON, OFF }",
  4094. " Tells which items to include (ON) or exclude (OFF) in labeled file",
  4095. " transfers.",
  4096. " ",
  4097. #endif /* OS2 */
  4098. #endif /* VMS */
  4099. #ifdef UNIX
  4100. #ifdef DYNAMIC
  4101. "SET FILE LISTSIZE number",
  4102. " Changes the size of the internal wildcard expansion list. Use SHOW FILE",
  4103. " to see the current size. Use this command to increase the size if you get",
  4104. " a \"?Too many files\" error. Also see SET FILE STRINGSPACE.",
  4105. " ",
  4106. #endif /* DYNAMIC */
  4107. #endif /* UNIX */
  4108. "SET FILE NAMES { CONVERTED, LITERAL }",
  4109. " File names are normally CONVERTED to \"common form\" during transmission",
  4110. " (e.g. lowercase to uppercase, extra periods changed to underscore, etc).",
  4111. " LITERAL means use filenames literally (useful between like systems). Also",
  4112. " see SET SEND PATHNAMES and SET RECEIVE PATHNAMES.",
  4113. " ",
  4114. #ifdef UNIX
  4115. "SET FILE OUTPUT { { BUFFERED, UNBUFFERED } [ size ], BLOCKING, NONBLOCKING }",
  4116. " Lets you control the disk output buffer for incoming files. Buffered",
  4117. " blocking writes are normal. Nonblocking writes might be faster on some",
  4118. " systems but might also be risky, depending on the underlying file service.",
  4119. " Unbuffered writes might be useful in critical applications to ensure that",
  4120. " cached disk writes are not lost in a crash, but will probably also be",
  4121. " slower. The optional size parameter after BUFFERED or UNBUFFERED lets you",
  4122. " change the disk output buffer size; this might make a difference in",
  4123. " performance.",
  4124. " ",
  4125. #endif /* UNIX */
  4126. #ifdef PATTERNS
  4127. "SET FILE PATTERNS { ON, OFF, AUTO }",
  4128. " ON means to use filename pattern lists to determine whether to send a file",
  4129. " in text or binary mode. OFF means to send all files in the prevailing",
  4130. " mode. AUTO (the default) is like ON if the other Kermit accepts Attribute",
  4131. " packets and like OFF otherwise. FILE PATTERNS are used only if FILE SCAN",
  4132. " is OFF (see SET FILE SCAN).",
  4133. " ",
  4134. "SET FILE BINARY-PATTERNS [ <pattern> [ <pattern> ... ] ]",
  4135. " Zero or more filename patterns which, if matched, cause a file to be sent",
  4136. " in binary mode when FILE PATTERNS are ON. HELP WILDCARDS for a description"
  4137. ,
  4138. " of pattern syntax. SHOW PATTERNS to see the current file pattern lists.",
  4139. " ",
  4140. "SET FILE TEXT-PATTERNS [ <pattern> [ <pattern> ... ] ]",
  4141. " Zero or more filename patterns which, if matched, cause a file to be sent",
  4142. " in text mode when FILE PATTERNS is ON; if a file does not match a text or",
  4143. " binary pattern, the prevailing SET FILE TYPE is used.",
  4144. " ",
  4145. #endif /* PATTERNS */
  4146. #ifdef VMS
  4147. "SET FILE RECORD-LENGTH number",
  4148. " Sets the record length for received files of type BINARY. Use this to",
  4149. " receive VMS BACKUP savesets or other fixed-format files that do not use",
  4150. " the default record length of 512.",
  4151. " ",
  4152. #endif /* VMS */
  4153. "SET FILE SCAN { ON [ size ], OFF }",
  4154. " If TRANSFER MODE is AUTOMATIC and FILE SCAN is ON (as it is by default)",
  4155. " Kermit peeks at the file's contents to see if it's text or binary. Use",
  4156. " SET FILE SCAN OFF to disable file peeking, while still keeping TRANSFER",
  4157. " MODE automatic to allow name patterns and other methods. The optional",
  4158. " size is the number of file bytes to scan, 49152 by default. -1 means to",
  4159. " scan the whole file. Also see SET FILE PATTERNS.",
  4160. " ",
  4161. #ifdef UNIX
  4162. #ifdef DYNAMIC
  4163. "SET FILE STRINGSPACE number",
  4164. " Changes the size (in bytes) of the internal buffer that holds lists of",
  4165. " filenames such as wildcard expansion lists. Use SHOW FILE to see the",
  4166. " current size. Use this command to increase the size if you get a",
  4167. " \"?String space exhausted\" error. Also see SET FILE LISTSIZE.",
  4168. " ",
  4169. #endif /* DYNAMIC */
  4170. #endif /* UNIX */
  4171. #ifdef UNICODE
  4172. "SET FILE UCS BOM { ON, OFF }",
  4173. " Whether to write a Byte Order Mark when creating a UCS-2 file.",
  4174. " ",
  4175. "SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }",
  4176. " Byte order to use when creating UCS-2 files, and to use when reading UCS-2",
  4177. " files that do not start with a Byte Order Mark.",
  4178. " ",
  4179. #endif /* UNICODE */
  4180. "SET FILE WARNING { ON, OFF }",
  4181. " SET FILE WARNING is superseded by the newer command, SET FILE",
  4182. " COLLISION. SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
  4183. " and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.",
  4184. #endif /* NOXFER */
  4185. "" };
  4186. static char *hmxyhsh[] = {
  4187. "Syntax: SET HANDSHAKE { NONE, XON, LF, BELL, ESC, CODE number }",
  4188. " Character to use for half duplex line turnaround handshake during file",
  4189. " transfer. C-Kermit waits for this character from the other computer",
  4190. " before sending its next packet. Default is NONE; you can give one of the",
  4191. " other names like BELL or ESC, or use SET HANDSHAKE CODE to specify the",
  4192. " numeric code value of the handshake character. Type SET HANDSH ? for a",
  4193. " complete list of possibilities.",
  4194. "" };
  4195. #ifndef NOSERVER
  4196. static char *hsetsrv[] = {
  4197. "SET SERVER CD-MESSAGE {ON,OFF}",
  4198. " Tells whether the server, after successfully executing a REMOTE CD",
  4199. " command, should send the contents of the new directory's READ.ME",
  4200. " (or similar) file to your screen.",
  4201. " ",
  4202. "SET SERVER CD-MESSAGE FILE name",
  4203. " Tells the name of the file to be displayed as a CD-MESSAGE, such as",
  4204. " READ.ME (SHOW SERVER tells the current CD-MESSAGE FILE name).",
  4205. " To specify more than one filename to look for, use {{name1}{name2}..}.",
  4206. " Synonym: SET CD MESSAGE FILE <list>.",
  4207. " ",
  4208. "SET SERVER DISPLAY {ON,OFF}",
  4209. " Tells whether local-mode C-Kermit during server operation should put a",
  4210. " file transfer display on the screen. Default is OFF.",
  4211. " ",
  4212. "SET SERVER GET-PATH [ directory [ directory [ ... ] ] ]",
  4213. " Tells the C-Kermit server where to look for files whose names it receives",
  4214. " from client GET commands when the names are not fully specified pathnames.",
  4215. " Default is no GET-PATH, so C-Kermit looks only in its current directory.",
  4216. " ",
  4217. "SET SERVER IDLE-TIMEOUT seconds",
  4218. " Idle time limit while in server mode, 0 for no limit.",
  4219. #ifndef OS2
  4220. " NOTE: SERVER IDLE-TIMEOUT and SERVER TIMEOUT are mutually exclusive.",
  4221. #endif /* OS2 */
  4222. " ",
  4223. "SET SERVER KEEPALIVE {ON,OFF}",
  4224. " Tells whether C-Kermit should send \"keepalive\" packets while executing",
  4225. " REMOTE HOST commands, which is useful in case the command takes a long",
  4226. " time to produce any output and therefore might cause the operation to time",
  4227. " out. ON by default; turn it OFF if it causes trouble with the client or",
  4228. " slows down the server too much.",
  4229. " ",
  4230. "SET SERVER LOGIN [ username [ password [ account ] ] ]",
  4231. " Sets up a username and optional password which must be supplied before",
  4232. " the server will respond to any commands other than REMOTE LOGIN. The",
  4233. " account is ignored. If you enter SET SERVER LOGIN by itself, then login",
  4234. " is no longer required. Only one SET SERVER LOGIN command can be in effect",
  4235. " at a time; C-Kermit does not support multiple user/password pairs.",
  4236. " ",
  4237. "SET SERVER TIMEOUT n",
  4238. " Server command wait timeout interval, how often the C-Kermit server issues",
  4239. " a NAK while waiting for a command packet. Specify 0 for no NAKs at all.",
  4240. " Default is 0.",
  4241. ""
  4242. };
  4243. #endif /* NOSERVER */
  4244. static char *hmhrmt[] = {
  4245. #ifdef NEWFTP
  4246. "The REMOTE command sends file management instructions or other commands",
  4247. "to a Kermit or FTP server. If you have a single connection, the command is",
  4248. "directed to the server you are connected to; if you have multiple connections"
  4249. ,
  4250. "the command is directed according to your GET-PUT-REMOTE setting.",
  4251. #else
  4252. "The REMOTE command sends file management instructions or other commands",
  4253. "to a Kermit server. There should already be a Kermit running in server",
  4254. "mode on the other end of the connection.",
  4255. #endif /* NEWFTP */
  4256. "Type REMOTE ? to see a list of available remote commands. Type HELP REMOTE",
  4257. "xxx to get further information about a particular remote command xxx.",
  4258. " ",
  4259. "All REMOTE commands except LOGIN and LOGOUT have R-command shortcuts;",
  4260. "for example, RDIR for REMOTE DIR, RCD for REMOTE CD, etc.",
  4261. " ",
  4262. #ifdef NEWFTP
  4263. #ifdef LOCUS
  4264. "Also see: HELP SET LOCUS, HELP FTP, HELP SET GET-PUT-REMOTE.",
  4265. #else
  4266. "Also see: HELP FTP, HELP SET GET-PUT-REMOTE.",
  4267. #endif /* LOCUS */
  4268. #else
  4269. #ifdef LOCUS
  4270. "Also see: HELP SET LOCUS.",
  4271. #endif /* LOCUS */
  4272. #endif /* NEWFTP */
  4273. "" };
  4274. #ifndef NOSPL
  4275. static char *ifhlp[] = { "Syntax: IF [NOT] condition commandlist",
  4276. " ",
  4277. "If the condition is (is not) true, do the commandlist. The commandlist",
  4278. "can be a single command, or a list of commands separated by commas and",
  4279. "enclosed in braces. The condition can be a single condition or a group of",
  4280. "conditions separated by AND (&&) or OR (||) and enclosed in parentheses.",
  4281. "If parentheses are used they must be surrounded by spaces. Examples:",
  4282. " ",
  4283. " IF EXIST oofa.txt <command>",
  4284. " IF ( EXIST oofa.txt || = \\v(nday) 3 ) <command>",
  4285. " IF ( EXIST oofa.txt || = \\v(nday) 3 ) { <command>, <command>, ... }",
  4286. " ",
  4287. "The conditions are:",
  4288. " ",
  4289. " SUCCESS - The previous command succeeded",
  4290. " OK - Synonym for SUCCESS",
  4291. " FAILURE - The previous command failed",
  4292. " ERROR - Synonym for FAILURE",
  4293. " FLAG - Succeeds if SET FLAG ON, fails if SET FLAG OFF",
  4294. " BACKGROUND - C-Kermit is running in the background",
  4295. #ifdef CK_IFRO
  4296. " FOREGROUND - C-Kermit is running in the foreground",
  4297. " REMOTE-ONLY - C-Kermit was started with the -R command-line option",
  4298. #else
  4299. " FOREGROUND - C-Kermit is running in the foreground",
  4300. #endif /* CK_IFRO */
  4301. " KERBANG - A Kerbang script is running",
  4302. " ALARM - SET ALARM time has passed",
  4303. " ASKTIMEOUT - The most recent ASK, ASKQ, GETC, or GETOK timed out",
  4304. " EMULATION - Succeeds if executed while in CONNECT mode",
  4305. #ifdef OS2
  4306. " TAPI - Current connection is via a Microsoft TAPI device",
  4307. #endif /* OS2 */
  4308. " ",
  4309. " MS-KERMIT - Program is MS-DOS Kermit",
  4310. " C-KERMIT - Program is C-Kermit",
  4311. " WINDOWS - Program is C-Kermit for Windows",
  4312. " GUI - Program runs in a GUI window",
  4313. " ",
  4314. " AVAILABLE CRYPTO - Encryption is available",
  4315. " AVAILABLE KERBEROS4 - Kerberos 4 authentication is available",
  4316. " AVAILABLE KERBEROS5 - Kerberos 5 authentication is available",
  4317. " AVAILABLE NTLM - NTLM authentication is available",
  4318. " AVAILABLE SRP - SRP authentication is available",
  4319. " AVAILABLE SSL - SSL/TLS authentication is available",
  4320. " MATCH string pattern - Succeeds if string matches pattern",
  4321. #ifdef CKFLOAT
  4322. " FLOAT number - Succeeds if floating-point number",
  4323. #endif /* CKFLOAT */
  4324. " COMMAND word - Succeeds if word is built-in command",
  4325. " DEFINED variablename or macroname - The named variable or macro is defined",
  4326. " DECLARED arrayname - The named array is declared",
  4327. " NUMERIC variable or constant - The variable or constant is numeric",
  4328. " FUNCTION name - The name is of a built-in function",
  4329. " EXIST filename - The named file exists",
  4330. " ABSOLUTE filename - The filename is absolute, not relative",
  4331. " BINARY filename - The file is a binary regular file",
  4332. " TEXT filename - The file is a text regular file",
  4333. #ifdef CK_TMPDIR
  4334. " DIRECTORY string - The string is the name of a directory",
  4335. #endif /* CK_TMPDIR */
  4336. #ifdef UNIX
  4337. " LINK string - The string is a symbolic link",
  4338. #endif /* UNIX */
  4339. " READABLE filename - Succeeds if the file is readable",
  4340. " WRITEABLE filename - Succeeds if the file is writeable",
  4341. #ifdef ZFCDAT
  4342. " NEWER file1 file2 - The 1st file is newer than the 2nd one",
  4343. #endif /* ZFCDAT */
  4344. " OPEN { READ-FILE,SESSION-LOG,...} - The given file or log is open",
  4345. #ifndef NOLOCAL
  4346. " OPEN CONNECTION - A connection is open",
  4347. #endif /* NOLOCAL */
  4348. " KBHIT - A key has been pressed",
  4349. " TRUE - always succeeds",
  4350. " FALSE - always fails",
  4351. " ",
  4352. " VERSION - equivalent to \"if >= \\v(version) ...\"",
  4353. " ",
  4354. " EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
  4355. " LLT s1 s2 - s1 is lexically (alphabetically) less than s2",
  4356. " LLE s1 s2 - s1 is lexically less than or equal to s2",
  4357. " LGT s1 s2 - s1 is lexically (alphabetically) greater than s2",
  4358. " LGE s1 s2 - s1 is lexically greater than or equal to s2",
  4359. " NEQ s1 s2 - s1 is not equal to s2",
  4360. " ",
  4361. " = n1 n2 - n1 and n2 (numbers or variables containing numbers) are equal",
  4362. " < n1 n2 - n1 is arithmetically less than n2",
  4363. " <= n1 n2 - n1 is arithmetically less than or equal to n2",
  4364. " > n1 n2 - n1 is arithmetically greater than n2",
  4365. " >= n1 n2 - n1 is arithmetically greater than or equal to n2",
  4366. " != n1 n2 - n1 is not equal to n2",
  4367. " ",
  4368. " (number by itself) - fails if the number is 0, succeeds otherwise",
  4369. " ",
  4370. " (variable name) - If value numeric: succeeds if nonzero, fails if zero",
  4371. " NOTE: variable name must not be the same as keyword",
  4372. " ",
  4373. "The IF command may be followed on the next line by an ELSE command. Example:",
  4374. " ",
  4375. " IF < \\%x 10 ECHO It's less",
  4376. " ELSE echo It's not less",
  4377. " ",
  4378. "It can also include an ELSE part on the same line if braces are used:",
  4379. " ",
  4380. " IF < \\%x 10 { ECHO It's less } ELSE { ECHO It's not less }",
  4381. " ",
  4382. "Multiple commands can be enclosed in braces, separated by commas:",
  4383. " ",
  4384. " IF > \\%n \\m(max) { echo \\%n > old max \\m(max), .max := \\%n }",
  4385. " ",
  4386. "When braces are used the command may split onto multiple lines:",
  4387. " ",
  4388. " IF > \\%n \\m(max) {",
  4389. " echo \"\\%n greater than old max \\m(max)\"",
  4390. " .max := \\%n",
  4391. " } else if < \\%n \\m(min) {",
  4392. " echo \"\\%n less than old min \\m(min)\"",
  4393. " .min := \\%n",
  4394. " }",
  4395. " ",
  4396. "Also see HELP WILDCARD (for IF MATCH pattern syntax).",
  4397. "" };
  4398. static char *hmxxeval[] = { "Syntax: EVALUATE variable expression",
  4399. " Evaluates the expression and assigns its value to the given variable.",
  4400. " The expression can contain numbers and/or numeric-valued variables or",
  4401. " functions, combined with mathematical operators and parentheses in",
  4402. " traditional notation. Operators include +-/*(), etc. Example:",
  4403. " EVALUATE \\%n (1+1) * (\\%a / 3).",
  4404. " ",
  4405. " NOTE: Prior to C-Kermit 7.0, the syntax was \"EVALUATE expression\"",
  4406. " (no variable), and the result was printed. Use SET EVAL { OLD, NEW }",
  4407. " to choose the old or new behavior, which is NEW by default.",
  4408. " ",
  4409. "Alse see: HELP FUNCTION EVAL.",
  4410. "" };
  4411. #endif /* NOSPL */
  4412. static char *hmxxexit[] = {
  4413. "Syntax: EXIT (or QUIT) [ number [ text ] ]",
  4414. " Exits from the Kermit program, closing all open files and devices.",
  4415. " If a number is given it becomes Kermit's exit status code. If text is",
  4416. " included, it is printed. Also see SET EXIT.",
  4417. "" };
  4418. #ifndef NOSPL
  4419. static char *ifxhlp[] = { "\
  4420. Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]",
  4421. " Obsolete. Same as IF (see HELP IF).",
  4422. "" };
  4423. static char *forhlp[] = { "\
  4424. Syntax: FOR variablename initial-value final-value increment { commandlist }",
  4425. " FOR loop. Execute the comma-separated commands in the commandlist the",
  4426. " number of times given by the initial value, final value and increment.",
  4427. " Example: FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
  4428. static char *whihlp[] = { "\
  4429. Syntax: WHILE condition { commandlist }",
  4430. " WHILE loop. Execute the comma-separated commands in the bracketed",
  4431. " commandlist while the condition is true. Conditions are the same as for",
  4432. " IF commands.",
  4433. "" };
  4434. static char *swihlp[] = {
  4435. "Syntax: SWITCH <variable> { case-list }",
  4436. " Selects from a group of commands based on the value of a variable.",
  4437. " The case-list is a series of lines like these:",
  4438. " ",
  4439. " :x, command, command, ..., break",
  4440. " ",
  4441. " where \"x\" is a possible value for the variable. At the end of the",
  4442. " case-list, you can put a \"default\" label to catch when the variable does",
  4443. " not match any of the labels:",
  4444. " ",
  4445. " :default, command, command, ...",
  4446. " ",
  4447. "The case label \"x\" can be a character, a string, a variable, a function",
  4448. "invocation, a pattern, or any combination of these. See HELP WILDCARDS",
  4449. "for information about patterns.",
  4450. ""};
  4451. static char *openhlp[] = {
  4452. "Syntax: OPEN mode filename",
  4453. " For use with READ and WRITE commands. Open the local file in the",
  4454. " specified mode: READ, WRITE, or APPEND. !READ and !WRITE mean to read",
  4455. " from or write to a system command rather than a file. Examples:",
  4456. " ",
  4457. " OPEN READ oofa.txt",
  4458. " OPEN !READ sort foo.bar",
  4459. "" };
  4460. static char *hxxask[] = {
  4461. "Syntax: ASK [ switches ] variablename [ prompt ]",
  4462. "Example: ASK \\%n { What is your name\\? }",
  4463. " Issues the prompt and defines the variable to be whatever is typed in",
  4464. " response, up to the terminating carriage return. Use braces to preserve",
  4465. " leading and/or trailing spaces in the prompt.",
  4466. " ",
  4467. "Syntax: ASKQ [ switches ] variablename [ prompt ]",
  4468. "Example: ASKQ \\%p { Password:}",
  4469. " Like ASK except the response does not echo on the screen or, if specified",
  4470. " it echoes as asterisks or other specified character.",
  4471. " ",
  4472. "Switches:",
  4473. " /DEFAULT:text",
  4474. " Text to supply if the user enters a blank response or the /TIMEOUT",
  4475. " limit expired with no response.",
  4476. " ",
  4477. " /ECHO:char",
  4478. " (ASKQ only) Character to be echoed each time the user presses a key",
  4479. " corresponding to a printable character. This lets users see what they are",
  4480. " doing when they are typing (e.g.) passwords, and makes editing easier.",
  4481. " ",
  4482. #ifdef OS2
  4483. " /POPUP",
  4484. " The prompt and response dialog takes place in a text-mode popup.",
  4485. " C-Kermit for Windows only; in other C-Kermit versions /POPUP is ignored.",
  4486. " ",
  4487. #ifdef KUI
  4488. " /GUI",
  4489. " The prompt and response dialog takes place in a GUI popup.",
  4490. " C-Kermit for Windows only; this switch is ignored elsewhere",
  4491. " ",
  4492. #endif /* KUI */
  4493. #endif /* OS2 */
  4494. " /TIMEOUT:number",
  4495. " If the response is not entered within the given number of seconds, the",
  4496. " command fails. This is equivalent to setting ASK-TIMER to a positive",
  4497. " number, except it applies only to this command. Also see SET ASK-TIMER.",
  4498. " NOTE: If a /DEFAULT: value was also given, it is supplied automatically",
  4499. " upon timeout and the command does NOT fail.",
  4500. " ",
  4501. " /QUIET",
  4502. " Suppresses \"?Timed out\" message when /TIMEOUT is given and user doesn't",
  4503. " respond within the time limit.",
  4504. ""};
  4505. static char *hxxgetc[] = {
  4506. "Syntax: GETC [ switches] [ variablename [ prompt ] ]",
  4507. "Example: GETC \\%c { Type any character to continue...}",
  4508. " Issues the prompt and sets the variable to the first character you type.",
  4509. " Use braces to preserve leading and/or trailing spaces in the prompt.",
  4510. " ",
  4511. "Switches:",
  4512. " /CHECK",
  4513. " GETC /CHECK (no variable or prompt is given when /CHECK is used)",
  4514. " succeeds if characters are waiting to be read and fails if not.",
  4515. " ",
  4516. " /QUIET",
  4517. " In case of errors, no error message is issued.",
  4518. " ",
  4519. " /TIMEOUT:n",
  4520. " Gives GETC a time limit of n seconds to wait for a character to appear;",
  4521. " if no character appears within n seconds, GETC fails and (if a /QUIET",
  4522. " switch was not given, an error message is printed.",
  4523. /* "Also see SET ASK-TIMER.", */
  4524. ""};
  4525. static char *hmxytimer[] = {
  4526. "Syntax: SET ASK-TIMER number",
  4527. " For use with ASK, ASKQ, GETOK, and GETC. If ASK-TIMER is set to a number",
  4528. " greater than 0, these commands will time out after the given number of",
  4529. " seconds with no response. This command is \"sticky\", so to revert to",
  4530. " \
  4531. untimed ASKs after a timed one, use SET ASK-TIMER 0. Also see IF ASKTIMEOUT.",
  4532. ""};
  4533. static char *hxxdot[] = {
  4534. "Syntax: .<variable-name> <assignment-operator> <value>",
  4535. " Assigns the value to the variable in the manner indicated by the",
  4536. " assignment operator:",
  4537. " = Copies without evaluation (like DEFINE).",
  4538. " := Copies with evaluation (like ASSIGN).",
  4539. " ::= Copies with arithmetic evaluation (like EVALUATE).",
  4540. ""};
  4541. static char *hxxdef[] = {
  4542. "Syntax: DEFINE name [ definition ]",
  4543. " Defines a macro or variable. Its value is the definition, taken",
  4544. " literally. No expansion or evaluation of the definition is done. Thus",
  4545. " if the definition includes any variable or function references, their",
  4546. " names are included, rather than their values (compare with ASSIGN). If",
  4547. " the definition is omitted, then the named variable or macro is undefined.",
  4548. " ",
  4549. "A typical macro definition looks like this:",
  4550. " ",
  4551. " DEFINE name command, command, command, ...",
  4552. " ",
  4553. "for example:",
  4554. " ",
  4555. " DEFINE vax set parity even, set duplex full, set flow xon/xoff",
  4556. " ",
  4557. "which defines a Kermit command macro called 'vax'. The definition is a",
  4558. "comma-separated list of Kermit commands. Use the DO command to execute",
  4559. "the macro, or just type its name, followed optionally by arguments.",
  4560. " ",
  4561. "The definition of a variable can be anything at all, for example:",
  4562. " ",
  4563. " DEFINE \\%a Monday",
  4564. " DEFINE \\%b 3",
  4565. " ",
  4566. "These variables can be used almost anywhere, for example:",
  4567. " ",
  4568. " ECHO Today is \\%a",
  4569. " SET BLOCK-CHECK \\%b",
  4570. "" };
  4571. static char *hxxass[] = {
  4572. "Syntax: ASSIGN variablename string.",
  4573. "Example: ASSIGN \\%a My name is \\%b.",
  4574. " Assigns the current value of the string to the variable (or macro).",
  4575. " The definition string is fully evaluated before it is assigned, so that",
  4576. " the values of any variables that are contained are used, rather than their",
  4577. " names. Compare with DEFINE. To illustrate the difference, try this:",
  4578. " ",
  4579. " DEFINE \\%a hello",
  4580. " DEFINE \\%x \\%a",
  4581. " ASSIGN \\%y \\%a",
  4582. " DEFINE \\%a goodbye",
  4583. " ECHO \\%x \\%y",
  4584. " ",
  4585. " This prints 'goodbye hello'.", "" };
  4586. static char *hxxdec[] = {
  4587. "Syntax: DECREMENT variablename [ amount ]",
  4588. " Decrement (subtract one from) the value of a variable if the current value",
  4589. " is numeric. If an optional amount is specified (as a number, a variable,",
  4590. " \
  4591. or an arithmetic expression that evaluates to a number, or any combination)",
  4592. " the variable is decremented by that number instead of 1. The result is",
  4593. " always an integer. If floating-point numbers are given, the result is",
  4594. " truncated.",
  4595. " ",
  4596. "Examples: DECR \\%a, DECR days 7, DECR x \\%n, DECR sum \\%x+12",
  4597. ""
  4598. };
  4599. static char *hxxinc[] = {
  4600. "Syntax: INCREMENT variablename [ number ]",
  4601. " Increment (add one to) the value of a variable if the current value is",
  4602. " numeric. If an optional amount is specified (as a number, a variable,",
  4603. " \
  4604. or an arithmetic expression that evaluates to a number, or any combination)",
  4605. " the variable is incremented by that number instead of 1. The result is",
  4606. " always an integer. If floating-point numbers are given, the result is",
  4607. " truncated.",
  4608. " ",
  4609. "Examples: INCR \\%a, INCR dollars 100, INCR size \\%n, INCR total \\%x/10",
  4610. "" };
  4611. #endif /* NOSPL */
  4612. #ifdef ANYX25
  4613. #ifndef IBMX25
  4614. static char *hxxpad[] = {
  4615. "Syntax: PAD command",
  4616. "X.25 PAD commands:",
  4617. " ",
  4618. " PAD CLEAR - Clear the virtual call",
  4619. " PAD STATUS - Return the status of virtual call",
  4620. " PAD RESET - Send a reset packet",
  4621. " PAD INTERRUPT - Send an interrupt packet",
  4622. ""};
  4623. #endif /* IBMX25 */
  4624. static char *hxyx25[] = {
  4625. "Syntax: SET X.25 option { ON [ data ], OFF }",
  4626. " ",
  4627. "X.25 call options:",
  4628. " CLOSED-USER-GROUP { ON index, OFF }",
  4629. " Enable or disable closed user group call, where index is the group",
  4630. " index, 0 to 99.",
  4631. " REVERSE-CHARGE { ON, OFF }",
  4632. " Tell whether you want to reverse the charges for the call.",
  4633. " CALL-USER-DATA { ON string, OFF }",
  4634. " Specify call user-data for the X.25 call.",
  4635. ""};
  4636. #endif /* ANYX25 */
  4637. static char *hxyprtr[] = {
  4638. #ifdef PRINTSWI
  4639. "Syntax: SET PRINTER [ switches ] [ name ]",
  4640. " ",
  4641. " Specifies the printer to be used for transparent-print, autoprint, and",
  4642. " screen-dump material during terminal emulation, as well as for the PRINT",
  4643. " command, plus various options governing print behavior.",
  4644. " ",
  4645. "Switches for specifying the printer by type:",
  4646. " ",
  4647. "/NONE",
  4648. " Include this switch to specify that all printer actions should simply be",
  4649. " skipped. Use this, for example, if you have no printer.",
  4650. " ",
  4651. "/DOS-DEVICE[:name]",
  4652. " Include this to declare a DOS printer and to specify its name, such as",
  4653. " PRN, LPT1, etc.",
  4654. " ",
  4655. #ifdef NT
  4656. "/WINDOWS-QUEUE[:[queue-name]]",
  4657. " Include this to declare a Windows printer and specify its queue name.",
  4658. " Type question mark (?) after the colon (:) to see a list of known queue",
  4659. " names. If the colon is absent, the switch indicates the currently",
  4660. " selected printer is a Windows Print Queue. If the colon is provided",
  4661. " and the name is absent, the Windows Print Queue chosen as the Default",
  4662. " Printer is selected.",
  4663. " ",
  4664. #endif /* NT */
  4665. "/FILE[:name]",
  4666. " Specifies that all printer material is to be appended to the named file,",
  4667. " rather than being sent to a printer. If the file does not exist, it is",
  4668. " created the first time any material is to be printed.",
  4669. " ",
  4670. "/PIPE[:name]",
  4671. " Specifies that all printer material is to be sent as standard input to",
  4672. " the program or command whose name is given. Example:",
  4673. " ",
  4674. " SET PRINTER /PIPE:{textps > lpt1}",
  4675. " ",
  4676. "If you give a printer name without specifying any of these switches, then it",
  4677. "is assumed to be a DOS printer device or filename unless the name given",
  4678. "(after removing enclosing braces, if any) starts with \"|\", \
  4679. in which case it",
  4680. "is a pipe. Examples:",
  4681. " ",
  4682. " SET PRINTER LPT1 <-- DOS device",
  4683. " SET PRINTER {| textps > lpt1} <-- Pipe",
  4684. " ",
  4685. "The next group of switches tells whether the printer is one-way or",
  4686. "bidirectional (two-way):",
  4687. " ",
  4688. "/OUTPUT-ONLY",
  4689. " Include this to declare the printer capable only of receiving material to",
  4690. " be printed, but not sending anything back. This is the normal kind of",
  4691. " printer, Kermit's default kind, and the opposite of /BIDIRECTIONAL.",
  4692. " ",
  4693. "/BIDIRECTIONAL",
  4694. " Include this to declare the printer bidirectional. This is the opposite ",
  4695. " of /OUTPUT-ONLY. You can also use this option with serial printers, even",
  4696. " if they aren't bidirectional, in case you need to specify speed, flow",
  4697. " control, or parity.",
  4698. " ",
  4699. "The next group applies only to bidirectional and/or serial printers:",
  4700. " ",
  4701. "/FLOW-CONTROL:{NONE,XON/XOFF,RTS/CTS,KEEP}",
  4702. " Flow control to use with a serial bidirectional printer, default KEEP;",
  4703. #ifdef NT
  4704. " i.e. use whatever the Windows driver for the port normally uses.",
  4705. #else
  4706. " i.e. use whatever the OS/2 driver for the port normally uses.",
  4707. #endif /* NT */
  4708. " ",
  4709. "/PARITY:{NONE,EVEN,ODD,SPACE,MARK}",
  4710. " Parity to use with a serial printer, default NONE; i.e. use 8 data bits",
  4711. " and no parity. If you omit the colon and the keyword, NONE is selected.",
  4712. " ",
  4713. "/SPEED:number",
  4714. " Interface speed, in bits per second, to use with a serial printer, such as",
  4715. " 2400, 9600, 19200, etc. Type SET PRINTER /SPEED:? for a list of possible",
  4716. " speeds.",
  4717. " ",
  4718. "The next group deals with print jobs -- how to identify them, how to start",
  4719. "them, how to terminate them:",
  4720. " ",
  4721. "/TIMEOUT[:number]",
  4722. " Used with host-directed transparent or auto printing, this is the number",
  4723. " of seconds to wait after the host closes the printer before terminating",
  4724. " the print job if the printer is not opened again during the specified",
  4725. " amount of time.",
  4726. " ",
  4727. "/JOB-HEADER-FILE[:filename]",
  4728. " The name of a file to be sent to the printer at the beginning of each",
  4729. " print job, as a burst page, or to configure the printer. Normally no file",
  4730. " is is sent.",
  4731. " ",
  4732. "/END-OF-JOB-STRING[:string]",
  4733. " String of characters to be sent to the printer at the end of the print",
  4734. " job, usually used to force the last or only page out of the printer. When",
  4735. " such a string is needed, it usually consists of a single formfeed: \"set",
  4736. " printer /end-of-job:{\\12}\". No end-of-job string is sent unless you",
  4737. " specify one with this option. If the string contains any spaces or",
  4738. " control characters (even in backslash notation, as above), enclose it in",
  4739. " braces.",
  4740. " ",
  4741. "The next group is for use with printers that print only PostScript:",
  4742. " ",
  4743. "/POSTSCRIPT or /PS",
  4744. " Indicates that Kermit should convert all text to PostScript before sending",
  4745. " it to the printer. The fixed-pitch Courier-11 font is used.",
  4746. " ",
  4747. "/WIDTH:number",
  4748. " Specifies the width of the page in characters. If this switch is not",
  4749. " given, 80 is used.",
  4750. " ",
  4751. "/HEIGHT:number",
  4752. " Specifies the height of the page in lines. If this switch is not given",
  4753. " 66 is used.",
  4754. " ",
  4755. "/NOPOSTSCRIPT or /NOPS",
  4756. " Indicates that Kermit should not convert all text to PostScript before",
  4757. " sending it to the printer.",
  4758. " ",
  4759. "The final switch is for use with AutoPrint mode and Screen Dumps",
  4760. " ",
  4761. "/CHARACTER-SET:<character-set>",
  4762. " Specifies the character set used by the printer which may be different",
  4763. " from both the character set used by the host and by the local computer.",
  4764. " The default value is CP437.",
  4765. " ",
  4766. "SHOW PRINTER displays your current printer settings.",
  4767. #else
  4768. #ifdef UNIX
  4769. "Syntax: SET PRINTER [ { |command, filename } ]",
  4770. " Specifies the command (such as \"|lpr\") or filename to be used by the",
  4771. " PRINT command. If a filename is given, each PRINT command appends to the",
  4772. " given file. If the SET PRINTER argument contains spaces, it must be",
  4773. " enclosed in braces, e.g. \"set printer {| lpr -Plaser}\". If the argument",
  4774. " is omitted the default value is restored. SHOW PRINTER lists the current",
  4775. " printer. See HELP PRINT for further info.",
  4776. #else
  4777. "Sorry, SET PRINTER not available yet.",
  4778. #endif /* UNIX */
  4779. #endif /* PRINTSWI */
  4780. ""};
  4781. #ifdef OS2
  4782. #ifdef BPRINT
  4783. static char *hxybprtr[] = {
  4784. "Syntax: SET BPRINTER [ portname speed [ parity [ flow-control ] ] ]",
  4785. " (Obsolete, replaced by SET PRINTER /BIDIRECTIONAL.)",
  4786. ""};
  4787. #endif /* BPRINT */
  4788. #endif /* OS2 */
  4789. static char *hxyexit[] = {
  4790. "Syntax: SET EXIT HANGUP { ON, OFF }",
  4791. " When ON (which is the default), C-Kermit executes an implicit HANGUP and",
  4792. " CLOSE command on the communications device or connection when it exits.",
  4793. " When OFF, Kermit skips this sequence.",
  4794. " ",
  4795. "Syntax: SET EXIT MESSAGE { ON, OFF, STDERR }",
  4796. " Allows the text (if any) from an EXIT command (see HELP EXIT) to be",
  4797. " supressed (OFF), printed normally (ON, the default), or sent to STDERR.",
  4798. " ",
  4799. "Syntax: SET EXIT ON-DISCONNECT { ON, OFF }",
  4800. " When ON, C-Kermit EXITs automatically when a network connection",
  4801. " is terminated either by the host or by issuing a HANGUP command.",
  4802. " ",
  4803. "Syntax: SET EXIT STATUS number",
  4804. #ifdef NOSPL
  4805. " Set C-Kermit's program return code to the given number.",
  4806. #else
  4807. " Set C-Kermit's program return code to the given number, which can be a",
  4808. " constant, variable, function result, or arithmetic expression.",
  4809. #endif /* NOSPL */
  4810. " ",
  4811. "Syntax: SET EXIT WARNING { ON, OFF, ALWAYS }",
  4812. " When EXIT WARNING is ON, issue a warning message and ask for confirmation",
  4813. " before EXITing if a connection to another computer might still be open.",
  4814. " When EXIT WARNING is ALWAYS, confirmation is always requested. When OFF",
  4815. " it is never requested. The default is ON.",
  4816. "" };
  4817. #ifndef NOSPL
  4818. static char *hxxpau[] = {
  4819. "Syntax: PAUSE [ { number-of-seconds, hh:mm:ss } ]",
  4820. "Example: PAUSE 3 or PAUSE 14:52:30",
  4821. " Do nothing for the specified number of seconds or until the given time of",
  4822. " day in 24-hour hh:mm:ss notation. If the time of day is earlier than the",
  4823. " current time, it is assumed to be tomorrow. If no argument given, one",
  4824. " second is used. The pause can be interrupted by typing any character on",
  4825. " the keyboard unless SLEEP CANCELLATION is OFF. If interrupted, PAUSE",
  4826. " fails, otherwise it succeeds. Synonym: SLEEP.",
  4827. "" };
  4828. static char *hxxmsl[] = {
  4829. "Syntax: MSLEEP [ number ]",
  4830. "Example: MSLEEP 500",
  4831. " Do nothing for the specified number of milliseconds; if no number given,",
  4832. " 100 milliseconds.","" };
  4833. #endif /* NOSPL */
  4834. #ifndef NOPUSH
  4835. extern int nopush;
  4836. static char *hxxshe[] = {
  4837. "Syntax: !, @, RUN, PUSH, or SPAWN, optionally followed by a command.",
  4838. " Gives the command to the local operating system's command processor, and",
  4839. " displays the results on the screen. If the command is omitted, enters the",
  4840. " system's command line interpreter or shell; exit from it (the command for",
  4841. " this is usually EXIT or QUIT or LOGOUT) to return to Kermit.",
  4842. ""
  4843. };
  4844. #endif /* NOPUSH */
  4845. #ifndef NOXMIT
  4846. static char *hxxxmit[] = {
  4847. "Syntax: TRANSMIT [ switches ] filename",
  4848. " Sends the contents of a file, without any error checking or correction,",
  4849. " to the computer on the other end of your SET LINE or SET HOST connection",
  4850. " (or if C-Kermit is in remote mode, displays it on the screen). The",
  4851. " filename is the name of a single file (no wildcards) to be sent or, if",
  4852. " the /PIPE switch is included, the name of a command whose output is to be",
  4853. " sent.",
  4854. " ",
  4855. " The file is sent according to your current FILE TYPE setting (BINARY or",
  4856. " TEXT), which you can override with a /BINARY or /TEXT switch without",
  4857. " changing the global setting. In text mode, it is sent a line at a time,",
  4858. " with carriage return at the end of each line (as if you were typing it at",
  4859. " your keyboard), and C-Kermit waits for a linefeed to echo before sending",
  4860. " the next line; use /NOWAIT to eliminate the feedback requirement. In",
  4861. " binary mode, it is sent a character at a time, with no feedback required.",
  4862. " ",
  4863. " Normally the transmitted material is echoed to your screen. Use SET",
  4864. " TRANSMIT ECHO OFF or the /NOECHO switch to suppress echoing. Note that",
  4865. " TRANSMIT /NOECHO /NOWAIT /BINARY is a special case, that more or less",
  4866. " blasts the file out at full speed.",
  4867. " ",
  4868. #ifndef NOCSETS
  4869. " Character sets are translated according to your current FILE and TERMINAL",
  4870. " CHARACTER-SET settings when TRANSMIT is in text mode. Include /TRANSPARENT"
  4871. ,
  4872. " to disable character-set translation in text mode (/TRANSPARENT implies",
  4873. " /TEXT).",
  4874. " ",
  4875. #endif /* NOCSETS */
  4876. " There can be no guarantee that the other computer will receive the file",
  4877. " correctly and completely. Before you start the TRANSMIT command, you",
  4878. " must put the other computer in data collection mode, for example by",
  4879. " starting a text editor. TRANSMIT may be interrupted by Ctrl-C. Synonym:",
  4880. " XMIT. See HELP SET TRANSMIT for further information.",
  4881. "" };
  4882. #endif /* NOXMIT */
  4883. #ifndef NOCSETS
  4884. static char *hxxxla[] = {
  4885. "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]",
  4886. " Translates file1 from the character set cs1 into the character set cs2",
  4887. " and stores the result in file2. The character sets can be any of",
  4888. " C-Kermit's file character sets. If file2 is omitted, the translation",
  4889. " is displayed on the screen. An appropriate intermediate character-set",
  4890. " is chosen automatically, if necessary. Synonym: XLATE. Example:",
  4891. " ",
  4892. " TRANSLATE lasagna.txt latin1 utf8 lasagna-utf8.txt",
  4893. " ",
  4894. " Multiple files can be translated if file2 is a directory or device name,",
  4895. " rather than a filename, or if file2 is omitted. Note: CONVERT would",
  4896. "" };
  4897. #endif /* NOCSETS */
  4898. #ifndef NOSPL
  4899. static char *hxxwai[] = {
  4900. "Syntax: WAIT { number-of-seconds, hh:mm:ss } [ <what> ]",
  4901. " ",
  4902. "Examples:",
  4903. " wait 5 cd cts",
  4904. " wait 23:59:59 cd",
  4905. " ",
  4906. " Waits up to the given number of seconds or the given time of day for the",
  4907. " specified item or event, which can be FILE, the name(s) of one or more",
  4908. " modem signals, or nothing. If nothing is specified, WAIT acts like SLEEP.",
  4909. " If one or more modem signal names are given, Kermit waits for the specified"
  4910. ,
  4911. " modem signals to appear on the serial communication device.",
  4912. " Sets FAILURE if the signals do not appear in the given time or interrupted",
  4913. " from the keyboard during the waiting period.",
  4914. " ",
  4915. "Signals:",
  4916. " cd = Carrier Detect;",
  4917. " dsr = Dataset Ready;",
  4918. " cts = Clear To Send;",
  4919. " ri = Ring Indicate.",
  4920. " ",
  4921. "If you want Kermit to wait for a file event, then the syntax is:",
  4922. " ",
  4923. " WAIT <time> FILE { CREATION, DELETION, MODIFICATION } <filename>",
  4924. " ",
  4925. "where <time> is as above, and <filename> is the name of a single file.",
  4926. "Kermit waits up to the given amount of time for the specified event to occur",
  4927. "with the specified file, succeeds if it does, fails if it doesn't.",
  4928. "" };
  4929. #endif /* NOSPL */
  4930. static char *hxxwri[] = {
  4931. "Syntax: WRITE name text",
  4932. " Writes the given text to the named log or file. The text text may include",
  4933. " backslash codes, and is not terminated by a newline unless you include the",
  4934. " appropriate code. The name parameter can be any of the following:",
  4935. " ",
  4936. " DEBUG-LOG",
  4937. " ERROR (standard error)",
  4938. #ifndef NOSPL
  4939. " FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
  4940. #endif /* NOSPL */
  4941. " PACKET-LOG",
  4942. " SCREEN (compare with ECHO)",
  4943. #ifndef NOLOCAL
  4944. " SESSION-LOG",
  4945. #endif /* NOLOCAL */
  4946. " TRANSACTION-LOG", "" };
  4947. #ifndef NODIAL
  4948. static char *hxxlook[] = { "Syntax: LOOKUP name",
  4949. " Looks up the given name in the dialing directory or directories, if any,",
  4950. " specified in the most recent SET DIAL DIRECTORY command. Each matching",
  4951. " entry is shown, along with any transformations that would be applied to",
  4952. " portable-format entries based on your locale. HELP DIAL, HELP SET DIAL",
  4953. " for further info.",
  4954. ""
  4955. };
  4956. static char *hxxansw[] = { "Syntax: ANSWER [ <seconds> ]",
  4957. #ifdef OS2
  4958. " Waits for a modem call to come in. Prior SET MODEM TYPE and SET PORT",
  4959. #else
  4960. " Waits for a modem call to come in. Prior SET MODEM TYPE and SET LINE",
  4961. #endif /* OS2 */
  4962. " required. If <seconds> is 0 or not specified, Kermit waits forever or",
  4963. " until interrupted, otherwise Kermit waits the given number of seconds.",
  4964. " The ANSWER command puts the modem in autoanswer mode. Subsequent DIAL",
  4965. " commands will automatically put it (back) in originate mode. SHOW MODEM,",
  4966. " HELP SET MODEM for more info.",
  4967. ""
  4968. };
  4969. static char *hxxdial[] = { "Syntax: DIAL phonenumber",
  4970. "Example: DIAL 7654321",
  4971. " \
  4972. Dials a number using an autodial modem. First you must SET MODEM TYPE, then",
  4973. #ifdef OS2
  4974. " SET PORT (or in Windows only, SET PORT TAPI instead of SET MODEM TYPE and",
  4975. " SET LINE), then SET SPEED. Then give the DIAL command, including the phone",
  4976. #else
  4977. " SET LINE, then SET SPEED. Then give the DIAL command, including the phone",
  4978. #endif /* OS2 */
  4979. " number, for example:",
  4980. " ",
  4981. " DIAL 7654321",
  4982. #ifdef NETCONN
  4983. " ",
  4984. " If the modem is on a network modem server, SET HOST first, then SET MODEM",
  4985. " TYPE, then DIAL.",
  4986. #endif /* NETCONN */
  4987. " ",
  4988. "If you give the DIAL command interactively at the Kermit prompt, and the",
  4989. "call is placed successfully, Kermit automatically enters CONNECT mode.",
  4990. "If the DIAL command is given from a macro or command file, Kermit remains",
  4991. "in command mode after the call is placed, successfully or not. You can",
  4992. "change this behavior with the SET DIAL CONNECT command.",
  4993. " ",
  4994. "If the phonenumber starts with a letter, and if you have used the SET DIAL",
  4995. "DIRECTORY command to specify one or more dialing-directory files, Kermit",
  4996. "looks it up in the given file(s); if it is found, the name is replaced by",
  4997. "the number or numbers associated with the name. If it is not found, the",
  4998. "name is sent to the modem literally.",
  4999. " ",
  5000. "If the phonenumber starts with an equals sign (\"=\"), this forces the part",
  5001. "after the = to be sent literally to the modem, even if it starts with a",
  5002. "letter, without any directory lookup.",
  5003. " ",
  5004. "You can also give a list of phone numbers enclosed in braces, e.g:",
  5005. " ",
  5006. " dial {{7654321}{8765432}{+1 (212 555-1212}}",
  5007. " ",
  5008. "(Each number is enclosed in braces and the entire list is also enclosed in",
  5009. "braces.) In this case, each number is tried until there is an answer. The",
  5010. "phone numbers in this kind of list can not be names of dialing directory",
  5011. "entries.",
  5012. " ",
  5013. "A dialing directory is a plain text file, one entry per line:",
  5014. " ",
  5015. " name phonenumber ; comments",
  5016. " ",
  5017. "for example:",
  5018. " ",
  5019. " work 9876543 ; This is a comment",
  5020. " e-mail +1 (212) 555 4321 ; My electronic mailbox",
  5021. " germany +49 (511) 555 1234 ; Our branch in Hanover",
  5022. " ",
  5023. "If a phone number starts with +, then it must include country code and",
  5024. "area code, and C-Kermit will try to handle these appropriately based on",
  5025. "the current locale (HELP SET DIAL for further info); these are called",
  5026. "PORTABLE entries. If it does not start with +, it is dialed literally.",
  5027. " ",
  5028. "If more than one entry is found with the same name, Kermit dials all of",
  5029. "them until the call is completed; if the entries are in portable format,",
  5030. "Kermit dials them in cheap-to-expensive order: internal, then local, then",
  5031. "long-distance, then international, based on its knowledge of your local",
  5032. "country code and area code (see HELP SET DIAL).",
  5033. " ",
  5034. "Specify your dialing directory file(s) with the SET DIAL DIRECTORY command.",
  5035. " ",
  5036. #ifdef NETCONN
  5037. "See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED, REDIAL, and",
  5038. "PDIAL.",
  5039. #else
  5040. "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, PDIAL, and REDIAL.",
  5041. #endif /* NETCONN */
  5042. "" };
  5043. #ifdef CK_TAPI
  5044. static char *hxxtapi[] = {
  5045. "TAPI CONFIGURE-LINE <tapi-line>",
  5046. " Displays the TAPI Configure Line Dialog box and allows you to",
  5047. " alter the default configuration for the specified <tapi-line>.",
  5048. " ",
  5049. "TAPI DIALING-PROPERTIES",
  5050. " Displays the TAPI Dialing Properties (locations) Dialog box. The",
  5051. " Dialing rules may be changed and locations created and deleted.",
  5052. " When the dialog box is closed, C-Kermit imports the current Dialing",
  5053. " Properties' Location into the Kermit DIAL command settings.",
  5054. ""};
  5055. static char *hxytapi[] = {
  5056. "SET TAPI LINE <tapi-line>",
  5057. " Opens a TAPI device for use by Kermit.",
  5058. " ",
  5059. "SET TAPI MODEM-DIALING {ON, [OFF]}",
  5060. " If TAPI MODEM-DIALING is OFF when SET TAPI LINE is issued, Kermit opens",
  5061. " the TAPI device directly as a \"raw port\". The device is unavailable to",
  5062. " other applications and Kermit performs dialing functions using its",
  5063. " built-in dialing and modem databases. If TAPI MODEM-DIALING is ON, TAPI",
  5064. " handles all dialing functions and the port may be shared with other",
  5065. " applications when a call is not active. When TAPI MODEM-DIALING is OFF,",
  5066. " SET MODEM TYPE TAPI Kermit uses the TAPI modem commands imported from the",
  5067. " Windows Registry during the previous SET TAPI LINE call.",
  5068. " ",
  5069. "SET TAPI LOCATION <tapi-location>",
  5070. " Specifies the TAPI location to make current for the entire system. The",
  5071. " <tapi-location>'s dialing properties are imported into Kermit's SET DIAL",
  5072. " command database.",
  5073. " ",
  5074. "SET TAPI PHONE-NUMBER-CONVERSIONS {ON, OFF, [AUTO]}",
  5075. " Controls whether the phone number conversions are performed by TAPI (ON)",
  5076. " or by Kermit (OFF), or according the type of port that was selected",
  5077. " (AUTO); AUTO is the default, and is equivalent to ON if the current",
  5078. " LINE/PORT is a TAPI device and TAPI MODEM-DIALING is ON, OFF otherwise.",
  5079. " ",
  5080. "SET TAPI MODEM-LIGHTS {[ON], OFF}",
  5081. " Displays a modem lights indicator on the Windows Taskbar. Does nothing",
  5082. " in Windows NT 4.0.",
  5083. " ",
  5084. "SET TAPI MANUAL-DIALING {ON, [OFF]}",
  5085. " Displays a dialog box during dialing requesting that you manually dial the",
  5086. " phone before continuing. Applies only when TAPI MODEM-DIALING is ON.",
  5087. " ",
  5088. "SET TAPI WAIT-FOR-CREDIT-CARD-TONE <seconds>",
  5089. " Some modems don't support the '$' (BONG) symbol during dialing, which",
  5090. " means \"wait for credit card tone before continuing.\" If TAPI recognizes",
  5091. " the modem as one that does not support BONG, it replaces the '$' with",
  5092. " <seconds> worth of pauses. The default is 8 seconds. This command",
  5093. " applies only when TAPI MODEM-DIALING is ON",
  5094. " ",
  5095. "SET TAPI PRE-DIAL-TERMINAL {ON, [OFF]}",
  5096. "SET TAPI POST-DIAL-TERMINAL {ON, [OFF]}",
  5097. " Displays a small terminal window that may be used to communicate with the",
  5098. " modem or the host prior to or immediately after dialing; applies only when",
  5099. " TAPI MODEM-DIALING is ON",
  5100. " ",
  5101. "SET TAPI INACTIVITY-TIMEOUT <minutes>",
  5102. " Specifies the number of minutes of inactivity that may go by before TAPI",
  5103. " disconnects the line. The default is 0 which means disable this function.",
  5104. " Applies only when TAPI MODEM-DIALING is ON.",
  5105. " ",
  5106. "SET TAPI USE-WINDOWS-CONFIGURATION {ON, [OFF]}",
  5107. " Specifies whether the TAPI modem values for speed, parity, stop bits, flow",
  5108. " control, etc. are used in preference to the current values specified",
  5109. " within C-Kermit.",
  5110. " ",
  5111. ""};
  5112. #endif /* CK_TAPI */
  5113. #endif /* NODIAL */
  5114. #ifdef TNCODE
  5115. static char *hmxxiks[] = {
  5116. "Syntax: IKS [ switches ] [ host [ service ] ]",
  5117. " Establishes a new connection to an Internet Kermit Service daemon.",
  5118. " Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host KERMIT /TELNET,",
  5119. " IF SUCCESS CONNECT. If host is omitted, the previous connection (if any)",
  5120. " is resumed. Depending on how Kermit has been built switches may be",
  5121. " available to require a secure authentication method and bidirectional",
  5122. " encryption. See HELP SET TELNET for more info.",
  5123. " ",
  5124. #ifdef CK_AUTHENTICATION
  5125. " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
  5126. " SET TELOPT AUTH REQUIRED with the following exceptions. If the type",
  5127. " is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
  5128. " is NONE, then SET TELOPT AUTH REFUSED is executed.",
  5129. " ",
  5130. #endif /* CK_AUTHENTICATION */
  5131. #ifdef CK_ENCRYPTION
  5132. " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
  5133. " and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
  5134. " If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
  5135. " and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
  5136. " executed.",
  5137. " ",
  5138. #endif /* CK_ENCRYPTION */
  5139. " /USERID:[<name>]",
  5140. " This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
  5141. " ENVIRONMENT USER <name>. If a string is given, it sent to host during",
  5142. " Telnet negotiations; if this switch is given but the string is omitted,",
  5143. " no user ID is sent to the host. If this switch is not given, your",
  5144. " current USERID value, \\v(userid), is sent. When a userid is sent to the",
  5145. " host it is a request to login as the specified user.",
  5146. " ",
  5147. #ifdef CK_AUTHENTICATION
  5148. " /PASSWORD:[<string>]",
  5149. " This switch is equivalent to SET LOGIN PASSWORD. If a string is given,",
  5150. " it is treated as the password to be used (if required) by any Telnet",
  5151. " Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
  5152. " Password, or X.509 certificate private key decryption.) If no password",
  5153. " switch is specified a prompt is issued to request the password if one",
  5154. " is required for the negotiated authentication method.",
  5155. #endif /* CK_AUTHENTICATION */
  5156. ""};
  5157. static char *hmxxtel[] = {
  5158. "Syntax: TELNET [ switches ] [ host [ service ] ]",
  5159. " Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /TELNET,",
  5160. " IF SUCCESS CONNECT. If host is omitted, the previous connection (if any)",
  5161. " is resumed. Depending on how Kermit has been built switches may be",
  5162. " available to require a secure authentication method and bidirectional",
  5163. " encryption. See HELP SET TELNET for more info.",
  5164. " ",
  5165. #ifdef CK_AUTHENTICATION
  5166. " /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and",
  5167. " SET TELOPT AUTH REQUIRED with the following exceptions. If the type",
  5168. " is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type",
  5169. " is NONE, then SET TELOPT AUTH REFUSED is executed.",
  5170. " ",
  5171. #endif /* CK_AUTHENTICATION */
  5172. #ifdef CK_ENCRYPTION
  5173. " /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>",
  5174. " and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.",
  5175. " If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed",
  5176. " and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is",
  5177. " executed.",
  5178. " ",
  5179. #endif /* CK_ENCRYPTION */
  5180. " /USERID:[<name>]",
  5181. " This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
  5182. " ENVIRONMENT USER <name>. If a string is given, it sent to host during",
  5183. " Telnet negotiations; if this switch is given but the string is omitted,",
  5184. " no user ID is sent to the host. If this switch is not given, your",
  5185. " current USERID value, \\v(userid), is sent. When a userid is sent to the",
  5186. " host it is a request to login as the specified user.",
  5187. " ",
  5188. #ifdef CK_AUTHENTICATION
  5189. " /PASSWORD:[<string>]",
  5190. " This switch is equivalent to SET LOGIN PASSWORD. If a string is given,",
  5191. " it is treated as the password to be used (if required) by any Telnet",
  5192. " Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
  5193. " Password, or X.509 certificate private key decryption.) If no password",
  5194. " switch is specified a prompt is issued to request the password if one",
  5195. " is required for the negotiated authentication method.",
  5196. #endif /* CK_AUTHENTICATION */
  5197. ""};
  5198. static char *hxtopt[] = {
  5199. "TELOPT { AO, AYT, BREAK, CANCEL, EC, EL, EOF, EOR, GA, IP, DMARK, NOP, SE,",
  5200. " SUSP, SB [ option ], DO [ option ], DONT [ option ],",
  5201. " WILL [ option ], WONT [option] }",
  5202. " This command lets you send all the Telnet protocol commands. Note that",
  5203. " certain commands do not require a response, and therefore can be used as",
  5204. " nondestructive \"probes\" to see if the Telnet session is still open;",
  5205. " e.g.:",
  5206. " ",
  5207. " set host xyzcorp.com",
  5208. " ...",
  5209. " telopt nop",
  5210. " telopt nop",
  5211. " if fail stop 1 Connection lost",
  5212. " ",
  5213. " TELOPT NOP is sent twice because the failure of the connection will not",
  5214. " be detected until the second send is attempted. This command is meant",
  5215. " primarily as a debugging tool for the expert user.",
  5216. ""};
  5217. #endif /* TNCODE */
  5218. #endif /* NOHELP */
  5219. /* D O H L P -- Give a help message */
  5220. _PROTOTYP( int dohset, (int) );
  5221. #ifndef NOCMDL
  5222. _PROTOTYP( int dohopts, (void) );
  5223. #endif /* NOCMDL */
  5224. #ifndef NOSPL
  5225. _PROTOTYP( int dohfunc, (int) );
  5226. extern struct keytab fnctab[];
  5227. extern int nfuncs;
  5228. #endif /* NOSPL */
  5229. #ifdef OS2
  5230. #ifndef NOKVERBS
  5231. _PROTOTYP( int dohkverb, (int) );
  5232. extern struct keytab kverbs[];
  5233. extern int nkverbs;
  5234. #endif /* NOKVERBS */
  5235. #endif /* OS2 */
  5236. #ifndef NOSPL
  5237. static char * hxxdcl[] = {
  5238. "Syntax: ARRAY verb operands...",
  5239. " ",
  5240. "Declares arrays and performs various operations on them. Arrays have",
  5241. "the following syntax:",
  5242. " ",
  5243. " \\&a[n]",
  5244. " ",
  5245. "where \"a\" is a letter and n is a number or a variable with a numeric value",
  5246. "or an arithmetic expression. The value of an array element can be anything",
  5247. "at all -- a number, a character, a string, a filename, etc.",
  5248. " ",
  5249. "The following ARRAY verbs are available:",
  5250. " ",
  5251. "[ ARRAY ] DECLARE arrayname[n] [ = initializers... ]",
  5252. " Declares an array of the given size, n. The resulting array has n+1",
  5253. " elements, 0 through n. Array elements can be used just like any other",
  5254. " variables. Initial values can be given for elements 1, 2, ... by",
  5255. " including = followed by one or more values separated by spaces. If you",
  5256. " omit the size, the array is sized according to the number of initializers;",
  5257. " if none are given the array is destroyed and undeclared if it already",
  5258. " existed. The ARRAY keyword is optional. Synonym: [ ARRAY ] DCL.",
  5259. " ",
  5260. "[ ARRAY ] UNDECLARE arrayname",
  5261. " Destroys and undeclares the given array. Synonym: ARRAY DESTROY.",
  5262. " ",
  5263. "ARRAY SHOW [ arrayname ]",
  5264. " Displays the contents of the given array. A range specifier can be",
  5265. " included to display a segment of the array, e.g. \"array show \\&a[1:24].\""
  5266. ,
  5267. " If the arrayname is omitted, all declared arrays are listed, but their",
  5268. " contents is not shown. Synonym: SHOW ARRAY.",
  5269. " ",
  5270. "ARRAY CLEAR arrayname",
  5271. " Clears all elements of the array, i.e. sets them to empty values.",
  5272. " You may include a range specifier to clear a segment of the array rather",
  5273. " than the whole array, e.g. \"array clear \\%a[22:38]\"",
  5274. " ",
  5275. "ARRAY SET arrayname value",
  5276. " Sets all elements of the array to the given value. You may specify a",
  5277. " range to set a segment of the array, e.g. \"array set \\%a[2:9] 0\"",
  5278. " ",
  5279. "ARRAY RESIZE arrayname number",
  5280. " Changes the size of the given array, which must already exist, to the",
  5281. " number given. If the number is smaller than the current size, the extra",
  5282. " elements are discarded; if it is larger, new empty elements are added.",
  5283. " ",
  5284. "ARRAY COPY array1 array2",
  5285. " Copies array1 to array2. If array2 has not been declared, it is created",
  5286. " automatically. If it array2 does exist, array1 is copied INTO it, as",
  5287. " much as will fit. Range specifiers may be given on one or both arrays.",
  5288. " ",
  5289. "ARRAY LINK array1 arra2",
  5290. " Makes array1 a link to array2.",
  5291. " ",
  5292. "[ ARRAY ] SORT [ switches ] array-name [ array2 ]",
  5293. " Sorts the given array lexically according to the switches. Element 0 of",
  5294. " the array is excluded from sorting by default. The ARRAY keyword is",
  5295. " optional. If a second array name is given, that array is sorted according",
  5296. " to the first one. Switches:",
  5297. " ",
  5298. " /CASE:{ON,OFF}",
  5299. " If ON, alphabetic case matters; if OFF it is ignored. If this switch is",
  5300. " omitted, the current SET CASE setting applies.",
  5301. " ",
  5302. " /KEY:number",
  5303. " \
  5304. Position (1-based column number) at which comparisons begin, 1 by default.",
  5305. " ",
  5306. " /NUMERIC",
  5307. " Specifies a numeric rather than lexical sort.",
  5308. " ",
  5309. " /RANGE:low[:high]",
  5310. " The range of elements, low through high, to be sorted. If this switch",
  5311. " is not given, elements 1 through the dimensioned size are sorted. If",
  5312. " :high is omitted, the dimensioned size is used. To include element 0 in",
  5313. " a sort, use /RANGE:0 (to sort the whole array) or /RANGE:0:n (to sort",
  5314. " elements 0 through n). You can use a range specifier in the array name",
  5315. " instead of the /RANGE switch.",
  5316. " ",
  5317. " /REVERSE",
  5318. " Sort in reverse order. If this switch is not given, the array is sorted",
  5319. " in ascending order.",
  5320. " ",
  5321. "Various functions are available for array operations; see HELP FUNCTION for",
  5322. "details. These include \\fdimension(), \\farraylook(), \\ffiles(), \
  5323. \\fsplit(),",
  5324. "and many more.",
  5325. ""};
  5326. #endif /* NOSPL */
  5327. #ifdef ZCOPY
  5328. static char * hmxxcpy[] = {
  5329. "Syntax: COPY [ switches ] file1 file2",
  5330. " Copies the source file (file1) to the destination file (file2). If file2",
  5331. " is a directory, file1 can contain wildcards to denote a group of files to",
  5332. " be copied to the given directory. Switches:",
  5333. " ",
  5334. " /LIST",
  5335. " Print the filenames and status while copying. Synonyms: /LOG, /VERBOSE.",
  5336. " ",
  5337. " /NOLIST",
  5338. " Copy silently (default). Synonyms: /NOLOG, /QUIET.",
  5339. " ",
  5340. " /PRESERVE",
  5341. " Copy timestamp and permissions from source file to destination file.",
  5342. " ",
  5343. " /OVERWRITE:{ALWAYS,NEVER,NEWER,OLDER}",
  5344. " When copying from one directory to another, this tells what to do when",
  5345. " the destination file already exists: overwrite it always; never; only if",
  5346. " the source file is newer; or only if the source file is older.",
  5347. " ",
  5348. " /APPEND",
  5349. " Append the source file to the destination file. In this case the source",
  5350. " file specification can contain wildcards, and all the matching source",
  5351. " files are appended, one after the other in alphabetical order by name,",
  5352. " to the destination file.",
  5353. " ",
  5354. " /SWAP-BYTES",
  5355. " Swap bytes while copying (e.g. for converting between Big-Endian and",
  5356. " Little-Endian binary data formats).",
  5357. #ifndef NOSPL
  5358. " ",
  5359. " /FROMB64",
  5360. " Convert from Base64 encoding while copying.",
  5361. " ",
  5362. " /TOB64",
  5363. " Convert to Base64 encoding while copying.",
  5364. #endif /* NOSPL */
  5365. ""
  5366. };
  5367. #endif /* ZCOPY */
  5368. #ifndef NOFRILLS
  5369. static char * hmxxren[] = {
  5370. #ifdef LOCUS
  5371. " If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection,",
  5372. " this command is equivalent to REMOTE RENAME (RREN). Otherwise:",
  5373. " ",
  5374. #endif /* LOCUS */
  5375. #ifndef OLDMOVE
  5376. "Syntax: RENAME or MOVE or MV [ switches ] name1 [ name2 ]",
  5377. #else
  5378. "Syntax: RENAME or MV [ switches ] name1 [ name2 ]",
  5379. #endif /* OLDMOVE */
  5380. " Renames the source file (name1) to the target name2. If name2 is a",
  5381. " directory, name1 is allowed to contain wildcards, and the file(s) matching",
  5382. " name1 are moved to directory name2, subject to rules of the underlying",
  5383. " operating system regarding renaming across disk boundaries, etc. Switches:",
  5384. " ",
  5385. " /LIST",
  5386. " Print the filenames and status while renaming. Synonyms: /LOG, /VERBOSE",
  5387. " ",
  5388. " /NOLIST",
  5389. " Rename silently (default). Synonyms: /NOLOG, /QUIET",
  5390. " ",
  5391. " /COLLISION:{FAIL,SKIP,OVERWRITE}",
  5392. " Tells what to do if a file with the given (or derived) new name already",
  5393. " exists: fail (and stop without renaming any files); skip this file",
  5394. " without renaming it and go on to the next one, if any; or overwrite (the",
  5395. " existing file). PROCEED is a synonym for SKIP.",
  5396. " ",
  5397. " /SIMULATE",
  5398. " Show what the effects of the RENAME command would be without actually",
  5399. " renaming any files.",
  5400. " ",
  5401. " When any of the following switches is given, name2 must either be the",
  5402. " the name of a directory, or else omitted, and name1 is allowed to contain",
  5403. " contain wildcards, allowing multiple files to be renamed at once. If name2",
  5404. " is given, then all files matching name1 are moved to the name2 directory",
  5405. " after being renamed.",
  5406. " ",
  5407. " /LOWER:{ALL,UPPER}",
  5408. " Converts letters in the filename to lowercase. ALL means to convert",
  5409. " all matching filenames, UPPER means to convert only those filenames",
  5410. " that contain no lowercase letters. The switch argument can be omitted,",
  5411. " in which case ALL filenames are converted.",
  5412. " ",
  5413. " /UPPER:{ALL,LOWER}",
  5414. " Converts letters in the filename to uppercase. ALL means to convert",
  5415. " all matching filenames, LOWER means to convert only those filenames",
  5416. " that contain no uppercase letters. As with /LOWER, ALL is the default",
  5417. " switch argument.",
  5418. " ",
  5419. " /FIXSPACES:s",
  5420. " Replaces all spaces in each matching filename by the string s, which may",
  5421. " be empty, a single character, or a string of characters. The default",
  5422. " replacement (if no argument is given) is underscore (_).",
  5423. " ",
  5424. " /REPLACE:{{string1}{string2}{options}}",
  5425. " Replaces all or selected occurrences of string1 with string2 in the",
  5426. " matching filenames. The braces are part of the command. The options",
  5427. " string can contain the following characters:",
  5428. " A: String matching is case-sensitive.",
  5429. " a: String matching is case-insensitive.",
  5430. " ^: String matching is anchored to the beginning of the filename.",
  5431. " $: String matching is anchored to the end of the filename.",
  5432. " 1: Only the first occurrence of the string (if any) will be changed.",
  5433. " 2: Only the second occurrence, and so on for all digits up to 9.",
  5434. " -: (before a digit) Occurrences are counted from the right.",
  5435. " ~: (before occurrence) All occurences BUT the one given are changed.",
  5436. " ",
  5437. " /CONVERT:cset1:cset1",
  5438. " Converts each matching filename from character-set 1 to character-set 2.",
  5439. " Character sets are the same as for SET FILE CHARACTER-SET.",
  5440. " ",
  5441. " Global values for /LIST and COLLISION can be set with SET RENAME and",
  5442. " displayed with SHOW RENAME.",
  5443. ""
  5444. };
  5445. #endif /* NOFRILLS */
  5446. static char *
  5447. cmdlhlp[] = {
  5448. "Command-line options are given after the program name in the system",
  5449. "command that you use to start Kermit. Example:",
  5450. " ",
  5451. " kermit -i -s oofa.exe",
  5452. " ",
  5453. "tells Kermit to send (-s) the file oofa.exe in binary (-i) mode.",
  5454. " ",
  5455. "Command-line options are case-sensitive; \"-s\" is different from \"-S\".",
  5456. #ifdef VMS
  5457. "In VMS, uppercase options must be enclosed in doublequotes: ",
  5458. " ",
  5459. " $ kermit \"-Y\" \"-S\" -s oofa.txt ",
  5460. #endif /* VMS */
  5461. " ",
  5462. "If any \"action options\" are included on the command line, Kermit exits",
  5463. "after executing its command-line options. If -S is included, or no action",
  5464. "options were given, Kermit enters its interactive command parser and",
  5465. "issues its prompt.",
  5466. " ",
  5467. "Command-line options are single characters preceded by dash (-). Some",
  5468. "require an \"argument,\" others do not. If an argument contains spaces, it",
  5469. "must be enclosed in doublequotes:",
  5470. " ",
  5471. " kermit -s \"filename with spaces\"",
  5472. " ",
  5473. "\
  5474. An option that does not require an argument can be bundled with other options:"
  5475. ,
  5476. " ",
  5477. " kermit -Qis oofa.exe",
  5478. " ",
  5479. "Exceptions to the rules:",
  5480. " ",
  5481. " . If the first command-line option is a filename, Kermit executes commands",
  5482. " from the file. Additional command-line options can follow the filename.",
  5483. " ",
  5484. " . The special option \"=\" (equal sign) or \"--\" (double hyphen) means to",
  5485. " treat the rest of the command line as data, rather than commands; this",
  5486. " data is placed in the argument vector array, \\&@[], along with the other",
  5487. " items on the command line, and also in the top-level \\%1..\\%9 variables."
  5488. ,
  5489. " ",
  5490. #ifdef KERBANG
  5491. " . A similar option \"+\" (plus sign) means: the name of a Kermit script",
  5492. " file follows. This file is to be executed, and its name assigned to \\%0",
  5493. " and \\&_[0]. All subsequent command-line arguments are to be ignored by",
  5494. " Kermit but made available to the script as \\%1, \\%2, ..., as well as",
  5495. " in the argument-vector arrays. The initialization file is not executed",
  5496. " automatically in this case.",
  5497. " ",
  5498. #endif /* KERBANG */
  5499. " . The -s option can accept multiple filenames, separated by spaces.",
  5500. " ",
  5501. " . the -j and -J options allow an optional second argument, the TCP port",
  5502. " name or number.",
  5503. " ",
  5504. "Type \"help options all\" to list all the command-line options.",
  5505. "Type \"help option x\" to see the help message for option x.",
  5506. " ",
  5507. "Kermit also offers a selection of \"extended command-line\" options.",
  5508. "These begin with two dashes, followed by a keyword, and then, if the option",
  5509. "has arguments, a colon (:) or equal sign (=) followed by the argument.",
  5510. "Unlike single-letter options, extended option keywords aren't case sensitive",
  5511. "and they can be abbreviated to any length that still distinguishes them from",
  5512. "other extended-option keywords. Example:",
  5513. " ",
  5514. " kermit --banner:oofa.txt",
  5515. " ",
  5516. "which designates the file oofa.txt to be printed upon startup, rather than",
  5517. "the built-in banner (greeting) text. To obtain a list of available",
  5518. "extended options, type \"help extended-options ?\". To get help about all",
  5519. "extended options, type \"help extended-options\". To get help about a",
  5520. "particular extended option, type \"help extended-option xxx\", where \"xxx\"",
  5521. "is the option keyword.",
  5522. #ifdef COMMENT
  5523. #ifndef NOIKSD
  5524. " ",
  5525. "At present, most of the extended options apply only to the Internet Kermit",
  5526. "Service Daemon (IKSD). Type \"help iksd\" for details.",
  5527. #endif /* NOIKSD */
  5528. #endif /* COMMENT */
  5529. ""
  5530. };
  5531. #ifndef NOHELP
  5532. #ifndef NOCMDL
  5533. int
  5534. doxopts() {
  5535. extern char * xopthlp[], * xarghlp[];
  5536. extern struct keytab xargtab[];
  5537. extern int nxargs;
  5538. int i, x, y, n = 0;
  5539. #ifdef CK_TTGWSIZ
  5540. #ifdef OS2
  5541. ttgcwsz();
  5542. #else /* OS2 */
  5543. /* Check whether window size changed */
  5544. if (ttgwsiz() > 0) {
  5545. if (tt_rows > 0 && tt_cols > 0) {
  5546. cmd_rows = tt_rows;
  5547. cmd_cols = tt_cols;
  5548. }
  5549. }
  5550. #endif /* OS2 */
  5551. #endif /* CK_TTGWSIZ */
  5552. y = cmkey(xargtab,
  5553. nxargs,
  5554. "Extended argument without the \"--\" prefix",
  5555. "",
  5556. xxstring
  5557. );
  5558. if (y == -3) {
  5559. printf("\n");
  5560. if ((x = cmcfm()) < 0)
  5561. return(x);
  5562. for (i = 0; i <= XA_MAX; i++) {
  5563. if (xopthlp[i]) {
  5564. printf("%s\n",xopthlp[i]);
  5565. printf(" %s\n",xarghlp[i]);
  5566. printf("\n");
  5567. n += 3;
  5568. if (n > (cmd_rows - 6)) {
  5569. if (!askmore())
  5570. return(0);
  5571. else
  5572. n = 0;
  5573. }
  5574. }
  5575. }
  5576. return(1);
  5577. } else if (y < 0)
  5578. return(y);
  5579. if ((x = cmcfm()) < 0)
  5580. return(x);
  5581. printf("\n%s\n",xopthlp[y]);
  5582. printf(" %s\n\n",xarghlp[y]);
  5583. return(1);
  5584. }
  5585. int
  5586. dohopts() {
  5587. int i, n, x, y, z, all = 0, msg = 0;
  5588. char *s;
  5589. extern char *opthlp[], *arghlp[];
  5590. extern char * xopthlp[], * xarghlp[];
  5591. extern int optact[];
  5592. if ((x = cmtxt("A command-line option character,\n\
  5593. or the word ALL, or carriage return for an overview",
  5594. "", &s, xxstring)) < 0)
  5595. return(x);
  5596. if (!*s)
  5597. msg = 1;
  5598. else if (!strcmp(s,"all") || (!strcmp(s,"ALL")))
  5599. all = 1;
  5600. else if (*s == '-') /* Be tolerant of leading hyphen */
  5601. s++;
  5602. if (!all && (int)strlen(s) > 1) {
  5603. printf("?A single character, please, or carriage to list them all.\n");
  5604. return(-9);
  5605. }
  5606. if (all) {
  5607. y = 33;
  5608. z = 127;
  5609. } else {
  5610. y = *s;
  5611. z = (y == 0) ? 127 : y;
  5612. if (y == 0) y = 33;
  5613. }
  5614. #ifdef CK_TTGWSIZ
  5615. #ifdef OS2
  5616. ttgcwsz();
  5617. #else /* OS2 */
  5618. /* Check whether window size changed */
  5619. if (ttgwsiz() > 0) {
  5620. if (tt_rows > 0 && tt_cols > 0) {
  5621. cmd_rows = tt_rows;
  5622. cmd_cols = tt_cols;
  5623. }
  5624. }
  5625. #endif /* OS2 */
  5626. #endif /* CK_TTGWSIZ */
  5627. printf("\n");
  5628. for (i = 0, n = 1; msg != 0 && *cmdlhlp[i]; i++) {
  5629. printf("%s\n",cmdlhlp[i]);
  5630. if (++n > (cmd_rows - 3)) {
  5631. if (!askmore())
  5632. return(0);
  5633. else
  5634. n = 0;
  5635. }
  5636. }
  5637. if (all) {
  5638. printf("The following command-line options are available:\n\n");
  5639. n += 2;
  5640. }
  5641. for (i = y; msg == 0 && i <= z; i++) {
  5642. if (!opthlp[i])
  5643. continue;
  5644. if (arghlp[i]) { /* Option with arg */
  5645. printf(" -%c <arg>%s\n",(char)i,(optact[i]?" (action option)":""));
  5646. printf(" %s\n",opthlp[i]);
  5647. printf(" Argument: %s\n\n",arghlp[i]);
  5648. x = 4;
  5649. } else { /* Option without arg */
  5650. printf(" -%c %s%s\n",
  5651. (char)i, opthlp[i],
  5652. (optact[i]?" (action option)":"")
  5653. );
  5654. printf(" Argument: (none)\n\n");
  5655. x = 3;
  5656. }
  5657. n += x;
  5658. if (n > (cmd_rows - x - 1)) {
  5659. if (!askmore())
  5660. return(0);
  5661. else
  5662. n = 0;
  5663. }
  5664. }
  5665. if (all) { /* Jeff, Jan 2003 */
  5666. printf("\n");
  5667. if (++n >= cmd_rows) {
  5668. if (!askmore())
  5669. return(0);
  5670. else
  5671. n = 0;
  5672. }
  5673. printf("The following extended options are available:\n");
  5674. if (++n >= cmd_rows) {
  5675. if (!askmore())
  5676. return(0);
  5677. else
  5678. n = 0;
  5679. }
  5680. printf("\n");
  5681. if (++n >= cmd_rows) {
  5682. if (!askmore())
  5683. return(0);
  5684. else
  5685. n = 0;
  5686. }
  5687. for (i = 0; i <= XA_MAX; i++) {
  5688. if (xopthlp[i]) {
  5689. printf("%s\n",xopthlp[i]);
  5690. printf(" %s\n",xarghlp[i]);
  5691. printf("\n");
  5692. n += 3;
  5693. if (n > (cmd_rows - 4)) {
  5694. if (!askmore())
  5695. return(0);
  5696. else
  5697. n = 0;
  5698. }
  5699. }
  5700. }
  5701. }
  5702. return(1);
  5703. }
  5704. #endif /* NOCMDL */
  5705. #endif /* NOHELP */
  5706. #ifdef CKCHANNELIO
  5707. static char * hxxfile[] = {
  5708. "Syntax: FILE <subcommand> [ switches ] <channel> [ <data> ]",
  5709. " Opens, closes, reads, writes, and manages local files.",
  5710. " ",
  5711. "The FILE commands are:",
  5712. " ",
  5713. " FILE OPEN (or FOPEN) -- Open a local file.",
  5714. " FILE CLOSE (or FCLOSE) -- Close an open file.",
  5715. " FILE READ (or FREAD) -- Read data from an open file.",
  5716. " FILE WRITE (or FWRITE) -- Write data to an open file.",
  5717. " FILE LIST (or FLIST) -- List open files.",
  5718. " FILE STATUS (or FSTATUS) -- Show status of a channel.",
  5719. " FILE REWIND (or FREWIND) -- Rewind an open file",
  5720. " FILE COUNT (or FCOUNT) -- Count lines or bytes in an open file",
  5721. " FILE SEEK (or FSEEK) -- Seek to specified spot in an open file.",
  5722. " FILE FLUSH (or FFLUSH) -- Flush output buffers for an open file.",
  5723. " ",
  5724. "Type HELP FILE OPEN or HELP FOPEN for details about FILE OPEN;",
  5725. "type HELP FILE CLOSE or HELP FCLOSE for details about FILE CLOSE, and so on.",
  5726. " ",
  5727. "The following variables are related to the FILE command:",
  5728. " ",
  5729. " \\v(f_max) -- Maximum number of files that can be open at once",
  5730. " \\v(f_error) -- Completion code of most recent FILE command or function",
  5731. " \\v(f_count) -- Result of most recent FILE COUNT command",
  5732. " ",
  5733. "The following functions are related to the FILE command:",
  5734. " ",
  5735. " \\F_eof() -- Check if channel is at EOF",
  5736. " \\F_pos() -- Get channel read/write position (byte number)",
  5737. " \\F_line() -- Get channel read/write position (line number)",
  5738. " \\F_handle() -- Get file handle",
  5739. " \\F_status() -- Get channel status",
  5740. " \\F_getchar() -- Read character",
  5741. " \\F_getline() -- Read line",
  5742. " \\F_getblock() -- Read block",
  5743. " \\F_putchar() -- Write character",
  5744. " \\F_putline() -- Write line",
  5745. " \\F_putblock() -- Write block",
  5746. " \\F_errmsg() -- Error message from most recent FILE command or function",
  5747. " ",
  5748. "Type HELP <function-name> for information about each one.",
  5749. ""
  5750. };
  5751. static char * hxxf_op[] = {
  5752. "Syntax: FILE OPEN [ switches ] <variable> <filename>",
  5753. " Opens the file indicated by <filename> in the mode indicated by the",
  5754. " switches, if any, or if no switches are included, in read-only mode, and",
  5755. " assigns a channel number for the file to the given variable.",
  5756. " Synonym: FOPEN. Switches:",
  5757. " ",
  5758. "/READ",
  5759. " Open the file for reading.",
  5760. " ",
  5761. #ifdef UNIX
  5762. "/STDIN",
  5763. " Tells Kermit to read from Standard Input. In this case you don't specify",
  5764. " a filename.",
  5765. " ",
  5766. "/STDOUT",
  5767. " Tells Kermit to write to Standard Output. In this case you don't specify",
  5768. " a filename.",
  5769. " ",
  5770. "/STDERR",
  5771. " Tells Kermit to write to Standard Error. In this case you don't specify",
  5772. " a filename.",
  5773. " ",
  5774. #endif /* UNIX */
  5775. "/WRITE",
  5776. " Open the file for writing. If /READ was not also specified, this creates",
  5777. " a new file. If /READ was specified, the existing file is preserved, but",
  5778. " writing is allowed. In both cases, the read/write pointer is initially",
  5779. " at the beginning of the file.",
  5780. " ",
  5781. "/APPEND",
  5782. " If the file does not exist, create a new file and open it for writing.",
  5783. " If the file exists, open it for writing, but with the write pointer",
  5784. " positioned at the end.",
  5785. " ",
  5786. "/BINARY",
  5787. #ifdef VMS
  5788. " Opens the file in binary mode to inhibit end-of-line conversions.",
  5789. #else
  5790. #ifdef OS2
  5791. " Opens the file in binary mode to inhibit end-of-line conversions.",
  5792. #else
  5793. #ifdef UNIX
  5794. " This option is ignored in UNIX.",
  5795. #else
  5796. " This option is ignored on this platform.",
  5797. #endif /* UNIX */
  5798. #endif /* OS2 */
  5799. #endif /* VMS */
  5800. " ",
  5801. "Switches can be combined in an way that makes sense and is supported by the",
  5802. "underlying operating system.",
  5803. ""
  5804. };
  5805. static char * hxxf_cl[] = {
  5806. "Syntax: FILE CLOSE <channel>",
  5807. " Closes the file on the given channel if it was open.",
  5808. " Also see HELP FILE OPEN. Synonym: FCLOSE.",
  5809. ""
  5810. };
  5811. static char * hxxf_fl[] = {
  5812. "Syntax: FILE FLUSH <channel>",
  5813. " Flushes output buffers on the given channel if it was open, forcing",
  5814. " all material previously written to be committed to disk. Synonym: FFLUSH.",
  5815. " Also available as \\F_flush().",
  5816. ""
  5817. };
  5818. static char * hxxf_li[] = {
  5819. "Syntax: FILE LIST",
  5820. " Lists the channel number, name, modes, and position of each file opened",
  5821. " with FILE OPEN. Synonym: FLIST.",
  5822. ""
  5823. };
  5824. static char * hxxf_re[] = {
  5825. "Syntax: FILE READ [ switches ] <channel> [ <variable> ]",
  5826. " Reads data from the file on the given channel number into the <variable>,",
  5827. " if one was given; if no variable was given, the result is printed on",
  5828. " the screen. The variable should be a macro name rather than a \\%x",
  5829. " variable or array element if you want backslash characters in the file to",
  5830. " be taken literally. Synonym: FREAD. Switches:",
  5831. " ",
  5832. "/LINE",
  5833. " Specifies that a line of text is to be read. A line is defined according",
  5834. " to the underlying operating system's text-file format. For example, in",
  5835. " UNIX a line is a sequence of characters up to and including a linefeed.",
  5836. " The line terminator (if any) is removed before assigning the text to the",
  5837. " variable. If no switches are included with the FILE READ command, /LINE",
  5838. " is assumed.",
  5839. " ",
  5840. "/SIZE:number",
  5841. " Specifies that the given number of bytes (characters) is to be read.",
  5842. " This gives a semblance of \"record i/o\" for files that do not necessarily",
  5843. " contain lines. The resulting block of characters is assigned to the",
  5844. " variable without any editing.",
  5845. " ",
  5846. "/CHARACTER",
  5847. " Equivalent to /SIZE:1. If FILE READ /CHAR succeeds but the <variable> is",
  5848. " empty, this indicates a NUL byte was read.",
  5849. " ",
  5850. "/TRIM",
  5851. " Tells Kermit to trim trailing whitespace when used with /LINE. Ignored",
  5852. " if used with /CHAR or /SIZE.",
  5853. " ",
  5854. "/UNTABIFY",
  5855. " Tells Kermit to convert tabs to spaces (assuming tabs set every 8 spaces)",
  5856. " when used with /LINE. Ignored if used with /CHAR or /SIZE.",
  5857. " ",
  5858. "Synonym: FREAD.",
  5859. "Also available as \\F_getchar(), \\F_getline(), \\F_getblock().",
  5860. ""
  5861. };
  5862. static char * hxxf_rw[] = {
  5863. "Syntax: FILE REWIND <channel>",
  5864. " If the channel is open, moves the read/write pointer to the beginning of",
  5865. " the file. Equivalent to FILE SEEK <channel> 0. Synonym: FREWIND.",
  5866. " Also available as \\F_rewind().",
  5867. ""
  5868. };
  5869. static char * hxxf_se[] = {
  5870. "Syntax: FILE SEEK [ switches ] <channel> { [{+,-}]<number>, EOF }",
  5871. " Switches are /BYTE, /LINE, /RELATIVE, /ABSOLUTE, and /FIND:pattern.",
  5872. " Moves the file pointer for this file to the given position in the",
  5873. " file. Subsequent FILE READs or WRITEs will take place at that position.",
  5874. " If neither the /RELATIVE nor /ABSOLUTE switch is given, an unsigned",
  5875. " <number> is absolute; a signed number is relative. EOF means to move to",
  5876. " the end of the file. If a /FIND: switch is included, Kermit seeks to the",
  5877. " specified spot (e.g. 0 for the beginning) and then begins searching line",
  5878. " by line for the first line that matches the given pattern. To start",
  5879. " searching from the current file position specify a line number of +0.",
  5880. " To start searching from the line after the current one, use +1 (etc).",
  5881. " Synonym: FSEEK.",
  5882. ""
  5883. };
  5884. static char * hxxf_st[] = {
  5885. "Syntax: FILE STATUS <channel>",
  5886. " If the channel is open, this command shows the name of the file, the",
  5887. " switches it was opened with, and the current read/write position.",
  5888. " Synonym: FSTATUS",
  5889. ""
  5890. };
  5891. static char * hxxf_co[] = {
  5892. "Syntax: FILE COUNT [ { /BYTES, /LINES, /LIST, /NOLIST } ] <channel>",
  5893. " If the channel is open, this command prints the nubmer of bytes (default)",
  5894. " or lines in the file if at top level or if /LIST is included; if /NOLIST",
  5895. " is given, the result is not printed. In all cases the result is assigned",
  5896. " to \\v(f_count). Synonym: FCOUNT",
  5897. ""
  5898. };
  5899. static char * hxxf_wr[] = {
  5900. "FILE WRITE [ switches ] <channel> <text>",
  5901. " Writes the given text to the file on the given channel number. The <text>",
  5902. " can be literal text or a variable, or any combination. If the text might",
  5903. " contain leading or trailing spaces, it must be enclosed in braces if you",
  5904. " want to preserve them. Synonym: FWRITE. Switches:",
  5905. " ",
  5906. "/LINE",
  5907. " Specifies that an appropriate line terminator is to be added to the",
  5908. " end of the <text>. If no switches are included, /LINE is assumed.",
  5909. " ",
  5910. "/SIZE:number",
  5911. " Specifies that the given number of bytes (characters) is to be written.",
  5912. " If the given <text> is longer than the requested size, it is truncated;",
  5913. " if is shorter, it is padded according /LPAD and /RPAD switches. Synonym:",
  5914. " /BLOCK.",
  5915. " ",
  5916. "/LPAD[:value]",
  5917. " If /SIZE was given, but the <text> is shorter than the requested size,",
  5918. " the text is padded on the left with sufficient copies of the character",
  5919. " whose ASCII value is given to write the given length. If no value is",
  5920. " specified, 32 (the code for Space) is used. The value can also be 0 to",
  5921. " write the indicated number of NUL bytes. If /SIZE was not given, this",
  5922. " switch is ignored.",
  5923. " ",
  5924. "/RPAD[:value]",
  5925. " Like LPAD, but pads on the right.",
  5926. " ",
  5927. "/STRING",
  5928. " Specifies that the <text> is to be written as-is, with no terminator added."
  5929. ,
  5930. " ",
  5931. "/CHARACTER",
  5932. " Specifies that one character should be written. If the <text> is empty or",
  5933. " not given, a NUL character is written; otherwise the first character of",
  5934. " <text> is given.",
  5935. " ",
  5936. "Synonym FWRITE.",
  5937. "Also available as \\F_putchar(), \\F_putline(), \\F_putblock().",
  5938. ""
  5939. };
  5940. static int
  5941. dohfile(cx) int cx; {
  5942. extern struct keytab fctab[];
  5943. extern int nfctab;
  5944. int x;
  5945. if (cx == XXFILE) { /* FILE command was given */
  5946. /* Get subcommand */
  5947. if ((cx = cmkey(fctab,nfctab,"Operation","",xxstring)) < 0) {
  5948. if (cx == -3) {
  5949. if ((x = cmcfm()) < 0)
  5950. return(x);
  5951. cx = XXFILE;
  5952. } else
  5953. return(cx);
  5954. }
  5955. if ((x = cmcfm()) < 0)
  5956. return(x);
  5957. switch (cx) {
  5958. case FIL_CLS: cx = XXF_CL; break;
  5959. case FIL_FLU: cx = XXF_FL; break;
  5960. case FIL_LIS: cx = XXF_LI; break;
  5961. case FIL_OPN: cx = XXF_OP; break;
  5962. case FIL_REA: cx = XXF_RE; break;
  5963. case FIL_REW: cx = XXF_RW; break;
  5964. case FIL_SEE: cx = XXF_SE; break;
  5965. case FIL_STA: cx = XXF_ST; break;
  5966. case FIL_WRI: cx = XXF_WR; break;
  5967. case FIL_COU: cx = XXF_CO; break;
  5968. }
  5969. }
  5970. switch (cx) {
  5971. case XXFILE: return(hmsga(hxxfile));
  5972. case XXF_CL: return(hmsga(hxxf_cl));
  5973. case XXF_FL: return(hmsga(hxxf_fl));
  5974. case XXF_LI: return(hmsga(hxxf_li));
  5975. case XXF_OP: return(hmsga(hxxf_op));
  5976. case XXF_RE: return(hmsga(hxxf_re));
  5977. case XXF_RW: return(hmsga(hxxf_rw));
  5978. case XXF_SE: return(hmsga(hxxf_se));
  5979. case XXF_ST: return(hmsga(hxxf_st));
  5980. case XXF_WR: return(hmsga(hxxf_wr));
  5981. case XXF_CO: return(hmsga(hxxf_co));
  5982. default:
  5983. return(-2);
  5984. }
  5985. }
  5986. #endif /* CKCHANNELIO */
  5987. int
  5988. dohlp(xx) int xx; {
  5989. int x,y;
  5990. debug(F101,"DOHELP xx","",xx);
  5991. if (xx < 0) return(xx);
  5992. #ifdef NOHELP
  5993. if ((x = cmcfm()) < 0)
  5994. return(x);
  5995. printf("\n%s, Copyright (C) 1985, %s,",versio, ck_cryear);
  5996. #ifndef NOIKSD
  5997. if (inserver)
  5998. return(hmsga(tophlpi));
  5999. else
  6000. #endif /* IKSD */
  6001. return(hmsga(tophlp));
  6002. #else /* help is available */
  6003. if (helpfile)
  6004. return(dotype(helpfile,xaskmore,0,0,NULL,0,NULL,0,0,NULL,0));
  6005. #ifdef CKCHANNELIO
  6006. if (xx == XXFILE)
  6007. return(dohfile(xx));
  6008. else if (xx == XXF_RE || xx == XXF_WR || xx == XXF_OP ||
  6009. xx == XXF_CL || xx == XXF_SE || xx == XXF_RW ||
  6010. xx == XXF_FL || xx == XXF_LI || xx == XXF_ST || xx == XXF_CO)
  6011. return(dohfile(xx));
  6012. #endif /* CKCHANNELIO */
  6013. switch (xx) {
  6014. #ifndef NOSPL
  6015. case XXASS: /* ASSIGN */
  6016. return(hmsga(hxxass));
  6017. case XXASK: /* ASK */
  6018. case XXASKQ: /* ASKQ */
  6019. return(hmsga(hxxask));
  6020. case XXAPC:
  6021. return(hmsg("Syntax: APC text\n\
  6022. Echoes the text within a VT220/320/420 Application Program Command."));
  6023. #endif /* NOSPL */
  6024. #ifndef NOFRILLS
  6025. case XXBUG:
  6026. return(hmsg("Describes how to get technical support."));
  6027. #endif /* NOFRILLS */
  6028. #ifndef NOSPL
  6029. case XXBEEP:
  6030. #ifdef OS2
  6031. return(hmsg("Syntax: BEEP [ { ERROR, INFORMATION, WARNING } ]\n\
  6032. Generates a bell according to the current settings. If SET BELL is set to\n\
  6033. \"system-sounds\" then the appropriate System Sound will be generated.\n\
  6034. Default is INFORMATION."));
  6035. #else /* OS2 */
  6036. return(hmsg("Syntax: BEEP\n\
  6037. Sends a BEL character to your terminal."));
  6038. #endif /* OS2 */
  6039. #endif /* NOSPL */
  6040. case XXBYE: /* BYE */
  6041. return(hmsg(hmxxbye));
  6042. case XXCHK: /* check */
  6043. return(hmsg("\
  6044. Syntax: CHECK name\n\
  6045. Checks\
  6046. to see if the named feature is included in this version of Kermit.\n\
  6047. To list the features you can check, type \"check ?\"."));
  6048. #ifndef NOFRILLS
  6049. case XXCLE: /* clear */
  6050. return(hmsga(hmxxcle));
  6051. #endif /* NOFRILLS */
  6052. case XXCLO: /* close */
  6053. return(hmsga(hmxxclo));
  6054. case XXCOM: /* comment */
  6055. #ifndef STRATUS /* Can't use # for comments in Stratus VOS */
  6056. return(hmsg("\
  6057. Syntax: COMMENT text\n\
  6058. Example: COMMENT - this is a comment.\n\
  6059. Introduces a comment. Beginning of command line only. Commands may also\n\
  6060. have trailing comments, introduced by ; or #."));
  6061. #else
  6062. return(hmsg("\
  6063. Syntax: COMMENT text\n\
  6064. Example: COMMENT - this is a comment.\n\
  6065. Introduces a comment. Beginning of command line only. Commands may also\n\
  6066. have trailing comments, introduced by ; (semicolon)."));
  6067. #endif /* STRATUS */
  6068. #ifndef NOLOCAL
  6069. case XXCON: /* CONNECT */
  6070. case XXCQ: /* CQ == CONNECT /QUIETLY */
  6071. hmsga(hmxxcon);
  6072. printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
  6073. ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
  6074. return(0);
  6075. #endif /* NOLOCAL */
  6076. #ifdef ZCOPY
  6077. case XXCPY:
  6078. return(hmsga(hmxxcpy));
  6079. #endif /* ZCOPY */
  6080. #ifdef NT
  6081. case XXLINK:
  6082. return(hmsg(
  6083. " LINK source destination\n\
  6084. creates a hard link to the file specified by source to the filename\n\
  6085. specified by destination. Hard links are only supported on NTFS.\n\
  6086. destination can either be a filename or a directory. source may\n\
  6087. contain wildcards if destination is a directory."));
  6088. #endif /* NT */
  6089. #ifndef NOFRILLS
  6090. case XXLREN: /* LRENAME */
  6091. return(hmsg(
  6092. " LRENAME is an alias for the RENAME command forcing it to execute\n\
  6093. on the local computer. Also see: RENAME, RRENAME, SET LOCUS."));
  6094. case XXREN:
  6095. return(hmsga(hmxxren));
  6096. #endif /* NOFRILLS */
  6097. case XXCDUP: /* CDUP */
  6098. case XXLCDU:
  6099. return(hmsg(
  6100. "Change working directory to the one just above the current one."));
  6101. case XXLCWD:
  6102. return(hmsg(
  6103. " LCD (LCWD) is an alias for the CD (CWD) command forcing it to execute\n\
  6104. on the local computer. Also see: CD, CDUP, RCD, SET LOCUS."));
  6105. case XXCWD: /* CD / CWD */
  6106. return(hmsga(hmxxcwd));
  6107. #ifndef NOSPL
  6108. case XXKCD:
  6109. return(hmsga(hmxxkcd));
  6110. case XXARRAY:
  6111. case XXDCL: /* DECLARE */
  6112. case XXSORT:
  6113. return(hmsga(hxxdcl));
  6114. case XXDEF: /* DEFINE */
  6115. #ifndef NOSPL
  6116. if (hlptok) /* What they actually typed... */
  6117. if (hlptok[0] == '.')
  6118. return(hmsga(hxxdot));
  6119. #endif /* NOSPL */
  6120. return(hmsga(hxxdef));
  6121. case XXUNDEF: /* UNDEFINE */
  6122. return(hmsg("Syntax: UNDEFINE variable-name\n\
  6123. Undefines a macro or variable."));
  6124. #endif /* NOSPL */
  6125. case XXMSG:
  6126. return(hmsg("Syntax: MESSAGE text-to-print-if-debugging\n\
  6127. Prints the given text to stdout if SET DEBUG MESSAGE is ON; prints it\n\
  6128. to stderr if SET DEBUG MESSAGE is STDERR; doesn't print it at all if SET\n\
  6129. DEBUG MESSAGE is OFF. Synonym: MSG."));
  6130. case XXXMSG:
  6131. return(hmsg("Syntax: XMESSAGE text-to-print-if-debugging\n\
  6132. Like MESSAGE, except does not include a line terminator at the end.\n\
  6133. Prints the given text to stdout if SET DEBUG MESSAGE is ON; prints it\n\
  6134. to stderr if SET DEBUG MESSAGE is STDERR; doesn't print it at all if SET\n\
  6135. DEBUG MESSAGE is OFF. Synonym: XMSG."));
  6136. #ifndef NOFRILLS
  6137. case XXLDEL:
  6138. return(hmsg(
  6139. " LDELETE is an alias for the DELETE command forcing it to execute\n\
  6140. on the local computer. Also see: DELETE, RDELETE, SET LOCUS."));
  6141. case XXDEL: /* delete */
  6142. return(hmsga(hmxxdel));
  6143. #endif /* NOFRILLS */
  6144. #ifndef NODIAL
  6145. case XXDIAL: /* DIAL, etc... */
  6146. return(hmsga(hxxdial));
  6147. case XXPDIA: /* PDIAL */
  6148. return(hmsg("Syntax: PDIAL phonenumber\n\
  6149. Partially dials a phone number. Like DIAL but does not wait for carrier\n\
  6150. or CONNECT message."));
  6151. case XXRED:
  6152. return(hmsg("Redial the number given in the most recent DIAL commnd."));
  6153. case XXANSW: /* ANSWER */
  6154. return(hmsga(hxxansw));
  6155. case XXLOOK: /* LOOKUP number in directory */
  6156. return(hmsga(hxxlook));
  6157. #endif /* NODIAL */
  6158. case XXLDIR: /* LDIRECTORY */
  6159. return(hmsg(
  6160. " LDIRIRECTORY is an alias for the DIRECTORY command forcing it to execute\n\
  6161. on the local computer. Also see: DIRECTORY, SET LOCUS, RDIRECTORY."));
  6162. case XXDIR: /* DIRECTORY */
  6163. return(hmsga(hmxxdir));
  6164. case XXTOUC: /* TOUCH */
  6165. return(hmsga(hmxxtouch));
  6166. case XXCHG: /* CHANGE */
  6167. return(hmsga(hmxxchange));
  6168. case XXWDIR: /* WDIRECTORY */
  6169. return(hmsg(" WDIRECTORY is shorthand for DIRECTORY /SORT:DATE /REVERSE;\n\
  6170. it produces a listing in reverse chronological order. See the DIRECTORY\n\
  6171. command for further information."));
  6172. case XXHDIR: /* HDIRECTORY */
  6173. return(hmsg(" HDIRECTORY is shorthand for DIRECTORY /SORT:SIZE /REVERSE;\n\
  6174. it produces a listing showing the biggest files first. See the DIRECTORY\n\
  6175. command for further information."));
  6176. case XXLMKD: /* LMKDIR */
  6177. return(hmsg(
  6178. " LMKDIR is an alias for the MKDIR command forcing it to execute\n\
  6179. on the local computer. Also see: MKDIR, RMKDIR, SET LOCUS."));
  6180. case XXMKDIR: /* MKDIR */
  6181. return(hmsg("Creates a directory. Also see LRMDIR, RRMDIR, SET LOCUS."));
  6182. case XXLRMD: /* LRMDIR */
  6183. return(hmsg(
  6184. " LRMDIR is an alias for the RMDIR command forcing it to execute\n\
  6185. on the local computer. Also see: RMDIR, RRMDIR, SET LOCUS."));
  6186. case XXRMDIR: /* RMDIR */
  6187. return(hmsg("Removes a directory. Also see LRMDIR, RRMDIR, SET LOCUS."));
  6188. case XXLS:
  6189. #ifdef UNIXOROSK
  6190. return(hmsg("Syntax: LS [ args ]\n\
  6191. Runs \"ls\" with the given arguments."));
  6192. #else
  6193. return(hmsga(hmxxdir));
  6194. #endif /* UNIXOROSK */
  6195. #ifndef NOSERVER
  6196. #ifndef NOFRILLS
  6197. case XXDIS:
  6198. return(hmsg("Syntax: DISABLE command\n\
  6199. Security for the Kermit server. Prevents the client Kermit program from\n\
  6200. executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
  6201. #endif /* NOFRILLS */
  6202. #endif /* NOSERVER */
  6203. #ifndef NOSPL
  6204. case XXDO: /* do */
  6205. return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\
  6206. Executes a macro that was defined with the DEFINE command. The word DO\n\
  6207. can be omitted. Trailing argument words, if any, are automatically\n\
  6208. assigned to the macro argument variables \\%1 through \\%9."));
  6209. #endif /* NOSPL */
  6210. #ifndef NOSPL
  6211. case XXDEC:
  6212. return(hmsga(hxxdec));
  6213. #endif /* NOSPL */
  6214. case XXECH: /* echo */
  6215. return(hmsg("Syntax: ECHO text\n\
  6216. Displays the text on the screen, followed by a line terminator. The ECHO\n\
  6217. text may contain backslash codes. Example: ECHO \\7Wake up!\\7. Also see\n\
  6218. XECHO and WRITE SCREEN."));
  6219. case XXXECH: /* xecho */
  6220. return(hmsg("Syntax: XECHO text\n\
  6221. Just like ECHO but does not add a line terminator to the text. See ECHO."));
  6222. case XXVOID:
  6223. return(hmsg("Syntax: VOID text\n\
  6224. Like ECHO but doesn't print anything; can be used to invoke functions\n\
  6225. when you don't need to display or use their results."));
  6226. #ifndef NOSERVER
  6227. #ifndef NOFRILLS
  6228. case XXENA:
  6229. return(hmsg("Syntax: ENABLE capability\n\
  6230. For use with server mode. Allows the client Kermit program access to the\n\
  6231. named capability, such as CD, DELETE, RECEIVE, etc. Opposite of DISABLE."));
  6232. #endif /* NOFRILLS */
  6233. #endif /* NOSERVER */
  6234. #ifndef NOSPL
  6235. case XXEND: /* end */
  6236. return(hmsg("Syntax: END [ number [ message ] ]\n\
  6237. Exits from the current macro or TAKE file, back to wherever invoked from.\n\
  6238. Number is return code. Message, if given, is printed."));
  6239. case XXEVAL: /* evaluate */
  6240. return(hmsga(hmxxeval));
  6241. #endif /* NOSPL */
  6242. #ifndef NOFRILLS
  6243. case XXERR: /* e-packet */
  6244. return(hmsg("Syntax: E-PACKET\n\
  6245. Sends an Error packet to the other Kermit."));
  6246. #endif /* NOFRILLS */
  6247. case XXEXI: /* exit */
  6248. case XXQUI:
  6249. return(hmsga(hmxxexit));
  6250. case XXFIN:
  6251. return(hmsg("Syntax: FINISH\n\
  6252. Tells the remote Kermit server to shut down without logging out."));
  6253. #ifndef NOSPL
  6254. case XXFOR:
  6255. return(hmsga(forhlp));
  6256. #endif /* NOSPL */
  6257. case XXGET:
  6258. return(hmsga(hmxxget));
  6259. case XXMGET:
  6260. return(hmsga(hmxxmget));
  6261. #ifndef NOSPL
  6262. #ifndef NOFRILLS
  6263. case XXGOK:
  6264. return(hmsg("Syntax: GETOK [ switches ] prompt\n\
  6265. Prints the prompt, makes user type 'yes', 'no', or 'ok', and sets SUCCESS\n\
  6266. or FAILURE accordingly. The optional switches are the same as for ASK."));
  6267. #endif /* NOFRILLS */
  6268. #endif /* NOSPL */
  6269. #ifndef NOSPL
  6270. case XXGOTO:
  6271. return(hmsg("Syntax: GOTO label\n\
  6272. In a TAKE file or macro, go to the given label. A label is a word on the\n\
  6273. left margin that starts with a colon (:). Example:\n\n\
  6274. :oofa\n\
  6275. echo Hello!\n\
  6276. goto oofa"));
  6277. #endif /* NOSPL */
  6278. case XXHAN:
  6279. return(hmsg("Syntax: HANGUP\n\
  6280. Hang up the phone or network connection."));
  6281. case XXHLP:
  6282. /*
  6283. We get confirmation here, even though we do it again in hmsga(), to prevent
  6284. the Copyright message from being printed prematurely. This doesn't do any
  6285. harm, because the first call to cmcfm() sets cmflgs to 1, making the second
  6286. call return immediately.
  6287. */
  6288. if ((x = cmcfm()) < 0)
  6289. return(x);
  6290. if (helpfile) {
  6291. printf("\n%s, Copyright (C) 1985, %s,\n\
  6292. Trustees of Columbia University in the City of New York.\n\n",
  6293. versio,
  6294. ck_cryear
  6295. );
  6296. return(dotype(helpfile,xaskmore,3,0,NULL,0,NULL,0,0,NULL,0));
  6297. } else {
  6298. printf("\n%s, Copyright (C) 1985, %s,",versio,ck_cryear);
  6299. return(hmsga(tophlp));
  6300. }
  6301. case XXINT:
  6302. return(hmsg("The INTRO command gives a brief introduction to C-Kermit."));
  6303. #ifndef NOSPL
  6304. case XXIF:
  6305. return(hmsga(ifhlp));
  6306. case XXINC:
  6307. return(hmsga(hxxinc));
  6308. case XXINP:
  6309. return(hmsga(hxxinp));
  6310. #endif /* NOSPL */
  6311. #ifdef CK_MINPUT
  6312. case XXMINP:
  6313. return(hmsga(hmxxminp));
  6314. #endif /* CK_MINPUT */
  6315. #ifndef NOSPL
  6316. case XXREI:
  6317. return(hmsg("Syntax: REINPUT n string\n\
  6318. Looks for the string in the text that has recently been INPUT, set SUCCESS\n\
  6319. or FAILURE accordingly. Timeout, n, must be specified but is ignored."));
  6320. #endif /* NOSPL */
  6321. #ifndef NOSPL
  6322. case XXLBL:
  6323. return(hmsg("\
  6324. Introduces a label, like :loop, for use with GOTO in TAKE files or macros.\n\
  6325. See GOTO."));
  6326. #endif /* NOSPL */
  6327. case XXLOG:
  6328. return(hmsga(hmxxlg));
  6329. #ifndef NOSCRIPT
  6330. case XXLOGI:
  6331. return(hmsga(hmxxlogi));
  6332. #endif
  6333. #ifndef NOFRILLS
  6334. case XXMAI:
  6335. return(hmsg("Syntax: MAIL filename address\n\
  6336. Equivalent to SEND /MAIL:address filename."));
  6337. #endif /* NOFRILLS */
  6338. #ifndef NOMSEND
  6339. case XXMSE:
  6340. return(hmsga(hmxxmse));
  6341. case XXADD:
  6342. return(hmsga(hmxxadd));
  6343. case XXMMOVE:
  6344. return(hmsg("MMOVE is exactly like MSEND, except each file that is\n\
  6345. sent successfully is deleted after it is sent."));
  6346. #endif /* NOMSEND */
  6347. #ifndef NOSPL
  6348. case XXOPE:
  6349. return(hmsga(openhlp));
  6350. #endif /* NOSPL */
  6351. case XXNEW:
  6352. return(hmsg(
  6353. " Prints news of new features since publication of \"Using C-Kermit\"."));
  6354. case XXUPD:
  6355. return(hmsg(
  6356. " New features are described in the online manual,\n\
  6357. accessible via the MANUAL command."));
  6358. #ifndef NOSPL
  6359. case XXOUT:
  6360. return(hmsga(hxxout));
  6361. #endif /* NOSPL */
  6362. #ifdef ANYX25
  6363. #ifndef IBMX25
  6364. case XXPAD:
  6365. return(hmsga(hxxpad));
  6366. #endif /* IBMX25 */
  6367. #endif /* ANYX25 */
  6368. #ifndef NOSPL
  6369. case XXPAU:
  6370. return(hmsga(hxxpau));
  6371. case XXMSL:
  6372. return(hmsga(hxxmsl));
  6373. #endif /* NOSPL */
  6374. #ifdef TCPSOCKET
  6375. case XXPNG:
  6376. return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\
  6377. Checks if the given IP network host is reachable. Default host is from\n\
  6378. most recent SET HOST or TELNET command. Runs system PING program, if any.")
  6379. );
  6380. case XXFTP:
  6381. #ifdef SYSFTP
  6382. return(hmsg("Syntax: FTP [ IP-hostname-or-number ]\n\
  6383. Makes an FTP connection to the given IP host or, if no host specified, to\n\
  6384. the current host. Uses the system's FTP program, if any."));
  6385. #else
  6386. #ifndef NOFTP
  6387. return(doftphlp());
  6388. #endif /* NOFTP */
  6389. #endif /* SYSFTP */
  6390. #endif /* TCPSOCKET */
  6391. #ifndef NOFRILLS
  6392. case XXPRI:
  6393. #ifdef UNIX
  6394. return(hmsg("Syntax: PRINT file [ options ]\n\
  6395. Prints the local file on a local printer with the given options. Also see\n\
  6396. HELP SET PRINTER."));
  6397. #else
  6398. #ifdef VMS
  6399. return(hmsg("Syntax: PRINT file [ options ]\n\
  6400. Prints the local file on a local printer with the given options. Also see\n\
  6401. HELP SET PRINTER."));
  6402. #else
  6403. return(hmsg("Syntax: PRINT file\n\
  6404. Prints the local file on a local printer. Also see HELP SET PRINTER."));
  6405. #endif /* UNIX */
  6406. #endif /* VMS */
  6407. #endif /* NOFRILLS */
  6408. case XXPWD:
  6409. case XXLPWD:
  6410. return(hmsg("Syntax: PWD\n\
  6411. Print the name of the current working directory."));
  6412. #ifndef NOSPL
  6413. case XXREA:
  6414. return(hmsg("Syntax: READ variablename\n\
  6415. Reads a line from the currently open READ or !READ file into the variable\n\
  6416. (see OPEN)."));
  6417. #endif /* NOSPL */
  6418. #ifndef NOXFER
  6419. case XXREC:
  6420. return(hmsga(hmxxrc));
  6421. case XXREM:
  6422. y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
  6423. return(dohrmt(y));
  6424. #endif /* NOXFER */
  6425. #ifndef NOSPL
  6426. case XXRET:
  6427. return(hmsg("Syntax: RETURN [ value ]\n\
  6428. Return from a macro. An optional return value can be given for use with\n\
  6429. \\fexecute(macro), which allows macros to be used like functions."));
  6430. #endif /* NOSPL */
  6431. #ifndef NOXFER
  6432. case XXSEN:
  6433. return(hmsga(hmxxsen));
  6434. #ifdef OLDMOVE
  6435. case XXMOVE:
  6436. return(hmsg("MOVE is exactly like SEND, except each file that is\n\
  6437. sent successfully is deleted after it is sent."));
  6438. #endif /* OLDMOVE */
  6439. #ifndef NORESEND
  6440. case XXRSEN:
  6441. return(hmsg(hmxxrsen));
  6442. case XXREGET:
  6443. return(hmsg(hmxxrget));
  6444. case XXPSEN:
  6445. return(hmsg(hmxxpsen));
  6446. #endif /* NORESEND */
  6447. #ifndef NOSERVER
  6448. case XXSER:
  6449. return(hmsg(hmxxser));
  6450. #endif /* NOSERVER */
  6451. #endif /* NOXFER */
  6452. #ifndef NOJC
  6453. case XXSUS:
  6454. return(hmsg("Syntax: SUSPEND or Z\n\
  6455. Suspends Kermit. Continue Kermit with the appropriate system command,\n\
  6456. such as fg."));
  6457. #endif /* NOJC */
  6458. case XXSET:
  6459. y = cmkey(prmtab,nprm,"Parameter","",xxstring);
  6460. debug(F101,"HELP SET y","",y);
  6461. return(dohset(y));
  6462. #ifndef NOPUSH
  6463. case XXSHE:
  6464. if (nopush) {
  6465. if ((x = cmcfm()) < 0) return(x);
  6466. printf("Sorry, help not available for \"%s\"\n",cmdbuf);
  6467. break;
  6468. } else
  6469. return(hmsga(hxxshe));
  6470. #ifdef CK_REDIR
  6471. case XXFUN:
  6472. return(hmsg("Syntax: REDIRECT command\n\
  6473. Runs the given local command with its standard input and output redirected\n\
  6474. to the current SET LINE or SET HOST communications path.\n\
  6475. Synonym: < (Left angle bracket)."));
  6476. #endif /* CK_REDIR */
  6477. #ifdef CK_REXX
  6478. case XXREXX:
  6479. return(hmsg("Syntax: REXX text\n\
  6480. The text is a Rexx command to be executed. The \\v(rexx) variable is set\n\
  6481. to the Rexx command's return value.\n\
  6482. To execute a rexx program file, use: REXX call <filename>\n\
  6483. Rexx programs may call Kermit functions by placing the Kermit command\n\
  6484. in single quotes. For instance: 'set parity none'."));
  6485. #endif /* CK_REXX */
  6486. #endif /* NOPUSH */
  6487. #ifndef NOSHOW
  6488. case XXSHO:
  6489. return(hmsg("\
  6490. Display current values of various items (SET parameters, variables, etc).\n\
  6491. Type SHOW ? for a list of categories."));
  6492. #endif /* NOSHOW */
  6493. case XXSPA:
  6494. #ifdef datageneral
  6495. return(hmsg("\
  6496. Display disk usage in current device, directory,\n\
  6497. or return space for a specified device, directory."));
  6498. #else
  6499. return(hmsg("Syntax: SPACE\n\
  6500. Display disk usage in current device and/or directory"));
  6501. #endif
  6502. case XXSTA:
  6503. return(hmsg("Syntax: STATISTICS [/BRIEF]\n\
  6504. Display statistics about most recent file transfer"));
  6505. #ifndef NOSPL
  6506. case XXSTO:
  6507. return(hmsg("Syntax: STOP [ number [ message ] ]\n\
  6508. Stop executing the current macro or TAKE file and return immediately to\n\
  6509. the Kermit prompt. Number is a return code. Message printed if given."));
  6510. #endif /* NOSPL */
  6511. case XXTAK:
  6512. return(hmsga(hmxxtak));
  6513. #ifdef TCPSOCKET
  6514. #ifdef TNCODE
  6515. case XXIKSD:
  6516. return(hmsga(hmxxiks));
  6517. case XXTEL:
  6518. return(hmsga(hmxxtel));
  6519. case XXTELOP:
  6520. return(hmsga(hxtopt));
  6521. #endif /* TNCODE */
  6522. #ifdef RLOGCODE
  6523. case XXRLOG:
  6524. return(hmsg("Syntax: RLOGIN [ switches ] [ host [ username ] ]\n\
  6525. Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /RLOGIN,\n\
  6526. IF SUCCESS CONNECT. If host is omitted, the previous connection (if any)\n\
  6527. is resumed. Depending on how Kermit has been built switches may be\n\
  6528. available to require Kerberos authentication and DES encryption."));
  6529. #endif /* RLOGCODE */
  6530. #endif /* TCPSOCKET */
  6531. #ifndef NOXMIT
  6532. case XXTRA:
  6533. return(hmsga(hxxxmit));
  6534. #endif /* NOXMIT */
  6535. #ifndef NOFRILLS
  6536. case XXTYP:
  6537. return(hmsga(hmxxtyp));
  6538. case XXMORE:
  6539. return(hmsg("Syntax: MORE [ switches ] filename\n\
  6540. Equivalent to TYPE /PAGE filename; see HELP TYPE."));
  6541. case XXCAT:
  6542. return(hmsg("Syntax: MORE [ switches ] filename\n\
  6543. Equivalent to TYPE /NOPAGE filename; see HELP TYPE."));
  6544. case XXHEAD:
  6545. return(hmsg("Syntax: HEAD [ switches ] filename\n\
  6546. Equivalent to TYPE /HEAD filename; see HELP TYPE."));
  6547. case XXTAIL:
  6548. return(hmsg("Syntax: TAIL [ switches ] filename\n\
  6549. Equivalent to TYPE /TAIL filename; see HELP TYPE."));
  6550. #endif /* NOFRILLS */
  6551. #ifndef NOSPL
  6552. case XXWHI:
  6553. return(hmsga(whihlp));
  6554. case XXSWIT:
  6555. return(hmsga(swihlp));
  6556. #endif /* NOSPL */
  6557. #ifndef NOCSETS
  6558. case XXXLA:
  6559. return(hmsga(hxxxla));
  6560. #endif /* NOCSETS */
  6561. case XXVER:
  6562. return(hmsg("Syntax: VERSION\nDisplays the program version number."));
  6563. #ifndef NOSPL
  6564. case XXWAI:
  6565. return(hmsga(hxxwai));
  6566. #endif /* NOSPL */
  6567. #ifndef NOFRILLS
  6568. case XXWHO:
  6569. return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
  6570. case XXWRI:
  6571. return(hmsga(hxxwri));
  6572. case XXWRL:
  6573. return(hmsg(
  6574. "WRITE-LINE (WRITELN) is just like WRITE, but includes a line terminator\n\
  6575. at the end of text. See WRITE."));
  6576. #endif /* NOFRILLS */
  6577. #ifndef NOSPL
  6578. case XXIFX:
  6579. return(hmsga(ifxhlp));
  6580. case XXGETC: /* GETC */
  6581. return(hmsga(hxxgetc));
  6582. case XXFWD: /* FORWARD */
  6583. return(hmsg(
  6584. "Like GOTO, but searches only forward for the label. See GOTO."));
  6585. case XXLOCAL: /* LOCAL */
  6586. return(hmsg(
  6587. "Declares a variable to be local to the current macro or command file."));
  6588. #endif /* NOSPL */
  6589. case XXVIEW:
  6590. return(hmsg(
  6591. "View the terminal emulation screen even when there is no connection."));
  6592. #ifdef NEWFTP
  6593. case XXASC:
  6594. return(hmsg(
  6595. "Inhibits automatic transfer-mode switching and forces TEXT (ASCII) transfer\n\
  6596. mode for all files in both Kermit and FTP protocols."));
  6597. case XXBIN:
  6598. return(hmsg(
  6599. "Inhibits automatic transfer-mode switching and forces BINARY transfer mode\n\
  6600. for all files in both Kermit and FTP protocols."));
  6601. #else
  6602. case XXASC:
  6603. return(hmsg(
  6604. "Inhibits automatic transfer-mode switching and forces TEXT (ASCII) transfer\n\
  6605. mode for all files."));
  6606. case XXBIN:
  6607. return(hmsg(
  6608. "Inhibits automatic transfer-mode switching and forces BINARY transfer mode\n\
  6609. for all files."));
  6610. #endif /* NEWFTP */
  6611. case XXDATE:
  6612. return(hmsga(hmxxdate));
  6613. case XXRETR:
  6614. return(hmsg(
  6615. "Just like GET but asks the server to delete each file that has been\n\
  6616. sent successfully."));
  6617. case XXEIGHT:
  6618. return(hmsg(
  6619. "Equivalent to SET PARITY NONE, SET COMMAND BYTE 8, SET TERMINAL BYTE 8."));
  6620. case XXSAVE:
  6621. return(hmsga(hmxxsave));
  6622. #ifndef NOFRILLS
  6623. #ifndef NOPUSH
  6624. case XXEDIT:
  6625. return(hmsg("Syntax: EDIT [ <file> ]\n\
  6626. Starts your preferred editor on the given file, or if none given, the most\n\
  6627. recently edited file, if any. Also see SET EDITOR."));
  6628. #endif /* NOPUSH */
  6629. #endif /* NOFRILLS */
  6630. #ifdef BROWSER
  6631. case XXBROWS:
  6632. return(hmsg("Syntax: BROWSE [ <url> ]\n\
  6633. Starts your preferred Web browser on the given URL, or if none given, the\n\
  6634. most recently visited URL, if any. Also see SET BROWSER."));
  6635. #endif /* BROWSER */
  6636. #ifdef CK_TAPI
  6637. case XXTAPI:
  6638. return(hmsga(hxxtapi));
  6639. #endif /* CK_TAPI */
  6640. #ifdef PIPESEND
  6641. case XXCSEN:
  6642. return(hmsg("Syntax: CSEND [ switches ] <command> [ <as-name> ]\n\
  6643. Sends from the given <command> rather than from a file. Equivalent to\n\
  6644. SEND /COMMAND; see HELP SEND for details."));
  6645. case XXCREC:
  6646. return(hmsg("Syntax: CRECEIVE [ switches ] <command>\n\
  6647. Receives to the given <command> rather than to a file. Equivalent to\n\
  6648. RECEIVE /COMMAND; see HELP RECEIVE for details."));
  6649. case XXCGET:
  6650. return(hmsg("Syntax: CGET <remote-file-or-command> <local-command>\n\
  6651. Equivalent to GET /COMMAND; see HELP GET for details."));
  6652. #endif /* PIPESEND */
  6653. #ifndef NOSPL
  6654. case XXFUNC:
  6655. /*
  6656. Tricky parsing. We want to let them type the function name in any format
  6657. at all: \fblah(), \fblah, \\fblah(), fblah, blah, blah(), etc, but of course
  6658. only one of these is recognized by cmkey(). So we call cmkeyx() (the "no
  6659. complaints" version of cmkey()), and if it fails, we try the other formats
  6660. silently, and still allow for <no-name-given>, editing and reparse, etc.
  6661. */
  6662. y = cmkeyx(fnctab,nfuncs,"Name of function","",NULL);
  6663. if (y == -1) { /* Reparse needed */
  6664. return(y);
  6665. } else if (y == -3) {
  6666. if ((x = cmcfm()) < 0) /* For recall buffer... */
  6667. return(x);
  6668. return(dohfunc(y)); /* -3 gives general message */
  6669. }
  6670. if (y < 0) { /* Something given but didn't match */
  6671. int dummy;
  6672. char * p;
  6673. for (p = atmbuf; *p; p++) { /* Chop off trailing parens if any */
  6674. if (*p == '(') {
  6675. *p = NUL;
  6676. break;
  6677. }
  6678. }
  6679. /* Chop off leading "\\f" or "\f" or "f" */
  6680. p = atmbuf;
  6681. if (*p == CMDQ) /* Allow for \\f... */
  6682. p++;
  6683. if (*p == CMDQ && (*(p+1) == 'f' || *(p+1) == 'F')) { /* or \f */
  6684. p += 2;
  6685. } else if (*p == 'f' || *p == 'F') { /* or just f */
  6686. p++;
  6687. }
  6688. y = lookup(fnctab,p,nfuncs,&dummy); /* Look up the result */
  6689. }
  6690. if (y < 0) {
  6691. printf("?No such function - \"%s\"\n",atmbuf);
  6692. return(-9);
  6693. }
  6694. x = cmgbrk(); /* Find out how user terminated */
  6695. if (x == LF || x == CR) /* if with CR or LF */
  6696. cmflgs = 1; /* restore cmflgs to say so */
  6697. if ((x = cmcfm()) < 0) /* And THEN confirm so command will */
  6698. return(x); /* get into recall buffer. */
  6699. return(dohfunc(y));
  6700. #endif /* NOSPL */
  6701. #ifndef NOCMDL
  6702. case XXOPTS: /* Command-line options */
  6703. return(dohopts());
  6704. case XXXOPTS: /* Extended command-line options */
  6705. return(doxopts());
  6706. #endif /* NOCMDL */
  6707. #ifdef OS2
  6708. #ifndef NOKVERBS
  6709. case XXKVRB: {
  6710. y = cmkeyx(kverbs,nkverbs,"Name of keyboard verb without \\k","",NULL);
  6711. if (y == -1) { /* Reparse needed */
  6712. return(y);
  6713. } else if (y == -3) {
  6714. if ((x = cmcfm()) < 0) /* For recall buffer... */
  6715. return(x);
  6716. return(dohkverb(y)); /* -3 gives general message */
  6717. }
  6718. if (y < 0) { /* Something given but didn't match */
  6719. int dummy;
  6720. char * p;
  6721. for (p = atmbuf; *p; p++) { /* Chop off trailing parens if any */
  6722. if (*p == '(') {
  6723. *p = NUL;
  6724. break;
  6725. }
  6726. }
  6727. /* Chop off leading "\\k" or "\k" or "k" */
  6728. p = atmbuf;
  6729. if (*p == CMDQ) /* Allow for \\k... */
  6730. p++;
  6731. if (*p == CMDQ && (*(p+1) == 'k' || *(p+1) == 'K')) { /* or \k */
  6732. p += 2;
  6733. } else if (*p == 'k' || *p == 'K') { /* or just k */
  6734. p++;
  6735. }
  6736. y = lookup(kverbs,p,nkverbs,&dummy); /* Look up the result */
  6737. }
  6738. if (y < 0) {
  6739. printf("?No such function - \"%s\"\n",atmbuf);
  6740. return(-9);
  6741. }
  6742. x = cmgbrk(); /* Find out how user terminated */
  6743. if (x == LF || x == CR) /* if with CR or LF */
  6744. cmflgs = 1; /* restore cmflgs to say so */
  6745. if ((x = cmcfm()) < 0) /* And THEN confirm so command will */
  6746. return(x); /* get into recall buffer. */
  6747. return(dohkverb(y));
  6748. }
  6749. #endif /* NOKVERBS */
  6750. #endif /* OS2 */
  6751. case XXKERMI:
  6752. return(hmsg("Syntax: KERMIT [command-line-options]\n\
  6753. Lets you give command-line options at the prompt or in a script.\n\
  6754. HELP OPTIONS for more info."));
  6755. case XXBACK:
  6756. return(hmsg("Syntax: BACK\n Returns to your previous directory."));
  6757. case XXWHERE:
  6758. return(hmsg("Syntax: WHERE\n Tells where your transferred files went."));
  6759. #ifndef NOXFER
  6760. case XXREMV:
  6761. return(hmsga(hmxxremv));
  6762. #endif /* NOXFER */
  6763. #ifdef CK_KERBEROS
  6764. case XXAUTH:
  6765. return(hmsga(hmxxauth));
  6766. #endif /* CK_KERBEROS */
  6767. #ifndef NOHTTP
  6768. case XXHTTP:
  6769. return(hmsga(hmxxhttp));
  6770. #endif /* NOHTTP */
  6771. #ifdef NETCMD
  6772. case XXPIPE:
  6773. return(hmsg("Syntax: PIPE [ command ]\n\
  6774. Makes a connection through the program whose command line is given. Example:\n\
  6775. \n pipe rlogin xyzcorp.com"));
  6776. #endif /* NETCMD */
  6777. case XXSTATUS:
  6778. return(hmsg(
  6779. "STATUS is the same as SHOW STATUS; prints SUCCESS or FAILURE for the\n\
  6780. previous command."));
  6781. #ifndef NOSPL
  6782. case XXASSER:
  6783. return(hmsg("Syntax: ASSERT <condition>\n\
  6784. Succeeds or fails depending on <condition>; see HELP IF for <condition>s."));
  6785. case XXFAIL:
  6786. return(hmsg("Always fails."));
  6787. case XXSUCC:
  6788. return(hmsg("Always succeeds."));
  6789. #endif /* NOSPL */
  6790. #ifdef CK_LOGIN
  6791. case XXLOGOUT:
  6792. return(hmsg(
  6793. "If you haved logged in to Kermit as an Internet Kermit server, the LOGOUT\n\
  6794. command, given at the prompt, logs you out and closes your session."));
  6795. #endif /* CK_LOGIN */
  6796. case XXRESET:
  6797. return(hmsg("Closes all open files and logs."));
  6798. #ifndef NOCSETS
  6799. case XXASSOC:
  6800. return(hmsga(hmxxassoc));
  6801. #endif /* NOCSETS */
  6802. #ifndef NOSPL
  6803. case XXSHIFT:
  6804. return(hmsg("Syntax: SHIFT [ n ]\n\
  6805. Shifts script command line or macro or TAKE file argument variables\n\
  6806. \\%1..9 or \\&_[1..n] n places to the left; default n = 1."));
  6807. #endif /* NOSPL */
  6808. #ifndef NOPUSH
  6809. case XXMAN:
  6810. #ifdef UNIX
  6811. return(hmsg("Syntax: MANUAL [ topic ]\n\
  6812. Runs the \"man\" command on the given topic (default \"kermit\")."));
  6813. #else
  6814. #ifdef OS2
  6815. return(hmsg("Syntax: MANUAL\n\
  6816. Accesses the HTML manual using the current browser."));
  6817. #else
  6818. return(hmsg("Syntax: MANUAL [ topic ]\n\
  6819. Runs the \"help\" command on the given topic (default \"kermit\")."));
  6820. #endif /* OS2 */
  6821. #endif /* UNIX */
  6822. #endif /* NOPUSH */
  6823. case XXWILD:
  6824. return(hmsga(hmxxwild));
  6825. #ifdef LOCUS
  6826. case XXLOCU:
  6827. return(hmsga(hmxylocus));
  6828. #endif /* LOCUS */
  6829. case XXPAT:
  6830. return(hmsga(hmxxpat));
  6831. #ifndef NOXFER
  6832. case XXFAST:
  6833. case XXCAU:
  6834. case XXROB:
  6835. return(hmsga(hmxxfast));
  6836. #endif /* NOXFER */
  6837. #ifdef CKPURGE
  6838. case XXPURGE:
  6839. return(hmsga(hmxxpurge));
  6840. #else
  6841. #ifdef VMS
  6842. case XXPURGE:
  6843. return(hmsga(hmxxpurge));
  6844. #endif /* VMS */
  6845. #endif /* CKPURGE */
  6846. #ifndef NOXFER
  6847. case XXRASG:
  6848. return(hmsg(" RASG and RASSIGN are short forms of REMOTE ASSIGN."));
  6849. case XXRCWD:
  6850. return(hmsg(" RCD and RCWD are short forms of REMOTE CD."));
  6851. case XXRCPY:
  6852. return(hmsg(" RCOPY is a short form of REMOTE COPY."));
  6853. case XXRDEL:
  6854. return(hmsg(" RDELETE is a short form of REMOTE RELETE."));
  6855. case XXRDIR:
  6856. return(hmsg(" RDIRECTORY is a short form of REMOTE DIRECTORY."));
  6857. case XXRXIT:
  6858. return(hmsg(" REXIT is a short form of REMOTE EXIT."));
  6859. case XXRHLP:
  6860. return(hmsg(" RHELP is a short form of REMOTE HELP."));
  6861. case XXRHOS:
  6862. return(hmsg(" RHOST is a short form of REMOTE HOST."));
  6863. case XXRKER:
  6864. return(hmsg(" RKERMIT is a short form of REMOTE KERMIT."));
  6865. case XXRMKD:
  6866. return(hmsg(" RMKDIR is a short form of REMOTE MKDIR."));
  6867. case XXRMSG:
  6868. return(hmsg(" RMESSAGE and RMSG are short forms of REMOTE MESSAGE."));
  6869. case XXRPRI:
  6870. return(hmsg(" RPRINT is a short form of REMOTE PRINT."));
  6871. case XXRPWD:
  6872. return(hmsg(" RPWD is a short form of REMOTE PWD."));
  6873. case XXRQUE:
  6874. return(hmsg(" QUERY and RQUERY are short forms of REMOTE QUERY."));
  6875. case XXRREN:
  6876. return(hmsg(" RRENAME is a short form of REMOTE RENAME."));
  6877. case XXRRMD:
  6878. return(hmsg(" RRMDIR is a short form of REMOTE RMDIR."));
  6879. case XXRSET:
  6880. return(hmsg(" RSET is a short form of REMOTE SET."));
  6881. case XXRSPA:
  6882. return(hmsg(" RSPACE is a short form of REMOTE SPACE."));
  6883. case XXRTYP:
  6884. return(hmsg(" RTYPE is a short form of REMOTE TYPE."));
  6885. case XXRWHO:
  6886. return(hmsg(" RWHO is a short form of REMOTE WHO."));
  6887. #endif /* NOXFER */
  6888. case XXSCRN:
  6889. return(hmsga(hmxxscrn));
  6890. #ifdef CKEXEC
  6891. case XXEXEC:
  6892. return(hmsg("Syntax: EXEC <command> [ <arg1> [ <arg2> [ ... ] ]\n\
  6893. C-Kermit overlays itself with the given system command and starts it with\n\
  6894. the given arguments. Upon any error, control returns to C-Kermit."));
  6895. #endif /* CKEXEC */
  6896. #ifndef NOSPL
  6897. case XXTRACE:
  6898. return(hmsg(
  6899. "Syntax: TRACE { /ON, /OFF } { ASSIGNMENTS, COMMAND-LEVEL, ALL }\n\
  6900. Turns tracing of the given object on or off."));
  6901. #endif /* NOSPL */
  6902. #ifdef CK_PERMS
  6903. #ifdef UNIX
  6904. case XXCHMOD:
  6905. return(hmsga(hmxxchmod));
  6906. #endif /* UNIX */
  6907. #endif /* CK_PERMS */
  6908. #ifdef CKROOT
  6909. case XXCHRT:
  6910. return(hmsga(hmxxchroot));
  6911. #endif /* CKROOT */
  6912. #ifndef NOSPL
  6913. case XXPROMP:
  6914. return(hmsga(hmxxprompt));
  6915. #endif /* NOSPL */
  6916. case XXGREP:
  6917. return(hmsga(hmxxgrep));
  6918. #ifndef NOSEXP
  6919. #ifndef NOSPL
  6920. case XXSEXP:
  6921. return(hmsga(hmxxsexp));
  6922. #endif /* NOSPL */
  6923. #endif /* NOSEXP */
  6924. #ifdef CKLEARN
  6925. case XXLEARN:
  6926. return(hmsga(hmxxlearn));
  6927. #endif /* CKLEARN */
  6928. #ifdef ANYSSH
  6929. case XXSSH:
  6930. return(hmsga(hmxxssh));
  6931. #endif /* ANYSSH */
  6932. #ifdef TCPSOCKET
  6933. case XXFIREW:
  6934. return(hmsga(hmxxfirew));
  6935. #endif /* TCPSOCKET */
  6936. #ifdef NEWFTP
  6937. case XXUSER:
  6938. return(hmsg(" Equivalent to FTP USER."));
  6939. case XXACCT:
  6940. return(hmsg(" Equivalent to FTP ACCOUNT."));
  6941. #endif /* NEWFTP */
  6942. case XXORIE:
  6943. return(hmsg(" Shows the directories important to Kermit."));
  6944. case XXCONT:
  6945. return(hmsg(" In a FOR or WHILE loop: continue the loop.\n\
  6946. At the prompt: continue a script that has \"shelled out\" to the prompt."));
  6947. case XXREDO:
  6948. return(hmsg(" Syntax: REDO xxx (or) ^xxx\n\
  6949. Re-executes the most recent command starting with xxx."));
  6950. #ifdef UNIX
  6951. #ifndef NOPUTENV
  6952. case XXPUTE:
  6953. return(hmsga(hmxxputenv));
  6954. #endif /* NOPUTENV */
  6955. #endif /* UNIX */
  6956. case XXNOTAV:
  6957. return(hmsg(" This command is not configured in this version of Kermit."));
  6958. default: {
  6959. char *s;
  6960. if ((x = cmcfm()) < 0) return(x);
  6961. s = cmdbuf + (int)strlen(cmdbuf) -1;
  6962. while (s >= cmdbuf && *s == SP)
  6963. *s-- = NUL;
  6964. while (s >= cmdbuf && *s != SP)
  6965. s--;
  6966. while (*s == SP) s++;
  6967. printf("Sorry, help not available for \"%s\"\n",s);
  6968. break;
  6969. }
  6970. } /* switch */
  6971. #endif /* NOHELP */
  6972. return(success = 0);
  6973. }
  6974. /* H M S G -- Get confirmation, then print the given message */
  6975. int
  6976. hmsg(s) char *s; {
  6977. int x;
  6978. if ((x = cmcfm()) < 0) return(x);
  6979. printf("\n%s\n\n",s);
  6980. return(0);
  6981. }
  6982. #ifdef NOHELP
  6983. int /* Print an array of lines, */
  6984. hmsga(s) char *s[]; { /* cheap version. */
  6985. int i;
  6986. if ((i = cmcfm()) < 0) return(i);
  6987. printf("\n"); /* Start off with a blank line */
  6988. for (i = 0; *s[i]; i++) { /* Print each line. */
  6989. printf("%s\n",s[i]);
  6990. }
  6991. printf("\n");
  6992. return(0);
  6993. }
  6994. #else /* NOHELP not defined... */
  6995. int /* Print an array of lines, */
  6996. hmsga(s) char *s[]; { /* pausing at end of each screen. */
  6997. extern int hmtopline; /* (This should be a parameter...) */
  6998. int x, y, i, j, k, n;
  6999. if ((x = cmcfm()) < 0) return(x);
  7000. #ifdef CK_TTGWSIZ
  7001. #ifdef OS2
  7002. ttgcwsz();
  7003. #else /* OS2 */
  7004. /* Check whether window size changed */
  7005. if (ttgwsiz() > 0) {
  7006. if (tt_rows > 0 && tt_cols > 0) {
  7007. cmd_rows = tt_rows;
  7008. cmd_cols = tt_cols;
  7009. }
  7010. }
  7011. #endif /* OS2 */
  7012. #endif /* CK_TTGWSIZ */
  7013. printf("\n"); /* Start off with a blank line */
  7014. n = (hmtopline > 0) ? hmtopline : 1; /* Line counter */
  7015. for (i = 0; *s[i]; i++) {
  7016. printf("%s\n",s[i]); /* Print a line. */
  7017. y = (int)strlen(s[i]);
  7018. k = 1;
  7019. for (j = 0; j < y; j++) /* See how many newlines were */
  7020. if (s[i][j] == '\n') k++; /* in the string... */
  7021. n += k;
  7022. if (n > (cmd_rows - 3) && *s[i+1]) /* After a screenful, give them */
  7023. if (!askmore()) return(0); /* a "more?" prompt. */
  7024. else n = 0;
  7025. }
  7026. printf("\n");
  7027. return(0);
  7028. }
  7029. #ifndef NOFRILLS
  7030. static char * supporttext[] = {
  7031. "Live technical support for Kermit software is no longer available",
  7032. "from Columbia University, as it was from mid-1981 until mid-2011 when",
  7033. "the Kermit Project was cancelled. Beginning with version 9.0, C-Kermit",
  7034. "is Open Source software. The Kermit project has been moved to:",
  7035. " ",
  7036. " http://www.kermitproject.org/",
  7037. " ",
  7038. "The C-Kermit home page is here:",
  7039. " ",
  7040. " http://www.kermitproject.org/ckermit.html",
  7041. " ",
  7042. "The documentation for C-Kermit is listed here:",
  7043. " ",
  7044. " http://www.kermitproject.org/ckermit.html#doc",
  7045. " ",
  7046. "Z C-Kermit tutorial is here:",
  7047. " ",
  7048. " http://www.kermitproject.org/ckututor.html",
  7049. " ",
  7050. "The C-Kermit Frequently Asked Questions page is here:",
  7051. " ",
  7052. " http://www.kermitproject.org/ckfaq.html",
  7053. " ",
  7054. "and the Kermit Project Technical Support page is here:",
  7055. " ",
  7056. " http://www.kermitproject.org/support.html",
  7057. " ",
  7058. "If you have a problem or question that is not addressed on the website",
  7059. "you can send email to:",
  7060. " ",
  7061. " support@kermitproject.org",
  7062. " ",
  7063. "and as long as anyone is still at that address, it will be answered",
  7064. "on a best-effort basis.",
  7065. ""
  7066. };
  7067. /* Do the BUG command */
  7068. int
  7069. dobug() {
  7070. return(hmsga(supporttext));
  7071. }
  7072. #endif /* NOFRILLS */
  7073. #ifndef NOXMIT
  7074. static char *hsetxmit[] = {
  7075. "Syntax: SET TRANSMIT parameter value",
  7076. " ",
  7077. "Controls the behavior of the TRANSMIT command (see HELP TRANSMIT):",
  7078. " ",
  7079. "SET TRANSMIT ECHO { ON, OFF }",
  7080. " Whether to echo text to your screen as it is being transmitted.",
  7081. " ",
  7082. "SET TRANSMIT EOF text",
  7083. " Text to send after end of file is reached, e.g. \\4 for Ctrl-D",
  7084. " ",
  7085. "SET TRANSMIT FILL number",
  7086. " ASCII value of a character to insert into blank lines, 0 for none.",
  7087. " Applies only to text mode. 0 by default.",
  7088. " ",
  7089. "SET TRANSMIT LINEFEED { ON, OFF }",
  7090. " Transmit Linefeed as well as Carriage Return (CR) at the end of each line.",
  7091. " Normally, only CR is sent.",
  7092. " ",
  7093. "SET TRANSMIT LOCKING-SHIFT { ON, OFF }",
  7094. " Whether to use SO/SI for transmitting 8-bit data when PARITY is not NONE.",
  7095. " ",
  7096. "SET TRANSMIT PAUSE number",
  7097. " How many milliseconds to pause after transmitting each line (text mode),",
  7098. " or each character (binary mode).",
  7099. " ",
  7100. "SET TRANSMIT PROMPT number",
  7101. " ASCII value of character to look for from host before sending next line",
  7102. " when TRANSMITting in text mode; normally 10 (Linefeed). 0 means none;",
  7103. " don't wait for a prompt.",
  7104. " ",
  7105. "SET TRANSMIT TIMEOUT number",
  7106. " Number of seconds to wait for each character to echo when TRANSMIT ECHO",
  7107. " is ON or TRANSMIT PROMPT is not 0. If 0 is specified, this means wait",
  7108. " indefinitely for each echo.",
  7109. " ",
  7110. "Synonym: SET XMIT. SHOW TRANSMIT displays current settings.",
  7111. "" };
  7112. #endif /* NOXMIT */
  7113. static char *hsetbkg[] = {
  7114. "Syntax: SET BACKGROUND { OFF, ON }",
  7115. " ",
  7116. " SET BACKGROUND OFF forces prompts and messages to appear on your screen",
  7117. " even though Kermit thinks it is running in the background.",
  7118. "" };
  7119. #ifdef DYNAMIC
  7120. static char *hsetbuf[] = {
  7121. "Syntax: SET BUFFERS n1 [ n2 ]",
  7122. " ",
  7123. " Changes the overall amount of memory allocated for SEND and RECEIVE packet",
  7124. " buffers, respectively. Bigger numbers let you have longer packets and",
  7125. " more window slots. If n2 is omitted, the same value as n1 is used.",
  7126. #ifdef BIGBUFOK
  7127. " ",
  7128. " NOTE: This command is not needed in this version of Kermit, which is",
  7129. " already configured for maximum-size packet buffers.",
  7130. #endif /* BIGBUFOK */
  7131. "" };
  7132. #endif /* DYNAMIC */
  7133. static char *hsetcmd[] = {
  7134. "Syntax: SET COMMAND parameter value",
  7135. " ",
  7136. #ifdef CK_AUTODL
  7137. "SET COMMAND AUTODOWNLOAD { ON, OFF }",
  7138. " Enables/Disables automatic recognition of Kermit packets while in",
  7139. " command mode. ON by default.",
  7140. " ",
  7141. #endif /* CK_AUTODL */
  7142. "SET COMMAND BYTESIZE { 7, 8 }",
  7143. " Informs Kermit of the bytesize of the communication path between itself",
  7144. " and your keyboard and screen. 8 is assumed. SET COMMAND BYTE 7 only if",
  7145. " 8-bit characters cannot pass.",
  7146. " ",
  7147. #ifdef OS2
  7148. "SET COMMAND COLOR <foreground-color> <background-color>",
  7149. " Lets you choose colors for Command screen. Use ? in the color fields to",
  7150. " to get lists of available colors.",
  7151. " ",
  7152. "SET COMMAND CURSOR-POSITION <row> <column>",
  7153. " Moves the command-screen cursor to the given position (1-based). This",
  7154. " command should be used in scripts instead of relying on ANSI.SYS escape",
  7155. " sequences.",
  7156. " ",
  7157. #endif /* OS2 */
  7158. "SET COMMAND ERROR { 0,1,2,3 }",
  7159. " Sets the verbosity level of command error messages; the higher the number,",
  7160. " the more verbose the message. The default is 1. Higher values are",
  7161. " useful only for debugging scripts.",
  7162. " ",
  7163. #ifdef OS2
  7164. #ifdef NT
  7165. "SET COMMAND HEIGHT <number>",
  7166. " Changes the number of rows (lines) in your command screen, not",
  7167. " counting the status line. Recommended values are 24, 42, and 49 (or 25,",
  7168. " 43, and 50 if SET COMMAND STATUSLINE is OFF.)",
  7169. #else
  7170. "SET COMMAND HEIGHT <number>"
  7171. " Changes the number of rows (lines) in your command screen, not",
  7172. " counting the status line. Windowed sessions can use any value from 8 to",
  7173. " 101. Fullscreen sessions are limited to 24, 42, 49, or 59. Not all"
  7174. " heights are supported by all video adapters.",
  7175. #endif /* NT */
  7176. #else /* OS2 */
  7177. "SET COMMAND HEIGHT <number>",
  7178. " Informs Kermit of the number of rows in your command screen for the",
  7179. " purposes of More?-prompting.",
  7180. #endif /* OS2 */
  7181. " ",
  7182. "SET COMMAND WIDTH <number>",
  7183. " Informs Kermit of the number of characters across your screen for",
  7184. " purposes of screen formatting.",
  7185. " ",
  7186. "SET COMMAND MORE-PROMPTING { ON, OFF }",
  7187. " ON (the default) enables More?-prompting when Kermit needs to display",
  7188. " text that does not fit vertically on your screen. OFF allows the text to",
  7189. " scroll by without intervention. If your command window has scroll bars,",
  7190. " you might prefer OFF.",
  7191. " ",
  7192. #ifdef CK_RECALL
  7193. "SET COMMAND RECALL-BUFFER-SIZE number",
  7194. " How big you want Kermit's command recall buffer to be. By default, it",
  7195. " holds 10 commands. You can make it any size you like, subject to memory",
  7196. " constraints of the computer. A size of 0 disables command recall.",
  7197. " Whenever you give this command, previous command history is lost.",
  7198. " ",
  7199. #endif /* CK_RECALL */
  7200. "SET COMMAND QUOTING { ON, OFF }",
  7201. " Whether to treat backslash and question mark as special characters (ON),",
  7202. " or as ordinary data characters (OFF) in commands. ON by default.",
  7203. " ",
  7204. #ifdef DOUBLEQUOTING
  7205. "SET COMMAND DOUBLEQUOTING { ON, OFF }",
  7206. " Whether to allow doublequotes (\") to be used to enclose fields,",
  7207. " filenames, directory names, and macro arguments that might contain",
  7208. " spaces. ON by default; use OFF to force compatibility with older",
  7209. " versions.",
  7210. " ",
  7211. #endif /* DOUBLEQUOTING */
  7212. #ifdef CK_RECALL
  7213. "SET COMMAND RETRY { ON, OFF }",
  7214. " Whether to reprompt you with the correct but incomplete portion of a",
  7215. " syntactically incorrect command. ON by default.",
  7216. " ",
  7217. #endif /* CK_RECALL */
  7218. #ifdef OS2
  7219. "SET COMMAND SCROLLBACK <lines>",
  7220. " Sets size of virtual Command screen buffer to the given number of lines,",
  7221. " which includes the active Command screen. The minimum is 256. The max",
  7222. " is 2 million. The default is 512.",
  7223. " ",
  7224. "SET COMMAND STATUSLINE { ON, OFF }",
  7225. " ON (default) enables the Kermit status line in the command screen.",
  7226. " OFF removes it, making the line available for use by the host.",
  7227. " ",
  7228. #endif /* OS2 */
  7229. "Use SHOW COMMAND to display these settings.",
  7230. "" };
  7231. #ifndef NOLOCAL
  7232. static char *hsetcar[] = {
  7233. "Syntax: SET CARRIER-WATCH { AUTO, OFF, ON }",
  7234. " ",
  7235. " Attempts to control treatment of carrier (the Data Carrier Detect signal)",
  7236. " on serial communication (SET LINE or SET PORT) devices. ON means that",
  7237. " carrier is required at all times. OFF means carrier is never required.",
  7238. " AUTO (the default) means carrier is required at all times except during",
  7239. " the DIAL command. Correct operation of carrier-watch depends on the",
  7240. " capabilities of the underlying OS, drivers, devices, and cables. If you",
  7241. " need to CONNECT to a serial device that is not asserting carrier, and",
  7242. " Kermit won't let you, use SET CARRIER-WATCH OFF. Use SHOW COMMUNICATIONS",
  7243. " to display the CARRIER-WATCH setting.",
  7244. "" };
  7245. #endif /* NOLOCAL */
  7246. static char *hsetat[] = {
  7247. "Syntax: SET ATTRIBUTES name ON or OFF",
  7248. " ",
  7249. " Use this command to enable (ON) or disable (OFF) the transmission of",
  7250. " selected file attributes along with each file, and to handle or ignore",
  7251. " selected incoming file attributes, including:",
  7252. " ",
  7253. #ifndef NOCSETS
  7254. " CHARACTER-SET: The transfer character set for text files",
  7255. #endif /* NOCSETS */
  7256. " DATE: The file's creation date",
  7257. " DISPOSITION: Unusual things to do with the file, like MAIL or PRINT",
  7258. " LENGTH: The file's length",
  7259. " PROTECTION: The file's protection (permissions)",
  7260. " SYSTEM-ID: Machine/Operating system of origin",
  7261. " TYPE: The file's type (text or binary)",
  7262. " ",
  7263. "You can also specify ALL to select all of them. Examples:",
  7264. " ",
  7265. " SET ATTR DATE OFF",
  7266. " SET ATTR LENGTH ON",
  7267. " SET ATTR ALL OFF",
  7268. " ",
  7269. "Also see HELP SET SEND and HELP SET RECEIVE.",
  7270. ""
  7271. };
  7272. static char *hxytak[] = {
  7273. "Syntax: SET TAKE parameter value",
  7274. " ",
  7275. " Controls behavior of TAKE command:",
  7276. " ",
  7277. "SET TAKE ECHO { ON, OFF }",
  7278. " Tells whether commands read from a TAKE file should be displayed on the",
  7279. " screen (if so, each command is shown at the time it is read, and labeled",
  7280. " with a line number).",
  7281. " ",
  7282. "SET TAKE ERROR { ON, OFF }",
  7283. " Tells whether a TAKE command file should be automatically terminated when",
  7284. " a command fails. This setting is local to the current command file, and",
  7285. " inherited by subordinate command files.",
  7286. "" };
  7287. #ifndef NOLOCAL
  7288. #ifdef OS2MOUSE
  7289. static char *hxymouse[] = {
  7290. "Syntax: SET MOUSE ACTIVATE { ON, OFF }",
  7291. " Enables or disables the mouse in Connect mode. Default is ON",
  7292. " ",
  7293. "Syntax: SET MOUSE BUTTON <number> <key-modifier> <action> [ <text> ]",
  7294. " where:",
  7295. " <number> is the mouse button number, 1, 2, or 3;",
  7296. " <key-modifier> denotes modifier keys held down during the mouse event:",
  7297. " ALT, ALT-SHIFT, CTRL, CTRL-ALT CTRL-ALT-SHIFT, CTRL-SHIFT, SHIFT, NONE;",
  7298. " <action> is the mouse action, CLICK, DRAG, or DOUBLE-CLICK.",
  7299. " ",
  7300. " The <text> has exactly the same properties as the <text> from the SET KEY",
  7301. " command -- it can be a character, a string, one or more Kverbs, a macro",
  7302. " invoked as a Kverb, or any combination of these. Thus, anything that can",
  7303. " be assigned to a key can also be assigned to the mouse -- and vice versa.",
  7304. " If the <text> is omitted, the action will be ignored. Examples:",
  7305. " ",
  7306. " SET MOUSE BUTTON 1 NONE DOUBLE \\KmouseCurPos",
  7307. " SET MOU B 2 SHIFT CLICK help\\13",
  7308. " ",
  7309. " DRAG operations perform a \"mark mode\" selection of Text. You should",
  7310. " assign only the following actions to drag operations:",
  7311. " ",
  7312. " \\Kdump - copy marked text to printer (or file)",
  7313. " \\Kmarkcopyclip - copy marked text to PM Clipboard",
  7314. " \\Kmarkcopyhost - copy marked text direct to Host",
  7315. " \\Kmousemark - mark text, no copy operation performed",
  7316. " ",
  7317. " The following Kverb is only for use with the mouse:",
  7318. " ",
  7319. " \\KmouseCurPos",
  7320. " ",
  7321. " which represents the mouse-directed terminal cursor feature.",
  7322. " ",
  7323. "Syntax: SET MOUSE CLEAR",
  7324. " Restores all mouse events to their default definitions",
  7325. " Button 1 Ctrl-Click = Kverb: \\Kmouseurl",
  7326. " Button 1 Double-Click = Kverb: \\Kmousecurpos",
  7327. " Button 1 Drag = Kverb: \\Kmarkcopyclip",
  7328. " Button 1 Alt-Drag = Kverb: \\Kmarkcopyclip_noeol",
  7329. " Button 1 Ctrl-Drag = Kverb: \\Kmarkcopyhost",
  7330. " Button 1 Ctrl-Alt-Drag = Kverb: \\Kmarkcopyhost_noeol",
  7331. " Button 1 Ctrl-Shift-Drag = Kverb: \\Kdump",
  7332. " Button 2 Double-Click = Kverb: \\Kpaste",
  7333. " Button 2 Drag = Kverb: \\Kmarkcopyhost",
  7334. " Button 2 Alt-Drag = Kverb: \\Kmarkcopyhost_noeol ",
  7335. " Button 3 Double-Click = Kverb: \\Kpaste",
  7336. ""};
  7337. #endif /* OS2MOUSE */
  7338. static char *hxyterm[] = {
  7339. "Syntax: SET TERMINAL parameter value",
  7340. " ",
  7341. #ifdef OS2
  7342. "SET TERMINAL TYPE { ANSI, VT52, VT100, VT102, VT220, VT320, ... }",
  7343. " Selects type type of terminal to emulate. Type SET TERMINAL TYPE ? to",
  7344. " see a complete list.",
  7345. " ",
  7346. "SET TERMINAL ANSWERBACK { OFF, ON }",
  7347. " Disables/enables the ENQ/Answerback sequence (Kermit version term-type).",
  7348. " ",
  7349. "SET TERMINAL ANSWERBACK MESSAGE <extension>",
  7350. " Allows you to specify an extension to the default answerback message.",
  7351. " ",
  7352. #else
  7353. "SET TERMINAL TYPE ...",
  7354. " This command is not available because this version of Kermit does not",
  7355. " include a terminal emulator. Instead, it is a \"semitransparent pipe\"",
  7356. " (or a totally transparent one, if you configure it that way) to the",
  7357. " computer or service you have made a connection to. Your console,",
  7358. " workstation window, or the terminal emulator or terminal from which you",
  7359. " are running Kermit provides the emulation.",
  7360. " ",
  7361. #endif /* OS2 */
  7362. #ifdef CK_APC
  7363. "SET TERMINAL APC { ON, OFF, NO-INPUT, NO-INPUT-UNCHECKED, UNCHECKED }",
  7364. #ifdef OS2
  7365. " Controls execution of Application Program Commands sent by the host while",
  7366. " Kermit is either in CONNECT mode or processing INPUT commands. ON allows",
  7367. " execution of \"safe\" commands and disallows potentially dangerous ones",
  7368. " such as DELETE, RENAME, OUTPUT, and RUN. OFF prevents execution of APCs.",
  7369. " UNCHECKED allows execution of all APCs. OFF is the default.",
  7370. #else /* OS2 */
  7371. " Controls execution of Application Program Commands sent by the host while",
  7372. " C-Kermit is in CONNECT mode. ON allows execution of \"safe\" commands and",
  7373. " disallows potentially dangerous commands such as DELETE, RENAME, OUTPUT,",
  7374. " and RUN. OFF prevents execution of APCs. UNCHECKED allows execution of",
  7375. " all APCs. OFF is the default.",
  7376. #endif /* OS2 */
  7377. " ",
  7378. #endif /* CK_APC */
  7379. #ifdef OS2
  7380. "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
  7381. " Sets the mode for the arrow keys during VT terminal emulation.",
  7382. " ",
  7383. "SET TERMINAL ATTRIBUTE { BLINK, DIM, PROTECTED, REVERSE, UNDERLINE }",
  7384. " Determines how attributes are displayed in the Terminal window.",
  7385. " ",
  7386. "SET TERMINAL ATTRIBUTE { BLINK, DIM, REVERSE, UNDERLINE } { ON, OFF }",
  7387. " Determines whether real Blinking, Dim, Reverse, and Underline are used in",
  7388. " the terminal display. When BLINK is turned OFF, reverse background",
  7389. " intensity is used. When DIM is turned OFF, dim characters appear BOLD.",
  7390. " When REVERSE and UNDERLINE are OFF, the colors selected with SET",
  7391. " TERMINAL COLOR { REVERSE,UNDERLINE } are used instead. This command",
  7392. " affects the entire current screen and terminal scrollback buffer.",
  7393. " ",
  7394. "SET TERMINAL ATTRIBUTE PROTECTED [ -",
  7395. " { BOLD, DIM, INVISIBLE, NORMAL, REVERSE, UNDERLINED } ]",
  7396. " Sets the attributes used to represent Protected text in Wyse and Televideo",
  7397. " terminal emulations. Any combination of attributes may be used. The",
  7398. " default is DIM.)",
  7399. " ",
  7400. #endif /* OS2 */
  7401. #ifdef OS2
  7402. #ifdef CK_XYZ
  7403. "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
  7404. " enables/disables automatic switching into file-transfer mode when a Kermit",
  7405. " or ZMODEM file transfer has been detected during CONNECT mode or while",
  7406. " an INPUT command is active. Default is OFF.",
  7407. #else
  7408. "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
  7409. " enables/disables automatic switching into file-transfer mode when a Kermit",
  7410. " file transfer has been detected during CONNECT mode or while an INPUT",
  7411. " command is active. Default is OFF.",
  7412. #endif /* CK_XYZ */
  7413. " ",
  7414. " When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
  7415. " tells what to do if an error occurs during a file transfer or other",
  7416. " protocol operation initiated by the terminal emulator: STOP (the default)",
  7417. " means to remain in command mode so you can see what happened; CONTINUE",
  7418. " means to resume the CONNECT session (e.g. so a far-end script can continue",
  7419. " its work).",
  7420. " ",
  7421. #ifdef CK_XYZ
  7422. "SET TERM... AUTO... { KERMIT, ZMODEM } C0-CONFLICTS { IGNORED, PROCESSED }",
  7423. " Determines whether the active terminal emulator should process or ignore",
  7424. " C0 control characters which are also used for the specified file transfer",
  7425. " protocol. Kermit by default uses ^A (SOH) and Zmodem uses ^X (CAN).",
  7426. " Default is PROCESSED.",
  7427. " ",
  7428. "SET TERM... AUTO... { KERMIT, ZMODEM } DETECTION-METHOD { PACKET, STRING }",
  7429. " Determines whether the specified file transfer protocol should be detected",
  7430. " by looking for valid packets or by identifying a specified text string.",
  7431. " Default is PACKET.",
  7432. " ",
  7433. "SET TERM... AUTO... { KERMIT, ZMODEM } STRING <text>",
  7434. " Lets you assign an autodownload detection string for use with the",
  7435. " specified file transfer protocol.",
  7436. " Default for Kermit is \"READY TO SEND...\", for Zmodem is \"rz\\{13}\".",
  7437. " ",
  7438. #else /* CK_XYZ */
  7439. "SET TERM... AUTO... KERMIT C0-CONFLICTS { IGNORED, PROCESSED }",
  7440. " Determines whether the active terminal emulator should process or ignore",
  7441. " C0 control characters which are also used for the specified file transfer",
  7442. " protocol. Kermit by default uses ^A <SOH>. Default is PROCESSED.",
  7443. " ",
  7444. "SET TERM... AUTO... KERMIT DETECTION-METHOD { PACKET, STRING }",
  7445. " Determines whether the specified file transfer protocol should be detected",
  7446. " by looking for valid packets or by identifying a specified text string.",
  7447. " Default is PACKET.",
  7448. " ",
  7449. "SET TERM... AUTO... KERMIT STRING <text>",
  7450. " Lets you assign an autodownload detection string for use with the",
  7451. " specified file transfer protocol. Default is \"READY TO SEND...\".",
  7452. " ",
  7453. #endif /* CK_XYZ */
  7454. "SET TERMINAL AUTOPAGE { ON, OFF }",
  7455. " ",
  7456. "SET TERMINAL AUTOSCROLL { ON, OFF }",
  7457. " ",
  7458. #else /* OS2 */
  7459. "SET TERMINAL AUTODOWNLOAD { ON, OFF, ERROR { STOP, CONTINUE } }",
  7460. " Enables/disables automatic switching into file-transfer mode when a valid",
  7461. #ifdef CK_XYZ
  7462. " Kermit or ZMODEM packet of the appropriate type is received during CONNECT",
  7463. " mode. Default is OFF.",
  7464. #else
  7465. " Kermit packet of the appropriate type is received during CONNECT mode.",
  7466. " Default is OFF.",
  7467. #endif /* CK_XYZ */
  7468. " ",
  7469. " When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting",
  7470. " tells what to do if an error occurs during a file transfer or other",
  7471. " protocol operation initiated by the terminal emulator: STOP (the default)",
  7472. " means to remain in command mode so you can see what happened; CONTINUE",
  7473. " means to resume the CONNECT session (e.g. so a far-end script can continue",
  7474. " its work).",
  7475. " ",
  7476. #endif /* OS2 */
  7477. #ifdef OS2
  7478. "SET TERMINAL BELL { AUDIBLE, VISIBLE, NONE }",
  7479. " Specifies how Control-G (bell) characters are handled. AUDIBLE means",
  7480. " a beep is sounded; VISIBLE means the screen is flashed momentarily.",
  7481. " ",
  7482. " (This command has been superseded by SET BELL.)",
  7483. " ",
  7484. #endif /* OS2 */
  7485. "SET TERMINAL BYTESIZE { 7, 8 }",
  7486. " Use 7- or 8-bit characters between Kermit and the remote computer during",
  7487. " terminal sessions. The default is 8.",
  7488. " ",
  7489. #ifndef NOCSETS
  7490. #ifdef OS2
  7491. "SET TERMINAL CHARACTER-SET <remote-cs>",
  7492. " Specifies the character set used by the remote host, <remote-cs>.",
  7493. " Equivalent to SET TERM REMOTE-CHARACTER-SET <remote-cs> ALL. For more",
  7494. " control over the details, use SET TERM REMOTE-CHARACTER-SET and (in",
  7495. " non-GUI Kermit versions) SET TERM LOCAL-CHARACTER-SET; these are explained",
  7496. " below. The default TERMINAL CHARACTER-SET is LATIN1 (ISO 8859-1).",
  7497. #else /* not OS2 */
  7498. "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ]",
  7499. " Specifies the character set used by the remote host, <remote-cs>, and the",
  7500. " character set used by C-Kermit locally, <local-cs>. If you don't specify",
  7501. " the local character set, the current FILE CHARACTER-SET is used. When",
  7502. " you specify two different character sets, C-Kermit translates between them",
  7503. " during CONNECT. By default, both character sets are TRANSPARENT, and",
  7504. " no translation is done.",
  7505. #endif /* OS2 */
  7506. " ",
  7507. #endif /* NOCSETS */
  7508. #ifdef OS2
  7509. "SET TERMINAL CODE-PAGE <number>",
  7510. " Lets you change the PC code page. Only works for code pages that are",
  7511. " successfully prepared in CONFIG.SYS. Use SHOW TERMINAL to list the",
  7512. " current code page and the available code pages.",
  7513. #ifdef OS2ONLY
  7514. " ",
  7515. " Also see SET TERMINAL FONT if the desired code page in not available in",
  7516. " your version of OS/2.",
  7517. #endif /* OS2ONLY */
  7518. " ",
  7519. #ifndef NT
  7520. "SET TERMINAL COLOR BORDER <foreground>",
  7521. #endif /* NT */
  7522. "SET TERMINAL COLOR <screenpart> <foreground> <background>",
  7523. " Sets the colors of the terminal emulation screen.",
  7524. " <screenpart> may be any of the following:",
  7525. " DEBUG, HELP-TEXT, REVERSE, SELECTION, STATUS-LINE, TERMINAL-SCREEN, or",
  7526. " UNDERLINED-TEXT.",
  7527. " <foreground> and <background> may be any of:",
  7528. " BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, DGRAY, LBLUE,",
  7529. " LGREEN, LCYAN, LRED, LMAGENTA, YELLOW or WHITE.",
  7530. " The L prefix for the color names means Light.",
  7531. " ",
  7532. "SET TERMINAL COLOR ERASE { CURRENT-COLOR, DEFAULT-COLOR }",
  7533. " Determines whether the current color as set by the host or the default",
  7534. " color as set by the user (SET TERMINAL COLOR TERMINAL) is used to clear",
  7535. " the screen when erase commands are received from the host.",
  7536. " ",
  7537. "SET TERMINAL COLOR RESET-ON-ESC[0m { CURRENT-COLOR, DEFAULT-COLOR }",
  7538. " Determines whether the current color or the default color is used after",
  7539. " <ESC>[0m (\"reset attributes\") command sequence is received from the",
  7540. " host.",
  7541. " ",
  7542. "SET TERMINAL CONTROLS { 7, 8 }",
  7543. " Determines whether VT220/320 or Wyse 370 function keys, arrow keys, etc,",
  7544. " that generate ANSI-format escape sequences should send 8-bit control",
  7545. " characters or 7-bit escape sequences.",
  7546. " ",
  7547. #endif /* OS2 */
  7548. "SET TERMINAL CR-DISPLAY { CRLF, NORMAL }",
  7549. " Specifies how incoming carriage return characters are to be displayed",
  7550. " on your screen.",
  7551. " ",
  7552. #ifdef OS2
  7553. #ifdef KUI
  7554. "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF, NOBLINK}",
  7555. " Selects the cursor style and visibility for the terminal screen.",
  7556. #else
  7557. "SET TERMINAL CURSOR { FULL, HALF, UNDERLINE } {ON, OFF}",
  7558. " Selects the cursor style and visibility for the terminal screen.",
  7559. #endif /* KUI */
  7560. " ",
  7561. #endif /* OS2 */
  7562. "SET TERMINAL DEBUG { ON, OFF }",
  7563. " Turns terminal session debugging on and off. When ON, incoming control",
  7564. " characters are displayed symbolically, rather than be taken as formatting",
  7565. " commands. SET TERMINAL DEBUG ON implies SET TELNET DEBUG ON.",
  7566. " ",
  7567. #ifdef OS2
  7568. "SET TERMINAL DG-UNIX-MODE { ON, OFF }",
  7569. " Specifies whether the Data General emulations should accept control",
  7570. " sequences in Unix compatible format or in native DG format. The",
  7571. " default is OFF, DG format.",
  7572. " ",
  7573. #endif /* OS2 */
  7574. "SET TERMINAL ECHO { LOCAL, REMOTE }",
  7575. " Specifies which side does the echoing during terminal connection.",
  7576. " ",
  7577. "SET TERMINAL ESCAPE-CHARACTER { ENABLED, DISABLED }",
  7578. " Turns on/off the ability to escape back from CONNECT mode using the SET",
  7579. #ifdef OS2
  7580. " ESCAPE character. If you disable it you can still get back using Alt-key",
  7581. " combinations as shown in the status line. Also see HELP SET ESCAPE.",
  7582. #else
  7583. " ESCAPE character. If you disable it, Kermit returns to its prompt only",
  7584. " when the connection is closed by the other end. USE WITH EXTREME CAUTION.",
  7585. " Also see HELP SET ESCAPE.",
  7586. #endif /* OS2 */
  7587. " ",
  7588. #ifdef OS2
  7589. #ifdef KUI
  7590. "SET TERMINAL FONT <facename> <height>",
  7591. " Specifies the font to be used in the C-Kermit terminal window. The font",
  7592. " is determined by the choice of a facename and a height measured in Points.",
  7593. " The available facenames are those installed in the Font Control Panel.",
  7594. " ",
  7595. #else /* KUI */
  7596. #ifdef OS2ONLY
  7597. "SET TERMINAL FONT { CP437, CP850, CP852, CP862, CP866, DEFAULT }",
  7598. " CP437 - Original PC code page",
  7599. " CP850 - \"Multilingual\" (West Europe) code page",
  7600. " CP852 - East Europe Roman Alphabet code page (for Czech, Polish, etc)",
  7601. " CP862 - Hebrew code page",
  7602. " CP866 - Cyrillic (Russian, Belorussian, and Ukrainian) code page",
  7603. " ",
  7604. " Loads a soft into the video adapter for use during terminal emulation.",
  7605. " Use this command when your OS/2 system does not have the desired code.",
  7606. " page. Can be used only in full-screen sessions. Also see SET TERMINAL",
  7607. " CODE-PAGE and SET TERMINAL REMOTE-CHARACTER-SET.",
  7608. " ",
  7609. #endif /* OS2ONLY */
  7610. #endif /* KUI */
  7611. #ifdef NT
  7612. "SET TERMINAL HEIGHT <number>",
  7613. " Changes the number of rows (lines) to use during terminal emulation, not",
  7614. " counting the status line. Recommended values are 24, 42, and 49 (or 25,",
  7615. " 43, and 50 if SET TERMINAL STATUSLINE is OFF.)",
  7616. #else
  7617. "SET TERMINAL HEIGHT <number>"
  7618. " Changes the number of rows (lines) to use during terminal emulation, not",
  7619. " counting the status line. Windowed sessions can use any value from 8 to",
  7620. " 101. Fullscreen sessions are limited to 24, 42, 49, or 59. Not all"
  7621. " heights are supported by all video adapters.",
  7622. #endif /* NT */
  7623. #else /* OS2 */
  7624. "SET TERMINAL HEIGHT <number>",
  7625. " Tells C-Kermit how many rows (lines) are on your CONNECT-mode screen.",
  7626. #endif /* OS2 */
  7627. " ",
  7628. #ifdef CKTIDLE
  7629. "SET TERMINAL IDLE-TIMEOUT <number>",
  7630. " Sets the limit on idle time in CONNECT mode to the given number of",
  7631. " seconds. 0 (the default) means no limit.",
  7632. " ",
  7633. "SET TERMINAL IDLE-ACTION { EXIT, HANGUP, OUTPUT [ text ], RETURN }",
  7634. " Specifies the action to be taken when a CONNECT session is idle for the",
  7635. " number of seconds given by SET TERMINAL IDLE-TIMEOUT. The default action",
  7636. " is to RETURN to command mode. EXIT exits from Kermit; HANGUP hangs up the",
  7637. " connection, and OUTPUT sends the given text to the host without leaving",
  7638. " CONNECT mode; if no text is given a NUL (0) character is sent.",
  7639. #ifdef TNCODE
  7640. " ",
  7641. "SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }",
  7642. " For TELNET connections only: Sends the indicated Telnet protocol message:",
  7643. " No Operation (NOP) or \"Are You There?\" (AYT).",
  7644. #endif /* TNCODE */
  7645. " ",
  7646. #endif /* CKTIDLE */
  7647. #ifdef OS2
  7648. "SET TERMINAL KDB-FOLLOWS-GL/GR { ON, OFF }",
  7649. " Specifies whether or not the keyboard character set should follow the",
  7650. " active GL and GR character sets. This feature is OFF by default and",
  7651. " should not be used unless it is specificly required by the host",
  7652. " application.",
  7653. " ",
  7654. "SET TERMINAL KEY <mode> /LITERAL <keycode> <text>",
  7655. "SET TERMINAL KEY <mode> DEFAULT",
  7656. "SET TERMINAL KEY <mode> CLEAR",
  7657. " Configures the key whose <keycode> is given to send the given text when",
  7658. " pressed while <mode> is active. <mode> may be any of the valid terminal",
  7659. " types or the special modes \"EMACS\", \"HEBREW\" or \"RUSSIAN\". DEFAULT",
  7660. " restores all default key mappings for the specified mode. CLEAR erases",
  7661. " all the key mappings. If there is no text, the default key binding is",
  7662. #ifndef NOCSETS
  7663. " restored for the key k. SET TERMINAL KEY mappings take place before",
  7664. " terminal character-set translation. SET KEY mappings take precedence over",
  7665. " SET TERMINAL KEY <terminal type> settings.",
  7666. #else
  7667. " restored for the key. SET KEY mappings take precedence over SET TERMINAL",
  7668. " KEY <terminal type> settings.",
  7669. #endif /* NOCSETS */
  7670. " The /LITERAL switch may be used to instruct Kermit to ignore character-set",
  7671. " translations when sending this definition to the host.",
  7672. " ",
  7673. " The text may contain \"\\Kverbs\" to denote actions, to stand for DEC",
  7674. " keypad, function, or editing keys, etc. For a list of available keyboard",
  7675. " verbs, type SHOW KVERBS.",
  7676. " ",
  7677. " To find out the keycode and mapping for a particular key, use the SHOW",
  7678. " KEY command. Use the SAVE KEYS command to save all settings to a file.",
  7679. " ",
  7680. "SET TERMINAL KEYBOARD-MODE { NORMAL, EMACS, RUSSIAN, HEBREW }",
  7681. " Select a special keyboard mode for use in the terminal screen.",
  7682. " ",
  7683. "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC }",
  7684. " Specifies the \"mode\" of the numeric keypad for VT terminal emulation.",
  7685. " Use this command in case the host or application wants the keypad to be",
  7686. " in a different mode than it's in, but did not send the escape sequence",
  7687. " to put it in the needed mode.",
  7688. " ",
  7689. #endif /* OS2 */
  7690. "SET TERMINAL LF-DISPLAY { CRLF, NORMAL }",
  7691. " Specifies how incoming linefeed characters are to be displayed",
  7692. " on your screen.",
  7693. " ",
  7694. #ifdef OS2
  7695. #ifdef KUI
  7696. "SET TERMINAL LINE-SPACING <float>",
  7697. " Specifies the line spacing used when displaying text. The default is 1.0.",
  7698. " Valid values range from 1.0 to 3.0 inclusive.",
  7699. " ",
  7700. #endif /* KUI */
  7701. #endif /* OS2 */
  7702. #ifndef NOCSETS
  7703. #ifdef OS2
  7704. "SET TERMINAL LOCAL-CHARACTER-SET <local-cs>",
  7705. " Specifies the character set used locally. If you don't specify",
  7706. #ifdef OS2ONLY
  7707. " the local character-set, the current TERMINAL FONT is used if you have",
  7708. " given a SET TERMINAL FONT command; otherwise the current codepage is used.",
  7709. #else
  7710. " the local character-set, the current code page is used.",
  7711. #endif /* OS2ONLY */
  7712. " ",
  7713. " When the local and remote character sets differ, Kermit translates between",
  7714. " them during CONNECT. By default, the remote character set is Latin1 and",
  7715. " the local one is your current code page.",
  7716. #ifdef NT
  7717. " ",
  7718. " In Windows NT, Unicode is used as the local character-set regardless of",
  7719. " this setting.",
  7720. #endif /* NT */
  7721. " ",
  7722. "See also SET TERMINAL REMOTE-CHARACTER-SET",
  7723. " ",
  7724. #endif /* OS2 */
  7725. #endif /* NOCSETS */
  7726. #ifdef OS2
  7727. "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
  7728. " Tells whether to send Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch",
  7729. " between 7-bit and 8-bit characters sent during terminal emulation over",
  7730. " 7-bit connections. OFF by default.",
  7731. #else
  7732. "SET TERMINAL LOCKING-SHIFT { OFF, ON }",
  7733. " Tells Kermit whether to use Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to",
  7734. " switch between 7-bit and 8-bit characters during CONNECT. OFF by default.",
  7735. #endif /* OS2 */
  7736. " ",
  7737. #ifdef OS2
  7738. "SET TERMINAL MARGIN-BELL { ON [column], OFF }",
  7739. " Determines whether the margin-bell is activated and what column it should",
  7740. " ring at. OFF by default.",
  7741. " ",
  7742. #endif /* OS2 */
  7743. "SET TERMINAL NEWLINE-MODE { OFF, ON }",
  7744. " Tells whether to send CRLF (Carriage Return and Line Feed) when you type",
  7745. " CR (press the Return or Enter key) in CONNECT mode.",
  7746. " ",
  7747. #ifdef OS2
  7748. "SET TERMINAL OUTPUT-PACING <milliseconds>",
  7749. " Tells how long to pause between sending each character to the host during",
  7750. " CONNECT mode. Normally not needed but sometimes required to work around",
  7751. " TRANSMISSION BLOCKED conditions when pasting into the terminal window.",
  7752. " ",
  7753. #ifdef PCTERM
  7754. "SET TERMINAL PCTERM { ON, OFF }",
  7755. " Activates or deactivates the PCTERM terminal emulation keyboard mode.",
  7756. " When PCTERM is ON all keystrokes in the terminal screen are sent to the",
  7757. " host as make/break (down/up) codes instead of as characters from the",
  7758. " REMOTE-CHARACTER-SET, and all keyboard mappings, including Kverbs and the",
  7759. " escape character are disabled. To turn off PCTERM keyboard mode while in",
  7760. " CONNECT mode press Control-CapsLock. PCTERM is OFF by default.",
  7761. " ",
  7762. #endif /* PCTERM */
  7763. #endif /* OS2 */
  7764. #ifdef OS2
  7765. "SET TERMINAL PRINT { AUTO, COPY, OFF, USER }",
  7766. " Allows selective control of various types of printing from the Terminal",
  7767. " session. AUTO prints a line of text from the terminal screen whenever",
  7768. " the cursor is moved off the line. COPY prints every byte received as",
  7769. " it is received without interpretation. USER prints every byte after",
  7770. " interpretation by the terminal emulator translates character-sets and",
  7771. " construct escape sequences, ... The default is OFF.",
  7772. " ",
  7773. #else
  7774. #ifdef XPRINT
  7775. "SET TERMINAL PRINT { ON, OFF }",
  7776. " Enables and disables host-initiated transparent printing in CONNECT mode.",
  7777. " ",
  7778. #endif /* XPRINT */
  7779. #endif /* OS2 */
  7780. #ifdef OS2
  7781. #ifndef NOCSETS
  7782. "SET TERMINAL REMOTE-CHARACTER-SET <remote-cs> [ { G0,G1,G2,G3 }... ]",
  7783. " Specifies the character set used by the remote host, <remote-cs>.",
  7784. " When the local and remote character sets differ, Kermit translates",
  7785. " between them during CONNECT. By default, the remote character set is",
  7786. " Latin1 and the local one is your current code page. Optionally, you can",
  7787. " also designate the character set to the G0..G3 graphic tables.",
  7788. " ",
  7789. #endif /* NOCSETS */
  7790. #endif /* OS2 */
  7791. #ifdef OS2
  7792. "SET TERMINAL ROLL-MODE { INSERT, OVERWRITE, KEYSTROKES [ option ] }",
  7793. " Tells whether new data when received from the host is entered into the",
  7794. " scrollback buffer at the current rollback position (OVERWRITE) or at the",
  7795. " end of the buffer (INSERT). The default is INSERT. Typing is allowed",
  7796. " during rollbacks in either mode, according to SET TERM ROLL KEYSTROKES:",
  7797. " SEND (the default) means to process keystrokes normally; IGNORE means to",
  7798. " ignore them when the screen is scrolled back; RESTORE-AND-SEND is like",
  7799. " SEND but restores the screen to its active position first.",
  7800. " ",
  7801. "SET TERMINAL SCREEN-MODE { NORMAL, REVERSE }",
  7802. " When set to REVERSE the foreground and background colors are swapped as",
  7803. " well as the application of the foreground and background intensity bits.",
  7804. " The default is NORMAL.",
  7805. " ",
  7806. "SET TERMINAL SCREEN-OPTIMIZE { ON, OFF }",
  7807. " When set to ON, the default, Kermit only paints the screen with characters",
  7808. " that have changed since the last screen paint. When OFF, the screen is",
  7809. " completely repainted each time there is a change.",
  7810. " ",
  7811. "SET TERMINAL SCREEN-UPDATE { FAST, SMOOTH } [ <milliseconds> ]",
  7812. " Chooses the mechanism used for screen updating and the update frequency.",
  7813. " Defaults are FAST scrolling with updates every 100 milliseconds.",
  7814. " ",
  7815. "SET TERMINAL SCROLLBACK <lines>",
  7816. " Sets size of CONNECT virtual screen buffer. <lines> includes the active",
  7817. " terminal screen. The minimum is 256. The maximum is 2 million. The",
  7818. " default is 2000.",
  7819. " ",
  7820. "SET TERMINAL SEND-DATA { ON, OFF }",
  7821. " Determines whether ASCII emulations such as WYSE 30,50,60 or TVI 910+,925,",
  7822. " 950 may send their screen contents to the host upon request. Allowing the",
  7823. " screen to be read by the host is a significant security risk. The default",
  7824. " is OFF and should only be changed after a security evaluation of host",
  7825. " environment.",
  7826. " ",
  7827. "SET TERMINAL SEND-END-OF-BLOCK { CRLF_ETX, US_CR }",
  7828. " Determines which set of characters should be used as end of line and end",
  7829. " of transmission indicators when sending screen data to the host",
  7830. " ",
  7831. "SET TERMINAL SGR-COLORS { ON, OFF }",
  7832. " ON (default) means allow host control of colors; OFF means ignore host",
  7833. " escape sequences to set color.",
  7834. " ",
  7835. "SET TERMINAL SNI-CH.CODE { ON, OFF }",
  7836. " This command controls the state of the CH.CODE key. It is the equivalent",
  7837. " to the SNI_CH_CODE Keyboard verb. The SNI terminal uses CH.CODE to",
  7838. " easily switch between the National Language character set and U.S. ASCII.",
  7839. " The default is ON which means to display characters as U.S. ASCII. When",
  7840. " OFF the lanuage specified by SET TERMINAL SNI-LANUAGE is used to display",
  7841. " characters when 7-bit character sets are in use.",
  7842. " ",
  7843. "SET TERMINAL SNI-FIRMWARE-VERSIONS <kbd-version> <terminal-version>",
  7844. " Specifies the Firmware Version number that should be reported to the host",
  7845. " when the terminal is queried. The default is 920031 for the keyboard",
  7846. " and 830851 for the terminal.",
  7847. " ",
  7848. "SET TERMINAL SNI-LANGUAGE <national-language>",
  7849. " An alias for SET TERMINAL VT-LANUAGE, this command specifies the national",
  7850. " language character-set that should be used when the NRC mode is activated",
  7851. " for VT emulations or when CH.CODE is OFF for SNI emulations. The default",
  7852. " language for SET TERMINAL TYPE SNI-97801 is \"German\".",
  7853. " ",
  7854. "SET TERMINAL SNI-PAGEMODE { ON, OFF }",
  7855. " Determines whether or not page mode is active. OFF by default.",
  7856. " ",
  7857. "SET TERMINAL SNI-SCROLLMODE { ON, OFF }",
  7858. " Determines whether or not scroll mode is active. OFF by default.",
  7859. " ",
  7860. "SET TERMINAL STATUSLINE { ON, OFF }",
  7861. " ON (default) enables the Kermit status line in the terminal screen.",
  7862. " OFF removes it, making the line available for use by the host.",
  7863. " ",
  7864. "SET TERMINAL TRANSMIT-TIMEOUT <seconds>",
  7865. " Specifies the maximum amount of time Kermit waits before returning to the",
  7866. " prompt if your keystrokes can't be transmitted for some reason, such as a",
  7867. " flow-control deadlock.",
  7868. " ",
  7869. #endif /* OS2 */
  7870. #ifdef CK_TRIGGER
  7871. "SET TERMINAL TRIGGER <string>",
  7872. " Specifies a string that, when detected during any subsequent CONNECT",
  7873. " session, is to cause automatic return to command mode. Give this command",
  7874. " without a string to cancel the current trigger. See HELP CONNECT for",
  7875. " additional information.",
  7876. " ",
  7877. #endif /* CK_TRIGGER */
  7878. #ifdef OS2
  7879. "SET TERMINAL URL-HIGHLIGHT { ON <attribute>, OFF }",
  7880. " Specifies whether URLs should be highlighted and which screen attribute",
  7881. " should be used. The screen attributes can be one of NORMAL, BLINK, BOLD,",
  7882. " DIM, INVISIBLE, REVERSE, or UNDERLINE. The default is ON using the",
  7883. " BOLD screen attribute.",
  7884. " ",
  7885. "SET TERMINAL VIDEO-CHANGE { DISABLED, ENABLED }",
  7886. " Specifies whether video modes should change automatically in response",
  7887. #ifdef NT
  7888. " to escape sequences from the other computer. ENABLED by default.",
  7889. #else /* NT */
  7890. " to escape sequences from the other computer. ENABLED by default.",
  7891. #endif /* NT */
  7892. " ",
  7893. "SET TERMINAL VT-LANGUAGE <language>",
  7894. " Specifies the National Replacement Character Set (NRC) to be used when",
  7895. " NRC mode is activated. The default is \"North American\".",
  7896. " ",
  7897. "SET TERMINAL VT-NRC-MODE { ON, OFF }",
  7898. " OFF (default) chooses VT multinational Character Set mode. OFF chooses",
  7899. " VT National Replacement Character-set mode. The NRC is selected with",
  7900. " SET TERMINAL VT-LANGUAGE",
  7901. " ",
  7902. #ifdef NT
  7903. "SET TERMINAL WIDTH <cols>",
  7904. " Tells the number of columns in the terminal screen.",
  7905. " ",
  7906. " The default is 80. You can also use 132. Other widths can be chosen but",
  7907. " are usually not supported by host software.",
  7908. " ",
  7909. #else
  7910. "SET TERMINAL WIDTH <cols>",
  7911. " Tells how many columns define the terminal size.",
  7912. " ",
  7913. "Default is 80. In Windowed OS/2 2.x sessions, this value may not be changed",
  7914. "In Windowed OS/2 WARP 3.x sessions, this value may range from 20 to 255.",
  7915. "In Full screen sessions, values of 40, 80, and 132 are valid. Not all",
  7916. "combinations of height and width are supported on all adapters.",
  7917. " ",
  7918. #endif /* NT */
  7919. "SET TERMINAL WRAP { OFF, ON }",
  7920. " Tells whether the terminal emulator should automatically wrap long lines",
  7921. " on your screen.",
  7922. " ",
  7923. #else
  7924. "SET TERMINAL WIDTH <number>",
  7925. " \
  7926. Tells Kermit how many columns (characters) are on your CONNECT-mode screen.",
  7927. " ",
  7928. #endif /* OS2 */
  7929. "Type SHOW TERMINAL to see current terminal settings.",
  7930. "" };
  7931. #endif /* NOLOCAL */
  7932. #ifdef NETCONN
  7933. static char *hxyhost[] = {
  7934. "SET HOST [ switches ] hostname-or-address [ service ] [ protocol-switch ]",
  7935. " Establishes a connection to the specified network host on the currently",
  7936. " selected network type. For TCP/IP connections, the default service is",
  7937. " TELNET; specify a different TCP port number or service name to choose a",
  7938. " different service. The first set of switches can be:",
  7939. " ",
  7940. " /NETWORK-TYPE:name",
  7941. " Makes the connection on the given type of network. Equivalent to SET",
  7942. " NETWORK TYPE name prior to SET HOST, except that the selected network",
  7943. " type is used only for this connection. Type \"set host /net:?\" to see",
  7944. #ifdef NETCMD
  7945. " a list. /NETWORK-TYPE:COMMAND means to make the connection through the",
  7946. " given system command, such as \"rlogin\" or \"cu\".",
  7947. #else
  7948. " a list.",
  7949. #endif /* NETCMD */
  7950. " ",
  7951. " /CONNECT",
  7952. " \
  7953. Enter CONNECT (terminal) mode automatically if the connection is successful.",
  7954. " ",
  7955. " /SERVER",
  7956. " Enter server mode automatically if the connection is successful.",
  7957. " ",
  7958. " /USERID:[<name>]",
  7959. " This switch is equivalent to SET LOGIN USERID <name> or SET TELNET",
  7960. " ENVIRONMENT USER <name>. If a string is given, it sent to host during",
  7961. " Telnet negotiations; if this switch is given but the string is omitted,",
  7962. " no user ID is sent to the host. If this switch is not given, your",
  7963. " current USERID value, \\v(userid), is sent. When a userid is sent to the",
  7964. " host it is a request to login as the specified user.",
  7965. " ",
  7966. #ifdef CK_AUTHENTICATION
  7967. " /PASSWORD:[<string>]",
  7968. " This switch is equivalent to SET LOGIN PASSWORD. If a string is given,",
  7969. " it is treated as the password to be used (if required) by any Telnet",
  7970. " Authentication protocol (Kerberos Ticket retrieval, Secure Remote",
  7971. " Password, or X.509 certificate private key decryption.) If no password",
  7972. " switch is specified a prompt is issued to request the password if one",
  7973. " is required for the negotiated authentication method.",
  7974. " ",
  7975. #endif /* CK_AUTHENTICATION */
  7976. "The protocol-switches can be:",
  7977. " ",
  7978. " /NO-TELNET-INIT",
  7979. " Do not send initial Telnet negotiations even if this is a Telnet port.",
  7980. " ",
  7981. " /RAW-SOCKET",
  7982. " This is a connection to a raw TCP socket.",
  7983. " ",
  7984. #ifdef RLOGCODE
  7985. " /RLOGIN",
  7986. " Use Rlogin protocol even if this is not an Rlogin port.",
  7987. " ",
  7988. #endif /* RLOGCODE */
  7989. " /TELNET",
  7990. " Send initial Telnet negotiations even if this is not a Telnet port.",
  7991. " ",
  7992. #ifdef CK_KERBEROS
  7993. #ifdef RLOGCODE
  7994. #ifdef KRB4
  7995. " /K4LOGIN",
  7996. " Use Kerberos IV klogin protocol even if this is not a klogin port.",
  7997. " ",
  7998. #ifdef CK_ENCRYPTION
  7999. " /EK4LOGIN",
  8000. " Use Kerberos IV Encrypted login protocol even if this is not an eklogin",
  8001. " port.",
  8002. " ",
  8003. #endif /* CK_ENCRYPTION */
  8004. #endif /* KRB4 */
  8005. #ifdef KRB5
  8006. " /K5LOGIN",
  8007. " Use Kerberos V klogin protocol even if this is not a klogin port.",
  8008. " ",
  8009. #ifdef CK_ENCRYPTION
  8010. " /EK5LOGIN",
  8011. " Use Kerberos V Encrypted login protocol even if this is not an eklogin",
  8012. " port.",
  8013. " ",
  8014. #endif /* CK_ENCRYPTION */
  8015. #endif /* KRB5 */
  8016. #endif /* RLOGCODE */
  8017. #endif /* CK_KERBEROS */
  8018. #ifdef CK_SSL
  8019. " /SSL",
  8020. " Perform SSL negotiations.",
  8021. " ",
  8022. " /SSL-TELNET",
  8023. " Perform SSL negotiations and if successful start Telnet negotiations.",
  8024. " ",
  8025. " /TLS",
  8026. " Perform TLS negotiations.",
  8027. " ",
  8028. " /TLS-TELNET",
  8029. " Perform TLS negotiations and if successful start Telnet negotiations.",
  8030. " ",
  8031. #endif /* CK_SSL */
  8032. "Examples:",
  8033. " SET HOST kermit.columbia.edu",
  8034. " SET HOST /CONNECT kermit.columbia.edu",
  8035. " SET HOST * 1649",
  8036. " SET HOST /SERVER * 1649",
  8037. " SET HOST 128.59.39.2",
  8038. " SET HOST madlab.sprl.umich.edu 3000",
  8039. " SET HOST xyzcorp.com 2000 /RAW-SOCKET",
  8040. #ifdef SSHBUILTIN
  8041. " SET HOST /NET:SSH kermit.columbia.edu /x11-forwarding:on",
  8042. #endif /* SSHBUILTIN */
  8043. #ifdef NETCMD
  8044. " SET HOST /CONNECT /COMMAND rlogin xyzcorp.com",
  8045. #endif /* NETCMD */
  8046. " ",
  8047. #ifdef SUPERLAT
  8048. "Notes:",
  8049. " ",
  8050. " . The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
  8051. " SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
  8052. " ",
  8053. " . For SUPERLAT connections, the hostname-or-address may be either a service",
  8054. " name, or a node/port combination, as required by your LAT host.",
  8055. #else
  8056. "The TELNET command is equivalent to SET NETWORK TYPE TCP/IP,",
  8057. "SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT",
  8058. #endif /* SUPERLAT */
  8059. " ",
  8060. "Also see SET NETWORK, TELNET, SET TELNET.",
  8061. "" };
  8062. static char *hmxyauth[] = {
  8063. "Synatx: SET AUTHENTICATION <auth_type> <parameter> <value>",
  8064. " Sets defaults for the AUTHENTICATE command:",
  8065. " ",
  8066. #ifdef CK_KERBEROS
  8067. "SET AUTHENTICATION KERBEROS5 ADDRESSES {list of ip-addresses}",
  8068. " Specifies a list of IP addresses that should be placed in the Ticket",
  8069. " Getting Ticket in addition to the local machine addresses.",
  8070. " ",
  8071. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTODESTROY",
  8072. " { ON-CLOSE, ON-EXIT, NEVER }",
  8073. " When ON, Kermit will destroy all credentials in the default",
  8074. " credentials cache upon Kermit termination. Default is NEVER.",
  8075. " ",
  8076. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } AUTOGET { ON, OFF }",
  8077. " When ON, if the host offers Kerberos 4 or Kerberos 5 authentication",
  8078. " and Kermit is configured to use that authentication method and there",
  8079. " is no TGT, Kermit will automatically attempt to retrieve one by",
  8080. " prompting for the password (and principal if needed.) Default is ON.",
  8081. " ",
  8082. "SET AUTHENTICATION KERBEROS5 CREDENTIALS-CACHE <filename>",
  8083. " Allows an alternative credentials cache to be specified. This is useful",
  8084. " when you need to maintain two or more sets of credentials for different",
  8085. " realms or roles. The default is specified by the environment variable",
  8086. " KRB5CCNAME or as reported by the Kerberos 5 library.",
  8087. " ",
  8088. "SET AUTHENTICATION KERBEROS5 FORWARDABLE { ON, OFF }",
  8089. " When ON, specifies that Kerberos 5 credentials should be forwardable to",
  8090. " the host. If SET TELNET AUTHENTICATION FORWARDING is ON, forwardable",
  8091. " credentials are sent to the host. The default is OFF.",
  8092. " ",
  8093. "SET AUTHENTICATION KERBEROS5 GET-K4-TGT { ON, OFF }",
  8094. " When ON, specifies that Kerberos 4 credentials should be requested each",
  8095. " time Kerberos 5 credentials are requested with AUTH KERBEROS5 INIT.",
  8096. " Default is OFF.",
  8097. " ",
  8098. "SET AUTHENTICATION KERBEROS4 INSTANCE <instance>",
  8099. " Allows a Kerberos 4 instance to be specified as a default (if needed).",
  8100. " ",
  8101. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } KEYTAB <filename>",
  8102. " Specifies the location of the keytab file used to authenticate incoming",
  8103. " connections. The default is none, which means to use the default value",
  8104. " configured in the Kerberos installation.",
  8105. " ",
  8106. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } LIFETIME <minutes>",
  8107. " Specifies the lifetime of the TGTs requested from the KDC. The default",
  8108. " is 600 minutes (10 hours).",
  8109. " ",
  8110. "SET AUTHENTICATION KERBEROS5 NO-ADDRESSES { ON, OFF }",
  8111. " Specifies whether or not IP addresses will be inserted into the TGT."
  8112. " Default is OFF.",
  8113. " ",
  8114. "SET AUTHENTICATION KERBEROS4 PREAUTH { ON, OFF }",
  8115. " Allows Kerberos 4 preauthenticated TGT requests to be turned off. The",
  8116. " default is ON. Only use if absolutely necessary. We recommend that",
  8117. " preauthenticated requests be required for all tickets returned by a KDC",
  8118. " to a requestor.",
  8119. " ",
  8120. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL <name>",
  8121. " When Kermit starts, it attempts to set the principal name to that stored",
  8122. " in the current credentials cache. If no credential cache exists, the",
  8123. " current SET LOGIN USERID value is used. SET LOGIN USERID is set to the",
  8124. " operating system's current username when Kermit is started. To force",
  8125. " Kermit to prompt the user for the principal name when requesting TGTs,",
  8126. " place:",
  8127. " ",
  8128. " SET AUTH K4 PRINCIPAL {}",
  8129. " SET AUTH K5 PRINCIPAL {}",
  8130. " ",
  8131. " in the Kermit initialization file or connection script.",
  8132. " ",
  8133. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PASSWORD <prompt>",
  8134. " Specifies a custom prompt to be used when prompting for a password.",
  8135. " The Kerberos prompt strings may contain two %s replacement fields.",
  8136. " The first %s is replaced by the principal name; the second by the realm.",
  8137. " ",
  8138. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PROMPT PRINCIPAL <prompt>",
  8139. " Specifies a custom prompt to be used when prompting for the Kerberos",
  8140. " principal name. No %s replacement fields may be used. Kermit prompts",
  8141. " for a principal name when retrieving a TGT if the command:",
  8142. " ",
  8143. " SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL {}",
  8144. " ",
  8145. " has been issued.",
  8146. " ",
  8147. "SET AUTHENTICATION KERBEROS5 PROXIABLE { ON, OFF }",
  8148. " When ON, specifies that Kerberos 5 credentials should be proxiable.",
  8149. " Default is OFF.",
  8150. " ",
  8151. "SET AUTHENTICATION KERBEROS5 RENEWABLE <minutes>",
  8152. " When <minutes> is greater than the ticket lifetime a TGT may be renewed",
  8153. " with AUTH K5 INIT /RENEW instead of getting a new ticket as long as the",
  8154. " ticket is not expired and its within the renewable lifetime. Default is",
  8155. " 0 (zero) minutes.",
  8156. " ",
  8157. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } REALM <name>",
  8158. " If no default is set, the default realm configured for the Kerberos",
  8159. " libraries is used. Abbreviations accepted.",
  8160. " ",
  8161. "SET AUTHENTICATION { KERBEROS4, KERBEROS5 } SERVICE-NAME <name>",
  8162. " This command specifies the service ticket name used to authenticate",
  8163. " to the host when Kermit is used as a client; or the service ticket",
  8164. " name accepted by Kermit when it is acting as the host.",
  8165. " If no default is set, the default service name for Kerberos 4 is",
  8166. " \"rcmd\" and for Kerberos 5 is \"host\".",
  8167. " ",
  8168. #endif /* CK_KERBEROS */
  8169. #ifdef CK_SRP
  8170. "SET AUTHENTICATION SRP PROMPT PASSWORD <prompt>",
  8171. " Specifies a custom prompt to be used when prompting for a password.",
  8172. " The SRP prompt string may contain one %s replacement fields which is",
  8173. " replaced by the login userid.",
  8174. " ",
  8175. #endif /* CK_SRP */
  8176. #ifdef CK_SSL
  8177. "In all of the following commands \"SSL\" and \"TLS\" are aliases.",
  8178. " ",
  8179. "SET AUTHENTICATION { SSL, TLS } CIPHER-LIST <list of ciphers>",
  8180. "Applies to both SSL and TLS. A colon separated list of any of the following",
  8181. "(case sensitive) options depending on the options chosen when OpenSSL was ",
  8182. "compiled: ",
  8183. " ",
  8184. " Key Exchange Algorithms:",
  8185. " \"kRSA\" RSA key exchange",
  8186. " \"kDHr\" Diffie-Hellman key exchange (key from RSA cert)",
  8187. " \"kDHd\" Diffie-Hellman key exchange (key from DSA cert)",
  8188. " \"kEDH\" Ephemeral Diffie-Hellman key exchange (temporary key)",
  8189. " \"kKRB5\" Kerberos 5",
  8190. " ",
  8191. " Authentication Algorithm:",
  8192. " \"aNULL\" No authentication",
  8193. " \"aRSA\" RSA authentication",
  8194. " \"aDSS\" DSS authentication",
  8195. " \"aDH\" Diffie-Hellman authentication",
  8196. " \"aKRB5\" Kerberos 5",
  8197. " ",
  8198. " Cipher Encoding Algorithm:",
  8199. " \"eNULL\" No encodiing",
  8200. " \"DES\" DES encoding",
  8201. " \"3DES\" Triple DES encoding",
  8202. " \"RC4\" RC4 encoding",
  8203. " \"RC2\" RC2 encoding",
  8204. " \"IDEA\" IDEA encoding",
  8205. " ",
  8206. " MAC Digest Algorithm:",
  8207. " \"MD5\" MD5 hash function",
  8208. " \"SHA1\" SHA1 hash function",
  8209. " \"SHA\" SHA hash function (should not be used)",
  8210. " ",
  8211. " Aliases:",
  8212. " \"SSLv2\" all SSL version 2.0 ciphers (should not be used)",
  8213. " \"SSLv3\" all SSL version 3.0 ciphers",
  8214. " \"EXP\" all export ciphers (40-bit)",
  8215. " \"EXPORT56\" all export ciphers (56-bit)",
  8216. " \"LOW\" all low strength ciphers (no export)",
  8217. " \"MEDIUM\" all ciphers with 128-bit encryption",
  8218. " \"HIGH\" all ciphers using greater than 128-bit encryption",
  8219. " \"RSA\" all ciphers using RSA key exchange",
  8220. " \"DH\" all ciphers using Diffie-Hellman key exchange",
  8221. " \"EDH\" all ciphers using Ephemeral Diffie-Hellman key exchange",
  8222. " \"ADH\" all ciphers using Anonymous Diffie-Hellman key exchange",
  8223. " \"DSS\" all ciphers using DSS authentication",
  8224. " \"KRB5\" all ciphers using Kerberos 5 authentication",
  8225. " \"NULL\" all ciphers using no encryption",
  8226. " ",
  8227. "Each item in the list may include a prefix modifier:",
  8228. " ",
  8229. " \"+\" move cipher(s) to the current location in the list",
  8230. " \"-\" remove cipher(s) from the list (may be added again by",
  8231. " a subsequent list entry)",
  8232. " \"!\" kill cipher from the list (it may not be added again",
  8233. " by a subsequent list entry)",
  8234. " ",
  8235. "If no modifier is specified the entry is added to the list at the current ",
  8236. "position. \"+\" may also be used to combine tags to specify entries such as "
  8237. ,
  8238. "\"RSA+RC4\" describes all ciphers that use both RSA and RC4.",
  8239. " ",
  8240. "For example, all available ciphers not including ADH key exchange:",
  8241. " ",
  8242. " ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP",
  8243. " ",
  8244. "All algorithms including ADH and export but excluding patented algorithms: ",
  8245. " ",
  8246. " HIGH:MEDIUM:LOW:EXPORT56:EXP:ADH:!kRSA:!aRSA:!RC4:!RC2:!IDEA",
  8247. " ",
  8248. "The OpenSSL command ",
  8249. " ",
  8250. " openssl.exe ciphers -v <list of ciphers> ",
  8251. " ",
  8252. "may be used to list all of the ciphers and the order described by a specific",
  8253. "<list of ciphers>.",
  8254. " ",
  8255. "SET AUTHENTICATION { SSL, TLS } CRL-DIR <directory>",
  8256. "specifies a directory that contains certificate revocation files where each",
  8257. "file is named by the hash of the certificate that has been revoked.",
  8258. " ",
  8259. " OpenSSL expects the hash symlinks to be made like this:",
  8260. " ",
  8261. " ln -s crl.pem `openssl crl -hash -noout -in crl.pem`.r0",
  8262. " ",
  8263. " Since not all file systems have symlinks you can use the following command",
  8264. " in Kermit to copy the crl.pem file to the hash file name.",
  8265. " ",
  8266. " copy crl.pem {\\fcommand(openssl.exe crl -hash -noout -in crl.pem).r0}",
  8267. " ",
  8268. " This produces a hash based on the issuer field in the CRL such ",
  8269. " that the issuer field of a Cert may be quickly mapped to the ",
  8270. " correct CRL.",
  8271. " ",
  8272. "SET AUTHENTICATION { SSL, TLS } CRL-FILE <filename>",
  8273. "specifies a file that contains a list of certificate revocations.",
  8274. " ",
  8275. "SET AUTHENTICATION { SSL, TLS } DEBUG { ON, OFF }",
  8276. "specifies whether debug information should be displayed about the SSL/TLS",
  8277. "connection. When DEBUG is ON, the VERIFY command does not terminate",
  8278. "connections when set to FAIL-IF-NO-PEER-CERT when a certificate is",
  8279. "presented that cannot be successfully verified. Instead each error",
  8280. "is displayed but the connection automatically continues.",
  8281. " ",
  8282. "SET AUTHENTICATION { SSL, TLS } DH-PARAM-FILE <filename>",
  8283. " Specifies a file containing DH parameters which are used to generate",
  8284. " temporary DH keys. If a DH parameter file is not provided Kermit uses a",
  8285. " fixed set of parameters depending on the negotiated key length. Kermit",
  8286. " provides DH parameters for key lengths of 512, 768, 1024, 1536, and 2048",
  8287. " bits.",
  8288. " ",
  8289. "SET AUTHENTICATION { SSL, TLS } DSA-CERT-CHAIN-FILE <filename>",
  8290. " Specifies a file containing a DSA certificate chain to be sent along with",
  8291. " the DSA-CERT to the peer. This file must only be specified if Kermit is",
  8292. " being used as a server and the DSA certificate was signed by an",
  8293. " intermediary certificate authority.",
  8294. " ",
  8295. "SET AUTHENTICATION { SSL, TLS } DSA-CERT-FILE <filename>",
  8296. " Specifies a file containing a DSA certificate to be sent to the peer to ",
  8297. " authenticate the host or end user. The file may contain the matching DH ",
  8298. " private key instead of using the DSA-KEY-FILE command.",
  8299. " ",
  8300. "SET AUTHENTICATION { SSL, TLS } DSA-KEY-FILE <filename>",
  8301. "Specifies a file containing the private DH key that matches the DSA ",
  8302. "certificate specified with DSA-CERT-FILE. This command is only necessary if",
  8303. "the private key is not appended to the certificate in the file specified by",
  8304. "DSA-CERT-FILE.",
  8305. " ",
  8306. " Note: When executing a script in the background or when it is",
  8307. " running as an Internet Kermit Service Daemon, Kermit cannot support ",
  8308. " encrypted private keys. When attempting to load a private key that is",
  8309. " encrypted, a prompt will be generated requesting the passphrase necessary",
  8310. " to decrypt the keyfile. To automate access to the private key you must",
  8311. " decrypt the encrypted keyfile and create an unencrypted keyfile for use",
  8312. " by Kermit. This can be accomplished by using the following command and",
  8313. " the passphrase:",
  8314. " ",
  8315. " openssl dsa -in <encrypted-key-file> -out <unencrypted-key-file>",
  8316. " ",
  8317. "SET AUTHENTICATION { SSL, TLS } RANDOM-FILE <filename>",
  8318. " Specifies a file containing random data to be used as seed for the",
  8319. " Pseudo Random Number Generator. The contents of the file are",
  8320. " overwritten with new random data on each use.",
  8321. " ",
  8322. "SET AUTHENTICATION { SSL, TLS } RSA-CERT-CHAIN-FILE <filename>",
  8323. " Specifies a file containing a RSA certificate chain to be sent along with",
  8324. " the RSA-CERT to the peer. This file must only be specified if Kermit is",
  8325. " being used as a server and the RSA certificate was signed by an",
  8326. " intermediary certificate authority.",
  8327. " ",
  8328. "SET AUTHENTICATION { SSL, TLS } RSA-CERT-FILE <filename>",
  8329. " Specifies a file containing a RSA certificate to be sent to the peer to ",
  8330. " authenticate the host or end user. The file may contain the matching RSA ",
  8331. " private key instead of using the RSA-KEY-FILE command.",
  8332. " ",
  8333. "SET AUTHENTICATION { SSL, TLS } RSA-KEY-FILE <filename>",
  8334. " Specifies a file containing the private RSA key that matches the RSA",
  8335. " certificate specified with RSA-CERT-FILE. This command is only necessary",
  8336. " if the private key is not appended to the certificate in the file specified"
  8337. ,
  8338. " by RSA-CERT-FILE. ",
  8339. " ",
  8340. " Note: When executing a script in the background or when it is",
  8341. " running as an Internet Kermit Service Daemon, Kermit cannot support ",
  8342. " encrypted private keys. When attempting to load a private key that is",
  8343. " encrypted, a prompt will be generated requesting the passphrase necessary",
  8344. " to decrypt the keyfile. To automate access to the private key you must",
  8345. " decrypt the encrypted keyfile and create an unencrypted keyfile for use",
  8346. " by Kermit. This can be accomplished by using the following command and",
  8347. " the passphrase:",
  8348. " ",
  8349. " openssl rsa -in <encrypted-key-file> -out <unencrypted-key-file>",
  8350. " ",
  8351. "SET AUTHENTICATION { SSL, TLS } VERBOSE { ON, OFF }",
  8352. " Specifies whether information about the authentication (ie, the",
  8353. " certificate chain) should be displayed upon making a connection.",
  8354. " ",
  8355. "SET AUTHENTICATION { SSL, TLS } VERIFY { NO,PEER-CERT,FAIL-IF-NO-PEER-CERT }",
  8356. " Specifies whether certificates should be requested from the peer verified;",
  8357. " whether they should be verified when they are presented; and whether they",
  8358. " should be required. When set to NO (the default for IKSD), Kermit does",
  8359. " not request that the peer send a certificate; if one is presented it is",
  8360. " ignored. When set to PEER-CERT (the default when not IKSD), Kermit",
  8361. " requests a certificate be sent by the peer. If presented, the certificate",
  8362. " is verified. Any errors during the verification process result in",
  8363. " queries to the end user. When set to FAIL-IF-NO-PEER-CERT, Kermit",
  8364. " requests a certificate be sent by the peer. If the certificate is not",
  8365. " presented or fails to verify, the connection is terminated without",
  8366. " querying the user.",
  8367. " ",
  8368. " If an anonymous cipher (i.e., ADH) is desired, the NO setting must be",
  8369. " used. Otherwise, the receipt of the peer certificate request is",
  8370. " interpreted as a protocol error and the negotiation fails.",
  8371. " ",
  8372. " If you wish to allow the peer to authenticate using either an X509",
  8373. " certificate to userid mapping function or via use of a ~/.tlslogin file",
  8374. " you must use either PEER-CERT or FAIL-IF-NO-PEER-CERT. Otherwise, any",
  8375. " certificates that are presented is ignored. In other words, use NO if you",
  8376. " want to disable the ability to use certificates to authenticate a peer.",
  8377. " ",
  8378. "SET AUTHENTICATION { SSL, TLS } VERIFY-DIR <directory>",
  8379. " Specifies a directory that contains root CA certificate files used to",
  8380. " verify the certificate chains presented by the peer. Each file is named",
  8381. " by a hash of the certificate.",
  8382. " ",
  8383. " OpenSSL expects the hash symlinks to be made like this:",
  8384. " ",
  8385. " ln -s cert.pem `openssl x509 -hash -noout -in cert.pem`.0",
  8386. " ",
  8387. " Since not all file systems have symlinks you can use the following command",
  8388. " in Kermit to copy the cert.pem file to the hash file name.",
  8389. " ",
  8390. " copy cert.pem {\\fcommand(openssl.exe x509 -hash -noout -in cert.pem).0}",
  8391. " ",
  8392. " This produces a hash based on the subject field in the cert such that the",
  8393. " certificate may be quickly found.",
  8394. " ",
  8395. "SET AUTHENTICATION { SSL, TLS } VERIFY-FILE <file>",
  8396. " Specifies a file that contains root CA certificates to be used for",
  8397. " verifying certificate chains.",
  8398. " ",
  8399. #endif /* CK_SSL */
  8400. ""
  8401. };
  8402. static char *hxynet[] = {
  8403. "Syntax: SET NETWORK { TYPE network-type, DIRECTORY [ file(s)... ] }",
  8404. " ",
  8405. "Select the type of network to be used with SET HOST connections:",
  8406. " ",
  8407. #ifdef NETCMD
  8408. " SET NETWORK TYPE COMMAND ; Make a connection through an external command",
  8409. #endif /* NETCMD */
  8410. #ifdef TCPSOCKET
  8411. " SET NETWORK TYPE TCP/IP ; Internet: Telnet, Rlogin, etc.",
  8412. #endif /* TCPSOCKET */
  8413. #ifdef ANYX25
  8414. " SET NETWORK TYPE X.25 ; X.25 peer-to-peer connections.",
  8415. #endif /* ANYX25 */
  8416. #ifdef DECNET
  8417. " SET NETWORK TYPE PATHWORKS { LAT, CTERM } ; DEC LAT or CTERM connections.",
  8418. #endif /* DECNET */
  8419. #ifdef NPIPE
  8420. " SET NETWORK TYPE NAMED-PIPE <pipename> ; OS/2 Named Pipe connections.",
  8421. #endif /* NPIPE */
  8422. #ifdef CK_NETBIOS
  8423. " SET NETWORK TYPE NETBIOS ; NETBIOS peer-to-peer connections",
  8424. #endif /* CK_NETBIOS */
  8425. #ifdef SUPERLAT
  8426. " SET NETWORK TYPE SUPERLAT ; LAT connections (Meridian Technology SuperLAT)",
  8427. #endif /* SUPERLAT */
  8428. " ",
  8429. "If only one network type is listed above, that is the default network for",
  8430. #ifdef RLOGCODE
  8431. "SET HOST commands. Also see SET HOST, TELNET, RLOGIN.",
  8432. #else
  8433. #ifdef TNCODE
  8434. "SET HOST commands. Also see SET HOST, TELNET.",
  8435. #else
  8436. "SET HOST commands. Also see SET HOST.",
  8437. #endif /* TNCODE */
  8438. #endif /* RLOGCODE */
  8439. " ",
  8440. "SET NETWORK DIRECTORY [ file [ file [ ... ] ] ]",
  8441. " Specifies the name(s) of zero or more network directory files, similar to",
  8442. " dialing directories (HELP DIAL for details). The general format of a",
  8443. " network directory entry is:",
  8444. " ",
  8445. " name network-type address [ network-specific-info ] [ ; comment ]",
  8446. " ",
  8447. " For TCP/IP, the format is:",
  8448. " ",
  8449. " name tcp/ip ip-hostname-or-address [ socket ] [ ; comment ]",
  8450. " ",
  8451. "You can have multiple network directories and you can have multiple entries",
  8452. "with the same name. SET HOST <name> and TELNET <name> commands look up the",
  8453. "given <name> in the directory and, if found, fill in the additional items",
  8454. "from the entry, and then try all matching entries until one succeeds.",
  8455. ""};
  8456. #ifndef NOTCPOPTS
  8457. static char *hxytcp[] = {
  8458. #ifdef SOL_SOCKET
  8459. "SET TCP ADDRESS <ip-address>",
  8460. " This allows a specific IP Address on a multihomed host to be used",
  8461. " instead of allowing the TCP/IP stack to choose. This may be necessary",
  8462. " when using authentication or listening for an incoming connection.",
  8463. " Specify no <ip-address> to remove the preference.",
  8464. " ",
  8465. "SET TCP KEEPALIVE { ON, OFF }",
  8466. " Setting this ON might help to detect broken connections more quickly.",
  8467. " (default is ON.)",
  8468. " ",
  8469. "SET TCP LINGER { ON [timeout], OFF }",
  8470. " Setting this ON ensures that a connection doesn't close before all",
  8471. " outstanding data has been transferred and acknowledged. The timeout is",
  8472. " measured in 10ths of milliseconds. The default is ON with a timeout of 0.",
  8473. " ",
  8474. "SET TCP NODELAY { ON, OFF }",
  8475. " ON means send short TCP packets immediately rather than waiting",
  8476. " to accumulate a bunch of them before transmitting (Nagle Algorithm).",
  8477. " (default is OFF.)",
  8478. " ",
  8479. "SET TCP RECVBUF <number>",
  8480. "SET TCP SENDBUF <number>",
  8481. " TCP receive and send buffer sizes. (default is -1, use system defaults.)",
  8482. " ",
  8483. "These items let you tune TCP networking performance on a per-connection",
  8484. "basis by adjusting parameters you normally would not have access to. You",
  8485. "should use these commands only if you feel that the TCP/IP protocol stack",
  8486. "that Kermit is using is giving you inadequate performance, and then only if",
  8487. "you understand the concepts (see, for example, the Comer TCP/IP books), and",
  8488. "then at your own risk. These settings are displayed by SHOW NETWORK. Not",
  8489. "all options are necessarily available in all Kermit versions; it depends on",
  8490. "the underlying TCP/IP services.",
  8491. " ",
  8492. "The following TCP and/or IP parameter(s) may also be changed:",
  8493. " ",
  8494. #endif /* SOL_SOCKET */
  8495. "SET TCP REVERSE-DNS-LOOKUP { AUTO, ON, OFF }",
  8496. " Tells Kermit whether to perform reverse DNS lookup on TCP/IP connections",
  8497. " so Kermit can determine the actual hostname of the host it is connected",
  8498. " to, which is useful for connections to host pools, and is required for",
  8499. " Kerberos connections to host pools and for incoming connections. If the",
  8500. " other host does not have a DNS entry, the reverse lookup could take a long",
  8501. " time (minutes) to fail, but the connection will still be made. Turn this",
  8502. " option OFF for speedier connections if you do not need to know exactly",
  8503. " which host you are connected to and you are not using Kerberos. AUTO, the",
  8504. " default, means the lookup is done on hostnames, but not on numeric IP",
  8505. " addresses unless Kerberos support is installed.",
  8506. #ifdef CK_DNS_SRV
  8507. " ",
  8508. "SET TCP DNS-SERVICE-RECORDS {ON, OFF}",
  8509. " Tells Kermit whether to try to use DNS SRV records to determine the",
  8510. " host and port number upon which to find an advertised service. For",
  8511. " example, if a host wants regular Telnet connections redirected to some",
  8512. " port other than 23, this feature allows Kermit to ask the host which",
  8513. " port it should use. Since not all domain servers are set up to answer",
  8514. " such requests, this feature is OFF by default.",
  8515. #endif /* CK_DNS_SRV */
  8516. #ifdef NT
  8517. #ifdef CK_SOCKS
  8518. " ",
  8519. "SET TCP SOCKS-SERVER [<hostname or ip-address>]",
  8520. " If a hostname or ip-address is specified, Kermit will use the SOCKS",
  8521. " server when attempting outgoing connections. If no hostname or",
  8522. " ip-address is specified, any previously specified SOCKS server will",
  8523. " be removed.",
  8524. #endif /* CK_SOCKS */
  8525. #endif /* NT */
  8526. #ifndef NOHTTP
  8527. " ",
  8528. "SET TCP HTTP-PROXY [<hostname or ip-address>[:<port>]]",
  8529. " If a hostname or ip-address is specified, Kermit will use the Proxy",
  8530. " server when attempting outgoing connections. If no hostname or",
  8531. " ip-address is specified, any previously specified Proxy server will",
  8532. " be removed. If no port number is specified, the \"http\" service",
  8533. " will be used.",
  8534. #endif /* NOHTTP */
  8535. ""};
  8536. #endif /* NOTCPOPTS */
  8537. #endif /* NETCONN */
  8538. #ifdef TNCODE
  8539. static char *hxytopt[] = {
  8540. "SET TELOPT [ { /CLIENT, /SERVER } ] <option> -",
  8541. " { ACCEPTED, REFUSED, REQUESTED, REQUIRED } -",
  8542. " [ { ACCEPTED, REFUSED, REQUESTED, REQUIRED } ]",
  8543. " SET TELOPT lets you specify policy requirements for Kermit's handling of",
  8544. " Telnet option negotiations. Setting an option REQUIRED causes Kermit",
  8545. " to offer the option to the peer and disconnect if the option is refused.",
  8546. " REQUESTED causes Kermit to offer an option to the peer. ACCEPTED results",
  8547. " in no offer but Kermit will attempt to negotiate the option if it is",
  8548. " requested. REFUSED instructs Kermit to refuse the option if it is",
  8549. " requested by the peer.",
  8550. " ",
  8551. " Some options are negotiated in two directions and accept separate policies",
  8552. " for each direction; the first keyword applies to Kermit itself, the second",
  8553. " applies to Kermit's Telnet partner; if the second keyword is omitted, an",
  8554. " appropriate (option-specific) default is applied. You can also include a",
  8555. " /CLIENT or /SERVER switch to indicate whether the given policies apply",
  8556. " when Kermit is the Telnet client or the Telnet server; if no switch is",
  8557. " given, the command applies to the client.",
  8558. " ",
  8559. " Note that some of Kermit's Telnet partners fail to refuse options that",
  8560. " they do not recognize and instead do not respond at all. In this case it",
  8561. " is possible to use SET TELOPT to instruct Kermit to REFUSE the option",
  8562. " before connecting to the problem host, thus skipping the problematic",
  8563. " negotiation.",
  8564. " ",
  8565. " Use SHOW TELOPT to view current Telnet Option negotiation settings.",
  8566. " SHOW TELNET displays current Telnet settings.",
  8567. ""};
  8568. static char *hxytel[] = {
  8569. "Syntax: SET TELNET parameter value",
  8570. " ",
  8571. "For TCP/IP TELNET connections, which are in NVT (ASCII) mode by default:",
  8572. " ",
  8573. #ifdef CK_AUTHENTICATION
  8574. #ifdef COMMENT
  8575. "SET TELNET AUTHENICATION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
  8576. " ACCEPT or REFUSE authentication bids, or actively REQUEST authentication.",
  8577. " REQUIRED refuses the connection if authentication is not successfully",
  8578. " negotiated. ACCEPTED by default.",
  8579. " ",
  8580. #endif /* COMMENT */
  8581. "SET TELNET AUTHENTICATION TYPE { AUTOMATIC, KERBEROS_IV, KERBEROS_V, ...",
  8582. #ifdef NT
  8583. " ..., NTLM, SSL, SRP, NONE } [...]",
  8584. #else /* NT */
  8585. " ..., SSL, SRP, NONE } [...]",
  8586. #endif /* NT */
  8587. " AUTOMATIC is the default. Available options can vary depending on the",
  8588. " features Kermit was built to support and the operating system",
  8589. " configuration; type SET TELNET AUTHENTICATION TYPE ? for a list.",
  8590. " ",
  8591. " When Kermit is the Telnet client:",
  8592. " AUTOMATIC allows the host to choose the preferred type of authentication."
  8593. ,
  8594. " NONE instructs Kermit to refuse all authentication methods when the",
  8595. " authentication option is negotiated. A list of one or more other values",
  8596. " allow a specific subset of the supported authentication methods to be",
  8597. " used.",
  8598. " ",
  8599. " When Kermit is the Telnet server:",
  8600. " AUTOMATIC results in available authentication methods being offered",
  8601. " to the telnet client in the following order:",
  8602. " ",
  8603. #ifdef NT
  8604. " KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
  8605. #else /* NT */
  8606. " KERBEROS_V, KERBEROS_IV, SRP, SSL, NTLM",
  8607. #endif /* NT */
  8608. " ",
  8609. " NONE results in no authentication methods being offered to the Telnet",
  8610. " server when the authentication option is negotiated. The preferred",
  8611. " method of disabling authentication is:",
  8612. " ",
  8613. " SET TELOPT /SERVER AUTHENTICATION REFUSE",
  8614. " ",
  8615. " A list of one or more authentication methods specifies the order those",
  8616. " methods are to be offered to the telnet client.",
  8617. #ifdef NT
  8618. " ",
  8619. " If you wish to allow NTLM authentication to be used with the Microsoft",
  8620. " Windows 2000 or Services for Unix Telnet client you must specify a list",
  8621. " with NTLM as the first item in the list. By default, NTLM is the last",
  8622. " item in the list because it does not provide any form of data encryption.",
  8623. #endif /* NT */
  8624. " ",
  8625. #ifdef CK_KERBEROS
  8626. "SET TELNET AUTHENTICATION FORWARDING { ON, OFF }",
  8627. " Set this to ON to forward Kerberos V ticket-granting-tickets to the host",
  8628. " after authentication is complete. OFF by default.",
  8629. " ",
  8630. #endif /* CK_KERBEROS */
  8631. "SET TELNET AUTHENTICATION ENCRYPT-FLAG { ANY, NONE, TELOPT }",
  8632. " Use this command to specify which AUTH telopt encryption flags may be",
  8633. " accepted in client mode or offered in server mode. The default is ANY.",
  8634. " ",
  8635. "SET TELNET AUTHENTICATION HOW-FLAG { ANY, ONE-WAY, MUTUAL }",
  8636. " Use this command to specify which AUTH telopt how flags may be",
  8637. " accepted in client mode or offered in server mode. The default is ANY.",
  8638. " ",
  8639. #endif /* CK_AUTHENTICATION */
  8640. #ifdef COMMENT
  8641. "SET TELNET BINARY-MODE { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
  8642. " ACCEPT or REFUSE binary-mode bids, or actively REQUEST binary mode.",
  8643. " REQUIRED refuses the connection if binary mode is not successfully",
  8644. " negotiated in both directions. ACCEPTED by default.",
  8645. " ",
  8646. #endif /* COMMENT */
  8647. "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
  8648. " When ON (OFF by default) and BINARY negotiations are not REFUSED Kermit",
  8649. " will attempt to negotiate BINARY mode in each direction before the start",
  8650. " of each file transfer. After the transfer is complete BINARY mode will",
  8651. " be restored to the pre-transfer state.",
  8652. " ",
  8653. "SET TELNET BINARY-TRANSFER-MODE { ON, OFF }",
  8654. " Set this command to ON if you want to force Kermit to negotiate",
  8655. " Telnet Binary in both directions when performing file transfers.",
  8656. " Default is OFF. Alias SET TELNET BINARY-XFER-MODE.",
  8657. " ",
  8658. "SET TELNET BUG AUTH-KRB5-DES { ON, OFF }",
  8659. " Default is ON. Disable this bug to enable the use of encryption types",
  8660. " other than DES such as 3DES or CAST-128 when the Kerberos 5 session key",
  8661. " is longer than 8 bytes.",
  8662. " ",
  8663. "SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF }",
  8664. " Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
  8665. " Kermit's TELNET partner.",
  8666. " ",
  8667. "SET TELNET BUG BINARY-U-MEANS-ME-TOO { ON, OFF }",
  8668. " Set this to ON to try to overcome TELNET binary-mode misnegotiations by",
  8669. " Kermit's TELNET partner.",
  8670. " ",
  8671. "SET TELNET BUG INFINITE-LOOP-CHECK { ON, OFF }",
  8672. " Set this to ON to prevent Kermit from responding to a telnet negotiation",
  8673. " sequence that enters an infinite loop. The default is OFF because this",
  8674. " should never occur.",
  8675. " ",
  8676. "SET TELNET BUG SB-IMPLIES-WILL-DO { ON, OFF }",
  8677. " Set this to ON to allow Kermit to respond to telnet sub-negotiations if",
  8678. " the peer forgets to respond to WILL with DO or to DO with WILL.",
  8679. " ",
  8680. "SET TELNET DEBUG { ON, OFF }",
  8681. " Set this to ON to display telnet negotiations as they are sent and",
  8682. " received.",
  8683. " ",
  8684. "SET TELNET DELAY-SB { ON, OFF }",
  8685. " When ON, telnet subnegotiation responses are delayed until after all",
  8686. " authentication and encryption options are either successfully negotiated",
  8687. " or refused. This ensures that private data is protected. When OFF, telnet",
  8688. " subnegotiation responses are sent immediately. The default is ON.",
  8689. " ",
  8690. "SET TELNET ECHO { LOCAL, REMOTE }",
  8691. " Kermit's initial echoing state for TELNET connections, LOCAL by default.",
  8692. " After the connection is made, TELNET negotiations determine the echoing.",
  8693. " ",
  8694. #ifdef CK_ENCRYPTION
  8695. #ifdef COMMENT
  8696. "SET TELNET ENCRYPTION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }",
  8697. " ACCEPT or REFUSE encryption bids, or actively REQUEST encryption in both.",
  8698. " directions. REQUIRED refuses the connection if encryption is not",
  8699. " successfully negotiated in both directions. ACCEPTED by default.",
  8700. " ",
  8701. #endif /* COMMENT */
  8702. "SET TELNET ENCRYPTION TYPE { AUTOMATIC, CAST128_CFB64, CAST128_OFB64, ",
  8703. " CAST5_40_CFB64, CAST5_40_OFB64, DES_CFB64, DES_OFB64, NONE }",
  8704. " AUTOMATIC allows the host to choose the preferred type of encryption.",
  8705. " Other values allow a specific encryption method to be specified.",
  8706. " AUTOMATIC is the default. The list of options will vary depending",
  8707. " on the encryption types selected at compilation time.",
  8708. " ",
  8709. #endif /* CK_ENCRYPTION */
  8710. #ifdef CK_ENVIRONMENT
  8711. #ifdef COMMENT
  8712. "SET TELNET ENVIRONMENT { ON, OFF, variable-name [ value ] }",
  8713. " This feature lets Kermit send the values of certain environment variables",
  8714. " to the other computer if it asks for them. The variable-name can be any",
  8715. " of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
  8716. " \"SYSTEMTYPE\", or \"DISPLAY\". Some Telnet servers, if given a USER",
  8717. " value in this way, will accept it and therefore not prompt you for user",
  8718. " name when you log in. The default values are taken from your environment;",
  8719. " use this command to change or remove them. See RFC1572 for details. You",
  8720. " may also specify OFF to disable this feature, and ON to re-enable it.",
  8721. " ",
  8722. #else
  8723. "SET TELNET ENVIRONMENT { variable-name [ value ] }",
  8724. " This feature lets Kermit send the values of certain environment variables",
  8725. " to the other computer if it asks for them. The variable-name can be any",
  8726. " of the \"well-known\" variables \"USER\", \"JOB\", \"ACCT\", \"PRINTER\",",
  8727. " \"SYSTEMTYPE\", or \"DISPLAY\". Some Telnet servers, if given a USER",
  8728. " value in this way, will accept it and therefore not prompt you for user",
  8729. " name when you log in. The default values are taken from your environment;",
  8730. " use this command to change or remove them. See RFC1572 for details.",
  8731. " ",
  8732. #endif /* COMMENT */
  8733. #endif /* CK_ENVIRONMENT */
  8734. #ifdef CK_FORWARD_X
  8735. "SET TELNET FORWARD-X XAUTHORITY-FILE <file>",
  8736. " If your X Server requires X authentication and the location of the",
  8737. " .Xauthority file is not defined by the XAUTHORITY environment variable,",
  8738. " use this command to specify the location of the .Xauthority file."
  8739. " ",
  8740. #endif /* CK_FORWARD_X */
  8741. #ifdef CK_SNDLOC
  8742. "SET TELNET LOCATION [ text ]",
  8743. " Location string to send to the Telnet server if it asks. By default this",
  8744. " is picked up from the LOCATION environment variable. Give this command",
  8745. " with no text to disable this feature.",
  8746. " ",
  8747. #endif /* CK_SNDLOC */
  8748. "SET TELNET NEWLINE-MODE { NVT, BINARY-MODE } { OFF, ON, RAW }",
  8749. " Determines how carriage returns are handled on TELNET connections. There",
  8750. " are separate settings for NVT (ASCII) mode and binary mode. ON (default",
  8751. " for NVT mode) means CRLF represents CR. OFF means CR followed by NUL",
  8752. " represents CR. RAW (default for BINARY mode) means CR stands for itself.",
  8753. " ",
  8754. #ifdef TCPSOCKET
  8755. "SET TELNET PROMPT-FOR-USERID <prompt>",
  8756. " Specifies a custom prompt to be used when prompting for a userid. Kermit",
  8757. " prompts for a userid if the command:",
  8758. " ",
  8759. " SET LOGIN USERID {}",
  8760. " ",
  8761. " has been issued prior to a Telnet authentication negotiation for an",
  8762. " authentication type that requires the transmission of a name, such as",
  8763. " Secure Remote Password.",
  8764. " ",
  8765. #endif /* TCPSOCKET */
  8766. "SET TELNET REMOTE-ECHO { ON, OFF }",
  8767. " Applies only to incoming connections created with:",
  8768. " SET HOST * <port> /TELNET",
  8769. " This command determines whether Kermit will actually echo characters",
  8770. " received from the remote when it has negotiated to do so. The default",
  8771. " is ON. Remote echoing may be turned off when it is necessary to read",
  8772. " a password with the INPUT command.",
  8773. " ",
  8774. "SET TELNET TERMINAL-TYPE name",
  8775. " The terminal type to send to the remote TELNET host. If none is given,",
  8776. #ifdef OS2
  8777. " your current SET TERMINAL TYPE value is sent, e.g. VT220.",
  8778. " ",
  8779. #else
  8780. " your local terminal type is sent.",
  8781. " ",
  8782. #endif /* OS2 */
  8783. "SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF }",
  8784. " Each Telnet option must be fully negotiated either On or Off before the",
  8785. " session can continue. This is especially true with options that require",
  8786. " subnegotiations such as Authentication, Encryption, and Kermit; for",
  8787. " proper support of these options Kermit must wait for the negotiations to",
  8788. " complete. Of course, Kermit has no way of knowing whether a reply is",
  8789. " delayed or not coming at all, and so will wait a minute or more for",
  8790. " required replies before continuing the session. If you know that Kermit's",
  8791. " Telnet partner will not be sending the required replies, you can set this",
  8792. " option of OFF to avoid the long timeouts. Or you can instruct Kermit to",
  8793. " REFUSE specific options with the SET TELOPT command.",
  8794. "",
  8795. "Type SHOW TELNET to see the current values of these parameters.",
  8796. "" };
  8797. #endif /* TNCODE */
  8798. #ifndef NOSPL
  8799. static char *hxymacr[] = {
  8800. "Syntax: SET MACRO parameter value",
  8801. " Controls the behavior of macros.",
  8802. " ",
  8803. "SET MACRO ECHO { ON, OFF }",
  8804. " Tells whether commands executed from a macro definition should be",
  8805. " displayed on the screen. OFF by default; use ON for debugging.",
  8806. " ",
  8807. "SET MACRO ERROR { ON, OFF }",
  8808. " Tells whether a macro should be automatically terminated upon a command",
  8809. " error. This setting is local to the current macro, and inherited by",
  8810. " subordinate macros.",
  8811. "" };
  8812. #endif /* NOSPL */
  8813. static char *hmxyprm[] = {
  8814. "Syntax: SET PROMPT [ text ]",
  8815. " ",
  8816. #ifdef MAC
  8817. "Prompt text for this program, normally 'Mac-Kermit>'. May contain backslash",
  8818. #else
  8819. "Prompt text for this program, normally 'C-Kermit>'. May contain backslash",
  8820. #endif /* MAC */
  8821. "codes for special effects. Surround by { } to preserve leading or trailing",
  8822. #ifdef OS2
  8823. "spaces. If text omitted, prompt reverts to K-95>. Prompt can include",
  8824. #else
  8825. #ifdef MAC
  8826. "spaces. If text omitted, prompt reverts to Mac-Kermit>. Prompt can include",
  8827. #else
  8828. "spaces. If text omitted, prompt reverts to C-Kermit>. Prompt can include",
  8829. #endif /* OS2 */
  8830. #endif /* MAC */
  8831. "variables like \\v(dir) or \\v(time) to show current directory or time.",
  8832. "" };
  8833. #ifdef UNIX
  8834. static char *hxywild[] = {
  8835. "Syntax: SET WILDCARD-EXPANSION { KERMIT [ switch ], SHELL, ON, OFF }",
  8836. " KERMIT (the default) means C-Kermit expands filename wildcards in SEND and",
  8837. " similar commands itself, and in incoming GET commands. Optional switches",
  8838. " are /NO-MATCH-DOT-FILES (\"*\" and \"?\" should not match an initial",
  8839. " period in a filename; this is the default) and /MATCH-DOT-FILES if you",
  8840. " want files whose names begin with \".\" included. SET WILDCARD SHELL",
  8841. " means that Kermit asks your preferred shell to expand wildcards (this",
  8842. " should not be necessary in C-Kermit 7.0 and later). HELP WILDCARD for",
  8843. " further information.",
  8844. " ",
  8845. " The ON and OFF choices allow you to disable and renable wildcard",
  8846. " processing independent of the KERMIT / SHELL choice. Disabling wildcards",
  8847. " allows you to process an array or list of filenames without having to",
  8848. " consider whether the names might contain literal wildcard characters.",
  8849. " WARNING: SET WILD OFF also disables internal filename pattern-matching,",
  8850. " used (for example) in creating backup files.",
  8851. "" };
  8852. #else
  8853. static char *hxywild[] = {
  8854. "Syntax: SET WILDCARD-EXPANSION { ON, OFF }",
  8855. " ON (the default) means that filenames given to Kermit commands such as",
  8856. " SEND and DIRECTORY are automatically expanded into lists of filenames if",
  8857. " they contain special 'wildcard characters' such as '*'. You can reference",
  8858. " files whose names contains such characters literally by preceding each",
  8859. " such character with a backslash '\\'. When dealing programmatically with",
  8860. " a file list, however, you should SET WILDCARD-EXPANSION OFF to force",
  8861. " treat each name in the list as a literal name. See HELP WILDCARDS for",
  8862. " details about wildcard syntax.",
  8863. "" };
  8864. #endif /* UNIX */
  8865. #ifndef NOXFER
  8866. static char *hxywind[] = {
  8867. "Syntax: SET WINDOW-SIZE number",
  8868. " Specifies number of slots for sliding windows, i.e. the number of packets",
  8869. " that can be transmitted before waiting for acknowledgement. The default",
  8870. #ifdef XYZ_INTERNAL
  8871. " for Kermit protocol is one, the maximum is 32; for ZMODEM, the default",
  8872. " is no windowing (0). For ZMODEM, the window size is really the packet",
  8873. " length, and is used only when non-windowed (streaming) transfers fail; the",
  8874. " ZMODEM window size should be a largish number, like 1024, and it should be",
  8875. " a multiple of 64.",
  8876. #else
  8877. " is one, the maximum is 32. Increased window size might result in reduced",
  8878. " maximum packet length. Use sliding windows for improved efficiency on",
  8879. " connections with long delays. A full duplex connection is required, as",
  8880. " well as a cooperating Kermit on the other end.",
  8881. #endif /* XYZ_INTERNAL */
  8882. "" };
  8883. static char *hxyrpt[] = {
  8884. "Syntax: SET REPEAT { COUNTS { ON, OFF }, PREFIX <code> }",
  8885. " SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF.",
  8886. " The default is ON. SET REPEAT PREFIX <code> sets the repeat-count prefix",
  8887. " character to the given code. The default is 126 (tilde).",
  8888. "" };
  8889. static char *hxyrcv[] = {
  8890. "Syntax: SET RECEIVE parameter value",
  8891. " Specifies parameters for inbound packets:",
  8892. " ",
  8893. #ifndef NOCSETS
  8894. "SET RECEIVE CHARACTER-SET { AUTOMATIC, MANUAL }",
  8895. " Whether to automatically switch to an appropriate file-character set based",
  8896. " on the transfer character-set announcer, if any, of an incoming text file.",
  8897. " AUTOMATIC by default. Also see HELP ASSOCIATE.",
  8898. " ",
  8899. #endif /* NOCSETS */
  8900. "SET RECEIVE CONTROL-PREFIX number",
  8901. " ASCII value of prefix character used for quoting control characters in",
  8902. " packets that Kermit receives, normally 35 (number sign). Don't change",
  8903. " this unless something is wrong with the other Kermit program.",
  8904. " ",
  8905. "SET RECEIVE END-OF-PACKET number",
  8906. " ASCII value of control character that terminates incoming packets,",
  8907. " normally 13 (carriage return).",
  8908. " ",
  8909. #ifdef CKXXCHAR
  8910. "SET RECEIVE IGNORE-CHARACTER number",
  8911. " ASCII value of character to be discarded when receiving packets, such as",
  8912. " line folding characters.",
  8913. " ",
  8914. #endif /* CKXXCHAR */
  8915. "SET RECEIVE MOVE-TO [ directory ]",
  8916. " If a directory name is specified, then every file that is received",
  8917. " successfully is moved to the given directory immediately after reception",
  8918. " is complete. Omit the directory name to remove any previously set move-to",
  8919. " directory.",
  8920. " ",
  8921. "SET RECEIVE PACKET-LENGTH number",
  8922. " Maximum length packet the other Kermit should send.",
  8923. " ",
  8924. "SET RECEIVE PADDING number",
  8925. " Number of prepacket padding characters to ask for (normally 0).",
  8926. " ",
  8927. "SET RECEIVE PAD-CHARACTER number",
  8928. " ASCII value of control character to use for padding (normally 0).",
  8929. " ",
  8930. "SET RECEIVE PATHNAMES {OFF, ABSOLUTE, RELATIVE, AUTO}",
  8931. " If a recognizable path (directory, device) specification appears in an",
  8932. " incoming filename, strip it OFF before trying to create the output file.",
  8933. #ifdef CK_MKDIR
  8934. " Otherwise, then if any of the directories in the path don't exist, Kermit",
  8935. " tries to create them, relative to your current or download directory, or",
  8936. " absolutely, as specified. RELATIVE means force all incoming names, even",
  8937. " if they are absolute, to be relative to your current or download directory."
  8938. ,
  8939. " AUTO, which is the default, means RELATIVE if the file sender indicates in",
  8940. " advance that this is a recursive transfer, otherwise OFF.",
  8941. #endif /* CK_MKDIR */
  8942. " ",
  8943. "SET RECEIVE PAUSE number",
  8944. " Milliseconds to pause between packets, normally 0.",
  8945. " ",
  8946. #ifdef CK_PERMS
  8947. "SET RECEIVE PERMISSIONS { ON, OFF }",
  8948. " Whether to copy file permissions from inbound Attribute packets.",
  8949. " ",
  8950. #endif /* CK_PERMS */
  8951. "SET RECEIVE RENAME-TO [ template ]",
  8952. " If a template is specified, then every file that is received successfully",
  8953. " \
  8954. is renamed according to the given template immediately after it is received.",
  8955. " \
  8956. The template should include variables like \\v(filename) or \\v(filenumber).",
  8957. " Omit the template to remove any template previously set.",
  8958. " ",
  8959. "SET RECEIVE START-OF-PACKET number",
  8960. " ASCII value of character that marks start of inbound packet.",
  8961. " ",
  8962. "SET RECEIVE TIMEOUT number",
  8963. " Number of seconds the other Kermit should wait for a packet before sending",
  8964. " a NAK or retransmitting.",
  8965. #ifdef VMS
  8966. " ",
  8967. "SET RECEIVE VERSION-NUMBERS { ON, OFF }",
  8968. " If ON, and in incoming filename includes a VMS version number, use it when",
  8969. " creating the file. If OFF (which is the default), strip any VMS version",
  8970. " number from incoming filenames before attempting to create the file, \
  8971. causing",
  8972. " the new file to receive the next highest version number.",
  8973. #endif /* VMS */
  8974. "" };
  8975. static char *hxysnd[] = {
  8976. "Syntax: SET SEND parameter value",
  8977. " Specifies parameters for outbound files or packets.",
  8978. " ",
  8979. "SET SEND BACKUP { ON, OFF }",
  8980. " Tells whether to include backup files when sending file groups. Backup",
  8981. " files are those created by Kermit, EMACS, etc, when creating a new file",
  8982. " that has the same name as an existing file. A backup file has a version",
  8983. " appended to its name, e.g. oofa.txt.~23~. ON is the default, meaning",
  8984. " don't exclude backup files. Use OFF to exclude backup files from group",
  8985. " transfers.",
  8986. " ",
  8987. #ifndef NOCSETS
  8988. "SET SEND CHARACTER-SET { AUTOMATIC, MANUAL }",
  8989. " Whether to automatically switch to an appropriate file-character when a",
  8990. " SET TRANSFER CHARACTER-SET command is given, or vice versa. AUTOMATIC by",
  8991. " default. Also see HELP ASSOCIATE.",
  8992. " ",
  8993. #endif /* NOCSETS */
  8994. "SET SEND CONTROL-PREFIX number",
  8995. " ASCII value of prefix character used for quoting control characters in",
  8996. " packets that Kermit sends, normally 35 (number sign).",
  8997. " ",
  8998. #ifdef CKXXCHAR
  8999. "SET SEND DOUBLE-CHARACTER number",
  9000. " ASCII value of character to be doubled when sending packets, such as an",
  9001. " X.25 PAD escape character.",
  9002. " ",
  9003. #endif /* CKXXCHAR */
  9004. "SET SEND END-OF-PACKET number",
  9005. " ASCII value of control character to terminate an outbound packet,",
  9006. " normally 13 (carriage return).",
  9007. " ",
  9008. "SET SEND MOVE-TO [ directory ]",
  9009. " \
  9010. If a directory name is specified, then every file that is sent successfully",
  9011. " is moved to the given directory immediately after it is sent.",
  9012. " Omit the directory name to remove any previously set move-to directory.",
  9013. " ",
  9014. "SET SEND PACKET-LENGTH number",
  9015. " Maximum length packet to send, even if other Kermit asks for longer ones.",
  9016. " This command can not be used to force packets to be sent that are longer",
  9017. " than the length requested by the receiver. Use this command only to",
  9018. " force shorter ones.",
  9019. " ",
  9020. "SET SEND PADDING number",
  9021. " Number of prepacket padding characters to send.",
  9022. " ",
  9023. "SET SEND PAD-CHARACTER number",
  9024. " ASCII value of control character to use for padding.",
  9025. " ",
  9026. "SET SEND PATHNAMES {OFF, ABSOLUTE, RELATIVE}",
  9027. " Include the path (device, directory) portion with the file name when",
  9028. " sending it as specified; ABSOLUTE means to send the whole pathname,",
  9029. " RELATIVE means to include the pathname relative to the current directory.",
  9030. " Applies to the actual filename, not to the \"as-name\". The default is",
  9031. " OFF.",
  9032. " ",
  9033. "SET SEND PAUSE number",
  9034. " Milliseconds to pause between packets, normally 0.",
  9035. " ",
  9036. #ifdef CK_PERMS
  9037. "SET SEND PERMISSIONS { ON, OFF }",
  9038. " Whether to include file permissions in outbound Attribute packets.",
  9039. " ",
  9040. #endif /* CK_PERMS */
  9041. "SET SEND RENAME-TO [ template ]",
  9042. " If a template is specified, then every file that is sent successfully",
  9043. " is renamed according to the given template immediately after it is sent.",
  9044. " \
  9045. The template should include variables like \\v(filename) or \\v(filenumber).",
  9046. " Omit the template to remove any template previously set.",
  9047. " ",
  9048. "SET SEND START-OF-PACKET number",
  9049. " ASCII value of character to mark start of outbound packet.",
  9050. " ",
  9051. #ifdef CK_TIMERS
  9052. "SET SEND TIMEOUT number [ { DYNAMIC [ min max ] ], FIXED } ]",
  9053. #else
  9054. "SET SEND TIMEOUT number",
  9055. #endif /* CK_TIMERS */
  9056. " Number of seconds to wait for a packet before sending NAK or",
  9057. #ifdef CK_TIMERS
  9058. " retransmitting. Include the word DYNAMIC after the number in the",
  9059. " SET SEND TIMEOUT command to have Kermit compute the timeouts dynamically",
  9060. " throughout the transfer based on the packet rate. Include the word FIXED",
  9061. " to use the \"number\" given throughout the transfer. DYNAMIC is the",
  9062. " default. After DYNAMIC you may include minimum and maximum values.",
  9063. " SET SEND TIMEOUT -1 FIXED means no timeouts.",
  9064. #else
  9065. " retransmitting.",
  9066. #endif /* CK_TIMERS */
  9067. #ifdef VMS
  9068. " ",
  9069. "SET SEND VERSION-NUMBERS { ON, OFF }",
  9070. " If ON, include VMS version numbers in outbound filenames. If OFF (which",
  9071. " is the default), strip version numbers.",
  9072. #endif /* VMS */
  9073. "" };
  9074. static char *hxyxfer[] = {
  9075. "Syntax: SET TRANSFER (or XFER) parameter value",
  9076. " ",
  9077. "Choices:",
  9078. " ",
  9079. "SET TRANSFER BELL { OFF, ON }",
  9080. " Whether to ring the terminal bell at the end of a file transfer.",
  9081. " ",
  9082. #ifdef XFRCAN
  9083. "SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ] }",
  9084. " OFF disables remote-mode packet-mode cancellation from the keyboard.",
  9085. " ON enables it. The optional <code> is the control character to use for",
  9086. " cancellation; the optional <number> is how many consecutive occurrences",
  9087. " of the given control character are required for cancellation.",
  9088. " ",
  9089. #endif /* XFRCAN */
  9090. "SET TRANSFER INTERRUPTION { ON, OFF }",
  9091. " TRANSFER INTERRUPTION is normally ON, allowing for interruption of a file",
  9092. " transfer in progress by typing certain characters while the file-transfer",
  9093. " display is active. SET TRANSFER INTERRUPTION OFF disables interruption",
  9094. " of file transfer from the keyboard in local mode.",
  9095. " ",
  9096. #ifndef NOSPL
  9097. "SET TRANSFER CRC-CALCULATION { OFF, ON }",
  9098. " Tells whether Kermit should accumulate a Cyclic Redundancy Check for ",
  9099. " each file transfer. Normally ON, in which case the CRC value is available",
  9100. " in the \\v(crc16) variable after the transfer. Adds some overhead. Use",
  9101. " SET TRANSFER CRC OFF to disable.",
  9102. " ",
  9103. #endif /* NOSPL */
  9104. #ifndef NOCSETS
  9105. "SET TRANSFER CHARACTER-SET name",
  9106. " Selects the character set used to represent textual data in Kermit",
  9107. " packets. Text characters are translated to/from the FILE CHARACTER-SET.",
  9108. " Choices:",
  9109. " ",
  9110. " TRANSPARENT (no translation, the default)",
  9111. " ASCII",
  9112. " LATIN1 (ISO 8859-1 Latin Alphabet 1)",
  9113. #ifndef NOLATIN2
  9114. " LATIN2 (ISO 8859-2 Latin Alphabet 2)",
  9115. #endif /* NOLATIN2 */
  9116. " LATIN9 (ISO 8859-15 Latin Alphabet 9)",
  9117. #ifdef CYRILLIC
  9118. " CYRILLIC-ISO (ISO 8859-5 Latin/Cyrillic)",
  9119. #endif /* CYRILLIC */
  9120. #ifdef GREEK
  9121. " GREEK-ISO (ISO 8859-7 Latin/Greek)",
  9122. #endif /* GREEK */
  9123. #ifdef HEBREW
  9124. " HEBREW-ISO (ISO 8859-8 Latin/Hebrew)",
  9125. #endif /* HEBREW */
  9126. #ifdef KANJI
  9127. " JAPANESE-EUC (JIS X 0208 Kanji + Roman and Katakana)",
  9128. #endif /* KANJI */
  9129. #ifdef UNICODE
  9130. " UCS-2 (ISO 10646 / Unicode 2-byte form)",
  9131. " UTF-8 (ISO 10646 / Unicode 8-bit serialized transformation format)",
  9132. #endif /* UNICODE */
  9133. " ",
  9134. "SET TRANSFER TRANSLATION { ON, OFF }",
  9135. " Enables and disables file-transfer character-set translation. It's",
  9136. " enabled by default.",
  9137. #endif /* NOCSETS */
  9138. " ",
  9139. #ifdef CK_CURSES
  9140. "SET TRANSFER DISPLAY { BRIEF, CRT, FULLSCREEN, NONE, SERIAL }",
  9141. #else
  9142. "SET TRANSFER DISPLAY { BRIEF, CRT, NONE, SERIAL }",
  9143. #endif /* CK_CURSES */
  9144. " Choose the desired format for the progress report to be displayed on",
  9145. " your screen during file transfers when Kermit is in local mode.",
  9146. #ifdef CK_CURSES
  9147. " FULLSCREEN requires your terminal type be set correctly; the others",
  9148. " are independent of terminal type.",
  9149. #else
  9150. " file transfer.",
  9151. #endif /* CK_CURSES */
  9152. " ",
  9153. "SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }",
  9154. " Tell whether locking-shift protocol should be used during file transfer",
  9155. " to achieve 8-bit transparency on a 7-bit connection. ON means to request",
  9156. " its use if PARITY is not NONE and to use it if the other Kermit agrees,",
  9157. " OFF means not to use it, FORCED means to use it even if the other Kermit",
  9158. " does not agree.",
  9159. " ",
  9160. "SET TRANSFER MODE { AUTOMATIC, MANUAL }",
  9161. " Automatic (the default) means Kermit should automatically go into binary",
  9162. " file-transfer mode and use literal filenames if the other Kermit says it",
  9163. " has a compatible file system, e.g. UNIX-to-UNIX, but not UNIX-to-DOS.",
  9164. #ifdef PATTERNS
  9165. " Also, when sending files, Kermit should switch between binary and text",
  9166. " mode automatically per file based on the SET FILE BINARY-PATTERNS and SET",
  9167. " FILE TEXT-PATTERNS.",
  9168. #endif /* PATTERNS */
  9169. " ",
  9170. #ifdef PIPESEND
  9171. "SET TRANSFER PIPES { ON, OFF }",
  9172. " Enables/Disables automatic sending from / reception to command pipes when",
  9173. " the incoming filename starts with '!'. Also see CSEND, CRECEIVE.",
  9174. " ",
  9175. #endif /* PIPESEND */
  9176. #ifdef CK_XYZ
  9177. "SET TRANSFER PROTOCOL { KERMIT, XMODEM, ... }",
  9178. " Synonym for SET PROTOCOL (q.v.).",
  9179. " ",
  9180. #endif /* CK_XYZ */
  9181. "SET TRANSFER REPORT { ON, OFF }",
  9182. " Enables/Disables the automatic post-transfer message telling what files",
  9183. " went where from C-Kermit when it is in remote mode. ON by default.",
  9184. " ",
  9185. "SET TRANSFER SLOW-START { OFF, ON }",
  9186. " ON (the default) tells Kermit, when sending files, to gradually build up",
  9187. " the packet length to the maximum negotiated length. OFF means start",
  9188. " sending the maximum length right away.",
  9189. " ",
  9190. "Synonym: SET XFER. Use SHOW TRANSFER (XFER) to see SET TRANSFER values.",
  9191. "" };
  9192. #endif /* NOXFER */
  9193. #ifdef NT
  9194. static char *hxywin95[] = {
  9195. "SET WIN95 8.3-FILENAMES { ON, OFF }",
  9196. " Instructs K-95 to report all filenames using 8.3 notation instead of the",
  9197. " normal long filenames. Default is OFF",
  9198. " ",
  9199. "SET WIN95 ALT-GR { ON, OFF }",
  9200. " Instructs K-95, when used on MS Windows 95, to interpret the Right Alt key",
  9201. " as the Alt-Gr key. This is necessary to work around the failure of",
  9202. " Windows 95 to properly translate non-US keyboards. Default is OFF.",
  9203. " ",
  9204. "SET WIN95 KEYBOARD-TRANSLATION <character-set>",
  9205. " Specifies the character-set that Windows 95 is using to send keystrokes",
  9206. " to Kermit-95 via the keyboard input functions. Default is Latin1-ISO.",
  9207. " ",
  9208. "SET WIN95 OVERLAPPED-IO { ON <requests>, OFF }",
  9209. " Determines whether or not K-95 uses Overlapped-I/O methods for reading",
  9210. " from and writing to serial and TAPI communication devices. <requests>",
  9211. " specifies the maximum number of simultaneous write requests that may be",
  9212. " overlapped, from 1 to 30. Default is ON.",
  9213. " ",
  9214. "SET WIN95 POPUPS { ON, OFF }",
  9215. " Determines whether or not Kermit 95 uses Popups to query the user for",
  9216. " necessary information such as user IDs or passwords. Default is ON.",
  9217. " ",
  9218. "SET WIN95 SELECT-BUG { ON, OFF }"
  9219. " Some TCP/IP (Winsock) implementations for Windows have a defective",
  9220. " select() function. Use this command to avoid the use of select() if",
  9221. " K95 appears to be unable to send data over TCP/IP. Default is OFF.",
  9222. ""};
  9223. #endif /* NT */
  9224. static char *hmxybel[] = {
  9225. #ifdef OS2
  9226. "Syntax: SET BELL { AUDIBLE [ { BEEP, SYSTEM-SOUNDS } ], VISIBLE, NONE }",
  9227. " Specifies how incoming Ctrl-G (bell) characters are handled in CONNECT",
  9228. " mode and how command warnings are presented in command mode. AUDIBLE",
  9229. " means either a beep or a system-sound is generated; VISIBLE means the",
  9230. " screen is flashed momentarily.",
  9231. #else
  9232. "Syntax: SET BELL { OFF, ON }",
  9233. " ON (the default) enables ringing of the terminal bell (beep) except where",
  9234. " it is disabled in certain circumstances, e.g. by SET TRANSFER BELL. OFF",
  9235. " disables ringing of the bell in all circumstances, overriding any specific",
  9236. " SET xxx BELL selections.",
  9237. #endif /* OS2 */
  9238. ""};
  9239. #ifdef OS2
  9240. static char *hmxymsk[] = {
  9241. "SET MSKERMIT FILE-RENAMING { ON, OFF }",
  9242. " ON enables the use of MS-DOS Kermit file renaming conventions instead of",
  9243. " C-Kermit conventions. File renaming occurs during file transfers when",
  9244. " there is a file name collision and either BACKUP or RENAME collision",
  9245. " options are active. C-Kermit conventions preserve the original file name",
  9246. " while appending .~num~ to the end. MS-DOS Kermit conventions restrict",
  9247. " filenames to 8.3 notation and preserve the extension. Unique numeric",
  9248. " values overwrite the right most portion of the file name's left hand side.",
  9249. " ",
  9250. "SET MSKERMIT KEYCODES { ON, OFF }",
  9251. " ON enables the use of MS-DOS Kermit compatible keycodes to provide script",
  9252. " portability.",
  9253. ""};
  9254. #endif /* OS2 */
  9255. static char *hmxycd[] = {
  9256. "Syntax: SET CD { HOME <path>, PATH <path>, MESSAGE { ON, OFF, FILE <list> } }"
  9257. ,
  9258. " ",
  9259. "SET CD HOME <path>",
  9260. " Specified which directory to change to if CD or KCD is given without a",
  9261. " pathname. If this command is not given, your login or HOME directory is",
  9262. " used.",
  9263. " ",
  9264. "SET CD PATH <path>",
  9265. " Overrides normal CDPATH environment variable, which tells the CD command",
  9266. " where to look for directories to CD to if you don't specify them fully.",
  9267. " The format is:",
  9268. " ",
  9269. #ifdef UNIXOROSK
  9270. " set cd path :directory:directory:...",
  9271. " ",
  9272. " in other words, a list of directories separated by colons, with a colon",
  9273. " at the beginning, e.g.:",
  9274. " ",
  9275. " set cd path :/usr/olga:/usr/ivan/public:/tmp",
  9276. #else
  9277. #ifdef OS2
  9278. " set cd path disk:directory;disk:directory;...",
  9279. " ",
  9280. " just like the DOS PATH; in other words, a list of disk:directory names",
  9281. " separated by semicolons, e.g.:",
  9282. " ",
  9283. " SET CD PATH C:\\K95;C:\\HOME;C:\\LOCAL;C:\\",
  9284. #else
  9285. #ifdef VMS
  9286. " set cd path directory,directory,...",
  9287. " ",
  9288. " in other words, a list of directory specifications or logical names that",
  9289. " represent them, e.g.:",
  9290. " ",
  9291. " SET CD PATH SYS$LOGIN:,$DISK1:[OLGA],$DISK2[SCRATCH.IVAN].",
  9292. #else
  9293. " (unknown for this platform)",
  9294. #endif /* VMS */
  9295. #endif /* OS2 */
  9296. #endif /* UNIXOROSK */
  9297. " ",
  9298. "SET CD MESSAGE { ON, OFF }",
  9299. " Default is OFF. When ON, this tells Kermit to look for a file with a",
  9300. " certain name in any directory that you CD to, and if it finds one, to",
  9301. " display it on your screen when you give the CD command. The filename,",
  9302. " or list of names, is given in the SET CD MESSAGE FILE command.",
  9303. " ",
  9304. "SET CD MESSAGE FILE name",
  9305. " or:",
  9306. "SET CD MESSAGE FILE {{name1}{name2}...{name8}}",
  9307. " Specify up to 8 filenames to look for when when CDing to a new directory",
  9308. " and CD MESSAGE is ON. The first one found, if any, in the new directory",
  9309. #ifndef DFCDMSG
  9310. " is displayed.",
  9311. #else
  9312. " is displayed. The default list is:",
  9313. " ",
  9314. #ifdef UNIXOROSK
  9315. " {{./.readme}{README.TXT}{READ.ME}}",
  9316. #else
  9317. " {{README.TXT}{READ.ME}}",
  9318. #endif /* UNIXOROSK */
  9319. " ",
  9320. #endif /* DFCDMSG */
  9321. #ifndef NOSERVER
  9322. "Synonym: SET SERVER CD-MESSAGE FILE.",
  9323. #endif /* NOSERVER */
  9324. " ",
  9325. "Type SHOW CD to view current CD settings. Also see HELP SET SERVER.",
  9326. ""
  9327. };
  9328. #ifndef NOIKSD
  9329. static char * hsetiks[] = {
  9330. #ifdef OS2
  9331. "SET IKS ANONYMOUS ACCOUNT <username>",
  9332. " On Windows NT/2000 this is the account that will be used to allow",
  9333. " anonymous access to the system. This account MUST have no password",
  9334. " and its privileges should be restricted to only allow those operations",
  9335. " which should be permitted to unknown users. In practice this means",
  9336. " List Directories and Read-Execute privileges only. If a directory",
  9337. " is configured for Write privileges then Read privileges should be",
  9338. " denied for that directory. Otherwise, your system will become used",
  9339. " by software pirates. If this command is not specified in the IKSD.KSC",
  9340. " file the username \"GUEST\" is used by default. This command has no",
  9341. " effect on Windows 95/98.",
  9342. " ",
  9343. #endif /* OS2 */
  9344. "SET IKS ANONYMOUS INITFILE filename",
  9345. #ifdef OS2
  9346. " The initialization file to be executed for anonymous logins. By default",
  9347. " it is K95.INI in the home directory associated with the ANNONYMOUS account."
  9348. ,
  9349. " Any filename that you specify here must be readable by the ANONYMOUS",
  9350. " account and if a SET IKS ANONYMOUS ROOT command was given, exist within",
  9351. " the restricted directory tree. This option is independent of the SET IKS",
  9352. " INITFILE command which applies only to real users.",
  9353. #else
  9354. " The initialization file to be executed for anonymous logins. By default",
  9355. " it is .kermrc in the anonymous root directory. This option is independent",
  9356. " of the SET IKS INITFILE command which applies only to real users.",
  9357. #endif /* OS2 */
  9358. " ",
  9359. "SET IKS ANONYMOUS LOGIN { ON, OFF }",
  9360. #ifdef OS2
  9361. " Whether anonymous logins are allowed. By default they are NOT allowed,",
  9362. " so this option need be included only to allow them (or for clarity, to",
  9363. " emphasize that they are not allowed). Anonymous login occurs when the",
  9364. " username \"anonymous\" is specified with any password (as with ftpd).",
  9365. " In order for anonymous logins to succeed on Windows NT/2000, the",
  9366. " ANONYMOUS account must be enabled.",
  9367. " ",
  9368. " On Windows NT and 2000, anonymous users have the same access rights as",
  9369. " the ANONYMOUS account. In Windows 95/98, anonymous users, just like any",
  9370. " other users, have full access rights to your entire PC, since Windows 95",
  9371. " and 98 include no security features. For this reason, if you are allowing",
  9372. " anonymous logins, be sure to also SET an IKS ANONYMOUS ROOT directory to",
  9373. " restrict anonymous users' file access.",
  9374. " ",
  9375. " Anonymous user permissions may be restricted via the specification of ",
  9376. " DISABLE commands in the ANONYMOUS initfile. Anonymous users are not ",
  9377. " permitted to execute an ENABLE command. Anonymous users are also prevented"
  9378. ,
  9379. " from SHOWing sensitive data about the operating system or the IKS",
  9380. " configuration.",
  9381. #else
  9382. " Whether anonymous logins are allowed. By default they are allowed, so this",
  9383. " option need be included only to disallow them (or for clarity, to emphasize"
  9384. ,
  9385. " they are allowed). Anonymous login occurs when the username \"anonymous\"",
  9386. " or \"ftp\" is given, with any password (as with ftpd).",
  9387. #endif /* OS2 */
  9388. " ",
  9389. "SET IKS ANONYMOUS ROOT <directory>",
  9390. " Specifies a directory tree to which anonymous users are restricted after",
  9391. " login.",
  9392. " ",
  9393. "SET IKS BANNERFILE <filename>",
  9394. " The name of a file containing a message to be printed after the user logs",
  9395. " in, in place of the normal message (copyright notice, \"Type HELP or ? for",
  9396. " help\", etc).",
  9397. " ",
  9398. "SET IKS CDFILE <filelist>",
  9399. " When cdmessage is on, this is the name of the \"read me\" file to be shown."
  9400. ,
  9401. " Normally you would specify a relative (not absolute) name, since the file",
  9402. " is opened using the literal name you specified, after changing to the new",
  9403. " directory. Example:",
  9404. " ",
  9405. " SET IKS CDFILE READ.ME",
  9406. " ",
  9407. " You can also give a list of up to 8 filenames by (a) enclosing each",
  9408. " filename in braces, and (b) enclosing the entire list in braces. Example:",
  9409. " ",
  9410. " SET IKS CDFILE {{READ.ME}{aareadme.txt}{README}{read-this-first}}",
  9411. " ",
  9412. " When a list is given, it is searched from left to right and the first",
  9413. " file found is displayed.",
  9414. " ",
  9415. "SET IKS CDMESSAGE {ON, OFF, 0, 1, 2}",
  9416. " For use in the Server-Side Server configuration; whenever the client",
  9417. " tells the server to change directory, the server sends the contents of a",
  9418. " \"read me\" file to the client's screen. This feature is ON by default,",
  9419. " and operates in client/server mode only when ON or 1. If set to 2 or",
  9420. " higher, it also operates when the CD command is given at the IKSD> prompt.",
  9421. " Synonym: SET IKS CDMSG.",
  9422. " ",
  9423. "SET IKS DATABASE { ON, OFF }",
  9424. " This command determines whether entries are inserted into the SET IKS",
  9425. " DBFILE (IKSD active sessions database).",
  9426. " ",
  9427. "SET IKS DBFILE <filename>",
  9428. " Specifies the file which should be used for storing runtime status",
  9429. #ifdef OS2
  9430. " information about active connections. The default is a file called",
  9431. " \"iksd.db\" in the WINDOWS directory.",
  9432. #else
  9433. #ifdef UNIX
  9434. " information about active connections. The default is a file called",
  9435. " \"iksd.db\" in the /var/log directory.",
  9436. #else
  9437. " information about active connections.",
  9438. #endif /* UNIX */
  9439. #endif /* OS2 */
  9440. " ",
  9441. #ifdef OS2
  9442. "SET IKS DEFAULT-DOMAIN <domain-name>",
  9443. " A userid on Windows is of the form DOMAIN\\\\userid. This command",
  9444. " determines which domain will be searched for the userid if a domain",
  9445. " is not specified by the user. On Windows 95/98 when User-level",
  9446. " access is activated in the Network Control Panel, the default ",
  9447. " domain will be automatically set. If the default domain is not",
  9448. " specified, accounts on the local machine will take precedence over",
  9449. " accounts in Domains to which the local machine belongs.",
  9450. #endif /* OS2 */
  9451. " ",
  9452. "SET IKS HELPFILE <filename>",
  9453. " Specifies the name of a file to be displayed if the user types HELP",
  9454. " (not followed by a specific command or topic), in place of the built-in",
  9455. " top-level help text. The file need not fit on one screen; more-prompting",
  9456. " is used if the file is more than one screen long if COMMAND MORE-PROMPTING",
  9457. " is ON, as it is by default.",
  9458. " ",
  9459. "SET IKS INITFILE <filename>",
  9460. " Execute <filename> rather than the normal initialization file for real",
  9461. " users; this option does not apply to anonymous users.",
  9462. " ",
  9463. "SET IKS NO-INITFILE { ON, OFF }",
  9464. " Do not execute an initialization file, even if a real user is logging in.",
  9465. " ",
  9466. "SET IKS SERVER-ONLY { ON, OFF }",
  9467. " If this option is included on the IKSD command line, the Client Side Server"
  9468. ,
  9469. " configuration is disabled, and the user will not get a Username: or",
  9470. " Password: prompt, and will not be able to access the IKSD command prompt.",
  9471. " A FINISH command sent to the IKSD will log it out and close the",
  9472. " connection, rather than returning it to its prompt.",
  9473. " ",
  9474. "SET IKS TIMEOUT <number>",
  9475. " This sets a limit (in seconds) on the amount of time the client has to log",
  9476. " in once the connection is made. If successful login does not occur within",
  9477. " the given number of seconds, the connection is closed. The default timeout"
  9478. ,
  9479. " is 300 seconds (5 minutes). A value of 0 or less indicates there is to be",
  9480. " no limit.",
  9481. " ",
  9482. "SET IKS USERFILE <filename>",
  9483. #ifdef UNIX
  9484. " This file contains a list of local usernames that are to be denied access",
  9485. " to Internet Kermit Service. The default is /etc/ftpusers. This can be the"
  9486. ,
  9487. " same file that is used by wuftpd, and the syntax is the same: one username",
  9488. " per line; lines starting with \"#\" are ignored. Use this option to",
  9489. " specify the name of a different forbidden-user file, or use",
  9490. " \"set iks userfile /dev/null\" to disable this feature in case there is a",
  9491. " /etc/ftpusers file but you don't want to use it.",
  9492. #else
  9493. " This file contains a list of local usernames that are to be denied access",
  9494. " to Internet Kermit Service. The syntax is: one username per line; lines",
  9495. " starting with \"#\" are ignored.",
  9496. #endif /* UNIX */
  9497. " ",
  9498. "SET IKS XFERLOG { ON, OFF }",
  9499. #ifdef UNIX
  9500. " Whether a file-transfer log should be kept. Off by default. If \"on\",",
  9501. " but no SET IKSD XFERFILE command is given, /var/log/iksd.log is used.",
  9502. #else
  9503. " Whether a file-transfer log should be kept. Off by default.",
  9504. #endif /* UNIX */
  9505. " ",
  9506. "SET IKS XFERFILE <filename>",
  9507. " Use this option to specify an iksd log file name. If you include this",
  9508. " option, it implies SET IKS XFERFILE ON.",
  9509. ""
  9510. };
  9511. #endif /* NOIKSD */
  9512. /* D O H S E T -- Give help for SET command */
  9513. int
  9514. dohset(xx) int xx; {
  9515. int x;
  9516. if (xx == -3) return(hmsga(hmhset));
  9517. if (xx < 0) return(xx);
  9518. #ifdef NEWFTP
  9519. if (xx == XYFTPX)
  9520. return(dosetftphlp());
  9521. if (xx == XYGPR)
  9522. return(hmsga(hmxygpr));
  9523. #endif /* NEWFTP */
  9524. if ((x = cmcfm()) < 0) return(x);
  9525. switch (xx) {
  9526. #ifndef NOIKSD
  9527. case XYIKS:
  9528. return(hmsga(hsetiks));
  9529. #endif /* NOIKSD */
  9530. case XY_REN:
  9531. return(hmsg("SET RENAME LIST { ON, OFF }\n\
  9532. Tells whether the RENAME command should list its results by default.\n\n\
  9533. SET RENAME COLLISION { FAIL, PROCEED, OVERWRITE }\n\
  9534. Establishes the default action when renaming a file would destroy an\n\
  9535. existing file. See HELP RENAME."));
  9536. case XYATTR:
  9537. return(hmsga(hsetat));
  9538. case XYBACK:
  9539. return(hmsga(hsetbkg));
  9540. case XYBELL:
  9541. return(hmsga(hmxybel));
  9542. #ifdef OS2
  9543. case XYPRTY:
  9544. return(hmsg("SET PRIORITY { REGULAR, FOREGROUND-SERVER, TIME-CRITICAL }\n\
  9545. Specifies at which priority level the communication and screen update\n\
  9546. threads should operate. The default value is FOREGROUND-SERVER."));
  9547. case XYMSK:
  9548. return(hmsga(hmxymsk));
  9549. #endif /* OS2 */
  9550. #ifdef DYNAMIC
  9551. case XYBUF:
  9552. return(hmsga(hsetbuf));
  9553. #endif /* DYNAMIC */
  9554. #ifndef NOLOCAL
  9555. case XYCARR:
  9556. return(hmsga(hsetcar));
  9557. #endif /* NOLOCAL */
  9558. #ifndef NOSPL
  9559. case XYCASE:
  9560. return(hmsg("Syntax: SET CASE { ON, OFF }\n\
  9561. Tells whether alphabetic case is significant in string comparisons\n\
  9562. done by INPUT, IF, and other commands. This setting is local to the\n\
  9563. current macro or command file, and inherited by subordinates."));
  9564. #endif /* NOSPL */
  9565. case XYCMD:
  9566. return(hmsga(hsetcmd));
  9567. case XYIFD:
  9568. return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
  9569. Whether to discard or keep incompletely received files, default is KEEP."));
  9570. #ifndef NOSPL
  9571. case XYINPU:
  9572. return(hmsga(hxyinp));
  9573. #endif /* NOSPL */
  9574. case XYCHKT:
  9575. return(hmsga(hmxychkt));
  9576. #ifndef NOSPL
  9577. case XYCOUN:
  9578. return(hmsg("Syntax: SET COUNT number\n\
  9579. Example: SET COUNT 5\n\
  9580. Set up a loop counter, for use with IF COUNT. Local to current macro\n\
  9581. or command file, inherited by subordinate macros and command files."));
  9582. #endif /* NOSPL */
  9583. case XYDEBU:
  9584. return(hmsga(hmxydeb));
  9585. case XYDFLT:
  9586. return(hmsg("Syntax: SET DEFAULT directory\n\
  9587. Change directory. Equivalent to CD command."));
  9588. case XYDELA:
  9589. return(hmsg("Syntax: SET DELAY number\n\
  9590. Number of seconds to wait before sending first packet after SEND command."));
  9591. #ifndef NODIAL
  9592. case XYDIAL:
  9593. return(hmsga(hmxydial));
  9594. #endif /* NODIAL */
  9595. #ifdef UNIX
  9596. case XYSUSP:
  9597. return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\
  9598. Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT.")
  9599. );
  9600. #endif
  9601. #ifndef NOSCRIPT
  9602. case XYSCRI:
  9603. return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\
  9604. Disables/Enables echoing of SCRIPT command operation."));
  9605. #endif /* NOSCRIPT */
  9606. case XYTAKE:
  9607. return(hmsga(hxytak));
  9608. #ifndef NOLOCAL
  9609. case XYTERM:
  9610. return(hmsga(hxyterm));
  9611. case XYDUPL:
  9612. return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\
  9613. During CONNECT: FULL means remote host echoes, HALF means Kermit\n\
  9614. does its own echoing."));
  9615. case XYLCLE:
  9616. return(hmsg("Syntax: SET LOCAL-ECHO { OFF, ON }\n\
  9617. During CONNECT: OFF means remote host echoes, ON means Kermit\n\
  9618. does its own echoing. Synonym for SET DUPLEX { FULL, HALF }."));
  9619. case XYESC:
  9620. return(hmsga(hxyesc)); /* SET ESCAPE */
  9621. #endif /* NOLOCAL */
  9622. case XYPRTR: /* SET PRINTER */
  9623. return(hmsga(hxyprtr));
  9624. #ifdef OS2
  9625. #ifdef BPRINT
  9626. case XYBDCP: /* SET BPRINTER */
  9627. return(hmsga(hxybprtr));
  9628. #endif /* BPRINT */
  9629. #endif /* OS2 */
  9630. case XYEXIT:
  9631. return(hmsga(hxyexit));
  9632. case XYFILE:
  9633. return(hmsga(hmxyf));
  9634. case XYFLOW:
  9635. return(hmsga(hmxyflo));
  9636. case XYHAND:
  9637. return(hmsga(hmxyhsh));
  9638. #ifdef NETCONN
  9639. case XYHOST:
  9640. return(hmsga(hxyhost));
  9641. case XYNET:
  9642. return(hmsga(hxynet));
  9643. #ifndef NOTCPOPTS
  9644. #ifdef SOL_SOCKET
  9645. case XYTCP:
  9646. return(hmsga(hxytcp));
  9647. #endif /* SOL_SOCKET */
  9648. #endif /* NOTCPOPTS */
  9649. #ifdef ANYX25
  9650. case XYX25:
  9651. return(hmsga(hxyx25));
  9652. #ifndef IBMX25
  9653. case XYPAD:
  9654. return(hmsg("Syntax: SET PAD name value\n\
  9655. Set a PAD X.3 parameter with a desired value."));
  9656. #endif /* IBMX25 */
  9657. #endif /* ANYX25 */
  9658. #endif /* NETCONN */
  9659. #ifndef NOSPL
  9660. case XYOUTP:
  9661. return(hmsga(hxyout));
  9662. #endif /* NOSPL */
  9663. #ifndef NOSETKEY
  9664. case XYKEY: /* SET KEY */
  9665. return(hmsga(hmhskey));
  9666. #endif /* NOSETKEY */
  9667. #ifndef NOCSETS
  9668. case XYLANG:
  9669. return(hmsg("Syntax: SET LANGUAGE name\n\
  9670. Selects language-specific translation rules for text-mode file transfers.\n\
  9671. Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
  9672. of these is ASCII."));
  9673. #endif /* NOCSETS */
  9674. case XYLINE:
  9675. printf("\nSyntax: SET LINE (or SET PORT) [ switches ] [ devicename ]\n\
  9676. Selects a serial-port device to use for making connections.\n");
  9677. #ifdef OS2
  9678. #ifdef NT
  9679. printf("\n");
  9680. printf(
  9681. " You may access communication ports by the traditional \"DOS\" port name\n");
  9682. printf(
  9683. " (e.g. SET PORT COM1) or by the Microsoft Telephony modem name from the\n");
  9684. printf(
  9685. " Modems folder of the Control Panel (e.g. SET PORT TAPI). If one method\n");
  9686. printf(" doesn't work, try the other.\n\n");
  9687. #endif /* NT */
  9688. #else /* OS2 */
  9689. printf(" Typical device name for this platform: %s.\n",ttgtpn());
  9690. printf(" The default device name is %s (i.e. none).\n",dftty);
  9691. if (!dfloc) {
  9692. printf(
  9693. " If you do not give a SET LINE command or if you give a SET LINE command\n");
  9694. printf(
  9695. " with no device name, or if you specify %s as the device name,\n",dftty);
  9696. printf(
  9697. " Kermit will be in \"remote mode\", suitable for use on the far end of a\n");
  9698. printf(
  9699. " connection, e.g. as the file-transfer partner of your desktop communication\
  9700. \n");
  9701. printf(
  9702. " software. If you SET LINE to a specific device other than %s,\n", dftty);
  9703. printf(
  9704. " Kermit is in \"local mode\", suitable for making a connection to another\n"
  9705. );
  9706. printf(
  9707. " computer. SET LINE alone resets Kermit to remote mode.\n");
  9708. }
  9709. #endif /* OS2 */
  9710. printf(
  9711. " To use a modem to dial out, first SET MODEM TYPE (e.g., to USR), then\n");
  9712. printf(
  9713. #ifdef OS2
  9714. " SET PORT COMx (or SET PORT TAPI), SET SPEED, then give a DIAL command.\n");
  9715. #else
  9716. " SET LINE xxx, then SET SPEED, then give a DIAL command.\n");
  9717. #endif /* OS2 */
  9718. printf(
  9719. #ifdef OS2
  9720. " For direct null-modem connections use SET MODEM TYPE NONE, SET PORT COMx,\n"
  9721. #else
  9722. " For direct null-modem connections, use SET MODEM TYPE NONE, SET LINE xxx,\n"
  9723. #endif /* OS2 */
  9724. );
  9725. printf(
  9726. " then SET FLOW, SET SPEED, and CONNECT.\n");
  9727. printf(
  9728. "\nOptional switches:\n\
  9729. /CONNECT - Enter CONNECT mode automatically if SET LINE succeeds.\n");
  9730. printf(
  9731. " /SERVER - Enter server mode automatically if SET LINE succeeds.\n");
  9732. #ifdef VMS
  9733. printf(
  9734. " /SHARE - Open the device in shared mode.\n");
  9735. printf(
  9736. " /NOSHARE - Open the device in exclusive mode.\n");
  9737. #endif /* VMS */
  9738. printf("\n");
  9739. printf(
  9740. "Also see HELP SET MODEM, HELP SET DIAL, HELP SET SPEED, HELP SET FLOW.\n");
  9741. return(0);
  9742. #ifndef NOSPL
  9743. case XYMACR:
  9744. return(hmsga(hxymacr));
  9745. #endif /* NOSPL */
  9746. #ifndef NODIAL
  9747. case XYMODM:
  9748. return(hmsga(hxymodm));
  9749. #endif /* NODIAL */
  9750. case XYPARI:
  9751. return(hmsga(hxypari));
  9752. case XYPROM:
  9753. return(hmsga(hmxyprm));
  9754. case XYQUIE:
  9755. return(hmsg("Syntax: SET QUIET {ON, OFF}\n\
  9756. Normally OFF. ON disables most information messages during interactive\n\
  9757. operation."));
  9758. #ifdef CK_SPEED
  9759. case XYQCTL:
  9760. return(hmsga(hmxyqctl));
  9761. #endif /* CK_SPEED */
  9762. case XYRETR:
  9763. return(hmsg("Syntax: SET RETRY number\n\
  9764. In Kermit protocol file transfers: How many times to retransmit a\n\
  9765. particular packet before giving up; 0 = no limit."));
  9766. #ifndef NOLOCAL
  9767. case XYSESS:
  9768. #ifdef UNIX
  9769. return(hmsg(
  9770. "Syntax:\n\
  9771. SET SESSION-LOG { BINARY, DEBUG, NULL-PADDED, TEXT, TIMESTAMPED-TEXT }\n\
  9772. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9773. out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9774. also includes Telnet negotiations on TCP/IP connections."));
  9775. #else
  9776. #ifdef datageneral
  9777. return(hmsg(
  9778. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9779. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9780. out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9781. also includes Telnet negotiations on TCP/IP connections."));
  9782. #else
  9783. #ifdef STRATUS
  9784. return(hmsg(
  9785. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9786. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9787. out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9788. also includes Telnet negotiations on TCP/IP connections."));
  9789. #else
  9790. #ifdef AMIGA
  9791. return(hmsg(
  9792. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9793. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9794. out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9795. also includes Telnet negotiations on TCP/IP connections."));
  9796. #else
  9797. #ifdef GEMDOS
  9798. return(hmsg(
  9799. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9800. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9801. out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9802. also includes Telnet negotiations on TCP/IP connections."));
  9803. #else
  9804. #ifdef OS2
  9805. return(hmsg(
  9806. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9807. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9808. out NUL and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9809. also includes Telnet negotiations on TCP/IP connections."));
  9810. #else
  9811. #ifdef VMS
  9812. return(hmsg(
  9813. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9814. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9815. out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but\n\
  9816. also includes Telnet negotiations on TCP/IP connections."));
  9817. #else
  9818. #ifdef OSK
  9819. return(hmsg(
  9820. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9821. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9822. out LF, NUL and XON/XOFF characters."));
  9823. #else
  9824. #ifdef MAC
  9825. return(hmsg(
  9826. "Syntax: SET SESSION-LOG { BINARY, DEBUG, TEXT, TIMESTAMPED-TEXT }\n\
  9827. If BINARY, record all CONNECT characters in session log. If TEXT, strip\n\
  9828. out LF, NUL and XON/XOFF characters."));
  9829. #endif /* MAC */
  9830. #endif /* OSK */
  9831. #endif /* OS2 */
  9832. #endif /* VMS */
  9833. #endif /* GEMDOS */
  9834. #endif /* AMIGA */
  9835. #endif /* STRATUS */
  9836. #endif /* datageneral */
  9837. #endif /* OS2ORUNIX */
  9838. case XYSPEE:
  9839. #ifdef OS2
  9840. return(hmsg("Syntax: SET SPEED number\n\
  9841. Speed for serial-port communication device specified in most recent\n\
  9842. SET PORT command, in bits per second. Type SET SPEED ? for a list of\n\
  9843. possible speeds."));
  9844. #else
  9845. return(hmsg("Syntax: SET SPEED number\n\
  9846. Speed for serial-port communication device specified in most recent\n\
  9847. SET LINE command, in bits per second. Type SET SPEED ? for a list of\n\
  9848. possible speeds. Has no effect on job's controlling terminal."));
  9849. #endif /* OS2 */
  9850. #endif /* NOLOCAL */
  9851. #ifndef NOXFER
  9852. case XYRECV:
  9853. return(hmsga(hxyrcv));
  9854. case XYSEND:
  9855. return(hmsga(hxysnd));
  9856. case XYREPT:
  9857. return(hmsga(hxyrpt));
  9858. #endif /* NOXFER */
  9859. #ifndef NOSERVER
  9860. case XYSERV:
  9861. return(hmsga(hsetsrv));
  9862. #endif /* NOSERVER */
  9863. #ifdef TNCODE
  9864. case XYTEL:
  9865. return(hmsga(hxytel));
  9866. case XYTELOP:
  9867. return(hmsga(hxytopt));
  9868. #endif /* TNCODE */
  9869. #ifndef NOXMIT
  9870. case XYXMIT:
  9871. return(hmsga(hsetxmit));
  9872. #endif /* NOXMIT */
  9873. #ifndef NOCSETS
  9874. case XYUNCS:
  9875. return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\
  9876. DISCARD (default) means reject any arriving files encoded in unknown\n\
  9877. character sets. KEEP means to accept them anyway."));
  9878. #endif /* NOCSETS */
  9879. #ifdef UNIX
  9880. case XYWILD:
  9881. return(hmsga(hxywild));
  9882. #endif /* UNIX */
  9883. #ifndef NOXFER
  9884. case XYWIND:
  9885. return(hmsga(hxywind));
  9886. case XYXFER:
  9887. return(hmsga(hxyxfer));
  9888. #endif /* NOXFER */
  9889. #ifndef NOLOCAL
  9890. #ifdef OS2MOUSE
  9891. case XYMOUSE:
  9892. return(hmsga(hxymouse));
  9893. #endif /* OS2MOUSE */
  9894. #endif /* NOLOCAL */
  9895. case XYALRM:
  9896. return(hmsg("Syntax: SET ALARM [ { seconds, hh:mm:ss } ]\n\
  9897. Number of seconds from now, or time of day, after which IF ALARM\n\
  9898. will succeed. 0, or no time at all, means no alarm."));
  9899. case XYPROTO:
  9900. return(hmsga(hxyxyz));
  9901. #ifdef CK_SPEED
  9902. case XYPREFIX:
  9903. return(hmsg("Syntax: SET PREFIXING { ALL, CAUTIOUS, MINIMAL }\n\
  9904. \
  9905. Selects the degree of control-character prefixing. Also see HELP SET CONTROL."
  9906. ));
  9907. #endif /* CK_SPEED */
  9908. #ifdef OS2
  9909. case XYLOGIN:
  9910. return(hmsg("Syntax: SET LOGIN { USERID, PASSWORD, PROMPT } <text>\n\
  9911. Provides access information for use by login scripts."));
  9912. #endif /* OS2 */
  9913. #ifndef NOSPL
  9914. case XYTMPDIR:
  9915. return(hmsg("Syntax: SET TEMP-DIRECTORY [ <directory-name> ]\n\
  9916. Tells Kermit to use the given directory for creating temporary files.\n\
  9917. These are used (for example) in FTP downloads and by the CHANGE command.\n\
  9918. If you don't issue this command, C-Kermit picks a directory automatically\n\
  9919. based on the operating system and any environment variables you might have\n\
  9920. set. Use SHOW TEMP-DIRECTORY or SHOW VARIABLE \\v(tmpdir) to see Kermit's\n\
  9921. current temporary directory setting. Synonym: SET TMP-DIRECTORY."));
  9922. #endif /* NOSPL */
  9923. #ifdef OS2
  9924. case XYTITLE:
  9925. return(hmsg("Syntax: SET TITLE <text>\n\
  9926. Sets window title to text instead of using current host/port name."));
  9927. #endif /* OS2 */
  9928. #ifndef NOPUSH
  9929. #ifndef NOFRILLS
  9930. case XYEDIT:
  9931. return(hmsg("Syntax: SET EDITOR pathname [ options ]\n\
  9932. Specifies the name of your preferred editor, plus any command-line\n\
  9933. options. SHOW EDITOR displays it."));
  9934. #endif /* NOFRILLS */
  9935. #endif /* NOPUSH */
  9936. #ifdef BROWSER
  9937. case XYBROWSE:
  9938. #ifdef NT
  9939. return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
  9940. Specifies the name of your preferred browser plus any command-line\n\
  9941. options. SHOW BROWSER displays it. Omit pathname and options to use\n\
  9942. ShellExecute."));
  9943. #else
  9944. return(hmsg("Syntax: SET BROWSER [ pathname [ options ] ]\n\
  9945. Specifies the name of your preferred browser plus any command-line\n\
  9946. options. SHOW BROWSER displays it."));
  9947. #endif /* NT */
  9948. #endif /* BROWSER */
  9949. #ifdef CK_TAPI
  9950. case XYTAPI:
  9951. return(hmsga(hxytapi));
  9952. #endif /* CK_TAPI */
  9953. #ifdef NT
  9954. case XYWIN95:
  9955. return(hmsga(hxywin95));
  9956. #endif /* NT */
  9957. #ifndef NOSPL
  9958. case XYFUNC:
  9959. return(hmsga(hxyfunc));
  9960. #endif /* NOSPL */
  9961. #ifdef CK_AUTHENTICATION
  9962. case XYAUTH:
  9963. return(hmsga(hmxyauth));
  9964. #else /* CK_AUTHENTICATION */
  9965. #ifdef CK_SSL
  9966. case XYAUTH:
  9967. return(hmsga(hmxyauth));
  9968. #endif /* CK_SSL */
  9969. #endif /* CK_AUTHENTICATION */
  9970. #ifdef BROWSER
  9971. case XYFTP:
  9972. return(hmsg("Syntax: SET FTP [ pathname [ options ] ]\n\
  9973. Specifies the name of your ftp client, plus any command-line options.\n\
  9974. SHOW FTP displays it."));
  9975. #endif /* BROWSER */
  9976. case XYSLEEP:
  9977. return(hmsg("Syntax: SET SLEEP CANCELLATION { ON, OFF }\n\
  9978. Tells whether SLEEP (PAUSE) or WAIT commands can be interrupted from the\n\
  9979. keyboard; ON by default."));
  9980. case XYCD:
  9981. return(hmsga(hmxycd));
  9982. case XYSERIAL:
  9983. return(hmsg("Syntax: SET SERIAL dps\n\
  9984. d is data length in bits, 7 or 8; p is first letter of parity; s is stop\n\
  9985. bits, 1 or 2. Examples: \"set serial 7e1\", \"set serial 8n1\"."));
  9986. #ifdef HWPARITY
  9987. case XYSTOP:
  9988. return(hmsg("Syntax: SET STOP-BITS { 1, 2 }\n\
  9989. Number of stop bits to use on SET LINE connections, normally 1."));
  9990. #endif /* HWPARITY */
  9991. #ifndef NOLOCAL
  9992. case XYDISC:
  9993. return(hmsg("Syntax: SET DISCONNECT { ON, OFF }\n\
  9994. Whether to close and release a SET LINE device automatically upon\n\
  9995. disconnection; OFF = keep device open (default); ON = close and release."));
  9996. #endif /* NOLOCAL */
  9997. #ifdef STREAMING
  9998. case XYSTREAM:
  9999. return(hmsg("Syntax: SET STREAMING { ON, OFF, AUTO }\n\
  10000. Tells Kermit whether streaming protocol can be used during Kermit file\n\
  10001. transfers. Default is AUTO, meaning use it if connection is reliable."));
  10002. #endif /* STREAMING */
  10003. case XYRELY:
  10004. return(hmsg("Syntax: SET RELIABLE { ON, OFF, AUTO }\n\
  10005. Tells Kermit whether its connection is reliable. Default is AUTO,\n\
  10006. meaning Kermit should figure it out for itself."));
  10007. case XYCLEAR:
  10008. return(hmsg("Syntax: SET CLEAR-CHANNEL { ON, OFF, AUTO }\n\
  10009. Tells Kermit whether its connection is transparent to all 8-bit bytes.\n\
  10010. Default is AUTO, meaning Kermit figures it out from the connection type.\n\
  10011. When both sender and receiver agree channel is clear, SET PREFIXING NONE\n\
  10012. is used automatically."));
  10013. #ifdef TLOG
  10014. case XYTLOG:
  10015. return(hmsg("Syntax: SET TRANSACTION-LOG { BRIEF, FTP, VERBOSE }\n\
  10016. Selects the transaction-log format; BRIEF and FTP have one line per file;\n\
  10017. FTP is compatible with FTP log. VERBOSE (the default) has more info."));
  10018. #endif /* TLOG */
  10019. case XYOPTS:
  10020. return(hmsg("Syntax: SET OPTIONS command [ switches... ]\n\
  10021. For use with commands that have switches; sets the default switches for\n\
  10022. the given command. Type SET OPTIONS ? for a list of amenable commands."));
  10023. #ifndef NOSPL
  10024. case XYTIMER:
  10025. return(hmsga(hmxytimer));
  10026. #endif /* NOSPL */
  10027. #ifdef CKROOT
  10028. case XYROOT:
  10029. return(hmsga(hmxxchroot));
  10030. #endif /* XYROOT */
  10031. #ifdef ANYSSH
  10032. case XYSSH:
  10033. return(hmsga(hmxyssh));
  10034. #endif /* ANYCMD */
  10035. #ifdef LOCUS
  10036. case XYLOCUS:
  10037. return(hmsga(hmxylocus));
  10038. #endif /* LOCUS */
  10039. #ifdef OS2
  10040. #ifdef KUI
  10041. case XYGUI:
  10042. return(hmsga(hmxygui));
  10043. #endif /* KUI */
  10044. #endif /* OS2 */
  10045. case XYMATCH:
  10046. return(hmsga(hmxymatch));
  10047. #ifndef NOSEXP
  10048. case XYSEXP:
  10049. return(hmsga(hmxysexp));
  10050. #endif /* NOSEXP */
  10051. #ifndef NOSPL
  10052. case XYVAREV:
  10053. return(hmsg("Syntax: SET VARIABLE-EVALUATION { RECURSIVE, SIMPLE }\n\
  10054. Tells Kermit weather to evaluate \\%x and \\&x[] variables recursively\n\
  10055. (which is the default for historical reasons) or by simple string\n\
  10056. replacement, which lets you use these variables safely to store strings\n\
  10057. (such as Windows pathnames) that might contain backslashes."));
  10058. #endif /* NOSPL */
  10059. #ifdef HAVE_LOCALE
  10060. case XYLOCALE:
  10061. return(hmsg("Syntax: SET LOCALE [ locale-string ]\n\
  10062. Changes the locale for language and character-set to the one given. The\n\
  10063. local-string is in the format required by your computer, such as\n\
  10064. en_US.US-ASCII or es_VE.ISO8859-1. C-Kermit's SET LOCALE command affects\n\
  10065. C-Kermit itself and any subprocesses, but does not affect the environment\n\
  10066. from which C-Kermit was invoked."));
  10067. #endif /* HAVE_LOCALE */
  10068. default:
  10069. printf("Not available - \"%s\"\n",cmdbuf);
  10070. return(0);
  10071. }
  10072. }
  10073. #ifndef NOSPL
  10074. static char * hfsplit[] = {
  10075. "Function \\fsplit(s1,&a,s2,s3,n2,n3) - Assigns string words to an array.",
  10076. " s1 = source string.",
  10077. " &a = array designator.",
  10078. " s2 = optional break set.",
  10079. " s3 = optional include set (or ALL, CSV, or TSV).",
  10080. " n2 = optional grouping mask.",
  10081. " n3 = optional separator flag:",
  10082. " 0 = collapse adjacent separators;",
  10083. " 1 = don't collapse adjacent separators.",
  10084. " ",
  10085. " \\fsplit() breaks the string s1 into \"words\" as indicated by the other",
  10086. " parameters, assigning them to given array, if any. If the specified",
  10087. " already exists, it is recycled; if no array is specified, the count is",
  10088. " returned but no array is created. All arguments are optional",
  10089. " (\\fsplit() with no arguments returns 0).",
  10090. " ",
  10091. " The BREAK SET is the set of all characters that separate words. The",
  10092. " default break set is all characters except ASCII letters and digits.",
  10093. " ASCII (C0) control characters are treated as break characters by default,",
  10094. " as are spacing and punctuation characters, brackets, and so on, and",
  10095. " all 8-bit characters.",
  10096. " ",
  10097. " The INCLUDE SET is the set of characters that are to be treated as ",
  10098. " parts of words even though they normally would be separators. The",
  10099. " default include set is empty. Three special symbolic include sets are",
  10100. " also allowed:",
  10101. " ",
  10102. " ALL (meaning include all bytes that are not in the break set)",
  10103. " CSV (special treatment for Comma-Separated-Value records)",
  10104. " TSV (special treatment for Tab-Separated-Value records)",
  10105. " ",
  10106. " For operating on 8-bit character sets, the include set should be ALL.",
  10107. " ",
  10108. " If the grouping mask is given and is nonzero, words can be grouped by",
  10109. " quotes or brackets selected by the sum of the following:",
  10110. " ",
  10111. " 1 = doublequotes: \"a b c\"",
  10112. " 2 = braces: {a b c}",
  10113. " 4 = apostrophes: 'a b c'",
  10114. " 8 = parentheses: (a b c)",
  10115. " 16 = square brackets: [a b c]",
  10116. " 32 = angle brackets: <a b c>",
  10117. " ",
  10118. " Nesting is possible with {}()[]<> but not with quotes or apostrophes.",
  10119. " ",
  10120. "Returns integer:",
  10121. " Number of words in source string.",
  10122. " ",
  10123. "Also see:",
  10124. " HELP FUNCTION WORD",
  10125. ""
  10126. };
  10127. /* D O H F U N C -- Give help for a function */
  10128. int
  10129. dohfunc(xx) int xx; {
  10130. /* int x; */
  10131. if (xx == -3) {
  10132. return(hmsga(hmxxfunc));
  10133. }
  10134. if (xx == FN_WORD) /* Long help message */
  10135. return(hmsga(hmfword));
  10136. printf("\n");
  10137. switch (xx) {
  10138. case FN_IND: /* Index (of string 1 in string 2) */
  10139. case FN_RIX: /* Rindex (index from right) */
  10140. printf("\\f%sindex(s1,s2,n1,n2)\n\
  10141. s1 = string to look for.\n\
  10142. s2 = string to look in.\n\
  10143. n1 = optional 1-based starting position, default = 1.\n\
  10144. n2 = optional desired occurrence number, default = 1.\n",
  10145. xx == FN_RIX ? "r" : ""
  10146. );
  10147. printf("Returns integer:\n\
  10148. 1-based position of %smost occurrence of s1 in s2, ignoring the %smost\n\
  10149. (n1-1) characters in s2; returns 0 if s1 not found in s2.\n",
  10150. xx == FN_IND ? "left" : "right",
  10151. xx == FN_IND ? "left" : "right"
  10152. );
  10153. break;
  10154. case FN_COUNT: /* Count occurrences of s1 in s2 */
  10155. printf("\\fcount(s1,s2,n1)\n\
  10156. s1 = string or character to look for.\n\
  10157. s2 = string to look in.\n\
  10158. n1 = optional 1-based starting position, default = 1.\n");
  10159. printf("Returns integer:\n\
  10160. Number of occurrences of s1 in s2, 0 or more.\n");
  10161. break;
  10162. case FN_SEARCH: /* Search for pattern */
  10163. case FN_RSEARCH: /* Search for pattern from right */
  10164. printf("\\f%ssearch(s1,s2,n1,n2)\n\
  10165. s1 = pattern to look for.\n\
  10166. s2 = string to look in.\n\
  10167. n1 = optional 1-based offset, default = 1.\n\
  10168. n2 = optional desired occurrence of match, default = 1.\n",
  10169. xx == FN_RSEARCH ? "r" : ""
  10170. );
  10171. printf("Returns integer:\n\
  10172. 1-based position of %smost match for s1 in s2, ignoring the %smost\n\
  10173. (n1-1) characters in s2; returns 0 if no match.\n",
  10174. xx == FN_SEARCH ? "left" : "right",
  10175. xx == FN_SEARCH ? "left" : "right"
  10176. );
  10177. printf(
  10178. " s1 is a \"floating pattern\"; see HELP PATTERNS for details.\n");
  10179. break;
  10180. case FN_LEN: /* Length (of string) */
  10181. printf("\\flength(s1)\n\
  10182. s1 = string.\n");
  10183. printf("Returns integer:\n\
  10184. Length of string s1.\n");
  10185. break;
  10186. case FN_LIT: /* Literal (don't expand the string) */
  10187. printf("\\fliteral(s1)\n\
  10188. s1 = string.\n");
  10189. printf("Returns string:\n\
  10190. s1 literally without evaluation.\n");
  10191. break;
  10192. case FN_LOW: /* Lower (convert to lowercase) */
  10193. printf("\\flower(s1)\n\
  10194. s1 = string.\n");
  10195. printf("Returns string:\n\
  10196. s1 with uppercase letters converted to lowercase.\n");
  10197. break;
  10198. case FN_MAX: /* Max (maximum) */
  10199. printf("\\fmaximum(n1,n2)\n\
  10200. n1 = integer.\n\
  10201. n2 = integer.\n");
  10202. printf("Returns integer:\n\
  10203. The greater of n1 and n2.\n");
  10204. break;
  10205. case FN_MIN: /* Min (minimum) */
  10206. printf("\\fminimum(n1,n2)\n\
  10207. n1 = integer.\n\
  10208. n2 = integer.\n");
  10209. printf("Returns integer:\n\
  10210. The lesser of n1 and n2.\n");
  10211. break;
  10212. case FN_MOD: /* Mod (modulus) */
  10213. printf("\\fmodulus(n1,n2)\n\
  10214. n1 = integer.\n\
  10215. n2 = integer.\n");
  10216. printf("Returns integer:\n\
  10217. The remainder after dividing n1 by n2.\n");
  10218. break;
  10219. case FN_EVA: /* Eval (evaluate arith expression) */
  10220. printf("\\fevaluate(e)\n\
  10221. e = arithmetic expression.\n");
  10222. printf("Returns integer:\n\
  10223. The result of evaluating the expression.\n");
  10224. break;
  10225. case FN_SUB: /* Substr (substring) */
  10226. printf("\\fsubstring(s1,n1,n2)\n\
  10227. s1 = string.\n\
  10228. n1 = integer, 1-based starting position, default = 1.\n\
  10229. n2 = integer, length, default = length(s1) - n1 + 1.\n");
  10230. printf("Returns string:\n\
  10231. Substring of s1 starting at n1, length n2.\n");
  10232. break;
  10233. case FN_UPP: /* Upper (convert to uppercase) */
  10234. printf("\\fupper(s1)\n\
  10235. s1 = string.\n");
  10236. printf("Returns string:\n\
  10237. s1 with lowercase letters converted to uppercase.\n");
  10238. break;
  10239. case FN_REV: /* Reverse (a string) */
  10240. printf("\\freverse(s1)\n\
  10241. s1 = string.\n");
  10242. printf("Returns string:\n\
  10243. s1 with its characters in reverse order.\n");
  10244. break;
  10245. case FN_REP: /* Repeat (a string) */
  10246. printf("\\frepeat(s1,n1)\n\
  10247. s1 = string.\n\
  10248. n1 = integer.\n");
  10249. printf("Returns string:\n\
  10250. s1 repeated n1 times.\n");
  10251. break;
  10252. case FN_EXE: /* Execute (a macro) */
  10253. printf("\\fexecute(m1,a1,a2,a3,...)\n\
  10254. m1 = macro name.\n\
  10255. a1 = argument 1.\n\
  10256. a2 = argument 2, etc\n");
  10257. printf("Returns string:\n\
  10258. The return value of the macro (HELP RETURN for further info).\n");
  10259. break;
  10260. case FN_LPA: /* LPAD (left pad) */
  10261. case FN_RPA: /* RPAD (right pad) */
  10262. printf("\\f%cpad(s1,n1,c1)\n\
  10263. s1 = string.\n\
  10264. n1 = integer.\n\
  10265. c1 = character, default = space.\n",
  10266. xx == FN_LPA ? 'l' : 'r');
  10267. printf("Returns string:\n\
  10268. s1 %s-padded with character c1 to length n1.\n",
  10269. xx == FN_LPA ? "left" : "right");
  10270. break;
  10271. case FN_DEF: /* Definition of a macro, unexpanded */
  10272. printf("\\fdefinition(m1)\n\
  10273. m1 = macro name.\n");
  10274. printf("Returns string:\n\
  10275. Literal definition of macro m1.\n");
  10276. break;
  10277. case FN_CON: /* Contents of a variable, ditto */
  10278. printf("\\fcontents(v1)\n\
  10279. v1 = variable name such as \\%%a.\n");
  10280. printf("Returns string:\n\
  10281. Literal definition of variable v1, evaluated one level only.\n");
  10282. break;
  10283. case FN_FIL: /* Next file */
  10284. printf("\\fnextfile()\n");
  10285. printf("Returns string:\n\
  10286. Name of next file from list created by most recent \\f[r]files() or\n\
  10287. \\f[r]dir()invocation, or an empty string if there are no more files in\n\
  10288. the list.\n");
  10289. break;
  10290. case FN_FC: /* File count */
  10291. printf("\\ffiles(f1[,&a]) - File list.\n\
  10292. f1 = file specification, possibly containing wildcards.\n\
  10293. &a = optional name of array to assign file list to.\n");
  10294. printf("Returns integer:\n\
  10295. The number of regular files that match f1. Use with \\fnextfile().\n");
  10296. break;
  10297. case FN_CHR: /* Character (like BASIC CHR$()) */
  10298. printf("\\fcharacter(n1)\n\
  10299. n1 = integer.\n");
  10300. printf("Returns character:\n\
  10301. The character whose numeric code is n1.\n");
  10302. break;
  10303. case FN_RIG: /* Right (like BASIC RIGHT$()) */
  10304. printf("\\fright(s1,n1)\n\
  10305. s1 = string.\n\
  10306. n1 = integer, default = length(s1).\n");
  10307. printf("Returns string:\n\
  10308. The rightmost n1 characters of string s1.\n");
  10309. break;
  10310. case FN_LEF: /* Left (like BASIC LEFT$()) */
  10311. printf("\\fleft(s1,n1)\n\
  10312. s1 = string.\n\
  10313. n1 = integer, default = length(s1).\n");
  10314. printf("Returns string:\n\
  10315. The leftmost n1 characters of string s1.\n");
  10316. break;
  10317. case FN_COD: /* Code value of character */
  10318. printf("\\fcode(s1)\n\
  10319. c1 = character.\n");
  10320. printf("Returns integer:\n\
  10321. The numeric code of the first character in string s1, or 0 if s1 empty.\n");
  10322. break;
  10323. case FN_RPL: /* Replace */
  10324. printf("\\freplace(s1,s2,[s3[,n1[,n2]]])\n\
  10325. s1 = original string.\n\
  10326. s2 = match string.\n\
  10327. s3 = replacement string (may be empty).\n\
  10328. n1 = occurrence (if omitted or 0 does all occurrences).\n");
  10329. #ifdef RPLWORDMODE
  10330. printf(" n2 = word mode \
  10331. (0 = ignore context; 1 = only if target is delimited).\n");
  10332. #endif /* RPLWORDMODE */
  10333. printf("Returns string:\n\
  10334. s1 with occurrence number n1 of s2 replaced by s3.\n\
  10335. If n1 = 0 or omitted, all occurrences are replaced.\n\
  10336. If n1 < 0, occurrences are counted from the right.\n");
  10337. break;
  10338. case FN_FD: /* File date */
  10339. printf("\\fdate(f1)\n\
  10340. f1 = filename.\n");
  10341. #ifdef VMS
  10342. printf("Returns string:\n\
  10343. Creation date of file f1, format: yyyymmdd hh:mm:ss.\n");
  10344. #else
  10345. printf("Returns string:\n\
  10346. Modification date of file f1, format: yyyymmdd hh:mm:ss.\n");
  10347. #endif /* VMS */
  10348. break;
  10349. case FN_FS: /* File size */
  10350. printf("\\fsize(f1)\n\
  10351. f1 = filename.\n");
  10352. printf("Returns integer:\n\
  10353. Size of file f1.\n");
  10354. break;
  10355. case FN_VER: /* Verify */
  10356. printf("\\fverify(s1,s2,n1)\n\
  10357. s1 = string of characters to look for.\n\
  10358. s2 = string to look in.\n\
  10359. n1 = starting position in s2.\n");
  10360. printf("Returns integer:\n\
  10361. 1-based position of first character in s2 that is not also in s1,\n\
  10362. or -1 if s1 is empty, or 0 if all characters in s2 are also in s1.\n");
  10363. break;
  10364. case FN_IPA: /* Find and return IP address */
  10365. printf("\\fipaddress(s1,n1)\n\
  10366. s1 = string.\n\
  10367. n1 = 1-based integer starting position, default = 1.\n");
  10368. printf("Returns string:\n\
  10369. First IP address in s1, scanning from left starting at position n1.\n");
  10370. break;
  10371. case FN_HEX: /* Hexify */
  10372. printf("\\fhexify(s1)\n\
  10373. s1 = string.\n");
  10374. printf("Returns string:\n\
  10375. The hexadecimal representation of s1. Also see \\fn2hex().\n");
  10376. break;
  10377. case FN_UNH: /* Unhexify */
  10378. printf("\\funhexify(h1)\n\
  10379. h1 = Hexadecimal string.\n");
  10380. printf("Returns string:\n\
  10381. The result of unhexifying s1, or nothing if s1 is not a hex string.\n");
  10382. break;
  10383. case FN_UNTAB: /* Untabify */
  10384. printf("\\funtabify(s1)\n\
  10385. s1 = string.\n");
  10386. printf("Returns string:\n\
  10387. The result of converting tabs in s1 to spaces assuming tab stops every\n\
  10388. 8 spaces.\n");
  10389. break;
  10390. case FN_BRK: /* Break */
  10391. case FN_SPN: /* Span */
  10392. printf("\\f%s(s1,s2,n1)\n\
  10393. s1 = string to look in.\n\
  10394. s2 = string of characters to look for.\n\
  10395. n1 = 1-based integer starting position, default = 1.\n",
  10396. xx == FN_BRK ? "break" : "span"
  10397. );
  10398. printf("Returns string:\n\
  10399. s1 up to the first occurrence of any character%salso in s2,\n\
  10400. scanning from the left starting at position n1.\n",
  10401. xx == FN_SPN ? " not " : " ");
  10402. break;
  10403. case FN_TRM: /* Trim */
  10404. case FN_LTR: /* Left-Trim */
  10405. printf("\\f%s(s1,s2)\n\
  10406. s1 = string to look in.\n\
  10407. s2 = string of characters to look for, default = blanks and tabs.\n",
  10408. xx == FN_TRM ? "trim" : "ltrim");
  10409. printf("Returns string:\n\
  10410. s1 with all characters that are also in s2 trimmed from the %s.\n.",
  10411. xx == FN_TRM ? "right" : "left");
  10412. break;
  10413. case FN_CAP: /* Capitalize */
  10414. printf("\\fcapitalize(s1)\n\
  10415. s1 = string.\n");
  10416. printf("Returns string:\n\
  10417. s1 with its first letter converted to uppercase and the remaining\n\
  10418. letters to lowercase.\n");
  10419. printf("Synonym: \\fcaps(s1)\n");
  10420. break;
  10421. case FN_TOD: /* Time-of-day-to-secs-since-midnite */
  10422. printf("\\ftod2secs(s1)\n\
  10423. s1 = time-of-day string, hh:mm:ss, 24-hour format.\n");
  10424. printf("Returns number:\n\
  10425. Seconds since midnight.\n");
  10426. break;
  10427. case FN_FFN: /* Full file name */
  10428. printf("\\fpathname(f1)\n\
  10429. f1 = filename, possibly wild.\n");
  10430. printf("Returns string:\n\
  10431. Full pathname of f1.\n");
  10432. break;
  10433. case FN_CHK: /* Checksum of text */
  10434. printf("\\fchecksum(s1)\n\
  10435. s1 = string.\n");
  10436. printf("Returns integer:\n\
  10437. 16-bit checksum of string s1.\n");
  10438. break;
  10439. case FN_CRC: /* CRC-16 of text */
  10440. printf("\\fcrc16(s1)\n\
  10441. s1 = string.\n");
  10442. printf("Returns integer:\n\
  10443. 16-bit cyclic redundancy check of string s1.\n");
  10444. break;
  10445. case FN_BSN: /* Basename of file */
  10446. printf("\\fbasename(f1)\n\
  10447. f1 = filename, possibly wild.\n");
  10448. printf("Returns string:\n\
  10449. Filename f1 stripped of all device and directory information.\n");
  10450. break;
  10451. case FN_CMD: /* Output of a command (cooked) */
  10452. printf("\\fcommand(s1)\n\
  10453. s1 = string\n");
  10454. printf("Returns string:\n\
  10455. Output of system command s1, if any, with final line terminator stripped.\n"
  10456. );
  10457. break;
  10458. case FN_RAW: /* Output of a command (raw) */
  10459. printf("\\frawcommand(s1)\n\
  10460. s1 = string\n");
  10461. printf("Returns string:\n\
  10462. Output of system command s1, if any.\n");
  10463. break;
  10464. case FN_STX: /* Strip from right */
  10465. printf("\\fstripx(s1,c1)\n\
  10466. s1 = string to look in.\n\
  10467. c1 = character to look for, default = \".\".\n");
  10468. printf("Returns string:\n\
  10469. s1 up to the rightmost occurrence of character c1.\n"
  10470. );
  10471. break;
  10472. case FN_STL: /* Strip from left */
  10473. printf("\\flop(s1[,c1[,n1]])\n\
  10474. s1 = string to look in.\n\
  10475. c1 = character to look for, default = \".\".\n\
  10476. n1 = occurrence of c1, default = 1.\n");
  10477. printf("Returns string:\n\
  10478. The part of s1 after the n1th leftmost occurrence of character c1.\n"
  10479. );
  10480. break;
  10481. case FN_LOPX: /* Strip from right */
  10482. printf("\\flopx(s1,c1)\n\
  10483. s1 = string to look in.\n\
  10484. c1 = character to look for, default = \".\".\n\
  10485. n1 = occurrence of c1, default = 1.\n");
  10486. printf("Returns string:\n\
  10487. The part of s1 after the n1th rightmost occurrence of character c1.\n"
  10488. );
  10489. break;
  10490. case FN_STN: /* Strip n chars */
  10491. printf("\\fstripn(s1,n1)\n\
  10492. s1 = string to look in.\n\
  10493. n1 = integer, default = 0.\n");
  10494. printf("Returns string:\n\
  10495. s1 with n1 characters removed from the right.\n"
  10496. );
  10497. break;
  10498. case FN_STB: /* Strip enclosing brackets */
  10499. printf("\\fstripb(s1[,c1[,c2]])\n\
  10500. s1 = original string.\n\
  10501. c1 = optional first character\n");
  10502. printf("\
  10503. c2 = optional final character.\n");
  10504. printf("Returns string:\n\
  10505. s1 with the indicated enclosing characters removed. If c1 and c2 not\n\
  10506. specified, any matching brackets, braces, parentheses, or quotes are\n");
  10507. printf("\
  10508. assumed. If c1 is given but not c2, the appropriate c2 is assumed.\n\
  10509. if both c1 and c2 are given, they are used as-is.\n"
  10510. );
  10511. printf(
  10512. "Alternative format:\n\
  10513. Include a grouping mask number in place of c1 and omit c2 to specify more\n\
  10514. than one possibility at once; see \\fword() for details.\n"
  10515. );
  10516. break;
  10517. #ifdef OS2
  10518. case FN_SCRN_CX: /* Screen Cursor X Pos */
  10519. printf("\\fscrncurx()\n");
  10520. printf("Returns integer:\n\
  10521. The 0-based X coordinate (column) of the Terminal screen cursor.\n");
  10522. break;
  10523. case FN_SCRN_CY: /* Screen Cursor Y Pos */
  10524. printf("\\fscrncury()\n");
  10525. printf("Returns integer:\n\
  10526. The 0-based Y coordinate (row) of the Terminal screen cursor.\n");
  10527. break;
  10528. case FN_SCRN_STR: /* Screen String */
  10529. printf("\\fscrnstr(ny,nx,n1)\n\
  10530. ny = integer.\n\
  10531. nx = integer.\n\
  10532. n1 = integer.\n");
  10533. printf("Returns string:\n\
  10534. The string at Terminal-screen coordinates (nx,ny), length n1,\n\
  10535. blanks included. Coordinates start at 0. Default values are\n\
  10536. 0 for ny and nx, and line width for n1.\n");
  10537. break;
  10538. #endif /* OS2 */
  10539. case FN_2HEX: /* Num to hex */
  10540. printf("\\fn2hex(n1) - Number to hex\n n1 = integer.\n");
  10541. printf("Returns string:\n The hexadecimal representation of n1.\n");
  10542. break;
  10543. case FN_2OCT: /* Num to hex */
  10544. printf("\\fn2octal(n1) - Number to octal\n n1 = integer.\n");
  10545. printf("Returns string:\n The octal representation of n1.\n");
  10546. break;
  10547. #ifdef RECURSIVE
  10548. case FN_DIR: /* Recursive directory count */
  10549. printf("\\fdirectories(f1) - Directory list.\n\
  10550. f1 = directory specification, possibly containing wildcards.\n\
  10551. &a = optional name of array to assign directory list to.\n");
  10552. printf("Returns integer:\n\
  10553. The number of directories that match f1; use with \\fnextfile().\n");
  10554. break;
  10555. case FN_RFIL: /* Recursive file count */
  10556. printf("\\frfiles(f1[,&a]) - Recursive file list.\n\
  10557. f1 = file specification, possibly containing wildcards.\n\
  10558. &a = optional name of array to assign file list to.\n");
  10559. printf("Returns integer:\n\
  10560. The number of files whose names match f1 in the current or given\n\
  10561. directory tree; use with \\fnextfile().\n");
  10562. break;
  10563. case FN_RDIR: /* Recursive directory count */
  10564. printf("\\frdirectories(f1) - Recursive directory list.\n\
  10565. f1 = directory specification, possibly containing wildcards.\n\
  10566. &a = optional name of array to assign directory list to.\n");
  10567. printf("Returns integer:\n\
  10568. The number of directories that match f1 in the current or given directory\n\
  10569. tree. Use with \\fnextfile().\n");
  10570. break;
  10571. #endif /* RECURSIVE */
  10572. case FN_DNAM: /* Directory part of a filename */
  10573. printf("\\fdirname(f) - Directory part of a filename.\n\
  10574. f = a file specification.\n");
  10575. printf("Returns directory name:\n\
  10576. The full name of the directory that the file is in, or if the file is a\n\
  10577. directory, its full name.\n");
  10578. break;
  10579. #ifndef NORANDOM
  10580. case FN_RAND: /* Random number */
  10581. printf("\\frandom(n) - Random number.\n\
  10582. n = a positive integer.\n");
  10583. printf("Returns integer:\n\
  10584. A random number between 0 and n-1.\n");
  10585. break;
  10586. #endif /* NORANDOM */
  10587. case FN_SPLIT: /* Split */
  10588. #ifdef COMMENT
  10589. printf("\\fsplit(s1,&a,s2,s3,n2,n3) - \
  10590. Assign string words to an array.\n\
  10591. s1 = source string\n &a = array designator\n s2 = optional break set.\n");
  10592. printf(" s3 = optional include set.\n");
  10593. printf(" n2 = optional grouping mask.\n");
  10594. printf(" n3 = optional separator flag.\n");
  10595. printf(" s2, s3, n2, n3 are as in \\fword().\n");
  10596. printf(
  10597. " All arguments are optional; if \\&a[] already exists, it is recycled;\n\
  10598. if array not specified, the count is returned but no array is created.\n");
  10599. printf("Returns integer:\n\
  10600. Number of words in source string.\n");
  10601. #else
  10602. hmsga(hfsplit);
  10603. #endif /* COMMENT */
  10604. break;
  10605. case FN_DTIM: /* CVTDATE */
  10606. printf("\\fcvtdate([date-time][,n1]) - Date/time conversion.\n");
  10607. printf(" Converts date and/or time to standard format.\n");
  10608. printf(" If no date/time given, returns current date/time.\n");
  10609. printf(" [date-time], if given, is free-format date and/or time.\n");
  10610. printf(" HELP DATE for info about date-time formats.\n");
  10611. printf("Returns string:\n\
  10612. Standard-format date and time: yyyymmdd hh:mm:ss (numeric)\n");
  10613. printf(" If n1 is given:\n\
  10614. n1 = 1: yyyy-mmm-dd hh:mm:ss (mmm = English 3-letter month abbreviation)\n\
  10615. n1 = 2: dd-mmm-yyyy hh:mm:ss (ditto)\n\
  10616. n1 = 3: yyyymmddhhmmss (all numeric)\n\
  10617. n1 = 4: Day Mon dd hh:mm:ss yyyy (asctime)\n\
  10618. n1 = 5: yyyy:mm:dd:hh:mm:ss (all numeric with all fields delimited)\n\
  10619. Other: yyyymmdd hh:mm:dd");
  10620. break;
  10621. case FN_JDATE: /* DOY */
  10622. printf("\\fdoy([date-time]) - Day of Year.\n");
  10623. printf(" Converts date and/or time to day-of-year (DOY) format.\n");
  10624. printf(" If no date/time given, returns current date.\n");
  10625. printf(" [date-time], if given, is free-format date and/or time.\n");
  10626. printf(" HELP DATE for info about date-time formats.\n");
  10627. printf("Returns numeric string:\n\
  10628. DOY: yyyyddd, where ddd is 1-based day number in year.\n");
  10629. break;
  10630. case FN_PNCVT:
  10631. printf("\\fdialconvert(phone-number) - Convert phone number.\n");
  10632. printf(" Converts the given phone number for dialing according\n");
  10633. printf(
  10634. " to the prevailing dialing rules -- country code, area code, etc.\n");
  10635. printf("Returns string:\n\
  10636. The dial string that would be used if the same phone number had been\n\
  10637. given to the DIAL command.\n"
  10638. );
  10639. break;
  10640. case FN_DATEJ: /* DOY2DATE */
  10641. printf("\\fdoy2date([doy[ time]]) - Day of Year to Date.\n");
  10642. printf(" Converts yyyymmm to yyyymmdd\n");
  10643. printf(" If time included, it is converted to 24-hour format.");
  10644. printf(
  10645. "Returns standard date or date-time string yyyymmdd hh:mm:ss\n");
  10646. break;
  10647. case FN_MJD:
  10648. printf("\\fmjd([[date][ time]]) - Modified Julian Date (MJD).\n");
  10649. printf(
  10650. " Converts date and/or time to MJD, the number of days since 17 Nov 1858.\n");
  10651. printf(" HELP DATE for info about date-time formats.\n");
  10652. printf("Returns: integer.\n");
  10653. break;
  10654. case FN_MJD2:
  10655. printf("\\fmjd2date(mjd) - Modified Julian Date (MJD) to Date.\n");
  10656. printf(" Converts MJD to standard-format date.\n");
  10657. printf("Returns: yyyymmdd.\n");
  10658. break;
  10659. case FN_DAY:
  10660. printf("\\fday([[date][ time]]) - Day of Week.\n");
  10661. printf("Returns day of week of given date as Mon, Tue, etc.\n");
  10662. printf("HELP DATE for info about date-time formats.\n");
  10663. printf("Also see HELP FUNCTION DAYNAME.\n");
  10664. break;
  10665. case FN_NDAY:
  10666. printf("\\fnday([[date][ time]]) - Numeric Day of Week.\n");
  10667. printf(
  10668. "Returns numeric day of week of given date, 0=Sun, 1=Mon, ..., 6=Sat.\n");
  10669. printf("HELP DATE for info about date-time formats.\n");
  10670. break;
  10671. case FN_TIME:
  10672. printf("\\ftime([[date][ time]]) - Time.\n");
  10673. printf(
  10674. "Returns time portion of given date and/or time in hh:mm:ss format.\n");
  10675. printf("If no argument given, returns current time.\n");
  10676. printf("HELP DATE for info about date-time formats.\n");
  10677. break;
  10678. case FN_NTIM:
  10679. printf("\\fntime([[date][ time]]) - Numeric Time.\n");
  10680. printf(
  10681. "Returns time portion of given date and/or time as seconds since midnight.\n");
  10682. printf("If no argument given, returns current time.\n");
  10683. printf("HELP DATE for info about date-time formats.\n");
  10684. break;
  10685. case FN_N2TIM:
  10686. printf("\\fn2time(seconds) - Numeric Time to Time.\n");
  10687. printf(
  10688. "Returns the given number of seconds in hh:mm:ss format.\n");
  10689. break;
  10690. case FN_PERM:
  10691. printf("\\fpermissions(file) - Permissions of File.\n");
  10692. printf(
  10693. #ifdef UNIX
  10694. "Returns permissions of given file as they would be shown by \"ls -l\".\n"
  10695. #else
  10696. #ifdef VMS
  10697. "Returns permissions of given file as they would be shown by \"dir /prot\".\n"
  10698. #else
  10699. "Returns the permissions of the given file.\n"
  10700. #endif /* VMS */
  10701. #endif /* UNIX */
  10702. );
  10703. break;
  10704. case FN_ALOOK:
  10705. printf("\\farraylook(pattern,&a) - Lookup pattern in array.\n\
  10706. pattern = String or pattern\n");
  10707. printf(" &a = array designator, can include range specifier.\n");
  10708. printf(
  10709. "Returns number:\n\
  10710. The index of the first matching array element or -1 if none.\n");
  10711. printf("More info:\n\
  10712. HELP PATTERN for pattern syntax.\n HELP ARRAY for arrays.\n");
  10713. break;
  10714. case FN_TLOOK:
  10715. printf(
  10716. "\\ftablelook(keyword,&a,[c]) - Lookup keyword in keyword table.\n\
  10717. pattern = String\n");
  10718. printf(" keyword = keyword to look up (can be abbreviated).\n");
  10719. printf(" &a = array designator, can include range specifier.\n");
  10720. printf(" This array must be in alphabetical order.\n");
  10721. printf(" c = Optional field delimiter, colon(:) by default.\n");
  10722. printf(
  10723. "Returns number:\n\
  10724. 1 or greater, index of array element that uniquely matches given keyword;\n"
  10725. );
  10726. printf(
  10727. "or -2 if keyword was ambiguous, or -1 if keyword empty or not found.\n"
  10728. );
  10729. printf("Also see:\n\
  10730. HELP FUNC ARRAYLOOK for a similar function.\n HELP ARRAY for arrays.\n");
  10731. break;
  10732. case FN_ABS: /* Absolute */
  10733. printf("\\fabsolute(n1)\n\
  10734. n1 = integer.\n");
  10735. printf("Returns integer:\n\
  10736. The absolute (unsigned) value of n1.\n");
  10737. break;
  10738. #ifdef FNFLOAT
  10739. case FN_FPABS:
  10740. printf("\\ffpabsolute(f1,d)\n\
  10741. f1 = floating-point number or integer.\n\
  10742. d = integer.\n");
  10743. printf("Returns floating-point number:\n\
  10744. The absolute (unsigned) value of f1 to d decimal places.\n");
  10745. break;
  10746. case FN_FPADD:
  10747. printf("\\ffpadd(f1,f2,d)\n\
  10748. f1,f2 = floating-point numbers or integers.\n\
  10749. d = integer.\n");
  10750. printf("Returns floating-point number:\n\
  10751. The sum of f1 and f2 to d decimal places.\n");
  10752. break;
  10753. case FN_FPSUB:
  10754. printf("\\ffpsubtract(f1,f2,d)\n\
  10755. f1,f2 = floating-point numbers or integers.\n\
  10756. d = integer.\n");
  10757. printf("Returns floating-point number:\n\
  10758. f1 minus f2 to d decimal places.\n");
  10759. break;
  10760. case FN_FPMUL:
  10761. printf("\\ffpmultiply(f1,f2,d)\n\
  10762. f1,f2 = floating-point numbers or integers.\n\
  10763. d = integer.\n");
  10764. printf("Returns floating-point number:\n\
  10765. The product of f1 and f2 to d decimal places.\n");
  10766. break;
  10767. case FN_FPDIV:
  10768. printf("\\ffpdivide(f1,f2,d)\n\
  10769. f1,f2 = floating-point numbers or integers.\n\
  10770. d = integer.\n");
  10771. printf("Returns floating-point number:\n\
  10772. f1 divided by f2 to d decimal places.\n");
  10773. break;
  10774. case FN_FPMAX:
  10775. printf("\\ffpmaximum(f1,f2,d)\n\
  10776. f1,f2 = floating-point numbers or integers.\n\
  10777. d = integer.\n");
  10778. printf("Returns floating-point number:\n\
  10779. The maximum of f1 and f2 to d decimal places.\n");
  10780. break;
  10781. case FN_FPMIN:
  10782. printf("\\ffpminimum(f1,f2,d)\n\
  10783. f1,f2 = floating-point numbers or integers.\n\
  10784. d = integer.\n");
  10785. printf("Returns floating-point number:\n\
  10786. The minimum of f1 and f2 to d decimal places.\n");
  10787. break;
  10788. case FN_FPMOD:
  10789. printf("\\ffpmodulus(f1,f2,d)\n\
  10790. f1,f2 = floating-point numbers or integers.\n\
  10791. d = integer.\n");
  10792. printf("Returns floating-point number:\n\
  10793. The modulus of f1 and f2 to d decimal places.\n");
  10794. break;
  10795. case FN_FPPOW:
  10796. printf("\\ffpraise(f1,f2,d)\n\
  10797. f1,f2 = floating-point numbers or integers.\n\
  10798. d = integer.\n");
  10799. printf("Returns floating-point number:\n\
  10800. f1 raised to the power f2, to d decimal places.\n");
  10801. break;
  10802. case FN_FPCOS:
  10803. printf("\\ffpcosine(f1,d)\n\
  10804. f1 = floating-point number or integer.\n\
  10805. d = integer.\n");
  10806. printf("Returns floating-point number:\n\
  10807. The cosine of angle f1 (in radians) to d decimal places.\n");
  10808. break;
  10809. case FN_FPSIN:
  10810. printf("\\ffpsine(f1,d)\n\
  10811. f1 = floating-point number or integer.\n\
  10812. d = integer.\n");
  10813. printf("Returns floating-point number:\n\
  10814. The sine of angle f1 (in radians) to d decimal places.\n");
  10815. break;
  10816. case FN_FPTAN:
  10817. printf("\\ffptangent(f1,d)\n\
  10818. f1 = floating-point number or integer.\n\
  10819. d = integer.\n");
  10820. printf("Returns floating-point number:\n\
  10821. The tangent of angle f1 (in radians) to d decimal places.\n");
  10822. break;
  10823. case FN_FPEXP:
  10824. printf("\\ffpexp(f1,d)\n\
  10825. f1 = floating-point number or integer.\n\
  10826. d = integer.\n");
  10827. printf("Returns floating-point number:\n\
  10828. e (the base of natural logarithms) raised to the f1 power,\n\
  10829. to d decimal places.\n");
  10830. break;
  10831. case FN_FPINT:
  10832. printf("\\ffpint(f1)\n\
  10833. f1 = floating-point number or integer.\n");
  10834. printf("Returns integer:\n\
  10835. The integer part of f1.\n");
  10836. break;
  10837. case FN_FPLOG:
  10838. printf("\\ffplog10(f1,d)\n\
  10839. f1 = floating-point number or integer.\n\
  10840. d = integer.\n");
  10841. printf("Returns floating-point number:\n\
  10842. The logarithm, base 10, of f1 to d decimal places.\n");
  10843. break;
  10844. case FN_FPLN:
  10845. printf("\\ffplogn(f1,d)\n\
  10846. f1 = floating-point number or integer.\n\
  10847. d = integer.\n");
  10848. printf("Returns floating-point number:\n\
  10849. The natural logarithm of f1 to d decimal places.\n");
  10850. break;
  10851. case FN_FPROU:
  10852. printf("\\ffpround(f1,d)\n\
  10853. f1 = floating-point number or integer.\n\
  10854. d = integer.\n");
  10855. printf("Returns floating-point number:\n\
  10856. f1 rounded to d decimal places.\n");
  10857. break;
  10858. case FN_FPSQR:
  10859. printf("\\ffpsqrt(f1,d)\n\
  10860. f1 = floating-point number or integer.\n\
  10861. d = integer.\n");
  10862. printf("Returns floating-point number:\n\
  10863. The square root of f1 to d decimal places.\n");
  10864. break;
  10865. #endif /* FNFLOAT */
  10866. #ifdef CKCHANNELIO
  10867. case FN_FEOF:
  10868. printf("\\f_eof(n1)\n\
  10869. n1 = channel number.\n");
  10870. printf("Returns number:\n\
  10871. 1 if channel n1 at end of file, 0 otherwise.\n");
  10872. break;
  10873. case FN_FPOS:
  10874. printf("\\f_pos(n1)\n\
  10875. n1 = channel number.\n");
  10876. printf("Returns number:\n\
  10877. Read/write pointer of channel n1 as byte number.\n");
  10878. break;
  10879. case FN_NLINE:
  10880. printf("\\f_line(n1)\n\
  10881. n1 = channel number.\n");
  10882. printf("Returns number:\n\
  10883. Read/write pointer of channel n1 as line number.\n");
  10884. break;
  10885. case FN_FILNO:
  10886. printf("\\f_handle(n1)\n\
  10887. n1 = channel number.\n");
  10888. printf("Returns number:\n\
  10889. File %s of open file on channel n1.\n",
  10890. #ifdef OS2
  10891. "handle"
  10892. #else
  10893. "descriptor"
  10894. #endif /* OS2 */
  10895. );
  10896. break;
  10897. case FN_FSTAT:
  10898. printf("\\f_status(n1)\n\
  10899. n1 = channel number.\n");
  10900. printf("Returns number:\n\
  10901. Sum of open modes of channel n1: 1 = read; 2 = write; 4 = append, or:\n\
  10902. 0 if not open.\n");
  10903. break;
  10904. case FN_FGCHAR:
  10905. printf("\\f_getchar(n1)\n\
  10906. n1 = channel number.\n");
  10907. printf(" Reads a character from channel n1 and returns it.\n");
  10908. break;
  10909. case FN_FGLINE:
  10910. printf("\\f_getline(n1)\n\
  10911. n1 = channel number.\n");
  10912. printf(" Reads a line from channel n1 and returns it.\n");
  10913. break;
  10914. case FN_FGBLK:
  10915. printf("\\f_getblock(n1,n2)\n\
  10916. n1 = channel number, n2 = size\n");
  10917. printf(
  10918. " Reads a block of n2 characters from channel n1 and returns it.\n");
  10919. break;
  10920. case FN_FPCHAR:
  10921. printf("\\f_putchar(n1,c)\n\
  10922. n1 = channel number, c = character\n");
  10923. printf(" Writes a character to channel n1.\n\
  10924. Returns number:\n\
  10925. 1 if successful, otherwise a negative error code.\n");
  10926. break;
  10927. case FN_FPLINE:
  10928. printf("\\f_putline(n1,s1)\n\
  10929. n1 = channel number, s1 = string\n");
  10930. printf(
  10931. " Writes the string s1 to channel n1 and adds a line terminator.\n\
  10932. Returns number:\n");
  10933. printf(" How many characters written if successful;\n\
  10934. Otherwise a negative error code.\n"
  10935. );
  10936. break;
  10937. case FN_FPBLK:
  10938. printf("\\f_putblock(n1,s1)\n\
  10939. n1 = channel number, s1 = string\n");
  10940. printf(
  10941. " Writes the string s1 to channel n1.\n\
  10942. Returns number:\n");
  10943. printf(" How many characters written if successful;\n\
  10944. Otherwise a negative error code.\n"
  10945. );
  10946. break;
  10947. case FN_FERMSG:
  10948. printf("\\f_errmsg([n1])\n\
  10949. n1 = numeric error code, \\v(f_error) by default.\n");
  10950. printf(" Returns the associated error message string.\n");
  10951. break;
  10952. #endif /* CKCHANNELIO */
  10953. case FN_AADUMP:
  10954. printf("\\faaconvert(name,&a[,&b])\n\
  10955. name = name of associative array, &a and &b = names of regular arrays.\n");
  10956. printf(
  10957. " Converts the given associative array into two regular arrays, &a and &b,\n\
  10958. containing the indices and values, respectively:\n");
  10959. printf("Returns number:\n\
  10960. How many elements were converted.\n");
  10961. break;
  10962. #ifdef CK_KERBEROS
  10963. case FN_KRB_TK:
  10964. printf("\\fkrbtickets(n)\n\
  10965. n = Kerberos version number (4 or 5).\n\
  10966. Returns string:\n\
  10967. The number of active Kerberos 4 or 5 tickets.\n\
  10968. Resets the ticket list used by \\fkrbnextticket(n).\n");
  10969. break;
  10970. case FN_KRB_NX:
  10971. printf("\\fkrbnextticket(n)\n\
  10972. n = Kerberos version number (4 or 5).\n\
  10973. Returns string:\n\
  10974. The next ticket in the Kerberos 4 or 5 ticket list that was set up by\n\
  10975. the most recent invocation of \\fkrbtickets(n).\n");
  10976. break;
  10977. case FN_KRB_IV:
  10978. printf("\\fkrbisvalid(n,name)\n\
  10979. n = Kerberos version number (4 or 5).\n\
  10980. name = a ticket name as returned by \\fkrbnextticket(n).\n\
  10981. Returns number:\n\
  10982. 1 if the ticket is valid, 0 if not valid.\n\
  10983. A ticket is valid if all the following conditions are true:\n\n");
  10984. printf("\n\
  10985. (i) it exists in the current cache file;\n\
  10986. (ii) it is not expired;\n\
  10987. (iii) it is not marked invalid (K5 only);\n\
  10988. (iv) it was issued from the current IP address\n");
  10989. printf("\n This value can be used in an IF statement, e.g.:\n\n");
  10990. printf(" if \\fkrbisvalid(4,krbtgt.FOO.BAR.EDU@FOO.BAR.EDU) ...\n");
  10991. break;
  10992. case FN_KRB_TT:
  10993. printf("\\fkrbtimeleft(n,name)\n\
  10994. n = Kerberos version number (4 or 5).\n\
  10995. name = a ticket name as returned by \\fkrbnextticket(n).\n\
  10996. Returns string:\n\
  10997. The number of seconds remaining in the ticket's lifetime.\n");
  10998. break;
  10999. case FN_KRB_FG:
  11000. printf("\\fkrbflags(n,name)\n\
  11001. n = Kerberos version number (4 or 5).\n\
  11002. name = a ticket name as returned by \\fkrbnextticket(n).\n\
  11003. Returns string:\n");
  11004. printf(
  11005. " The flags string as reported with AUTH K5 LIST /FLAGS. This string can\n\
  11006. be searched for a particular flag using the \\findex() function when\n\
  11007. SET CASE is ON (for case sensitive searches). Flag strings are only\n\
  11008. available for K5 tickets.\n");
  11009. break;
  11010. #endif /* CK_KERBEROS */
  11011. case FN_PATTERN:
  11012. printf("\\fpattern(s)\n\
  11013. s = string\n\
  11014. Returns string: s with any variables, etc, evaluated in the normal manner.\n"
  11015. );
  11016. printf("\
  11017. For use with INPUT, MINPUT, and REINPUT to declare that a search target is\n\
  11018. a pattern rather than a literal string.\n");
  11019. break;
  11020. case FN_HEX2N:
  11021. printf("\\fhex2n(s)\n\
  11022. s = hexadecimal number\n\
  11023. Returns decimal equivalent.\n");
  11024. break;
  11025. case FN_HEX2IP:
  11026. printf("\\fhex2ip(s)\n\
  11027. s = 8-digit hexadecimal number\n\
  11028. Returns the equivalent decimal dotted IP address.\n");
  11029. break;
  11030. case FN_IP2HEX:
  11031. printf("\\fip2hex(s)\n\
  11032. s = decimal dotted IP address\n\
  11033. Returns the equivalent 8-digit hexadecimal number.\n");
  11034. break;
  11035. case FN_OCT2N:
  11036. printf("\\foct2n(s)\n\
  11037. s = octal number\n\
  11038. Returns decimal equivalent.\n");
  11039. break;
  11040. case FN_TOB64:
  11041. printf("\\b64encode(s)\n\
  11042. s = string containing no NUL bytes\n\
  11043. Returns Base-64 encoding of string.\n");
  11044. break;
  11045. case FN_FMB64:
  11046. printf("\\b64decode(s)\n\
  11047. s = string in Base-64 notation\n\
  11048. Returns the decoded string or an error code if s not valid.\n");
  11049. break;
  11050. case FN_RADIX:
  11051. printf("\\fradix(s,n1,n2)\n\
  11052. s = number in radix n1\n\
  11053. Returns the number's representation in radix n2.\n");
  11054. break;
  11055. case FN_JOIN:
  11056. printf("\\fjoin(&a[,s[,n1[,n2]]])\n\
  11057. &a = array designator, can include range specifier.\n\
  11058. s = optional separator.\n");
  11059. printf("\
  11060. n1 = nonzero to put grouping around elements that contain spaces;\n\
  11061. see \\fword() grouping mask for values of n.\n");
  11062. printf("\
  11063. n2 = 0 or omitted to put spaces between elements; nonzero to omit them.\n");
  11064. printf("\
  11065. Returns the (selected) elements of the array joined to together,\n\
  11066. separated by the separator.\n");
  11067. printf("\n\
  11068. If s is CSV (literally), that means the array is to be transformed into a\n\
  11069. comma-separated list. No other arguments are needed. If s is TSV, then\n\
  11070. a tab-separated list is created.\n");
  11071. break;
  11072. case FN_SUBST:
  11073. printf("\\fsubstitute(s1,s2,s3)\n\
  11074. s1 = Source string.\n\
  11075. s2 = List of characters to be translated.\n\
  11076. s3 = List of characters to translate them to.\n");
  11077. printf(
  11078. " Returns: s1, with each character that is in s2 replaced by the\n\
  11079. corresponding character in s3. s2 and s3 can contain ASCII ranges,\n\
  11080. like [a-z]. Any characters in s2 that don't have corresponding\n\
  11081. characters in s3 (after range expansion) are removed from the result.\n\
  11082. This function works only with single-byte character-sets\n");
  11083. break;
  11084. #ifndef NOSEXP
  11085. case FN_SEXP:
  11086. printf("\\fsexpression(s1)\n\
  11087. s1 = S-Expression.\n");
  11088. printf(" Returns: The result of evaluating s1.\n");
  11089. break;
  11090. #endif /* NOSEXP */
  11091. case FN_CMDSTK:
  11092. printf("\\fcmdstack(n1,n2)\n\
  11093. n1 = Command-stack level, 0 to \\v(cmdlevel), default \\v(cmdlevel).\n\
  11094. n2 = Function code, 0 or 1.\n");
  11095. printf("Returns:\n");
  11096. printf(" n2 = 0: name of object at stack level n1\n\
  11097. n2 = 1: type of object at stack level n1:\n\
  11098. 0 = interactive prompt\n\
  11099. 1 = command file\n\
  11100. 2 = macro\n"
  11101. );
  11102. break;
  11103. #ifdef CKFLOAT
  11104. case FN_DIFDATE:
  11105. printf("\\fdiffdates(d1,d2)\n\
  11106. d1 = free-format date and/or time (default = NOW).\n\
  11107. d2 = ditto.\n");
  11108. printf("Returns:\n");
  11109. printf(" Difference expressed as delta time:\n");
  11110. printf(" Negative if d2 is later than d1, otherwise positive.\n");
  11111. break;
  11112. #endif /* CKFLOAT */
  11113. case FN_CMPDATE:
  11114. printf("\\fcmpdates(d1,d2)\n\
  11115. d1 = free-format date and/or time (default = NOW).\n\
  11116. d2 = ditto.\n");
  11117. printf("Returns:\n");
  11118. printf(" 0 if d1 is equal to d2;\n\
  11119. 1 if d1 is later than d2;\n\
  11120. -1 if d1 is earlier than d2.\n");
  11121. break;
  11122. case FN_TOGMT:
  11123. printf("\\futcdate(d1)\n\
  11124. d1 = free-format date and/or time (default = NOW).\n");
  11125. printf("Returns:\n");
  11126. printf(" Date-time converted to UTC (GMT) yyyymmdd hh:mm:ss.\n");
  11127. break;
  11128. #ifdef TCPSOCKET
  11129. case FN_HSTADD:
  11130. printf("\\faddr2name(s)\n\
  11131. s = numeric IP address.\n");
  11132. printf("Returns:\n");
  11133. printf(" Corresponding IP hostname if found, otherwise null.\n");
  11134. break;
  11135. case FN_HSTNAM:
  11136. printf("\\fname2addr(s)\n\
  11137. s = IP host name.\n");
  11138. printf("Returns:\n");
  11139. printf(" Corresponding numeric IP address if found, else null.\n");
  11140. break;
  11141. #endif /* TCPSOCKET */
  11142. case FN_DELSEC:
  11143. printf("\\fdelta2secs(dt)\n\
  11144. dt = Delta time, e.g. +3d14:27:52.\n");
  11145. printf("Returns:\n");
  11146. printf(" The corresponding number of seconds.\n");
  11147. break;
  11148. case FN_PC_DU:
  11149. printf("\\fdos2unixpath(p)\n\
  11150. p = string, DOS pathname.\n");
  11151. printf("Returns:\n");
  11152. printf(" The argument converted to a Unix pathname.\n");
  11153. break;
  11154. case FN_PC_UD:
  11155. printf("\\funix2dospath(p)\n\
  11156. p = string, Unix pathname.\n");
  11157. printf("Returns:\n");
  11158. printf(" The argument converted to a DOS pathname.\n");
  11159. break;
  11160. #ifdef FN_ERRMSG
  11161. case FN_ERRMSG:
  11162. printf("\\ferrstring(n)\n\
  11163. n = platform-dependent numeric error code.\n");
  11164. printf("Returns:\n");
  11165. printf(" The corresponding error string.\n");
  11166. break;
  11167. #endif /* FN_ERRMSG */
  11168. case FN_KWVAL:
  11169. printf("\\fkeywordvalue(s1[,s2])\n\
  11170. s1 = string of the form \"name=value\"\n\
  11171. s2 = one more separator characters (default separator is \"=\")\n");
  11172. printf(" Assigns the value, if any, to the named macro and sets\n");
  11173. printf(" the \\v(lastkeywordvalue) to the macro name.\n");
  11174. printf(" If no value is given, the macro is undefined.\n");
  11175. printf("Returns:\n");
  11176. printf(" -1 on error\n");
  11177. printf(" 0 if no keyword or value were found\n");
  11178. printf(" 1 if a keyword was found but no value\n");
  11179. printf(" 2 if a keyword and a value were found\n");
  11180. printf("Synonym: \\kwvalue(s1[,s2])\n");
  11181. break;
  11182. #ifdef COMMENT
  11183. case FN_SLEEP:
  11184. printf("\\fsleep(n)\n\
  11185. n = number of seconds\n");
  11186. printf(" Pauses for the given number of seconds.\n");
  11187. printf("Returns: the empty string.\n");
  11188. break;
  11189. case FN_MSLEEP:
  11190. printf("\\fmsleep(n)\n\
  11191. n = number of milliseconds\n");
  11192. printf(" Pauses for the given number of milliseconds.\n");
  11193. printf("Returns: the empty string.\n");
  11194. break;
  11195. #endif /* COMMENT */
  11196. #ifdef NT
  11197. case FN_SNAME:
  11198. printf("\\fshortpathname(s)\n\
  11199. s = file or directory name string\n");
  11200. printf(" Returns the short path form of the given input.\n");
  11201. break;
  11202. case FN_LNAME:
  11203. printf("\\flongpathname(s)\n\
  11204. s = file or directory name string\n");
  11205. printf(" Returns the long path form of the given input.\n");
  11206. break;
  11207. #else
  11208. case FN_SNAME:
  11209. printf("\\fshortpathname(s)\n\
  11210. Synonym for \fpathname()\n");
  11211. break;
  11212. case FN_LNAME:
  11213. printf("\\flongpathname(s)\n\
  11214. Synonym for \fpathname()\n");
  11215. break;
  11216. #endif /* NT */
  11217. case FN_EMAIL:
  11218. printf("\\femailaddress(s)\n\
  11219. s = From: or Sender: header from an RFC2822-format email message\n");
  11220. printf(" Extracts and returns the email address.\n");
  11221. break;
  11222. case FN_PICTURE:
  11223. printf("\\fpictureinfo(s[,&a])\n\
  11224. s = File specification of an image file in JPG or GIF format.\n\
  11225. &a = Optional array name.\n\n");
  11226. printf("Returns integer:\n\
  11227. 0 if file not found or not recognized;\n\
  11228. 1 if orientation is landscape;\n\
  11229. 2 if orientation is portrait;\n\
  11230. 3 if the image is square.\n");
  11231. printf("\n\
  11232. If an array name is included, and if the function's return value is\n\
  11233. greater than 0, element 1 of the array is filled in with the image\n\
  11234. width in pixels, element 2 the image height, and element 3 is the image's\n\
  11235. 'date taken' (if present) in 'yyyy:mm:dd hh:mm:ss' format; for example\n\
  11236. 2013:05:17 21:14:12.\n");
  11237. break;
  11238. case FN_PID:
  11239. printf("\\fgetpidinfo(n1)\n\
  11240. n1 = Numeric process ID\n");
  11241. printf("Returns integer:\n\
  11242. -1 on failure to get information;\n\
  11243. 1 if n1 is the ID of an active process;\n\
  11244. 0 if the process does not exist.\n");
  11245. break;
  11246. case FN_FUNC:
  11247. printf("\\ffunction(s1)\n\
  11248. s1 = name of function.\n");
  11249. printf("Returns integer:\n\
  11250. 1 if s1 is the name of an available built-in function;\n\
  11251. 0 otherwise.\n");
  11252. break;
  11253. case FN_RECURSE:
  11254. printf("\\frecurse(s1)\n\
  11255. s1 = name of \\&x or \\&x[] type variable\n");
  11256. printf("Returns the result of evaluating the variable recursively.\n");
  11257. break;
  11258. case FN_SQUEEZE:
  11259. printf("\\fsqueeze(s)\n\
  11260. s = string\n\
  11261. Returns string with leading and trailing whitespace removed, Tabs\n\
  11262. converted to Spaces, and multiple spaces converted to single spaces.\n");
  11263. break;
  11264. #ifndef NOCSETS
  11265. case FN_XLATE:
  11266. printf("\\fcvtcset(s,cset1,cset2)\n\
  11267. s = string\n\
  11268. Returns string converted from character set cset1 to cset2, where cset1\n\
  11269. and cset2 are names of File Character-Sets \
  11270. ('set file char ?' for a list).\n");
  11271. break;
  11272. #endif /* NOCSETS */
  11273. case FN_UNPCT:
  11274. printf("\\fdecodehex(s1[,s2])\n\
  11275. s1, s2 = strings\n\
  11276. Decodes a string s1 that contains prefixed hex bytes. s2 is the prefix;\n\
  11277. the default is %%%%. You can specify any other prefix one or two bytes\n\
  11278. long. If the prefix contains letters (such as 0x), case is ingored.\n\
  11279. Returns string s1 with hex escapes replaced by the bytes they \
  11280. represent.\n");
  11281. break;
  11282. case FN_STRINGT:
  11283. printf("\\fstringtype(s)\n\
  11284. s = string\n\
  11285. Returns a string representing the type of its string argument s1:\n\
  11286. 7BIT, 8BIT, UTF8, TEXT, or BINARY. TEXT means some kind of text\n\
  11287. other than 7BIT, 8BIT, or UTF8 (this probably will never appear).\n");
  11288. break;
  11289. case FN_STRCMP:
  11290. printf("\\fstrcmp(s1,s2[,case[,start[,length]]])\n\
  11291. s1, s2 = strings\n\
  11292. case, start, length = numbers or arithmetic expressions.\n\
  11293. case = 0 [default] means to do a case-independent comparison;\n\
  11294. nonzero case requests a case-sensitive comparison.\n\
  11295. The optional start and length arguments apply to both s1 and s2\n\
  11296. and allow specification of substrings if it is not desired to compare\n\
  11297. the whole strings. Results for non-ASCII strings are implentation-\n\
  11298. and locale-dependent.\n\
  11299. Returns a number:\n\
  11300. -1: s1 is lexically less than s2;\n\
  11301. 0: s1 and s2 are lexically equal;\n\
  11302. 2: s1 is lexically greater than s2.\n");
  11303. break;
  11304. case FN_FILEINF:
  11305. printf("\\ffileinfo(s1,&a)\n\
  11306. s1 = file specification string\n\
  11307. &a = array designator for results (required)\n\
  11308. Returns a number:\n\
  11309. 0: File not found or not accessible or bad arguments;\n\
  11310. >0: The number of attributes returned in the array, normally 7 or 8:\n");
  11311. printf(" 1. The file's name\n\
  11312. 2. The full path of the directory where the file resides\n\
  11313. 3. The file's modification date-time yyyymmdd hh:mm:ss\n\
  11314. 4. Platform-specific permissions string, e.g. drwxrwxr-x or RWED,RWE,RE,E\n\
  11315. 5. Platform-specific permissions code, e.g. an octal number like 40775\n\
  11316. 6. The file's size in bytes\n\
  11317. 7. Type: 1=regular file; 2=executable; 3=directory; 4=link; 0=unknown.\n\
  11318. 8. If link, the name of the file linked to.\n");
  11319. break;
  11320. case FN_FILECMP:
  11321. printf("\\ffilecompare(s1,s2)\n\
  11322. s1 = name of first file\n\
  11323. s1 = name of second file\n\
  11324. Returns a number:\n\
  11325. 0: The two files have identical contents and lengths;\n\
  11326. 1: The two files have different content or lengths;\n\
  11327. -1: Error opening or reading either file.\n");
  11328. break;
  11329. case FN_DAYNAME:
  11330. printf("\\fdayname(s1,n)\n\
  11331. s1 = free-format date OR day-of-week number 1-7 OR leave blank.\n\
  11332. n = function code: 0 to return full name; nonzero to return abbreviation.\n\
  11333. Returns a string: the name of the weekday for the given date or weekday\n\
  11334. number or, if s1 was omitted, of the current date, in the language and\n\
  11335. character-set specified by the locale. If n is nonzero, the result\n\
  11336. is abbreviated in the locale-appropriate way. If given inappropriate\n\
  11337. arguments, the result is empty and an error message is printed.\n");
  11338. break;
  11339. case FN_MONNAME:
  11340. printf("\\fmonthname(s1,n)\n\
  11341. s1 = free-format date OR month-of-year number 1-12 OR leave blank.\n\
  11342. n = function code: 0 to return full name; nonzero to return abbreviation.\n\
  11343. Returns a string: the name of the month for the given date or month\n\
  11344. number or, if s1 was omitted, of the current date, in the language and\n\
  11345. character-set specified by the locale. If n is nonzero, the result\n\
  11346. is abbreviated in the locale-appropriate way. If given inappropriate\n\
  11347. arguments, the result is empty and an error message is printed.\n");
  11348. break;
  11349. default:
  11350. printf("Sorry, help not available for \"%s\"\n",cmdbuf);
  11351. }
  11352. printf("\n");
  11353. return(0);
  11354. }
  11355. #endif /* NOSPL */
  11356. #ifdef OS2
  11357. #ifndef NOKVERBS
  11358. /* D O H K V E R B -- Give help for a Kverb */
  11359. int
  11360. dohkverb(xx) int xx; {
  11361. int x,i,found,button,event;
  11362. if (xx == -3) {
  11363. printf("\n Type SHOW KVERBS to see a list of available Kverbs.\n"
  11364. );
  11365. printf(
  11366. " Type HELP KVERB <name> to see the current definition of a given Kverb.\n\n"
  11367. );
  11368. return(-9);
  11369. }
  11370. if (xx < 0) return(xx);
  11371. if ((x = cmcfm()) < 0) return(x);
  11372. switch ( xx ) {
  11373. /* DEC VT keyboard key definitions */
  11374. case K_COMPOSE : /* Compose key */
  11375. printf("\\Kcompose Compose an accented character\n");
  11376. break;
  11377. case K_C_UNI16 : /* UCS2 key */
  11378. printf("\\Kucs2 Enter a Unicode character\n");
  11379. break;
  11380. /* DEC arrow keys */
  11381. case K_UPARR : /* DEC Up Arrow key */
  11382. printf("\\Kuparr Transmit Terminal Up Arrow sequence\n");
  11383. break;
  11384. case K_DNARR : /* DEC Down Arrow key */
  11385. printf("\\Kdnarr Transmit Terminal Down Arrow sequence\n");
  11386. break;
  11387. case K_RTARR : /* DEC Right Arrow key */
  11388. printf("\\Krtarr Transmit Terminal Right Arrow sequence\n");
  11389. break;
  11390. case K_LFARR : /* DEC Left Arrow key */
  11391. printf("\\Klfarr Transmit Terminal Left Arrow sequence\n");
  11392. break;
  11393. case K_PF1 : /* DEC PF1 key */
  11394. printf("\\Kpf1,\\Kgold Transmit DEC PF1 sequence\n");
  11395. break;
  11396. case K_PF2 : /* DEC PF2 key */
  11397. printf("\\Kpf2 Transmit DEC PF2 sequence\n");
  11398. break;
  11399. case K_PF3 : /* DEC PF3 key */
  11400. printf("\\Kpf3 Transmit DEC PF3 sequence\n");
  11401. break;
  11402. case K_PF4 : /* DEC PF4 key */
  11403. printf("\\Kpf4 Transmit DEC PF4 sequence\n");
  11404. break;
  11405. case K_KP0 : /* DEC Keypad 0 */
  11406. printf("\\Kkp0 Transmit DEC Keypad-0 sequence\n");
  11407. break;
  11408. case K_KP1 : /* DEC Keypad 1 */
  11409. printf("\\Kkp1 Transmit DEC Keypad-1 sequence\n");
  11410. break;
  11411. case K_KP2 : /* etc ... through 9 */
  11412. printf("\\Kkp2 Transmit DEC Keypad-2 sequence\n");
  11413. break;
  11414. case K_KP3 :
  11415. printf("\\Kkp3 Transmit DEC Keypad-3 sequence\n");
  11416. break;
  11417. case K_KP4 :
  11418. printf("\\Kkp4 Transmit DEC Keypad-4 sequence\n");
  11419. break;
  11420. case K_KP5 :
  11421. printf("\\Kkp5 Transmit DEC Keypad-5 sequence\n");
  11422. break;
  11423. case K_KP6 :
  11424. printf("\\Kkp6 Transmit DEC Keypad-6 sequence\n");
  11425. break;
  11426. case K_KP7 :
  11427. printf("\\Kkp7 Transmit DEC Keypad-7 sequence\n");
  11428. break;
  11429. case K_KP8 :
  11430. printf("\\Kkp8 Transmit DEC Keypad-8 sequence\n");
  11431. break;
  11432. case K_KP9 :
  11433. printf("\\Kkp9 Transmit DEC Keypad-9 sequence\n");
  11434. break;
  11435. case K_KPCOMA : /* DEC keypad comma */
  11436. printf("\\Kkpcoma Transmit DEC Keypad-Comma sequence\n");
  11437. break;
  11438. case K_KPMINUS : /* DEC keypad minus */
  11439. printf("\\Kkpminus Transmit DEC Keypad-Minus sequence\n");
  11440. break;
  11441. case K_KPDOT : /* DEC keypad period */
  11442. printf("\\Kkpdot Transmit DEC Keypad-Period sequence\n");
  11443. break;
  11444. case K_KPENTER : /* DEC keypad enter */
  11445. printf("\\Kkpenter Transmit DEC Keypad-Enter sequence\n");
  11446. break;
  11447. /* DEC Top-Rank F keys */
  11448. case K_DECF1 : /* DEC F1 key */
  11449. printf("\\Kdecf1 Transmit DEC F1 sequence for PC keyboard\n");
  11450. break;
  11451. case K_DECF2 : /* DEC F2 key */
  11452. printf("\\Kdecf2 Transmit DEC F2 sequence for PC keyboard\n");
  11453. break;
  11454. case K_DECF3 : /* DEC F3 key */
  11455. printf("\\Kdecf3 Transmit DEC F3 sequence for PC keyboard\n");
  11456. break;
  11457. case K_DECF4 : /* DEC F4 key */
  11458. printf("\\Kdecf4 Transmit DEC F4 sequence for PC keyboard\n");
  11459. break;
  11460. case K_DECF5 : /* DEC F5 key */
  11461. printf("\\Kdecf5 Transmit DEC F5 sequence for PC keyboard\n");
  11462. break;
  11463. case K_DECHOME: /* DEC HOME key */
  11464. printf("\\Kdechome Transmit DEC HOME sequence for PC keyboard\n");
  11465. break;
  11466. case K_DECF6 : /* DEC F6 key */
  11467. printf("\\Kdecf6 Transmit DEC F6 sequence\n");
  11468. break;
  11469. case K_DECF7 : /* etc, through F20 */
  11470. printf("\\Kdecf7 Transmit DEC F7 sequence\n");
  11471. break;
  11472. case K_DECF8 :
  11473. printf("\\Kdecf8 Transmit DEC F8 sequence\n");
  11474. break;
  11475. case K_DECF9 :
  11476. printf("\\Kdecf9 Transmit DEC F9 sequence\n");
  11477. break;
  11478. case K_DECF10 :
  11479. printf("\\Kdecf10 Transmit DEC F10 sequence\n");
  11480. break;
  11481. case K_DECF11 :
  11482. printf("\\Kdecf11 Transmit DEC F11 sequence\n");
  11483. break;
  11484. case K_DECF12 :
  11485. printf("\\Kdecf12 Transmit DEC F12 sequence\n");
  11486. break;
  11487. case K_DECF13 :
  11488. printf("\\Kdecf13 Transmit DEC F13 sequence\n");
  11489. break;
  11490. case K_DECF14 :
  11491. printf("\\Kdecf14 Transmit DEC F14 sequence\n");
  11492. break;
  11493. case K_DECHELP : /* DEC Help key */
  11494. printf("\\Kdecf15,\\Kdechelp Transmit DEC HELP sequence\n");
  11495. break;
  11496. case K_DECDO : /* DEC Do key */
  11497. printf("\\Kdecf16,\\Kdecdo Transmit DEC DO sequence\n");
  11498. break;
  11499. case K_DECF17 :
  11500. printf("\\Kdecf17 Transmit DEC F17 sequence\n");
  11501. break;
  11502. case K_DECF18 :
  11503. printf("\\Kdecf18 Transmit DEC F18 sequence\n");
  11504. break;
  11505. case K_DECF19 :
  11506. printf("\\Kdecf19 Transmit DEC F19 sequence\n");
  11507. break;
  11508. case K_DECF20 :
  11509. printf("\\Kdecf20 Transmit DEC F20 sequence\n");
  11510. break;
  11511. /* DEC editing keys */
  11512. case K_DECFIND : /* DEC Find key */
  11513. printf("\\Kdecfind Transmit DEC FIND sequence\n");
  11514. break;
  11515. case K_DECINSERT : /* DEC Insert key */
  11516. printf("\\Kdecinsert Transmit DEC INSERT HERE sequence\n");
  11517. break;
  11518. case K_DECREMOVE : /* DEC Remove key */
  11519. printf("\\Kdecremove Transmit DEC REMOVE sequence\n");
  11520. break;
  11521. case K_DECSELECT : /* DEC Select key */
  11522. printf("\\Kdecfselect Transmit DEC SELECT sequence\n");
  11523. break;
  11524. case K_DECPREV : /* DEC Previous Screen key */
  11525. printf("\\Kdecprev Transmit DEC PREV SCREEN sequence\n");
  11526. break;
  11527. case K_DECNEXT : /* DEC Next Screen key */
  11528. printf("\\Kdecnext Transmit DEC NEXT SCREEN sequence\n");
  11529. break;
  11530. /* DEC User-Defined Keys */
  11531. case K_UDKF1 : /* F1 - F5 are XTERM extensions */
  11532. printf("\\Kudkf1 Transmit XTERM F1 User Defined Key sequence\n");
  11533. break;
  11534. case K_UDKF2 :
  11535. printf("\\Kudkf2 Transmit XTERM F2 User Defined Key sequence\n");
  11536. break;
  11537. case K_UDKF3 :
  11538. printf("\\Kudkf3 Transmit XTERM F3 User Defined Key sequence\n");
  11539. break;
  11540. case K_UDKF4 :
  11541. printf("\\Kudkf4 Transmit XTERM F4 User Defined Key sequence\n");
  11542. break;
  11543. case K_UDKF5 :
  11544. printf("\\Kudkf5 Transmit XTERM F5 User Defined Key sequence\n");
  11545. break;
  11546. case K_UDKF6 : /* DEC User Defined Key F6 */
  11547. printf("\\Kudkf6 Transmit DEC F6 User Defined Key sequence\n");
  11548. break;
  11549. case K_UDKF7 : /* DEC User Defined Key F7 */
  11550. printf("\\Kudkf7 Transmit DEC F7 User Defined Key sequence\n");
  11551. break;
  11552. case K_UDKF8 : /* etc ... through F20 */
  11553. printf("\\Kudkf8 Transmit DEC F8 User Defined Key sequence\n");
  11554. break;
  11555. case K_UDKF9 :
  11556. printf("\\Kudkf9 Transmit DEC F9 User Defined Key sequence\n");
  11557. break;
  11558. case K_UDKF10 :
  11559. printf("\\Kudkf10 Transmit DEC F10 User Defined Key sequence\n");
  11560. break;
  11561. case K_UDKF11 :
  11562. printf("\\Kudkf11 Transmit DEC F11 User Defined Key sequence\n");
  11563. break;
  11564. case K_UDKF12 :
  11565. printf("\\Kudkf12 Transmit DEC F12 User Defined Key sequence\n");
  11566. break;
  11567. case K_UDKF13 :
  11568. printf("\\Kudkf13 Transmit DEC F13 User Defined Key sequence\n");
  11569. break;
  11570. case K_UDKF14 :
  11571. printf("\\Kudkf14 Transmit DEC F14 User Defined Key sequence\n");
  11572. break;
  11573. case K_UDKHELP :
  11574. printf(
  11575. "\\Kudkhelp,\\Kudkf15 Transmit DEC HELP User Defined Key sequence\n");
  11576. break;
  11577. case K_UDKDO :
  11578. printf(
  11579. "\\Kudkdo,\\Kudkf16 Transmit DEC DO User Defined Key sequence\n");
  11580. break;
  11581. case K_UDKF17 :
  11582. printf("\\Kudkf17 Transmit DEC F17 User Defined Key sequence\n");
  11583. break;
  11584. case K_UDKF18 :
  11585. printf("\\Kudkf18 Transmit DEC F18 User Defined Key sequence\n");
  11586. break;
  11587. case K_UDKF19 :
  11588. printf("\\Kudkf19 Transmit DEC F19 User Defined Key sequence\n");
  11589. break;
  11590. case K_UDKF20 :
  11591. printf("\\Kudkf20 Transmit DEC F20 User Defined Key sequence\n");
  11592. break;
  11593. /* Emacs Keys */
  11594. case K_EMACS_OVER:
  11595. printf(
  11596. "\\Kemacs_overwrite Transmit EMACS Overwrite toggle command sequence\n");
  11597. break;
  11598. /* Kermit screen-scrolling keys */
  11599. case K_DNONE : /* Screen rollback: down one line */
  11600. printf("\\Kdnone Screen rollback: down one line\n");
  11601. break;
  11602. case K_DNSCN : /* Screen rollback: down one screen */
  11603. printf("\\Kdnscn Screen rollback: down one screen\n");
  11604. break;
  11605. case K_UPONE : /* Screen rollback: Up one line */
  11606. printf("\\Kupone Screen rollback: up one line\n");
  11607. break;
  11608. case K_UPSCN : /* Screen rollback: Up one screen */
  11609. printf("\\Kupscn Screen rollback: up one screen\n");
  11610. break;
  11611. case K_ENDSCN : /* Screen rollback: latest screen */
  11612. printf("\\Kendscn Screen rollback: latest screen\n");
  11613. break;
  11614. case K_HOMSCN : /* Screen rollback: oldest screen */
  11615. printf("\\Khomscn Screen rollback: oldest screen\n");
  11616. break;
  11617. case K_GO_BOOK : /* Scroll to bookmark */
  11618. printf("\\Kgobook Screen rollback: go to bookmark\n");
  11619. break;
  11620. case K_GOTO : /* Scroll to line number */
  11621. printf("\\Kgoto Screen rollback: go to line number\n");
  11622. break;
  11623. case K_LFONE : /* Horizontal Scroll: Left one cell */
  11624. printf("\\Klfone Horizontal Scroll: Left one column\n");
  11625. break;
  11626. case K_LFPAGE : /* Horizontal Scroll: Left one page */
  11627. printf("\\Klfpage Horizontal Scroll: Left eight columns\n");
  11628. break;
  11629. case K_LFALL :
  11630. printf("\\Klfall Horizontal Scroll: Left to margin\n");
  11631. break;
  11632. case K_RTONE : /* Horizontal Scroll: Right one cell */
  11633. printf("\\Krtone Horizontal Scroll: Right one column\n");
  11634. break;
  11635. case K_RTPAGE : /* Horizontal Scroll: Right one page */
  11636. printf("\\Krtpage Horizontal Scroll: Right eight columns\n");
  11637. break;
  11638. case K_RTALL :
  11639. printf("\\Krtall Horizontal Scroll: Right to margin\n");
  11640. break;
  11641. /* Keyboard language switching verbs */
  11642. case K_KB_ENG : /* English keyboard mode */
  11643. printf("\\Kkbenglish Switch to Normal (English) keyboard mode\n");
  11644. break;
  11645. case K_KB_HEB : /* Hebrew keyboard mode */
  11646. printf("\\Kkbhebrew Switch to Hebrew keyboard mode\n");
  11647. break;
  11648. case K_KB_RUS : /* Russian keyboard mode */
  11649. printf("\\Kkbrussian Switch to Russian keyboard mode\n");
  11650. break;
  11651. case K_KB_EMA : /* Emacs keyboard mode */
  11652. printf("\\Kkbemacs Switch to EMACS keyboard mode\n");
  11653. break;
  11654. case K_KB_WP : /* Word Perfect 5.1 mode */
  11655. printf("\\Kkbwp Switch to Word Perfect 5.1 keyboard mode\n");
  11656. break;
  11657. /* Mark Mode actions */
  11658. case K_MARK_START : /* Enter Mark Mode/Start marking */
  11659. printf("\\Kmarkstart Mark Mode: Enter mode or Start marking\n");
  11660. break;
  11661. case K_MARK_CANCEL : /* Exit Mark Mode - Do Nothing */
  11662. printf("\\Kmarkcancel Mark Mode: Cancel mode\n");
  11663. break;
  11664. case K_MARK_COPYCLIP: /* Exit Mark Mode - Copy data to clipboard */
  11665. printf("\\Kmarkcopyclip Mark Mode: Copy marked text to clipboard\n");
  11666. break;
  11667. case K_MARK_COPYHOST: /* Exit Mark Mode - Copy data to host */
  11668. printf("\\Kmarkcopyhost Mark Mode: Copy marked text to host\n");
  11669. break;
  11670. case K_MARK_SELECT : /* Exit Mark Mode - Select */
  11671. printf(
  11672. "\\Kmarkselect Mark Mode: Place marked text into \\v(select)\n");
  11673. break;
  11674. case K_BACKSRCH : /* Search Backwards for text */
  11675. printf("\\Kbacksearch Search: Begin backward search for text\n");
  11676. break;
  11677. case K_FWDSRCH : /* Search Forwards for text */
  11678. printf("\\Kfwdsearch Search: Begin forward search for text\n");
  11679. break;
  11680. case K_BACKNEXT : /* Search Backwards for next instance of text */
  11681. printf(
  11682. "\\Kbacknext Search: Find next instance of text backwards\n");
  11683. break;
  11684. case K_FWDNEXT : /* Search Forwards for next instance of text */
  11685. printf("\\Kfwdnext Search: Find next instance of text forwards\n");
  11686. break;
  11687. /* Miscellaneous Kermit actions */
  11688. case K_EXIT : /* Return to command parser */
  11689. printf("\\Kexit Toggle between COMMAND and CONNECT modes\n");
  11690. break;
  11691. case K_BREAK : /* Send a BREAK */
  11692. printf("\\Kbreak Transmit BREAK signal to host\n");
  11693. break;
  11694. case K_RESET : /* Reset emulator */
  11695. printf("\\Kreset Reset Terminal Emulator to user defaults\n");
  11696. break;
  11697. case K_DOS : /* Push to DOS (i.e. OS/2) */
  11698. printf("\\Kdos,\\Kos2 Push to Command Shell\n");
  11699. break;
  11700. case K_HANGUP : /* Hang up the connection */
  11701. printf("\\Khangup Hangup the active connection\n");
  11702. break;
  11703. case K_DUMP : /* Dump/Print current screen */
  11704. printf(
  11705. "\\Kdump Dump/copy current screen to SET PRINTER device/file\n");
  11706. break;
  11707. case K_LBREAK : /* Send a Long BREAK */
  11708. printf("\\Klbreak Transmit LONG BREAK signal to host\n");
  11709. break;
  11710. case K_NULL : /* Send a NUL */
  11711. printf("\\Knull Transmit NULL ('\0') character to host\n");
  11712. break;
  11713. case K_HELP : /* Pop-up help */
  11714. printf("\\Khelp Raise Pop-Up help display\n");
  11715. break;
  11716. case K_HOLDSCRN : /* Hold screen */
  11717. printf("\\Kholdscrn Pause data input during CONNECT mode\n");
  11718. break;
  11719. case K_IGNORE : /* Ignore this key, don't even beep */
  11720. printf("\\Kignore Ignore key\n");
  11721. break;
  11722. case K_LOGOFF : /* Turn off session logging */
  11723. printf("\\Klogoff Turn off session logging (see \\Ksession)\n");
  11724. break;
  11725. case K_LOGON : /* Turn on session logging */
  11726. printf("\\Klogon Turn on session logging (see \\Ksession)\n");
  11727. break;
  11728. case K_SESSION:
  11729. printf(
  11730. "\\Ksession Toggle on/off session logging to 'session.log'\n");
  11731. break;
  11732. case K_AUTODOWN:
  11733. printf("\\Kautodown Toggle on/off terminal autodownload.\n");
  11734. break;
  11735. case K_BYTESIZE:
  11736. printf(
  11737. "\\Kbytesize Toggle terminal bytesize between 7 and 8 bits.\n");
  11738. break;
  11739. #ifdef COMMENT
  11740. case MODELINE:
  11741. case K_NETHOLD : /* Put network connection on hold */
  11742. case K_NEXTSESS : /* Toggle to next network session */
  11743. #endif /* COMMENT */
  11744. case K_CURSOR_URL:
  11745. printf(
  11746. "\\Kurl Treat text under cursor position as a URL\n");
  11747. break;
  11748. case K_STATUS : /* Show status */
  11749. printf(
  11750. "\\Kstatus Toggle statusline (None, Indicator, Host Writeable)\n");
  11751. break;
  11752. case K_TERMTYPE : /* Toggle term type: text/graphics */
  11753. printf("\\Ktermtype Toggle Terminal Type\n");
  11754. break;
  11755. case K_PRTCTRL : /* Print Controller mode */
  11756. printf("\\Kprtctrl Toggle Ctrl-Print (transparent) mode\n");
  11757. break;
  11758. case K_PRINTFF : /* Print formfeed */
  11759. printf("\\Kprintff Output Form Feed to SET PRINTER device\n");
  11760. break;
  11761. case K_FLIPSCN : /* Flip screen */
  11762. printf("\\Kflipscn Reverse foreground and background colors\n");
  11763. break;
  11764. case K_DEBUG : /* Toggle debugging */
  11765. printf("\\Kdebug Toggle Terminal Debug mode\n");
  11766. break;
  11767. case K_TN_SAK : /* TELNET Secure Access Key */
  11768. printf("\\Ktn_sak TELNET: IBM Secure Access Key\n");
  11769. printf(" Used to request a Trusted Shell with AIX\n");
  11770. break;
  11771. case K_TN_AO : /* TELNET Cancel Output */
  11772. printf("\\Ktn_ao TELNET: Transmit Cancel-Output request\n");
  11773. break;
  11774. case K_TN_AYT : /* TELNET Are You There */
  11775. printf("\\Ktnayt TELNET: Transmit Are You There? request\n");
  11776. break;
  11777. case K_TN_EC : /* TELNET Erase Character */
  11778. printf("\\Ktn_ec TELNET: Transmit Erase Character request\n");
  11779. break;
  11780. case K_TN_EL : /* TELNET Erase Line */
  11781. printf("\\Ktn_el TELNET: Transmit Erase Line request\n");
  11782. break;
  11783. case K_TN_GA : /* TELNET Go Ahead */
  11784. printf("\\Ktn_ga TELNET: Transmit Go Ahead request\n");
  11785. break;
  11786. case K_TN_IP : /* TELNET Interrupt Process */
  11787. printf("\\Ktn_ip TELNET: Transmit Interrupt Process request\n");
  11788. break;
  11789. case K_TN_LOGOUT : /* TELNET Logout */
  11790. printf("\\Ktn_logout TELNET: Transmit Do Logout Option\n");
  11791. break;
  11792. case K_TN_NAWS : /* TELNET NAWS */
  11793. printf(
  11794. "\\Ktn_naws TELNET: Transmit Window Size if NAWS is active\n");
  11795. break;
  11796. case K_PASTE : /* Paste data from clipboard */
  11797. printf("\\Kpaste Paste data from clipboard to host\n");
  11798. break;
  11799. case K_CLRSCRN : /* Clear Terminal Screen */
  11800. printf("\\Kclearscreen Clear the Terminal screen\n");
  11801. break;
  11802. case K_PRTAUTO : /* Print Auto mode */
  11803. printf("\\Kprtauto Toggle Auto-Print mode\n");
  11804. break;
  11805. case K_PRTCOPY : /* Print Copy mode */
  11806. printf("\\Kprtcopy Toggle Copy-Print mode\n");
  11807. break;
  11808. case K_ANSWERBACK : /* Transmit Answerback String */
  11809. printf("\\Kanswerback Transmit answerback string to host\n");
  11810. break;
  11811. case K_SET_BOOK : /* Set Bookmark */
  11812. printf("\\Ksetbook Set bookmark\n");
  11813. break;
  11814. case K_QUIT : /* Quit Kermit */
  11815. printf("\\Kquit Hangup connection and quit kermit\n");
  11816. break;
  11817. case K_KEYCLICK : /* Toggle Keyclick */
  11818. printf("\\Kkeyclick Toggle Keyclick mode\n");
  11819. break;
  11820. case K_LOGDEBUG : /* Toggle Debug Log File */
  11821. printf("\\Klogdebug Toggle Debug Logging to File\n");
  11822. break;
  11823. case K_FNKEYS : /* Show Function Key Labels */
  11824. printf("\\Kfnkeys Display Function Key Labels\n");
  11825. break;
  11826. #ifdef OS2MOUSE
  11827. /* Mouse only Kverbs */
  11828. case K_MOUSE_CURPOS :
  11829. printf("\\Kmousecurpos Mouse: Move host cursor to position\n");
  11830. break;
  11831. case K_MOUSE_MARK :
  11832. printf(
  11833. "\\Kmousemark Mouse: Mark text for selection (drag event only)\n");
  11834. break;
  11835. case K_MOUSE_URL :
  11836. printf("\\Kmouseurl Mouse: Start browser with selected URL\n");
  11837. break;
  11838. #endif /* OS2MOUSE */
  11839. /* ANSI Function Key definitions */
  11840. case K_ANSIF01 :
  11841. printf("\\Kansif01 Transmit SCOANSI/AT386: F1 \n");
  11842. break;
  11843. case K_ANSIF02 :
  11844. printf("\\Kansif02 Transmit SCOANSI/AT386: F2 \n");
  11845. break;
  11846. case K_ANSIF03 :
  11847. printf("\\Kansif03 Transmit SCOANSI/AT386: F3 \n");
  11848. break;
  11849. case K_ANSIF04 :
  11850. printf("\\Kansif04 Transmit SCOANSI/AT386: F4 \n");
  11851. break;
  11852. case K_ANSIF05 :
  11853. printf("\\Kansif05 Transmit SCOANSI/AT386: F5 \n");
  11854. break;
  11855. case K_ANSIF06 :
  11856. printf("\\Kansif06 Transmit SCOANSI/AT386: F6 \n");
  11857. break;
  11858. case K_ANSIF07 :
  11859. printf("\\Kansif07 Transmit SCOANSI/AT386: F7 \n");
  11860. break;
  11861. case K_ANSIF08 :
  11862. printf("\\Kansif08 Transmit SCOANSI/AT386: F8 \n");
  11863. break;
  11864. case K_ANSIF09 :
  11865. printf("\\Kansif09 Transmit SCOANSI/AT386: F9 \n");
  11866. break;
  11867. case K_ANSIF10 :
  11868. printf("\\Kansif10 Transmit SCOANSI/AT386: F10\n");
  11869. break;
  11870. case K_ANSIF11 :
  11871. printf("\\Kansif11 Transmit SCOANSI/AT386: F11\n");
  11872. break;
  11873. case K_ANSIF12 :
  11874. printf("\\Kansif12 Transmit SCOANSI/AT386: F12\n");
  11875. break;
  11876. case K_ANSIF13 :
  11877. printf("\\Kansif13 Transmit SCOANSI/AT386: Shift-F1 \n");
  11878. break;
  11879. case K_ANSIF14 :
  11880. printf("\\Kansif14 Transmit SCOANSI/AT386: Shift-F2 \n");
  11881. break;
  11882. case K_ANSIF15 :
  11883. printf("\\Kansif15 Transmit SCOANSI/AT386: Shift-F3 \n");
  11884. break;
  11885. case K_ANSIF16 :
  11886. printf("\\Kansif16 Transmit SCOANSI/AT386: Shift-F4 \n");
  11887. break;
  11888. case K_ANSIF17 :
  11889. printf("\\Kansif17 Transmit SCOANSI/AT386: Shift-F5 \n");
  11890. break;
  11891. case K_ANSIF18 :
  11892. printf("\\Kansif18 Transmit SCOANSI/AT386: Shift-F6 \n");
  11893. break;
  11894. case K_ANSIF19 :
  11895. printf("\\Kansif19 Transmit SCOANSI/AT386: Shift-F7 \n");
  11896. break;
  11897. case K_ANSIF20 :
  11898. printf("\\Kansif20 Transmit SCOANSI/AT386: Shift-F8 \n");
  11899. break;
  11900. case K_ANSIF21 :
  11901. printf("\\Kansif21 Transmit SCOANSI/AT386: Shift-F9 \n");
  11902. break;
  11903. case K_ANSIF22 :
  11904. printf("\\Kansif22 Transmit SCOANSI/AT386: Shift-F10\n");
  11905. break;
  11906. case K_ANSIF23 :
  11907. printf("\\Kansif23 Transmit SCOANSI/AT386: Shift-F11\n");
  11908. break;
  11909. case K_ANSIF24 :
  11910. printf("\\Kansif24 Transmit SCOANSI/AT386: Shift-F12\n");
  11911. break;
  11912. case K_ANSIF25 :
  11913. printf("\\Kansif25 Transmit SCOANSI/AT386: Ctrl-F1 \n");
  11914. break;
  11915. case K_ANSIF26 :
  11916. printf("\\Kansif26 Transmit SCOANSI/AT386: Ctrl-F2 \n");
  11917. break;
  11918. case K_ANSIF27 :
  11919. printf("\\Kansif27 Transmit SCOANSI/AT386: Ctrl-F3 \n");
  11920. break;
  11921. case K_ANSIF28 :
  11922. printf("\\Kansif28 Transmit SCOANSI/AT386: Ctrl-F4 \n");
  11923. break;
  11924. case K_ANSIF29 :
  11925. printf("\\Kansif29 Transmit SCOANSI/AT386: Ctrl-F5 \n");
  11926. break;
  11927. case K_ANSIF30 :
  11928. printf("\\Kansif30 Transmit SCOANSI/AT386: Ctrl-F6 \n");
  11929. break;
  11930. case K_ANSIF31 :
  11931. printf("\\Kansif31 Transmit SCOANSI/AT386: Ctrl-F7 \n");
  11932. break;
  11933. case K_ANSIF32 :
  11934. printf("\\Kansif32 Transmit SCOANSI/AT386: Ctrl-F8 \n");
  11935. break;
  11936. case K_ANSIF33 :
  11937. printf("\\Kansif33 Transmit SCOANSI/AT386: Ctrl-F9 \n");
  11938. break;
  11939. case K_ANSIF34 :
  11940. printf("\\Kansif34 Transmit SCOANSI/AT386: Ctrl-F10\n");
  11941. break;
  11942. case K_ANSIF35 :
  11943. printf("\\Kansif35 Transmit SCOANSI/AT386: Ctrl-F11\n");
  11944. break;
  11945. case K_ANSIF36 :
  11946. printf("\\Kansif36 Transmit SCOANSI/AT386: Ctrl-F12\n");
  11947. break;
  11948. case K_ANSIF37 :
  11949. printf("\\Kansif37 Transmit SCOANSI/AT386: Ctrl-Shift-F1 \n");
  11950. break;
  11951. case K_ANSIF38 :
  11952. printf("\\Kansif38 Transmit SCOANSI/AT386: Ctrl-Shift-F2 \n");
  11953. break;
  11954. case K_ANSIF39 :
  11955. printf("\\Kansif39 Transmit SCOANSI/AT386: Ctrl-Shift-F3 \n");
  11956. break;
  11957. case K_ANSIF40 :
  11958. printf("\\Kansif40 Transmit SCOANSI/AT386: Ctrl-Shift-F4 \n");
  11959. break;
  11960. case K_ANSIF41 :
  11961. printf("\\Kansif41 Transmit SCOANSI/AT386: Ctrl-Shift-F5 \n");
  11962. break;
  11963. case K_ANSIF42 :
  11964. printf("\\Kansif42 Transmit SCOANSI/AT386: Ctrl-Shift-F6 \n");
  11965. break;
  11966. case K_ANSIF43 :
  11967. printf("\\Kansif43 Transmit SCOANSI/AT386: Ctrl-Shift-F7 \n");
  11968. break;
  11969. case K_ANSIF44 :
  11970. printf("\\Kansif44 Transmit SCOANSI/AT386: Ctrl-Shift-F8 \n");
  11971. break;
  11972. case K_ANSIF45 :
  11973. printf("\\Kansif45 Transmit SCOANSI/AT386: Ctrl-Shift-F9 \n");
  11974. break;
  11975. case K_ANSIF46 :
  11976. printf("\\Kansif46 Transmit SCOANSI/AT386: Ctrl-Shift-F10\n");
  11977. break;
  11978. case K_ANSIF47 :
  11979. printf("\\Kansif47 Transmit SCOANSI/AT386: Ctrl-Shift-F11\n");
  11980. break;
  11981. case K_ANSIF48 :
  11982. printf("\\Kansif48 Transmit SCOANSI/AT386: Ctrl-Shift-F12\n");
  11983. break;
  11984. case K_ANSIF49 :
  11985. printf("\\Kansif49 Transmit SCOANSI/AT386: Home\n");
  11986. break;
  11987. case K_ANSIF50 :
  11988. printf("\\Kansif50 Transmit SCOANSI/AT386: Up Arrow\n");
  11989. break;
  11990. case K_ANSIF51 :
  11991. printf("\\Kansif51 Transmit SCOANSI/AT386: PgUp\n");
  11992. break;
  11993. case K_ANSIF52 :
  11994. printf("\\Kansif52 Transmit SCOANSI/AT386: Ctrl-Shift-Subtract\n");
  11995. break;
  11996. case K_ANSIF53 :
  11997. printf("\\Kansif53 Transmit SCOANSI/AT386: Left Arrow\n");
  11998. break;
  11999. case K_ANSIF54 :
  12000. printf("\\Kansif54 Transmit SCOANSI/AT386: Clear\n");
  12001. break;
  12002. case K_ANSIF55 :
  12003. printf("\\Kansif55 Transmit SCOANSI/AT386: Right Arrow\n");
  12004. break;
  12005. case K_ANSIF56 :
  12006. printf("\\Kansif56 Transmit SCOANSI/AT386: Shift-Add\n");
  12007. break;
  12008. case K_ANSIF57 :
  12009. printf("\\Kansif57 Transmit SCOANSI/AT386: End\n");
  12010. break;
  12011. case K_ANSIF58 :
  12012. printf("\\Kansif58 Transmit SCOANSI/AT386: Down Arrow\n");
  12013. break;
  12014. case K_ANSIF59 :
  12015. printf("\\Kansif59 Transmit SCOANSI/AT386: PgDn\n");
  12016. break;
  12017. case K_ANSIF60 :
  12018. printf("\\Kansif60 Transmit SCOANSI/AT386: Insert\n");
  12019. break;
  12020. case K_ANSIF61 :
  12021. printf("\\Kansif61 Transmit SCOANSI/AT386: (not named)\n");
  12022. break;
  12023. /* WYSE Function Keys (unshifted) */
  12024. case K_WYF01 :
  12025. printf("\\Kwyf01 Transmit WYSE 30/50/60/160: F1\n");
  12026. break;
  12027. case K_WYF02 :
  12028. printf("\\Kwyf02 Transmit WYSE 30/50/60/160: F2\n");
  12029. break;
  12030. case K_WYF03 :
  12031. printf("\\Kwyf03 Transmit WYSE 30/50/60/160: F3\n");
  12032. break;
  12033. case K_WYF04 :
  12034. printf("\\Kwyf04 Transmit WYSE 30/50/60/160: F4\n");
  12035. break;
  12036. case K_WYF05 :
  12037. printf("\\Kwyf05 Transmit WYSE 30/50/60/160: F5\n");
  12038. break;
  12039. case K_WYF06 :
  12040. printf("\\Kwyf06 Transmit WYSE 30/50/60/160: F6\n");
  12041. break;
  12042. case K_WYF07 :
  12043. printf("\\Kwyf07 Transmit WYSE 30/50/60/160: F7\n");
  12044. break;
  12045. case K_WYF08 :
  12046. printf("\\Kwyf08 Transmit WYSE 30/50/60/160: F8\n");
  12047. break;
  12048. case K_WYF09 :
  12049. printf("\\Kwyf09 Transmit WYSE 30/50/60/160: F9\n");
  12050. break;
  12051. case K_WYF10 :
  12052. printf("\\Kwyf10 Transmit WYSE 30/50/60/160: F10\n");
  12053. break;
  12054. case K_WYF11 :
  12055. printf("\\Kwyf11 Transmit WYSE 30/50/60/160: F11\n");
  12056. break;
  12057. case K_WYF12 :
  12058. printf("\\Kwyf12 Transmit WYSE 30/50/60/160: F12\n");
  12059. break;
  12060. case K_WYF13 :
  12061. printf("\\Kwyf13 Transmit WYSE 30/50/60/160: F13\n");
  12062. break;
  12063. case K_WYF14 :
  12064. printf("\\Kwyf14 Transmit WYSE 30/50/60/160: F14\n");
  12065. break;
  12066. case K_WYF15 :
  12067. printf("\\Kwyf15 Transmit WYSE 30/50/60/160: F15\n");
  12068. break;
  12069. case K_WYF16 :
  12070. printf("\\Kwyf16 Transmit WYSE 30/50/60/160: F16\n");
  12071. break;
  12072. case K_WYF17 :
  12073. printf("\\Kwyf17 Transmit WYSE 30/50/60/160: F17\n");
  12074. break;
  12075. case K_WYF18 :
  12076. printf("\\Kwyf18 Transmit WYSE 30/50/60/160: F18\n");
  12077. break;
  12078. case K_WYF19 :
  12079. printf("\\Kwyf19 Transmit WYSE 30/50/60/160: F19\n");
  12080. break;
  12081. case K_WYF20 :
  12082. printf("\\Kwyf20 Transmit WYSE 30/50/60/160: F20\n");
  12083. break;
  12084. /* WYSE Function Keys (shifted) */
  12085. case K_WYSF01 :
  12086. printf("\\Kwysf01 Transmit WYSE 30/50/60/160: Shift-F1\n");
  12087. break;
  12088. case K_WYSF02 :
  12089. printf("\\Kwysf02 Transmit WYSE 30/50/60/160: Shift-F2\n");
  12090. break;
  12091. case K_WYSF03 :
  12092. printf("\\Kwysf03 Transmit WYSE 30/50/60/160: Shift-F3\n");
  12093. break;
  12094. case K_WYSF04 :
  12095. printf("\\Kwysf04 Transmit WYSE 30/50/60/160: Shift-F4\n");
  12096. break;
  12097. case K_WYSF05 :
  12098. printf("\\Kwysf05 Transmit WYSE 30/50/60/160: Shift-F5\n");
  12099. break;
  12100. case K_WYSF06 :
  12101. printf("\\Kwysf06 Transmit WYSE 30/50/60/160: Shift-F6\n");
  12102. break;
  12103. case K_WYSF07 :
  12104. printf("\\Kwysf07 Transmit WYSE 30/50/60/160: Shift-F7\n");
  12105. break;
  12106. case K_WYSF08 :
  12107. printf("\\Kwysf08 Transmit WYSE 30/50/60/160: Shift-F8\n");
  12108. break;
  12109. case K_WYSF09 :
  12110. printf("\\Kwysf09 Transmit WYSE 30/50/60/160: Shift-F9\n");
  12111. break;
  12112. case K_WYSF10 :
  12113. printf("\\Kwysf10 Transmit WYSE 30/50/60/160: Shift-F10\n");
  12114. break;
  12115. case K_WYSF11 :
  12116. printf("\\Kwysf11 Transmit WYSE 30/50/60/160: Shift-F11\n");
  12117. break;
  12118. case K_WYSF12 :
  12119. printf("\\Kwysf12 Transmit WYSE 30/50/60/160: Shift-F12\n");
  12120. break;
  12121. case K_WYSF13 :
  12122. printf("\\Kwysf13 Transmit WYSE 30/50/60/160: Shift-F13\n");
  12123. break;
  12124. case K_WYSF14 :
  12125. printf("\\Kwysf14 Transmit WYSE 30/50/60/160: Shift-F14\n");
  12126. break;
  12127. case K_WYSF15 :
  12128. printf("\\Kwysf15 Transmit WYSE 30/50/60/160: Shift-F15\n");
  12129. break;
  12130. case K_WYSF16 :
  12131. printf("\\Kwysf16 Transmit WYSE 30/50/60/160: Shift-F16\n");
  12132. break;
  12133. case K_WYSF17 :
  12134. printf("\\Kwysf17 Transmit WYSE 30/50/60/160: Shift-F17\n");
  12135. break;
  12136. case K_WYSF18 :
  12137. printf("\\Kwysf18 Transmit WYSE 30/50/60/160: Shift-F18\n");
  12138. break;
  12139. case K_WYSF19 :
  12140. printf("\\Kwysf19 Transmit WYSE 30/50/60/160: Shift-F19\n");
  12141. break;
  12142. case K_WYSF20 :
  12143. printf("\\Kwysf20 Transmit WYSE 30/50/60/160: Shift-F20\n");
  12144. break;
  12145. /* WYSE Edit and Special Keys */
  12146. case K_WYBS :
  12147. printf("\\Kwybs Transmit WYSE 30/50/60/160: Backspace\n");
  12148. break;
  12149. case K_WYCLRLN :
  12150. printf("\\Kwyclrln Transmit WYSE 30/50/60/160: Clear Line\n");
  12151. break;
  12152. case K_WYSCLRLN :
  12153. printf("\\Kwysclrln Transmit WYSE 30/50/60/160: Shift-Clear Line\n");
  12154. break;
  12155. case K_WYCLRPG :
  12156. printf("\\Kwyclrpg Transmit WYSE 30/50/60/160: Clear Page\n");
  12157. break;
  12158. case K_WYSCLRPG :
  12159. printf("\\Kwysclrpg Transmit WYSE 30/50/60/160: Shift-Clear Page\n");
  12160. break;
  12161. case K_WYDELCHAR :
  12162. printf("\\Kwydelchar Transmit WYSE 30/50/60/160: Delete Char\n");
  12163. break;
  12164. case K_WYDELLN :
  12165. printf("\\Kwydelln Transmit WYSE 30/50/60/160: Delete Line\n");
  12166. break;
  12167. case K_WYENTER :
  12168. printf("\\Kwyenter Transmit WYSE 30/50/60/160: Enter\n");
  12169. break;
  12170. case K_WYESC :
  12171. printf("\\Kwyesc Transmit WYSE 30/50/60/160: Esc\n");
  12172. break;
  12173. case K_WYHOME :
  12174. printf("\\Kwyhome Transmit WYSE 30/50/60/160: Home\n");
  12175. break;
  12176. case K_WYSHOME :
  12177. printf("\\Kwyshome Transmit WYSE 30/50/60/160: Shift-Home\n");
  12178. break;
  12179. case K_WYINSERT :
  12180. printf("\\Kwyinsert Transmit WYSE 30/50/60/160: Insert\n");
  12181. break;
  12182. case K_WYINSCHAR :
  12183. printf("\\Kwyinschar Transmit WYSE 30/50/60/160: Insert Char\n");
  12184. break;
  12185. case K_WYINSLN :
  12186. printf("\\Kwyinsln Transmit WYSE 30/50/60/160: Insert Line\n");
  12187. break;
  12188. case K_WYPGNEXT :
  12189. printf("\\Kwypgnext Transmit WYSE 30/50/60/160: Page Next\n");
  12190. break;
  12191. case K_WYPGPREV :
  12192. printf("\\Kwypgprev Transmit WYSE 30/50/60/160: Page Previous\n");
  12193. break;
  12194. case K_WYREPLACE :
  12195. printf("\\Kwyreplace Transmit WYSE 30/50/60/160: Replace \n");
  12196. break;
  12197. case K_WYRETURN :
  12198. printf("\\Kwyreturn Transmit WYSE 30/50/60/160: Return \n");
  12199. break;
  12200. case K_WYTAB :
  12201. printf("\\Kwytab Transmit WYSE 30/50/60/160: Tab \n");
  12202. break;
  12203. case K_WYSTAB :
  12204. printf("\\Kwystab Transmit WYSE 30/50/60/160: Shift-Tab \n");
  12205. break;
  12206. case K_WYPRTSCN :
  12207. printf("\\Kwyprtscn Transmit WYSE 30/50/60/160: Print Screen \n");
  12208. break;
  12209. case K_WYSESC :
  12210. printf("\\Kwysesc Transmit WYSE 30/50/60/160: Shift-Esc \n");
  12211. break;
  12212. case K_WYSBS :
  12213. printf("\\Kwysbs Transmit WYSE 30/50/60/160: Shift-Backspace\n");
  12214. break;
  12215. case K_WYSENTER :
  12216. printf("\\Kwysenter Transmit WYSE 30/50/60/160: Shift-Enter\n");
  12217. break;
  12218. case K_WYSRETURN :
  12219. printf("\\Kwysreturn Transmit WYSE 30/50/60/160: Shift-Return\n");
  12220. break;
  12221. case K_WYUPARR :
  12222. printf("\\Kwyuparr Transmit WYSE 30/50/60/160: Up Arrow\n");
  12223. break;
  12224. case K_WYDNARR :
  12225. printf("\\Kwydnarr Transmit WYSE 30/50/60/160: Down Arrow\n");
  12226. break;
  12227. case K_WYLFARR :
  12228. printf("\\Kwylfarr Transmit WYSE 30/50/60/160: Left Arrow\n");
  12229. break;
  12230. case K_WYRTARR :
  12231. printf("\\Kwyrtarr Transmit WYSE 30/50/60/160: Right Arrow\n");
  12232. break;
  12233. case K_WYSUPARR :
  12234. printf("\\Kwysuparr Transmit WYSE 30/50/60/160: Shift-Up Arrow\n");
  12235. break;
  12236. case K_WYSDNARR :
  12237. printf("\\Kwysdnarr Transmit WYSE 30/50/60/160: Shift-Down Arrow\n");
  12238. break;
  12239. case K_WYSLFARR :
  12240. printf("\\Kwyslfarr Transmit WYSE 30/50/60/160: Shift-Left Arrow\n");
  12241. break;
  12242. case K_WYSRTARR :
  12243. printf("\\Kwysrtarr Transmit WYSE 30/50/60/160: Shift-Right Arrow\n");
  12244. break;
  12245. case K_WYSEND:
  12246. printf("\\Kwysend Transmit WYSE 30/50/60/160: Send\n");
  12247. break;
  12248. case K_WYSSEND:
  12249. printf("\\Kwyssend Transmit WYSE 30/50/60/160: Shift-Send\n");
  12250. break;
  12251. /* Data General Function Keys (unshifted) */
  12252. case K_DGF01 :
  12253. printf("\\Kdgf01 Transmit Data General: F1 \n");
  12254. break;
  12255. case K_DGF02 :
  12256. printf("\\Kdgf01 Transmit Data General: F2 \n");
  12257. break;
  12258. case K_DGF03 :
  12259. printf("\\Kdgf01 Transmit Data General: F3 \n");
  12260. break;
  12261. case K_DGF04 :
  12262. printf("\\Kdgf01 Transmit Data General: F4 \n");
  12263. break;
  12264. case K_DGF05 :
  12265. printf("\\Kdgf01 Transmit Data General: F5 \n");
  12266. break;
  12267. case K_DGF06 :
  12268. printf("\\Kdgf01 Transmit Data General: F6 \n");
  12269. break;
  12270. case K_DGF07 :
  12271. printf("\\Kdgf01 Transmit Data General: F7 \n");
  12272. break;
  12273. case K_DGF08 :
  12274. printf("\\Kdgf01 Transmit Data General: F8 \n");
  12275. break;
  12276. case K_DGF09 :
  12277. printf("\\Kdgf01 Transmit Data General: F9 \n");
  12278. break;
  12279. case K_DGF10 :
  12280. printf("\\Kdgf01 Transmit Data General: F10 \n");
  12281. break;
  12282. case K_DGF11 :
  12283. printf("\\Kdgf01 Transmit Data General: F11 \n");
  12284. break;
  12285. case K_DGF12 :
  12286. printf("\\Kdgf01 Transmit Data General: F12 \n");
  12287. break;
  12288. case K_DGF13 :
  12289. printf("\\Kdgf01 Transmit Data General: F13 \n");
  12290. break;
  12291. case K_DGF14 :
  12292. printf("\\Kdgf01 Transmit Data General: F14 \n");
  12293. break;
  12294. case K_DGF15 :
  12295. printf("\\Kdgf01 Transmit Data General: F15 \n");
  12296. break;
  12297. /* Data General Function Keys (shifted) */
  12298. case K_DGSF01 :
  12299. printf(
  12300. "\\Kdgsf01 Transmit Data General: Shift-F1 \n");
  12301. break;
  12302. case K_DGSF02 :
  12303. printf(
  12304. "\\Kdgsf02 Transmit Data General: Shift-F2 \n");
  12305. break;
  12306. case K_DGSF03 :
  12307. printf(
  12308. "\\Kdgsf03 Transmit Data General: Shift-F3 \n");
  12309. break;
  12310. case K_DGSF04 :
  12311. printf(
  12312. "\\Kdgsf04 Transmit Data General: Shift-F4 \n");
  12313. break;
  12314. case K_DGSF05 :
  12315. printf(
  12316. "\\Kdgsf05 Transmit Data General: Shift-F5 \n");
  12317. break;
  12318. case K_DGSF06 :
  12319. printf(
  12320. "\\Kdgsf06 Transmit Data General: Shift-F6 \n");
  12321. break;
  12322. case K_DGSF07 :
  12323. printf(
  12324. "\\Kdgsf07 Transmit Data General: Shift-F7 \n");
  12325. break;
  12326. case K_DGSF08 :
  12327. printf(
  12328. "\\Kdgsf08 Transmit Data General: Shift-F8 \n");
  12329. break;
  12330. case K_DGSF09 :
  12331. printf(
  12332. "\\Kdgsf09 Transmit Data General: Shift-F9 \n");
  12333. break;
  12334. case K_DGSF10 :
  12335. printf(
  12336. "\\Kdgsf10 Transmit Data General: Shift-F10 \n");
  12337. break;
  12338. case K_DGSF11 :
  12339. printf(
  12340. "\\Kdgsf11 Transmit Data General: Shift-F11 \n");
  12341. break;
  12342. case K_DGSF12 :
  12343. printf(
  12344. "\\Kdgsf12 Transmit Data General: Shift-F12 \n");
  12345. break;
  12346. case K_DGSF13 :
  12347. printf(
  12348. "\\Kdgsf13 Transmit Data General: Shift-F13 \n");
  12349. break;
  12350. case K_DGSF14 :
  12351. printf(
  12352. "\\Kdgsf14 Transmit Data General: Shift-F14 \n");
  12353. break;
  12354. case K_DGSF15 :
  12355. printf(
  12356. "\\Kdgsf15 Transmit Data General: Shift-F15 \n");
  12357. break;
  12358. /* Data General Function Keys (control) */
  12359. case K_DGCF01 :
  12360. printf(
  12361. "\\Kdgcf01 Transmit Data General: Ctrl-F1 \n");
  12362. break;
  12363. case K_DGCF02 :
  12364. printf(
  12365. "\\Kdgcf02 Transmit Data General: Ctrl-F2 \n");
  12366. break;
  12367. case K_DGCF03 :
  12368. printf(
  12369. "\\Kdgcf03 Transmit Data General: Ctrl-F3 \n");
  12370. break;
  12371. case K_DGCF04 :
  12372. printf(
  12373. "\\Kdgcf04 Transmit Data General: Ctrl-F4 \n");
  12374. break;
  12375. case K_DGCF05 :
  12376. printf(
  12377. "\\Kdgcf05 Transmit Data General: Ctrl-F5 \n");
  12378. break;
  12379. case K_DGCF06 :
  12380. printf(
  12381. "\\Kdgcf06 Transmit Data General: Ctrl-F6 \n");
  12382. break;
  12383. case K_DGCF07 :
  12384. printf(
  12385. "\\Kdgcf07 Transmit Data General: Ctrl-F7 \n");
  12386. break;
  12387. case K_DGCF08 :
  12388. printf(
  12389. "\\Kdgcf08 Transmit Data General: Ctrl-F8 \n");
  12390. break;
  12391. case K_DGCF09 :
  12392. printf(
  12393. "\\Kdgcf09 Transmit Data General: Ctrl-F9 \n");
  12394. break;
  12395. case K_DGCF10 :
  12396. printf(
  12397. "\\Kdgcf10 Transmit Data General: Ctrl-F10 \n");
  12398. break;
  12399. case K_DGCF11 :
  12400. printf(
  12401. "\\Kdgcf11 Transmit Data General: Ctrl-F11 \n");
  12402. break;
  12403. case K_DGCF12 :
  12404. printf(
  12405. "\\Kdgcf12 Transmit Data General: Ctrl-F12 \n");
  12406. break;
  12407. case K_DGCF13 :
  12408. printf(
  12409. "\\Kdgcf13 Transmit Data General: Ctrl-F13 \n");
  12410. break;
  12411. case K_DGCF14 :
  12412. printf(
  12413. "\\Kdgcf14 Transmit Data General: Ctrl-F14 \n");
  12414. break;
  12415. case K_DGCF15 :
  12416. printf(
  12417. "\\Kdgcf15 Transmit Data General: Ctrl-F15 \n");
  12418. break;
  12419. /* Data General Function Keys (control shifted) */
  12420. case K_DGCSF01 :
  12421. printf(
  12422. "\\Kdgcsf01 Transmit Data General: Ctrl-Shift-F1 \n");
  12423. break;
  12424. case K_DGCSF02 :
  12425. printf(
  12426. "\\Kdgcsf02 Transmit Data General: Ctrl-Shift-F2 \n");
  12427. break;
  12428. case K_DGCSF03 :
  12429. printf(
  12430. "\\Kdgcsf03 Transmit Data General: Ctrl-Shift-F3 \n");
  12431. break;
  12432. case K_DGCSF04 :
  12433. printf(
  12434. "\\Kdgcsf04 Transmit Data General: Ctrl-Shift-F4 \n");
  12435. break;
  12436. case K_DGCSF05 :
  12437. printf(
  12438. "\\Kdgcsf05 Transmit Data General: Ctrl-Shift-F5 \n");
  12439. break;
  12440. case K_DGCSF06 :
  12441. printf(
  12442. "\\Kdgcsf06 Transmit Data General: Ctrl-Shift-F6 \n");
  12443. break;
  12444. case K_DGCSF07 :
  12445. printf(
  12446. "\\Kdgcsf07 Transmit Data General: Ctrl-Shift-F7 \n");
  12447. break;
  12448. case K_DGCSF08 :
  12449. printf(
  12450. "\\Kdgcsf08 Transmit Data General: Ctrl-Shift-F8 \n");
  12451. break;
  12452. case K_DGCSF09 :
  12453. printf(
  12454. "\\Kdgcsf09 Transmit Data General: Ctrl-Shift-F9 \n");
  12455. break;
  12456. case K_DGCSF10 :
  12457. printf(
  12458. "\\Kdgcsf10 Transmit Data General: Ctrl-Shift-F10 \n");
  12459. break;
  12460. case K_DGCSF11 :
  12461. printf(
  12462. "\\Kdgcsf11 Transmit Data General: Ctrl-Shift-F11 \n");
  12463. break;
  12464. case K_DGCSF12 :
  12465. printf(
  12466. "\\Kdgcsf12 Transmit Data General: Ctrl-Shift-F12 \n");
  12467. break;
  12468. case K_DGCSF13 :
  12469. printf(
  12470. "\\Kdgcsf13 Transmit Data General: Ctrl-Shift-F13 \n");
  12471. break;
  12472. case K_DGCSF14 :
  12473. printf(
  12474. "\\Kdgcsf14 Transmit Data General: Ctrl-Shift-F14 \n");
  12475. break;
  12476. case K_DGCSF15 :
  12477. printf(
  12478. "\\Kdgcsf15 Transmit Data General: Ctrl-Shift-F15 \n");
  12479. break;
  12480. case K_DGUPARR :
  12481. printf("\\Kdguparr Transmit Data General: Up Arrow \n");
  12482. break;
  12483. case K_DGDNARR :
  12484. printf("\\Kdgdnarr Transmit Data General: Down Arrow \n");
  12485. break;
  12486. case K_DGLFARR :
  12487. printf("\\Kdglfarr Transmit Data General: Left Arrow \n");
  12488. break;
  12489. case K_DGRTARR :
  12490. printf("\\Kdgrtarr Transmit Data General: Right Arrow \n");
  12491. break;
  12492. case K_DGSUPARR :
  12493. printf("\\Kdgsuparr Transmit Data General: Shift-Up Arrow \n");
  12494. break;
  12495. case K_DGSDNARR :
  12496. printf("\\Kdgsdnarr Transmit Data General: Shift-Down Arrow \n");
  12497. break;
  12498. case K_DGSLFARR :
  12499. printf("\\Kdgslfarr Transmit Data General: Shift-Left Arrow \n");
  12500. break;
  12501. case K_DGSRTARR :
  12502. printf("\\Kdgsrtarr Transmit Data General: Shift-Right Arrow \n");
  12503. break;
  12504. case K_DGERASEPAGE :
  12505. printf("\\Kdgerasepage Transmit Data General: Erase Page \n");
  12506. break;
  12507. case K_DGC1 :
  12508. printf("\\Kdgc1 Transmit Data General: C1 \n");
  12509. break;
  12510. case K_DGC2 :
  12511. printf("\\Kdgc2 Transmit Data General: C2 \n");
  12512. break;
  12513. case K_DGERASEEOL :
  12514. printf("\\Kdgeraseeol Transmit Data General: Erase EOL \n");
  12515. break;
  12516. case K_DGC3 :
  12517. printf("\\Kdgc3 Transmit Data General: C3 \n");
  12518. break;
  12519. case K_DGC4 :
  12520. printf("\\Kdgc4 Transmit Data General: C4 \n");
  12521. break;
  12522. case K_DGCMDPRINT :
  12523. printf("\\Kdgcmdprint Transmit Data General: Command Print \n");
  12524. break;
  12525. case K_DGHOME :
  12526. printf("\\Kdghome Transmit Data General: Home \n");
  12527. break;
  12528. case K_DGSERASEPAGE :
  12529. printf("\\Kdgserasepage Transmit Data General: Erase Page \n");
  12530. break;
  12531. case K_DGSC1 :
  12532. printf("\\Kdgsc1 Transmit Data General: Shift-C1 \n");
  12533. break;
  12534. case K_DGSC2 :
  12535. printf("\\Kdgsc2 Transmit Data General: Shift-C2 \n");
  12536. break;
  12537. case K_DGSERASEEOL :
  12538. printf("\\Kdgseraseeol Transmit Data General: Shift-Erase EOL \n");
  12539. break;
  12540. case K_DGSC3 :
  12541. printf("\\Kdgsc3 Transmit Data General: Shift-C3 \n");
  12542. break;
  12543. case K_DGSC4 :
  12544. printf("\\Kdgsc4 Transmit Data General: Shift-C4 \n");
  12545. break;
  12546. case K_DGSCMDPRINT :
  12547. printf("\\Kdgscmdprint Transmit Data General: Shift-Command Print\n");
  12548. break;
  12549. case K_DGBS :
  12550. printf("\\Kdgbs Transmit Data General: Backspace \n");
  12551. break;
  12552. case K_DGSHOME :
  12553. printf("\\Kdshome Transmit Data General: Shift-Home \n");
  12554. break;
  12555. /* Televideo Function Keys (unshifted) */
  12556. case K_TVIF01 :
  12557. printf("\\Ktvif01 Transmit Televideo: F1 \n");
  12558. break;
  12559. case K_TVIF02 :
  12560. printf("\\Ktvif02 Transmit Televideo: F2 \n");
  12561. break;
  12562. case K_TVIF03 :
  12563. printf("\\Ktvif03 Transmit Televideo: F3 \n");
  12564. break;
  12565. case K_TVIF04 :
  12566. printf("\\Ktvif04 Transmit Televideo: F4 \n");
  12567. break;
  12568. case K_TVIF05 :
  12569. printf("\\Ktvif05 Transmit Televideo: F5 \n");
  12570. break;
  12571. case K_TVIF06 :
  12572. printf("\\Ktvif06 Transmit Televideo: F6 \n");
  12573. break;
  12574. case K_TVIF07 :
  12575. printf("\\Ktvif07 Transmit Televideo: F7 \n");
  12576. break;
  12577. case K_TVIF08 :
  12578. printf("\\Ktvif08 Transmit Televideo: F8 \n");
  12579. break;
  12580. case K_TVIF09 :
  12581. printf("\\Ktvif09 Transmit Televideo: F9 \n");
  12582. break;
  12583. case K_TVIF10 :
  12584. printf("\\Ktvif10 Transmit Televideo: F10 \n");
  12585. break;
  12586. case K_TVIF11 :
  12587. printf("\\Ktvif11 Transmit Televideo: F11 \n");
  12588. break;
  12589. case K_TVIF12 :
  12590. printf("\\Ktvif12 Transmit Televideo: F12 \n");
  12591. break;
  12592. case K_TVIF13 :
  12593. printf("\\Ktvif13 Transmit Televideo: F13 \n");
  12594. break;
  12595. case K_TVIF14 :
  12596. printf("\\Ktvif14 Transmit Televideo: F14 \n");
  12597. break;
  12598. case K_TVIF15 :
  12599. printf("\\Ktvif15 Transmit Televideo: F15 \n");
  12600. break;
  12601. case K_TVIF16 :
  12602. printf("\\Ktvif16 Transmit Televideo: F16 \n");
  12603. break;
  12604. /* Televideo Function Keys (shifted) */
  12605. case K_TVISF01 :
  12606. printf("\\Ktvisf01 Transmit Televideo: Shift-F1 \n");
  12607. break;
  12608. case K_TVISF02 :
  12609. printf("\\Ktvisf02 Transmit Televideo: Shift-F2 \n");
  12610. break;
  12611. case K_TVISF03 :
  12612. printf("\\Ktvisf03 Transmit Televideo: Shift-F3 \n");
  12613. break;
  12614. case K_TVISF04 :
  12615. printf("\\Ktvisf04 Transmit Televideo: Shift-F4 \n");
  12616. break;
  12617. case K_TVISF05 :
  12618. printf("\\Ktvisf05 Transmit Televideo: Shift-F5 \n");
  12619. break;
  12620. case K_TVISF06 :
  12621. printf("\\Ktvisf06 Transmit Televideo: Shift-F6 \n");
  12622. break;
  12623. case K_TVISF07 :
  12624. printf("\\Ktvisf07 Transmit Televideo: Shift-F7 \n");
  12625. break;
  12626. case K_TVISF08 :
  12627. printf("\\Ktvisf08 Transmit Televideo: Shift-F8 \n");
  12628. break;
  12629. case K_TVISF09 :
  12630. printf("\\Ktvisf09 Transmit Televideo: Shift-F9 \n");
  12631. break;
  12632. case K_TVISF10 :
  12633. printf("\\Ktvisf10 Transmit Televideo: Shift-F10\n");
  12634. break;
  12635. case K_TVISF11 :
  12636. printf("\\Ktvisf11 Transmit Televideo: Shift-F11\n");
  12637. break;
  12638. case K_TVISF12 :
  12639. printf("\\Ktvisf12 Transmit Televideo: Shift-F12\n");
  12640. break;
  12641. case K_TVISF13 :
  12642. printf("\\Ktvisf13 Transmit Televideo: Shift-F13\n");
  12643. break;
  12644. case K_TVISF14 :
  12645. printf("\\Ktvisf14 Transmit Televideo: Shift-F14\n");
  12646. break;
  12647. case K_TVISF15 :
  12648. printf("\\Ktvisf15 Transmit Televideo: Shift-F15\n");
  12649. break;
  12650. case K_TVISF16 :
  12651. printf("\\Ktvisf16 Transmit Televideo: Shift-F16\n");
  12652. break;
  12653. /* Televideo Edit and Special Keys */
  12654. case K_TVIBS :
  12655. printf("\\Ktvibs Transmit Televideo: Backspace \n");
  12656. break;
  12657. case K_TVICLRLN :
  12658. printf("\\Ktviclrln Transmit Televideo: Clear Line \n");
  12659. break;
  12660. case K_TVISCLRLN :
  12661. printf("\\Ktvisclrln Transmit Televideo: Shift-Clear Line\n");
  12662. break;
  12663. case K_TVICLRPG :
  12664. printf("\\Ktviclrpg Transmit Televideo: Clear Page \n");
  12665. break;
  12666. case K_TVISCLRPG :
  12667. printf("\\Ktvisclrpg Transmit Televideo: Shift-Clear Page\n");
  12668. break;
  12669. case K_TVIDELCHAR :
  12670. printf("\\Ktvidelchar Transmit Televideo: Delete Char \n");
  12671. break;
  12672. case K_TVIDELLN :
  12673. printf("\\Ktvidelln Transmit Televideo: Delete Line \n");
  12674. break;
  12675. case K_TVIENTER :
  12676. printf("\\Ktvienter Transmit Televideo: Enter \n");
  12677. break;
  12678. case K_TVIESC :
  12679. printf("\\Ktviesc Transmit Televideo: Esc \n");
  12680. break;
  12681. case K_TVIHOME :
  12682. printf("\\Ktvihome Transmit Televideo: Home \n");
  12683. break;
  12684. case K_TVISHOME :
  12685. printf("\\Ktvishome Transmit Televideo: Shift-Home \n");
  12686. break;
  12687. case K_TVIINSERT :
  12688. printf("\\Ktviinsert Transmit Televideo: Insert \n");
  12689. break;
  12690. case K_TVIINSCHAR :
  12691. printf("\\Ktviinschar Transmit Televideo: Insert Char \n");
  12692. break;
  12693. case K_TVIINSLN :
  12694. printf("\\Ktviinsln Transmit Televideo: Insert Line \n");
  12695. break;
  12696. case K_TVIPGNEXT :
  12697. printf("\\Ktvipgnext Transmit Televideo: Page Next \n");
  12698. break;
  12699. case K_TVIPGPREV :
  12700. printf("\\Ktvipgprev Transmit Televideo: Page Previous \n");
  12701. break;
  12702. case K_TVIREPLACE :
  12703. printf("\\Ktvireplace Transmit Televideo: Replace \n");
  12704. break;
  12705. case K_TVIRETURN :
  12706. printf("\\Ktvireturn Transmit Televideo: Return \n");
  12707. break;
  12708. case K_TVITAB :
  12709. printf("\\Ktvitab Transmit Televideo: Tab \n");
  12710. break;
  12711. case K_TVISTAB :
  12712. printf("\\Ktvistab Transmit Televideo: Shift-Tab \n");
  12713. break;
  12714. case K_TVIPRTSCN :
  12715. printf("\\Ktviprtscn Transmit Televideo: Print Screen \n");
  12716. break;
  12717. case K_TVISESC :
  12718. printf("\\Ktvisesc Transmit Televideo: Shift-Esc \n");
  12719. break;
  12720. case K_TVISBS :
  12721. printf("\\Ktvisbs Transmit Televideo: Shift-Backspace \n");
  12722. break;
  12723. case K_TVISENTER :
  12724. printf("\\Ktvisenter Transmit Televideo: Shift-Enter \n");
  12725. break;
  12726. case K_TVISRETURN :
  12727. printf("\\Ktvisreturn Transmit Televideo: Shift-Return \n");
  12728. break;
  12729. case K_TVIUPARR :
  12730. printf("\\Ktviuparr Transmit Televideo: Up Arrow \n");
  12731. break;
  12732. case K_TVIDNARR :
  12733. printf("\\Ktvidnarr Transmit Televideo: Down Arrow \n");
  12734. break;
  12735. case K_TVILFARR :
  12736. printf("\\Ktvilfarr Transmit Televideo: Left Arrow \n");
  12737. break;
  12738. case K_TVIRTARR :
  12739. printf("\\Ktvirtarr Transmit Televideo: Right Arrow \n");
  12740. break;
  12741. case K_TVISUPARR :
  12742. printf("\\Ktvisuparr Transmit Televideo: Shift-Up Arrow \n");
  12743. break;
  12744. case K_TVISDNARR :
  12745. printf("\\Ktvisdnarr Transmit Televideo: Shift-Down Arrow\n");
  12746. break;
  12747. case K_TVISLFARR :
  12748. printf("\\Ktvislfarr Transmit Televideo: Shift-Left Arrow\n");
  12749. break;
  12750. case K_TVISRTARR :
  12751. printf("\\Ktvisrtarr Transmit Televideo: Shift-Right Arrow\n");
  12752. break;
  12753. case K_TVISEND:
  12754. printf("\\Ktvisend Transmit Televideo: Send\n");
  12755. break;
  12756. case K_TVISSEND:
  12757. printf("\\Ktvissend Transmit Televideo: Shift-Send\n");
  12758. break;
  12759. /* HP Function and Edit keys */
  12760. case K_HPF01 :
  12761. printf("\\Khpf01 Transmit Hewlett-Packard: F1 \n");
  12762. break;
  12763. case K_HPF02 :
  12764. printf("\\Khpf02 Transmit Hewlett-Packard: F2 \n");
  12765. break;
  12766. case K_HPF03 :
  12767. printf("\\Khpf03 Transmit Hewlett-Packard: F3 \n");
  12768. break;
  12769. case K_HPF04 :
  12770. printf("\\Khpf04 Transmit Hewlett-Packard: F4 \n");
  12771. break;
  12772. case K_HPF05 :
  12773. printf("\\Khpf05 Transmit Hewlett-Packard: F5 \n");
  12774. break;
  12775. case K_HPF06 :
  12776. printf("\\Khpf06 Transmit Hewlett-Packard: F6 \n");
  12777. break;
  12778. case K_HPF07 :
  12779. printf("\\Khpf07 Transmit Hewlett-Packard: F7 \n");
  12780. break;
  12781. case K_HPF08 :
  12782. printf("\\Khpf08 Transmit Hewlett-Packard: F8 \n");
  12783. break;
  12784. case K_HPF09 :
  12785. printf("\\Khpf09 Transmit Hewlett-Packard: F9 \n");
  12786. break;
  12787. case K_HPF10 :
  12788. printf("\\Khpf10 Transmit Hewlett-Packard: F10 \n");
  12789. break;
  12790. case K_HPF11 :
  12791. printf("\\Khpf11 Transmit Hewlett-Packard: F11 \n");
  12792. break;
  12793. case K_HPF12 :
  12794. printf("\\Khpf12 Transmit Hewlett-Packard: F12 \n");
  12795. break;
  12796. case K_HPF13 :
  12797. printf("\\Khpf13 Transmit Hewlett-Packard: F13 \n");
  12798. break;
  12799. case K_HPF14 :
  12800. printf("\\Khpf14 Transmit Hewlett-Packard: F14 \n");
  12801. break;
  12802. case K_HPF15 :
  12803. printf("\\Khpf15 Transmit Hewlett-Packard: F15 \n");
  12804. break;
  12805. case K_HPF16 :
  12806. printf("\\Khpf16 Transmit Hewlett-Packard: F16 \n");
  12807. break;
  12808. case K_HPRETURN :
  12809. printf("\\Khpreturn Transmit Hewlett-Packard: Return\n");
  12810. break;
  12811. case K_HPENTER :
  12812. printf("\\Khpenter Transmit Hewlett-Packard: Enter (keypad)\n");
  12813. break;
  12814. case K_HPBACKTAB :
  12815. printf("\\Khpbacktab Transmit Hewlett-Packard: Back Tab\n");
  12816. break;
  12817. /* Siemens Nixdorf International 97801-5xx kverbs */
  12818. case K_SNI_DOUBLE_0 :
  12819. printf("\\Ksni_00 Transmit SNI-97801-5xx: Double-Zero\n");
  12820. break;
  12821. case K_SNI_C_DOUBLE_0 :
  12822. printf(
  12823. "\\Ksni_c_00 Transmit SNI-97801-5xx: Ctrl-Double-Zero\n");
  12824. break;
  12825. case K_SNI_C_CE :
  12826. printf("\\Ksni_c_ce Transmit SNI-97801-5xx: Ctrl-CE\n");
  12827. break;
  12828. case K_SNI_C_COMPOSE :
  12829. printf("\\Ksni_c_compose Transmit SNI-97801-5xx: Ctrl-Compose\n");
  12830. break;
  12831. case K_SNI_C_DELETE_CHAR :
  12832. printf(
  12833. "\\Ksni_c_del_char Transmit SNI-97801-5xx: Ctrl-Delete Char\n");
  12834. break;
  12835. case K_SNI_C_DELETE_LINE :
  12836. printf(
  12837. "\\Ksni_c_del_line Transmit SNI-97801-5xx: Ctrl-Delete Line\n");
  12838. break;
  12839. case K_SNI_C_DELETE_WORD :
  12840. printf(
  12841. "\\Ksni_c_del_word Transmit SNI-97801-5xx: Ctrl-Delete Word\n");
  12842. break;
  12843. case K_SNI_C_CURSOR_DOWN :
  12844. printf(
  12845. "\\Ksni_c_dnarr Transmit SNI-97801-5xx: Ctrl-Cursor Down\n");
  12846. break;
  12847. case K_SNI_C_ENDMARKE :
  12848. printf("\\Ksni_c_endmarke Transmit SNI-97801-5xx: Ctrl-End Marke\n");
  12849. break;
  12850. case K_SNI_C_F01 :
  12851. printf("\\Ksni_c_f01 Transmit SNI-97801-5xx: Ctrl-F1\n");
  12852. break;
  12853. case K_SNI_C_F02 :
  12854. printf("\\Ksni_c_f02 Transmit SNI-97801-5xx: Ctrl-F2\n");
  12855. break;
  12856. case K_SNI_C_F03 :
  12857. printf("\\Ksni_c_f03 Transmit SNI-97801-5xx: Ctrl-F3\n");
  12858. break;
  12859. case K_SNI_C_F04 :
  12860. printf("\\Ksni_c_f04 Transmit SNI-97801-5xx: Ctrl-F4\n");
  12861. break;
  12862. case K_SNI_C_F05 :
  12863. printf("\\Ksni_c_f05 Transmit SNI-97801-5xx: Ctrl-F5\n");
  12864. break;
  12865. case K_SNI_C_F06 :
  12866. printf("\\Ksni_c_f06 Transmit SNI-97801-5xx: Ctrl-F6\n");
  12867. break;
  12868. case K_SNI_C_F07 :
  12869. printf("\\Ksni_c_f07 Transmit SNI-97801-5xx: Ctrl-F7\n");
  12870. break;
  12871. case K_SNI_C_F08 :
  12872. printf("\\Ksni_c_f08 Transmit SNI-97801-5xx: Ctrl-F8\n");
  12873. break;
  12874. case K_SNI_C_F09 :
  12875. printf("\\Ksni_c_f09 Transmit SNI-97801-5xx: Ctrl-F9\n");
  12876. break;
  12877. case K_SNI_C_F10 :
  12878. printf("\\Ksni_c_f10 Transmit SNI-97801-5xx: Ctrl-F10\n");
  12879. break;
  12880. case K_SNI_C_F11 :
  12881. printf("\\Ksni_c_f11 Transmit SNI-97801-5xx: Ctrl-F11\n");
  12882. break;
  12883. case K_SNI_C_F12 :
  12884. printf("\\Ksni_c_f12 Transmit SNI-97801-5xx: Ctrl-F12\n");
  12885. break;
  12886. case K_SNI_C_F13 :
  12887. printf("\\Ksni_c_f13 Transmit SNI-97801-5xx: Ctrl-F13\n");
  12888. break;
  12889. case K_SNI_C_F14 :
  12890. printf("\\Ksni_c_f14 Transmit SNI-97801-5xx: Ctrl-F14\n");
  12891. break;
  12892. case K_SNI_C_F15 :
  12893. printf("\\Ksni_c_f15 Transmit SNI-97801-5xx: Ctrl-F15\n");
  12894. break;
  12895. case K_SNI_C_F16 :
  12896. printf("\\Ksni_c_f16 Transmit SNI-97801-5xx: Ctrl-F16\n");
  12897. break;
  12898. case K_SNI_C_F17 :
  12899. printf("\\Ksni_c_f17 Transmit SNI-97801-5xx: Ctrl-F17\n");
  12900. break;
  12901. case K_SNI_C_F18 :
  12902. printf("\\Ksni_c_f18 Transmit SNI-97801-5xx: Ctrl-F18\n");
  12903. break;
  12904. case K_SNI_C_USER1 :
  12905. printf(
  12906. "\\Ksni_c_user1 Transmit SNI-97801-5xx: Ctrl-Key below F18\n");
  12907. break;
  12908. case K_SNI_C_F19 :
  12909. printf("\\Ksni_c_f19 Transmit SNI-97801-5xx: Ctrl-F19\n");
  12910. break;
  12911. case K_SNI_C_USER2 :
  12912. printf(
  12913. "\\Ksni_c_user2 Transmit SNI-97801-5xx: Ctrl-Key below F19\n");
  12914. break;
  12915. case K_SNI_C_F20 :
  12916. printf("\\Ksni_c_f20 Transmit SNI-97801-5xx: Ctrl-F20\n");
  12917. break;
  12918. case K_SNI_C_USER3 :
  12919. printf(
  12920. "\\Ksni_c_user3 Transmit SNI-97801-5xx: Ctrl-Key below F20\n");
  12921. break;
  12922. case K_SNI_C_F21 :
  12923. printf("\\Ksni_c_f21 Transmit SNI-97801-5xx: Ctrl-F21\n");
  12924. break;
  12925. case K_SNI_C_USER4 :
  12926. printf(
  12927. "\\Ksni_c_user4 Transmit SNI-97801-5xx: Ctrl-Key below F21\n");
  12928. break;
  12929. case K_SNI_C_F22 :
  12930. printf("\\Ksni_c_f22 Transmit SNI-97801-5xx: Ctrl-F22\n");
  12931. break;
  12932. case K_SNI_C_USER5 :
  12933. printf(
  12934. "\\Ksni_c_user5 Transmit SNI-97801-5xx: Ctrl-Key below F22\n");
  12935. break;
  12936. case K_SNI_C_HELP :
  12937. printf("\\Ksni_c_help Transmit SNI-97801-5xx: Ctrl-Help\n");
  12938. break;
  12939. case K_SNI_C_HOME :
  12940. printf("\\Ksni_c_home Transmit SNI-97801-5xx: Ctrl-Home\n");
  12941. break;
  12942. case K_SNI_C_INSERT_CHAR :
  12943. printf(
  12944. "\\Ksni_c_ins_char Transmit SNI-97801-5xx: Ctrl-Insert Char\n");
  12945. break;
  12946. case K_SNI_C_INSERT_LINE :
  12947. printf(
  12948. "\\Ksni_c_ins_line Transmit SNI-97801-5xx: Ctrl-Insert Line\n");
  12949. break;
  12950. case K_SNI_C_INSERT_WORD :
  12951. printf(
  12952. "\\Ksni_c_ins_word Transmit SNI-97801-5xx: Ctrl-Insert Word\n");
  12953. break;
  12954. case K_SNI_C_LEFT_TAB :
  12955. printf("\\Ksni_c_left_tab Transmit SNI-97801-5xx: Ctrl-Left Tab\n");
  12956. break;
  12957. case K_SNI_C_CURSOR_LEFT :
  12958. printf(
  12959. "\\Ksni_c_lfarr Transmit SNI-97801-5xx: Ctrl-Cursor Left\n");
  12960. break;
  12961. case K_SNI_C_MODE :
  12962. printf("\\Ksni_c_mode Transmit SNI-97801-5xx: Ctrl-Mode\n");
  12963. break;
  12964. case K_SNI_C_PAGE :
  12965. printf("\\Ksni_c_page Transmit SNI-97801-5xx: Ctrl-Page\n");
  12966. break;
  12967. case K_SNI_C_PRINT :
  12968. printf("\\Ksni_c_print Transmit SNI-97801-5xx: Ctrl-Print\n");
  12969. break;
  12970. case K_SNI_C_CURSOR_RIGHT:
  12971. printf(
  12972. "\\Ksni_c_rtarr Transmit SNI-97801-5xx: Ctrl-Cursor Right\n");
  12973. break;
  12974. case K_SNI_C_SCROLL_DOWN :
  12975. printf(
  12976. "\\Ksni_c_scroll_dn Transmit SNI-97801-5xx: Ctrl-Scroll Down\n");
  12977. break;
  12978. case K_SNI_C_SCROLL_UP :
  12979. printf("\\Ksni_c_scroll_up Transmit SNI-97801-5xx: Ctrl-Scroll Up\n");
  12980. break;
  12981. case K_SNI_C_START :
  12982. printf("\\Ksni_c_start Transmit SNI-97801-5xx: Ctrl-Start\n");
  12983. break;
  12984. case K_SNI_C_CURSOR_UP :
  12985. printf("\\Ksni_c_uparr Transmit SNI-97801-5xx: Ctrl-Cursor Up\n");
  12986. break;
  12987. case K_SNI_C_TAB :
  12988. printf("\\Ksni_c_tab Transmit SNI-97801-5xx: Ctrl-Tab\n");
  12989. break;
  12990. case K_SNI_CE :
  12991. printf("\\Ksni_ce Transmit SNI-97801-5xx: CE\n");
  12992. break;
  12993. case K_SNI_CH_CODE:
  12994. printf("\\Ksni_ch_code Toggle SNI-97801-5xx: CH.CODE function.\n");
  12995. break;
  12996. case K_SNI_COMPOSE :
  12997. printf("\\Ksni_compose Transmit SNI-97801-5xx: Compose\n");
  12998. break;
  12999. case K_SNI_DELETE_CHAR :
  13000. printf("\\Ksni_del_char Transmit SNI-97801-5xx: Delete Char\n");
  13001. break;
  13002. case K_SNI_DELETE_LINE :
  13003. printf("\\Ksni_del_line Transmit SNI-97801-5xx: Delete Line\n");
  13004. break;
  13005. case K_SNI_DELETE_WORD :
  13006. printf("\\Ksni_del_word Transmit SNI-97801-5xx: Delete Word\n");
  13007. break;
  13008. case K_SNI_CURSOR_DOWN :
  13009. printf("\\Ksni_dnarr Transmit SNI-97801-5xx: Cursor Down\n");
  13010. break;
  13011. case K_SNI_ENDMARKE :
  13012. printf("\\Ksni_endmarke Transmit SNI-97801-5xx: End Marke\n");
  13013. break;
  13014. case K_SNI_F01 :
  13015. printf("\\Ksni_f01 Transmit SNI-97801-5xx: F1\n");
  13016. break;
  13017. case K_SNI_F02 :
  13018. printf("\\Ksni_f02 Transmit SNI-97801-5xx: F2\n");
  13019. break;
  13020. case K_SNI_F03 :
  13021. printf("\\Ksni_f03 Transmit SNI-97801-5xx: F3\n");
  13022. break;
  13023. case K_SNI_F04 :
  13024. printf("\\Ksni_f04 Transmit SNI-97801-5xx: F4\n");
  13025. break;
  13026. case K_SNI_F05 :
  13027. printf("\\Ksni_f05 Transmit SNI-97801-5xx: F5\n");
  13028. break;
  13029. case K_SNI_F06 :
  13030. printf("\\Ksni_f06 Transmit SNI-97801-5xx: F6\n");
  13031. break;
  13032. case K_SNI_F07 :
  13033. printf("\\Ksni_f07 Transmit SNI-97801-5xx: F7\n");
  13034. break;
  13035. case K_SNI_F08 :
  13036. printf("\\Ksni_f08 Transmit SNI-97801-5xx: F8\n");
  13037. break;
  13038. case K_SNI_F09 :
  13039. printf("\\Ksni_f09 Transmit SNI-97801-5xx: F9\n");
  13040. break;
  13041. case K_SNI_F10 :
  13042. printf("\\Ksni_f10 Transmit SNI-97801-5xx: F10\n");
  13043. break;
  13044. case K_SNI_F11 :
  13045. printf("\\Ksni_f11 Transmit SNI-97801-5xx: F11\n");
  13046. break;
  13047. case K_SNI_F12 :
  13048. printf("\\Ksni_f12 Transmit SNI-97801-5xx: F12\n");
  13049. break;
  13050. case K_SNI_F13 :
  13051. printf("\\Ksni_f13 Transmit SNI-97801-5xx: F13\n");
  13052. break;
  13053. case K_SNI_F14 :
  13054. printf("\\Ksni_f14 Transmit SNI-97801-5xx: F14\n");
  13055. break;
  13056. case K_SNI_F15 :
  13057. printf("\\Ksni_f15 Transmit SNI-97801-5xx: F15\n");
  13058. break;
  13059. case K_SNI_F16 :
  13060. printf("\\Ksni_f16 Transmit SNI-97801-5xx: F16\n");
  13061. break;
  13062. case K_SNI_F17 :
  13063. printf("\\Ksni_f17 Transmit SNI-97801-5xx: F17\n");
  13064. break;
  13065. case K_SNI_F18 :
  13066. printf("\\Ksni_f18 Transmit SNI-97801-5xx: F18\n");
  13067. break;
  13068. case K_SNI_USER1 :
  13069. printf("\\Ksni_user1 Transmit SNI-97801-5xx: Key below F18\n");
  13070. break;
  13071. case K_SNI_F19 :
  13072. printf("\\Ksni_f19 Transmit SNI-97801-5xx: F19\n");
  13073. break;
  13074. case K_SNI_USER2 :
  13075. printf("\\Ksni_user2 Transmit SNI-97801-5xx: Key below F19\n");
  13076. break;
  13077. case K_SNI_F20 :
  13078. printf("\\Ksni_f20 Transmit SNI-97801-5xx: F20\n");
  13079. break;
  13080. case K_SNI_USER3 :
  13081. printf("\\Ksni_user3 Transmit SNI-97801-5xx: Key below F20\n");
  13082. break;
  13083. case K_SNI_F21 :
  13084. printf("\\Ksni_f21 Transmit SNI-97801-5xx: F21\n");
  13085. break;
  13086. case K_SNI_USER4 :
  13087. printf("\\Ksni_user4 Transmit SNI-97801-5xx: Key below F21\n");
  13088. break;
  13089. case K_SNI_F22 :
  13090. printf("\\Ksni_f22 Transmit SNI-97801-5xx: F22\n");
  13091. break;
  13092. case K_SNI_USER5 :
  13093. printf("\\Ksni_user5 Transmit SNI-97801-5xx: Key below F22\n");
  13094. break;
  13095. case K_SNI_HELP :
  13096. printf("\\Ksni_help Transmit SNI-97801-5xx: Help\n");
  13097. break;
  13098. case K_SNI_HOME :
  13099. printf("\\Ksni_home Transmit SNI-97801-5xx: Home\n");
  13100. break;
  13101. case K_SNI_INSERT_CHAR :
  13102. printf("\\Ksni_ins_char Transmit SNI-97801-5xx: Insert Char\n");
  13103. break;
  13104. case K_SNI_INSERT_LINE :
  13105. printf("\\Ksni_ins_line Transmit SNI-97801-5xx: Insert Line\n");
  13106. break;
  13107. case K_SNI_INSERT_WORD :
  13108. printf("\\Ksni_ins_word Transmit SNI-97801-5xx: Insert Word\n");
  13109. break;
  13110. case K_SNI_LEFT_TAB :
  13111. printf("\\Ksni_left_tab Transmit SNI-97801-5xx: Left Tab\n");
  13112. break;
  13113. case K_SNI_CURSOR_LEFT :
  13114. printf("\\Ksni_lfarr Transmit SNI-97801-5xx: Cursor Left\n");
  13115. break;
  13116. case K_SNI_MODE :
  13117. printf("\\Ksni_mode Transmit SNI-97801-5xx: Mode\n");
  13118. break;
  13119. case K_SNI_PAGE :
  13120. printf("\\Ksni_page Transmit SNI-97801-5xx: Page\n");
  13121. break;
  13122. case K_SNI_PRINT :
  13123. printf("\\Ksni_print Transmit SNI-97801-5xx: Print\n");
  13124. break;
  13125. case K_SNI_CURSOR_RIGHT :
  13126. printf("\\Ksni_rtarr Transmit SNI-97801-5xx: Cursor Right\n");
  13127. break;
  13128. case K_SNI_S_DOUBLE_0 :
  13129. printf(
  13130. "\\Ksni_s_00 Transmit SNI-97801-5xx: Shift-Double-Zero\n");
  13131. break;
  13132. case K_SNI_S_CE :
  13133. printf("\\Ksni_s_ce Transmit SNI-97801-5xx: Shift-CE\n");
  13134. break;
  13135. case K_SNI_S_COMPOSE :
  13136. printf("\\Ksni_s_compose Transmit SNI-97801-5xx: Shift-Compose\n");
  13137. break;
  13138. case K_SNI_S_DELETE_CHAR :
  13139. printf(
  13140. "\\Ksni_s_del_char Transmit SNI-97801-5xx: Shift-Delete Char\n");
  13141. break;
  13142. case K_SNI_S_DELETE_LINE :
  13143. printf(
  13144. "\\Ksni_s_del_line Transmit SNI-97801-5xx: Shift-Delete Line\n");
  13145. break;
  13146. case K_SNI_S_DELETE_WORD :
  13147. printf(
  13148. "\\Ksni_s_del_word Transmit SNI-97801-5xx: Shift-Delete Word\n");
  13149. break;
  13150. case K_SNI_S_CURSOR_DOWN :
  13151. printf(
  13152. "\\Ksni_s_dnarr Transmit SNI-97801-5xx: Shift-Cursor Down\n");
  13153. break;
  13154. case K_SNI_S_ENDMARKE :
  13155. printf("\\Ksni_s_endmarke Transmit SNI-97801-5xx: Shift-End Marke\n");
  13156. break;
  13157. case K_SNI_S_F01 :
  13158. printf("\\Ksni_s_f01 Transmit SNI-97801-5xx: Shift-F1\n");
  13159. break;
  13160. case K_SNI_S_F02 :
  13161. printf("\\Ksni_s_f02 Transmit SNI-97801-5xx: Shift-F2\n");
  13162. break;
  13163. case K_SNI_S_F03 :
  13164. printf("\\Ksni_s_f03 Transmit SNI-97801-5xx: Shift-F3\n");
  13165. break;
  13166. case K_SNI_S_F04 :
  13167. printf("\\Ksni_s_f04 Transmit SNI-97801-5xx: Shift-F4\n");
  13168. break;
  13169. case K_SNI_S_F05 :
  13170. printf("\\Ksni_s_f05 Transmit SNI-97801-5xx: Shift-F5\n");
  13171. break;
  13172. case K_SNI_S_F06 :
  13173. printf("\\Ksni_s_f06 Transmit SNI-97801-5xx: Shift-F6\n");
  13174. break;
  13175. case K_SNI_S_F07 :
  13176. printf("\\Ksni_s_f07 Transmit SNI-97801-5xx: Shift-F7\n");
  13177. break;
  13178. case K_SNI_S_F08 :
  13179. printf("\\Ksni_s_f08 Transmit SNI-97801-5xx: Shift-F8\n");
  13180. break;
  13181. case K_SNI_S_F09 :
  13182. printf("\\Ksni_s_f09 Transmit SNI-97801-5xx: Shift-F9\n");
  13183. break;
  13184. case K_SNI_S_F10 :
  13185. printf("\\Ksni_s_f10 Transmit SNI-97801-5xx: Shift-F10\n");
  13186. break;
  13187. case K_SNI_S_F11 :
  13188. printf("\\Ksni_s_f11 Transmit SNI-97801-5xx: Shift-F11\n");
  13189. break;
  13190. case K_SNI_S_F12 :
  13191. printf("\\Ksni_s_f12 Transmit SNI-97801-5xx: Shift-F12\n");
  13192. break;
  13193. case K_SNI_S_F13 :
  13194. printf("\\Ksni_s_f13 Transmit SNI-97801-5xx: Shift-F13\n");
  13195. break;
  13196. case K_SNI_S_F14 :
  13197. printf("\\Ksni_s_f14 Transmit SNI-97801-5xx: Shift-F14\n");
  13198. break;
  13199. case K_SNI_S_F15 :
  13200. printf("\\Ksni_s_f15 Transmit SNI-97801-5xx: Shift-F15\n");
  13201. break;
  13202. case K_SNI_S_F16 :
  13203. printf("\\Ksni_s_f16 Transmit SNI-97801-5xx: Shift-F16\n");
  13204. break;
  13205. case K_SNI_S_F17 :
  13206. printf("\\Ksni_s_f17 Transmit SNI-97801-5xx: Shift-F17\n");
  13207. break;
  13208. case K_SNI_S_F18 :
  13209. printf("\\Ksni_s_f18 Transmit SNI-97801-5xx: Shift-F18\n");
  13210. break;
  13211. case K_SNI_S_USER1 :
  13212. printf(
  13213. "\\Ksni_s_user1 Transmit SNI-97801-5xx: Shift-Key below F18\n");
  13214. break;
  13215. case K_SNI_S_F19 :
  13216. printf("\\Ksni_s_f19 Transmit SNI-97801-5xx: Shift-F19\n");
  13217. break;
  13218. case K_SNI_S_USER2 :
  13219. printf(
  13220. "\\Ksni_s_user2 Transmit SNI-97801-5xx: Shift-Key below F19\n");
  13221. break;
  13222. case K_SNI_S_F20 :
  13223. printf("\\Ksni_s_f20 Transmit SNI-97801-5xx: Shift-F20\n");
  13224. break;
  13225. case K_SNI_S_USER3 :
  13226. printf(
  13227. "\\Ksni_s_user3 Transmit SNI-97801-5xx: Shift-Key below F20\n");
  13228. break;
  13229. case K_SNI_S_F21 :
  13230. printf("\\Ksni_s_f21 Transmit SNI-97801-5xx: Shift-F21\n");
  13231. break;
  13232. case K_SNI_S_USER4 :
  13233. printf(
  13234. "\\Ksni_s_user4 Transmit SNI-97801-5xx: Shift-Key below F21\n");
  13235. break;
  13236. case K_SNI_S_F22 :
  13237. printf("\\Ksni_s_f22 Transmit SNI-97801-5xx: Shift-F22\n");
  13238. break;
  13239. case K_SNI_S_USER5 :
  13240. printf(
  13241. "\\Ksni_s_user5 Transmit SNI-97801-5xx: Shift-Key below F22\n");
  13242. break;
  13243. case K_SNI_S_HELP :
  13244. printf("\\Ksni_s_help Transmit SNI-97801-5xx: Shift-Help\n");
  13245. break;
  13246. case K_SNI_S_HOME :
  13247. printf("\\Ksni_s_home Transmit SNI-97801-5xx: Shift-Home\n");
  13248. break;
  13249. case K_SNI_S_INSERT_CHAR :
  13250. printf(
  13251. "\\Ksni_s_ins_char Transmit SNI-97801-5xx: Shift-Insert Char\n");
  13252. break;
  13253. case K_SNI_S_INSERT_LINE :
  13254. printf(
  13255. "\\Ksni_s_ins_line Transmit SNI-97801-5xx: Shift-Insert Line\n");
  13256. break;
  13257. case K_SNI_S_INSERT_WORD :
  13258. printf(
  13259. "\\Ksni_s_ins_word Transmit SNI-97801-5xx: Shift-Insert Word\n");
  13260. break;
  13261. case K_SNI_S_LEFT_TAB :
  13262. printf("\\Ksni_s_left_tab Transmit SNI-97801-5xx: Shift-Left Tab\n");
  13263. break;
  13264. case K_SNI_S_CURSOR_LEFT :
  13265. printf(
  13266. "\\Ksni_s_lfarr Transmit SNI-97801-5xx: Shift-Cursor Left\n");
  13267. break;
  13268. case K_SNI_S_MODE :
  13269. printf("\\Ksni_s_mode Transmit SNI-97801-5xx: Shift-Mode\n");
  13270. break;
  13271. case K_SNI_S_PAGE :
  13272. printf("\\Ksni_s_page Transmit SNI-97801-5xx: Shift-Page\n");
  13273. break;
  13274. case K_SNI_S_PRINT :
  13275. printf("\\Ksni_s_print Transmit SNI-97801-5xx: Shift-Print\n");
  13276. break;
  13277. case K_SNI_S_CURSOR_RIGHT:
  13278. printf(
  13279. "\\Ksni_s_rtarr Transmit SNI-97801-5xx: Shift-Cursor Right\n");
  13280. break;
  13281. case K_SNI_S_SCROLL_DOWN :
  13282. printf(
  13283. "\\Ksni_s_scroll_dn Transmit SNI-97801-5xx: Shift-Scroll Down\n");
  13284. break;
  13285. case K_SNI_S_SCROLL_UP :
  13286. printf("\\Ksni_s_scroll_up Transmit SNI-97801-5xx: Shift-Scroll Up\n");
  13287. break;
  13288. case K_SNI_S_START :
  13289. printf("\\Ksni_s_start Transmit SNI-97801-5xx: Shift-Start\n");
  13290. break;
  13291. case K_SNI_S_CURSOR_UP :
  13292. printf("\\Ksni_s_uparr Transmit SNI-97801-5xx: Shift-Cursor Up\n");
  13293. break;
  13294. case K_SNI_S_TAB :
  13295. printf("\\Ksni_s_tab Transmit SNI-97801-5xx: Shift-Tab\n");
  13296. break;
  13297. case K_SNI_SCROLL_DOWN :
  13298. printf("\\Ksni_scroll_dn Transmit SNI-97801-5xx: Scroll Down\n");
  13299. break;
  13300. case K_SNI_SCROLL_UP :
  13301. printf("\\Ksni_scroll_up Transmit SNI-97801-5xx: Scroll Up\n");
  13302. break;
  13303. case K_SNI_START :
  13304. printf("\\Ksni_start Transmit SNI-97801-5xx: Start\n");
  13305. break;
  13306. case K_SNI_TAB :
  13307. printf("\\Ksni_tab Transmit SNI-97801-5xx: Tab\n");
  13308. break;
  13309. case K_SNI_CURSOR_UP :
  13310. printf("\\Ksni_uparr Transmit SNI-97801-5xx: Cursor Up\n");
  13311. break;
  13312. case K_BA80_ATTR:
  13313. printf("\\Kba80_attr Transmit BA80: Attr\n");
  13314. break;
  13315. case K_BA80_C_KEY:
  13316. printf("\\Kba80_c_key Transmit BA80: C\n");
  13317. break;
  13318. case K_BA80_CLEAR:
  13319. printf("\\Kba80_clear Transmit BA80: Clear\n");
  13320. break;
  13321. case K_BA80_CMD:
  13322. printf("\\Kba80_cmd Transmit BA80: Cmd\n");
  13323. break;
  13324. case K_BA80_COPY:
  13325. printf("\\Kba80_copy Transmit BA80: Copy\n");
  13326. break;
  13327. case K_BA80_DEL:
  13328. printf("\\Kba80_del Transmit BA80: Delete\n");
  13329. break;
  13330. case K_BA80_DEL_B:
  13331. printf("\\Kba80_del_b Transmit BA80: Delete B\n");
  13332. break;
  13333. case K_BA80_DO:
  13334. printf("\\Kba80_do Transmit BA80: Do\n");
  13335. break;
  13336. case K_BA80_END:
  13337. printf("\\Kba80_end Transmit BA80: End\n");
  13338. break;
  13339. case K_BA80_ENV:
  13340. printf("\\Kba80_env Transmit BA80: Env\n");
  13341. break;
  13342. case K_BA80_EOP:
  13343. printf("\\Kba80_eop Transmit BA80: EOP\n");
  13344. break;
  13345. case K_BA80_ERASE:
  13346. printf("\\Kba80_erase Transmit BA80: Erase\n");
  13347. break;
  13348. case K_BA80_FMT:
  13349. printf("\\Kba80_fmt Transmit BA80: Format\n");
  13350. break;
  13351. case K_BA80_HELP:
  13352. printf("\\Kba80_help Transmit BA80: Help\n");
  13353. break;
  13354. case K_BA80_HOME:
  13355. printf("\\Kba80_home Transmit BA80: Home\n");
  13356. break;
  13357. case K_BA80_INS:
  13358. printf("\\Kba80_ins Transmit BA80: Insert\n");
  13359. break;
  13360. case K_BA80_INS_B:
  13361. printf("\\Kba80_ins_b Transmit BA80: Insert B\n");
  13362. break;
  13363. case K_BA80_MARK:
  13364. printf("\\Kba80_mark Transmit BA80: Mark\n");
  13365. break;
  13366. case K_BA80_MOVE:
  13367. printf("\\Kba80_move Transmit BA80: Move\n");
  13368. break;
  13369. case K_BA80_PA01:
  13370. printf("\\Kba80_pa01 Transmit BA80: PA1\n");
  13371. break;
  13372. case K_BA80_PA02:
  13373. printf("\\Kba80_pa02 Transmit BA80: PA2\n");
  13374. break;
  13375. case K_BA80_PA03:
  13376. printf("\\Kba80_pa03 Transmit BA80: PA3\n");
  13377. break;
  13378. case K_BA80_PA04:
  13379. printf("\\Kba80_pa04 Transmit BA80: PA4\n");
  13380. break;
  13381. case K_BA80_PA05:
  13382. printf("\\Kba80_pa05 Transmit BA80: PA5\n");
  13383. break;
  13384. case K_BA80_PA06:
  13385. printf("\\Kba80_pa06 Transmit BA80: PA6\n");
  13386. break;
  13387. case K_BA80_PA07:
  13388. printf("\\Kba80_pa07 Transmit BA80: PA7\n");
  13389. break;
  13390. case K_BA80_PA08:
  13391. printf("\\Kba80_pa08 Transmit BA80: PA8\n");
  13392. break;
  13393. case K_BA80_PA09:
  13394. printf("\\Kba80_pa09 Transmit BA80: PA9\n");
  13395. break;
  13396. case K_BA80_PA10:
  13397. printf("\\Kba80_pa10 Transmit BA80: PA10\n");
  13398. break;
  13399. case K_BA80_PA11:
  13400. printf("\\Kba80_pa11 Transmit BA80: PA11\n");
  13401. break;
  13402. case K_BA80_PA12:
  13403. printf("\\Kba80_pa12 Transmit BA80: PA12\n");
  13404. break;
  13405. case K_BA80_PA13:
  13406. printf("\\Kba80_pa13 Transmit BA80: PA13\n");
  13407. break;
  13408. case K_BA80_PA14:
  13409. printf("\\Kba80_pa14 Transmit BA80: PA14\n");
  13410. break;
  13411. case K_BA80_PA15:
  13412. printf("\\Kba80_pa15 Transmit BA80: PA15\n");
  13413. break;
  13414. case K_BA80_PA16:
  13415. printf("\\Kba80_pa16 Transmit BA80: PA16\n");
  13416. break;
  13417. case K_BA80_PA17:
  13418. printf("\\Kba80_pa17 Transmit BA80: PA17\n");
  13419. break;
  13420. case K_BA80_PA18:
  13421. printf("\\Kba80_pa18 Transmit BA80: PA18\n");
  13422. break;
  13423. case K_BA80_PA19:
  13424. printf("\\Kba80_pa19 Transmit BA80: PA19\n");
  13425. break;
  13426. case K_BA80_PA20:
  13427. printf("\\Kba80_pa20 Transmit BA80: PA20\n");
  13428. break;
  13429. case K_BA80_PA21:
  13430. printf("\\Kba80_pa21 Transmit BA80: PA21\n");
  13431. break;
  13432. case K_BA80_PA22:
  13433. printf("\\Kba80_pa22 Transmit BA80: PA22\n");
  13434. break;
  13435. case K_BA80_PA23:
  13436. printf("\\Kba80_pa23 Transmit BA80: PA23\n");
  13437. break;
  13438. case K_BA80_PA24:
  13439. printf("\\Kba80_pa24 Transmit BA80: PA24\n");
  13440. break;
  13441. case K_BA80_PGDN:
  13442. printf("\\Kba80_pgdn Transmit BA80: Page Down\n");
  13443. break;
  13444. case K_BA80_PGUP:
  13445. printf("\\Kba80_pgup Transmit BA80: Page Up\n");
  13446. break;
  13447. case K_BA80_PICK:
  13448. printf("\\Kba80_pick Transmit BA80: Pick\n");
  13449. break;
  13450. case K_BA80_PRINT:
  13451. printf("\\Kba80_print Transmit BA80: Print\n");
  13452. break;
  13453. case K_BA80_PUT:
  13454. printf("\\Kba80_put Transmit BA80: Put\n");
  13455. break;
  13456. case K_BA80_REFRESH:
  13457. printf("\\Kba80_refresh Transmit BA80: Refresh \n");
  13458. break;
  13459. case K_BA80_RESET:
  13460. printf("\\Kba80_reset Transmit BA80: Reset\n");
  13461. break;
  13462. case K_BA80_RUBOUT:
  13463. printf("\\Kba80_rubout Transmit BA80: Rubout\n");
  13464. break;
  13465. case K_BA80_SAVE:
  13466. printf("\\Kba80_save Transmit BA80: Save\n");
  13467. break;
  13468. case K_BA80_SOFTKEY1:
  13469. printf("\\Kba80_softkey1 Transmit BA80: Softkey 1\n");
  13470. break;
  13471. case K_BA80_SOFTKEY2:
  13472. printf("\\Kba80_softkey2 Transmit BA80: Softkey 2\n");
  13473. break;
  13474. case K_BA80_SOFTKEY3:
  13475. printf("\\Kba80_softkey3 Transmit BA80: Softkey 3\n");
  13476. break;
  13477. case K_BA80_SOFTKEY4:
  13478. printf("\\Kba80_softkey4 Transmit BA80: Softkey 4\n");
  13479. break;
  13480. case K_BA80_SOFTKEY5:
  13481. printf("\\Kba80_softkey5 Transmit BA80: Softkey 5\n");
  13482. break;
  13483. case K_BA80_SOFTKEY6:
  13484. printf("\\Kba80_softkey6 Transmit BA80: Softkey 6\n");
  13485. break;
  13486. case K_BA80_SOFTKEY7:
  13487. printf("\\Kba80_softkey7 Transmit BA80: Softkey 7\n");
  13488. break;
  13489. case K_BA80_SOFTKEY8:
  13490. printf("\\Kba80_softkey8 Transmit BA80: Softkey 8\n");
  13491. break;
  13492. case K_BA80_SOFTKEY9:
  13493. printf("\\Kba80_softkey9 Transmit BA80: Softkey 9\n");
  13494. break;
  13495. case K_BA80_UNDO:
  13496. printf("\\Kba80_undo Transmit BA80: Undo\n");
  13497. break;
  13498. case K_I31_F01:
  13499. printf("\\Ki31_f01 Transmit IBM 31xx: F1\n");
  13500. break;
  13501. case K_I31_F02:
  13502. printf("\\Ki31_f02 Transmit IBM 31xx: F2\n");
  13503. break;
  13504. case K_I31_F03:
  13505. printf("\\Ki31_f03 Transmit IBM 31xx: F3\n");
  13506. break;
  13507. case K_I31_F04:
  13508. printf("\\Ki31_f04 Transmit IBM 31xx: F4\n");
  13509. break;
  13510. case K_I31_F05:
  13511. printf("\\Ki31_f05 Transmit IBM 31xx: F5\n");
  13512. break;
  13513. case K_I31_F06:
  13514. printf("\\Ki31_f06 Transmit IBM 31xx: F6\n");
  13515. break;
  13516. case K_I31_F07:
  13517. printf("\\Ki31_f07 Transmit IBM 31xx: F7\n");
  13518. break;
  13519. case K_I31_F08:
  13520. printf("\\Ki31_f08 Transmit IBM 31xx: F8\n");
  13521. break;
  13522. case K_I31_F09:
  13523. printf("\\Ki31_f09 Transmit IBM 31xx: F9\n");
  13524. break;
  13525. case K_I31_F10:
  13526. printf("\\Ki31_f10 Transmit IBM 31xx: F10\n");
  13527. break;
  13528. case K_I31_F11:
  13529. printf("\\Ki31_f11 Transmit IBM 31xx: F11\n");
  13530. break;
  13531. case K_I31_F12:
  13532. printf("\\Ki31_f12 Transmit IBM 31xx: F12\n");
  13533. break;
  13534. case K_I31_F13:
  13535. printf("\\Ki31_f13 Transmit IBM 31xx: F13\n");
  13536. break;
  13537. case K_I31_F14:
  13538. printf("\\Ki31_f14 Transmit IBM 31xx: F14\n");
  13539. break;
  13540. case K_I31_F15:
  13541. printf("\\Ki31_f15 Transmit IBM 31xx: F15\n");
  13542. break;
  13543. case K_I31_F16:
  13544. printf("\\Ki31_f16 Transmit IBM 31xx: F16\n");
  13545. break;
  13546. case K_I31_F17:
  13547. printf("\\Ki31_f17 Transmit IBM 31xx: F17\n");
  13548. break;
  13549. case K_I31_F18:
  13550. printf("\\Ki31_f18 Transmit IBM 31xx: F18\n");
  13551. break;
  13552. case K_I31_F19:
  13553. printf("\\Ki31_f19 Transmit IBM 31xx: F19\n");
  13554. break;
  13555. case K_I31_F20:
  13556. printf("\\Ki31_f20 Transmit IBM 31xx: F20\n");
  13557. break;
  13558. case K_I31_F21:
  13559. printf("\\Ki31_f21 Transmit IBM 31xx: F21\n");
  13560. break;
  13561. case K_I31_F22:
  13562. printf("\\Ki31_f22 Transmit IBM 31xx: F22\n");
  13563. break;
  13564. case K_I31_F23:
  13565. printf("\\Ki31_f23 Transmit IBM 31xx: F23\n");
  13566. break;
  13567. case K_I31_F24:
  13568. printf("\\Ki31_f24 Transmit IBM 31xx: F24\n");
  13569. break;
  13570. case K_I31_F25:
  13571. printf("\\Ki31_f25 Transmit IBM 31xx: F25\n");
  13572. break;
  13573. case K_I31_F26:
  13574. printf("\\Ki31_f26 Transmit IBM 31xx: F26\n");
  13575. break;
  13576. case K_I31_F27:
  13577. printf("\\Ki31_f27 Transmit IBM 31xx: F27\n");
  13578. break;
  13579. case K_I31_F28:
  13580. printf("\\Ki31_f28 Transmit IBM 31xx: F28\n");
  13581. break;
  13582. case K_I31_F29:
  13583. printf("\\Ki31_f29 Transmit IBM 31xx: F29\n");
  13584. break;
  13585. case K_I31_F30:
  13586. printf("\\Ki31_f30 Transmit IBM 31xx: F30\n");
  13587. break;
  13588. case K_I31_F31:
  13589. printf("\\Ki31_f31 Transmit IBM 31xx: F31\n");
  13590. break;
  13591. case K_I31_F32:
  13592. printf("\\Ki31_f32 Transmit IBM 31xx: F32\n");
  13593. break;
  13594. case K_I31_F33:
  13595. printf("\\Ki31_f33 Transmit IBM 31xx: F33\n");
  13596. break;
  13597. case K_I31_F34:
  13598. printf("\\Ki31_f34 Transmit IBM 31xx: F34\n");
  13599. break;
  13600. case K_I31_F35:
  13601. printf("\\Ki31_f35 Transmit IBM 31xx: F35\n");
  13602. break;
  13603. case K_I31_F36:
  13604. printf("\\Ki31_f36 Transmit IBM 31xx: F36\n");
  13605. break;
  13606. case K_I31_PA1:
  13607. printf("\\Ki31_pa1 Transmit IBM 31xx: PA1\n");
  13608. break;
  13609. case K_I31_PA2:
  13610. printf("\\Ki31_pa2 Transmit IBM 31xx: PA2\n");
  13611. break;
  13612. case K_I31_PA3:
  13613. printf("\\Ki31_pa3 Transmit IBM 31xx: PA3\n");
  13614. break;
  13615. case K_I31_RESET:
  13616. printf("\\Ki31_reset Transmit IBM 31xx: Reset\n");
  13617. break;
  13618. case K_I31_JUMP:
  13619. printf("\\Ki31_jump Transmit IBM 31xx: Jump\n");
  13620. break;
  13621. case K_I31_CLEAR:
  13622. printf("\\Ki31_clear Transmit IBM 31xx: Clear\n");
  13623. break;
  13624. case K_I31_ERASE_EOF:
  13625. printf("\\Ki31_erase_eof Transmit IBM 31xx: Erase to End of Field\n");
  13626. break;
  13627. case K_I31_ERASE_EOP:
  13628. printf("\\Ki31_eop Transmit IBM 31xx: Erase to End of Page\n");
  13629. break;
  13630. case K_I31_ERASE_INP:
  13631. printf("\\Ki31_inp Transmit IBM 31xx: Erase Input Operation\n");
  13632. break;
  13633. case K_I31_INSERT_CHAR:
  13634. printf("\\Ki31_ins_char Transmit IBM 31xx: Insert Character\n");
  13635. break;
  13636. case K_I31_INSERT_SPACE:
  13637. printf("\\Ki31_ins_space Transmit IBM 31xx: Insert Space\n");
  13638. break;
  13639. case K_I31_DELETE:
  13640. printf("\\Ki31_delete Transmit IBM 31xx: Delete Character\n");
  13641. break;
  13642. case K_I31_INS_LN:
  13643. printf("\\Ki31_ins_line Transmit IBM 31xx: Insert Line\n");
  13644. break;
  13645. case K_I31_DEL_LN:
  13646. printf("\\Ki31_del_ln Transmit IBM 31xx: Delete Line\n");
  13647. break;
  13648. case K_I31_PRINT_LINE:
  13649. printf("\\Ki31_prt_line Transmit IBM 31xx: Print Line\n");
  13650. break;
  13651. case K_I31_PRINT_MSG:
  13652. printf("\\Ki31_prt_msg Transmit IBM 31xx: Print Message\n");
  13653. break;
  13654. case K_I31_PRINT_SHIFT:
  13655. printf("\\Ki31_prt_shift Transmit IBM 31xx: Print Shift\n");
  13656. break;
  13657. case K_I31_CANCEL:
  13658. printf("\\Ki31_cancel Transmit IBM 31xx: Cancel\n");
  13659. break;
  13660. case K_I31_SEND_LINE:
  13661. printf("\\Ki31_send_line Transmit IBM 31xx: Send Line\n");
  13662. break;
  13663. case K_I31_SEND_MSG:
  13664. printf("\\Ki31_send_msg Transmit IBM 31xx: Send Message\n");
  13665. break;
  13666. case K_I31_SEND_PAGE:
  13667. printf("\\Ki31_send_page Transmit IBM 31xx: Send Page\n");
  13668. break;
  13669. case K_I31_HOME:
  13670. printf("\\Ki31_home Transmit IBM 31xx: Home\n");
  13671. break;
  13672. case K_I31_BACK_TAB:
  13673. printf("\\Ki31_back_tab Transmit IBM 31xx: Back Tab\n");
  13674. break;
  13675. case K_SUN_STOP:
  13676. printf("\\Ksunstop Transmit SUN Console: Stop\n");
  13677. break;
  13678. case K_SUN_AGAIN:
  13679. printf("\\Ksunagain Transmit SUN Console: Again\n");
  13680. break;
  13681. case K_SUN_PROPS:
  13682. printf("\\Ksunprops Transmit SUN Console: Props\n");
  13683. break;
  13684. case K_SUN_UNDO:
  13685. printf("\\Ksunundo Transmit SUN Console: Undo\n");
  13686. break;
  13687. case K_SUN_FRONT:
  13688. printf("\\Ksunfront Transmit SUN Console: Front\n");
  13689. break;
  13690. case K_SUN_COPY:
  13691. printf("\\Ksuncopy Transmit SUN Console: Copy\n");
  13692. break;
  13693. case K_SUN_OPEN:
  13694. printf("\\Ksunopen Transmit SUN Console: Open\n");
  13695. break;
  13696. case K_SUN_PASTE:
  13697. printf("\\Ksunpaste Transmit SUN Console: Paste\n");
  13698. break;
  13699. case K_SUN_FIND:
  13700. printf("\\Ksunfind Transmit SUN Console: Find\n");
  13701. break;
  13702. case K_SUN_CUT:
  13703. printf("\\Ksuncut Transmit SUN Console: Cut\n");
  13704. break;
  13705. case K_SUN_HELP:
  13706. printf("\\Ksunhelp Transmit SUN Console: Help\n");
  13707. break;
  13708. default:
  13709. printf("No additional help available for this kverb\n");
  13710. }
  13711. printf("\n");
  13712. /* This is not the proper way to do it since it doesn't show */
  13713. /* all emulations, nor does it show the special modes, but it */
  13714. /* is better than nothing. */
  13715. printf("Current bindings:\n");
  13716. found = 0;
  13717. for (i = 256; i < KMSIZE ; i++) {
  13718. con_event evt = mapkey(i);
  13719. if (evt.type != kverb)
  13720. continue;
  13721. if ((evt.kverb.id & ~F_KVERB) == xx) {
  13722. found = 1;
  13723. printf(" \\%-4d - %s\n",i,keyname(i));
  13724. }
  13725. }
  13726. #ifdef OS2MOUSE
  13727. for ( button = 0 ; button < MMBUTTONMAX ; button++ )
  13728. for ( event = 0 ; event < MMEVENTSIZE ; event++ )
  13729. if ( mousemap[button][event].type == kverb ) {
  13730. if ( (mousemap[button][event].kverb.id & ~F_KVERB) == xx ) {
  13731. found = 1;
  13732. printf(" Mouse - %s\n",mousename(button,event));
  13733. }
  13734. }
  13735. #endif /* OS2MOUSE */
  13736. if ( !found ) {
  13737. printf(" (none)\n");
  13738. }
  13739. return(0);
  13740. }
  13741. #endif /* NOKVERBS */
  13742. #endif /* OS2 */
  13743. #ifndef NOXFER
  13744. /* D O H R M T -- Give help about REMOTE command */
  13745. static char *hrset[] = {
  13746. "Syntax: REMOTE SET parameter value",
  13747. "Example: REMOTE SET FILE TYPE BINARY",
  13748. " Asks the Kermit server to set the named parameter to the given value.",
  13749. " Equivalent to typing the corresponding SET command directly to the other",
  13750. " Kermit if it were in interactive mode.", "" };
  13751. int
  13752. dohrmt(xx) int xx; {
  13753. int x;
  13754. if (xx == -3) return(hmsga(hmhrmt));
  13755. if (xx < 0) return(xx);
  13756. if ((x = cmcfm()) < 0) return(x);
  13757. switch (xx) {
  13758. case XZCPY:
  13759. return(hmsg("Syntax: REMOTE COPY source destination\n\
  13760. Asks the Kermit server to copy the source file to destination.\n\
  13761. Synonym: RCOPY."));
  13762. case XZCWD:
  13763. #ifdef NEWFTP
  13764. return(hmsg("Syntax: REMOTE CD [ name ]\n\
  13765. Asks the Kermit or FTP server to change its working directory or device.\n\
  13766. If the device or directory name is omitted, restore the default.\n\
  13767. Synonym: RCD."));
  13768. #else
  13769. return(hmsg("Syntax: REMOTE CD [ name ]\n\
  13770. Asks the Kermit server to change its working directory or device.\n\
  13771. If the device or directory name is omitted, restore the default.\n\
  13772. Synonym: RCD."));
  13773. #endif /* NEWFTP */
  13774. case XZDEL:
  13775. #ifdef NEWFTP
  13776. return(hmsg("Syntax: REMOTE DELETE filespec\n\
  13777. Asks the Kermit or FTP server to delete the named file(s).\n\
  13778. Synonym: RDEL."));
  13779. #else
  13780. return(hmsg("Syntax: REMOTE DELETE filespec\n\
  13781. Asks the Kermit server to delete the named file(s).\n\
  13782. Synonym: RDEL."));
  13783. #endif /* NEWFTP */
  13784. case XZMKD:
  13785. #ifdef NEWFTP
  13786. return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
  13787. Asks the Kermit or FTP server to create the named directory.\n\
  13788. Synonym: RMKDIR."));
  13789. #else
  13790. return(hmsg("Syntax: REMOTE MKDIR directory-name\n\
  13791. Asks the Kermit server to create the named directory.\n\
  13792. Synonym: RMKDIR."));
  13793. #endif /* NEWFTP */
  13794. case XZRMD:
  13795. #ifdef NEWFTP
  13796. return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
  13797. Asks the Kermit or FTP server to remove the named directory.\n\
  13798. Synonym: RRMDIR."));
  13799. #else
  13800. return(hmsg("Syntax: REMOTE RMDIR directory-name\n\
  13801. Asks the Kermit server to remove the named directory.\n\
  13802. Synonym: RRMDIR."));
  13803. #endif /* NEWFTP */
  13804. case XZDIR:
  13805. #ifdef NEWFTP
  13806. return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
  13807. Asks the Kermit or FTP server to provide a directory listing of the named\n\
  13808. file(s) or if no file specification is given, of all files in its current\n\
  13809. directory. Synonym: RDIR."));
  13810. #else
  13811. return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\
  13812. Asks the Kermit server to provide a directory listing of the named\n\
  13813. file(s) or if no file specification is given, of all files in its current\n\
  13814. directory. Synonym: RDIR."));
  13815. #endif /* NEWFTP */
  13816. case XZHLP:
  13817. #ifdef NEWFTP
  13818. return(hmsg("Syntax: REMOTE HELP\n\
  13819. Asks the Kermit or FTP server to list the services it provides.\n\
  13820. Synonym: RHELP."));
  13821. #else
  13822. return(hmsg("Syntax: REMOTE HELP\n\
  13823. Asks the Kermit server to list the services it provides.\n\
  13824. Synonym: RHELP."));
  13825. #endif /* NEWFTP */
  13826. case XZHOS:
  13827. return(hmsg("Syntax: REMOTE HOST command\n\
  13828. Sends a command to the other computer in its own command language\n\
  13829. through the Kermit server that is running on that host. Synonym: RHOST."));
  13830. #ifndef NOFRILLS
  13831. case XZKER:
  13832. return(hmsg("Syntax: REMOTE KERMIT command\n\
  13833. Sends a command to the remote Kermit server in its own command language.\n\
  13834. Synonym: RKERMIT."));
  13835. case XZLGI:
  13836. return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\
  13837. Logs in to a remote Kermit server that requires you login. Note: RLOGIN\n\
  13838. is NOT a synonym for REMOTE LOGIN."));
  13839. case XZLGO:
  13840. return(hmsg("Syntax: REMOTE LOGOUT\n\
  13841. Logs out from a remote Kermit server to which you have previously logged in."
  13842. ));
  13843. case XZMSG:
  13844. return(hmsg("Syntax: REMOTE MESSAGE text\n\
  13845. Sends a short text message to the remote Kermit server."));
  13846. case XZPRI:
  13847. return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\
  13848. Sends the specified file(s) to the remote Kermit and ask it to have the\n\
  13849. file printed on the remote system's printer, using any specified options.\n\
  13850. Synonym: RPRINT."));
  13851. #endif /* NOFRILLS */
  13852. case XZREN:
  13853. #ifdef NEWFTP
  13854. return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
  13855. Asks the Kermit or FTP server to rename the file. Synonym: RRENAME."));
  13856. #else
  13857. return(hmsg("Syntax: REMOTE RENAME filespec newname\n\
  13858. Asks the Kermit server to rename the file. Synonym: RRENAME."));
  13859. #endif /* NEWFTP */
  13860. case XZSET:
  13861. return(hmsga(hrset));
  13862. case XZSPA:
  13863. return(hmsg("Syntax: REMOTE SPACE [ name ]\n\
  13864. Asks the Kermit server to tell you about its disk space on the current\n\
  13865. disk or directory, or in the one that you name. Synonym: RSPACE."));
  13866. #ifndef NOFRILLS
  13867. case XZTYP:
  13868. #ifdef NEWFTP
  13869. return(hmsg("Syntax: REMOTE TYPE file\n\
  13870. Asks the Kermit or FTP server to send the named file to your screen.\n\
  13871. Synonym: RTYPE."));
  13872. #else
  13873. return(hmsg("Syntax: REMOTE TYPE file\n\
  13874. Asks the Kermit server to send the named file(s) to your screen.\n\
  13875. Synonym: RTYPE."));
  13876. #endif /* NEWFTP */
  13877. case XZWHO:
  13878. return(hmsg("Syntax: REMOTE WHO [ name ]\n\
  13879. Asks the Kermit server to list who's logged in, or to give information\n\
  13880. about the named user. Synonym: RWHO."));
  13881. #endif /* NOFRILLS */
  13882. #ifndef NOSPL
  13883. case XZQUE:
  13884. return(hmsg(
  13885. "Syntax: [ REMOTE ] QUERY { KERMIT, SYSTEM, USER } variable-name\n\
  13886. Asks the Kermit server to send the value of the named variable of the\n\
  13887. given type, and make it available in the \\v(query) variable. When the\n\
  13888. type is KERMIT functions may also be specified as if they were variables."));
  13889. case XZASG:
  13890. return(hmsg(
  13891. "Syntax: REMOTE ASSIGN variable-name [ value ]\n\
  13892. Assigns the given value to the named global variable on the server.\n\
  13893. Synonyms: RASG, RASSIGN."));
  13894. #endif /* NOSPL */
  13895. case XZPWD:
  13896. return(hmsg(
  13897. #ifdef NEWFTP
  13898. "Syntax: REMOTE PWD\n\
  13899. Asks the Kermit server to display its current working directory.\n\
  13900. Synonym: RPWD."));
  13901. #else
  13902. "Syntax: REMOTE PWD\n\
  13903. Asks the Kermit or FTP server to display its current working directory.\n\
  13904. Synonym: RPWD."));
  13905. #endif /* NEWFTP */
  13906. case XZXIT:
  13907. #ifdef NEWFTP
  13908. return(hmsg("Syntax: REMOTE EXIT\n\
  13909. Asks the Kermit server to exit (without disconnecting), or closes an FTP\n\
  13910. connection. Synonym: REXIT, and (for FTP only) BYE, FTP BYE."));
  13911. #else
  13912. return(hmsg("Syntax: REMOTE EXIT\n\
  13913. Asks the Kermit server to exit. Synonym: REXIT."));
  13914. #endif /* NEWFTP */
  13915. default:
  13916. if ((x = cmcfm()) < 0) return(x);
  13917. printf("?Sorry, no help available - \"%s\"\n",cmdbuf);
  13918. return(-9);
  13919. }
  13920. }
  13921. #endif /* NOXFER */
  13922. #endif /* NOHELP */
  13923. #endif /* NOICP */