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