12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677 |
- /* C K C D E B . H */
- /*
- Sat Sep 19 15:22:06 2020
- NOTE TO CONTRIBUTORS: This file, and all the other C-Kermit files, must be
- compatible with C preprocessors that support only #ifdef, #else, #endif,
- #define, and #undef. Please do not use #if, logical operators, or other
- later-model preprocessor features in any of the portable C-Kermit modules.
- You can, of course, use these constructions in platform-specific modules
- when you know they are supported.
- */
- /*
- This file is included by all C-Kermit modules, including the modules
- that aren't specific to Kermit (like the command parser and the ck?tio and
- ck?fio modules). It should be included BEFORE any other C-Kermit header
- files. It specifies format codes for debug(), tlog(), and similar
- functions, and includes any necessary definitions to be used by all C-Kermit
- modules, and also includes some feature selection compile-time switches, and
- also system- or compiler-dependent definitions, plus #includes and prototypes
- required by all C-Kermit modules.
- */
- /*
- Author: Frank da Cruz <fdc@columbia.edu>,
- Columbia University Academic Information Systems, New York City.
- Copyright (C) 1985, 2020,
- Trustees of Columbia University in the City of New York.
- All rights reserved. See the C-Kermit COPYING.TXT file or the
- copyright text in the ckcmai.c module for disclaimer and permissions.
- */
- /*
- Etymology: The name of this file means "C-Kermit Common-C-Language Debugging
- Header", because originally it contained only the formats (F000-F111) for
- the debug() and tlog() functions. Since then it has grown to include all
- material required by all other C-Kermit modules, including the non-Kermit
- specific ones. In other words, this is the one header file that is
- guaranteed to be included by all C-Kermit source modules.
- */
- #ifndef CKCDEB_H /* Don't include me more than once. */
- #define CKCDEB_H
- #ifdef OS2
- #include "ckoker.h"
- #else /* OS2 */
- /* Unsigned numbers */
- #ifndef USHORT
- #define USHORT unsigned short
- #endif /* USHORT */
- #ifndef UINT
- #define UINT unsigned int
- #endif /* UINT */
- #ifndef ULONG
- #define ULONG unsigned long
- #endif /* ULONG */
- #endif /* OS2 */
- #ifdef MACOSX10 /* Mac OS X 1.0 */
- #ifndef MACOSX /* implies Mac OS X */
- #define MACOSX
- #endif /* MACOSX */
- #endif /* MACOSX10 */
- #ifdef MACOSX /* Mac OS X */
- #ifndef BSD44 /* implies 4.4 BSD */
- #define BSD44
- #endif /* BSD44 */
- #endif /* MACOSX */
- #ifdef SCO_OSR505 /* SCO 3.2v5.0.5 */
- #ifndef SCO_OSR504 /* implies SCO 3.2v5.0.4 */
- #define SCO_OSR504
- #endif /* SCO_OSR504 */
- #endif /* SCO_OSR505 */
- #ifdef SCO_OSR504 /* SCO 3.2v5.0.4 */
- #ifndef CK_SCOV5 /* implies SCO 3.2v5.0 */
- #define CK_SCOV5
- #endif /* CK_SCOV5 */
- #include <sys/types.h> /* To sidestep header-file mess */
- #endif /* SCO_OSR504 */
- #ifdef CK_SCOV5
- #ifndef ANYSCO
- #define ANYSCO
- #endif /* ANYSCO */
- #endif /* CK_SCOV5 */
- #ifdef UNIXWARE
- #ifndef ANYSCO
- #define ANYSCO
- #endif /* ANYSCO */
- #endif /* UNIXWARE */
- #ifndef MINIX /* Minix versions */
- #ifdef MINIX315
- #define MINIX
- #else
- #ifdef MINIX3
- #define MINIX
- #else
- #ifdef MINIX2
- #define MINIX
- #endif /* MINIX2 */
- #endif /* MINIX3 */
- #endif /* MINIX315 */
- #endif /* MINIX */
- #ifdef CK_SCO32V4 /* SCO 3.2v4 */
- #ifndef ANYSCO
- #define ANYSCO
- #endif /* ANYSCO */
- #ifndef XENIX
- #define XENIX
- #endif /* XENIX */
- #ifndef SVR3
- #define SVR3
- #endif /* SVR3 */
- #ifndef DIRENT
- #define DIRENT
- #endif /* DIRENT */
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #ifndef SVR3JC
- #define SVR3JC
- #endif /* SVR3JC */
- #ifndef CK_RTSCTS
- #define CK_RTSCTS
- #endif /* CK_RTSCTS */
- #ifndef PID_T
- #define PID_T pid_t
- #endif /* PID_T */
- #ifndef PWID_T
- #define PWID_T int
- #endif /* PWID_T */
- #endif /* CK_SCO32V4 */
- #ifdef NOICP /* If no command parser */
- #ifndef NOSPL /* Then no script language either */
- #define NOSPL
- #endif /* NOSPL */
- #ifndef NOCSETS /* Or characer sets */
- #define NOCSETS
- #endif /* NOCSETS */
- #ifndef NOFTP /* Or FTP client */
- #define NOFTP
- #endif /* NOFTP */
- #endif /* NOICP */
- /* Built-in makefile entries */
- #ifdef SOLARIS11 /* Solaris 11 implies 10 */
- #ifndef SOLARIS10
- #define SOLARIS10
- #endif /* SOLARIS10 */
- #endif /* SOLARIS11 */
- #ifdef SOLARIS10 /* Solaris 10 implies 9 */
- #ifndef SOLARIS9
- #define SOLARIS9
- #endif /* SOLARIS9 */
- #endif /* SOLARIS10 */
- #ifdef SOLARIS9 /* Solaris 9 implies 8 */
- #ifndef SOLARIS8
- #define SOLARIS8
- #endif /* SOLARIS8 */
- #endif /* SOLARIS9 */
- #ifdef SOLARIS8 /* Solaris 8 implies 7 */
- #ifndef SOLARIS7
- #define SOLARIS7
- #endif /* SOLARIS7 */
- #endif /* SOLARIS8 */
- #ifdef SOLARIS7 /* Solaris 7 implies 2.6 */
- #ifndef SOLARIS26
- #define SOLARIS26
- #endif /* SOLARIS26 */
- #endif /* SOLARIS7 */
- #ifdef SOLARIS26 /* Solaris 2.6 implies 2.5 */
- #ifndef SOLARIS25
- #define SOLARIS25
- #endif /* SOLARIS25 */
- #endif /* SOLARIS26 */
- #ifdef SOLARIS25 /* Solaris 2.5 implies Solaris */
- #ifndef SOLARIS
- #define SOLARIS
- #endif /* SOLARIS */
- #ifndef POSIX /* And POSIX */
- #define POSIX
- #endif /* POSIX */
- #ifndef CK_WREFRESH /* And this (curses) */
- #define CK_WREFRESH
- #endif /* CK_WREFRESH */
- #endif /* SOLARIS25 */
- #ifdef SOLARIS24 /* Solaris 2.4 implies Solaris */
- #ifndef SOLARIS
- #define SOLARIS
- #endif /* SOLARIS */
- #endif /* SOLARIS24 */
- #ifdef SOLARIS /* Solaris gets "POSIX" RTS/CTS API */
- #ifdef POSIX
- #ifndef POSIX_CRTSCTS
- #define POSIX_CRTSCTS
- #endif /* POSIX_CRTSCTS */
- #endif /* POSIX */
- #ifndef SVR4
- #define SVR4
- #endif /* SVR4 */
- #ifndef STERMIOX
- #define STERMIOX
- #endif /* STERMIOX */
- #ifndef SELECT
- #define SELECT
- #endif /* SELECT */
- #ifndef FNFLOAT
- #define FNFLOAT
- #endif /* FNFLOAT */
- #ifndef DIRENT
- #define DIRENT
- #endif /* DIRENT */
- #ifndef BIGBUFOK
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #ifndef CK_NEWTERM
- #define CK_NEWTERM
- #endif /* CK_NEWTERM */
- #endif /* SOLARIS */
- #ifdef SUN4S5 /* Sun-4 System V environment */
- #ifndef SVR3 /* implies System V R3 or later */
- #define SVR3
- #endif /* SVR3 */
- #endif /* SUN4S5 */
- #ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */
- #ifndef SUNOS4
- #define SUNOS4
- #endif /* SUNOS4 */
- #endif /* SUNOS41 */
- #ifdef SUN4S5 /* Sun-4 System V environment */
- #ifndef SVR3 /* implies System V R3 or later */
- #define SVR3
- #endif /* SVR3 */
- #endif /* SUN4S5 */
- #ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */
- #ifndef SUNOS4
- #define SUNOS4
- #endif /* SUNOS4 */
- #endif /* SUNOS41 */
- #ifdef SUNOS4 /* Built-in SUNOS4 makefile entry */
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #ifndef BSD4
- #define BSD4
- #endif /* BSD4 */
- #ifndef NOSETBUF
- #define NOSETBUF
- #endif /* NOSETBUF */
- #ifndef DIRENT
- #define DIRENT
- #endif /* DIRENT */
- #ifndef NONET
- #ifndef TCPSOCKET
- #define TCPSOCKET
- #endif /* TCPSOCKET */
- #endif /* NONET */
- #ifndef SAVEDUID
- #define SAVEDUID
- #endif /* SAVEDUID */
- #ifndef DYNAMIC
- #define DYNAMIC
- #endif /* DYNAMIC */
- #endif /* SUNOS4 */
- #ifdef SOLARIS /* Built in makefile entry */
- #ifndef NOSETBUF /* for Solaris 2.x */
- #define NOSETBUF
- #endif /* NOSETBUF */
- #ifndef NOCURSES
- #ifndef CK_CURSES
- #define CK_CURSES
- #endif /* CK_CURSES */
- #endif /* NOCURSES */
- #ifndef CK_NEWTERM
- #define CK_NEWTERM
- #endif /* CK_NEWTERM */
- #ifndef DIRENT
- #define DIRENT
- #endif /* DIRENT */
- #ifndef NONET
- #ifndef TCPSOCKET
- #define TCPSOCKET
- #endif /* TCPSOCKET */
- #endif /* NONET */
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #ifndef SVR4
- #define SVR4
- #endif /* SVR4 */
- #ifndef HADDRLIST
- #define HADDRLIST
- #endif /* HADDRLIST */
- #ifndef STERMIOX
- #define STERMIOX
- #endif /* STERMIOX */
- #ifndef SELECT
- #define SELECT
- #endif /* SELECT */
- #ifndef DYNAMIC
- #define DYNAMIC
- #endif /* DYNAMIC */
- #ifndef NOUUCP
- #ifndef HDBUUCP
- #define HDBUUCP
- #endif /* HDBUUCP */
- #endif /* NOUUCP */
- #endif /* SOLARIS */
- /* Features that can be eliminated from a no-file-transfer version */
- #ifdef NOXFER
- #ifndef NOFTP
- #define NOFTP
- #endif /* NOFTP */
- #ifndef OS2
- #ifndef NOCURSES /* Fullscreen file-transfer display */
- #define NOCURSES
- #endif /* NOCURSES */
- #endif /* OS2 */
- #ifndef NOCKXYZ /* XYZMODEM support */
- #define NOCKXYZ
- #endif /* NOCKXYZ */
- #ifndef NOCKSPEED /* Ctrl-char unprefixing */
- #define NOCKSPEED
- #endif /* NOCKSPEED */
- #ifndef NOSERVER /* Server mode */
- #define NOSERVER
- #endif /* NOSERVER */
- #ifndef NOCKTIMERS /* Dynamic packet timers */
- #define NOCKTIMERS
- #endif /* NOCKTIMERS */
- #ifndef NOPATTERNS /* File-type patterns */
- #define NOPATTERNS
- #endif /* NOPATTERNS */
- #ifndef NOSTREAMING /* Streaming */
- #define NOSTREAMING
- #endif /* NOSTREAMING */
- #ifndef NOIKSD /* Internet Kermit Service */
- #define NOIKSD
- #endif /* NOIKSD */
- #ifndef NOPIPESEND /* Sending from pipes */
- #define NOPIPESEND
- #endif /* NOPIPESEND */
- #ifndef NOAUTODL /* Autodownload */
- #define NOAUTODL
- #endif /* NOAUTODL */
- #ifndef NOMSEND /* MSEND */
- #define NOMSEND
- #endif /* NOMSEND */
- #ifndef NOTLOG /* Transaction logging */
- #define NOTLOG
- #endif /* NOTLOG */
- #ifndef NOCKXXCHAR /* Packet character doubling */
- #define NOCKXXCHAR
- #endif /* NOCKXXCHAR */
- #endif /* NOXFER */
- #ifdef NOICP /* No Interactive Command Parser */
- #ifndef NODIAL /* Implies No DIAL command */
- #define NODIAL
- #endif /* NODIAL */
- #ifndef NOCKXYZ /* and no external protocols */
- #define NOCKXYZ
- #endif /* NOCKXYZ */
- #endif /* NOICP */
- #ifndef NOIKSD
- #ifdef IKSDONLY
- #ifndef IKSD
- #define IKSD
- #endif /* IKSD */
- #ifndef NOLOCAL
- #define NOLOCAL
- #endif /* NOLOCAL */
- #ifndef NOPUSH
- #define NOPUSH
- #endif /* NOPUSH */
- #ifndef TNCODE
- #define TNCODE
- #endif /* TNCODE */
- #ifndef TCPSOCKET
- #define TCPSOCKET
- #endif /* TCPSOCKET */
- #ifndef NETCONN
- #define NETCONN
- #endif /* NETCONN */
- #ifdef SUNX25
- #undef SUNX25
- #endif /* SUNX25 */
- #ifdef IBMX25
- #undef IBMX25
- #endif /* IBMX25 */
- #ifdef STRATUSX25
- #undef STRATUSX25
- #endif /* STRATUSX25 */
- #ifdef CK_NETBIOS
- #undef CK_NETBIOS
- #endif /* CK_NETBIOS */
- #ifdef SUPERLAT
- #undef SUPERLAT
- #endif /* SUPERLAT */
- #ifdef NPIPE
- #undef NPIPE
- #endif /* NPIPE */
- #ifdef NETFILE
- #undef NETFILE
- #endif /* NETFILE */
- #ifdef NETCMD
- #undef NETCMD
- #endif /* NETCMD */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #ifdef RLOGCODE
- #undef RLOGCODE
- #endif /* RLOGCODE */
- #ifdef NETDLL
- #undef NETDLL
- #endif /* NETDLL */
- #ifndef NOSSH
- #undef NOSSH
- #endif /* NOSSH */
- #ifndef NOFORWARDX
- #define NOFORWARDX
- #endif /* NOFORWARDX */
- #ifndef NOBROWSER
- #define NOBROWSER
- #endif /* NOBROWSER */
- #ifndef NOHTTP
- #define NOHTTP
- #endif /* NOHTTP */
- #ifndef NOFTP
- #define NOFTP
- #endif /* NOFTP */
- #ifndef NO_COMPORT
- #define NO_COMPORT
- #endif /* NO_COMPORT */
- #endif /* IKSDONLY */
- #endif /* NOIKSD */
- /* Features that can be eliminated from a remote-only version */
- #ifdef NOLOCAL
- #ifndef NOFTP
- #define NOFTP
- #endif /* NOFTP */
- #ifndef NOHTTP
- #define NOHTTP
- #endif /* NOHTTP */
- #ifndef NOSSH
- #define NOSSH
- #endif /* NOSSH */
- #ifndef NOTERM
- #define NOTERM
- #endif /* NOTERM */
- #ifndef NOCURSES /* Fullscreen file-transfer display */
- #define NOCURSES
- #endif /* NOCURSES */
- #ifndef NODIAL
- #define NODIAL
- #endif /* NODIAL */
- #ifndef NOSCRIPT
- #define NOSCRIPT
- #endif /* NOSCRIPT */
- #ifndef NOSETKEY
- #define NOSETKEY
- #endif /* NOSETKEY */
- #ifndef NOKVERBS
- #define NOKVERBS
- #endif /* NOKVERBS */
- #ifndef NOXMIT
- #define NOXMIT
- #endif /* NOXMIT */
- #ifdef CK_CURSES
- #undef CK_CURSES
- #endif /* CK_CURSES */
- #ifndef IKSDONLY
- #ifndef NOAPC
- #define NOAPC
- #endif /* NOAPC */
- #ifndef NONET
- #define NONET
- #endif /* NONET */
- #endif /* IKSDONLY */
- #endif /* NOLOCAL */
- #ifdef NONET
- #ifdef NETCONN
- #undef NETCONN
- #endif /* NETCONN */
- #ifdef TCPSOCKET
- #undef TCPSOCKET
- #endif /* TCPSOCKET */
- #ifndef NOTCPOPTS
- #define NOTCPOPTS
- #endif /* NOTCPOPTS */
- #ifdef SUNX25
- #undef SUNX25
- #endif /* SUNX25 */
- #ifdef IBMX25
- #undef IBMX25
- #endif /* IBMX25 */
- #ifdef STRATUSX25
- #undef STRATUSX25
- #endif /* STRATUSX25 */
- #ifdef CK_NETBIOS
- #undef CK_NETBIOS
- #endif /* CK_NETBIOS */
- #ifdef SUPERLAT
- #undef SUPERLAT
- #endif /* SUPERLAT */
- #ifdef NPIPE
- #undef NPIPE
- #endif /* NPIPE */
- #ifdef NETFILE
- #undef NETFILE
- #endif /* NETFILE */
- #ifdef NETCMD
- #undef NETCMD
- #endif /* NETCMD */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #ifdef RLOGCODE
- #undef RLOGCODE
- #endif /* RLOGCODE */
- #ifdef NETDLL
- #undef NETDLL
- #endif /* NETDLL */
- #ifndef NOSSH
- #define NOSSH
- #endif /* NOSSH */
- #ifndef NOFTP
- #define NOFTP
- #endif /* NOFTP */
- #ifndef NOHTTP
- #define NOHTTP
- #endif /* NOHTTP */
- #ifndef NOBROWSER
- #define NOBROWSER
- #endif /* NOBROWSER */
- #ifndef NOFORWARDX
- #define NOFORWARDX
- #endif /* NOFORWARDX */
- #endif /* NONET */
- #ifdef IKSDONLY
- #ifdef SUNX25
- #undef SUNX25
- #endif /* SUNX25 */
- #ifdef IBMX25
- #undef IBMX25
- #endif /* IBMX25 */
- #ifdef STRATUSX25
- #undef STRATUSX25
- #endif /* STRATUSX25 */
- #ifdef CK_NETBIOS
- #undef CK_NETBIOS
- #endif /* CK_NETBIOS */
- #ifdef SUPERLAT
- #undef SUPERLAT
- #endif /* SUPERLAT */
- #ifdef NPIPE
- #undef NPIPE
- #endif /* NPIPE */
- #ifdef NETFILE
- #undef NETFILE
- #endif /* NETFILE */
- #ifdef NETCMD
- #undef NETCMD
- #endif /* NETCMD */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #ifdef RLOGCODE
- #undef RLOGCODE
- #endif /* RLOGCODE */
- #ifdef NETDLL
- #undef NETDLL
- #endif /* NETDLL */
- #ifndef NOSSH
- #define NOSSH
- #endif /* NOSSH */
- #ifndef NOHTTP
- #define NOHTTP
- #endif /* NOHTTP */
- #ifndef NOBROWSER
- #define NOBROWSER
- #endif /* NOBROWSER */
- #endif /* IKSDONLY */
- /*
- Note that none of the above precludes TNCODE, which can be defined in
- the absence of TCPSOCKET, etc, to enable server-side Telnet negotation.
- */
- #ifndef TNCODE /* This is for the benefit of */
- #ifdef TCPSOCKET /* modules that might need TNCODE */
- #define TNCODE /* not all of ckcnet.h... */
- #endif /* TCPSOCKET */
- #endif /* TNCODE */
- #ifndef NETCONN
- #ifdef TCPSOCKET
- #define NETCONN
- #endif /* TCPSOCKET */
- #endif /* NETCONN */
- #ifndef DEFPAR /* Default parity */
- #define DEFPAR 0 /* Must be here because it is used */
- #endif /* DEFPAR */ /* by all classes of modules */
- #ifdef NT
- #ifndef OS2ORWIN32
- #define OS2ORWIN32
- #endif /* OS2ORWIN32 */
- #ifndef OS2
- #define WIN32ONLY
- #endif /* OS2 */
- #endif /* NT */
- #ifdef OS2 /* For OS/2 debugging */
- #ifndef OS2ORWIN32
- #define OS2ORWIN32
- #endif /* OS2ORWIN32 */
- #ifdef NT
- #define NOCRYPT
- #include <windows.h>
- #define NTSIG
- #else /* NT */
- #define OS2ONLY
- #include <os2def.h>
- #endif /* NT */
- #ifndef OS2ORUNIX
- #define OS2ORUNIX
- #endif /* OS2ORUNIX */
- #ifndef OS2ORVMS
- #define OS2ORVMS
- #endif /* OS2ORVMS */
- #endif /* OS2 */
- #include <stdio.h> /* Begin by including this. */
- #include <ctype.h> /* and this. */
- #ifdef VMS
- #include <types.h> /* Ensure off_t. */
- #include "ckvrms.h" /* Get NAMDEF NAMX_C_MAXRSS. */
- #endif /* def VMS */
- /* System-type compilation switches */
- #ifdef FT21 /* Fortune For:Pro 2.1 implies 1.8 */
- #ifndef FT18
- #define FT18
- #endif /* FT18 */
- #endif /* FT21 */
- #ifdef __bsdi__
- #ifndef BSDI
- #define BSDI
- #endif /* BSDI */
- #endif /* __bsdi__ */
- #ifdef AIXPS2 /* AIXPS2 implies AIX370 */
- #ifndef AIX370
- #define AIX370
- #endif /* AIX370 */
- #endif /* AIXPS2 */
- #ifdef AIX370 /* AIX PS/2 or 370 implies BSD4 */
- #ifndef BSD4
- #define BSD4
- #endif /* BSD4 */
- #endif /* AIX370 */
- #ifdef AIXESA /* AIX/ESA implies BSD4.4 */
- #ifndef BSD44
- #define BSD44
- #endif /* BSD44 */
- #endif /* AIXESA */
- #ifdef AIX53 /* AIX53 implies AIX52 */
- #ifndef AIX52
- #define AIX52
- #endif /* AIX52 */
- #endif /* AIX53 */
- #ifdef AIX52 /* AIX52 implies AIX51 */
- #ifndef AIX51
- #define AIX51
- #endif /* AIX51 */
- #endif /* AIX52 */
- #ifdef AIX51 /* AIX51 implies AIX50 */
- #ifndef AIX50
- #define AIX50
- #endif /* AIX50 */
- #endif /* AIX51 */
- #ifdef AIX50 /* AIX50 implies AIX45 */
- #ifndef AIX45
- #define AIX45
- #endif /* AIX45 */
- #endif /* AIX50 */
- #ifdef AIX45 /* AIX45 implies AIX44 */
- #ifndef AIX44
- #define AIX44
- #endif /* AIX44 */
- #endif /* AIX45 */
- #ifdef AIX44 /* AIX44 implies AIX43 */
- #ifndef AIX43
- #define AIX43
- #endif /* AIX43 */
- #endif /* AIX44 */
- #ifdef AIX43 /* AIX43 implies AIX42 */
- #ifndef AIX42
- #define AIX42
- #endif /* AIX42 */
- #endif /* AIX43 */
- #ifdef AIX42 /* AIX42 implies AIX41 */
- #ifndef AIX41
- #define AIX41
- #endif /* AIX41 */
- #endif /* AIX42 */
- #ifdef SV68R3V6 /* System V/68 R32V6 implies SVR3 */
- #ifndef SVR3
- #define SVR3
- #endif /* SVR3 */
- #endif /* SV68R3V6 */
- #ifdef SV88R32 /* System V/88 R32 implies SVR3 */
- #ifndef SVR3
- #define SVR3
- #endif /* SVR3 */
- #endif /* SV88R32 */
- #ifdef DGUX540 /* DG UX 5.40 implies Sys V R 4 */
- #ifndef SVR4
- #define SVR4
- #endif /* SVR4 */
- #endif /* DGUX540 */
- #ifndef DGUX
- #ifdef DGUX540 /* DG/UX 5.40 implies DGUX */
- #define DGUX
- #else
- #ifdef DGUX430 /* So does DG/UX 4.30 */
- #define DGUX
- #endif /* DGUX430 */
- #endif /* DGUX540 */
- #endif /* DGUX */
- #ifdef IRIX65 /* IRIX 6.5 implies IRIX 6.4 */
- #ifndef IRIX64
- #define IRIX64
- #endif /* IRIX64 */
- #endif /* IRIX65 */
- #ifdef IRIX64 /* IRIX 6.4 implies IRIX 6.2 */
- #ifndef BSD44ORPOSIX
- #define BSD44ORPOSIX /* for ckutio's benefit */
- #endif /* BSD44ORPOSIX */
- #ifndef IRIX62
- #define IRIX62
- #endif /* IRIX62 */
- #endif /* IRIX64 */
- #ifdef IRIX62 /* IRIX 6.2 implies IRIX 6.0 */
- #ifndef IRIX60
- #define IRIX60
- #endif /* IRIX60 */
- #endif /* IRIX62 */
- #ifdef IRIX60 /* IRIX 6.0 implies IRIX 5.1 */
- #ifndef IRIX51
- #define IRIX51
- #endif /* IRIX51 */
- #ifndef IRIX52 /* And IRIX 5.2 (for hwfc) */
- #define IRIX52
- #endif /* IRIX52 */
- #endif /* IRIX60 */
- #ifndef IRIX /* IRIX 4.0 or greater implies IRIX */
- #ifdef IRIX64
- #define IRIX
- #else
- #ifdef IRIX62
- #define IRIX
- #else
- #ifdef IRIX60
- #define IRIX
- #else
- #ifdef IRIX51
- #define IRIX
- #else
- #ifdef IRIX40
- #define IRIX
- #endif /* IRIX40 */
- #endif /* IRIX51 */
- #endif /* IRIX60 */
- #endif /* IRIX62 */
- #endif /* IRIX64 */
- #endif /* IRIX */
- #ifdef MIPS /* MIPS System V environment */
- #ifndef SVR3 /* implies System V R3 or later */
- #define SVR3
- #endif /* SVR3 */
- #endif /* MIPS */
- #ifdef HPUX9 /* HP-UX 9.x */
- #ifndef SVR3
- #define SVR3
- #endif /* SVR3 */
- #ifndef HPUX
- #define HPUX
- #endif /* HPUX */
- #ifndef HPUX9PLUS
- #define HPUX9PLUS
- #endif /* HPUX9PLUS */
- #endif /* HPUX9 */
- #ifdef HPUX10 /* HP-UX 10.x */
- #ifndef HPUX1010 /* If anything higher is defined */
- #ifdef HPUX1020 /* define HPUX1010 too. */
- #define HPUX1010
- #endif /* HPUX1020 */
- #ifdef HPUX1030
- #define HPUX1010
- #endif /* HPUX1030 */
- #endif /* HPUX1010 */
- #ifdef HPUX1100 /* HP-UX 11.00 implies 10.10 */
- #ifndef HPUX1010
- #define HPUX1010
- #endif /* HPUX1010 */
- #endif /* HPUX1100 */
- #ifndef SVR4
- #define SVR4
- #endif /* SVR4 */
- #ifndef HPUX
- #define HPUX
- #endif /* HPUX */
- #ifndef HPUX9PLUS
- #define HPUX9PLUS
- #endif /* HPUX9PLUS */
- #endif /* HPUX10 */
- #ifdef QNX /* QNX Software Systems Inc */
- #ifndef POSIX /* QNX 4.0 or later is POSIX */
- #define POSIX
- #endif /* POSIX */
- #ifndef __386__ /* Comes in 16-bit and 32-bit */
- #define __16BIT__
- #define CK_QNX16
- #else
- #define __32BIT__
- #define CK_QNX32
- #endif /* __386__ */
- #endif /* QNX */
- /*
- 4.4BSD is a mixture of System V R4, POSIX, and 4.3BSD.
- */
- #ifdef BSD44 /* 4.4 BSD */
- #ifndef SVR4 /* BSD44 implies SVR4 */
- #define SVR4
- #endif /* SVR4 */
- #ifndef NOSETBUF /* NOSETBUF is safe */
- #define NOSETBUF
- #endif /* NOSETBUF */
- #ifndef DIRENT /* Uses <dirent.h> */
- #define DIRENT
- #endif /* DIRENT */
- #endif /* BSD44 */
- #ifdef OPENBSD /* OpenBSD might or might not */
- #ifndef __OpenBSD__ /* have this defined... */
- #define __OpenBSD__
- #endif /* __OpenBSD__ */
- #endif /* OPENBSD */
- #ifdef SVR3 /* SVR3 implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* SVR3 */
- #ifdef SVR4 /* SVR4 implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #ifndef SVR3 /* ...as well as SVR3 */
- #define SVR3
- #endif /* SVR3 */
- #endif /* SVR4 */
- #ifdef OXOS
- #ifndef ATTSV
- #define ATTSV /* OXOS implies ATTSV */
- #endif /* ! ATTSV */
- #define SW_ACC_ID /* access() wants privs on */
- #define kill priv_kill /* kill() wants privs on */
- #ifndef NOSETBUF
- #define NOSETBUF /* NOSETBUF is safe */
- #endif /* ! NOSETBUF */
- #endif /* OXOS */
- #ifdef UTSV /* UTSV implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* UTSV */
- #ifdef XENIX /* XENIX implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* XENIX */
- #ifdef AUX /* AUX implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* AUX */
- #ifdef ATT7300 /* ATT7300 implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* ATT7300 */
- #ifdef ATT6300 /* ATT6300 implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* ATT6300 */
- #ifdef HPUX /* HPUX implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* HPUX */
- #ifdef ISIII /* ISIII implies ATTSV */
- #ifndef ATTSV
- #define ATTSV
- #endif /* ATTSV */
- #endif /* ISIII */
- #ifdef NEXT33 /* NEXT33 implies NEXT */
- #ifndef NEXT
- #define NEXT
- #endif /* NEXT */
- #endif /* NEXT33 */
- #ifdef NEXT /* NEXT implies BSD4 */
- #ifndef BSD4
- #define BSD4
- #endif /* BSD4 */
- #endif /* NEXT */
- #ifdef BSD41 /* BSD41 implies BSD4 */
- #ifndef BSD4
- #define BSD4
- #endif /* BSD4 */
- #endif /* BSD41 */
- #ifdef BSD43 /* BSD43 implies BSD4 */
- #ifndef BSD4
- #define BSD4
- #endif /* BSD4 */
- #endif /* BSD43 */
- #ifdef BSD4 /* BSD4 implies ANYBSD */
- #ifndef ANYBSD
- #define ANYBSD
- #endif /* ANYBSD */
- #endif /* BSD4 */
- #ifdef BSD29 /* BSD29 implies ANYBSD */
- #ifndef ANYBSD
- #define ANYBSD
- #endif /* ANYBSD */
- #endif /* BSD29 */
- #ifdef ATTSV /* ATTSV implies UNIX */
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #endif /* ATTSV */
- #ifdef ANYBSD /* ANYBSD implies UNIX */
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #endif /* ANYBSD */
- #ifdef POSIX /* POSIX implies UNIX */
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #ifndef DIRENT /* and DIRENT, i.e. <dirent.h> */
- #ifndef SDIRENT
- #define DIRENT
- #endif /* SDIRENT */
- #endif /* DIRENT */
- #ifndef NOFILEH /* POSIX doesn't use <sys/file.h> */
- #define NOFILEH
- #endif /* NOFILEH */
- #endif /* POSIX */
- #ifdef V7
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #endif /* V7 */
- #ifdef COHERENT
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #ifdef COMMENT
- #ifndef NOCURSES
- #define NOCURSES
- #endif /* NOCURSES */
- #endif /* COMMENT */
- #endif /* COHERENT */
- #ifdef MINIX
- #ifndef UNIX
- #define UNIX
- #endif /* UNIX */
- #endif /* MINIX */
- /*
- The symbol SVORPOSIX is defined for both AT&T and POSIX compilations
- to make it easier to select items that System V and POSIX have in common,
- but which BSD, V7, etc, do not have.
- */
- #ifdef ATTSV
- #ifndef SVORPOSIX
- #define SVORPOSIX
- #endif /* SVORPOSIX */
- #endif /* ATTSV */
- #ifdef POSIX
- #ifndef SVORPOSIX
- #define SVORPOSIX
- #endif /* SVORPOSIX */
- #endif /* POSIX */
- /*
- The symbol SVR4ORPOSIX is defined for both AT&T System V R4 and POSIX
- compilations to make it easier to select items that System V R4 and POSIX
- have in common, but which BSD, V7, and System V R3 and earlier, etc, do
- not have.
- */
- #ifdef POSIX
- #ifndef SVR4ORPOSIX
- #define SVR4ORPOSIX
- #endif /* SVR4ORPOSIX */
- #endif /* POSIX */
- #ifdef SVR4
- #ifndef SVR4ORPOSIX
- #define SVR4ORPOSIX
- #endif /* SVR4ORPOSIX */
- #endif /* SVR4 */
- /*
- The symbol BSD44ORPOSIX is defined for both 4.4BSD and POSIX compilations
- to make it easier to select items that 4.4BSD and POSIX have in common,
- but which System V, BSD, V7, etc, do not have.
- */
- #ifdef BSD44
- #ifndef BSD44ORPOSIX
- #define BSD44ORPOSIX
- #endif /* BSD44ORPOSIX */
- #endif /* BSD44 */
- #ifdef POSIX
- #ifndef BSD44ORPOSIX
- #define BSD44ORPOSIX
- #endif /* BSD44ORPOSIX */
- #endif /* POSIX */
- #ifdef UNIX /* For items common to OS/2 and UNIX */
- #ifndef OS2ORUNIX
- #define OS2ORUNIX
- #endif /* OS2ORUNIX */
- #endif /* UNIX */
- #ifdef UNIX /* For items common to VMS and UNIX */
- #define VMSORUNIX
- #else
- #ifdef VMS
- #define VMSORUNIX
- #ifndef OS2ORVMS
- #define OS2ORVMS
- #endif /* OS2ORVMS */
- #endif /* VMS */
- #endif /* UNIX */
- #ifndef UNIXOROSK /* UNIX or OS-9 (or OS-9000) */
- #ifdef UNIX
- #define UNIXOROSK
- #else
- #ifdef OSK
- #define UNIXOROSK
- #endif /* OSK */
- #endif /* UNIX */
- #endif /* UNIXOROSK */
- #ifndef OSKORUNIX
- #ifdef UNIXOROSK
- #define OSKORUNIX
- #endif /* UNIXOROSK */
- #endif /* OSKORUNIX */
- #ifdef OS2
- #define CK_ANSIC /* OS/2 supports ANSIC and more extensions */
- #endif /* OS2 */
- #ifdef OSF50 /* Newer OSF/1 versions imply older ones */
- #ifndef OSF40
- #define OSF40
- #endif /* OSF40 */
- #endif /* OSF50 */
- #ifdef OSF40
- #ifndef OSF32
- #define OSF32
- #endif /* OSF32 */
- #endif /* OSF40 */
- #ifdef OSF32
- #ifndef OSF30
- #define OSF30
- #endif /* OSF30 */
- #endif /* OSF32 */
- #ifdef OSF30
- #ifndef OSF20
- #define OSF20
- #endif /* OSF20 */
- #endif /* OSF30 */
- #ifdef OSF20
- #ifndef OSF10
- #define OSF10
- #endif /* OSF10 */
- #endif /* OSF20 */
- #ifdef __DECC /* For DEC Alpha VMS or OSF/1 */
- #ifndef CK_ANSIC
- #define CK_ANSIC /* Even with /stand=vaxc, need ansi */
- #endif /* CKANSIC */
- #ifndef SIG_V
- #define SIG_V /* and signal type is VOID */
- #endif /* SIG_V */
- #ifndef CK_ANSILIBS
- #define CK_ANSILIBS /* (Martin Zinser, Feb 1995) */
- #endif /* CK_ANSILIBS */
- #ifndef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 1
- #endif /* _POSIX_C_SOURCE */
- #endif /* __DECC */
- #ifdef VMS
- #ifdef __ia64 /* VMS on Itanium */
- #ifndef VMSI64
- #define VMSI64
- #endif /* VMSI64 */
- #endif /* __ia64 */
- #ifndef VMS64BIT /* 64-bit VMS on Itanium or Alpha */
- #ifdef __ia64
- #define VMS64BIT
- #else
- #ifdef __ALPHA
- #define VMS64BIT
- #endif /* __ia64 */
- #endif /* __ALPHA */
- #endif /* VMS64BIT */
- #endif /* VMS */
- #ifdef apollo /* May be ANSI-C, check further */
- #ifdef __STDCPP__
- #define CK_ANSIC /* Yes, this is real ANSI-C */
- #define SIG_V
- #else
- #define NOANSI /* Nope, not ANSI */
- #undef __STDC__ /* Even though it say it is! */
- #define SIG_I
- #endif /* __STDCPP__ */
- #endif /* apollo */
- #ifdef POSIX /* -DPOSIX on cc command line */
- #ifndef _POSIX_SOURCE /* Implies _POSIX_SOURCE */
- #define _POSIX_SOURCE
- #endif /* _POSIX_SOURCE */
- #endif /* POSIX */
- /*
- ANSI C? That is, do we have function prototypes, new-style
- function declarations, and parameter type checking and coercion?
- */
- #ifdef MAC /* MPW C is ANSI */
- #ifndef NOANSI
- #ifndef CK_ANSIC
- #define CK_ANSIC
- #endif /* CK_ANSIC */
- #endif /* NOANSI */
- #endif /* MAC */
- #ifdef STRATUS /* Stratus VOS */
- #ifndef CK_ANSIC
- #define CK_ANSIC
- #endif /* CK_ANSIC */
- #ifndef NOSTAT
- #define NOSTAT
- #endif /* NOSTAT */
- #endif /* STRATUS */
- #ifndef NOANSI
- #ifdef __STDC__ /* __STDC__ means ANSI C */
- #ifndef CK_ANSIC
- #define CK_ANSIC
- #endif /* CK_ANSIC */
- #endif /* __STDC__ */
- #endif /* NOANSI */
- /*
- _PROTOTYP() is used for forward declarations of functions so we can have
- parameter and return value type checking if the compiler offers it.
- __STDC__ should be defined by the compiler only if function prototypes are
- allowed. Otherwise, we get old-style forward declarations. Our own private
- CK_ANSIC symbol tells whether we use ANSI C prototypes. To force use of
- ANSI prototypes, include -DCK_ANSIC on the cc command line. To disable the
- use of ANSI prototypes, include -DNOANSI.
- */
- #ifdef CK_ANSIC
- #define _PROTOTYP( func, parms ) func parms
- #else /* Not ANSI C */
- #define _PROTOTYP( func, parms ) func()
- #endif /* CK_ANSIC */
- #ifndef OS2
- #ifdef NOLOGIN /* NOLOGIN implies NOIKSD */
- #ifndef NOIKSD
- #define NOIKSD
- #endif /* NOIKSD */
- #endif /* NOLOGIN */
- #endif /* OS2 */
- #ifdef NOIKSD /* Internet Kermit Service Daemon */
- #ifndef OS2
- #ifndef NOPRINTFSUBST
- #define NOPRINTFSUBST
- #endif /* NOPRINTFSUBST */
- #endif /* OS2 */
- #ifndef NOLOGIN
- #define NOLOGIN
- #endif /* NOLOGIN */
- #ifndef NOSYSLOG
- #define NOSYSLOG
- #endif /* NOSYSLOG */
- #ifndef NOWTMP
- #define NOWTMP
- #endif /* NOWTMP */
- #else
- #ifndef IKSD
- #ifdef OS2ORUNIX /* Platforms where IKSD is supported */
- #define IKSD
- #endif /* OS2ORUNIX */
- #endif /* IKSD */
- #endif /* NOIKSD */
- #ifdef IKSD /* IKSD options... */
- #ifndef IKSDCONF /* IKSD configuration file */
- #ifdef UNIX
- #define IKSDCONF "/etc/iksd.conf"
- #else
- #ifdef OS2
- #define IKSDCONF "iksd.ksc"
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* IKSDCONF */
- #ifndef NOIKSDB
- #ifndef IKSDB /* IKSD database */
- #ifdef UNIX
- #define IKSDB
- #define IK_LCKTRIES 16 /* How many times to try to get lock */
- #define IK_LCKSLEEP 1 /* How long to sleep between tries */
- #define IK_LOCKFILE "iksd.lck" /* Database lockfilename */
- #define IK_DBASEDIR "/var/log/" /* Database directory */
- #define IK_DBASEFIL "iksd.db" /* Database filename */
- #else /* UNIX */
- #ifdef OS2
- #define IKSDB
- #ifndef NOFTRUNCATE /* ftruncate() not available */
- #define NOFTRUNCATE
- #endif /* NOFTRUNCATE */
- #define IK_LCKTRIES 16 /* How many times to try to get lock */
- #define IK_LCKSLEEP 1 /* How long to sleep between tries */
- #define IK_LOCKFILE "iksd.lck" /* DB lockfilename (in systemroot) */
- #define IK_DBASEFIL "iksd.db" /* Database filename */
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* IKSDB */
- #endif /* NOIKSDB */
- #endif /* IKSD */
- /*
- Substitutes for printf() and friends used in IKS to compensate for
- lack of a terminal driver, mainly to supply CR after LF.
- */
- #ifndef NOPRINTFSUBST
- #ifdef MAC
- /*
- * The MAC doesn't use standard stdio routines.
- */
- #undef getchar
- #define getchar() mac_getchar()
- #undef putchar
- #define putchar(c) mac_putchar(c)
- #define printf mac_printf
- #define perror mac_perror
- #define puts mac_puts
- extern int mac_putchar (int c);
- extern int mac_puts (const char *string);
- extern int mac_printf(const char *, ...);
- extern int mac_getchar (void);
- #endif /* MAC */
- #ifdef OS2
- #define printf Vscrnprintf
- #define fprintf Vscrnfprintf
- extern int Vscrnprintf(const char *, ...);
- extern int Vscrnprintw(const char *, ...);
- extern int Vscrnfprintf(FILE *, const char *, ...);
- #ifdef putchar
- #undef putchar
- #endif /* putchar */
- #define putchar(x) Vscrnprintf("%c",x)
- #define perror(x) Vscrnperror(x)
- #endif /* OS2 */
- #ifndef CKWART_C
- #ifdef UNIX
- #ifndef pdp11
- #ifndef CKXPRINTF
- #define CKXPRINTF
- #endif /* CKXPRINTF */
- #endif /* pdp11 */
- #endif /* UNIX */
- #endif /* CKWART_C */
- #endif /* NOPRINTFSUBST */
- #ifdef CKXPRINTF
- #define printf ckxprintf
- #define fprintf ckxfprintf
- #ifdef CK_ANSIC
- _PROTOTYP(int ckxprintf,(const char *, ...));
- #ifdef NEXT
- _PROTOTYP(void ckxperror,(const char *));
- #else
- #ifdef CK_SCOV5
- _PROTOTYP(void ckxperror,(const char *));
- #else
- _PROTOTYP(int ckxperror,(const char *));
- #endif /* CK_SCOV5 */
- #endif /* NEXT */
- _PROTOTYP(int ckxfprintf,(FILE *, const char *, ...));
- #endif /* CK_ANSIC */
- #ifdef putchar
- #undef putchar
- #endif /* putchar */
- #define putchar(x) ckxprintf("%c",x)
- #ifdef putc
- #undef putc
- #endif /* putc */
- #define putc(a,b) ckxfprintf(b,"%c",a)
- #define perror(x) ckxperror(x)
- #endif /* CKXPRINTF */
- /*
- Altos-specific items: 486, 586, 986 models...
- */
- #ifdef A986
- #define M_VOID
- #define void int
- #define CHAR char
- #define SIG_I
- #endif /* A986 */
- /* Signal handling */
- #ifdef QNX
- #ifndef CK_POSIX_SIG
- #define CK_POSIX_SIG
- #endif /* CK_POSIX_SIG */
- #endif /* QNX */
- /*
- void type, normally available only in ANSI compilers.
- The HP-UX exception (for its "bundled" non-ANSI C compiler)
- is known to be valid back to HP-UX 6.5.
- Adjustments might be needed for earlier HP-UX versions.
- */
- #ifndef VOID /* Used throughout all C-Kermit */
- #ifdef CK_ANSIC /* modules... */
- #define VOID void
- #else
- #ifdef HPUX
- #define VOID void
- #else
- #define VOID int
- #endif /* HPUX */
- #endif /* CK_ANSIC */
- #endif /* VOID */
- /*
- Exactly the same as VOID but for use in contexts where the VOID symbol
- conflicts some header-file definition. This is needed for the section
- of ckuusx.c that provides C-Kermit's curses interface, roughly the
- second half of ckuusx.c.
- */
- #ifndef CKVOID
- #ifdef CK_ANSIC
- #define CKVOID void
- #else
- #ifdef HPUX
- #define CKVOID void
- #else
- #define CKVOID int
- #endif /* HPUX */
- #endif /* CK_ANSIC */
- #endif /* CKVOID */
- /* Const type */
- #ifndef CONST
- #ifdef OSK
- #ifdef _UCC
- #define CONST const
- #else
- #define CONST
- #endif /* _UCC */
- #else /* !OSK */
- #ifdef CK_SCO32V4
- #define CONST
- #else
- #ifdef CK_ANSIC
- #define CONST const
- #else
- #define CONST
- #endif /* CK_ANSIC */
- #endif /* CK_SCO32V4 */
- #endif /* OSK */
- #endif /* CONST */
- /* Signal type */
- #ifndef SIG_V /* signal() type, if not def'd yet */
- #ifndef SIG_I
- #ifdef OS2
- #define SIG_V
- #else
- #ifdef POSIX
- #define SIG_V
- #else
- #ifdef SVR3 /* System V R3 and later */
- #define SIG_V
- #else
- #ifdef SUNOS4 /* SUNOS V 4.0 and later */
- #ifndef sun386
- #define SIG_V
- #else
- #define SIG_I
- #endif /* sun386 */
- #else
- #ifdef NEXT /* NeXT */
- #define SIG_V
- #else
- #ifdef AIX370
- #include <signal.h>
- #define SIG_V
- #define SIGTYP __SIGVOID /* AIX370 */
- #else
- #ifdef STRATUS /* Stratus VOS */
- #define SIG_V
- #else
- #ifdef MAC
- #define SIGTYP long
- #define SIG_I
- #ifndef MPW33
- #define SIG_IGN 0
- #endif /* MPW33 */
- #define SIGALRM 1
- #ifndef MPW33
- #define SIGINT 2
- #endif /* MPW33 */
- #else /* Everything else */
- #define SIG_I
- #endif /* MAC */
- #endif /* STRATUS */
- #endif /* AIX370 */
- #endif /* NEXT */
- #endif /* SUNOS4 */
- #endif /* SVR3 */
- #endif /* POSIX */
- #endif /* OS2 */
- #endif /* SIG_I */
- #endif /* SIG_V */
- #ifdef SIG_I
- #define SIGRETURN return(0)
- #ifndef SIGTYP
- #define SIGTYP int
- #endif /* SIGTYP */
- #endif /* SIG_I */
- #ifdef SIG_V
- #define SIGRETURN return
- #ifndef SIGTYP
- #define SIGTYP void
- #endif /* SIGTYP */
- #endif /* SIG_V */
- #ifdef NT
- #ifndef SIGTYP
- #define SIGTYP void
- #endif /* SIGTYP */
- #endif /* NT */
- #ifndef SIGTYP
- #define SIGTYP int
- #endif /* SIGTYP */
- #ifndef SIGRETURN
- #define SIGRETURN return(0)
- #endif /* SIGRETURN */
- #ifdef CKNTSIG
- /* This does not work, so don't use it. */
- #define signal ckntsignal
- SIGTYP (*ckntsignal(int type, SIGTYP (*)(int)))(int);
- #endif /* CKNTSIG */
- /* We want all characters to be unsigned if the compiler supports it */
- #ifdef KUI
- #ifdef CHAR
- #undef CHAR
- #endif /* CHAR */
- #define CHAR unsigned char
- #else
- #ifdef PROVX1
- typedef char CHAR;
- /* typedef long LONG; */
- typedef int void;
- #else
- #ifdef MINIX
- typedef unsigned char CHAR;
- #else
- #ifdef V7
- typedef char CHAR;
- #else
- #ifdef C70
- typedef char CHAR;
- /* typedef long LONG; */
- #else
- #ifdef BSD29
- typedef char CHAR;
- /* typedef long LONG; */
- #else
- #ifdef datageneral
- #define CHAR unsigned char /* 3.22 compiler */
- #else
- #ifdef HPUX
- #define CHAR unsigned char
- #else
- #ifdef OS2
- #ifdef NT
- #define CHAR unsigned char
- #else /* NT */
- #ifdef CHAR
- #undef CHAR
- #endif /* CHAR */
- typedef unsigned char CHAR;
- #endif /* NT */
- #else /* OS2 */
- #ifdef VMS
- typedef unsigned char CHAR;
- #else
- #ifdef CHAR
- #undef CHAR
- #endif /* CHAR */
- typedef unsigned char CHAR;
- #endif /* VMS */
- #endif /* OS2 */
- #endif /* HPUX */
- #endif /* datageneral */
- #endif /* BSD29 */
- #endif /* C70 */
- #endif /* V7 */
- #endif /* MINIX */
- #endif /* PROVX1 */
- #endif /* KUI */
- union ck_short { /* Mainly for Unicode */
- USHORT x_short;
- CHAR x_char[2];
- };
- #ifdef MAC /* Macintosh file routines */
- #ifndef CKWART_C /* But not in "wart"... */
- #ifdef feof
- #undef feof
- #endif /* feof */
- #define feof mac_feof
- #define rewind mac_rewind
- #define fgets mac_fgets
- #define fopen mac_fopen
- #define fclose mac_fclose
- int mac_feof();
- void mac_rewind();
- char *mac_fgets();
- FILE *mac_fopen();
- int mac_fclose();
- #endif /* CKCPRO_W */
- #endif /* MAC */
- /*
- Systems whose mainline modules have access to the communication-line
- file descriptor, ttyfd.
- */
- #ifndef CK_TTYFD
- #ifdef UNIX
- #define CK_TTYFD
- #else
- #ifdef OS2
- #define CK_TTYFD
- #else
- #ifdef VMS
- #define CK_TTYFD
- #endif /* VMS */
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* CK_TTYFD */
- /* Systems where we can get our own process ID */
- #ifndef CK_PID
- #ifdef UNIX
- #define CK_PID
- #endif /* UNIX */
- #ifdef OS2
- #define CK_PID
- #endif /* OS2 */
- #ifdef VMS
- #define CK_PID
- #endif /* VMS */
- #endif /* CK_PID */
- /* Systems that support the Microsoft Telephony API (TAPI) */
- #ifndef NODIAL
- #ifndef CK_TAPI
- #ifdef NT
- #define CK_TAPI
- #endif /* NT */
- #endif /* CK_TAPI */
- #endif /* NODIAL */
- #ifndef NONZXPAND
- #ifndef NZXPAND
- #ifdef OS2ORUNIX
- #define NZXPAND
- #else
- #ifdef VMS
- #define NZXPAND
- #else
- #ifdef datageneral
- #define NZXPAND
- #else
- #ifdef OSK
- #define NZXPAND
- #endif /* OSK */
- #endif /* datageneral */
- #endif /* VMS */
- #endif /* OS2ORUNIX */
- #endif /* NZXPAND */
- #else
- #ifdef NZXPAND
- #undef NZXPAND
- #endif /* NZXPAND */
- #endif /* NONZXPAND */
- /* nzxpand() option flags */
- #define ZX_FILONLY 1 /* Match only regular files */
- #define ZX_DIRONLY 2 /* Match only directories */
- #define ZX_RECURSE 4 /* Descend through directory tree */
- #define ZX_MATCHDOT 8 /* Match "dot files" */
- #define ZX_NOBACKUP 16 /* Don't match "backup files" */
- #define ZX_NOLINKS 32 /* Don't follow symlinks */
- #ifndef NZXPAND
- #define nzxpand(a,b) zxpand(a)
- #endif /* NZXPAND */
- #ifndef NOZXREWIND
- #ifndef ZXREWIND /* Platforms that have zxrewind() */
- #ifdef OS2ORUNIX
- #define ZXREWIND
- #else
- #ifdef VMS
- #define ZXREWIND
- #else
- #ifdef datageneral
- #define ZXREWIND
- #else
- #ifdef OSK
- #define ZXREWIND
- #else
- #ifdef STRATUS
- #define ZXREWIND
- #endif /* STRATUS */
- #endif /* OSK */
- #endif /* datageneral */
- #endif /* VMS */
- #endif /* OS2ORUNIX */
- #endif /* ZXREWIND */
- #else
- #ifdef ZXREWIND
- #undef ZXREWIND
- #endif /* ZXREWIND */
- #endif /* NOZXREWIND */
- /* Temporary-directory-for-RECEIVE feature ... */
- /* This says whether we have the isdir() function defined. */
- #ifdef UNIX /* UNIX has it */
- #ifndef CK_TMPDIR
- #ifndef pdp11
- #define CK_TMPDIR
- #define TMPDIRLEN 256
- #endif /* pdp11 */
- #endif /* CK_TMPDIR */
- #endif /* UNIX */
- #ifdef VMS /* VMS too */
- #ifndef CK_TMPDIR
- #define CK_TMPDIR
- #define TMPDIRLEN 256
- #endif /* CK_TMPDIR */
- #endif /* VMS */
- #ifdef OS2 /* OS two too */
- #ifndef CK_TMPDIR
- #define CK_TMPDIR
- #define TMPDIRLEN 129
- #endif /* CK_TMPDIR */
- #endif /* OS2 */
- #ifdef STRATUS /* Stratus VOS too. */
- #ifndef CK_TMPDIR
- #define CK_TMPDIR
- #define TMPDIRLEN 256
- #endif /* CK_TMPDIR */
- #endif /* STRATUS */
- #ifdef OSK /* OS-9 too */
- #ifndef CK_TMPDIR
- #define CK_TMPDIR
- #define TMPDIRLEN 256
- #endif /* CK_TMPDIR */
- #endif /* OSK */
- #ifdef datageneral /* AOS/VS too */
- #ifndef CK_TMPDIR
- #define CK_TMPDIR
- #define TMPDIRLEN 256
- #endif /* CK_TMPDIR */
- #endif /* datageneral */
- #ifdef CK_TMPDIR /* Needs command parser */
- #ifdef NOICP
- #undef CK_TMPDIR
- #endif /* NOICP */
- #endif /* CK_TMPDIR */
- /* Whether to include <time.h> or <sys/time.h> */
- #ifndef NOTIMEH /* <time.h> */
- #ifndef TIMEH
- #define TIMEH
- #endif /* TIMEH */
- #endif /* NOTIMEH */
- #ifndef NOSYSTIMEH /* <sys/time.h> */
- #ifndef SYSTIMEH
- #ifdef UNIX /* UNIX */
- #ifdef SVORPOSIX /* System V or POSIX... */
- #ifdef M_UNIX
- #define SYSTIMEH
- #else
- #ifdef SCO_32V4
- #define SYSTIMEH
- #else
- #ifdef OXOS
- #define SYSTIMEH
- #else
- #ifdef BSD44
- #define SYSTIMEH
- #else
- #ifdef __linux__
- #define SYSTIMEH
- #else
- #ifdef AIXRS
- #ifndef AIX41
- #define SYSTIMEH
- #endif /* AIX41 */
- #else
- #ifdef IRIX60
- #define SYSTIMEH
- #else
- #ifdef I386IX
- #define SYSTIMEH
- #else
- #ifdef SV68R3V6
- #define SYSTIMEH
- #endif /* SV68R3V6 */
- #endif /* I386IX */
- #endif /* IRIX60 */
- #endif /* AIXRS */
- #endif /* __linux__ */
- #endif /* BSD44 */
- #endif /* OXOS */
- #endif /* SCO_32V4 */
- #endif /* M_UNIX */
- #else /* Not SVORPOSIX */
- #ifndef BELLV10 /* All but these... */
- #ifndef PROVX1
- #ifndef V7
- #ifndef BSD41
- #ifndef COHERENT
- #define SYSTIMEH
- #endif /* COHERENT */
- #endif /* BSD41 */
- #endif /* V7 */
- #endif /* PROVX1 */
- #endif /* BELLV10 */
- #endif /* SVORPOSIX */
- #endif /* UNIX */
- #endif /* SYSTIMEH */
- #endif /* NOSYSTIMEH */
- #ifndef NOSYSTIMEBH /* <sys/timeb.h> */
- #ifndef SYSTIMEBH
- #ifdef OSF
- #define SYSTIMEBH
- #else
- #ifdef COHERENT
- #define SYSTIMEBH
- #else
- #ifdef BSD41
- #define SYSTIMEBH
- #else
- #ifdef BSD29
- #define SYSTIMEBH
- #else
- #ifdef TOWER1
- #define SYSTIMEBH
- #else
- #ifdef FT21
- #define SYSTIMEBH
- #else
- #ifdef BELLV10
- #define SYSTIMEBH
- #endif /* BELLV10 */
- #endif /* FT21 */
- #endif /* TOWER1 */
- #endif /* BSD29 */
- #endif /* BSD41 */
- #endif /* COHERENT */
- #endif /* OSF */
- #endif /* SYSTIMEBH */
- #endif /* NOSYSTIMEBH */
- /*
- Debug and transaction logging is included automatically unless you define
- NODEBUG or NOTLOG. Do this if you want to save the space and overhead.
- (Note, in version 4F these definitions changed from "{}" to the null string
- to avoid problems with semicolons after braces, as in: "if (x) tlog(this);
- else tlog(that);"
- */
- #ifndef NODEBUG
- #ifndef DEBUG
- #define DEBUG
- #endif /* DEBUG */
- #else
- #ifdef DEBUG
- #undef DEBUG
- #endif /* DEBUG */
- #endif /* NODEBUG */
- #ifdef NOTLOG
- #ifdef TLOG
- #undef TLOG
- #endif /* TLOG */
- #else /* NOTLOG */
- #ifndef TLOG
- #define TLOG
- #endif /* TLOG */
- #endif /* NOTLOG */
- /* debug() macro style selection. */
- #ifdef VMS
- #ifndef IFDEBUG
- #define IFDEBUG
- #endif /* IFDEBUG */
- #endif /* VMS */
- #ifdef MAC
- #ifndef IFDEBUG
- #define IFDEBUG
- #endif /* IFDEBUG */
- #endif /* MAC */
- #ifdef OS2
- #ifndef IFDEBUG
- #define IFDEBUG
- #endif /* IFDEBUG */
- #endif /* OS2 */
- #ifdef OXOS /* tst is faster than jsr */
- #ifndef IFDEBUG
- #define IFDEBUG
- #endif /* IFDEBUG */
- #endif /* OXOS */
- #ifndef CKCMAI
- extern int deblog;
- extern int debok;
- extern int debxlen;
- extern int matchdot;
- extern int tt_bell;
- #endif /* CKCMAI */
- #ifdef OS2
- _PROTOTYP( void bleep, (short) );
- #else /* OS2 */
- #define bleep(x) if(tt_bell)putchar('\07')
- #endif /* OS2 */
- #ifndef BEOSORBEBOX
- #ifdef BEBOX /* This was used only for DR7 */
- #define BEOSORBEBOX
- #else
- #ifdef BEOS /* This is used for BeOS 4.x */
- #define BEOSORBEBOX
- #endif /* BEOS */
- #endif /* BEBOX */
- #endif /* BEOSORBEBOX */
- #ifdef NOICP
- #ifdef TLOG
- #undef TLOG
- #endif /* TLOG */
- #endif /* NOICP */
- /* Formats for debug() and tlog() */
- #define F000 0
- #define F001 1
- #define F010 2
- #define F011 3
- #define F100 4
- #define F101 5
- #define F110 6
- #define F111 7
- #ifdef __linux__
- #ifndef LINUX
- #define LINUX
- #endif /* LINUX */
- #ifdef __ANDROID__
- #ifndef ANDROID
- #define ANDROID
- #endif /* ANDROID */
- #endif /* __ANDROID__ */
- #endif /* __linux__ */
- /* Platforms where small size is needed */
- #ifdef pdp11
- #define CK_SMALL
- #endif /* pdp11 */
- /* Can we use realpath()? */
- #ifndef NOREALPATH
- #ifdef pdp11
- #define NOREALPATH
- #endif /* pdp11 */
- #endif /* NOREALPATH */
- #ifndef NOREALPATH
- #ifdef UNIX
- #ifdef HPUX5
- #define NOREALPATH
- #else
- #ifdef HPUX6
- #define NOREALPATH
- #else
- #ifdef HPUX7
- #define NOREALPATH
- #else
- #ifdef HPUX8
- #define NOREALPATH
- #else
- #ifdef SV68R3V6
- #define NOREALPATH
- #else
- #ifdef XENIX
- #define NOREALPATH
- #else
- #ifdef CK_SCO32V4
- #define NOREALPATH
- #else
- #ifdef CK_SCOV5
- #define NOREALPATH
- #else
- #ifdef OSF32
- #define NOREALPATH
- #else
- #ifdef OSF30
- #define NOREALPATH
- #else
- #ifdef ultrix
- #define NOREALPATH
- #else
- #ifdef COHERENT
- #define NOREALPATH
- #endif /* COHERENT */
- #endif /* ultrix */
- #endif /* OSF30 */
- #endif /* OSF32 */
- #endif /* CK_SCOV5 */
- #endif /* CK_SCO32V4 */
- #endif /* XENIX */
- #endif /* SV68R3V6 */
- #endif /* HPUX8 */
- #endif /* HPUX7 */
- #endif /* HPUX6 */
- #endif /* HPUX5 */
- #endif /* NOREALPATH */
- #ifndef NOREALPATH
- #ifndef CKREALPATH
- #define CKREALPATH
- #endif /* NOREALPATH */
- #endif /* CKREALPATH */
- #endif /* UNIX */
- #ifdef CKREALPATH
- #ifdef OS2ORUNIX
- #ifndef CKROOT
- #define CKROOT
- #endif /* CKROOT */
- #endif /* OS2ORUNIX */
- #endif /* CKREALPATH */
- /* CKSYMLINK should be set only if we can use readlink() */
- #ifdef UNIX
- #ifndef NOSYMLINK
- #ifndef CKSYMLINK
- #define CKSYMLINK
- #endif /* NOSYMLINK */
- #endif /* CKSYMLINK */
- #endif /* UNIX */
- /* Platforms where we can use lstat() instead of stat() (for symlinks) */
- /* This should be set only if both lstat() and readlink() are available */
- #ifndef NOLSTAT
- #ifndef NOSYMLINK
- #ifndef USE_LSTAT
- #ifdef UNIX
- #ifdef CKSYMLINK
- #ifdef SVR4 /* SVR4 has lstat() */
- #define USE_LSTAT
- #else
- #ifdef BSD42 /* 4.2BSD and 4.3BSD have it */
- #define USE_LSTAT /* This should include old HPUXs */
- #else
- #ifdef BSD44 /* 4.4BSD has it */
- #define USE_LSTAT
- #else
- #ifdef LINUX /* LINUX has it */
- #define USE_LSTAT
- #else
- #ifdef SUNOS4 /* SunOS has it */
- #define USE_LSTAT
- #endif /* SUNOS4 */
- #endif /* LINUX */
- #endif /* BSD44 */
- #endif /* BSD42 */
- #endif /* SVR4 */
- #endif /* CKSYMLINK */
- #endif /* UNIX */
- #endif /* USE_LSTAT */
- #endif /* NOSYMLINK */
- #endif /* NOLSTAT */
- #ifdef NOLSTAT
- #ifdef USE_LSTAT
- #undef USE_LSTAT
- #endif /* USE_LSTAT */
- #endif /* NOLSTAT */
- #ifndef NOTTYLOCK /* UNIX systems that have ttylock() */
- #ifndef USETTYLOCK
- #ifdef AIXRS /* AIX 3.1 and later */
- #define USETTYLOCK
- #else
- #ifdef USE_UU_LOCK /* FreeBSD or other with uu_lock() */
- #define USETTYLOCK
- #else
- /*
- Prior to 8.0.299 Alpha.08 this was HAVE_BAUDBOY which was added for
- Red Hat 7.2 in May 2003 but which is no longer supported in Debian and
- OpenSuse (at least).
- */
- #ifdef HAVE_LOCKDEV
- #define USETTYLOCK
- #endif /* HAVE_LOCKDEV */
- #endif /* USE_UU_LOCK */
- #endif /* AIXRS */
- #endif /* USETTYLOCK */
- #endif /* NOTTYLOCK */
- /* This could become more inclusive.. Solaris 10, HP-UX 11, AIX 5.3... */
- #ifndef HAVE_SNPRINTF /* Safe to use snprintf() */
- #ifdef HAVE_OPENPTY
- #define HAVE_SNPRINTF
- #endif /* HAVE_OPENPTY */
- #endif /* HAVE_SNPRINTF */
- /* Kermit feature selection */
- #ifndef NOSPL
- #ifndef NOCHANNELIO /* Channel-based file i/o package */
- #ifndef CKCHANNELIO
- #ifdef UNIX
- #define CKCHANNELIO
- #else
- #ifdef OS2
- #define CKCHANNELIO
- #else
- #ifdef VMS
- #define CKCHANNELIO
- #else
- #ifdef STRATUS
- #define CKCHANNELIO
- #endif /* STRATUS */
- #endif /* VMS */
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* CKCHANNELIO */
- #endif /* NOCHANNELIO */
- #endif /* NOSPL */
- #ifndef NOCKEXEC /* EXEC command */
- #ifndef NOPUSH
- #ifndef CKEXEC
- #ifdef UNIX /* UNIX can do it */
- #define CKEXEC
- #endif /* UNIX */
- #endif /* CKEXEC */
- #endif /* NOPUSH */
- #endif /* NOCKEXEC */
- #ifndef NOFAST /* Fast Kermit protocol by default */
- #ifndef CK_FAST
- #ifdef UNIX
- #define CK_FAST
- #else
- #ifdef VMS
- #define CK_FAST
- #else
- #ifdef OS2
- #define CK_FAST
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* CK_FAST */
- #endif /* NOFAST */
- #ifdef UNIX /* Transparent print */
- #ifndef NOXPRINT
- #ifndef XPRINT
- #define XPRINT
- #endif /* XPRINT */
- #endif /* NOXPRINT */
- #endif /* UNIX */
- #ifndef NOHWPARITY /* Hardware parity */
- #ifndef HWPARITY
- #ifdef SVORPOSIX /* System V or POSIX can have it */
- #define HWPARITY
- #else
- #ifdef SUNOS41 /* SunOS 4.1 can have it */
- #define HWPARITY
- #else
- #ifdef OS2 /* K95 can have it */
- #define HWPARITY
- #endif /* OS2 */
- #endif /* SUNOS41 */
- #endif /* SVORPOSIX */
- #endif /* HWPARITY */
- #endif /* NOHWPARITY */
- #ifndef NOSTOPBITS /* Stop-bit selection */
- #ifndef STOPBITS
- #ifdef OS2ORUNIX
- /* In Unix really this should only be if CSTOPB is defined. */
- /* But we don't know that yet. */
- #define STOPBITS
- #else
- #ifdef TN_COMPORT
- #define STOPBITS
- #endif /* TN_COMPORT */
- #endif /* OS2ORUNIX */
- #endif /* STOPBITS */
- #endif /* NOSTOPBITS */
- #ifdef UNIX
- #ifndef NETCMD /* Can SET NETWORK TYPE COMMAND */
- #define NETCMD
- #endif /* NETCMD */
- #endif /* UNIX */
- /* Pty support, nonportable, available on a case-by-case basis */
- #ifndef NOPTY
- #ifdef NEXT /* NeXTSTEP (tested on 3.1)*/
- #define NETPTY
- #else
- #ifdef CK_SCOV5 /* SCO OSR5 (tested on 5.0.5)*/
- #define NETPTY
- #else
- #ifdef QNX /* QNX (tested on 4.25) */
- #define NETPTY
- #else
- #ifdef SINIX /* Sinix (tested on 5.42) */
- #define NETPTY
- #else
- #ifdef DGUX540 /* DG/UX 5.4++ (tested on 5.4R4.11) */
- #define NETPTY
- #else
- #ifdef OSF32 /* Digital Unix 3.2 */
- #define NETPTY
- #else
- #ifdef OSF40 /* Digital Unix 4.0 / Tru64 */
- #define NETPTY
- #else
- #ifdef IRIX60 /* IRIX 6.0 (not earlier) */
- #define NETPTY
- #else
- #ifdef HPUX10 /* HPUX 10.00 or later */
- #define NETPTY
- #ifndef HAVE_PTYTRAP
- #define HAVE_PTYTRAP
- #endif /* HAVE_PTYTRAP */
- #else
- #ifdef HPUX9 /* HPUX 9.00 (not earlier) */
- #define NETPTY
- #ifndef HAVE_PTYTRAP
- #define HAVE_PTYTRAP
- #endif /* HAVE_PTYTRAP */
- #else
- #ifdef BSD44 /* BSD44, {Net,Free,Open}BSD */
- #define NETPTY
- #else
- #ifdef BSDI /* BSDI/OS (tested in 4) */
- #define NETPTY
- #else
- #ifdef SOLARIS /* Solaris (tested in 2.5) */
- #define NETPTY
- #else
- #ifdef UW7 /* Unixware 7 */
- #define NETPTY
- #else
- #ifdef SUNOS41 /* SunOS (tested in 4.1.3) */
- #define NETPTY
- #else
- #ifdef AIX41 /* AIX 4.1 and later */
- #define NETPTY
- #else
- #ifdef LINUX /* Linux */
- #define NETPTY
- #endif /* LINUX */
- #endif /* AIX41 */
- #endif /* SUNOS41 */
- #endif /* UW7 */
- #endif /* SOLARIS */
- #endif /* BSDI */
- #endif /* BSD44 */
- #endif /* HPUX9 */
- #endif /* HPUX10 */
- #endif /* IRIX60 */
- #endif /* OSF40 */
- #endif /* OSF32 */
- #endif /* DGUX540 */
- #endif /* SINIX */
- #endif /* QNX */
- #endif /* CK_SCOV5 */
- #endif /* NEXT */
- #else /* NOPTY */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #endif /* NOPTY */
- #ifdef NETPTY /* NETCMD required for NETPTY */
- #ifndef NETCMD
- #define NETCMD
- #endif /* NETCMD */
- #ifndef NO_OPENPTY /* Can use openpty() */
- #ifndef HAVE_OPENPTY
- #ifdef __linux__
- #define HAVE_OPENPTY
- #else
- #ifdef __FreeBSD__
- #define HAVE_OPENPTY
- #else
- #ifdef __OpenBSD__
- #define HAVE_OPENPTY
- #else
- #ifdef __NetBSD__
- #define HAVE_OPENPTY
- #include <util.h>
- #else
- #ifdef MACOSX10
- #define HAVE_OPENPTY
- #endif /* MACOSX10 */
- #endif /* __NetBSD__ */
- #endif /* __OpenBSD__ */
- #endif /* __FreeBSD__ */
- #endif /* __linux__ */
- #endif /* HAVE_OPENPTY */
- #endif /* NO_OPENPTY */
- /*
- This needs to be expanded and checked.
- The makefile assumes the library (at least for all linuxes)
- is always libutil but I've only verified it for a few.
- If a build fails because
- */
- #ifdef HAVE_OPENPTY
- #ifdef __linux__
- #include <pty.h>
- #else
- #ifdef __NetBSD__
- #include <util.h>
- #else
- #ifdef __OpenBSD__
- #include <util.h>
- #else
- #ifdef __FreeBSD__
- #include <libutil.h>
- #else
- #ifdef MACOSX
- #include <util.h>
- #else
- #ifdef QNX
- #include <unix.h>
- #endif /* QNX */
- #endif /* MACOSX */
- #endif /* __FreeBSD__ */
- #endif /* __OpenBSD__ */
- #endif /* __NetBSD__ */
- #endif /* __linux__ */
- #endif /* HAVE_OPENPTY */
- #endif /* NETPTY */
- #ifndef CK_UTSNAME /* Can we call uname()? */
- #ifdef VMS
- #define CK_UTSNAME
- #else
- #ifdef OS2
- #define CK_UTSNAME
- #else
- #ifdef POSIX /* It's in POSIX.1 */
- #define CK_UTSNAME
- #else
- #ifdef SUNOS41 /* It's in SunOS 4.1 */
- #define CK_UTSNAME
- #else
- #ifdef AIXRS /* It's in AIX */
- #define CK_UTSNAME
- #else
- #ifdef SVR4 /* It's in SVR4 (but not SVR3) */
- #define CK_UTSNAME
- #else
- #ifdef HPUX /* It's in HP-UX 5.00 and later */
- #define CK_UTSNAME
- #else
- #ifdef OSF /* It's in OSF/1 / Digital UNIX */
- #define CK_UTSNAME
- #else
- #ifdef CK_SCOV5
- #define CK_UTSNAME
- #endif /* CK_SCOV5 */
- #endif /* OSF */
- #endif /* HPUX */
- #endif /* SVR4 */
- #endif /* AIXRS */
- #endif /* SUNOS41 */
- #endif /* POSIX */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* CK_UTSNAME */
- /* This section for anything that might use floating-point */
- /* If the following causes trouble use -DFLOAT=float on the command line */
- #ifdef NOSPL
- #ifdef FNFLOAT
- #undef FNFLOAT
- #endif /* FNFLOAT */
- #ifdef CKFLOAT
- #undef CKFLOAT
- #endif /* CKFLOAT */
- #endif /* NOSPL */
- #ifndef NOFLOAT
- #ifndef CKFLOAT
- #ifdef __alpha
- /* Don't use double on 64-bit platforms -- bad things happen */
- #define CKFLOAT float
- #define CKFLOAT_S "float"
- #else
- #define CKFLOAT double
- #define CKFLOAT_S "double"
- #endif /* __alpha */
- #endif /* CKFLOAT */
- #ifndef NOGFTIMER /* Floating-point timers */
- #ifndef GFTIMER
- #ifdef UNIX /* For UNIX */
- #define GFTIMER
- #endif /* UNIX */
- #ifdef VMS /* VMS */
- #ifndef OLD_VMS /* 5.0 and later */
- #define GFTIMER
- #endif /* OLD_VMS */
- #endif /* VMS */
- #ifdef OS2 /* And K95 */
- #define GFTIMER
- #endif /* OS2 */
- #ifdef STRATUS /* And Stratus VOS */
- #define GFTIMER
- #endif /* STRATUS */
- #endif /* GFTIMER */
- #endif /* NOGFTIMER */
- #ifndef NOSPL
- #ifndef FNFLOAT /* Floating-point math functions */
- #ifdef VMS /* defined by default in VMS */
- #define FNFLOAT
- #else
- #ifdef OS2 /* and K95 */
- #define FNFLOAT
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* FNFLOAT */
- #endif /* NOSPL */
- #else /* NOFLOAT is defined */
- #ifdef CKFLOAT
- #undef CKFLOAT
- #endif /* CKFLOAT */
- #ifdef GFTIMER
- #undef GFTIMER
- #endif /* GFTIMER */
- #ifdef FNFLOAT
- #undef FNFLOAT
- #endif /* FNFLOAT */
- #endif /* NOFLOAT */
- #ifdef GFTIMER /* Fraction of second to use when */
- #ifndef GFMINTIME /* elapsed time is <= 0 */
- #define GFMINTIME 0.005
- #endif /* GFMINTIME */
- #endif /* GFTIMER */
- #ifndef CKCMAI
- extern long ztmsec, ztusec; /* Fraction of sec of current time */
- #endif /* CKCMAI */
- #ifndef NOUNPREFIXZERO /* Allow unprefixing of NUL (0) */
- #ifndef UNPREFIXZERO /* in file-transfer packets */
- #define UNPREFIXZERO
- #endif /* UNPREFIXZERO */
- #endif /* NOUNPREFIXZERO */
- #ifdef CK_SMALL
- #define NOCAL /* Calibrate */
- #endif /* CK_SMALL */
- #ifndef NOPATTERNS /* Filetype matching patterns */
- #ifndef PATTERNS
- #ifndef VMS
- #ifndef CK_SMALL
- #define PATTERNS
- #endif /* CK_SMALL */
- #endif /* VMS */
- #endif /* PATTERNS */
- #endif /* NOPATTERNS */
- #ifndef NOCAL
- #ifndef CALIBRATE
- #define CALIBRATE
- #endif /* CALIBRATE */
- #else
- #ifdef CALIBRATE
- #undef CALIBRATE
- #endif /* CALIBRATE */
- #endif /* NOCAL */
- #ifndef NORECURSE /* Recursive directory traversal */
- #ifndef RECURSIVE
- #ifdef VMS
- #define RECURSIVE
- #else
- #ifdef OS2ORUNIX
- #ifndef CK_SMALL
- #define RECURSIVE
- #endif /* CK_SMALL */
- #else
- #ifdef STRATUS
- #define RECURSIVE
- #else
- #ifdef OSK
- #define RECURSIVE
- #endif /* OSK */
- #endif /* STRATUS */
- #endif /* OS2ORUNIX */
- #endif /* VMS */
- #endif /* RECURSIVE */
- #endif /* NORECURSE */
- #ifndef CK_SMALL /* Enable file-transfer tuning code */
- #ifndef CKTUNING /* in which more code is added */
- #ifndef NOTUNING /* to avoid function calls, etc */
- #define CKTUNING
- #endif /* NOTUNING */
- #endif /* CKTUNING */
- #endif /* CK_SMALL */
- #ifndef NOURL /* Parse URLs in SET HOST, etc */
- #define CK_URL
- #define NO_FTP_AUTH /* No auth "ftp" / "anonymous" */
- #endif /* NOURL */
- #ifndef NOTRIGGER
- #ifndef CK_TRIGGER /* Trigger string to exit CONNECT */
- #ifdef OS2ORUNIX /* OK for UNIX and K95 */
- #define CK_TRIGGER
- #else
- #ifdef VMS /* and VMS */
- #define CK_TRIGGER
- #else
- #ifdef datageneral /* and AOS/VS */
- #define CK_TRIGGER
- #endif /* datageneral */
- #endif /* OS2ORUNIX */
- #endif /* VMS */
- #endif /* CK_TRIGGER */
- #endif /* NOTRIGGER */
- #ifdef CK_TRIGGER
- #define TRIGGERS 8 /* How many triggers allowed */
- #endif /* CK_TRIGGER */
- #ifndef XLIMITS /* CONNECT limits */
- #ifdef OS2
- #define XLIMITS
- #endif /* OS2 */
- #endif /* XLIMITS */
- #ifdef NOFRILLS
- #ifndef NOBROWSER
- #define NOBROWSER
- #endif /* NOBROWSER */
- #ifndef NOFTP
- #define NOFTP
- #endif /* NOFTP */
- #endif /* NOFRILLS */
- #ifndef NOHTTP /* HTTP features need... */
- #ifdef NOICP /* an interactive command parser */
- #define NOHTTP
- #endif /* NOICP */
- #ifndef VMS
- #ifndef OS2ORUNIX /* K95 or UNIX (because of */
- #define NOHTTP /* time functions, time_t, etc) */
- #endif /* OS2ORUNIX */
- #endif /* VMS */
- #endif /* NOHTTP */
- #ifndef NONET
- #ifdef TCPSOCKET
- /* The HTTP code is not very portable, so it must be asked for with -DCKHTTP */
- #ifndef NOHTTP
- #ifndef CKHTTP
- #ifdef SUNOS4 /* We can use it in SunOS */
- #define CKHTTP
- #endif /* SUNOS4 */
- #ifdef SOLARIS /* And in Solaris */
- #define CKHTTP
- #endif /* SOLARIS */
- #ifdef LINUX /* And Linux */
- #define CKHTTP
- #endif /* LINUX */
- #ifdef HPUX10 /* And HP-UX 10 and above */
- #define CKHTTP
- #endif /* HPUX10 */
- #ifdef OS2 /* And in K-95 */
- #define CKHTTP
- #endif /* OS2 */
- #ifdef AIX41 /* In AIX 4.1 and higher */
- #define CKHTTP
- #endif /* AIX41 */
- #ifdef UNIXWARE /* In Unixware 2.1 and higher */
- #define CKHTTP /* and probably also in 1.x and 2.0 */
- #endif /* UNIXWARE */
- #ifdef CK_SCOV5
- #define CKHTTP
- #endif /* CK_SCOV5 */
- #ifdef OSF /* And in OSF Digital UNIX/True 64 */
- #define CKHTTP
- #endif /* OSF */
- #ifdef ultrix /* And in Ultrix Mips */
- #ifdef mips
- #define CKHTTP
- #endif /* mips */
- #endif /* ultrix */
- #ifdef __NetBSD__ /* NetBSD */
- #define CKHTTP
- #endif /* __NetBSD__ */
- #ifdef __FreeBSD__
- #define CKHTTP
- #endif /* __FreeBSD__ */
- #ifdef __OpenBSD__
- #define CKHTTP
- #endif /* __OpenBSD__ */
- /* Add more here... */
- #endif /* CKHTTP */
- #ifndef CKHTTP /* If CKHTTP not defined yet */
- #define NOHTTP /* then define NOHTTP */
- #endif /* CKHTTP */
- #endif /* NOHTTP */
- #ifdef NETCONN /* Special "network" types... */
- #ifndef NOLOCAL
- #ifdef OS2
- #ifndef NETFILE
- #define NETFILE
- #endif /* NETFILE */
- #ifndef NOPUSH
- #ifndef NETCMD
- #define NETCMD
- #endif /* NETCMD */
- #endif /* NOPUSH */
- #ifdef NT
- #ifndef NETDLL
- #define NETDLL
- #endif /* NETDLL */
- #endif /* NT */
- #endif /* OS2 */
- #endif /* NOLOCAL */
- #endif /* NETCONN */
- #ifndef NOFTP
- #ifndef SYSFTP
- #ifndef NEWFTP
- #ifdef OS2ORUNIX
- #define NEWFTP
- #endif /* OS2ORUNIX */
- #endif /* NEWFTP */
- #endif /* SYSFTP */
- #endif /* NOFTP */
- #ifndef NOFTP
- #ifdef NEWFTP
- #ifdef SYSFTP
- #undef SYSFTP
- #endif /* SYSFTP */
- #else /* NEWFTP */
- #ifndef SYSFTP
- #define SYSFTP
- #endif /* SYSFTP */
- #endif /* NEWFTP */
- #else /* NOFTP */
- #ifdef NEWFTP
- #undef NEWFTP
- #endif /* NEWFTP */
- #ifdef SYSFTP
- #undef SYSFTP
- #endif /* SYSFTP */
- #endif /* NOFTP */
- #ifndef NOBROWSER
- #ifdef UNIX
- #ifndef BROWSER
- #ifndef NOPUSH
- #define BROWSER
- #endif /* NOPUSH */
- #endif /* BROWSER */
- #endif /* UNIX */
- #ifdef OS2
- #ifndef BROWSER
- #ifndef NOPUSH
- #define BROWSER
- #endif /* NOPUSH */
- #endif /* BROWSER */
- #endif /* OS2 */
- #else
- #ifdef BROWSER
- #undef BROWSER
- #endif /* BROWSER */
- #endif /* NOBROWSER */
- #else /* TCPSOCKET */
- #ifndef NOHTTP /* HTTP requires TCPSOCKET */
- #define NOHTTP
- #endif /* NOHTTP */
- #endif /* TCPSOCKET */
- #endif /* NONET */
- #ifdef TCPSOCKET
- #ifndef NOCKGETFQHOST
- #ifdef __ia64__
- #define NOCKGETFQHOST
- #else /* __ia64__ */
- #ifdef SV68
- #define NOCKGETFQHOST
- #else
- #ifdef HPUXPRE65
- #define NOCKGETFQHOST
- #endif /* HPUXPRE65 */
- #endif /* SV68 */
- #endif /* __ia64 */
- #endif /* NOCKGETFQHOST */
- /*
- Regarding System V/68 (SV68) (from Gerry Belanger, Oct 2002):
- 1) The gethostbyname() appears to return the actual host IP
- address in the hostent struct, instead of the expected pointer
- to the address. Hence the bogus address in the bcopy/memcopy.
- This is despite the header agreeing with our expectations.
- 2) the expected argument swap between bcopy and memcopy
- did not happen. What grief this might cause, I know not.
- */
- #endif /* TCPSOCKET */
- #ifdef TCPSOCKET
- #ifdef OS2ONLY
- #ifndef NOSOCKS
- #define NOSOCKS
- #endif /* NOSOCKS */
- #endif /* OS2ONLY */
- #ifdef NOSOCKS
- #ifdef CK_SOCKS
- #undef CK_SOCKS
- #endif /* CK_SOCKS */
- #ifdef CK_SOCKS5
- #undef CK_SOCKS5
- #endif /* CK_SOCKS5 */
- #else /* NOSOCKS */
- #ifdef NT
- #ifndef CK_SOCKS
- #define CK_SOCKS
- #endif /* CK_SOCKS */
- #endif /* NT */
- #ifdef CK_SOCKS5 /* CK_SOCKS5 implies CK_SOCKS */
- #ifndef CK_SOCKS
- #define CK_SOCKS
- #endif /* CK_SOCKS */
- #endif /* CK_SOCKS5 */
- #endif /* NOSOCKS */
- #endif /* TCPSOCKET */
- #ifdef TNCODE
- #ifndef CK_AUTHENTICATION
- #ifdef OS2
- #ifdef _M_PPC
- #define NO_KERBEROS
- #define NO_SRP
- #else /* _M_PPC */
- #ifndef NO_SSL
- #define CK_SSL
- /* #define SSLDLL */ /* OpenSSL included at link time now - [jt] 2013/11/21 */
- #endif /* NO_SSL */
- #endif /* _M_PPC */
- #ifndef NO_KERBEROS
- #define CK_KERBEROS
- #define KRB4
- #define KRB5
- #define KRB524
- #define KRB524_CONV
- #ifdef NT
- #ifndef _M_PPC
- #ifndef _M_ALPHA
- #ifndef NO_SSL_KRB5
- #define SSL_KRB5
- #endif /* NO_SSL_KRB5 */
- #endif /* _M_ALPHA */
- #endif /* _M_PPC */
- #endif /* NT */
- #endif /* NO_KERBEROS */
- #ifndef NO_SRP
- #define CK_SRP
- #endif /* NO_SRP */
- #define CK_AUTHENTICATION
- #endif /* OS2 */
- #endif /* CK_AUTHENTICATION */
- #ifdef CK_AUTHENTICATION /* Encryption must have Auth */
- #ifndef CK_ENCRYPTION
- #ifndef NO_ENCRYPTION
- #ifdef OS2
- #define CK_ENCRYPTION
- #define CK_DES
- #define CK_CAST
- #endif /* OS2 */
- #endif /* NO_ENCRYPTION */
- #endif /* CK_ENCRYPTION */
- #endif /* CK_AUTHENTICATION */
- #ifdef NO_AUTHENTICATION /* Allow authentication to be */
- #ifdef CK_AUTHENTICATION /* disabled in NT and OS/2 */
- #undef CK_AUTHENTICATION
- #endif /* CK_AUTHENTICATION */
- #ifdef CK_KERBEROS
- #undef CK_KERBEROS
- #endif /* CK_KERBEROS */
- #ifdef CK_SRP
- #undef CK_SRP
- #endif /* CK_SRP */
- #ifdef CK_ENCRYPTION
- #undef CK_ENCRYPTION
- #endif /* CK_ENCRYPTION */
- #endif /* NO_AUTHENTICATION */
- #ifdef NO_ENCRYPTION /* Allow encryption to be */
- #ifdef CK_ENCRYPTION /* disabled in NT and OS/2 */
- #undef CK_ENCRYPTION
- #endif /* CK_ENCRYPTION */
- #endif /* NO_ENCRYPTION */
- #ifdef CK_KERBEROS /* Disable funcs not yet supported with Heimdal */
- #ifdef KRB5
- #ifndef HEIMDAL
- #define KRB5_U2U
- #endif /* HEIMDAL */
- #endif /* KRB5 */
- #endif /* CK_KERBEROS */
- /*
- SSH section. NOSSH disables any form of SSH support.
- If NOSSH is not defined (or implied by NONET, NOLOCAL, etc)
- then SSHBUILTIN is defined for K95 and SSHCMD is defined for UNIX.
- Then, if either SSHBUILTIN or SSHCMD is defined, ANYSSH is also defined.
- */
- #ifndef NOSSH
- #ifndef NO_SSL
- #ifdef OS2ONLY
- #define NOSSH
- #endif /* OS2ONLY */
- #ifdef NT
- #ifndef CK_SSL
- #define NOSSH
- #endif /* CK_SSL */
- #endif /* NT */
- #else /* NO_SSL */
- #define NOSSH
- #endif /* NO_SSL */
- #endif /* NOSSH */
- #ifdef NOSSH /* NOSSH */
- #ifdef SSHBUILTIN /* undefines any SSH selctors */
- #undef SSHBUILTIN
- #endif /* SSHBUILTIN */
- #ifdef SFTP_BUILTIN
- #undef SFTP_BUILTIN
- #endif /* SFTP_BUILTIN */
- #ifdef SSHCMD
- #undef SSHCMD
- #endif /* SSHCMD */
- #ifdef ANYSSH
- #undef ANYSSH
- #endif /* ANYSSH */
- #else /* Not NOSSH */
- #ifndef NOLOCAL
- #ifdef OS2
- #ifndef SSHBUILTIN
- #define SSHBUILTIN
- #endif /* SSHBUILTIN */
- #else /* Not OS2 */
- #ifdef UNIX
- #ifndef SSHCMD
- #ifdef NETPTY
- #ifndef NOPUSH
- #define SSHCMD
- #endif /* NOPUSH */
- #endif /* NETPTY */
- #endif /* SSHCMD */
- #endif /* UNIX */
- #endif /* OS2 */
- #ifndef ANYSSH
- #ifdef SSHBUILTIN
- #define ANYSSH
- #ifdef SSHCMD
- #undef SSHCMD
- #endif /* SSHCMD */
- #else /* SSHBUILTIN */
- #ifdef SSHCMD
- #define ANYSSH
- #endif /* SSHCMD */
- #endif /* SSHBUILTIN */
- #endif /* ANYSSH */
- #endif /* NOLOCAL */
- #endif /* NOSSH */
- /* This is in case #ifdef SSH is used anywhere in the K95 modules */
- #ifdef OS2
- #ifdef SSHBUILTIN
- #ifndef SSH
- #define SSH
- #endif /* SSH */
- #endif /* SSHBUILTIN */
- #endif /* OS2 */
- #ifdef CK_AUTHENTICATION
- #define CK_SECURITY
- #else
- #ifdef CK_SSL
- #define CK_AUTHENTICATION
- #define CK_SECURITY
- #endif /* CK_SSL */
- #endif /* CK_AUTHENTICATION */
- /* Environment stuff */
- #ifndef OS2ORUNIX
- #ifndef NOPUTENV
- #define NOPUTENV
- #endif /* NOPUTENV */
- #endif /* OS2ORUNIX */
- #ifndef CK_ENVIRONMENT
- #ifdef OS2
- #define CK_ENVIRONMENT
- #else
- #ifdef UNIX
- #define CK_ENVIRONMENT
- #else
- #ifdef STRATUS
- #define CK_ENVIRONMENT
- #else
- #ifdef VMS
- #define CK_ENVIRONMENT
- #endif /* VMS */
- #endif /* STRATUS */
- #endif /* UNIX */
- #endif /* OS2 */
- #endif /* CK_ENVIRONMENT */
- #ifndef NOSNDLOC /* RFC 779 SEND LOCATION */
- #ifndef CK_SNDLOC
- #define CK_SNDLOC
- #endif /* CK_SNDLOC */
- #endif /* NOSNDLOC */
- #ifndef NOXDISPLOC /* RFC 1096 XDISPLOC */
- #ifndef CK_XDISPLOC
- #define CK_XDISPLOC
- #endif /* CK_XDISPLOC */
- #endif /* NOXDISPLOC */
- #ifndef NOFORWARDX
- #ifndef NOPUTENV
- #ifndef NOSELECT
- #ifndef CK_FORWARD_X
- #ifdef CK_AUTHENTICATION
- #ifndef OS2ONLY
- #define CK_FORWARD_X
- #endif /* OS2ONLY */
- #endif /* CK_AUTHENTICATION */
- #endif /* CK_FORWARD_X */
- #endif /* NOSELECT */
- #endif /* NOPUTENV */
- #endif /* NOFORWARDX */
- #ifndef NO_COMPORT
- #ifdef TCPSOCKET
- #ifndef TN_COMPORT
- #define TN_COMPORT
- #endif /* TN_COMPORT */
- #endif /* TCPSOCKET */
- #endif /* NO_COMPORT */
- #endif /* TNCODE */
- #ifndef NOXFER
- #ifndef NOCTRLZ /* Allow SET FILE EOF CTRL-Z */
- #ifndef CK_CTRLZ
- #ifdef OS2ORUNIX
- #define CK_CTRLZ
- #endif /* OS2ORUNIX */
- #endif /* CK_CTRLZ */
- #endif /* NOCTRLZ */
- #endif /* NOXFER */
- #ifndef NOPERMS /* File permissions in A packets */
- #ifndef CK_PERMS
- #ifdef UNIX
- #define CK_PERMS
- #else
- #ifdef VMS
- #define CK_PERMS
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* CK_PERMS */
- #endif /* NOPERMS */
- #ifdef CK_PERMS
- #define CK_PERMLEN 24 /* Max length of sys-dependent perms */
- #endif /* CK_PERMS */
- #ifdef UNIX /* NOSETBUF for everybody */
- #ifndef NOSETBUF
- #ifndef USE_SETBUF /* This is the escape clause */
- #define NOSETBUF
- #endif /* USE_SETBUF */
- #endif /* NOSETBUF */
- #endif /* UNIX */
- #ifndef USE_STRERROR /* Whether to use strerror() */
- #ifdef pdp11
- #define USE_STRERROR
- #endif /* pdp11 */
- #endif /* USE_STRERROR */
- #ifdef VMS /* Features for all VMS builds */
- #ifndef NOJC
- #define NOJC
- #endif /* NOJC */
- #ifndef NOSETBUF
- #define NOSETBUF
- #endif /* NOSETBUF */
- #ifndef DYNAMIC
- #define DYNAMIC
- #endif /* DYNAMIC */
- #ifndef NOCURSES
- #ifndef CK_CURSES
- #define CK_CURSES
- #endif /* CK_CURSES */
- #endif /* NOCURSES */
- #endif /* VMS */
- #ifndef NOCKTIMERS /* Dynamic timeouts */
- #ifndef CK_TIMERS
- #define CK_TIMERS
- #endif /* CK_TIMERS */
- #endif /* NOCKTIMERS */
- #define CK_SPEED /* Control-prefix removal */
- #ifdef NOCKSPEED
- #undef CK_SPEED
- #endif /* NOCKSPEED */
- #ifndef NOCKXXCHAR
- #ifndef CKXXCHAR
- #ifdef UNIX
- #define CKXXCHAR
- #else
- #ifdef OS2
- #define CKXXCHAR
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* CKXXCHAR */
- #endif /* NOCKXXCHAR */
- #ifdef MAC /* For Macintosh, no escape */
- #define NOPUSH /* to operating system */
- #endif /* MAC */
- /* Systems where we can call zmkdir() to create directories. */
- #ifndef CK_MKDIR
- #ifndef NOMKDIR
- #ifdef UNIX
- #ifndef pdp11
- #define CK_MKDIR
- #endif /* pdp11 */
- #endif /* UNIX */
- #ifdef OS2
- #define CK_MKDIR
- #endif /* OS2 */
- #ifdef VMS
- #define CK_MKDIR
- #endif /* VMS */
- #ifdef STRATUS
- #define CK_MKDIR
- #endif /* STRATUS */
- #ifdef OSK
- #define CK_MKDIR
- #endif /* OSK */
- #ifdef datageneral
- #define CK_MKDIR
- #endif /* datageneral */
- #endif /* CK_MKDIR */
- #endif /* NOMKDIR */
- #ifdef NOMKDIR /* Allow for command-line override */
- #ifdef CK_MKDIR
- #undef CK_MKDIR
- #endif /* CK_MKDIR */
- #endif /* NOMKDIR */
- /* Systems for which we can enable the REDIRECT command automatically */
- /* As of 6.0.193, it should work for all UNIX... */
- #ifndef NOREDIRECT
- #ifndef CK_REDIR
- #ifdef UNIX
- #define CK_REDIR
- #endif /* UNIX */
- #ifdef OS2 /* As well as OS/2 and friends... */
- #define CK_REDIR
- #endif /* OS2 */
- #endif /* CK_REDIR */
- #endif /* NOREDIRECT */
- #ifdef NOPUSH /* But... REDIRECT command is not */
- #ifdef CK_REDIR /* allowed if NOPUSH is defined. */
- #undef CK_REDIR
- #endif /* CK_REDIR */
- #ifdef NETCMD /* Nor is SET NET COMMAND */
- #undef NETCMD
- #endif /* NETCMD */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #endif /* NOPUSH */
- #ifndef PEXITSTAT /* \v(pexitstat) variable defined */
- #ifdef OS2ORUNIX
- #define PEXITSTAT
- #else
- #ifdef VMS
- #define PEXITSTAT
- #endif /* VMS */
- #endif /* OS2ORUNIX */
- #endif /* PEXITSTAT */
- /* The following allows automatic enabling of REDIRECT to be overridden... */
- #ifdef NOREDIRECT
- #ifdef NETCMD
- #undef NETCMD
- #endif /* NETCMD */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #ifdef CK_REDIR
- #undef CK_REDIR
- #endif /* CK_REDIR */
- #endif /* NOREDIRECT */
- #ifdef NONETCMD
- #ifdef NETCMD
- #undef NETCMD
- #endif /* NETCMD */
- #ifdef NETPTY
- #undef NETPTY
- #endif /* NETPTY */
- #endif /* NONETCMD */
- #ifdef CK_REDIR
- _PROTOTYP( int ttruncmd, (char *) );
- #endif /* CK_REDIR */
- /* Use built-in DIRECTORY command */
- #ifndef NOMYDIR
- #ifndef DOMYDIR
- #ifdef UNIXOROSK
- #define DOMYDIR
- #else
- #ifdef OS2
- #define DOMYDIR
- #else
- #ifdef VMS
- #define DOMYDIR
- #endif /* VMS */
- #endif /* OS2 */
- #endif /* UNIXOROSK */
- #endif /* DOMYDIR */
- #endif /* NOMYDIR */
- /* Sending from and receiving to commands/pipes */
- #ifndef PIPESEND
- #ifdef UNIX
- #define PIPESEND
- #endif /* UNIX */
- #ifdef OS2
- #define PIPESEND
- #endif /* OS2 */
- #endif /* PIPESEND */
- #ifdef PIPESEND
- #ifdef NOPIPESEND
- #undef PIPESEND
- #endif /* NOPIPESEND */
- #ifdef NOPUSH
- #undef PIPESEND
- #endif /* NOPUSH */
- #endif /* PIPESEND */
- #ifdef NOPUSH
- #ifdef BROWSER
- #undef BROWSER
- #endif /* BROWSER */
- #endif /* NOPUSH */
- /* Versions where we support the RESEND command */
- #ifndef NOXFER
- #ifndef NORESEND
- #ifndef CK_RESEND
- #ifdef UNIX
- #ifndef pdp11
- #define CK_RESEND
- #endif /* pdp11 */
- #endif /* UNIX */
- #ifdef VMS
- #define CK_RESEND
- #endif /* VMS */
- #ifdef OS2
- #define CK_RESEND
- #endif /* OS2 */
- #ifdef AMIGA
- #define CK_RESEND
- #endif /* AMIGA */
- #ifdef datageneral
- #define CK_RESEND
- #endif /* datageneral */
- #ifdef STRATUS
- #define CK_RESEND
- #endif /* STRATUS */
- #ifdef OSK
- #define CK_RESEND
- #endif /* OSK */
- #endif /* CK_RESEND */
- #endif /* NORESEND */
- #endif /* NOXFER */
- /* Systems implementing "Doomsday Kermit" protocol ... */
- #ifndef DOOMSDAY
- #ifdef UNIX
- #define DOOMSDAY
- #else
- #ifdef VMS
- #define DOOMSDAY
- #else
- #ifdef OS2
- #define DOOMSDAY
- #else
- #ifdef STRATUS
- #define DOOMSDAY
- #endif /* STRATUS */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* DOOMSDAY */
- /* Systems where we want the Thermometer to be used for fullscreen */
- #ifdef OS2
- #ifndef CK_PCT_BAR
- #define CK_PCT_BAR
- #endif /* CK_PCT_BAR */
- #endif /* OS2 */
- /* Systems where we have a REXX command */
- #ifdef OS2
- #ifdef __32BIT__
- #ifndef NOREXX
- #define CK_REXX
- #endif /* NOREXX */
- #endif /* __32BIT__ */
- #endif /* OS2 */
- /* Platforms that have a ZCHKPID function */
- #ifdef OS2ORUNIX
- #define ZCHKPID
- #endif /* OS2ORUNIX */
- #ifndef ZCHKPID
- /* If we can't check pids then we have treat all pids as active & valid. */
- #define zchkpid(x) 1
- #endif /* ZCHKPID */
- /* Systems that have a ZRENAME function */
- #define ZRENAME /* They all do */
- /* Systems that have a ZCOPY function */
- #ifndef ZCOPY
- #ifdef VMS
- #define ZCOPY
- #else
- #ifdef OS2
- #define ZCOPY
- #else
- #ifdef UNIX
- #define ZCOPY
- #else
- #ifdef STRATUS
- #define ZCOPY
- #endif /* STRATUS */
- #endif /* UNIX */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* ZCOPY */
- /* Systems that have ttgwsiz() (they all should but they don't) */
- #ifndef NOTTGWSIZ
- #ifndef CK_TTGWSIZ
- #ifdef UNIX
- #define CK_TTGWSIZ
- #else
- #ifdef VMS
- #define CK_TTGWSIZ
- #else
- #ifdef OS2
- #define CK_TTGWSIZ
- #else
- #ifdef OSK
- #define CK_TTGWSIZ
- #endif /* OSK */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* CK_TTGWSIZ */
- #endif /* NOTTGWSIZ */
- #ifdef NOTTGWSIZ
- #ifdef CK_TTGWSIZ
- #undef CK_TTGWSIZ
- #endif /* CK_TTGWSIZ */
- #endif /* NOTTGWSIZ */
- #ifdef OS2
- /* OS/2 C-Kermit features not available in 16-bit version... */
- #ifdef OS2ONLY
- #ifndef __32BIT__
- #ifndef NOLOCAL
- #ifdef PCFONTS /* PC Font support */
- #undef PCFONTS
- #endif /* PCFONTS */
- #ifdef NPIPE /* Named Pipes communication */
- #undef NPIPE
- #endif /* NPIPE */
- #ifdef CK_NETBIOS /* NETBIOS communication */
- #undef CK_NETBIOS
- #endif /* CK_NETBIOS */
- #ifdef OS2MOUSE /* Mouse */
- #undef OS2MOUSE
- #endif /* OS2MOUSE */
- #ifdef OS2PM /* Presentation Manager */
- #undef OS2PM
- #endif /* OS2PM */
- #endif /* NOLOCAL */
- #ifdef CK_REXX /* Rexx */
- #undef CK_REXX
- #endif /* CK_REXX */
- #endif /* __32BIT__ */
- #endif /* OS2ONLY */
- /* OS/2 C-Kermit features not available in Windows NT version... */
- #ifdef NT
- #ifdef PCFONTS /* PC Font support */
- #undef PCFONTS
- #endif /* PCFONTS */
- #ifdef OS2PM /* Presentation Manager */
- #undef OS2PM
- #endif /* OS2PM */
- #ifdef CK_REXX /* Rexx */
- #undef CK_REXX
- #endif /* CK_REXX */
- #endif /* NT */
- #endif /* OS2 */
- /*
- Systems that have select().
- This is used for both msleep() and for read-buffer checking in in_chk().
- */
- #define CK_SLEEPINT 250 /* milliseconds - set this to something that
- divides evenly into 1000 */
- #ifndef SELECT
- #ifndef NOSELECT
- #ifdef __linux__
- #define SELECT
- #else
- #ifdef SUNOS4
- #define SELECT
- #else
- #ifdef NEXT
- #define SELECT
- #else
- #ifdef RTAIX
- #define SELECT
- #else
- #ifdef HPUX
- /*
- Not really. I think it's only in HP-UX 7.0 and later, except it's also
- in earlier versions that have TCP/IP installed. Override this default
- in particular HP-UX makefile entries by adding -DNOSELECT, as in (e.g.)
- the HP-UX 6.5 ones.
- */
- #define SELECT
- #else
- #ifdef AIXRS
- #define SELECT
- #else
- #ifdef BSD44
- #define SELECT
- #else
- #ifdef BSD4
- #define SELECT
- #else
- #ifdef OXOS
- #define SELECT
- #else
- #ifdef OS2
- #define SELECT
- #else
- #ifdef BEBOX
- #define SELECT
- #endif /* BEBOX */
- #endif /* OS2 */
- #endif /* OXOS */
- #endif /* BSD4 */
- #endif /* BSD44 */
- #endif /* AIXRS */
- #endif /* HPUX */
- #endif /* RTAIX */
- #endif /* NEXT */
- #endif /* __linux__ */
- #endif /* SUNOS4 */
- #endif /* NOSELECT */
- #endif /* SELECT */
- /*
- The following section moved here from ckcnet.h in 6.1 because select()
- is now used for non-networking purposes.
- */
- /* On HP-9000/500 HP-UX 5.21 this stuff is not defined in any header file */
- #ifdef hp9000s500
- #ifndef NEEDSELECTDEFS
- #define NEEDSELECTDEFS
- #endif /* NEEDSELECTDEFS */
- #endif /* hp9000s500 */
- #ifdef NEEDSELECTDEFS
- typedef long fd_mask;
- #ifndef NBBY
- #define NBBY 8
- #endif /* NBBY */
- #ifndef FD_SETSIZE
- #define FD_SETSIZE 32
- #endif /* FD_SETSIZE */
- #ifndef NFDBITS
- #define NFDBITS (sizeof(fd_mask) * NBBY)
- #endif /* NFDBITS */
- #ifndef howmany
- #define howmany(x,y) (((x)+((y)-1))/(y))
- #endif /* howmany */
- typedef struct fd_set {
- fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
- } fd_set;
- #ifndef FD_SET
- #define FD_SET(n,p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
- #endif /* FD_SET */
- #ifndef FD_CLR
- #define FD_CLR(n,p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
- #endif /* FD_CLR */
- #ifndef FD_ISSET
- #define FD_ISSET(n,p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
- #endif /* FD_ISSET */
- #ifndef FD_COPY
- #define FD_COPY(f,t) (bcopy(f,t,sizeof(*(f)))
- #endif /* FD_COPY */
- #ifndef FD_ZERO
- #define FD_ZERO(p) bzero((char *)(p),sizeof(*(p)))
- #endif /* FD_ZERO */
- #endif /* NEEDSELECTDEFS */
- /*
- CK_NEED_SIG is defined if the system cannot check the console to
- to see if characters are waiting. This is used during local-mode file
- transfer to interrupt the transfer, refresh the screen display, etc.
- If CK_NEED_SIG is defined, then file-transfer interruption characters
- have to be preceded a special character, e.g. the SIGQUIT character.
- CK_NEED_SIG should be defined if the conchk() function is not operational.
- */
- #ifdef NOPOLL /* For overriding CK_POLL definition */
- #ifdef CK_POLL
- #undef CK_POLL
- #endif /* CK_POLL */
- #endif /* NOPOLL */
- #ifndef CK_POLL /* If we don't have poll() */
- #ifndef RDCHK /* And we don't have rdchk() */
- #ifndef SELECT /* And we don't have select() */
- #ifdef ATTSV
- #ifndef aegis
- #ifndef datageneral
- #ifndef OXOS
- #define CK_NEED_SIG
- #endif /* OXOS */
- #endif /* datageneral */
- #endif /* aegis */
- #endif /* ATTSV */
- #ifdef POSIX
- #ifndef CK_NEED_SIG
- #define CK_NEED_SIG
- #endif /* CK_NEED_SIG */
- #endif /* POSIX */
- #endif /* SELECT */
- #endif /* RDCHK */
- #endif /* CK_POLL */
- #ifdef HPUX /* HP-UX has select() */
- #ifdef CK_NEED_SIG
- #undef CK_NEED_SIG
- #endif /* CK_NEED_SIG */
- #endif /* HPUX */
- #ifdef AIXRS /* AIX has select() */
- #ifdef CK_NEED_SIG
- #undef CK_NEED_SIG
- #endif /* CK_NEED_SIG */
- #endif /* AIXRS */
- #ifdef BSD44 /* 4.4BSD has FIONREAD */
- #ifdef CK_NEED_SIG
- #undef CK_NEED_SIG
- #endif /* CK_NEED_SIG */
- #endif /* BSD44 */
- #ifdef QNX /* QNX has FIONREAD and select() */
- #ifdef CK_NEED_SIG
- #undef CK_NEED_SIG
- #endif /* CK_NEED_SIG */
- #endif /* QNX */
- #ifdef COHERENT
- #ifndef NOTIMEZONE
- #define NOTIMEZONE
- #endif /* NOTIMEZONE */
- #endif /* COHERENT */
- #ifdef UNIX
- #ifndef HAVE_TZ /* Can we use struct timezone? */
- #ifndef NOTIMEZONE
- #ifdef PTX
- #define NOTIMEZONE
- #else
- #ifndef SELECT
- #ifdef COHERENT
- #define NOTIMEZONE
- #else
- #ifdef BELLV10
- #define NOTIMEZONE
- #endif /* BELLV10 */
- #endif /* COHERENT */
- #endif /* SELECT */
- #endif /* PTX */
- #endif /* NOTIMEZONE */
- #endif /* HAVE_TZ */
- #ifndef NOTIMEVAL /* Can we use struct timeval? */
- #ifndef HAVE_TV
- #define HAVE_TV
- #endif /* HAVE_TV */
- #endif /* NOTIMEVAL */
- #ifndef NOTIMEZONE
- #ifndef HAVE_TZ
- #define HAVE_TZ
- #endif /* HAVE_TZ */
- #endif /* NOTIMEZONE */
- #endif /* UNIX */
- #ifdef SCO32
- #ifdef HAVE_TV
- #undef HAVE_TV
- #endif /* HAVE_TV */
- #ifdef HAVE_TZ
- #undef HAVE_TZ
- #endif /* HAVE_TZ */
- #ifndef NOTIMEVAL
- #define NOTIMEVAL
- #endif /* NOTIMEVAL */
- #ifndef NOTIMEZONE
- #define NOTIMEZONE
- #endif /* NOTIMEZONE */
- #endif /* SCO32 */
- #ifdef ATT7300
- #ifdef HAVE_TV
- #undef HAVE_TV
- #endif /* HAVE_TV */
- #ifdef HAVE_TZ
- #undef HAVE_TZ
- #endif /* HAVE_TZ */
- #ifndef NOTIMEVAL
- #define NOTIMEVAL
- #endif /* NOTIMEVAL */
- #ifndef NOTIMEZONE
- #define NOTIMEZONE
- #endif /* NOTIMEZONE */
- #endif /* ATT7300 */
- /*
- Automatic parity detection.
- This actually implies a lot more now: length-driven packet reading,
- "Doomsday Kermit" IBM Mainframe file transfer through 3270 data streams, etc.
- */
- #ifdef UNIX /* For Unix */
- #ifndef NOPARSEN
- #define PARSENSE
- #endif /* NOPARSEN */
- #endif /* UNIX */
- #ifdef VMS /* ... and VMS */
- #ifndef NOPARSEN
- #define PARSENSE
- #endif /* NOPARSEN */
- #ifdef __GNUC__
- #define VMSGCC
- #endif /* __GNUC__ */
- #endif /* VMS */
- #ifdef MAC /* and Macintosh */
- #ifndef NOPARSEN
- #define PARSENSE
- #endif /* NOPARSEN */
- #endif /* MAC */
- #ifdef STRATUS /* and Stratus VOS */
- #ifndef NOPARSEN
- #define PARSENSE
- #endif /* NOPARSEN */
- #endif /* STRATUS */
- #ifdef OS2 /* and OS/2, finally */
- #ifndef NOPARSEN
- #define PARSENSE
- #endif /* NOPARSEN */
- #endif /* OS2 */
- #ifndef NODYNAMIC /* DYNAMIC is default for UNIX */
- #ifndef DYNAMIC /* as of C-Kermit 7.0 */
- #ifdef UNIX
- #define DYNAMIC
- #endif /* UNIX */
- #endif /* DYNAMIC */
- #endif /* NODYNAMIC */
- #ifdef DYNAMIC /* If DYNAMIC is defined */
- #define DCMDBUF /* then also define this. */
- #endif /* DYNAMIC */
- #ifndef CK_LBRK /* Can send Long BREAK */
- #ifdef UNIX /* (everybody but OS-9) */
- #define CK_LBRK
- #endif /* UNIX */
- #ifdef VMS
- #define CK_LBRK
- #endif /* VMS */
- #ifdef datageneral
- #define CK_LBRK
- #endif /* datageneral */
- #ifdef GEMDOS
- #define CK_LBRK
- #endif /* GEMDOS */
- #ifdef OS2
- #define CK_LBRK
- #endif /* OS2 */
- #ifdef AMIGA
- #define CK_LBRK
- #endif /* AMIGA */
- #ifdef STRATUS
- #define CK_LBRK
- #endif /* STRATUS */
- #endif /* CK_LBRK */
- /* Carrier treatment */
- /* These are defined here because they are shared by the system dependent */
- /* and the system independent modules. */
- #define CAR_OFF 0 /* Off: ignore carrier always. */
- #define CAR_ON 1 /* On: heed carrier always, except during DIAL. */
- #define CAR_AUT 2 /* Auto: heed carrier, but only if line is declared */
- /* to be a modem line, and only during CONNECT. */
- /* And more generically (for use with any ON/OFF/AUTO feature) */
- #define CK_OFF 0
- #define CK_ON 1
- #define CK_AUTO 2
- #ifndef NOLOCAL
- /*
- Serial interface speeds available.
- As of C-Kermit 6.1 there is a new method to get the supported
- speeds, which obviates the need for all the craziness below. At runtime,
- just call the new ttspdlist() routine to get a list of supported speeds.
- Then the user interface module can build a keyword table or menu from it.
- */
- #ifndef TTSPDLIST
- #ifdef UNIX /* For now, only for UNIX */
- #ifndef OLINUXHISPEED /* But not systems with hacks for */
- #ifndef MINIX /* high speeds, like 110 = 115200 */
- #define TTSPDLIST
- #endif /* MINIX */
- #endif /* OLINUXHISPEED */
- #else
- #ifdef VMS
- #define TTSPDLIST /* VMS gets it too */
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* TTSPDLIST */
- #ifndef NODIAL /* Hangup by modem command */
- #ifndef NOMDMHUP
- #ifndef MDMHUP
- #define MDMHUP
- #endif /* MDMHUP */
- #endif /* NOMDMHUP */
- #endif /* NODIAL */
- #ifdef NOSPL
- #ifndef NOLOGDIAL /* Connection log needs mjd(), etc. */
- #define NOLOGDIAL
- #endif /* NOLOGDIAL */
- #endif /* NOSPL */
- #ifdef pdp11
- #define NOLOGDIAL
- #endif /* pdp11 */
- #ifndef NOLOGDIAL /* Connection log */
- #ifndef CXLOGFILE
- #define CXLOGFILE "CX.LOG" /* Default connection log file name */
- #endif /* CXLOGFILE */
- #ifndef CKLOGDIAL
- #ifndef CK_SMALL
- #define CKLOGDIAL
- #define CXLOGBUFL 1024 /* Connection log record buffer size */
- #endif /* CK_SMALL */
- #endif /* NOLOGDIAL */
- #endif /* CKLOGDIAL */
- #endif /* NOLOCAL */
- #ifdef NOTTSPDLIST /* Except if NOTTSPDLIST is defined */
- #ifdef TTSPDLIST
- #undef TTSPDLIST
- #endif /* TTSPDLIST */
- #endif /* NOTTSPDLIST */
- #ifdef TTSPDLIST
- _PROTOTYP( long * ttspdlist, (void) );
- #else /* TTSPDLIST not defined */
- /*
- We must use a long and convoluted series of #ifdefs that have to be kept in
- sync with the code in the ck?tio.c module.
- We assume that everybody supports: 0, 110, 300, 600, 1200, 2400, 4800, and
- 9600 bps. Symbols for other speeds are defined here. You can also add
- definitions on the CC command lines. These definitions affect the SET SPEED
- keyword table, and are not necessarily usable in the system-dependent
- speed-setting code in the ck?tio.c modules, which depends on system-specific
- symbols like (in UNIX) B19200. In other words, just defining it doesn't
- mean it'll work -- you also have to supply the supporting code in ttsspd()
- and ttgspd() in ck?tio.c.
- The symbols have the form BPS_xxxx, where xxxx is the speed in bits per
- second, or (for bps values larger than 9999) thousands of bps followed by K.
- The total symbol length should be 8 characters or less. Some values are
- enabled automatically below. You can disable a particular value by defining
- NOB_xxxx on the CC command line.
- */
- #ifndef NOB_50
- #define BPS_50 /* 50 bps */
- #endif
- #ifndef NOB_75
- #define BPS_75 /* 75 bps */
- #endif
- #ifndef NOB7512
- #ifdef ANYBSD
- #define BPS_7512 /* 75/1200 Split Speed */
- #endif /* ANYBSD */
- #endif /* NOB7512 */
- #ifndef NOB134
- #ifdef SOLARIS25
- #define BPS_134
- #else
- #undef BPS_134 /* 134.5 bps (IBM 2741) */
- #endif /* BPS_134 */
- #endif /* NOB134 */
- #ifndef NOB_150
- #define BPS_150 /* 150 bps */
- #endif
- #ifndef NOB_200
- #define BPS_200 /* 200 bps */
- #endif
- #ifndef NOB_1800
- #ifdef MAC
- #define BPS_1800 /* 1800 bps */
- #else
- #ifdef SOLARIS25
- #define BPS_1800
- #endif
- #endif
- #endif
- #ifndef NOB_3600
- #ifndef SOLARIS25
- #define BPS_3600 /* 3600 bps */
- #endif
- #endif
- #ifndef NOB_7200
- #ifndef SOLARIS25
- #define BPS_7200 /* 7200 bps */
- #endif /* SOLARIS25 */
- #endif
- #ifndef NOB_14K
- #ifdef BSD44
- #define BPS_14K /* 14400 bps */
- #else
- #ifdef OS2
- #define BPS_14K
- #else
- #ifdef NEXT
- #define BPS_14K
- #else
- #ifdef MAC
- #define BPS_14K
- #else
- #ifdef AMIGA
- #define BPS_14K
- #endif /* AMIGA */
- #endif /* MAC */
- #endif /* NEXT */
- #endif /* OS2 */
- #endif /* BSD44 */
- #endif /* NOB_14K */
- #ifndef NOB_19K
- #define BPS_19K /* 19200 bps */
- #endif
- #ifndef NOB_28K
- #ifdef BSD44
- #define BPS_28K
- #else
- #ifdef OS2
- #define BPS_28K
- #else
- #ifdef NEXT
- #define BPS_28K /* 28800 bps */
- #else
- #ifdef MAC
- #define BPS_28K /* 28800 bps */
- #endif /* MAC */
- #endif /* NEXT */
- #endif /* OS2 */
- #endif /* BSD44 */
- #endif /* NOB_28K */
- #ifndef NOB_38K
- #define BPS_38K /* 38400 bps */
- #endif
- #ifndef NOB_57K
- #ifdef Plan9
- #define BPS_57K
- #else
- #ifdef SOLARIS25
- #define BPS_57K
- #else
- #ifdef VMS
- #define BPS_57K /* 57600 bps */
- #else
- #ifdef OS2
- #define BPS_57K
- #else
- #ifdef __linux__
- #define BPS_57K
- #else
- #ifdef HPUX
- #define BPS_57K
- #else
- #ifdef NEXT
- #define BPS_57K
- #else
- #ifdef __386BSD__
- #define BPS_57K
- #else
- #ifdef __FreeBSD__
- #define BPS_57K
- #else
- #ifdef __NetBSD__
- #define BPS_57K
- #else
- #ifdef MAC
- #define BPS_57K
- #else
- #ifdef QNX
- #define BPS_57K
- #else
- #ifdef BEOSORBEBOX
- #define BPS_57K
- #else
- #ifdef IRIX62
- #define BPS_57K
- #else
- #ifdef SCO_OSR504
- #define BPS_57K
- #else
- #ifdef BSDI2
- #define BPS_57K
- #endif /* BSDI2 */
- #endif /* SCO_OSR504 */
- #endif /* IRIX62 */
- #endif /* BEOSORBEBOX */
- #endif /* QNX */
- #endif /* MAC */
- #endif /* __NetBSD__ */
- #endif /* __FreeBSD__ */
- #endif /* __386BSD__ */
- #endif /* NEXT */
- #endif /* HPUX */
- #endif /* __linux__ */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* SOLARIS25 */
- #endif /* Plan9 */
- #endif /* NOB_57K */
- #ifndef NOB_76K
- #ifdef BSDI2
- #define BPS_76K
- #endif /* BSDI2 */
- #ifdef Plan9
- #define BPS_76K
- #endif /* Plan9 */
- #ifdef SOLARIS25
- #define BPS_76K
- #endif /* SOLARIS25 */
- #ifdef VMS
- #define BPS_76K /* 76800 bps */
- #endif /* VMS */
- #ifdef OS2
- #ifdef __32BIT__
- #define BPS_76K
- #endif /* __32BIT__ */
- #endif /* OS2 */
- #ifdef QNX
- #define BPS_76K
- #endif /* QNX */
- #ifdef IRIX62
- #define BPS_76K
- #endif /* IRIX62 */
- #ifdef SCO_OSR504
- #define BPS_76K
- #endif /* SCO_OSR504 */
- #endif /* NOB_76K */
- #ifndef NOB_115K
- #ifdef BSDI2
- #define BPS_115K
- #endif /* BSDI2 */
- #ifdef Plan9
- #define BPS_115K
- #endif /* Plan9 */
- #ifdef SOLARIS25
- #define BPS_115K
- #endif /* SOLARIS25 */
- #ifdef VMS
- #define BPS_115K /* 115200 bps */
- #else
- #ifdef QNX
- #define BPS_115K
- #else
- #ifdef HPUX
- #define BPS_115K
- #else
- #ifdef __linux__
- #define BPS_115K
- #else
- #ifdef __386BSD__
- #define BPS_115K
- #else
- #ifdef __FreeBSD__
- #define BPS_115K
- #else
- #ifdef __NetBSD__
- #define BPS_115K
- #else
- #ifdef OS2
- #ifdef __32BIT__
- #define BPS_115K
- #endif /* __32BIT__ */
- #else
- #ifdef BEOSORBEBOX
- #define BPS_115K
- #else
- #ifdef IRIX62
- #define BPS_115K
- #else
- #ifdef SCO_OSR504
- #define BPS_115K
- #endif /* SCO_OSR504 */
- #endif /* IRIX62 */
- #endif /* BEOSORBEBOX */
- #endif /* OS2 */
- #endif /* __NetBSD__ */
- #endif /* __FreeBSD__ */
- #endif /* __386BSD__ */
- #endif /* __linux__ */
- #endif /* HPUX */
- #endif /* QNX */
- #endif /* VMS */
- #endif /* NOB_115K */
- #ifndef NOB_230K /* 230400 bps */
- #ifdef BSDI2
- #define BPS_230K
- #else
- #ifdef SCO_OSR504
- #define BPS_230K
- #else
- #ifdef __linux__
- #define BPS_230K
- #else
- #ifdef SOLARIS25
- #define BPS_230K
- #else
- #ifdef OS2
- #ifdef __32BIT__
- #define BPS_230K
- #endif /* __32BIT__ */
- #else
- #undef BPS_230K
- #endif /* OS2 */
- #endif /* SOLARIS25 */
- #endif /* __linux__ */
- #endif /* SCO_OSR504 */
- #endif /* BSDI2 */
- #endif /* NOB_230K */
- #ifndef NOB_460K /* 460800 bps */
- #ifdef SCO_OSR504
- #define BPS_460K
- #else
- #ifdef __linux__
- #define BPS_460K
- #else
- #ifdef OS2
- #ifdef __32BIT__
- #define BPS_460K
- #endif /* __32BIT__ */
- #else
- #undef BPS_460K
- #endif /* __linux__ */
- #endif /* SCO_OSR504 */
- #endif /* OS2 */
- #endif /* NOB_460K */
- #ifndef NOB_921K /* 921600 bps */
- #ifdef SCO_OSR504
- #define BPS_921K
- #endif /* SCO_OSR504 */
- #endif /* NOB_921K */
- #ifdef BPS_921K /* Maximum speed defined */
- #define MAX_SPD 921600L
- #else
- #ifdef BPS_460K
- #define MAX_SPD 460800L
- #else
- #ifdef BPS_230K
- #define MAX_SPD 230400L
- #else
- #ifdef BPS_115K
- #define MAX_SPD 115200L
- #else
- #ifdef BPS_76K
- #define MAX_SPD 76800L
- #else
- #ifdef BPS_57K
- #define MAX_SPD 57600L
- #else
- #ifdef BPS_38K
- #define MAX_SPD 38400L
- #else
- #ifdef BPS_28K
- #define MAX_SPD 28800L
- #else
- #ifdef BPS_19K
- #define MAX_SPD 19200L
- #else
- #ifdef BPS_14K
- #define MAX_SPD 14400L
- #else
- #define MAX_SPD 9600L
- #endif
- #endif
- #endif
- #endif
- #endif
- #endif
- #endif
- #endif
- #endif
- #endif
- #endif /* TTSPDLIST */
- #ifndef CONGSPD /* Systems that can call congspd() */
- #ifdef UNIX
- #define CONGSPD
- #endif /* UNIX */
- #ifdef VMS
- #define CONGSPD
- #endif /* VMS */
- #ifdef STRATUS
- #define CONGSPD
- #endif /* STRATUS */
- #endif /* CONGSPD */
- /* Types of flow control available */
- #define CK_XONXOFF /* Everybody can do this, right? */
- #ifdef AMIGA /* Commodore Amiga */
- #define CK_RTSCTS /* has RTS/CTS */
- #endif /* AMIGA */
- #ifdef SUN4S5 /* SunOS in System V environment */
- #define CK_RTSCTS
- #else /* SunOS 4.0/4.1 in BSD environment */
- #ifdef SUNOS4 /* SunOS 4.0+later supports RTS/CTS */
- #ifdef SUNOS41 /* Easy in 4.1 and later */
- #define CK_RTSCTS
- #else /* Harder in 4.0 */
- #ifndef __GNUC__ /* (see tthflow() in ckutio.c) */
- #ifndef GNUC
- #define CK_RTSCTS /* Only if not using GNU gcc */
- #endif /* __GNUC__ */
- #endif /* GNUC */
- #endif /* SUNOS41 */
- #endif /* SUNOS4 */
- #endif /* SUN4S5 */
- #ifdef BSD44 /* And in 4.4 BSD, including BSDI */
- #define CK_RTSCTS
- #endif /* BSD44 */
- #ifdef TERMIOX /* Sys V R4 <termiox.h> */
- #ifndef CK_RTSCTS
- #define CK_RTSCTS
- #endif /* CK_RTSCTS */
- #ifndef CK_DTRCD
- #define CK_DTRCD
- #endif /* CK_DTRCD */
- #else
- #ifdef STERMIOX /* Sys V R4 <sys/termiox.h> */
- #ifndef CK_RTSCTS
- #define CK_RTSCTS
- #endif /* CK_RTSCTS */
- #ifndef CK_DTRCD
- #define CK_DTRCD
- #endif /* CK_DTRCD */
- #endif /* STERMIOX */
- #endif /* TERMIOX */
- #ifdef OXOS /* Olivetti X/OS R2 struct termios */
- #define CK_RTSCTS /* Ditto. */
- #define CK_DTRCD
- #endif /* OXOS */
- #ifdef AIXRS /* RS/6000 with AIX 3.x */
- #define CK_RTSCTS /* Has its own peculiar method... */
- #endif /* AIXRS */
- #ifdef __linux__ /* Linux */
- #define CK_RTSCTS
- #endif /* __linux__ */
- /*
- Hardware flow control is not defined in POSIX.1. Nevertheless, a certain
- style API for hardware flow control, using tcsetattr() and the CRTSCTS
- bit(s), seems to be gaining currency on POSIX-based UNIX systems. The
- following code defines the symbol POSIX_CRTSCTS for such systems.
- */
- #ifdef CK_RTSCTS
- #ifdef __bsdi__ /* BSDI, a.k.a. BSD/386 */
- #define POSIX_CRTSCTS
- #endif /* __bsdi__ */
- #ifdef __linux__ /* Linux */
- #define POSIX_CRTSCTS
- #endif /* __linux__ */
- #ifdef __NetBSD__ /* NetBSD */
- #define POSIX_CRTSCTS
- #endif /* __NetBSD__ */
- #ifdef __OpenBSD__
- #define POSIX_CRTSCTS
- #endif /* __OpenBSD__ */
- #ifdef BEOSORBEBOX /* BeBOX */
- #define POSIX_CRTSCTS
- /* BEBOX defines CRTSFL as (CTSFLOW & RTSFLOW) */
- #define CRTSCTS CRTSFL
- #endif /* BEOSORBEBOX */
- #ifdef IRIX52 /* IRIX 5.2 and later */
- #define POSIX_CRTSCTS
- #define CRTSCTS CNEW_RTSCTS /* See <sys/termios.h> */
- #endif /* IRIX52 */
- #endif /* CK_RTSCTS */
- /* Implementations that have implemented the ttsetflow() function. */
- #ifndef CK_TTSETFLOW
- #ifdef UNIX
- #define CK_TTSETFLOW
- #endif /* UNIX */
- #ifdef OS2
- #define CK_TTSETFLOW
- #endif /* OS2 */
- #endif /* CK_TTSETFLOW */
- #ifdef CK_TTSETFLOW
- _PROTOTYP( int ttsetflow, (int) );
- #endif /* CK_TTSETFLOW */
- /*
- Systems where we can expand tilde at the beginning of file or directory names
- */
- #ifdef POSIX
- #ifndef DTILDE
- #define DTILDE
- #endif /* DTILDE */
- #endif /* POSIX */
- #ifdef BSD4
- #ifndef DTILDE
- #define DTILDE
- #endif /* DTILDE */
- #endif /* BSD4 */
- #ifdef ATTSV
- #ifndef DTILDE
- #define DTILDE
- #endif /* DTILDE */
- #endif /* ATTSV */
- #ifdef OSK
- #ifndef DTILDE
- #define DTILDE
- #endif /* DTILDE */
- #endif /* OSK */
- #ifdef HPUX /* I don't know why this is */
- #ifndef DTILDE /* necessary, since -DHPUX */
- #define DTILDE /* automatically defines ATTSV */
- #endif /* DTILDE */ /* (see above) ... */
- #endif /* HPUX */
- /*
- This is mainly for the benefit of ckufio.c (UNIX and OS/2 file support).
- Systems that have an atomic rename() function, so we don't have to use
- link() and unlink().
- */
- #ifdef POSIX
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* POSIX */
- #ifdef OS2
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* OS2 */
- #ifdef SUNOS41
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* SUNOS41 */
- #ifdef SVR4
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* SVR4 */
- #ifdef AIXRS
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* AIXRS */
- #ifdef BSD44
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* BSD44 */
- #ifdef NORENAME /* Allow for compile-time override */
- #ifdef RENAME
- #undef RENAME
- #endif /* RENAME */
- #endif /* NORENAME */
- #ifdef STRATUS /* Stratus VOS */
- #ifndef RENAME
- #define RENAME
- #endif /* RENAME */
- #endif /* STRATUS */
- /* Line delimiter for text files */
- /*
- If the system uses a single character for text file line delimitation,
- define NLCHAR to the value of that character. For text files, that
- character will be converted to CRLF upon output, and CRLF will be converted
- to that character on input during text-mode (default) packet operations.
- */
- #ifdef MAC /* Macintosh */
- #define NLCHAR 015
- #else
- #ifdef OSK /* OS-9/68K */
- #define NLCHAR 015
- #else /* All Unix-like systems */
- #define NLCHAR 012
- #endif /* OSK */
- #endif /* MAC */
- /*
- At this point, if there's a system that uses ordinary CRLF line
- delimitation AND the C compiler actually returns both the CR and
- the LF when doing input from a file, then #undef NLCHAR.
- */
- #ifdef OS2 /* OS/2 */
- #undef NLCHAR
- #endif /* OS2 */
- #ifdef GEMDOS /* Atari ST */
- #undef NLCHAR
- #endif /* GEMDOS */
- /*
- VMS file formats are so complicated we need to do all the conversion
- work in the CKVFIO module, so we tell the rest of C-Kermit not to fiddle
- with the bytes.
- */
- #ifdef vms
- #undef NLCHAR
- #endif /* vms */
- /* The device name of a job's controlling terminal */
- /* Special for VMS, same for all Unixes (?), not used by Macintosh */
- #ifdef BEOS
- #define CTTNAM dftty
- #else
- #ifdef vms
- #define CTTNAM "SYS$INPUT:" /* (4 Jan 2002) Was TT: */
- #else
- #ifdef datageneral
- #define CTTNAM "@output"
- #else
- #ifdef OSK
- extern char myttystr[];
- #define CTTNAM myttystr
- #else
- #ifdef OS2
- #define CTTNAM "con"
- #else
- #ifdef UNIX
- #define CTTNAM "/dev/tty"
- #else
- #ifdef GEMDOS
- #define CTTNAM "aux:"
- #else
- #ifdef STRATUS
- extern char myttystr[];
- #define CTTNAM myttystr
- #else /* Anyone else... */
- #define CTTNAM "stdout" /* This is a kludge used by Mac */
- #endif /* STRATUS */
- #endif /* GEMDOS */
- #endif /* UNIX */
- #endif /* OS2 */
- #endif /* OSK */
- #endif /* datageneral */
- #endif /* vms */
- #endif /* BEOS */
- #ifndef HAVECTTNAM
- #ifdef UNIX
- #define HAVECTTNAM
- #else
- #ifdef VMS
- #define HAVECTTNAM
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* HAVECTTNAM */
- #ifndef ZFCDAT /* zfcdat() function available? */
- #ifdef UNIX
- #define ZFCDAT
- #else
- #ifdef STRATUS
- #define ZFCDAT
- #else
- #ifdef GEMDOS
- #define ZFCDAT
- #else
- #ifdef AMIGA
- #define ZFCDAT
- #else
- #ifdef OS2
- #define ZFCDAT
- #else
- #ifdef datageneral
- #define ZFCDAT
- #else
- #ifdef VMS
- #define ZFCDAT
- #endif /* VMS */
- #endif /* datageneral */
- #endif /* OS2 */
- #endif /* AMIGA */
- #endif /* GEMDOS */
- #endif /* STRATUS */
- #endif /* UNIX */
- #endif /* ZFCDAT */
- #ifdef SUNS4S5
- #define tolower _tolower
- #define toupper _toupper
- #endif /* SUNS4S5 */
- /* Error number */
- #ifdef _CRAY
- #ifdef _CRAYCOM /* Cray Computer Corp. */
- extern int errno;
- #else /* _CRAYCOM */
- #include <errno.h> /* Cray Research UNICOS defines */
- /* errno as a function. */
- #endif /* _CRAYCOM */ /* OK for UNICOS 6.1 and 7.0. */
- #else /* _CRAY */
- #ifdef STRATUS /* Stratus VOS */
- #include <errno.h>
- #else /* not STRATUS */
- #ifndef VMS
- #ifndef OS2
- #ifdef __GLIBC__
- /*
- "glibc uses threads, kermit uses glibc; errno access is in Thread Local
- Storage (TLS) from glibc-3.2.2. ...a thread specific errno is being run in
- thread local storage relative to the %gs segment register, so some means to
- revector gets/puts needs to be done." - Jeff Johnson, Red Hat, Feb 2003.
- */
- #include <errno.h>
- #else
- /*
- The following declaration would cause problems for VMS and OS/2, in which
- errno is an "extern volatile int noshare"... NOTE: by now (2007) the
- following is an anachronism and should be the execption rather than the
- rule.
- */
- extern int errno;
- #endif /* __GLIBC__ */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* STRATUS */
- #endif /* _CRAY */
- #ifdef UNIX /* Catch-all so we can have */
- #ifndef ESRCH /* access to error mnemonics */
- #include <errno.h> /* in all modules - 2007/08/25 */
- #endif /* ESRCH */
- #endif /* UNIX */
- #ifdef pdp11 /* Try to make some space on PDP-11 */
- #ifndef NODIAL
- #define NODIAL
- #endif /* NODIAL */
- #ifndef NOCURSES
- #define NOCURSES
- #endif /* NOCURSES */
- #ifndef NOBIGBUF
- #define NOBIGBUF
- #endif /* NOBIGBUF */
- #endif /* pdp11 */
- #ifndef NOBIGBUF
- #ifndef BIGBUFOK /* Platforms with lots of memory */
- #ifdef QNX /* QNX */
- #ifndef QNX16 /* But not 16-bit versions */
- #define BIGBUFOK
- #endif /* QNX16 */
- #endif /* QNX */
- #ifdef BSD44
- #define BIGBUFOK
- #endif /* BSD44 */
- #ifdef STRATUS /* Stratus VOS */
- #define BIGBUFOK
- #endif /* STRATUS */
- #ifdef sparc /* SPARC processors */
- #define BIGBUFOK
- #endif /* sparc */
- #ifdef mips /* MIPS processors */
- #define BIGBUFOK
- #endif /* mips */
- #ifdef HPUX9 /* HP-UX 9.x */
- #define BIGBUFOK
- #endif /* HPUX9 */
- #ifdef HPUX10 /* HP-UX 10.0 PA-RISC */
- #define BIGBUFOK
- #endif /* HPUX10 */
- #ifdef NEXT /* NeXTSTEP */
- #ifdef mc68000 /* on NEXT platforms... */
- #define BIGBUFOK
- #endif /* mc68000 */
- #endif /* NEXT */
- #ifdef LINUX /* Linux from 1998 on should be OK */
- #ifndef BIGBUFOK
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* LINUX */
- #ifdef OS2 /* 32-bit OS/2 2.x and above */
- #ifdef __32BIT__
- #define BIGBUFOK
- #endif /* __32BIT__ */
- #ifdef NT
- #define BIGBUFOK
- #endif /* NT */
- #endif /* OS2 */
- #ifdef Plan9 /* Plan 9 is OK */
- #define BIGBUFOK
- #endif /* Plan9 */
- #ifdef VMS /* Any VMS is OK */
- #ifndef BIGBUFOK
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* VMS */
- #ifdef __alpha /* DEC 64-bit Alpha, e.g. OSF/1 */
- #ifndef BIGBUFOK /* Might already be defined for VMS */
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* __alpha */
- #ifdef sgi /* SGI with IRIX 4.0 or later */
- #ifndef BIGBUFOK
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* sgi */
- #ifdef AIXRS /* AIX on RISC */
- #define BIGBUFOK
- #endif /* AIXRS */
- #ifdef CK_SCOV5 /* SCO OSR5 */
- #ifndef BIGBUFOK
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* CK_SCOV5 */
- #ifdef SOLARIS /* Solaris x86 */
- #ifndef BIGBUFOK
- #define BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* SOLARIS */
- #endif /* BIGBUFOK */
- #endif /* NOBIGBUF */
- #ifdef CK_SMALL
- #ifdef BIGBUFOK
- #undef BIGBUFOK
- #endif /* BIGBUFOK */
- #endif /* CK_SMALL */
- /* If "memory is no problem" then this improves performance */
- #ifdef DEBUG
- #ifdef BIGBUFOK
- #ifndef IFDEBUG
- #define IFDEBUG
- #endif /* IFDEBUG */
- #endif /* BIGBUFOK */
- #endif /* DEBUG */
- /* File System Defaults */
- #ifndef UIDBUFLEN /* Length of User ID */
- #ifdef OS2
- #define UIDBUFLEN 256
- #else /* OS2 */
- #ifdef BIGBUFOK
- #define UIDBUFLEN 256
- #else
- #define UIDBUFLEN 64
- #endif /* BIGBUFOK */
- #endif /* OS2 */
- #endif /* UIDBUFLEN */
- #ifdef UNIX
- #ifdef PROVX1
- #define MAXWLD 50
- #else
- #ifdef pdp11
- #define MAXWLD 50
- #else
- #ifdef BIGBUFOK
- #define MAXWLD 102400
- #else
- #define MAXWLD 1024
- #endif /* BIGBUFOK */
- #endif /* pdp11 */
- #endif /* PROVX1 */
- #else
- #ifdef VMS
- #define MAXWLD 102400 /* Maximum wildcard filenames */
- #else
- #ifdef datageneral
- #define MAXWLD 500
- #else
- #ifdef STRATUS
- #define MAXWLD 5000
- #endif /* STRATUS */
- #endif /* datageneral */
- #endif /* VMS */
- #endif /* UNIX */
- #ifdef VMS
- #define DBLKSIZ 512
- #define DLRECL 512
- #else
- #define DBLKSIZ 0
- #define DLRECL 0
- #endif /* VMS */
- /* Communication device / network host name length */
- #ifdef BIGBUFOK
- #define TTNAMLEN 512
- #else
- #ifdef MAC
- #define TTNAMLEN 256
- #else
- #ifndef CK_SMALL
- #define TTNAMLEN 128
- #else
- #define TTNAMLEN 80
- #endif /* CK_SMALL */
- #endif /* MAC */
- #endif /* BIGBUFOK */
- /* Program return codes for DECUS C and UNIX (VMS uses UNIX codes) */
- #ifdef decus
- #define GOOD_EXIT IO_NORMAL
- #define BAD_EXIT IO_ERROR
- #else
- #define GOOD_EXIT 0
- #define BAD_EXIT 1
- #endif /* decus */
- /* Special hack for Fortune, which doesn't have <sys/file.h>... */
- #ifdef FT18
- #define FREAD 0x01
- #define FWRITE 0x10
- #endif /* FT18 */
- /* Special hack for OS-9/68k */
- #ifdef OSK
- #ifndef _UCC
- #define SIGALRM 30 /* May always cancel I/O */
- #endif /* _UCC */
- #define SIGARB 1234 /* Arbitrary for I/O */
- SIGTYP (*signal())();
- #endif /* OSK */
- #ifdef MINIX
- #ifdef putchar
- #undef putchar
- #endif /* putchar */
- #define putchar(c) (putc(c,stdout)!=EOF)&&fflush(stdout)
- #endif /* MINIX */
- #ifdef datageneral /* Data General AOS/VS */
- #ifdef putchar
- #undef putchar
- #endif /* putchar */
- #define putchar(c) conoc(c)
- #endif /* datageneral */
- /* Escape/quote character used by the command parser */
- #define CMDQ '\\'
- /* Symbols for RS-232 modem signals */
- #define KM_FG 1 /* Frame ground */
- #define KM_TXD 2 /* Transmit */
- #define KM_RXD 3 /* Receive */
- #define KM_RTS 4 /* Request to Send */
- #define KM_CTS 5 /* Clear to Send */
- #define KM_DSR 6 /* Data Set Ready */
- #define KM_SG 7 /* Signal ground */
- #define KM_DCD 8 /* Carrier Detect */
- #define KM_DTR 20 /* Data Terminal Ready */
- #define KM_RI 22 /* Ring Indication */
- /* Bit mask values for modem signals */
- #define BM_CTS 0001 /* Clear to send (From DCE) */
- #define BM_DSR 0002 /* Dataset ready (From DCE) */
- #define BM_DCD 0004 /* Carrier (From DCE) */
- #define BM_RNG 0010 /* Ring Indicator (From DCE) */
- #define BM_DTR 0020 /* Data Terminal Ready (From DTE) */
- #define BM_RTS 0040 /* Request to Send (From DTE) */
- /* Codes for full duplex flow control */
- #define FLO_NONE 0 /* None */
- #define FLO_XONX 1 /* Xon/Xoff (soft) */
- #define FLO_RTSC 2 /* RTS/CTS (hard) */
- #define FLO_DTRC 3 /* DTR/CD (hard) */
- #define FLO_ETXA 4 /* ETX/ACK (soft) */
- #define FLO_STRG 5 /* String-based (soft) */
- #define FLO_DIAL 6 /* DIALing kludge */
- #define FLO_DIAX 7 /* Cancel dialing kludge */
- #define FLO_DTRT 8 /* DTR/CTS (hard) */
- #define FLO_KEEP 9 /* Keep, i.e. don't touch or change */
- #define FLO_AUTO 10 /* Figure out automatically */
- /* Types of connections */
- #define CXT_REMOTE 0 /* Remote mode - no connection */
- #define CXT_DIRECT 1 /* Direct serial connection */
- #define CXT_MODEM 2 /* Modem dialout */
- #define CXT_TCPIP 3 /* TCP/IP - Telnet, Rlogin, etc */
- #define CXT_X25 4 /* X.25 peer-to-peer */
- #define CXT_DECNET 5 /* DECnet (CTERM, etc) */
- #define CXT_LAT 6 /* LAT */
- #define CXT_NETBIOS 7 /* NETBIOS */
- #define CXT_NPIPE 8 /* Named Pipe */
- #define CXT_PIPE 9 /* Pipe, Command, PTY, DLL, etc */
- #define CXT_SSH 10 /* SSH */
- #define CXT_MAX 10 /* Highest connection type */
- /* Autodownload Detection Options */
- #define ADL_PACK 0 /* Auto-Download detect packet */
- #define ADL_STR 1 /* Auto-Download detect string */
- /* And finally... */
- #ifdef COMMENT /* Make sure this is NOT defined! */
- #undef COMMENT
- #endif /* COMMENT */
- /* zstr zattr filinfo were here (moved to top for DECC 5 Jun 2000) */
- #ifndef ZFNQFP /* Versions that have zfnqfp() */
- #ifdef UNIX
- #define ZFNQFP
- #else
- #ifdef VMS
- #define ZFNQFP
- #else
- #ifdef OS2
- #define ZFNQFP
- #else
- #ifdef datageneral
- #define ZFNQFP
- #else
- #ifdef STRATUS
- #define ZFNQFP
- #endif /* STRATUS */
- #endif /* datageneral */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* UNIX */
- struct zfnfp {
- int len; /* Length of full pathname */
- char * fpath; /* Pointer to full pathname */
- char * fname; /* Pointer to name part */
- };
- #endif /* ZFNQFP */
- /* Systems that support FILE TYPE LABELED */
- #ifdef VMS
- #define CK_LABELED
- #else
- #ifdef OS2
- #ifdef __32BIT__
- #ifndef NT
- #define CK_LABELED
- #endif /* NT */
- #endif /* __32BIT__ */
- #endif /* OS2 */
- #endif /* VMS */
- /* LABELED FILE options bitmask */
- #ifdef VMS /* For VMS */
- #define LBL_NAM 1 /* Ignore incoming name if set */
- #define LBL_PTH 2 /* Use complete path if set */
- #define LBL_ACL 4 /* Preserve ACLs if set */
- #define LBL_BCK 8 /* Preserve backup date if set */
- #define LBL_OWN 16 /* Preserve ownership if set */
- #else
- #ifdef OS2 /* Ditto for OS/2 */
- #define LBL_NOR 0x0000 /* Normal file */
- #define LBL_ARC 0x0020 /* Archive */
- #define LBL_DIR 0x0010 /* Directory */
- #define LBL_HID 0x0002 /* Hidden file */
- #define LBL_RO 0x0001 /* Read only file */
- #define LBL_SYS 0x0004 /* System file */
- #define LBL_EXT 0x0040 /* Extended */
- #endif /* OS2 */
- #endif /* VMS */
- /*
- Data types. First the header file for data types so we can pick up the
- types used for pids, uids, and gids. Override this section by putting
- -DCKTYP_H=xxx on the command line to specify the header file where your
- system defines these types.
- */
- #ifndef STRATUS
- #ifdef __ALPHA
- #ifdef MULTINET
- #define CK_TGV_AXP
- #endif /* MULTINET */
- #endif /* __ALPHA */
- #ifdef CK_TGV_AXP /* Alpha, VMS, MultiNet */
- /*
- Starting in DECC 5.0, <stdlib.h> no longer includes <types.h>.
- But before that an elaborate workaround is required, which results in
- including <types.h> sometimes but not others, evidently depending on whether
- <types.h> protects itself against multiple inclusion, which in turn probably
- differentiates between DECC <types.h> and TGV <types.h>. Unfortunately I
- don't remember the details. (fdc, 25 Oct 96)
- */
- #ifdef COMMENT
- /*
- Previously the test here was for DEC version prior to 4.0, but since the
- test involved an "#if" statement, it was not portable and broke some non-VMS
- builds. In any case, condition was never satisfied, so the result of
- commenting this section out is the same as the previous "#if" condition.
- */
- #ifndef __TYPES_LOADED
- #define __TYPES_LOADED /* Work around bug in .h files */
- #endif /* __TYPES_LOADED */
- #endif /* COMMENT */
- #include <sys/types.h>
- #ifdef IF_DOT_H
- #ifndef MULTINET
- #include <if.h> /* Needed to put up u_int typedef */
- #endif /* MULTINET */
- #else /* IF_DOT_H */
- #ifdef NEEDUINT
- typedef unsigned int u_int;
- #endif /* NEEDUINT */
- #endif /* IF_DOT_H */
- #else /* !CK_TGV_AXP */
- #ifdef OSK /* OS-9 */
- #include <types.h>
- #else /* General case, not OS-9 */
- #ifndef CKTYP_H
- #ifndef VMS
- #ifndef MAC
- #ifndef AMIGA
- #define CKTYP_H <sys/types.h>
- #endif /* AMIGA */
- #endif /* MAC */
- #endif /* VMS */
- #endif /* CKTYP_H */
- #ifdef GEMDOS
- #undef CKTYP_H
- #include <types.h>
- #endif /* GEMDOS */
- #ifdef OS2
- #undef CKTYP_H
- #include <sys/types.h>
- #endif /* OS2 */
- #ifdef CKTYP_H /* Include it. */
- #ifdef COHERENT /* Except for COHERENT */
- #include <unistd.h>
- #include <sys/types.h>
- #else
- #ifdef datageneral /* AOS/VS */
- #include <sys/types.h>
- #else /* All others */
- #ifdef __bsdi__ /* BSDI */
- #ifdef POSIX
- #undef _POSIX_SOURCE
- #endif /* POSIX */
- #endif /* __bsdi__ */
- #include CKTYP_H
- #ifdef __bsdi__
- #ifdef POSIX
- #define _POSIX_SOURCE
- #endif /* POSIX */
- #endif /* __bsdi__ */
- #endif /* datageneral */
- #endif /* COHERENT */
- #endif /* CKTYP_H */
- #endif /* OSK */
- #endif /* CK_TGV_AXP */
- #endif /* STRATUS */ /* End of types.h section */
- /*
- File lengths and offsets. This section is expected to grow as we
- support long files on 32-bit platforms. We want this data type to be
- signed because so many functions return either a file size or a negative
- value to indicate an error.
- */
- #ifndef CK_OFF_T
- #ifdef OS2
- #ifdef NT
- #define CK_OFF_T __int64
- #else
- #define CK_OFF_T long
- #endif /* NT */
- #endif /* OS2 */
- #endif /* CK_OFF_T */
- /* FreeBSD and OpenBSD set off_t to the appropriate size unconditionally */
- #ifndef CK_OFF_T
- #ifdef __FreeBSD__
- #define CK_OFF_T off_t
- #else
- #ifdef __OpenBSD__
- #define CK_OFF_T off_t
- #endif /* __OpenBSD__ */
- #endif /* __FreeBSD__ */
- #endif /* CK_OFF_T */
- /* 32-bit platforms that support long files thru "transitional interface" */
- /* These include Linux, Solaris, NetBSD... */
- #ifdef AIXRS
- #ifdef _LARGE_FILES
- #ifndef CK_OFF_T
- #define CK_OFF_T off_t
- #endif /* CK_OFF_T */
- #endif /* _LARGE_FILES */
- #endif /* AIXRS */
- #ifdef _LARGEFILE_SOURCE
- #ifndef CK_OFF_T
- #define CK_OFF_T off_t
- #endif /* CK_OFF_T */
- #ifdef IRIX
- #define CKFSEEK(a,b,c) fseek64(a,b,c)
- #define CKFTELL(a) ftell64(a)
- #else /* IRIX */
- #define CKFSEEK(a,b,c) fseeko(a,b,c)
- #define CKFTELL(a) ftello(a)
- #endif /* IRIX */
- #else /* Not _LARGEFILE_SOURCE */
- #define CKFSEEK(a,b,c) fseek(a,b,c)
- #define CKFTELL(a) ftell(a)
- /* See below the next section for the catch-all case */
- #endif /* _LARGEFILE_SOURCE */
- /* 32-bit or 64-bit platforms */
- /* CK_64BIT is a compile-time symbol indicating a true 64-bit build */
- /* meaning that longs and pointers are 64 bits */
- #ifndef VMS /* VMS Alpha and IA64 are 32-bit! */
- #ifndef CK_64BIT
- #ifdef _LP64 /* Solaris */
- #define CK_64BIT
- #else
- #ifdef __LP64__ /* MacOS X 10.4 (or _LP64,__ppc64__) */
- #define CK_64BIT
- #else
- #ifdef __arch64__ /* gcc alpha, sparc */
- #define CK_64BIT
- #else
- #ifdef __alpha /* Alpha decc (or __ALPHA) */
- #define CK_64BIT
- #else
- #ifdef __amd64 /* AMD x86_64 */
- #define CK_64BIT
- #else
- #ifdef __x86_64 /* AMD/Intel x86_64 */
- #define CK_64BIT
- #else
- #ifdef __ia64 /* Intel IA64 */
- #ifndef HPUX
- #define CK_64BIT
- #endif /* HPUX */
- #endif /* __ia64 */
- #endif /* __x86_64 */
- #endif /* __amd64 */
- #endif /* __alpha */
- #endif /* __arch64__ */
- #endif /* __LP64__ */
- #endif /* _LP64 */
- #endif /* CK_64BIT */
- #endif /* VMS */
- #ifndef CK_OFF_T
- #ifdef CK_64BIT
- #define CK_OFF_T off_t /* This has to be signed */
- #else /* CK_64BIT */
- #define CK_OFF_T long /* Signed */
- #endif /* CK_64BIT */
- #endif /* CK_OFF_T */
- #ifndef TLOG
- #define tlog(a,b,c,d)
- #else
- #ifndef CKCMAI
- /* Debugging included. Declare debug log flag in main program only. */
- extern int tralog, tlogfmt;
- #endif /* CKCMAI */
- _PROTOTYP(VOID dotlog,(int, char *, char *, CK_OFF_T));
- #define tlog(a,b,c,d) if (tralog && tlogfmt) dotlog(a,b,c,(CK_OFF_T)d)
- _PROTOTYP(VOID doxlog,(int, char *, CK_OFF_T, int, int, char *));
- #endif /* TLOG */
- #ifndef DEBUG
- /* Compile all the debug() statements away. Saves a lot of space and time. */
- #define debug(a,b,c,d)
- #define ckhexdump(a,b,c)
- /* Now define the debug() macro. */
- #else /* DEBUG */
- _PROTOTYP(int dodebug,(int,char *,char *,CK_OFF_T));
- _PROTOTYP(int dohexdump,(CHAR *,CHAR *,int));
- #ifdef IFDEBUG
- /* Use this form to avoid function calls: */
- #ifdef COMMENT
- #define debug(a,b,c,d) if (deblog) dodebug(a,b,(char *)(c),(CK_OFF_T)(d))
- #define ckhexdump(a,b,c) if (deblog) dohexdump((CHAR *)(a),(CHAR *)(b),c)
- #else
- #ifdef CK_ANSIC
- #define debug(a,b,c,d) \
- ((void)(deblog?dodebug(a,b,(char *)(c),(CK_OFF_T)(d)):0))
- #define ckhexdump(a,b,c) \
- ((void)(deblog?dohexdump((CHAR *)(a),(CHAR *)(b),c):0))
- #else
- #define debug(a,b,c,d) (deblog?dodebug(a,b,(char *)(c),(CK_OFF_T)(d)):0)
- #define ckhexdump(a,b,c) (deblog?dohexdump((CHAR *)(a),(CHAR *)(b),c):0)
- #endif /* CK_ANSIC */
- #endif /* COMMENT */
- #else /* IFDEBUG */
- /* Use this form to save space: */
- #define debug(a,b,c,d) dodebug(a,b,(char *)(c),(CK_OFF_T)(d))
- #define ckhexdump(a,b,c) dohexdump((CHAR *)(a),(CHAR *)(b),c)
- #endif /* IFDEBUG */
- #endif /* DEBUG */
- /* Structure definitions for Kermit file attributes */
- /* All strings come as pointer and length combinations */
- /* Empty string (or for numeric variables, -1) = unused attribute. */
- struct zstr { /* string format */
- int len; /* length */
- char *val; /* value */
- };
- struct zattr { /* Kermit File Attribute structure */
- CK_OFF_T lengthk; /* (!) file length in K */
- struct zstr type; /* (") file type (text or binary) */
- struct zstr date; /* (#) file creation date yyyymmdd[ hh:mm[:ss]] */
- struct zstr creator; /* ($) file creator id */
- struct zstr account; /* (%) file account */
- struct zstr area; /* (&) area (e.g. directory) for file */
- struct zstr password; /* (') password for area */
- long blksize; /* (() file blocksize */
- struct zstr xaccess; /* ()) file access: new, supersede, append, warn */
- struct zstr encoding; /* (*) encoding (transfer syntax) */
- struct zstr disp; /* (+) disposition (mail, message, print, etc) */
- struct zstr lprotect; /* (,) protection (local syntax) */
- struct zstr gprotect; /* (-) protection (generic syntax) */
- struct zstr systemid; /* (.) ID for system of origin */
- struct zstr recfm; /* (/) record format */
- struct zstr sysparam; /* (0) system-dependent parameter string */
- CK_OFF_T length; /* (1) exact length on system of origin */
- struct zstr charset; /* (2) transfer syntax character set */
- #ifdef OS2
- struct zstr longname; /* OS/2 longname if applicable */
- #endif /* OS2 */
- struct zstr reply; /* This goes last, used for attribute reply */
- };
- /* Kermit file information structure */
- struct filinfo {
- int bs; /* Blocksize */
- int cs; /* Character set */
- long rl; /* Record length */
- int org; /* Organization */
- int fmt; /* Record format */
- int cc; /* Carriage control */
- int typ; /* Type (text/binary) */
- int dsp; /* Disposition */
- char *os_specific; /* OS-specific attributes */
- #ifdef OS2
- unsigned long int lblopts; /* LABELED FILE options bitmask */
- #else
- int lblopts;
- #endif /* OS2 */
- };
- /*
- Data type for pids. If your system uses a different type, put something
- like -DPID_T=pid_t on command line, or override here.
- */
- #ifndef PID_T
- #define PID_T int
- #endif /* PID_T */
- /*
- Data types for uids and gids. Same deal as for pids.
- Wouldn't be nice if there was a preprocessor test to find out if a
- typedef existed?
- */
- #ifdef VMS
- /* Not used in VMS so who cares */
- #define UID_T int
- #define GID_T int
- #endif /* VMS */
- #ifdef POSIX
- /* Or would it be better (or worse?) to use _POSIX_SOURCE here? */
- #ifndef UID_T
- #define UID_T uid_t
- #endif /* UID_T */
- #ifndef GID_T
- #define GID_T gid_t
- #endif /* GID_T */
- #else /* Not POSIX */
- #ifdef SVR4
- /* SVR4 and later have uid_t and gid_t. */
- /* SVR3 and earlier use int, or unsigned short, or.... */
- #ifndef UID_T
- #define UID_T uid_t
- #endif /* UID_T */
- #ifndef GID_T
- #define GID_T gid_t
- #endif /* GID_T */
- #else /* Not SVR4 */
- #ifdef BSD43
- #ifndef UID_T
- #define UID_T uid_t
- #endif /* UID_T */
- #ifndef GID_T
- #define GID_T gid_t
- #endif /* GID_T */
- #else /* Not BSD43 */
- /* Default these to int for older UNIX versions */
- #ifndef UID_T
- #define UID_T int
- #endif /* UID_T */
- #ifndef GID_T
- #define GID_T int
- #endif /* GID_T */
- #endif /* BSD43 */
- #endif /* SVR4 */
- #endif /* POSIX */
- /*
- getpwuid() arg type, which is not necessarily the same as UID_T,
- e.g. in SCO UNIX SVR3, it's int.
- */
- #ifndef PWID_T
- #define PWID_T UID_T
- #endif /* PWID_T */
- #ifdef CK_REDIR
- #ifdef NEXT
- #define MACHWAIT
- #else
- #ifdef MACH
- #define MACHWAIT
- #endif /* MACH */
- #endif /* NEXT */
- #ifdef MACHWAIT /* WAIT_T argument for wait() */
- #include <sys/wait.h>
- #define CK_WAIT_H
- typedef union wait WAIT_T;
- #else
- #ifdef POSIX
- #ifdef OSF
- /* OSF wait.h defines BSD wait if _BSD is defined so hide _BSD from wait.h */
- #ifdef _BSD
- #define CK_OSF_BSD
- #undef _BSD
- #endif /* _BSD */
- #endif /* OSF */
- #include <sys/wait.h>
- #define CK_WAIT_H
- #ifndef WAIT_T
- typedef int WAIT_T;
- #endif /* WAIT_T */
- #ifdef CK_OSF_BSD /* OSF/1: Restore _BSD definition */
- #define _BSD
- #undef CK_OSF_BSD
- #endif /* CK_OSF_BSD */
- #else /* !POSIX */
- typedef int WAIT_T;
- #endif /* POSIX */
- #endif /* MACHWAIT */
- #else
- typedef int WAIT_T;
- #endif /* CK_REDIR */
- /* Assorted other blah_t's handled here... */
- #ifndef SIZE_T
- #define SIZE_T size_t
- #endif /* SIZE_T */
- /* Forward declarations of system-dependent functions callable from all */
- /* C-Kermit modules. */
- /* File-related functions from system-dependent file i/o module */
- #ifndef CKVFIO_C
- /* For some reason, this does not agree with DEC C */
- _PROTOTYP( int zkself, (void) );
- #endif /* CKVFIO_C */
- _PROTOTYP( int zopeni, (int, char *) );
- _PROTOTYP( int zopeno, (int, char *, struct zattr *, struct filinfo *) );
- _PROTOTYP( int zclose, (int) );
- #ifndef MAC
- _PROTOTYP( int zchin, (int, int *) );
- #endif /* MAC */
- _PROTOTYP( int zxin, (int, char *, int) );
- _PROTOTYP( int zsinl, (int, char *, int) );
- _PROTOTYP( int zinfill, (void) );
- _PROTOTYP( int zsout, (int, char*) );
- _PROTOTYP( int zsoutl, (int, char*) );
- _PROTOTYP( int zsoutx, (int, char*, int) );
- _PROTOTYP( int zchout, (int, char) );
- _PROTOTYP( int zoutdump, (void) );
- _PROTOTYP( int zsyscmd, (char *) );
- _PROTOTYP( int zshcmd, (char *) );
- #ifdef UNIX
- _PROTOTYP( int zsetfil, (int, int) );
- _PROTOTYP( int zchkpid, (unsigned long) );
- #endif /* UNIX */
- #ifdef CKEXEC
- _PROTOTYP( VOID z_exec, (char *, char **, int) );
- #endif /* CKEXEC */
- _PROTOTYP( int chkfn, (int) );
- _PROTOTYP( CK_OFF_T zchki, (char *) );
- #ifdef VMSORUNIX
- _PROTOTYP( CK_OFF_T zgetfs, (char *) );
- #else
- #ifdef OS2
- _PROTOTYP( CK_OFF_T zgetfs, (char *) );
- #else
- #define zgetfs(a) zchki(a)
- #endif /* OS2 */
- #endif /* VMSORUNIX */
- _PROTOTYP( int iswild, (char *) );
- _PROTOTYP( int isdir, (char *) );
- _PROTOTYP( int zchko, (char *) );
- _PROTOTYP( int zdelet, (char *) );
- _PROTOTYP( VOID zrtol, (char *,char *) );
- _PROTOTYP( VOID zltor, (char *,char *) );
- _PROTOTYP( VOID zstrip, (char *,char **) );
- #ifdef VMS
- _PROTOTYP( char * zrelname, (char *, char *) );
- #endif /* VMS */
- _PROTOTYP( int zchdir, (char *) );
- _PROTOTYP( char * zhome, (void) );
- _PROTOTYP( char * zgtdir, (void) );
- _PROTOTYP( int zxcmd, (int, char *) );
- #ifndef MAC
- _PROTOTYP( int zclosf, (int) );
- #endif /* MAC */
- #ifdef NZXPAND
- #ifdef OS2
- /* [jt] 2013/11/21 - CHAR/char conflict between K95 and others */
- _PROTOTYP( int nzxpand, (CHAR *, int) );
- #else
- _PROTOTYP( int nzxpand, (char *, int) );
- #endif /* OS2 */
- #else /* NZXPAND */
- _PROTOTYP( int zxpand, (char *) );
- #endif /* NZXPAND */
- _PROTOTYP( int znext, (char *) );
- #ifdef ZXREWIND
- _PROTOTYP( int zxrewind, (void) );
- #endif /* ZXREWIND */
- _PROTOTYP( int zchkspa, (char *, CK_OFF_T) );
- _PROTOTYP( VOID znewn, (char *, char **) );
- _PROTOTYP( int zrename, (char *, char *) );
- _PROTOTYP( int zcopy, (char *, char *) );
- _PROTOTYP( int zsattr, (struct zattr *) );
- _PROTOTYP( int zfree, (char *) );
- _PROTOTYP( char * zfcdat, (char *) );
- _PROTOTYP( int zstime, (char *, struct zattr *, int) );
- #ifdef CK_PERMS
- _PROTOTYP( char * zgperm, (char *) );
- _PROTOTYP( char * ziperm, (char *) );
- #endif /* CK_PERMS */
- _PROTOTYP( int zmail, (char *, char *) );
- _PROTOTYP( int zprint, (char *, char *) );
- _PROTOTYP( char * tilde_expand, (char *) );
- _PROTOTYP( int zmkdir, (char *) ) ;
- _PROTOTYP( int zfseek, (CK_OFF_T) ) ;
- #ifdef ZFNQFP
- _PROTOTYP( struct zfnfp * zfnqfp, (char *, int, char * ) ) ;
- #else
- #define zfnqfp(a,b,c) ckstrncpy(c,a,b)
- #endif /* ZFNQFP */
- _PROTOTYP( int zvuser, (char *) ) ;
- _PROTOTYP( int zvpass, (char *) ) ;
- _PROTOTYP( VOID zvlogout, (void) ) ;
- #ifdef OS2
- _PROTOTYP( int os2setlongname, ( char * fn, char * ln ) ) ;
- _PROTOTYP( int os2getlongname, ( char * fn, char ** ln ) ) ;
- _PROTOTYP( int os2rexx, ( char *, char *, int ) ) ;
- _PROTOTYP( int os2rexxfile, ( char *, char *, char *, int) ) ;
- _PROTOTYP( int os2geteas, (char *) ) ;
- _PROTOTYP( int os2seteas, (char *) ) ;
- _PROTOTYP( char * get_os2_vers, (void) ) ;
- _PROTOTYP( int do_label_send, (char *) ) ;
- _PROTOTYP( int do_label_recv, (void) ) ;
- #ifdef OS2MOUSE
- _PROTOTYP( unsigned long os2_mouseon, (void) );
- _PROTOTYP( unsigned long os2_mousehide, (void) );
- _PROTOTYP( unsigned long os2_mouseshow, (void) );
- _PROTOTYP( unsigned long os2_mouseoff, (void) );
- _PROTOTYP( void os2_mouseevt, (void *) );
- _PROTOTYP( int mousebuttoncount, (void));
- #endif /* OS2MOUSE */
- #endif /* OS2 */
- /* Functions from system-dependent terminal i/o module */
- _PROTOTYP( int ttopen, (char *, int *, int, int) ); /* tty functions */
- #ifndef MAC
- _PROTOTYP( int ttclos, (int) );
- #endif /* MAC */
- _PROTOTYP( int tthang, (void) );
- _PROTOTYP( int ttres, (void) );
- _PROTOTYP( int ttpkt, (long, int, int) );
- #ifndef MAC
- _PROTOTYP( int ttvt, (long, int) );
- #endif /* MAC */
- _PROTOTYP( int ttsspd, (int) );
- _PROTOTYP( long ttgspd, (void) );
- _PROTOTYP( int ttflui, (void) );
- _PROTOTYP( int ttfluo, (void) );
- _PROTOTYP( int ttpushback, (CHAR *, int) );
- _PROTOTYP( int ttpeek, (void) );
- _PROTOTYP( int ttgwsiz, (void) );
- _PROTOTYP( int ttchk, (void) );
- _PROTOTYP( int ttxin, (int, CHAR *) );
- _PROTOTYP( int ttxout, (CHAR *, int) );
- _PROTOTYP( int ttol, (CHAR *, int) );
- _PROTOTYP( int ttoc, (char) );
- _PROTOTYP( int ttinc, (int) );
- _PROTOTYP( int ttscarr, (int) );
- _PROTOTYP( int ttgmdm, (void) );
- _PROTOTYP( int ttsndb, (void) );
- _PROTOTYP( int ttsndlb, (void) );
- #ifdef UNIX
- _PROTOTYP( char * ttglckdir, (void) );
- #endif /* UNIX */
- #ifdef PARSENSE
- #ifdef UNIX
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
- #else
- #ifdef VMS
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
- #else
- #ifdef STRATUS
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
- #else
- #ifdef OS2
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
- #else
- #ifdef OSK
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
- #else
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR) );
- #endif /* OSK */
- #endif /* OS2 */
- #endif /* STRATUS */
- #endif /* VMS */
- #endif /* UNIX */
- #else /* ! PARSENSE */
- _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR) );
- #endif /* PARSENSE */
- /* XYZMODEM support */
- /*
- CK_XYZ enables the various commands and data structures.
- XYZ_INTERNAL means these protocols are built-in; if not defined,
- then they are external. XYZ_DLL is used to indicate a separate
- loadable library containing the XYZmodem protocol code.
- */
- #ifdef pdp11 /* No room for this in PDP-11 */
- #define NOCKXYZ
- #endif /* pdp11 */
- #ifndef NOCKXYZ /* Alternative protocols */
- #ifndef CK_XYZ
- #ifdef UNIX
- #define CK_XYZ
- #else
- #ifdef OS2
- #define CK_XYZ
- #ifndef NOXYZDLL
- #define XYZ_INTERNAL /* Internal and DLL */
- #define XYZ_DLL
- #endif /* NOXYZDLL */
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* CK_XYZ */
- #endif /* NOCKXYZ */
- #ifdef XYZ_INTERNAL /* This ensures that XYZ_INTERNAL */
- #ifndef CK_XYZ /* is defined only if CK_XYZ is too */
- #undef XYZ_INTERNAL
- #endif /* CK_XYZ */
- #endif /* XYZ_INTERNAL */
- #ifdef XYZ_DLL /* This ensures XYZ_DLL is defined */
- #ifndef XYZ_INTERNAL /* only if XYZ_INTERNAL is too */
- #undef XYZ_DLL
- #endif /* XYZ_INTERNAL */
- #endif /* XYZ_DLL */
- /* Console functions */
- _PROTOTYP( int congm, (void) );
- #ifdef COMMENT
- _PROTOTYP( VOID conint, (SIGTYP (*)(int, int), SIGTYP (*)(int, int)) );
- #else
- _PROTOTYP( VOID conint, (SIGTYP (*)(int), SIGTYP (*)(int)) );
- #endif /* COMMENT */
- _PROTOTYP( VOID connoi, (void) );
- _PROTOTYP( int concb, (char) );
- #ifdef CONGSPD
- _PROTOTYP( long congspd, (void) );
- #endif /* CONGSPD */
- _PROTOTYP( int conbin, (char) );
- _PROTOTYP( int conres, (void) );
- _PROTOTYP( int conoc, (char) );
- _PROTOTYP( int conxo, (int, char *) );
- _PROTOTYP( int conol, (char *) );
- _PROTOTYP( int conola, (char *[]) );
- _PROTOTYP( int conoll, (char *) );
- _PROTOTYP( int conchk, (void) );
- _PROTOTYP( int coninc, (int) );
- _PROTOTYP( char * conkbg, (void) );
- _PROTOTYP( int psuspend, (int) );
- _PROTOTYP( int priv_ini, (void) );
- _PROTOTYP( int priv_on, (void) );
- _PROTOTYP( int priv_off, (void) );
- _PROTOTYP( int priv_can, (void) );
- _PROTOTYP( int priv_chk, (void) );
- _PROTOTYP( int priv_opn, (char *, int) );
- _PROTOTYP( int sysinit, (void) ); /* Misc Kermit functions */
- _PROTOTYP( int syscleanup, (void) );
- _PROTOTYP( int msleep, (int) );
- _PROTOTYP( VOID rtimer, (void) );
- _PROTOTYP( int gtimer, (void) );
- #ifdef GFTIMER
- _PROTOTYP( VOID rftimer, (void) );
- _PROTOTYP( CKFLOAT gftimer, (void) );
- #endif /* GFTIMER */
- _PROTOTYP( VOID ttimoff, (void) );
- _PROTOTYP( VOID ztime, (char **) );
- _PROTOTYP( int parchk, (CHAR *, CHAR, int) );
- _PROTOTYP( VOID doexit, (int, int) );
- _PROTOTYP( int askmore, (void) );
- _PROTOTYP( VOID fatal, (char *) );
- _PROTOTYP( VOID fatal2, (char *, char *) );
- #ifdef VMS
- _PROTOTYP( int ck_cancio, (void) );
- #endif /* VMS */
- /* Key mapping support */
- #ifdef NOICP
- #ifndef NOSETKEY
- #define NOSETKEY
- #endif /* NOSETKEY */
- #endif /* NOICP */
- #ifdef MAC
- #ifndef NOSETKEY
- #define NOSETKEY
- #endif /* NOSETKEY */
- #endif /* MAC */
- _PROTOTYP( int congks, (int) );
- #ifdef OS2
- /* OS2 requires these definitions even if SET KEY is not being supported */
- #define KMSIZE 8916
- typedef ULONG KEY;
- typedef CHAR *MACRO;
- extern int wideresult;
- #else /* Not OS2 */
- #ifndef NOSETKEY
- /*
- Catch-all for systems where we don't know how to read keyboard scan
- codes > 255.
- */
- #define KMSIZE 256
- /* Note: CHAR (i.e. unsigned char) is very important here. */
- typedef CHAR KEY;
- typedef CHAR * MACRO;
- #define congks coninc
- #endif /* NOSETKEY */
- #endif /* OS2 */
- #ifndef OS2
- #ifndef NOKVERBS /* No \Kverbs unless... */
- #define NOKVERBS
- #endif /* NOKVERBS */
- #endif /* OS2 */
- #ifndef NOKVERBS
- #ifdef OS2
- /*
- Note: this value chosen to be bigger than PC BIOS key modifier bits,
- but still fit in 16 bits without affecting sign.
- As of K95 1.1.5, this no longer fits in 16 bits, good thing we are 32 bit.
- */
- #define F_MACRO 0x2000 /* Bit indicating a macro indice */
- #define IS_MACRO(x) (x & F_MACRO)
- #define F_KVERB 0x4000 /* Bit indicating a keyboard verb */
- #define IS_KVERB(x) (x & F_KVERB) /* Test this bit */
- #endif /* OS2 */
- #endif /* NOKVERBS */
- #define F_ESC 0x8000 /* Bit indicating ESC char combination */
- #define IS_ESC(x) (x & F_ESC)
- #define F_CSI 0x10000 /* Bit indicating CSI char combination */
- #define IS_CSI(x) (x & F_CSI)
- #ifdef NOSPL /* This might be overkill.. */
- #ifndef NOKVERBS /* Not all \Kverbs require */
- #define NOKVERBS /* the script programming language. */
- #endif /* NOKVERBS */
- #ifndef NOTAKEARGS
- #define NOTAKEARGS
- #endif /* NOTAKEARGS */
- #endif /* NOSPL */
- /*
- Function prototypes for system and library functions.
- */
- #ifdef _POSIX_SOURCE
- #ifndef VMS
- #ifndef MAC
- #define CK_ANSILIBS
- #endif /* MAC */
- #endif /* VMS */
- #endif /* _POSIX_SOURCE */
- #ifdef NEXT
- #define CK_ANSILIBS
- #endif /* NEXT */
- #ifdef SVR4
- #define CK_ANSILIBS
- #endif /* SVR4 */
- #ifdef STRATUS /* Stratus VOS uses ANSI libraries */
- #define CK_ANSILIBS
- #endif /* STRATUS */
- #ifdef OS2
- #define CK_ANSILIBS
- #ifndef NOCURSES
- #define MYCURSES
- #endif /* NOCURSES */
- #define CK_RTSCTS
- #ifdef __IBMC__
- #define S_IFMT 0xF000
- #define timezone _timezone
- #endif /* __IBMC__ */
- #include <fcntl.h>
- #include <io.h>
- #ifdef __EMX__
- #ifndef __32BIT__
- #define __32BIT__
- #endif /* __32BIT__ */
- #include <sys/timeb.h>
- #else /* __EMX__ */
- #include <direct.h>
- #undef SIGALRM
- #ifndef SIGUSR1
- #define SIGUSR1 7
- #endif /* SIGUSR1 */
- #define SIGALRM SIGUSR1
- _PROTOTYP( unsigned alarm, (unsigned) );
- _PROTOTYP( unsigned sleep, (unsigned) );
- #endif /* __EMX__ */
- _PROTOTYP( unsigned long zdskspace, (int) );
- _PROTOTYP( int zchdsk, (int) );
- _PROTOTYP( int conincraw, (int) );
- _PROTOTYP( int ttiscom, (int f) );
- _PROTOTYP( int IsFileNameValid, (char *) );
- _PROTOTYP( void ChangeNameForFAT, (char *) );
- _PROTOTYP( char *GetLoadPath, (void) );
- #endif /* OS2 */
- /* Fullscreen file transfer display items... */
- #ifndef NOCURSES
- #ifdef CK_NCURSES /* CK_NCURSES implies CK_CURSES */
- #ifndef CK_CURSES
- #define CK_CURSES
- #endif /* CK_CURSES */
- #endif /* CK_NCURSES */
- #ifdef MYCURSES /* MYCURSES implies CK_CURSES */
- #ifndef CK_CURSES
- #define CK_CURSES
- #endif /* CK_CURSES */
- #endif /* MYCURSES */
- #endif /* NOCURSES */
- #ifdef NOCURSES
- #ifdef CK_CURSES
- #undef CK_CURSES
- #endif /* CK_CURSES */
- #ifndef NODISPLAY
- #define NODISPLAY
- #endif /* NODISPLAY */
- #endif /* NOCURSES */
- #ifdef CK_CURSES
- /*
- The CK_WREFRESH symbol is defined if the curses library provides
- clearok() and wrefresh() functions, which are used in repainting
- the screen.
- */
- #ifdef NOWREFRESH /* Override CK_WREFRESH */
- #ifdef CK_WREFRESH /* If this is defined, */
- #undef CK_WREFRESH /* undefine it. */
- #endif /* CK_WREFRESH */
- #else /* !NOWREFRESH */ /* No override... */
- #ifndef CK_WREFRESH /* If CK_WREFRESH not defined */
- /*
- Automatically define it for systems known to have it ...
- */
- #ifdef VMS /* DEC (Open)VMS has it */
- #define CK_WREFRESH
- #else
- #ifdef ultrix /* DEC ULTRIX has it */
- #else
- #ifdef SVR3 /* System V has it */
- #define CK_WREFRESH
- #else
- #ifdef BSD44 /* 4.4 BSD has it */
- #define CK_WREFRESH
- #else
- #ifdef NEXT /* Define it for NeXTSTEP */
- #define CK_WREFRESH
- #else
- #ifdef SUNOS4 /* SunOS 4.x... */
- #define CK_WREFRESH
- #else
- #ifdef SOLARIS25 /* Solaris 2.5 and later */
- #define CK_WREFRESH
- #else
- #ifdef AIXRS /* RS/6000 AIX ... */
- #define CK_WREFRESH
- #else
- #ifdef RTAIX /* RT PC AIX ... */
- #define CK_WREFRESH
- #else
- #ifdef OSF /* DEC OSF/1 ... */
- #define CK_WREFRESH
- /* Add more here, or just define CK_WREFRESH on the CC command line... */
- #endif /* OSF */
- #endif /* RTAIX */
- #endif /* AIXRS */
- #endif /* SOLARIS25 */
- #endif /* SUNOS4 */
- #endif /* NEXT */
- #endif /* BSD44 */
- #endif /* SVR3 */
- #endif /* ultrix */
- #endif /* VMS */
- #else /* CK_WREFRESH is defined */
- /* This is within an ifdef CK_CURSES block. The following is not needed */
- #ifndef CK_CURSES /* CK_WREFRESH implies CK_CURSES */
- #define CK_CURSES
- #endif /* CK_CURSES */
- #endif /* CK_WREFRESH */
- #endif /* NOWREFRESH */
- #ifndef TRMBUFL
- #ifdef BIGBUFOK
- #define TRMBUFL 16384
- #else
- #ifdef DYNAMIC
- #define TRMBUFL 8192
- #else
- #define TRMBUFL 1024
- #endif /* BIGBUFOK */
- #endif /* DYNAMIC */
- #endif /* TRMBUFL */
- #endif /* CK_CURSES */
- /*
- Whether to use ckmatch() in all its glory for C-Shell-like patterns.
- If CKREGEX is NOT defined, all but * and ? matching are removed from
- ckmatch(). NOTE: Defining CKREGEX does not necessarily mean that ckmatch()
- regexes are used for filename matching. That depends on whether zxpand()
- in ck?fio.c calls ckmatch(). NOTE 2: REGEX is a misnomer -- these are not
- regular expressions in the computer-science sense (in which, e.g. "a*b"
- matches 0 or more 'a' characters followed by 'b') but patterns (in which
- "a*b" matches 'a' followed by 0 or more non-b characters, followed by b).
- */
- #ifndef NOCKREGEX
- #ifndef CKREGEX
- #define CKREGEX
- #endif /* CKREGEX */
- #endif /* NOCKREGEX */
- /* Learned-script feature */
- #ifndef NOLEARN
- #ifdef NOSPL
- #define NOLEARN
- #else
- #ifdef NOLOCAL
- #define NOLEARN
- #endif /* NOLOCAL */
- #endif /* NOSPL */
- #endif /* NOLEARN */
- #ifdef NOLEARN
- #ifdef CKLEARN
- #undef CKLEARN
- #endif /* CKLEARN */
- #else /* !NOLEARN */
- #ifndef CKLEARN
- #ifdef OS2ORUNIX
- /* In UNIX this can work only with ckucns.c builds */
- #define CKLEARN
- #else
- #ifdef VMS
- #define CKLEARN
- #endif /* VMS */
- #endif /* OS2ORUNIX */
- #endif /* CKLEARN */
- #endif /* NOLEARN */
- #ifdef CKLEARN
- #ifndef LEARNBUFSIZ
- #define LEARNBUFSIZ 128
- #endif /* LEARNBUFSIZ */
- #endif /* CKLEARN */
- #ifndef IKSDONLY
- #ifndef CKTIDLE /* Pseudo-keepalive in CONNECT */
- #ifdef OS2 /* In K95 */
- #define CKTIDLE
- #else
- #ifdef UNIX /* In UNIX but only ckucns versions */
- #ifndef NOLEARN
- #ifndef NOSELECT
- #define CKTIDLE
- #endif /* NOSELECT */
- #endif /* NOLEARN */
- #endif /* UNIX */
- #endif /* OS2 */
- #endif /* CKTIDLE */
- #endif /* IKSDONLY */
- #ifdef CK_ANSILIBS
- /*
- String library functions.
- For ANSI C, get prototypes from <string.h>.
- Otherwise, skip the prototypes.
- */
- #include <string.h>
- /*
- Prototypes for other commonly used library functions, such as
- malloc, free, getenv, atol, atoi, and exit. Otherwise, no prototypes.
- */
- #include <stdlib.h>
- #ifdef DIAB /* DIAB DS90 */
- /* #include <commonC.h> */
- #include <sys/wait.h>
- #define CK_WAIT_H
- #ifdef COMMENT
- extern void exit(int status);
- extern void _exit(int status);
- extern int uname(struct utsname *name);
- #endif /* COMMENT */
- extern int chmod(char *path, int mode);
- extern int ioctl(int fildes, int request, ...);
- extern int rdchk(int ttyfd);
- extern int nap(int m);
- #ifdef COMMENT
- extern int getppid(void);
- #endif /* COMMENT */
- extern int _filbuf(FILE *stream);
- extern int _flsbuf(char c,FILE *stream);
- #endif /* DIAB */
- /*
- Prototypes for UNIX functions like access, alarm, chdir, sleep, fork,
- and pause. Otherwise, no prototypes.
- */
- #ifdef VMS
- #include <signal.h> /* SMS: sleep() for old (V4.0-000) DEC C. */
- #include <unixio.h>
- #include <unixlib.h> /* SMS: getpid() for old (V4.0-000) DEC C. */
- #endif /* VMS */
- #ifdef NEXT
- #ifndef NEXT33
- #include <libc.h>
- #endif /* NEXT33 */
- #else /* NoT NeXT */
- #ifndef AMIGA
- #ifndef OS2
- #ifdef STRATUS
- #include <c_utilities.h>
- #else /* !STRATUS */
- #ifndef OSKXXC
- #include <unistd.h>
- #endif /* OSKXXC */
- #ifdef HAVE_CRYPT_H
- #include <crypt.h>
- #endif /* HAVE_CRYPT_H */
- #endif /* STRATUS */
- #endif /* OS2 */
- #endif /* AMIGA */
- #endif /* NEXT */
- #else /* Not ANSI libs... */
- #ifdef MAC
- #include <String.h>
- #include <StdLib.h>
- #endif /* MAC */
- #ifdef HPUX
- #ifndef HPUXPRE65
- #include <unistd.h>
- #endif /* HPUXPRE65 */
- #endif /* HPUX */
- #ifdef SUNOS41
- #include <unistd.h>
- #include <stdlib.h>
- #else
- #ifndef MAC
- /*
- It is essential that these are declared correctly!
- Which is not always easy. Take malloc() for instance ...
- */
- #ifdef PYRAMID
- #ifdef SVR4
- #ifdef __STDC__
- #define SIZE_T_MALLOC
- #endif /* __STDC__ */
- #endif /* SVR4 */
- #endif /* PYRAMID */
- /*
- Maybe some other environments need the same treatment for malloc.
- If so, define SIZE_T_MALLOC for them here or in compiler CFLAGS.
- */
- #ifdef SIZE_T_MALLOC
- _PROTOTYP( void * malloc, (size_t) );
- #else
- _PROTOTYP( char * malloc, (unsigned int) );
- #endif /* SIZE_T_MALLOC */
- _PROTOTYP( char * getenv, (char *) );
- _PROTOTYP( long atol, (char *) );
- #endif /* !MAC */
- #endif /* SUNOS41 */
- #endif /* CK_ANSILIBS */
- /*
- <sys/param.h> generally picks up NULL, MAXPATHLEN, and MAXNAMLEN
- and seems to present on all Unixes going back at least to SCO Xenix
- with the exception(s) noted.
- */
- #ifndef NO_PARAM_H /* 2001-11-03 */
- #ifndef UNIX /* Non-Unixes don't have it */
- #define NO_PARAM_H
- #else
- #ifdef TRS16 /* Tandy Xenix doesn't have it */
- #define NO_PARAM_H
- #endif /* TRS16 */
- #endif /* UNIX */
- #endif /* NO_PARAM_H */
- #ifndef NO_PARAM_H
- #ifndef INCL_PARAM_H
- #define INCL_PARAM_H
- #endif /* INCL_PARAM_H */
- #include <sys/param.h>
- #endif /* NO_PARAM_H */
- #ifndef NULL /* In case NULL is still not defined */
- #define NULL 0L
- /* or #define NULL 0 */
- /* or #define NULL ((char *) 0) */
- /* or #define NULL ((void *) 0) */
- #endif /* NULL */
- /* Macro to differentiate "" from NULL (to avoid comparisons with literals) */
- #ifndef isemptystring
- #define isemptystring(s) ((s?(*s?0:1):0))
- #endif /* isemptystring */
- /* Maximum length for a fully qualified filename, not counting \0 at end. */
- /*
- This is a rough cut, and errs on the side of being too big. We don't
- want to pull in hundreds of header files looking for many and varied
- symbols, for fear of introducing unnecessary conflicts.
- */
- #ifndef CKMAXPATH
- #ifdef VMS /* VMS may have bad (small, ODS2) */
- #define CKMAXPATH NAMX_C_MAXRSS /* PATH_MAX, so use NAMX_C_MAXRSS. */
- #else /* def VMS */
- #ifdef MAXPATHLEN /* (it probably isn't) */
- #define CKMAXPATH MAXPATHLEN
- #else
- #ifdef PATH_MAX /* POSIX */
- #define CKMAXPATH PATH_MAX
- #else /* def PATH_MAX */
- #ifdef MAC
- #define CKMAXPATH 63
- #else /* def MAC */
- #ifdef pdp11
- #define CKMAXPATH 255
- #else /* def pdp11 */
- #ifdef UNIX /* Even though some are way less... */
- #define CKMAXPATH 1024
- #else /* def UNIX */
- #ifdef STRATUS
- #define CKMAXPATH 256 /* == $MXPL from PARU.H */
- #else /* def STRATUS */
- #ifdef datageneral
- #define CKMAXPATH 256 /* == $MXPL from PARU.H */
- #else /* def datageneral */
- #define CKMAXPATH 255
- #endif /* def STRATUS [else] */
- #endif /* def datageneral [else] */
- #endif /* def UNIX [else] */
- #endif /* def pdp11 [else] */
- #endif /* def MAC [else] */
- #endif /* def PATH_MAX [else] */
- #endif /* def MAXPATHLEN [else] */
- #endif /* def VMS [else] */
- #endif /* ndef CKMAXPATH */
- /* Maximum length for the name of a tty device */
- #ifndef DEVNAMLEN
- #define DEVNAMLEN CKMAXPATH
- #endif /* DEVNAMLEN */
- /* Directory (path segment) separator */
- /* Not fully general - Tricky for VMS, Amiga, ... */
- #ifndef DIRSEP
- #ifdef UNIX
- #define DIRSEP '/'
- #define STRDIRSEP "/"
- #define ISDIRSEP(c) ((c)=='/')
- #else
- #ifdef OS2
- #define DIRSEP '/'
- #define STRDIRSEP "/"
- #define ISDIRSEP(c) ((c)=='/'||(c)=='\\')
- #else
- #ifdef datageneral
- #define DIRSEP ':'
- #define STRDIRSEP ":"
- #define ISDIRSEP(c) (((c)==':')||((c)=='^')||((c)=='='))
- #else
- #ifdef STRATUS
- #define DIRSEP '>'
- #define ISDIRSEP(c) ((c)=='>')
- #else
- #ifdef VMS
- #define DIRSEP ']' /* (not really) */
- #define ISDIRSEP(c) ((c)==']'||(c)==':')
- #else
- #ifdef MAC
- #define DIRSEP ':'
- #define ISDIRSEP(c) ((c)==':')
- #else
- #ifdef AMIGA
- #define STRDIRSEP "/"
- #define ISDIRSEP(c) ((c)=='/'||(c)==':')
- #else
- #ifdef GEMDOS
- #define DIRSEP '\\'
- #define STRDIRSEP "\\"
- #define ISDIRSEP(c) ((c)=='\\'||(c)==':')
- #else
- #define DIRSEP '/'
- #define STRDIRSEP "/"
- #define ISDIRSEP(c) ((c)=='/')
- #endif /* GEMDOS */
- #endif /* AMIGA */
- #endif /* MAC */
- #endif /* VMS */
- #endif /* STRATUS */
- #endif /* datageneral */
- #endif /* OS2 */
- #endif /* UNIX */
- #endif /* DIRSEP */
- /* FILE package parameters */
- #ifdef pdp11
- #define NOCHANNELIO
- #else
- #ifndef CKMAXOPEN
- #ifdef QNX
- #define CKMAXOPEN 390
- #else
- #ifdef VMS
- #define CKMAXOPEN 64
- #else
- #ifdef OPEN_MAX
- #define CKMAXOPEN OPEN_MAX
- #else
- #ifdef FOPEN_MAX
- #define CKMAXOPEN FOPEN_MAX
- #else
- #define CKMAXOPEN 64
- #endif /* FOPEN_MAX */
- #endif /* OPEN_MAX */
- #endif /* VMS */
- #endif /* QNX */
- #endif /* CKMAXOPEN */
- /* Maximum channels for FOPEN = CKMAXOPEN minus logs, stdio, etc */
- #ifndef Z_MINCHAN
- #define Z_MINCHAN 16
- #endif /* Z_MINCHAN */
- #ifndef Z_MAXCHAN
- #define Z_MAXCHAN (CKMAXOPEN-ZNFILS-5)
- #endif /* Z_MAXCHAN */
- #endif /* pdp11 */
- /* New-format nzltor() and nzrtol() functions that handle pathnames */
- #ifndef NZLTOR
- #ifdef UNIX
- #define NZLTOR
- #else
- #ifdef VMS
- #define NZLTOR
- #else
- #ifdef OS2
- #define NZLTOR
- #else
- #ifdef STRATUS
- #define NZLTOR
- #endif /* STRATUS */
- #endif /* OS2 */
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* NZLTOR */
- #ifdef NZLTOR
- _PROTOTYP( VOID nzltor, (char *, char *, int, int, int) );
- _PROTOTYP( VOID nzrtol, (char *, char *, int, int, int) );
- #endif /* NZLTOR */
- /* Implementations with a zrmdir() function */
- #ifndef ZRMDIR
- #ifdef OS2
- #define ZRMDIR
- #else /* OS2 */
- #ifdef UNIX
- #define ZRMDIR
- #else
- #ifdef VMS
- #define ZRMDIR
- #else /* VMS */
- #ifdef STRATUS
- #define ZRMDIR
- #endif /* STRATUS */
- #endif /* VMS */
- #endif /* UNIX */
- #endif /* OS2 */
- #endif /* ZRMDIR */
- #ifdef ZRMDIR
- _PROTOTYP( int zrmdir, (char *) );
- #endif /* ZRMDIR */
- #ifndef FILECASE
- #ifdef UNIXOROSK
- #define FILECASE 1
- #else
- #define FILECASE 0
- #endif /* UNIXOROSK */
- #ifndef CKCMAI
- extern int filecase;
- #endif /* CKCMAI */
- #endif /* FILECASE */
- /* Funny names for library functions department... */
- #ifdef ZILOG
- #define setjmp setret
- #define longjmp longret
- #define jmp_buf ret_buf
- #define getcwd curdir
- #endif /* ZILOG */
- #ifdef STRATUS
- /* The C-runtime conflicts with things we do in Stratus VOS ckltio.c ... */
- #define printf vosprtf
- _PROTOTYP( int vosprtf, (char *fmt, ...) );
- #define perror(txt) printf("%s\n", txt)
- /* char_varying is a string type from PL/I that VOS uses extensively */
- #define CV char_varying
- #endif /* STRATUS */
- #ifdef NT
- extern int OSVer;
- #define isWin95() (OSVer==VER_PLATFORM_WIN32_WINDOWS)
- #else
- #define isWin95() (0)
- #endif /* NT */
- #ifndef BPRINT
- #ifdef OS2
- #define BPRINT
- #endif /* OS2 */
- #endif /* BPRINT */
- #ifndef SESLIMIT
- #ifdef OS2
- #define SESLIMIT
- #endif /* OS2 */
- #endif /* SESLIMIT */
- #ifndef NOTERM
- #ifndef PCTERM
- #ifdef NT
- #define PCTERM
- #endif /* NT */
- #endif /* PCTERM */
- #endif /* NOTERM */
- #ifdef BEOSORBEBOX
- #define query ckquery
- #endif /* BEOSORBEBOX */
- #ifndef PTYORPIPE /* NETCMD and/or NETPTY defined */
- #ifdef NETCMD
- #define PTYORPIPE
- #else
- #ifdef NETPTY
- #define PTYORPIPE
- #endif /* NETPTY */
- #endif /* NETCMD */
- #endif /* PTYORPIPE */
- /* mktemp() and mkstemp() */
- #ifndef NOMKTEMP
- #ifndef MKTEMP
- #ifdef OS2ORUNIX
- #define MKTEMP
- #endif /* OS2ORUNIX */
- #endif /* MKTEMP */
- #ifdef MKTEMP
- #ifndef NOMKSTEMP
- #ifndef MKSTEMP
- #ifdef BSD44
- #define MKSTEMP
- #else
- #ifdef __linux__
- #define MKSTEMP
- #endif /* __linux__ */
- #endif /* BSD44 */
- #endif /* MKSTEMP */
- #endif /* NOMKSTEMP */
- #endif /* MKTEMP */
- #endif /* NOMKTEMP */
- /* Platforms that have memcpy() -- only after all headers included */
- #ifndef USE_MEMCPY
- #ifdef VMS
- #define USE_MEMCPY
- #else
- #ifdef NEXT
- #define USE_MEMCPY
- #else
- #ifdef OS2
- #define USE_MEMCPY
- #else
- #ifdef __linux__
- #define USE_MEMCPY
- #else
- #ifdef SOLARIS
- #define USE_MEMCPY
- #else
- #ifdef SUNOS4
- #define USE_MEMCPY
- #else
- #ifdef AIXRS
- #define USE_MEMCPY
- #else
- #ifdef HPUX
- #define USE_MEMCPY
- #else
- #ifdef POSIX
- #define USE_MEMCPY
- #else
- #ifdef SVR4
- #define USE_MEMCPY
- #else
- #ifdef OSF
- #define USE_MEMCPY
- #else
- #ifdef datageneral
- #define USE_MEMCPY
- #else
- #ifdef STRATUS
- #define USE_MEMCPY
- #endif /* STRATUS */
- #endif /* datageneral */
- #endif /* OSF */
- #endif /* SVR4 */
- #endif /* POSIX */
- #endif /* HPUX */
- #endif /* AIXRS */
- #endif /* SUNOS4 */
- #endif /* SOLARIS */
- #endif /* __linux__ */
- #endif /* OS2 */
- #endif /* NEXT */
- #endif /* VMS */
- #endif /* USE_MEMCPY */
- #ifndef USE_MEMCPY
- #define memcpy(a,b,c) ckmemcpy((a),(b),(c))
- #else
- #ifdef CK_SCO32V4
- /* Because the prototype isn't picked up in the normal header files */
- _PROTOTYP( void *memcpy, (void *, const void *, size_t));
- #endif /* CK_SCO32V4 */
- #endif /* USE_MEMCPY */
- /* User authentication for IKS -- So far K95 and UNIX only */
- #ifdef NOICP
- #ifndef NOLOGIN
- #define NOLOGIN
- #endif /* NOLOGIN */
- #endif /* NOICP */
- #ifndef NOLOGIN
- #ifdef OS2ORUNIX
- #ifndef CK_LOGIN
- #define CK_LOGIN
- #ifndef NOSHADOW
- #ifdef CK_SCOV5
- #define CK_SHADOW
- #endif /* CK_SCOV5 */
- #endif /* NOSHADOW */
- #endif /* CK_LOGIN */
- #ifdef NT
- #define NTCREATETOKEN
- #endif /* NT */
- #endif /* OS2ORUNIX */
- #else /* NOLOGIN */
- #ifdef CK_LOGIN
- #undef CK_LOGIN
- #endif /* CK_LOGIN */
- #endif /* NOLOGIN */
- #ifdef OS2
- #define CKSPINNER
- #endif /* OS2 */
- #ifdef CK_LOGIN /* Telnet protocol required */
- #ifndef TNCODE /* for login to IKSD. */
- #define TNCODE
- #endif /* TNCODE */
- #endif /* CK_LOGIN */
- #ifdef CK_AUTHENTICATION
- #ifdef NOSENDUID
- #undef NOSENDUID
- #endif /* NOSENDUID */
- #endif /* CK_AUTHENTICATION */
- #ifdef TNCODE /* Should TELNET send user ID? */
- #ifndef NOSENDUID
- #ifndef CKSENDUID
- #define CKSENDUID
- #endif /* CKSENDUID */
- #endif /* NOSENDUID */
- #endif /* TNCODE */
- /* UNIX platforms that don't have getusershell() */
- #ifdef UNIX
- #ifndef NOGETUSERSHELL
- #ifdef IRIX
- #define NOGETUSERSHELL
- #else
- #ifdef PTX
- #define NOGETUSERSHELL
- #else
- #ifdef AIXRS
- #define NOGETUSERSHELL
- #else
- #ifdef SINIX
- #define NOGETUSERSHELL
- #else
- #ifdef UNIXWARE
- #define NOGETUSERSHELL
- #else
- #ifdef COHERENT
- #define NOGETUSERSHELL
- #endif /* COHERENT */
- #endif /* UNIXWARE */
- #endif /* SINIX */
- #endif /* AIXRS */
- #endif /* PTX */
- #endif /* IRIX */
- #endif /* NOGETUSERSHELL */
- #endif /* UNIX */
- #ifdef CK_LOGIN
- #ifdef NT
- #ifndef NOSYSLOG
- #ifndef CKSYSLOG
- #define CKSYSLOG
- #endif /* CKSYSLOG */
- #endif /* NOSYSLOG */
- #endif /* NT */
- #ifdef UNIX
- #ifndef NOSYSLOG
- #ifndef CKSYSLOG
- #define CKSYSLOG
- #endif /* CKSYSLOG */
- #endif /* NOSYSLOG */
- #ifndef NOWTMP
- #ifndef CKWTMP
- #define CKWTMP
- #endif /* CKWTMP */
- #endif /* NOWTMP */
- #ifndef NOGETUSERSHELL
- #ifndef GETUSERSHELL
- #define GETUSERSHELL
- #endif /* GETUSERSHELL */
- #endif /* NOGETUSERSHELL */
- #endif /* UNIX */
- _PROTOTYP( int ckxlogin, (CHAR *, CHAR *, CHAR *, int));
- _PROTOTYP( int ckxlogout, (VOID));
- #endif /* CK_LOGIN */
- #ifndef NOZLOCALTIME /* zlocaltime() available. */
- #ifdef OS2ORUNIX
- #define ZLOCALTIME
- _PROTOTYP( char * zlocaltime, (char *) );
- #endif /* OS2ORUNIX */
- #endif /* NOZLOCALTIME */
- #ifdef CKSYSLOG /* Syslogging levels */
- #define SYSLG_NO 0 /* No logging */
- #define SYSLG_LI 1 /* Login/out */
- #define SYSLG_DI 2 /* Dialing out */
- #define SYSLG_AC 3 /* Making any kind of connection */
- #define SYSLG_PR 4 /* Protocol Operations */
- #define SYSLG_FC 5 /* File creation */
- #define SYSLG_FA 6 /* File reading */
- #define SYSLG_CM 7 /* Top-level commands */
- #define SYSLG_CX 8 /* All commands */
- #define SYSLG_DB 9 /* Debug */
- #define SYSLGMAX 9 /* Highest level */
- #define SYSLG_DF SYSLG_FA /* Default level */
- /* Logging function */
- _PROTOTYP(VOID cksyslog,(int, int, char *, char *, char *));
- #endif /* CKSYSLOG */
- #ifndef CKCMAI
- extern int ckxlogging, ckxsyslog, ikdbopen;
- #endif /* CKCMAI */
- #ifndef CK_KEYTAB
- #define CK_KEYTAB
- /* Keyword Table Template */
- /* Note: formerly defined in ckucmd.h but now more widely used */
- struct keytab { /* Keyword table */
- char *kwd; /* Pointer to keyword string */
- int kwval; /* Associated value */
- int flgs; /* Flags (as defined above) */
- };
- #endif /* CK_KEYTAB */
- #ifdef UNIX
- _PROTOTYP( int isalink, (char *));
- #endif /* UNIX */
- #ifdef NETPTY
- _PROTOTYP( int do_pty, (int *, char *, int));
- _PROTOTYP( VOID end_pty, (void));
- #endif /* NETPTY */
- #ifdef CKROOT
- _PROTOTYP( int zsetroot, (char *) );
- _PROTOTYP( char * zgetroot, (void) );
- _PROTOTYP( int zinroot, (char *) );
- #endif /* CKROOT */
- /* Local Echo Buffer prototypes */
- _PROTOTYP( VOID le_init, (void) );
- _PROTOTYP( VOID le_clean, (void));
- _PROTOTYP( int le_inbuf, (void));
- _PROTOTYP( int le_putstr, (CHAR *));
- _PROTOTYP( int le_puts, (CHAR *, int));
- _PROTOTYP( int le_putchar, (CHAR));
- _PROTOTYP( int le_getchar, (CHAR *));
- /* #ifndef NOHTTP */
- #ifndef NOCMDATE2TM
- #ifndef CMDATE2TM
- #ifdef OS2ORUNIX
- #define CMDATE2TM
- #endif /* OS2ORUNIX */
- #ifdef VMS
- #define CMDATE2TM
- #endif /* VMS */
- #endif /* CMDATE2TM */
- #endif /* NOCMDATE2TM */
- #ifndef NOLOCALE
- #ifdef BSD44ORPOSIX
- #ifndef NO_NL_LANGINFO
- #ifndef HAVE_LOCALE
- #define HAVE_LOCALE
- #include <locale.h>
- #endif /* HAVE_LOCALE */
- #endif /* NO_NL_LANGINFO */
- #endif /* BSD44ORPOSIX */
- #endif /* NOLOCALE */
- #ifdef CMDATE2TM
- _PROTOTYP( struct tm * cmdate2tm, (char *,int));
- #endif /* CMDATE2TM */
- /* #endif */ /* NOHTTP */
- #ifndef NOSETTIME /* This would be set in CFLAGS */
- #ifdef SVR4ORPOSIX /* Defined in IEEE 1003.1-1996 */
- #ifndef UTIMEH /* and in SVID for SVR4 */
- #define UTIMEH
- #endif /* UTIMEH */
- #else /* SVR4ORPOSIX */
- #ifdef OSF /* Verified by Lucas Hart */
- #ifndef UTIMEH
- #define UTIMEH
- #endif /* UTIMEH */
- #else /* OSF */
- #ifdef SUNOS41 /* Verified by Lucas Hart */
- #ifndef UTIMEH
- #define UTIMEH
- #endif /* UTIMEH */
- #else /* SUNOS41 */
- #ifdef OS2
- #ifndef SYSUTIMEH
- #define SYSUTIMEH
- #endif /* SYSUTIMEH */
- #else /* OS2 */
- #ifdef VMS
- #ifndef UTIMEH
- #define UTIMEH
- #endif /* UTIMEH */
- #endif /* VMS */
- #endif /* OS2 */
- #endif /* SUNOS41 */
- #endif /* OSF */
- #endif /* SVR4ORPOSIX */
- #endif /* NOSETTIME */
- #ifdef NEWFTP
- _PROTOTYP( int ftpisconnected, (void));
- _PROTOTYP( int ftpisloggedin, (void));
- _PROTOTYP( int ftpissecure, (void));
- #endif /* NEWFTP */
- _PROTOTYP( int readpass, (char *, char *, int));
- _PROTOTYP( int readtext, (char *, char *, int));
- #ifdef OS2
- _PROTOTYP(int ck_auth_loaddll, (VOID));
- _PROTOTYP(int ck_auth_unloaddll, (VOID));
- #endif /* OS2 */
- #ifdef NT
- _PROTOTYP(DWORD ckGetLongPathname,(LPCSTR lpFileName,
- LPSTR lpBuffer, DWORD cchBuffer));
- #endif /* NT */
- #include "ckclib.h"
- /* End of ckcdeb.h */
- #endif /* CKCDEB_H */
|