guile.texi 370 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103
  1. acons
  2. @c snarfed from alist.c:36
  3. @deffn {Scheme Procedure} acons key value alist
  4. @deffnx {C Function} scm_acons (key, value, alist)
  5. Add a new key-value pair to @var{alist}. A new pair is
  6. created whose car is @var{key} and whose cdr is @var{value}, and the
  7. pair is consed onto @var{alist}, and the new list is returned. This
  8. function is @emph{not} destructive; @var{alist} is not modified.
  9. @end deffn
  10. sloppy-assq
  11. @c snarfed from alist.c:50
  12. @deffn {Scheme Procedure} sloppy-assq key alist
  13. @deffnx {C Function} scm_sloppy_assq (key, alist)
  14. Behaves like @code{assq} but does not do any error checking.
  15. Recommended only for use in Guile internals.
  16. @end deffn
  17. sloppy-assv
  18. @c snarfed from alist.c:68
  19. @deffn {Scheme Procedure} sloppy-assv key alist
  20. @deffnx {C Function} scm_sloppy_assv (key, alist)
  21. Behaves like @code{assv} but does not do any error checking.
  22. Recommended only for use in Guile internals.
  23. @end deffn
  24. sloppy-assoc
  25. @c snarfed from alist.c:86
  26. @deffn {Scheme Procedure} sloppy-assoc key alist
  27. @deffnx {C Function} scm_sloppy_assoc (key, alist)
  28. Behaves like @code{assoc} but does not do any error checking.
  29. Recommended only for use in Guile internals.
  30. @end deffn
  31. assq
  32. @c snarfed from alist.c:113
  33. @deffn {Scheme Procedure} assq key alist
  34. @deffnx {Scheme Procedure} assv key alist
  35. @deffnx {Scheme Procedure} assoc key alist
  36. @deffnx {C Function} scm_assq (key, alist)
  37. Fetch the entry in @var{alist} that is associated with @var{key}. To
  38. decide whether the argument @var{key} matches a particular entry in
  39. @var{alist}, @code{assq} compares keys with @code{eq?}, @code{assv}
  40. uses @code{eqv?} and @code{assoc} uses @code{equal?}. If @var{key}
  41. cannot be found in @var{alist} (according to whichever equality
  42. predicate is in use), then return @code{#f}. These functions
  43. return the entire alist entry found (i.e. both the key and the value).
  44. @end deffn
  45. assv
  46. @c snarfed from alist.c:134
  47. @deffn {Scheme Procedure} assv key alist
  48. @deffnx {C Function} scm_assv (key, alist)
  49. Behaves like @code{assq} but uses @code{eqv?} for key comparison.
  50. @end deffn
  51. assoc
  52. @c snarfed from alist.c:155
  53. @deffn {Scheme Procedure} assoc key alist
  54. @deffnx {C Function} scm_assoc (key, alist)
  55. Behaves like @code{assq} but uses @code{equal?} for key comparison.
  56. @end deffn
  57. assq-ref
  58. @c snarfed from alist.c:199
  59. @deffn {Scheme Procedure} assq-ref alist key
  60. @deffnx {Scheme Procedure} assv-ref alist key
  61. @deffnx {Scheme Procedure} assoc-ref alist key
  62. @deffnx {C Function} scm_assq_ref (alist, key)
  63. Like @code{assq}, @code{assv} and @code{assoc}, except that only the
  64. value associated with @var{key} in @var{alist} is returned. These
  65. functions are equivalent to
  66. @lisp
  67. (let ((ent (@var{associator} @var{key} @var{alist})))
  68. (and ent (cdr ent)))
  69. @end lisp
  70. where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.
  71. @end deffn
  72. assv-ref
  73. @c snarfed from alist.c:216
  74. @deffn {Scheme Procedure} assv-ref alist key
  75. @deffnx {C Function} scm_assv_ref (alist, key)
  76. Behaves like @code{assq-ref} but uses @code{eqv?} for key comparison.
  77. @end deffn
  78. assoc-ref
  79. @c snarfed from alist.c:233
  80. @deffn {Scheme Procedure} assoc-ref alist key
  81. @deffnx {C Function} scm_assoc_ref (alist, key)
  82. Behaves like @code{assq-ref} but uses @code{equal?} for key comparison.
  83. @end deffn
  84. assq-set!
  85. @c snarfed from alist.c:262
  86. @deffn {Scheme Procedure} assq-set! alist key val
  87. @deffnx {Scheme Procedure} assv-set! alist key value
  88. @deffnx {Scheme Procedure} assoc-set! alist key value
  89. @deffnx {C Function} scm_assq_set_x (alist, key, val)
  90. Reassociate @var{key} in @var{alist} with @var{value}: find any existing
  91. @var{alist} entry for @var{key} and associate it with the new
  92. @var{value}. If @var{alist} does not contain an entry for @var{key},
  93. add a new one. Return the (possibly new) alist.
  94. These functions do not attempt to verify the structure of @var{alist},
  95. and so may cause unusual results if passed an object that is not an
  96. association list.
  97. @end deffn
  98. assv-set!
  99. @c snarfed from alist.c:280
  100. @deffn {Scheme Procedure} assv-set! alist key val
  101. @deffnx {C Function} scm_assv_set_x (alist, key, val)
  102. Behaves like @code{assq-set!} but uses @code{eqv?} for key comparison.
  103. @end deffn
  104. assoc-set!
  105. @c snarfed from alist.c:298
  106. @deffn {Scheme Procedure} assoc-set! alist key val
  107. @deffnx {C Function} scm_assoc_set_x (alist, key, val)
  108. Behaves like @code{assq-set!} but uses @code{equal?} for key comparison.
  109. @end deffn
  110. assq-remove!
  111. @c snarfed from alist.c:322
  112. @deffn {Scheme Procedure} assq-remove! alist key
  113. @deffnx {Scheme Procedure} assv-remove! alist key
  114. @deffnx {Scheme Procedure} assoc-remove! alist key
  115. @deffnx {C Function} scm_assq_remove_x (alist, key)
  116. Delete the first entry in @var{alist} associated with @var{key}, and return
  117. the resulting alist.
  118. @end deffn
  119. assv-remove!
  120. @c snarfed from alist.c:338
  121. @deffn {Scheme Procedure} assv-remove! alist key
  122. @deffnx {C Function} scm_assv_remove_x (alist, key)
  123. Behaves like @code{assq-remove!} but uses @code{eqv?} for key comparison.
  124. @end deffn
  125. assoc-remove!
  126. @c snarfed from alist.c:354
  127. @deffn {Scheme Procedure} assoc-remove! alist key
  128. @deffnx {C Function} scm_assoc_remove_x (alist, key)
  129. Behaves like @code{assq-remove!} but uses @code{equal?} for key comparison.
  130. @end deffn
  131. make-arbiter
  132. @c snarfed from arbiters.c:99
  133. @deffn {Scheme Procedure} make-arbiter name
  134. @deffnx {C Function} scm_make_arbiter (name)
  135. Return an arbiter object, initially unlocked. Currently
  136. @var{name} is only used for diagnostic output.
  137. @end deffn
  138. try-arbiter
  139. @c snarfed from arbiters.c:116
  140. @deffn {Scheme Procedure} try-arbiter arb
  141. @deffnx {C Function} scm_try_arbiter (arb)
  142. If @var{arb} is unlocked, then lock it and return @code{#t}.
  143. If @var{arb} is already locked, then do nothing and return
  144. @code{#f}.
  145. @end deffn
  146. release-arbiter
  147. @c snarfed from arbiters.c:142
  148. @deffn {Scheme Procedure} release-arbiter arb
  149. @deffnx {C Function} scm_release_arbiter (arb)
  150. If @var{arb} is locked, then unlock it and return @code{#t}.
  151. If @var{arb} is already unlocked, then do nothing and return
  152. @code{#f}.
  153. Typical usage is for the thread which locked an arbiter to
  154. later release it, but that's not required, any thread can
  155. release it.
  156. @end deffn
  157. async
  158. @c snarfed from async.c:97
  159. @deffn {Scheme Procedure} async thunk
  160. @deffnx {C Function} scm_async (thunk)
  161. Create a new async for the procedure @var{thunk}.
  162. @end deffn
  163. async-mark
  164. @c snarfed from async.c:106
  165. @deffn {Scheme Procedure} async-mark a
  166. @deffnx {C Function} scm_async_mark (a)
  167. Mark the async @var{a} for future execution.
  168. @end deffn
  169. run-asyncs
  170. @c snarfed from async.c:117
  171. @deffn {Scheme Procedure} run-asyncs list_of_a
  172. @deffnx {C Function} scm_run_asyncs (list_of_a)
  173. Execute all thunks from the asyncs of the list @var{list_of_a}.
  174. @end deffn
  175. system-async
  176. @c snarfed from async.c:180
  177. @deffn {Scheme Procedure} system-async thunk
  178. @deffnx {C Function} scm_system_async (thunk)
  179. This function is deprecated. You can use @var{thunk} directly
  180. instead of explicitly creating an async object.
  181. @end deffn
  182. system-async-mark
  183. @c snarfed from async.c:296
  184. @deffn {Scheme Procedure} system-async-mark proc [thread]
  185. @deffnx {C Function} scm_system_async_mark_for_thread (proc, thread)
  186. Mark @var{proc} (a procedure with zero arguments) for future execution
  187. in @var{thread}. If @var{proc} has already been marked for
  188. @var{thread} but has not been executed yet, this call has no effect.
  189. If @var{thread} is omitted, the thread that called
  190. @code{system-async-mark} is used.
  191. This procedure is not safe to be called from C signal handlers. Use
  192. @code{scm_sigaction} or @code{scm_sigaction_for_thread} to install
  193. signal handlers.
  194. @end deffn
  195. noop
  196. @c snarfed from async.c:335
  197. @deffn {Scheme Procedure} noop . args
  198. @deffnx {C Function} scm_noop (args)
  199. Do nothing. When called without arguments, return @code{#f},
  200. otherwise return the first argument.
  201. @end deffn
  202. unmask-signals
  203. @c snarfed from async.c:350
  204. @deffn {Scheme Procedure} unmask-signals
  205. @deffnx {C Function} scm_unmask_signals ()
  206. Unmask signals. The returned value is not specified.
  207. @end deffn
  208. mask-signals
  209. @c snarfed from async.c:370
  210. @deffn {Scheme Procedure} mask-signals
  211. @deffnx {C Function} scm_mask_signals ()
  212. Mask signals. The returned value is not specified.
  213. @end deffn
  214. call-with-blocked-asyncs
  215. @c snarfed from async.c:404
  216. @deffn {Scheme Procedure} call-with-blocked-asyncs proc
  217. @deffnx {C Function} scm_call_with_blocked_asyncs (proc)
  218. Call @var{proc} with no arguments and block the execution
  219. of system asyncs by one level for the current thread while
  220. it is running. Return the value returned by @var{proc}.
  221. @end deffn
  222. call-with-unblocked-asyncs
  223. @c snarfed from async.c:430
  224. @deffn {Scheme Procedure} call-with-unblocked-asyncs proc
  225. @deffnx {C Function} scm_call_with_unblocked_asyncs (proc)
  226. Call @var{proc} with no arguments and unblock the execution
  227. of system asyncs by one level for the current thread while
  228. it is running. Return the value returned by @var{proc}.
  229. @end deffn
  230. display-error
  231. @c snarfed from backtrace.c:303
  232. @deffn {Scheme Procedure} display-error stack port subr message args rest
  233. @deffnx {C Function} scm_display_error (stack, port, subr, message, args, rest)
  234. Display an error message to the output port @var{port}.
  235. @var{stack} is the saved stack for the error, @var{subr} is
  236. the name of the procedure in which the error occurred and
  237. @var{message} is the actual error message, which may contain
  238. formatting instructions. These will format the arguments in
  239. the list @var{args} accordingly. @var{rest} is currently
  240. ignored.
  241. @end deffn
  242. display-application
  243. @c snarfed from backtrace.c:425
  244. @deffn {Scheme Procedure} display-application frame [port [indent]]
  245. @deffnx {C Function} scm_display_application (frame, port, indent)
  246. Display a procedure application @var{frame} to the output port
  247. @var{port}. @var{indent} specifies the indentation of the
  248. output.
  249. @end deffn
  250. display-backtrace
  251. @c snarfed from backtrace.c:740
  252. @deffn {Scheme Procedure} display-backtrace stack port [first [depth [highlights]]]
  253. @deffnx {C Function} scm_display_backtrace_with_highlights (stack, port, first, depth, highlights)
  254. Display a backtrace to the output port @var{port}. @var{stack}
  255. is the stack to take the backtrace from, @var{first} specifies
  256. where in the stack to start and @var{depth} how much frames
  257. to display. Both @var{first} and @var{depth} can be @code{#f},
  258. which means that default values will be used.
  259. When @var{highlights} is given,
  260. it should be a list and all members of it are highligthed in
  261. the backtrace.
  262. @end deffn
  263. backtrace
  264. @c snarfed from backtrace.c:776
  265. @deffn {Scheme Procedure} backtrace [highlights]
  266. @deffnx {C Function} scm_backtrace_with_highlights (highlights)
  267. Display a backtrace of the stack saved by the last error
  268. to the current output port. When @var{highlights} is given,
  269. it should be a list and all members of it are highligthed in
  270. the backtrace.
  271. @end deffn
  272. not
  273. @c snarfed from boolean.c:33
  274. @deffn {Scheme Procedure} not x
  275. @deffnx {C Function} scm_not (x)
  276. Return @code{#t} iff @var{x} is @code{#f}, else return @code{#f}.
  277. @end deffn
  278. boolean?
  279. @c snarfed from boolean.c:43
  280. @deffn {Scheme Procedure} boolean? obj
  281. @deffnx {C Function} scm_boolean_p (obj)
  282. Return @code{#t} iff @var{obj} is either @code{#t} or @code{#f}.
  283. @end deffn
  284. char?
  285. @c snarfed from chars.c:33
  286. @deffn {Scheme Procedure} char? x
  287. @deffnx {C Function} scm_char_p (x)
  288. Return @code{#t} iff @var{x} is a character, else @code{#f}.
  289. @end deffn
  290. char=?
  291. @c snarfed from chars.c:42
  292. @deffn {Scheme Procedure} char=? x y
  293. Return @code{#t} iff @var{x} is the same character as @var{y}, else @code{#f}.
  294. @end deffn
  295. char<?
  296. @c snarfed from chars.c:55
  297. @deffn {Scheme Procedure} char<? x y
  298. Return @code{#t} iff @var{x} is less than @var{y} in the ASCII sequence,
  299. else @code{#f}.
  300. @end deffn
  301. char<=?
  302. @c snarfed from chars.c:67
  303. @deffn {Scheme Procedure} char<=? x y
  304. Return @code{#t} iff @var{x} is less than or equal to @var{y} in the
  305. ASCII sequence, else @code{#f}.
  306. @end deffn
  307. char>?
  308. @c snarfed from chars.c:79
  309. @deffn {Scheme Procedure} char>? x y
  310. Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII
  311. sequence, else @code{#f}.
  312. @end deffn
  313. char>=?
  314. @c snarfed from chars.c:91
  315. @deffn {Scheme Procedure} char>=? x y
  316. Return @code{#t} iff @var{x} is greater than or equal to @var{y} in the
  317. ASCII sequence, else @code{#f}.
  318. @end deffn
  319. char-ci=?
  320. @c snarfed from chars.c:103
  321. @deffn {Scheme Procedure} char-ci=? x y
  322. Return @code{#t} iff @var{x} is the same character as @var{y} ignoring
  323. case, else @code{#f}.
  324. @end deffn
  325. char-ci<?
  326. @c snarfed from chars.c:115
  327. @deffn {Scheme Procedure} char-ci<? x y
  328. Return @code{#t} iff @var{x} is less than @var{y} in the ASCII sequence
  329. ignoring case, else @code{#f}.
  330. @end deffn
  331. char-ci<=?
  332. @c snarfed from chars.c:127
  333. @deffn {Scheme Procedure} char-ci<=? x y
  334. Return @code{#t} iff @var{x} is less than or equal to @var{y} in the
  335. ASCII sequence ignoring case, else @code{#f}.
  336. @end deffn
  337. char-ci>?
  338. @c snarfed from chars.c:139
  339. @deffn {Scheme Procedure} char-ci>? x y
  340. Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII
  341. sequence ignoring case, else @code{#f}.
  342. @end deffn
  343. char-ci>=?
  344. @c snarfed from chars.c:151
  345. @deffn {Scheme Procedure} char-ci>=? x y
  346. Return @code{#t} iff @var{x} is greater than or equal to @var{y} in the
  347. ASCII sequence ignoring case, else @code{#f}.
  348. @end deffn
  349. char-alphabetic?
  350. @c snarfed from chars.c:163
  351. @deffn {Scheme Procedure} char-alphabetic? chr
  352. @deffnx {C Function} scm_char_alphabetic_p (chr)
  353. Return @code{#t} iff @var{chr} is alphabetic, else @code{#f}.
  354. @end deffn
  355. char-numeric?
  356. @c snarfed from chars.c:172
  357. @deffn {Scheme Procedure} char-numeric? chr
  358. @deffnx {C Function} scm_char_numeric_p (chr)
  359. Return @code{#t} iff @var{chr} is numeric, else @code{#f}.
  360. @end deffn
  361. char-whitespace?
  362. @c snarfed from chars.c:181
  363. @deffn {Scheme Procedure} char-whitespace? chr
  364. @deffnx {C Function} scm_char_whitespace_p (chr)
  365. Return @code{#t} iff @var{chr} is whitespace, else @code{#f}.
  366. @end deffn
  367. char-upper-case?
  368. @c snarfed from chars.c:192
  369. @deffn {Scheme Procedure} char-upper-case? chr
  370. @deffnx {C Function} scm_char_upper_case_p (chr)
  371. Return @code{#t} iff @var{chr} is uppercase, else @code{#f}.
  372. @end deffn
  373. char-lower-case?
  374. @c snarfed from chars.c:202
  375. @deffn {Scheme Procedure} char-lower-case? chr
  376. @deffnx {C Function} scm_char_lower_case_p (chr)
  377. Return @code{#t} iff @var{chr} is lowercase, else @code{#f}.
  378. @end deffn
  379. char-is-both?
  380. @c snarfed from chars.c:213
  381. @deffn {Scheme Procedure} char-is-both? chr
  382. @deffnx {C Function} scm_char_is_both_p (chr)
  383. Return @code{#t} iff @var{chr} is either uppercase or lowercase, else @code{#f}.
  384. @end deffn
  385. char->integer
  386. @c snarfed from chars.c:228
  387. @deffn {Scheme Procedure} char->integer chr
  388. @deffnx {C Function} scm_char_to_integer (chr)
  389. Return the number corresponding to ordinal position of @var{chr} in the
  390. ASCII sequence.
  391. @end deffn
  392. integer->char
  393. @c snarfed from chars.c:240
  394. @deffn {Scheme Procedure} integer->char n
  395. @deffnx {C Function} scm_integer_to_char (n)
  396. Return the character at position @var{n} in the ASCII sequence.
  397. @end deffn
  398. char-upcase
  399. @c snarfed from chars.c:250
  400. @deffn {Scheme Procedure} char-upcase chr
  401. @deffnx {C Function} scm_char_upcase (chr)
  402. Return the uppercase character version of @var{chr}.
  403. @end deffn
  404. char-downcase
  405. @c snarfed from chars.c:261
  406. @deffn {Scheme Procedure} char-downcase chr
  407. @deffnx {C Function} scm_char_downcase (chr)
  408. Return the lowercase character version of @var{chr}.
  409. @end deffn
  410. with-continuation-barrier
  411. @c snarfed from continuations.c:412
  412. @deffn {Scheme Procedure} with-continuation-barrier proc
  413. @deffnx {C Function} scm_with_continuation_barrier (proc)
  414. Call @var{proc} and return its result. Do not allow the invocation of
  415. continuations that would leave or enter the dynamic extent of the call
  416. to @code{with-continuation-barrier}. Such an attempt causes an error
  417. to be signaled.
  418. Throws (such as errors) that are not caught from within @var{proc} are
  419. caught by @code{with-continuation-barrier}. In that case, a short
  420. message is printed to the current error port and @code{#f} is returned.
  421. Thus, @code{with-continuation-barrier} returns exactly once.
  422. @end deffn
  423. debug-options-interface
  424. @c snarfed from debug.c:54
  425. @deffn {Scheme Procedure} debug-options-interface [setting]
  426. @deffnx {C Function} scm_debug_options (setting)
  427. Option interface for the debug options. Instead of using
  428. this procedure directly, use the procedures @code{debug-enable},
  429. @code{debug-disable}, @code{debug-set!} and @code{debug-options}.
  430. @end deffn
  431. with-traps
  432. @c snarfed from debug.c:101
  433. @deffn {Scheme Procedure} with-traps thunk
  434. @deffnx {C Function} scm_with_traps (thunk)
  435. Call @var{thunk} with traps enabled.
  436. @end deffn
  437. memoized?
  438. @c snarfed from debug.c:139
  439. @deffn {Scheme Procedure} memoized? obj
  440. @deffnx {C Function} scm_memoized_p (obj)
  441. Return @code{#t} if @var{obj} is memoized.
  442. @end deffn
  443. unmemoize-expr
  444. @c snarfed from debug.c:271
  445. @deffn {Scheme Procedure} unmemoize-expr m
  446. @deffnx {C Function} scm_i_unmemoize_expr (m)
  447. Unmemoize the memoized expression @var{m},
  448. @end deffn
  449. memoized-environment
  450. @c snarfed from debug.c:281
  451. @deffn {Scheme Procedure} memoized-environment m
  452. @deffnx {C Function} scm_memoized_environment (m)
  453. Return the environment of the memoized expression @var{m}.
  454. @end deffn
  455. procedure-name
  456. @c snarfed from debug.c:291
  457. @deffn {Scheme Procedure} procedure-name proc
  458. @deffnx {C Function} scm_procedure_name (proc)
  459. Return the name of the procedure @var{proc}
  460. @end deffn
  461. procedure-source
  462. @c snarfed from debug.c:317
  463. @deffn {Scheme Procedure} procedure-source proc
  464. @deffnx {C Function} scm_procedure_source (proc)
  465. Return the source of the procedure @var{proc}.
  466. @end deffn
  467. procedure-environment
  468. @c snarfed from debug.c:374
  469. @deffn {Scheme Procedure} procedure-environment proc
  470. @deffnx {C Function} scm_procedure_environment (proc)
  471. Return the environment of the procedure @var{proc}.
  472. @end deffn
  473. local-eval
  474. @c snarfed from debug.c:406
  475. @deffn {Scheme Procedure} local-eval exp [env]
  476. @deffnx {C Function} scm_local_eval (exp, env)
  477. Evaluate @var{exp} in its environment. If @var{env} is supplied,
  478. it is the environment in which to evaluate @var{exp}. Otherwise,
  479. @var{exp} must be a memoized code object (in which case, its environment
  480. is implicit).
  481. @end deffn
  482. debug-object?
  483. @c snarfed from debug.c:493
  484. @deffn {Scheme Procedure} debug-object? obj
  485. @deffnx {C Function} scm_debug_object_p (obj)
  486. Return @code{#t} if @var{obj} is a debug object.
  487. @end deffn
  488. issue-deprecation-warning
  489. @c snarfed from deprecation.c:99
  490. @deffn {Scheme Procedure} issue-deprecation-warning . msgs
  491. @deffnx {C Function} scm_issue_deprecation_warning (msgs)
  492. Output @var{msgs} to @code{(current-error-port)} when this is the first call to @code{issue-deprecation-warning} with this specific @var{msgs}. Do nothing otherwise. The argument @var{msgs} should be a list of strings; they are printed in turn, each one followed by a newline.
  493. @end deffn
  494. include-deprecated-features
  495. @c snarfed from deprecation.c:144
  496. @deffn {Scheme Procedure} include-deprecated-features
  497. @deffnx {C Function} scm_include_deprecated_features ()
  498. Return @code{#t} iff deprecated features should be included in public interfaces.
  499. @end deffn
  500. substring-move-left!
  501. @c snarfed from deprecated.c:73
  502. @deffn {Scheme Procedure} substring-move-left!
  503. implemented by the C function "scm_substring_move_x"
  504. @end deffn
  505. substring-move-right!
  506. @c snarfed from deprecated.c:75
  507. @deffn {Scheme Procedure} substring-move-right!
  508. implemented by the C function "scm_substring_move_x"
  509. @end deffn
  510. c-registered-modules
  511. @c snarfed from deprecated.c:178
  512. @deffn {Scheme Procedure} c-registered-modules
  513. @deffnx {C Function} scm_registered_modules ()
  514. Return a list of the object code modules that have been imported into
  515. the current Guile process. Each element of the list is a pair whose
  516. car is the name of the module, and whose cdr is the function handle
  517. for that module's initializer function. The name is the string that
  518. has been passed to scm_register_module_xxx.
  519. @end deffn
  520. c-clear-registered-modules
  521. @c snarfed from deprecated.c:199
  522. @deffn {Scheme Procedure} c-clear-registered-modules
  523. @deffnx {C Function} scm_clear_registered_modules ()
  524. Destroy the list of modules registered with the current Guile process.
  525. The return value is unspecified. @strong{Warning:} this function does
  526. not actually unlink or deallocate these modules, but only destroys the
  527. records of which modules have been loaded. It should therefore be used
  528. only by module bookkeeping operations.
  529. @end deffn
  530. close-all-ports-except
  531. @c snarfed from deprecated.c:342
  532. @deffn {Scheme Procedure} close-all-ports-except . ports
  533. @deffnx {C Function} scm_close_all_ports_except (ports)
  534. [DEPRECATED] Close all open file ports used by the interpreter
  535. except for those supplied as arguments. This procedure
  536. was intended to be used before an exec call to close file descriptors
  537. which are not needed in the new process. However it has the
  538. undesirable side effect of flushing buffers, so it's deprecated.
  539. Use port-for-each instead.
  540. @end deffn
  541. variable-set-name-hint!
  542. @c snarfed from deprecated.c:359
  543. @deffn {Scheme Procedure} variable-set-name-hint! var hint
  544. @deffnx {C Function} scm_variable_set_name_hint (var, hint)
  545. Do not use this function.
  546. @end deffn
  547. builtin-variable
  548. @c snarfed from deprecated.c:372
  549. @deffn {Scheme Procedure} builtin-variable name
  550. @deffnx {C Function} scm_builtin_variable (name)
  551. Do not use this function.
  552. @end deffn
  553. sloppy-memq
  554. @c snarfed from deprecated.c:446
  555. @deffn {Scheme Procedure} sloppy-memq x lst
  556. @deffnx {C Function} scm_sloppy_memq (x, lst)
  557. This procedure behaves like @code{memq}, but does no type or error checking.
  558. Its use is recommended only in writing Guile internals,
  559. not for high-level Scheme programs.
  560. @end deffn
  561. sloppy-memv
  562. @c snarfed from deprecated.c:466
  563. @deffn {Scheme Procedure} sloppy-memv x lst
  564. @deffnx {C Function} scm_sloppy_memv (x, lst)
  565. This procedure behaves like @code{memv}, but does no type or error checking.
  566. Its use is recommended only in writing Guile internals,
  567. not for high-level Scheme programs.
  568. @end deffn
  569. sloppy-member
  570. @c snarfed from deprecated.c:486
  571. @deffn {Scheme Procedure} sloppy-member x lst
  572. @deffnx {C Function} scm_sloppy_member (x, lst)
  573. This procedure behaves like @code{member}, but does no type or error checking.
  574. Its use is recommended only in writing Guile internals,
  575. not for high-level Scheme programs.
  576. @end deffn
  577. read-and-eval!
  578. @c snarfed from deprecated.c:508
  579. @deffn {Scheme Procedure} read-and-eval! [port]
  580. @deffnx {C Function} scm_read_and_eval_x (port)
  581. Read a form from @var{port} (standard input by default), and evaluate it
  582. (memoizing it in the process) in the top-level environment. If no data
  583. is left to be read from @var{port}, an @code{end-of-file} error is
  584. signalled.
  585. @end deffn
  586. string->obarray-symbol
  587. @c snarfed from deprecated.c:825
  588. @deffn {Scheme Procedure} string->obarray-symbol o s [softp]
  589. @deffnx {C Function} scm_string_to_obarray_symbol (o, s, softp)
  590. Intern a new symbol in @var{obarray}, a symbol table, with name
  591. @var{string}.
  592. If @var{obarray} is @code{#f}, use the default system symbol table. If
  593. @var{obarray} is @code{#t}, the symbol should not be interned in any
  594. symbol table; merely return the pair (@var{symbol}
  595. . @var{#<undefined>}).
  596. The @var{soft?} argument determines whether new symbol table entries
  597. should be created when the specified symbol is not already present in
  598. @var{obarray}. If @var{soft?} is specified and is a true value, then
  599. new entries should not be added for symbols not already present in the
  600. table; instead, simply return @code{#f}.
  601. @end deffn
  602. intern-symbol
  603. @c snarfed from deprecated.c:863
  604. @deffn {Scheme Procedure} intern-symbol o s
  605. @deffnx {C Function} scm_intern_symbol (o, s)
  606. Add a new symbol to @var{obarray} with name @var{string}, bound to an
  607. unspecified initial value. The symbol table is not modified if a symbol
  608. with this name is already present.
  609. @end deffn
  610. unintern-symbol
  611. @c snarfed from deprecated.c:905
  612. @deffn {Scheme Procedure} unintern-symbol o s
  613. @deffnx {C Function} scm_unintern_symbol (o, s)
  614. Remove the symbol with name @var{string} from @var{obarray}. This
  615. function returns @code{#t} if the symbol was present and @code{#f}
  616. otherwise.
  617. @end deffn
  618. symbol-binding
  619. @c snarfed from deprecated.c:950
  620. @deffn {Scheme Procedure} symbol-binding o s
  621. @deffnx {C Function} scm_symbol_binding (o, s)
  622. Look up in @var{obarray} the symbol whose name is @var{string}, and
  623. return the value to which it is bound. If @var{obarray} is @code{#f},
  624. use the global symbol table. If @var{string} is not interned in
  625. @var{obarray}, an error is signalled.
  626. @end deffn
  627. symbol-bound?
  628. @c snarfed from deprecated.c:1003
  629. @deffn {Scheme Procedure} symbol-bound? o s
  630. @deffnx {C Function} scm_symbol_bound_p (o, s)
  631. Return @code{#t} if @var{obarray} contains a symbol with name
  632. @var{string} bound to a defined value. This differs from
  633. @var{symbol-interned?} in that the mere mention of a symbol
  634. usually causes it to be interned; @code{symbol-bound?}
  635. determines whether a symbol has been given any meaningful
  636. value.
  637. @end deffn
  638. symbol-set!
  639. @c snarfed from deprecated.c:1030
  640. @deffn {Scheme Procedure} symbol-set! o s v
  641. @deffnx {C Function} scm_symbol_set_x (o, s, v)
  642. Find the symbol in @var{obarray} whose name is @var{string}, and rebind
  643. it to @var{value}. An error is signalled if @var{string} is not present
  644. in @var{obarray}.
  645. @end deffn
  646. gentemp
  647. @c snarfed from deprecated.c:1063
  648. @deffn {Scheme Procedure} gentemp [prefix [obarray]]
  649. @deffnx {C Function} scm_gentemp (prefix, obarray)
  650. Create a new symbol with a name unique in an obarray.
  651. The name is constructed from an optional string @var{prefix}
  652. and a counter value. The default prefix is @code{t}. The
  653. @var{obarray} is specified as a second optional argument.
  654. Default is the system obarray where all normal symbols are
  655. interned. The counter is increased by 1 at each
  656. call. There is no provision for resetting the counter.
  657. @end deffn
  658. make-keyword-from-dash-symbol
  659. @c snarfed from discouraged.c:161
  660. @deffn {Scheme Procedure} make-keyword-from-dash-symbol symbol
  661. @deffnx {C Function} scm_make_keyword_from_dash_symbol (symbol)
  662. Make a keyword object from a @var{symbol} that starts with a dash.
  663. @end deffn
  664. keyword-dash-symbol
  665. @c snarfed from discouraged.c:183
  666. @deffn {Scheme Procedure} keyword-dash-symbol keyword
  667. @deffnx {C Function} scm_keyword_dash_symbol (keyword)
  668. Return the dash symbol for @var{keyword}.
  669. This is the inverse of @code{make-keyword-from-dash-symbol}.
  670. @end deffn
  671. dynamic-link
  672. @c snarfed from dynl.c:149
  673. @deffn {Scheme Procedure} dynamic-link filename
  674. @deffnx {C Function} scm_dynamic_link (filename)
  675. Find the shared object (shared library) denoted by
  676. @var{filename} and link it into the running Guile
  677. application. The returned
  678. scheme object is a ``handle'' for the library which can
  679. be passed to @code{dynamic-func}, @code{dynamic-call} etc.
  680. Searching for object files is system dependent. Normally,
  681. if @var{filename} does have an explicit directory it will
  682. be searched for in locations
  683. such as @file{/usr/lib} and @file{/usr/local/lib}.
  684. @end deffn
  685. dynamic-object?
  686. @c snarfed from dynl.c:168
  687. @deffn {Scheme Procedure} dynamic-object? obj
  688. @deffnx {C Function} scm_dynamic_object_p (obj)
  689. Return @code{#t} if @var{obj} is a dynamic object handle,
  690. or @code{#f} otherwise.
  691. @end deffn
  692. dynamic-unlink
  693. @c snarfed from dynl.c:182
  694. @deffn {Scheme Procedure} dynamic-unlink dobj
  695. @deffnx {C Function} scm_dynamic_unlink (dobj)
  696. Unlink a dynamic object from the application, if possible. The
  697. object must have been linked by @code{dynamic-link}, with
  698. @var{dobj} the corresponding handle. After this procedure
  699. is called, the handle can no longer be used to access the
  700. object.
  701. @end deffn
  702. dynamic-func
  703. @c snarfed from dynl.c:207
  704. @deffn {Scheme Procedure} dynamic-func name dobj
  705. @deffnx {C Function} scm_dynamic_func (name, dobj)
  706. Return a ``handle'' for the function @var{name} in the
  707. shared object referred to by @var{dobj}. The handle
  708. can be passed to @code{dynamic-call} to actually
  709. call the function.
  710. Regardless whether your C compiler prepends an underscore
  711. @samp{_} to the global names in a program, you should
  712. @strong{not} include this underscore in @var{name}
  713. since it will be added automatically when necessary.
  714. @end deffn
  715. dynamic-call
  716. @c snarfed from dynl.c:253
  717. @deffn {Scheme Procedure} dynamic-call func dobj
  718. @deffnx {C Function} scm_dynamic_call (func, dobj)
  719. Call a C function in a dynamic object. Two styles of
  720. invocation are supported:
  721. @itemize @bullet
  722. @item @var{func} can be a function handle returned by
  723. @code{dynamic-func}. In this case @var{dobj} is
  724. ignored
  725. @item @var{func} can be a string with the name of the
  726. function to call, with @var{dobj} the handle of the
  727. dynamic object in which to find the function.
  728. This is equivalent to
  729. @smallexample
  730. (dynamic-call (dynamic-func @var{func} @var{dobj}) #f)
  731. @end smallexample
  732. @end itemize
  733. In either case, the function is passed no arguments
  734. and its return value is ignored.
  735. @end deffn
  736. dynamic-args-call
  737. @c snarfed from dynl.c:285
  738. @deffn {Scheme Procedure} dynamic-args-call func dobj args
  739. @deffnx {C Function} scm_dynamic_args_call (func, dobj, args)
  740. Call the C function indicated by @var{func} and @var{dobj},
  741. just like @code{dynamic-call}, but pass it some arguments and
  742. return its return value. The C function is expected to take
  743. two arguments and return an @code{int}, just like @code{main}:
  744. @smallexample
  745. int c_func (int argc, char **argv);
  746. @end smallexample
  747. The parameter @var{args} must be a list of strings and is
  748. converted into an array of @code{char *}. The array is passed
  749. in @var{argv} and its size in @var{argc}. The return value is
  750. converted to a Scheme number and returned from the call to
  751. @code{dynamic-args-call}.
  752. @end deffn
  753. dynamic-wind
  754. @c snarfed from dynwind.c:97
  755. @deffn {Scheme Procedure} dynamic-wind in_guard thunk out_guard
  756. @deffnx {C Function} scm_dynamic_wind (in_guard, thunk, out_guard)
  757. All three arguments must be 0-argument procedures.
  758. @var{in_guard} is called, then @var{thunk}, then
  759. @var{out_guard}.
  760. If, any time during the execution of @var{thunk}, the
  761. continuation of the @code{dynamic_wind} expression is escaped
  762. non-locally, @var{out_guard} is called. If the continuation of
  763. the dynamic-wind is re-entered, @var{in_guard} is called. Thus
  764. @var{in_guard} and @var{out_guard} may be called any number of
  765. times.
  766. @lisp
  767. (define x 'normal-binding)
  768. @result{} x
  769. (define a-cont (call-with-current-continuation
  770. (lambda (escape)
  771. (let ((old-x x))
  772. (dynamic-wind
  773. ;; in-guard:
  774. ;;
  775. (lambda () (set! x 'special-binding))
  776. ;; thunk
  777. ;;
  778. (lambda () (display x) (newline)
  779. (call-with-current-continuation escape)
  780. (display x) (newline)
  781. x)
  782. ;; out-guard:
  783. ;;
  784. (lambda () (set! x old-x)))))))
  785. ;; Prints:
  786. special-binding
  787. ;; Evaluates to:
  788. @result{} a-cont
  789. x
  790. @result{} normal-binding
  791. (a-cont #f)
  792. ;; Prints:
  793. special-binding
  794. ;; Evaluates to:
  795. @result{} a-cont ;; the value of the (define a-cont...)
  796. x
  797. @result{} normal-binding
  798. a-cont
  799. @result{} special-binding
  800. @end lisp
  801. @end deffn
  802. environment?
  803. @c snarfed from environments.c:106
  804. @deffn {Scheme Procedure} environment? obj
  805. @deffnx {C Function} scm_environment_p (obj)
  806. Return @code{#t} if @var{obj} is an environment, or @code{#f}
  807. otherwise.
  808. @end deffn
  809. environment-bound?
  810. @c snarfed from environments.c:117
  811. @deffn {Scheme Procedure} environment-bound? env sym
  812. @deffnx {C Function} scm_environment_bound_p (env, sym)
  813. Return @code{#t} if @var{sym} is bound in @var{env}, or
  814. @code{#f} otherwise.
  815. @end deffn
  816. environment-ref
  817. @c snarfed from environments.c:132
  818. @deffn {Scheme Procedure} environment-ref env sym
  819. @deffnx {C Function} scm_environment_ref (env, sym)
  820. Return the value of the location bound to @var{sym} in
  821. @var{env}. If @var{sym} is unbound in @var{env}, signal an
  822. @code{environment:unbound} error.
  823. @end deffn
  824. environment-fold
  825. @c snarfed from environments.c:202
  826. @deffn {Scheme Procedure} environment-fold env proc init
  827. @deffnx {C Function} scm_environment_fold (env, proc, init)
  828. Iterate over all the bindings in @var{env}, accumulating some
  829. value.
  830. For each binding in @var{env}, apply @var{proc} to the symbol
  831. bound, its value, and the result from the previous application
  832. of @var{proc}.
  833. Use @var{init} as @var{proc}'s third argument the first time
  834. @var{proc} is applied.
  835. If @var{env} contains no bindings, this function simply returns
  836. @var{init}.
  837. If @var{env} binds the symbol sym1 to the value val1, sym2 to
  838. val2, and so on, then this procedure computes:
  839. @lisp
  840. (proc sym1 val1
  841. (proc sym2 val2
  842. ...
  843. (proc symn valn
  844. init)))
  845. @end lisp
  846. Each binding in @var{env} will be processed exactly once.
  847. @code{environment-fold} makes no guarantees about the order in
  848. which the bindings are processed.
  849. Here is a function which, given an environment, constructs an
  850. association list representing that environment's bindings,
  851. using environment-fold:
  852. @lisp
  853. (define (environment->alist env)
  854. (environment-fold env
  855. (lambda (sym val tail)
  856. (cons (cons sym val) tail))
  857. '()))
  858. @end lisp
  859. @end deffn
  860. environment-define
  861. @c snarfed from environments.c:237
  862. @deffn {Scheme Procedure} environment-define env sym val
  863. @deffnx {C Function} scm_environment_define (env, sym, val)
  864. Bind @var{sym} to a new location containing @var{val} in
  865. @var{env}. If @var{sym} is already bound to another location
  866. in @var{env} and the binding is mutable, that binding is
  867. replaced. The new binding and location are both mutable. The
  868. return value is unspecified.
  869. If @var{sym} is already bound in @var{env}, and the binding is
  870. immutable, signal an @code{environment:immutable-binding} error.
  871. @end deffn
  872. environment-undefine
  873. @c snarfed from environments.c:263
  874. @deffn {Scheme Procedure} environment-undefine env sym
  875. @deffnx {C Function} scm_environment_undefine (env, sym)
  876. Remove any binding for @var{sym} from @var{env}. If @var{sym}
  877. is unbound in @var{env}, do nothing. The return value is
  878. unspecified.
  879. If @var{sym} is already bound in @var{env}, and the binding is
  880. immutable, signal an @code{environment:immutable-binding} error.
  881. @end deffn
  882. environment-set!
  883. @c snarfed from environments.c:291
  884. @deffn {Scheme Procedure} environment-set! env sym val
  885. @deffnx {C Function} scm_environment_set_x (env, sym, val)
  886. If @var{env} binds @var{sym} to some location, change that
  887. location's value to @var{val}. The return value is
  888. unspecified.
  889. If @var{sym} is not bound in @var{env}, signal an
  890. @code{environment:unbound} error. If @var{env} binds @var{sym}
  891. to an immutable location, signal an
  892. @code{environment:immutable-location} error.
  893. @end deffn
  894. environment-cell
  895. @c snarfed from environments.c:326
  896. @deffn {Scheme Procedure} environment-cell env sym for_write
  897. @deffnx {C Function} scm_environment_cell (env, sym, for_write)
  898. Return the value cell which @var{env} binds to @var{sym}, or
  899. @code{#f} if the binding does not live in a value cell.
  900. The argument @var{for-write} indicates whether the caller
  901. intends to modify the variable's value by mutating the value
  902. cell. If the variable is immutable, then
  903. @code{environment-cell} signals an
  904. @code{environment:immutable-location} error.
  905. If @var{sym} is unbound in @var{env}, signal an
  906. @code{environment:unbound} error.
  907. If you use this function, you should consider using
  908. @code{environment-observe}, to be notified when @var{sym} gets
  909. re-bound to a new value cell, or becomes undefined.
  910. @end deffn
  911. environment-observe
  912. @c snarfed from environments.c:378
  913. @deffn {Scheme Procedure} environment-observe env proc
  914. @deffnx {C Function} scm_environment_observe (env, proc)
  915. Whenever @var{env}'s bindings change, apply @var{proc} to
  916. @var{env}.
  917. This function returns an object, token, which you can pass to
  918. @code{environment-unobserve} to remove @var{proc} from the set
  919. of procedures observing @var{env}. The type and value of
  920. token is unspecified.
  921. @end deffn
  922. environment-observe-weak
  923. @c snarfed from environments.c:395
  924. @deffn {Scheme Procedure} environment-observe-weak env proc
  925. @deffnx {C Function} scm_environment_observe_weak (env, proc)
  926. This function is the same as environment-observe, except that
  927. the reference @var{env} retains to @var{proc} is a weak
  928. reference. This means that, if there are no other live,
  929. non-weak references to @var{proc}, it will be
  930. garbage-collected, and dropped from @var{env}'s
  931. list of observing procedures.
  932. @end deffn
  933. environment-unobserve
  934. @c snarfed from environments.c:431
  935. @deffn {Scheme Procedure} environment-unobserve token
  936. @deffnx {C Function} scm_environment_unobserve (token)
  937. Cancel the observation request which returned the value
  938. @var{token}. The return value is unspecified.
  939. If a call @code{(environment-observe env proc)} returns
  940. @var{token}, then the call @code{(environment-unobserve token)}
  941. will cause @var{proc} to no longer be called when @var{env}'s
  942. bindings change.
  943. @end deffn
  944. make-leaf-environment
  945. @c snarfed from environments.c:1017
  946. @deffn {Scheme Procedure} make-leaf-environment
  947. @deffnx {C Function} scm_make_leaf_environment ()
  948. Create a new leaf environment, containing no bindings.
  949. All bindings and locations created in the new environment
  950. will be mutable.
  951. @end deffn
  952. leaf-environment?
  953. @c snarfed from environments.c:1040
  954. @deffn {Scheme Procedure} leaf-environment? object
  955. @deffnx {C Function} scm_leaf_environment_p (object)
  956. Return @code{#t} if object is a leaf environment, or @code{#f}
  957. otherwise.
  958. @end deffn
  959. make-eval-environment
  960. @c snarfed from environments.c:1405
  961. @deffn {Scheme Procedure} make-eval-environment local imported
  962. @deffnx {C Function} scm_make_eval_environment (local, imported)
  963. Return a new environment object eval whose bindings are the
  964. union of the bindings in the environments @var{local} and
  965. @var{imported}, with bindings from @var{local} taking
  966. precedence. Definitions made in eval are placed in @var{local}.
  967. Applying @code{environment-define} or
  968. @code{environment-undefine} to eval has the same effect as
  969. applying the procedure to @var{local}.
  970. Note that eval incorporates @var{local} and @var{imported} by
  971. reference:
  972. If, after creating eval, the program changes the bindings of
  973. @var{local} or @var{imported}, those changes will be visible
  974. in eval.
  975. Since most Scheme evaluation takes place in eval environments,
  976. they transparently cache the bindings received from @var{local}
  977. and @var{imported}. Thus, the first time the program looks up
  978. a symbol in eval, eval may make calls to @var{local} or
  979. @var{imported} to find their bindings, but subsequent
  980. references to that symbol will be as fast as references to
  981. bindings in finite environments.
  982. In typical use, @var{local} will be a finite environment, and
  983. @var{imported} will be an import environment
  984. @end deffn
  985. eval-environment?
  986. @c snarfed from environments.c:1442
  987. @deffn {Scheme Procedure} eval-environment? object
  988. @deffnx {C Function} scm_eval_environment_p (object)
  989. Return @code{#t} if object is an eval environment, or @code{#f}
  990. otherwise.
  991. @end deffn
  992. eval-environment-local
  993. @c snarfed from environments.c:1452
  994. @deffn {Scheme Procedure} eval-environment-local env
  995. @deffnx {C Function} scm_eval_environment_local (env)
  996. Return the local environment of eval environment @var{env}.
  997. @end deffn
  998. eval-environment-set-local!
  999. @c snarfed from environments.c:1464
  1000. @deffn {Scheme Procedure} eval-environment-set-local! env local
  1001. @deffnx {C Function} scm_eval_environment_set_local_x (env, local)
  1002. Change @var{env}'s local environment to @var{local}.
  1003. @end deffn
  1004. eval-environment-imported
  1005. @c snarfed from environments.c:1490
  1006. @deffn {Scheme Procedure} eval-environment-imported env
  1007. @deffnx {C Function} scm_eval_environment_imported (env)
  1008. Return the imported environment of eval environment @var{env}.
  1009. @end deffn
  1010. eval-environment-set-imported!
  1011. @c snarfed from environments.c:1502
  1012. @deffn {Scheme Procedure} eval-environment-set-imported! env imported
  1013. @deffnx {C Function} scm_eval_environment_set_imported_x (env, imported)
  1014. Change @var{env}'s imported environment to @var{imported}.
  1015. @end deffn
  1016. make-import-environment
  1017. @c snarfed from environments.c:1825
  1018. @deffn {Scheme Procedure} make-import-environment imports conflict_proc
  1019. @deffnx {C Function} scm_make_import_environment (imports, conflict_proc)
  1020. Return a new environment @var{imp} whose bindings are the union
  1021. of the bindings from the environments in @var{imports};
  1022. @var{imports} must be a list of environments. That is,
  1023. @var{imp} binds a symbol to a location when some element of
  1024. @var{imports} does.
  1025. If two different elements of @var{imports} have a binding for
  1026. the same symbol, the @var{conflict-proc} is called with the
  1027. following parameters: the import environment, the symbol and
  1028. the list of the imported environments that bind the symbol.
  1029. If the @var{conflict-proc} returns an environment @var{env},
  1030. the conflict is considered as resolved and the binding from
  1031. @var{env} is used. If the @var{conflict-proc} returns some
  1032. non-environment object, the conflict is considered unresolved
  1033. and the symbol is treated as unspecified in the import
  1034. environment.
  1035. The checking for conflicts may be performed lazily, i. e. at
  1036. the moment when a value or binding for a certain symbol is
  1037. requested instead of the moment when the environment is
  1038. created or the bindings of the imports change.
  1039. All bindings in @var{imp} are immutable. If you apply
  1040. @code{environment-define} or @code{environment-undefine} to
  1041. @var{imp}, Guile will signal an
  1042. @code{environment:immutable-binding} error. However,
  1043. notice that the set of bindings in @var{imp} may still change,
  1044. if one of its imported environments changes.
  1045. @end deffn
  1046. import-environment?
  1047. @c snarfed from environments.c:1854
  1048. @deffn {Scheme Procedure} import-environment? object
  1049. @deffnx {C Function} scm_import_environment_p (object)
  1050. Return @code{#t} if object is an import environment, or
  1051. @code{#f} otherwise.
  1052. @end deffn
  1053. import-environment-imports
  1054. @c snarfed from environments.c:1865
  1055. @deffn {Scheme Procedure} import-environment-imports env
  1056. @deffnx {C Function} scm_import_environment_imports (env)
  1057. Return the list of environments imported by the import
  1058. environment @var{env}.
  1059. @end deffn
  1060. import-environment-set-imports!
  1061. @c snarfed from environments.c:1878
  1062. @deffn {Scheme Procedure} import-environment-set-imports! env imports
  1063. @deffnx {C Function} scm_import_environment_set_imports_x (env, imports)
  1064. Change @var{env}'s list of imported environments to
  1065. @var{imports}, and check for conflicts.
  1066. @end deffn
  1067. make-export-environment
  1068. @c snarfed from environments.c:2145
  1069. @deffn {Scheme Procedure} make-export-environment private signature
  1070. @deffnx {C Function} scm_make_export_environment (private, signature)
  1071. Return a new environment @var{exp} containing only those
  1072. bindings in private whose symbols are present in
  1073. @var{signature}. The @var{private} argument must be an
  1074. environment.
  1075. The environment @var{exp} binds symbol to location when
  1076. @var{env} does, and symbol is exported by @var{signature}.
  1077. @var{signature} is a list specifying which of the bindings in
  1078. @var{private} should be visible in @var{exp}. Each element of
  1079. @var{signature} should be a list of the form:
  1080. (symbol attribute ...)
  1081. where each attribute is one of the following:
  1082. @table @asis
  1083. @item the symbol @code{mutable-location}
  1084. @var{exp} should treat the
  1085. location bound to symbol as mutable. That is, @var{exp}
  1086. will pass calls to @code{environment-set!} or
  1087. @code{environment-cell} directly through to private.
  1088. @item the symbol @code{immutable-location}
  1089. @var{exp} should treat
  1090. the location bound to symbol as immutable. If the program
  1091. applies @code{environment-set!} to @var{exp} and symbol, or
  1092. calls @code{environment-cell} to obtain a writable value
  1093. cell, @code{environment-set!} will signal an
  1094. @code{environment:immutable-location} error. Note that, even
  1095. if an export environment treats a location as immutable, the
  1096. underlying environment may treat it as mutable, so its
  1097. value may change.
  1098. @end table
  1099. It is an error for an element of signature to specify both
  1100. @code{mutable-location} and @code{immutable-location}. If
  1101. neither is specified, @code{immutable-location} is assumed.
  1102. As a special case, if an element of signature is a lone
  1103. symbol @var{sym}, it is equivalent to an element of the form
  1104. @code{(sym)}.
  1105. All bindings in @var{exp} are immutable. If you apply
  1106. @code{environment-define} or @code{environment-undefine} to
  1107. @var{exp}, Guile will signal an
  1108. @code{environment:immutable-binding} error. However,
  1109. notice that the set of bindings in @var{exp} may still change,
  1110. if the bindings in private change.
  1111. @end deffn
  1112. export-environment?
  1113. @c snarfed from environments.c:2180
  1114. @deffn {Scheme Procedure} export-environment? object
  1115. @deffnx {C Function} scm_export_environment_p (object)
  1116. Return @code{#t} if object is an export environment, or
  1117. @code{#f} otherwise.
  1118. @end deffn
  1119. export-environment-private
  1120. @c snarfed from environments.c:2190
  1121. @deffn {Scheme Procedure} export-environment-private env
  1122. @deffnx {C Function} scm_export_environment_private (env)
  1123. Return the private environment of export environment @var{env}.
  1124. @end deffn
  1125. export-environment-set-private!
  1126. @c snarfed from environments.c:2202
  1127. @deffn {Scheme Procedure} export-environment-set-private! env private
  1128. @deffnx {C Function} scm_export_environment_set_private_x (env, private)
  1129. Change the private environment of export environment @var{env}.
  1130. @end deffn
  1131. export-environment-signature
  1132. @c snarfed from environments.c:2224
  1133. @deffn {Scheme Procedure} export-environment-signature env
  1134. @deffnx {C Function} scm_export_environment_signature (env)
  1135. Return the signature of export environment @var{env}.
  1136. @end deffn
  1137. export-environment-set-signature!
  1138. @c snarfed from environments.c:2298
  1139. @deffn {Scheme Procedure} export-environment-set-signature! env signature
  1140. @deffnx {C Function} scm_export_environment_set_signature_x (env, signature)
  1141. Change the signature of export environment @var{env}.
  1142. @end deffn
  1143. eq?
  1144. @c snarfed from eq.c:81
  1145. @deffn {Scheme Procedure} eq? x y
  1146. Return @code{#t} if @var{x} and @var{y} are the same object,
  1147. except for numbers and characters. For example,
  1148. @example
  1149. (define x (vector 1 2 3))
  1150. (define y (vector 1 2 3))
  1151. (eq? x x) @result{} #t
  1152. (eq? x y) @result{} #f
  1153. @end example
  1154. Numbers and characters are not equal to any other object, but
  1155. the problem is they're not necessarily @code{eq?} to themselves
  1156. either. This is even so when the number comes directly from a
  1157. variable,
  1158. @example
  1159. (let ((n (+ 2 3)))
  1160. (eq? n n)) @result{} *unspecified*
  1161. @end example
  1162. Generally @code{eqv?} should be used when comparing numbers or
  1163. characters. @code{=} or @code{char=?} can be used too.
  1164. It's worth noting that end-of-list @code{()}, @code{#t},
  1165. @code{#f}, a symbol of a given name, and a keyword of a given
  1166. name, are unique objects. There's just one of each, so for
  1167. instance no matter how @code{()} arises in a program, it's the
  1168. same object and can be compared with @code{eq?},
  1169. @example
  1170. (define x (cdr '(123)))
  1171. (define y (cdr '(456)))
  1172. (eq? x y) @result{} #t
  1173. (define x (string->symbol "foo"))
  1174. (eq? x 'foo) @result{} #t
  1175. @end example
  1176. @end deffn
  1177. eqv?
  1178. @c snarfed from eq.c:116
  1179. @deffn {Scheme Procedure} eqv? x y
  1180. Return @code{#t} if @var{x} and @var{y} are the same object, or
  1181. for characters and numbers the same value.
  1182. On objects except characters and numbers, @code{eqv?} is the
  1183. same as @code{eq?}, it's true if @var{x} and @var{y} are the
  1184. same object.
  1185. If @var{x} and @var{y} are numbers or characters, @code{eqv?}
  1186. compares their type and value. An exact number is not
  1187. @code{eqv?} to an inexact number (even if their value is the
  1188. same).
  1189. @example
  1190. (eqv? 3 (+ 1 2)) @result{} #t
  1191. (eqv? 1 1.0) @result{} #f
  1192. @end example
  1193. @end deffn
  1194. equal?
  1195. @c snarfed from eq.c:212
  1196. @deffn {Scheme Procedure} equal? x y
  1197. Return @code{#t} if @var{x} and @var{y} are the same type, and
  1198. their contents or value are equal.
  1199. For a pair, string, vector or array, @code{equal?} compares the
  1200. contents, and does so using using the same @code{equal?}
  1201. recursively, so a deep structure can be traversed.
  1202. @example
  1203. (equal? (list 1 2 3) (list 1 2 3)) @result{} #t
  1204. (equal? (list 1 2 3) (vector 1 2 3)) @result{} #f
  1205. @end example
  1206. For other objects, @code{equal?} compares as per @code{eqv?},
  1207. which means characters and numbers are compared by type and
  1208. value (and like @code{eqv?}, exact and inexact numbers are not
  1209. @code{equal?}, even if their value is the same).
  1210. @example
  1211. (equal? 3 (+ 1 2)) @result{} #t
  1212. (equal? 1 1.0) @result{} #f
  1213. @end example
  1214. Hash tables are currently only compared as per @code{eq?}, so
  1215. two different tables are not @code{equal?}, even if their
  1216. contents are the same.
  1217. @code{equal?} does not support circular data structures, it may
  1218. go into an infinite loop if asked to compare two circular lists
  1219. or similar.
  1220. New application-defined object types (Smobs) have an
  1221. @code{equalp} handler which is called by @code{equal?}. This
  1222. lets an application traverse the contents or control what is
  1223. considered @code{equal?} for two such objects. If there's no
  1224. handler, the default is to just compare as per @code{eq?}.
  1225. @end deffn
  1226. scm-error
  1227. @c snarfed from error.c:82
  1228. @deffn {Scheme Procedure} scm-error key subr message args data
  1229. @deffnx {C Function} scm_error_scm (key, subr, message, args, data)
  1230. Raise an error with key @var{key}. @var{subr} can be a string
  1231. naming the procedure associated with the error, or @code{#f}.
  1232. @var{message} is the error message string, possibly containing
  1233. @code{~S} and @code{~A} escapes. When an error is reported,
  1234. these are replaced by formatting the corresponding members of
  1235. @var{args}: @code{~A} (was @code{%s} in older versions of
  1236. Guile) formats using @code{display} and @code{~S} (was
  1237. @code{%S}) formats using @code{write}. @var{data} is a list or
  1238. @code{#f} depending on @var{key}: if @var{key} is
  1239. @code{system-error} then it should be a list containing the
  1240. Unix @code{errno} value; If @var{key} is @code{signal} then it
  1241. should be a list containing the Unix signal number; If
  1242. @var{key} is @code{out-of-range} or @code{wrong-type-arg},
  1243. it is a list containing the bad value; otherwise
  1244. it will usually be @code{#f}.
  1245. @end deffn
  1246. strerror
  1247. @c snarfed from error.c:129
  1248. @deffn {Scheme Procedure} strerror err
  1249. @deffnx {C Function} scm_strerror (err)
  1250. Return the Unix error message corresponding to @var{err}, which
  1251. must be an integer value.
  1252. @end deffn
  1253. apply:nconc2last
  1254. @c snarfed from eval.c:4686
  1255. @deffn {Scheme Procedure} apply:nconc2last lst
  1256. @deffnx {C Function} scm_nconc2last (lst)
  1257. Given a list (@var{arg1} @dots{} @var{args}), this function
  1258. conses the @var{arg1} @dots{} arguments onto the front of
  1259. @var{args}, and returns the resulting list. Note that
  1260. @var{args} is a list; thus, the argument to this function is
  1261. a list whose last element is a list.
  1262. Note: Rather than do new consing, @code{apply:nconc2last}
  1263. destroys its argument, so use with care.
  1264. @end deffn
  1265. force
  1266. @c snarfed from eval.c:5598
  1267. @deffn {Scheme Procedure} force promise
  1268. @deffnx {C Function} scm_force (promise)
  1269. If the promise @var{x} has not been computed yet, compute and
  1270. return @var{x}, otherwise just return the previously computed
  1271. value.
  1272. @end deffn
  1273. promise?
  1274. @c snarfed from eval.c:5621
  1275. @deffn {Scheme Procedure} promise? obj
  1276. @deffnx {C Function} scm_promise_p (obj)
  1277. Return true if @var{obj} is a promise, i.e. a delayed computation
  1278. (@pxref{Delayed evaluation,,,r5rs.info,The Revised^5 Report on Scheme}).
  1279. @end deffn
  1280. cons-source
  1281. @c snarfed from eval.c:5633
  1282. @deffn {Scheme Procedure} cons-source xorig x y
  1283. @deffnx {C Function} scm_cons_source (xorig, x, y)
  1284. Create and return a new pair whose car and cdr are @var{x} and @var{y}.
  1285. Any source properties associated with @var{xorig} are also associated
  1286. with the new pair.
  1287. @end deffn
  1288. copy-tree
  1289. @c snarfed from eval.c:5790
  1290. @deffn {Scheme Procedure} copy-tree obj
  1291. @deffnx {C Function} scm_copy_tree (obj)
  1292. Recursively copy the data tree that is bound to @var{obj}, and return a
  1293. the new data structure. @code{copy-tree} recurses down the
  1294. contents of both pairs and vectors (since both cons cells and vector
  1295. cells may point to arbitrary objects), and stops recursing when it hits
  1296. any other object.
  1297. @end deffn
  1298. primitive-eval
  1299. @c snarfed from eval.c:5878
  1300. @deffn {Scheme Procedure} primitive-eval exp
  1301. @deffnx {C Function} scm_primitive_eval (exp)
  1302. Evaluate @var{exp} in the top-level environment specified by
  1303. the current module.
  1304. @end deffn
  1305. eval
  1306. @c snarfed from eval.c:5922
  1307. @deffn {Scheme Procedure} eval exp module_or_state
  1308. @deffnx {C Function} scm_eval (exp, module_or_state)
  1309. Evaluate @var{exp}, a list representing a Scheme expression,
  1310. in the top-level environment specified by
  1311. @var{module_or_state}.
  1312. While @var{exp} is evaluated (using @code{primitive-eval}),
  1313. @var{module_or_state} is made the current module when
  1314. it is a module, or the current dynamic state when it is
  1315. a dynamic state.Example: (eval '(+ 1 2) (interaction-environment))
  1316. @end deffn
  1317. eval-options-interface
  1318. @c snarfed from eval.c:3086
  1319. @deffn {Scheme Procedure} eval-options-interface [setting]
  1320. @deffnx {C Function} scm_eval_options_interface (setting)
  1321. Option interface for the evaluation options. Instead of using
  1322. this procedure directly, use the procedures @code{eval-enable},
  1323. @code{eval-disable}, @code{eval-set!} and @code{eval-options}.
  1324. @end deffn
  1325. evaluator-traps-interface
  1326. @c snarfed from eval.c:3104
  1327. @deffn {Scheme Procedure} evaluator-traps-interface [setting]
  1328. @deffnx {C Function} scm_evaluator_traps (setting)
  1329. Option interface for the evaluator trap options.
  1330. @end deffn
  1331. defined?
  1332. @c snarfed from evalext.c:34
  1333. @deffn {Scheme Procedure} defined? sym [env]
  1334. @deffnx {C Function} scm_defined_p (sym, env)
  1335. Return @code{#t} if @var{sym} is defined in the lexical environment @var{env}. When @var{env} is not specified, look in the top-level environment as defined by the current module.
  1336. @end deffn
  1337. map-in-order
  1338. @c snarfed from evalext.c:80
  1339. @deffn {Scheme Procedure} map-in-order
  1340. implemented by the C function "scm_map"
  1341. @end deffn
  1342. self-evaluating?
  1343. @c snarfed from evalext.c:85
  1344. @deffn {Scheme Procedure} self-evaluating? obj
  1345. @deffnx {C Function} scm_self_evaluating_p (obj)
  1346. Return #t for objects which Guile considers self-evaluating
  1347. @end deffn
  1348. load-extension
  1349. @c snarfed from extensions.c:143
  1350. @deffn {Scheme Procedure} load-extension lib init
  1351. @deffnx {C Function} scm_load_extension (lib, init)
  1352. Load and initialize the extension designated by LIB and INIT.
  1353. When there is no pre-registered function for LIB/INIT, this is
  1354. equivalent to
  1355. @lisp
  1356. (dynamic-call INIT (dynamic-link LIB))
  1357. @end lisp
  1358. When there is a pre-registered function, that function is called
  1359. instead.
  1360. Normally, there is no pre-registered function. This option exists
  1361. only for situations where dynamic linking is unavailable or unwanted.
  1362. In that case, you would statically link your program with the desired
  1363. library, and register its init function right after Guile has been
  1364. initialized.
  1365. LIB should be a string denoting a shared library without any file type
  1366. suffix such as ".so". The suffix is provided automatically. It
  1367. should also not contain any directory components. Libraries that
  1368. implement Guile Extensions should be put into the normal locations for
  1369. shared libraries. We recommend to use the naming convention
  1370. libguile-bla-blum for a extension related to a module `(bla blum)'.
  1371. The normal way for a extension to be used is to write a small Scheme
  1372. file that defines a module, and to load the extension into this
  1373. module. When the module is auto-loaded, the extension is loaded as
  1374. well. For example,
  1375. @lisp
  1376. (define-module (bla blum))
  1377. (load-extension "libguile-bla-blum" "bla_init_blum")
  1378. @end lisp
  1379. @end deffn
  1380. program-arguments
  1381. @c snarfed from feature.c:57
  1382. @deffn {Scheme Procedure} program-arguments
  1383. @deffnx {Scheme Procedure} command-line
  1384. @deffnx {C Function} scm_program_arguments ()
  1385. Return the list of command line arguments passed to Guile, as a list of
  1386. strings. The list includes the invoked program name, which is usually
  1387. @code{"guile"}, but excludes switches and parameters for command line
  1388. options like @code{-e} and @code{-l}.
  1389. @end deffn
  1390. make-fluid
  1391. @c snarfed from fluids.c:260
  1392. @deffn {Scheme Procedure} make-fluid
  1393. @deffnx {C Function} scm_make_fluid ()
  1394. Return a newly created fluid.
  1395. Fluids are objects that can hold one
  1396. value per dynamic state. That is, modifications to this value are
  1397. only visible to code that executes with the same dynamic state as
  1398. the modifying code. When a new dynamic state is constructed, it
  1399. inherits the values from its parent. Because each thread normally executes
  1400. with its own dynamic state, you can use fluids for thread local storage.
  1401. @end deffn
  1402. fluid?
  1403. @c snarfed from fluids.c:283
  1404. @deffn {Scheme Procedure} fluid? obj
  1405. @deffnx {C Function} scm_fluid_p (obj)
  1406. Return @code{#t} iff @var{obj} is a fluid; otherwise, return
  1407. @code{#f}.
  1408. @end deffn
  1409. fluid-ref
  1410. @c snarfed from fluids.c:306
  1411. @deffn {Scheme Procedure} fluid-ref fluid
  1412. @deffnx {C Function} scm_fluid_ref (fluid)
  1413. Return the value associated with @var{fluid} in the current
  1414. dynamic root. If @var{fluid} has not been set, then return
  1415. @code{#f}.
  1416. @end deffn
  1417. fluid-set!
  1418. @c snarfed from fluids.c:325
  1419. @deffn {Scheme Procedure} fluid-set! fluid value
  1420. @deffnx {C Function} scm_fluid_set_x (fluid, value)
  1421. Set the value associated with @var{fluid} in the current dynamic root.
  1422. @end deffn
  1423. with-fluids*
  1424. @c snarfed from fluids.c:395
  1425. @deffn {Scheme Procedure} with-fluids* fluids values thunk
  1426. @deffnx {C Function} scm_with_fluids (fluids, values, thunk)
  1427. Set @var{fluids} to @var{values} temporary, and call @var{thunk}.
  1428. @var{fluids} must be a list of fluids and @var{values} must be the same
  1429. number of their values to be applied. Each substitution is done
  1430. one after another. @var{thunk} must be a procedure with no argument.
  1431. @end deffn
  1432. with-fluid*
  1433. @c snarfed from fluids.c:434
  1434. @deffn {Scheme Procedure} with-fluid* fluid value thunk
  1435. @deffnx {C Function} scm_with_fluid (fluid, value, thunk)
  1436. Set @var{fluid} to @var{value} temporarily, and call @var{thunk}.
  1437. @var{thunk} must be a procedure with no argument.
  1438. @end deffn
  1439. make-dynamic-state
  1440. @c snarfed from fluids.c:487
  1441. @deffn {Scheme Procedure} make-dynamic-state [parent]
  1442. @deffnx {C Function} scm_make_dynamic_state (parent)
  1443. Return a copy of the dynamic state object @var{parent}
  1444. or of the current dynamic state when @var{parent} is omitted.
  1445. @end deffn
  1446. dynamic-state?
  1447. @c snarfed from fluids.c:515
  1448. @deffn {Scheme Procedure} dynamic-state? obj
  1449. @deffnx {C Function} scm_dynamic_state_p (obj)
  1450. Return @code{#t} if @var{obj} is a dynamic state object;
  1451. return @code{#f} otherwise
  1452. @end deffn
  1453. current-dynamic-state
  1454. @c snarfed from fluids.c:530
  1455. @deffn {Scheme Procedure} current-dynamic-state
  1456. @deffnx {C Function} scm_current_dynamic_state ()
  1457. Return the current dynamic state object.
  1458. @end deffn
  1459. set-current-dynamic-state
  1460. @c snarfed from fluids.c:540
  1461. @deffn {Scheme Procedure} set-current-dynamic-state state
  1462. @deffnx {C Function} scm_set_current_dynamic_state (state)
  1463. Set the current dynamic state object to @var{state}
  1464. and return the previous current dynamic state object.
  1465. @end deffn
  1466. with-dynamic-state
  1467. @c snarfed from fluids.c:582
  1468. @deffn {Scheme Procedure} with-dynamic-state state proc
  1469. @deffnx {C Function} scm_with_dynamic_state (state, proc)
  1470. Call @var{proc} while @var{state} is the current dynamic
  1471. state object.
  1472. @end deffn
  1473. setvbuf
  1474. @c snarfed from fports.c:137
  1475. @deffn {Scheme Procedure} setvbuf port mode [size]
  1476. @deffnx {C Function} scm_setvbuf (port, mode, size)
  1477. Set the buffering mode for @var{port}. @var{mode} can be:
  1478. @table @code
  1479. @item _IONBF
  1480. non-buffered
  1481. @item _IOLBF
  1482. line buffered
  1483. @item _IOFBF
  1484. block buffered, using a newly allocated buffer of @var{size} bytes.
  1485. If @var{size} is omitted, a default size will be used.
  1486. @end table
  1487. @end deffn
  1488. file-port?
  1489. @c snarfed from fports.c:230
  1490. @deffn {Scheme Procedure} file-port? obj
  1491. @deffnx {C Function} scm_file_port_p (obj)
  1492. Determine whether @var{obj} is a port that is related to a file.
  1493. @end deffn
  1494. open-file
  1495. @c snarfed from fports.c:284
  1496. @deffn {Scheme Procedure} open-file filename mode
  1497. @deffnx {C Function} scm_open_file (filename, mode)
  1498. Open the file whose name is @var{filename}, and return a port
  1499. representing that file. The attributes of the port are
  1500. determined by the @var{mode} string. The way in which this is
  1501. interpreted is similar to C stdio. The first character must be
  1502. one of the following:
  1503. @table @samp
  1504. @item r
  1505. Open an existing file for input.
  1506. @item w
  1507. Open a file for output, creating it if it doesn't already exist
  1508. or removing its contents if it does.
  1509. @item a
  1510. Open a file for output, creating it if it doesn't already
  1511. exist. All writes to the port will go to the end of the file.
  1512. The "append mode" can be turned off while the port is in use
  1513. @pxref{Ports and File Descriptors, fcntl}
  1514. @end table
  1515. The following additional characters can be appended:
  1516. @table @samp
  1517. @item +
  1518. Open the port for both input and output. E.g., @code{r+}: open
  1519. an existing file for both input and output.
  1520. @item 0
  1521. Create an "unbuffered" port. In this case input and output
  1522. operations are passed directly to the underlying port
  1523. implementation without additional buffering. This is likely to
  1524. slow down I/O operations. The buffering mode can be changed
  1525. while a port is in use @pxref{Ports and File Descriptors,
  1526. setvbuf}
  1527. @item l
  1528. Add line-buffering to the port. The port output buffer will be
  1529. automatically flushed whenever a newline character is written.
  1530. @end table
  1531. In theory we could create read/write ports which were buffered
  1532. in one direction only. However this isn't included in the
  1533. current interfaces. If a file cannot be opened with the access
  1534. requested, @code{open-file} throws an exception.
  1535. @end deffn
  1536. make-future
  1537. @c snarfed from futures.c:89
  1538. @deffn {Scheme Procedure} make-future thunk
  1539. @deffnx {C Function} scm_make_future (thunk)
  1540. Make a future evaluating THUNK.
  1541. @end deffn
  1542. future-ref
  1543. @c snarfed from futures.c:221
  1544. @deffn {Scheme Procedure} future-ref future
  1545. @deffnx {C Function} scm_future_ref (future)
  1546. If the future @var{x} has not been computed yet, compute and
  1547. return @var{x}, otherwise just return the previously computed
  1548. value.
  1549. @end deffn
  1550. gc-live-object-stats
  1551. @c snarfed from gc.c:276
  1552. @deffn {Scheme Procedure} gc-live-object-stats
  1553. @deffnx {C Function} scm_gc_live_object_stats ()
  1554. Return an alist of statistics of the current live objects.
  1555. @end deffn
  1556. gc-stats
  1557. @c snarfed from gc.c:293
  1558. @deffn {Scheme Procedure} gc-stats
  1559. @deffnx {C Function} scm_gc_stats ()
  1560. Return an association list of statistics about Guile's current
  1561. use of storage.
  1562. @end deffn
  1563. object-address
  1564. @c snarfed from gc.c:429
  1565. @deffn {Scheme Procedure} object-address obj
  1566. @deffnx {C Function} scm_object_address (obj)
  1567. Return an integer that for the lifetime of @var{obj} is uniquely
  1568. returned by this function for @var{obj}
  1569. @end deffn
  1570. gc
  1571. @c snarfed from gc.c:440
  1572. @deffn {Scheme Procedure} gc
  1573. @deffnx {C Function} scm_gc ()
  1574. Scans all of SCM objects and reclaims for further use those that are
  1575. no longer accessible.
  1576. @end deffn
  1577. class-of
  1578. @c snarfed from goops.c:166
  1579. @deffn {Scheme Procedure} class-of x
  1580. @deffnx {C Function} scm_class_of (x)
  1581. Return the class of @var{x}.
  1582. @end deffn
  1583. %compute-slots
  1584. @c snarfed from goops.c:407
  1585. @deffn {Scheme Procedure} %compute-slots class
  1586. @deffnx {C Function} scm_sys_compute_slots (class)
  1587. Return a list consisting of the names of all slots belonging to
  1588. class @var{class}, i. e. the slots of @var{class} and of all of
  1589. its superclasses.
  1590. @end deffn
  1591. get-keyword
  1592. @c snarfed from goops.c:498
  1593. @deffn {Scheme Procedure} get-keyword key l default_value
  1594. @deffnx {C Function} scm_get_keyword (key, l, default_value)
  1595. Determine an associated value for the keyword @var{key} from
  1596. the list @var{l}. The list @var{l} has to consist of an even
  1597. number of elements, where, starting with the first, every
  1598. second element is a keyword, followed by its associated value.
  1599. If @var{l} does not hold a value for @var{key}, the value
  1600. @var{default_value} is returned.
  1601. @end deffn
  1602. %initialize-object
  1603. @c snarfed from goops.c:521
  1604. @deffn {Scheme Procedure} %initialize-object obj initargs
  1605. @deffnx {C Function} scm_sys_initialize_object (obj, initargs)
  1606. Initialize the object @var{obj} with the given arguments
  1607. @var{initargs}.
  1608. @end deffn
  1609. %prep-layout!
  1610. @c snarfed from goops.c:619
  1611. @deffn {Scheme Procedure} %prep-layout! class
  1612. @deffnx {C Function} scm_sys_prep_layout_x (class)
  1613. @end deffn
  1614. %inherit-magic!
  1615. @c snarfed from goops.c:718
  1616. @deffn {Scheme Procedure} %inherit-magic! class dsupers
  1617. @deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
  1618. @end deffn
  1619. instance?
  1620. @c snarfed from goops.c:958
  1621. @deffn {Scheme Procedure} instance? obj
  1622. @deffnx {C Function} scm_instance_p (obj)
  1623. Return @code{#t} if @var{obj} is an instance.
  1624. @end deffn
  1625. class-name
  1626. @c snarfed from goops.c:973
  1627. @deffn {Scheme Procedure} class-name obj
  1628. @deffnx {C Function} scm_class_name (obj)
  1629. Return the class name of @var{obj}.
  1630. @end deffn
  1631. class-direct-supers
  1632. @c snarfed from goops.c:983
  1633. @deffn {Scheme Procedure} class-direct-supers obj
  1634. @deffnx {C Function} scm_class_direct_supers (obj)
  1635. Return the direct superclasses of the class @var{obj}.
  1636. @end deffn
  1637. class-direct-slots
  1638. @c snarfed from goops.c:993
  1639. @deffn {Scheme Procedure} class-direct-slots obj
  1640. @deffnx {C Function} scm_class_direct_slots (obj)
  1641. Return the direct slots of the class @var{obj}.
  1642. @end deffn
  1643. class-direct-subclasses
  1644. @c snarfed from goops.c:1003
  1645. @deffn {Scheme Procedure} class-direct-subclasses obj
  1646. @deffnx {C Function} scm_class_direct_subclasses (obj)
  1647. Return the direct subclasses of the class @var{obj}.
  1648. @end deffn
  1649. class-direct-methods
  1650. @c snarfed from goops.c:1013
  1651. @deffn {Scheme Procedure} class-direct-methods obj
  1652. @deffnx {C Function} scm_class_direct_methods (obj)
  1653. Return the direct methods of the class @var{obj}
  1654. @end deffn
  1655. class-precedence-list
  1656. @c snarfed from goops.c:1023
  1657. @deffn {Scheme Procedure} class-precedence-list obj
  1658. @deffnx {C Function} scm_class_precedence_list (obj)
  1659. Return the class precedence list of the class @var{obj}.
  1660. @end deffn
  1661. class-slots
  1662. @c snarfed from goops.c:1033
  1663. @deffn {Scheme Procedure} class-slots obj
  1664. @deffnx {C Function} scm_class_slots (obj)
  1665. Return the slot list of the class @var{obj}.
  1666. @end deffn
  1667. class-environment
  1668. @c snarfed from goops.c:1043
  1669. @deffn {Scheme Procedure} class-environment obj
  1670. @deffnx {C Function} scm_class_environment (obj)
  1671. Return the environment of the class @var{obj}.
  1672. @end deffn
  1673. generic-function-name
  1674. @c snarfed from goops.c:1054
  1675. @deffn {Scheme Procedure} generic-function-name obj
  1676. @deffnx {C Function} scm_generic_function_name (obj)
  1677. Return the name of the generic function @var{obj}.
  1678. @end deffn
  1679. generic-function-methods
  1680. @c snarfed from goops.c:1099
  1681. @deffn {Scheme Procedure} generic-function-methods obj
  1682. @deffnx {C Function} scm_generic_function_methods (obj)
  1683. Return the methods of the generic function @var{obj}.
  1684. @end deffn
  1685. method-generic-function
  1686. @c snarfed from goops.c:1112
  1687. @deffn {Scheme Procedure} method-generic-function obj
  1688. @deffnx {C Function} scm_method_generic_function (obj)
  1689. Return the generic function for the method @var{obj}.
  1690. @end deffn
  1691. method-specializers
  1692. @c snarfed from goops.c:1122
  1693. @deffn {Scheme Procedure} method-specializers obj
  1694. @deffnx {C Function} scm_method_specializers (obj)
  1695. Return specializers of the method @var{obj}.
  1696. @end deffn
  1697. method-procedure
  1698. @c snarfed from goops.c:1132
  1699. @deffn {Scheme Procedure} method-procedure obj
  1700. @deffnx {C Function} scm_method_procedure (obj)
  1701. Return the procedure of the method @var{obj}.
  1702. @end deffn
  1703. accessor-method-slot-definition
  1704. @c snarfed from goops.c:1142
  1705. @deffn {Scheme Procedure} accessor-method-slot-definition obj
  1706. @deffnx {C Function} scm_accessor_method_slot_definition (obj)
  1707. Return the slot definition of the accessor @var{obj}.
  1708. @end deffn
  1709. %tag-body
  1710. @c snarfed from goops.c:1152
  1711. @deffn {Scheme Procedure} %tag-body body
  1712. @deffnx {C Function} scm_sys_tag_body (body)
  1713. Internal GOOPS magic---don't use this function!
  1714. @end deffn
  1715. make-unbound
  1716. @c snarfed from goops.c:1167
  1717. @deffn {Scheme Procedure} make-unbound
  1718. @deffnx {C Function} scm_make_unbound ()
  1719. Return the unbound value.
  1720. @end deffn
  1721. unbound?
  1722. @c snarfed from goops.c:1176
  1723. @deffn {Scheme Procedure} unbound? obj
  1724. @deffnx {C Function} scm_unbound_p (obj)
  1725. Return @code{#t} if @var{obj} is unbound.
  1726. @end deffn
  1727. assert-bound
  1728. @c snarfed from goops.c:1186
  1729. @deffn {Scheme Procedure} assert-bound value obj
  1730. @deffnx {C Function} scm_assert_bound (value, obj)
  1731. Return @var{value} if it is bound, and invoke the
  1732. @var{slot-unbound} method of @var{obj} if it is not.
  1733. @end deffn
  1734. @@assert-bound-ref
  1735. @c snarfed from goops.c:1198
  1736. @deffn {Scheme Procedure} @@assert-bound-ref obj index
  1737. @deffnx {C Function} scm_at_assert_bound_ref (obj, index)
  1738. Like @code{assert-bound}, but use @var{index} for accessing
  1739. the value from @var{obj}.
  1740. @end deffn
  1741. %fast-slot-ref
  1742. @c snarfed from goops.c:1210
  1743. @deffn {Scheme Procedure} %fast-slot-ref obj index
  1744. @deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
  1745. Return the slot value with index @var{index} from @var{obj}.
  1746. @end deffn
  1747. %fast-slot-set!
  1748. @c snarfed from goops.c:1224
  1749. @deffn {Scheme Procedure} %fast-slot-set! obj index value
  1750. @deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
  1751. Set the slot with index @var{index} in @var{obj} to
  1752. @var{value}.
  1753. @end deffn
  1754. slot-ref-using-class
  1755. @c snarfed from goops.c:1361
  1756. @deffn {Scheme Procedure} slot-ref-using-class class obj slot_name
  1757. @deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name)
  1758. @end deffn
  1759. slot-set-using-class!
  1760. @c snarfed from goops.c:1380
  1761. @deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value
  1762. @deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value)
  1763. @end deffn
  1764. slot-bound-using-class?
  1765. @c snarfed from goops.c:1394
  1766. @deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name
  1767. @deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name)
  1768. @end deffn
  1769. slot-exists-using-class?
  1770. @c snarfed from goops.c:1409
  1771. @deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name
  1772. @deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name)
  1773. @end deffn
  1774. slot-ref
  1775. @c snarfed from goops.c:1425
  1776. @deffn {Scheme Procedure} slot-ref obj slot_name
  1777. @deffnx {C Function} scm_slot_ref (obj, slot_name)
  1778. Return the value from @var{obj}'s slot with the name
  1779. @var{slot_name}.
  1780. @end deffn
  1781. slot-set!
  1782. @c snarfed from goops.c:1442
  1783. @deffn {Scheme Procedure} slot-set! obj slot_name value
  1784. @deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
  1785. Set the slot named @var{slot_name} of @var{obj} to @var{value}.
  1786. @end deffn
  1787. slot-bound?
  1788. @c snarfed from goops.c:1459
  1789. @deffn {Scheme Procedure} slot-bound? obj slot_name
  1790. @deffnx {C Function} scm_slot_bound_p (obj, slot_name)
  1791. Return @code{#t} if the slot named @var{slot_name} of @var{obj}
  1792. is bound.
  1793. @end deffn
  1794. slot-exists?
  1795. @c snarfed from goops.c:1477
  1796. @deffn {Scheme Procedure} slot-exists? obj slot_name
  1797. @deffnx {C Function} scm_slot_exists_p (obj, slot_name)
  1798. Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
  1799. @end deffn
  1800. %allocate-instance
  1801. @c snarfed from goops.c:1516
  1802. @deffn {Scheme Procedure} %allocate-instance class initargs
  1803. @deffnx {C Function} scm_sys_allocate_instance (class, initargs)
  1804. Create a new instance of class @var{class} and initialize it
  1805. from the arguments @var{initargs}.
  1806. @end deffn
  1807. %set-object-setter!
  1808. @c snarfed from goops.c:1586
  1809. @deffn {Scheme Procedure} %set-object-setter! obj setter
  1810. @deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
  1811. @end deffn
  1812. %modify-instance
  1813. @c snarfed from goops.c:1611
  1814. @deffn {Scheme Procedure} %modify-instance old new
  1815. @deffnx {C Function} scm_sys_modify_instance (old, new)
  1816. @end deffn
  1817. %modify-class
  1818. @c snarfed from goops.c:1637
  1819. @deffn {Scheme Procedure} %modify-class old new
  1820. @deffnx {C Function} scm_sys_modify_class (old, new)
  1821. @end deffn
  1822. %invalidate-class
  1823. @c snarfed from goops.c:1661
  1824. @deffn {Scheme Procedure} %invalidate-class class
  1825. @deffnx {C Function} scm_sys_invalidate_class (class)
  1826. @end deffn
  1827. %invalidate-method-cache!
  1828. @c snarfed from goops.c:1783
  1829. @deffn {Scheme Procedure} %invalidate-method-cache! gf
  1830. @deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
  1831. @end deffn
  1832. generic-capability?
  1833. @c snarfed from goops.c:1809
  1834. @deffn {Scheme Procedure} generic-capability? proc
  1835. @deffnx {C Function} scm_generic_capability_p (proc)
  1836. @end deffn
  1837. enable-primitive-generic!
  1838. @c snarfed from goops.c:1822
  1839. @deffn {Scheme Procedure} enable-primitive-generic! . subrs
  1840. @deffnx {C Function} scm_enable_primitive_generic_x (subrs)
  1841. @end deffn
  1842. primitive-generic-generic
  1843. @c snarfed from goops.c:1843
  1844. @deffn {Scheme Procedure} primitive-generic-generic subr
  1845. @deffnx {C Function} scm_primitive_generic_generic (subr)
  1846. @end deffn
  1847. make
  1848. @c snarfed from goops.c:2209
  1849. @deffn {Scheme Procedure} make . args
  1850. @deffnx {C Function} scm_make (args)
  1851. Make a new object. @var{args} must contain the class and
  1852. all necessary initialization information.
  1853. @end deffn
  1854. find-method
  1855. @c snarfed from goops.c:2298
  1856. @deffn {Scheme Procedure} find-method . l
  1857. @deffnx {C Function} scm_find_method (l)
  1858. @end deffn
  1859. %method-more-specific?
  1860. @c snarfed from goops.c:2318
  1861. @deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
  1862. @deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
  1863. @end deffn
  1864. %goops-loaded
  1865. @c snarfed from goops.c:2944
  1866. @deffn {Scheme Procedure} %goops-loaded
  1867. @deffnx {C Function} scm_sys_goops_loaded ()
  1868. Announce that GOOPS is loaded and perform initialization
  1869. on the C level which depends on the loaded GOOPS modules.
  1870. @end deffn
  1871. make-guardian
  1872. @c snarfed from guardians.c:307
  1873. @deffn {Scheme Procedure} make-guardian [greedy_p]
  1874. @deffnx {C Function} scm_make_guardian (greedy_p)
  1875. Create a new guardian.
  1876. A guardian protects a set of objects from garbage collection,
  1877. allowing a program to apply cleanup or other actions.
  1878. @code{make-guardian} returns a procedure representing the guardian.
  1879. Calling the guardian procedure with an argument adds the
  1880. argument to the guardian's set of protected objects.
  1881. Calling the guardian procedure without an argument returns
  1882. one of the protected objects which are ready for garbage
  1883. collection, or @code{#f} if no such object is available.
  1884. Objects which are returned in this way are removed from
  1885. the guardian.
  1886. @code{make-guardian} takes one optional argument that says whether the
  1887. new guardian should be greedy or sharing. If there is any chance
  1888. that any object protected by the guardian may be resurrected,
  1889. then you should make the guardian greedy (this is the default).
  1890. See R. Kent Dybvig, Carl Bruggeman, and David Eby (1993)
  1891. "Guardians in a Generation-Based Garbage Collector".
  1892. ACM SIGPLAN Conference on Programming Language Design
  1893. and Implementation, June 1993.
  1894. (the semantics are slightly different at this point, but the
  1895. paper still (mostly) accurately describes the interface).
  1896. @end deffn
  1897. guardian-destroyed?
  1898. @c snarfed from guardians.c:335
  1899. @deffn {Scheme Procedure} guardian-destroyed? guardian
  1900. @deffnx {C Function} scm_guardian_destroyed_p (guardian)
  1901. Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.
  1902. @end deffn
  1903. guardian-greedy?
  1904. @c snarfed from guardians.c:353
  1905. @deffn {Scheme Procedure} guardian-greedy? guardian
  1906. @deffnx {C Function} scm_guardian_greedy_p (guardian)
  1907. Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.
  1908. @end deffn
  1909. destroy-guardian!
  1910. @c snarfed from guardians.c:364
  1911. @deffn {Scheme Procedure} destroy-guardian! guardian
  1912. @deffnx {C Function} scm_destroy_guardian_x (guardian)
  1913. Destroys @var{guardian}, by making it impossible to put any more
  1914. objects in it or get any objects from it. It also unguards any
  1915. objects guarded by @var{guardian}.
  1916. @end deffn
  1917. hashq
  1918. @c snarfed from hash.c:183
  1919. @deffn {Scheme Procedure} hashq key size
  1920. @deffnx {C Function} scm_hashq (key, size)
  1921. Determine a hash value for @var{key} that is suitable for
  1922. lookups in a hashtable of size @var{size}, where @code{eq?} is
  1923. used as the equality predicate. The function returns an
  1924. integer in the range 0 to @var{size} - 1. Note that
  1925. @code{hashq} may use internal addresses. Thus two calls to
  1926. hashq where the keys are @code{eq?} are not guaranteed to
  1927. deliver the same value if the key object gets garbage collected
  1928. in between. This can happen, for example with symbols:
  1929. @code{(hashq 'foo n) (gc) (hashq 'foo n)} may produce two
  1930. different values, since @code{foo} will be garbage collected.
  1931. @end deffn
  1932. hashv
  1933. @c snarfed from hash.c:219
  1934. @deffn {Scheme Procedure} hashv key size
  1935. @deffnx {C Function} scm_hashv (key, size)
  1936. Determine a hash value for @var{key} that is suitable for
  1937. lookups in a hashtable of size @var{size}, where @code{eqv?} is
  1938. used as the equality predicate. The function returns an
  1939. integer in the range 0 to @var{size} - 1. Note that
  1940. @code{(hashv key)} may use internal addresses. Thus two calls
  1941. to hashv where the keys are @code{eqv?} are not guaranteed to
  1942. deliver the same value if the key object gets garbage collected
  1943. in between. This can happen, for example with symbols:
  1944. @code{(hashv 'foo n) (gc) (hashv 'foo n)} may produce two
  1945. different values, since @code{foo} will be garbage collected.
  1946. @end deffn
  1947. hash
  1948. @c snarfed from hash.c:242
  1949. @deffn {Scheme Procedure} hash key size
  1950. @deffnx {C Function} scm_hash (key, size)
  1951. Determine a hash value for @var{key} that is suitable for
  1952. lookups in a hashtable of size @var{size}, where @code{equal?}
  1953. is used as the equality predicate. The function returns an
  1954. integer in the range 0 to @var{size} - 1.
  1955. @end deffn
  1956. make-hash-table
  1957. @c snarfed from hashtab.c:332
  1958. @deffn {Scheme Procedure} make-hash-table [n]
  1959. @deffnx {C Function} scm_make_hash_table (n)
  1960. Make a new abstract hash table object with minimum number of buckets @var{n}
  1961. @end deffn
  1962. make-weak-key-hash-table
  1963. @c snarfed from hashtab.c:349
  1964. @deffn {Scheme Procedure} make-weak-key-hash-table [n]
  1965. @deffnx {Scheme Procedure} make-weak-value-hash-table size
  1966. @deffnx {Scheme Procedure} make-doubly-weak-hash-table size
  1967. @deffnx {C Function} scm_make_weak_key_hash_table (n)
  1968. Return a weak hash table with @var{size} buckets.
  1969. You can modify weak hash tables in exactly the same way you
  1970. would modify regular hash tables. (@pxref{Hash Tables})
  1971. @end deffn
  1972. make-weak-value-hash-table
  1973. @c snarfed from hashtab.c:364
  1974. @deffn {Scheme Procedure} make-weak-value-hash-table [n]
  1975. @deffnx {C Function} scm_make_weak_value_hash_table (n)
  1976. Return a hash table with weak values with @var{size} buckets.
  1977. (@pxref{Hash Tables})
  1978. @end deffn
  1979. make-doubly-weak-hash-table
  1980. @c snarfed from hashtab.c:381
  1981. @deffn {Scheme Procedure} make-doubly-weak-hash-table n
  1982. @deffnx {C Function} scm_make_doubly_weak_hash_table (n)
  1983. Return a hash table with weak keys and values with @var{size}
  1984. buckets. (@pxref{Hash Tables})
  1985. @end deffn
  1986. hash-table?
  1987. @c snarfed from hashtab.c:400
  1988. @deffn {Scheme Procedure} hash-table? obj
  1989. @deffnx {C Function} scm_hash_table_p (obj)
  1990. Return @code{#t} if @var{obj} is an abstract hash table object.
  1991. @end deffn
  1992. weak-key-hash-table?
  1993. @c snarfed from hashtab.c:414
  1994. @deffn {Scheme Procedure} weak-key-hash-table? obj
  1995. @deffnx {Scheme Procedure} weak-value-hash-table? obj
  1996. @deffnx {Scheme Procedure} doubly-weak-hash-table? obj
  1997. @deffnx {C Function} scm_weak_key_hash_table_p (obj)
  1998. Return @code{#t} if @var{obj} is the specified weak hash
  1999. table. Note that a doubly weak hash table is neither a weak key
  2000. nor a weak value hash table.
  2001. @end deffn
  2002. weak-value-hash-table?
  2003. @c snarfed from hashtab.c:424
  2004. @deffn {Scheme Procedure} weak-value-hash-table? obj
  2005. @deffnx {C Function} scm_weak_value_hash_table_p (obj)
  2006. Return @code{#t} if @var{obj} is a weak value hash table.
  2007. @end deffn
  2008. doubly-weak-hash-table?
  2009. @c snarfed from hashtab.c:434
  2010. @deffn {Scheme Procedure} doubly-weak-hash-table? obj
  2011. @deffnx {C Function} scm_doubly_weak_hash_table_p (obj)
  2012. Return @code{#t} if @var{obj} is a doubly weak hash table.
  2013. @end deffn
  2014. hash-clear!
  2015. @c snarfed from hashtab.c:586
  2016. @deffn {Scheme Procedure} hash-clear! table
  2017. @deffnx {C Function} scm_hash_clear_x (table)
  2018. Remove all items from @var{table} (without triggering a resize).
  2019. @end deffn
  2020. hashq-get-handle
  2021. @c snarfed from hashtab.c:607
  2022. @deffn {Scheme Procedure} hashq-get-handle table key
  2023. @deffnx {C Function} scm_hashq_get_handle (table, key)
  2024. This procedure returns the @code{(key . value)} pair from the
  2025. hash table @var{table}. If @var{table} does not hold an
  2026. associated value for @var{key}, @code{#f} is returned.
  2027. Uses @code{eq?} for equality testing.
  2028. @end deffn
  2029. hashq-create-handle!
  2030. @c snarfed from hashtab.c:619
  2031. @deffn {Scheme Procedure} hashq-create-handle! table key init
  2032. @deffnx {C Function} scm_hashq_create_handle_x (table, key, init)
  2033. This function looks up @var{key} in @var{table} and returns its handle.
  2034. If @var{key} is not already present, a new handle is created which
  2035. associates @var{key} with @var{init}.
  2036. @end deffn
  2037. hashq-ref
  2038. @c snarfed from hashtab.c:632
  2039. @deffn {Scheme Procedure} hashq-ref table key [dflt]
  2040. @deffnx {C Function} scm_hashq_ref (table, key, dflt)
  2041. Look up @var{key} in the hash table @var{table}, and return the
  2042. value (if any) associated with it. If @var{key} is not found,
  2043. return @var{default} (or @code{#f} if no @var{default} argument
  2044. is supplied). Uses @code{eq?} for equality testing.
  2045. @end deffn
  2046. hashq-set!
  2047. @c snarfed from hashtab.c:646
  2048. @deffn {Scheme Procedure} hashq-set! table key val
  2049. @deffnx {C Function} scm_hashq_set_x (table, key, val)
  2050. Find the entry in @var{table} associated with @var{key}, and
  2051. store @var{value} there. Uses @code{eq?} for equality testing.
  2052. @end deffn
  2053. hashq-remove!
  2054. @c snarfed from hashtab.c:658
  2055. @deffn {Scheme Procedure} hashq-remove! table key
  2056. @deffnx {C Function} scm_hashq_remove_x (table, key)
  2057. Remove @var{key} (and any value associated with it) from
  2058. @var{table}. Uses @code{eq?} for equality tests.
  2059. @end deffn
  2060. hashv-get-handle
  2061. @c snarfed from hashtab.c:673
  2062. @deffn {Scheme Procedure} hashv-get-handle table key
  2063. @deffnx {C Function} scm_hashv_get_handle (table, key)
  2064. This procedure returns the @code{(key . value)} pair from the
  2065. hash table @var{table}. If @var{table} does not hold an
  2066. associated value for @var{key}, @code{#f} is returned.
  2067. Uses @code{eqv?} for equality testing.
  2068. @end deffn
  2069. hashv-create-handle!
  2070. @c snarfed from hashtab.c:685
  2071. @deffn {Scheme Procedure} hashv-create-handle! table key init
  2072. @deffnx {C Function} scm_hashv_create_handle_x (table, key, init)
  2073. This function looks up @var{key} in @var{table} and returns its handle.
  2074. If @var{key} is not already present, a new handle is created which
  2075. associates @var{key} with @var{init}.
  2076. @end deffn
  2077. hashv-ref
  2078. @c snarfed from hashtab.c:699
  2079. @deffn {Scheme Procedure} hashv-ref table key [dflt]
  2080. @deffnx {C Function} scm_hashv_ref (table, key, dflt)
  2081. Look up @var{key} in the hash table @var{table}, and return the
  2082. value (if any) associated with it. If @var{key} is not found,
  2083. return @var{default} (or @code{#f} if no @var{default} argument
  2084. is supplied). Uses @code{eqv?} for equality testing.
  2085. @end deffn
  2086. hashv-set!
  2087. @c snarfed from hashtab.c:713
  2088. @deffn {Scheme Procedure} hashv-set! table key val
  2089. @deffnx {C Function} scm_hashv_set_x (table, key, val)
  2090. Find the entry in @var{table} associated with @var{key}, and
  2091. store @var{value} there. Uses @code{eqv?} for equality testing.
  2092. @end deffn
  2093. hashv-remove!
  2094. @c snarfed from hashtab.c:724
  2095. @deffn {Scheme Procedure} hashv-remove! table key
  2096. @deffnx {C Function} scm_hashv_remove_x (table, key)
  2097. Remove @var{key} (and any value associated with it) from
  2098. @var{table}. Uses @code{eqv?} for equality tests.
  2099. @end deffn
  2100. hash-get-handle
  2101. @c snarfed from hashtab.c:738
  2102. @deffn {Scheme Procedure} hash-get-handle table key
  2103. @deffnx {C Function} scm_hash_get_handle (table, key)
  2104. This procedure returns the @code{(key . value)} pair from the
  2105. hash table @var{table}. If @var{table} does not hold an
  2106. associated value for @var{key}, @code{#f} is returned.
  2107. Uses @code{equal?} for equality testing.
  2108. @end deffn
  2109. hash-create-handle!
  2110. @c snarfed from hashtab.c:750
  2111. @deffn {Scheme Procedure} hash-create-handle! table key init
  2112. @deffnx {C Function} scm_hash_create_handle_x (table, key, init)
  2113. This function looks up @var{key} in @var{table} and returns its handle.
  2114. If @var{key} is not already present, a new handle is created which
  2115. associates @var{key} with @var{init}.
  2116. @end deffn
  2117. hash-ref
  2118. @c snarfed from hashtab.c:763
  2119. @deffn {Scheme Procedure} hash-ref table key [dflt]
  2120. @deffnx {C Function} scm_hash_ref (table, key, dflt)
  2121. Look up @var{key} in the hash table @var{table}, and return the
  2122. value (if any) associated with it. If @var{key} is not found,
  2123. return @var{default} (or @code{#f} if no @var{default} argument
  2124. is supplied). Uses @code{equal?} for equality testing.
  2125. @end deffn
  2126. hash-set!
  2127. @c snarfed from hashtab.c:778
  2128. @deffn {Scheme Procedure} hash-set! table key val
  2129. @deffnx {C Function} scm_hash_set_x (table, key, val)
  2130. Find the entry in @var{table} associated with @var{key}, and
  2131. store @var{value} there. Uses @code{equal?} for equality
  2132. testing.
  2133. @end deffn
  2134. hash-remove!
  2135. @c snarfed from hashtab.c:790
  2136. @deffn {Scheme Procedure} hash-remove! table key
  2137. @deffnx {C Function} scm_hash_remove_x (table, key)
  2138. Remove @var{key} (and any value associated with it) from
  2139. @var{table}. Uses @code{equal?} for equality tests.
  2140. @end deffn
  2141. hashx-get-handle
  2142. @c snarfed from hashtab.c:831
  2143. @deffn {Scheme Procedure} hashx-get-handle hash assoc table key
  2144. @deffnx {C Function} scm_hashx_get_handle (hash, assoc, table, key)
  2145. This behaves the same way as the corresponding
  2146. @code{-get-handle} function, but uses @var{hash} as a hash
  2147. function and @var{assoc} to compare keys. @code{hash} must be
  2148. a function that takes two arguments, a key to be hashed and a
  2149. table size. @code{assoc} must be an associator function, like
  2150. @code{assoc}, @code{assq} or @code{assv}.
  2151. @end deffn
  2152. hashx-create-handle!
  2153. @c snarfed from hashtab.c:850
  2154. @deffn {Scheme Procedure} hashx-create-handle! hash assoc table key init
  2155. @deffnx {C Function} scm_hashx_create_handle_x (hash, assoc, table, key, init)
  2156. This behaves the same way as the corresponding
  2157. @code{-create-handle} function, but uses @var{hash} as a hash
  2158. function and @var{assoc} to compare keys. @code{hash} must be
  2159. a function that takes two arguments, a key to be hashed and a
  2160. table size. @code{assoc} must be an associator function, like
  2161. @code{assoc}, @code{assq} or @code{assv}.
  2162. @end deffn
  2163. hashx-ref
  2164. @c snarfed from hashtab.c:873
  2165. @deffn {Scheme Procedure} hashx-ref hash assoc table key [dflt]
  2166. @deffnx {C Function} scm_hashx_ref (hash, assoc, table, key, dflt)
  2167. This behaves the same way as the corresponding @code{ref}
  2168. function, but uses @var{hash} as a hash function and
  2169. @var{assoc} to compare keys. @code{hash} must be a function
  2170. that takes two arguments, a key to be hashed and a table size.
  2171. @code{assoc} must be an associator function, like @code{assoc},
  2172. @code{assq} or @code{assv}.
  2173. By way of illustration, @code{hashq-ref table key} is
  2174. equivalent to @code{hashx-ref hashq assq table key}.
  2175. @end deffn
  2176. hashx-set!
  2177. @c snarfed from hashtab.c:899
  2178. @deffn {Scheme Procedure} hashx-set! hash assoc table key val
  2179. @deffnx {C Function} scm_hashx_set_x (hash, assoc, table, key, val)
  2180. This behaves the same way as the corresponding @code{set!}
  2181. function, but uses @var{hash} as a hash function and
  2182. @var{assoc} to compare keys. @code{hash} must be a function
  2183. that takes two arguments, a key to be hashed and a table size.
  2184. @code{assoc} must be an associator function, like @code{assoc},
  2185. @code{assq} or @code{assv}.
  2186. By way of illustration, @code{hashq-set! table key} is
  2187. equivalent to @code{hashx-set! hashq assq table key}.
  2188. @end deffn
  2189. hashx-remove!
  2190. @c snarfed from hashtab.c:920
  2191. @deffn {Scheme Procedure} hashx-remove! hash assoc table obj
  2192. @deffnx {C Function} scm_hashx_remove_x (hash, assoc, table, obj)
  2193. This behaves the same way as the corresponding @code{remove!}
  2194. function, but uses @var{hash} as a hash function and
  2195. @var{assoc} to compare keys. @code{hash} must be a function
  2196. that takes two arguments, a key to be hashed and a table size.
  2197. @code{assoc} must be an associator function, like @code{assoc},
  2198. @code{assq} or @code{assv}.
  2199. By way of illustration, @code{hashq-remove! table key} is
  2200. equivalent to @code{hashx-remove! hashq assq #f table key}.
  2201. @end deffn
  2202. hash-fold
  2203. @c snarfed from hashtab.c:1009
  2204. @deffn {Scheme Procedure} hash-fold proc init table
  2205. @deffnx {C Function} scm_hash_fold (proc, init, table)
  2206. An iterator over hash-table elements.
  2207. Accumulates and returns a result by applying PROC successively.
  2208. The arguments to PROC are "(key value prior-result)" where key
  2209. and value are successive pairs from the hash table TABLE, and
  2210. prior-result is either INIT (for the first application of PROC)
  2211. or the return value of the previous application of PROC.
  2212. For example, @code{(hash-fold acons '() tab)} will convert a hash
  2213. table into an a-list of key-value pairs.
  2214. @end deffn
  2215. hash-for-each
  2216. @c snarfed from hashtab.c:1030
  2217. @deffn {Scheme Procedure} hash-for-each proc table
  2218. @deffnx {C Function} scm_hash_for_each (proc, table)
  2219. An iterator over hash-table elements.
  2220. Applies PROC successively on all hash table items.
  2221. The arguments to PROC are "(key value)" where key
  2222. and value are successive pairs from the hash table TABLE.
  2223. @end deffn
  2224. hash-for-each-handle
  2225. @c snarfed from hashtab.c:1047
  2226. @deffn {Scheme Procedure} hash-for-each-handle proc table
  2227. @deffnx {C Function} scm_hash_for_each_handle (proc, table)
  2228. An iterator over hash-table elements.
  2229. Applies PROC successively on all hash table handles.
  2230. @end deffn
  2231. hash-map->list
  2232. @c snarfed from hashtab.c:1073
  2233. @deffn {Scheme Procedure} hash-map->list proc table
  2234. @deffnx {C Function} scm_hash_map_to_list (proc, table)
  2235. An iterator over hash-table elements.
  2236. Accumulates and returns as a list the results of applying PROC successively.
  2237. The arguments to PROC are "(key value)" where key
  2238. and value are successive pairs from the hash table TABLE.
  2239. @end deffn
  2240. make-hook
  2241. @c snarfed from hooks.c:154
  2242. @deffn {Scheme Procedure} make-hook [n_args]
  2243. @deffnx {C Function} scm_make_hook (n_args)
  2244. Create a hook for storing procedure of arity @var{n_args}.
  2245. @var{n_args} defaults to zero. The returned value is a hook
  2246. object to be used with the other hook procedures.
  2247. @end deffn
  2248. hook?
  2249. @c snarfed from hooks.c:171
  2250. @deffn {Scheme Procedure} hook? x
  2251. @deffnx {C Function} scm_hook_p (x)
  2252. Return @code{#t} if @var{x} is a hook, @code{#f} otherwise.
  2253. @end deffn
  2254. hook-empty?
  2255. @c snarfed from hooks.c:182
  2256. @deffn {Scheme Procedure} hook-empty? hook
  2257. @deffnx {C Function} scm_hook_empty_p (hook)
  2258. Return @code{#t} if @var{hook} is an empty hook, @code{#f}
  2259. otherwise.
  2260. @end deffn
  2261. add-hook!
  2262. @c snarfed from hooks.c:196
  2263. @deffn {Scheme Procedure} add-hook! hook proc [append_p]
  2264. @deffnx {C Function} scm_add_hook_x (hook, proc, append_p)
  2265. Add the procedure @var{proc} to the hook @var{hook}. The
  2266. procedure is added to the end if @var{append_p} is true,
  2267. otherwise it is added to the front. The return value of this
  2268. procedure is not specified.
  2269. @end deffn
  2270. remove-hook!
  2271. @c snarfed from hooks.c:223
  2272. @deffn {Scheme Procedure} remove-hook! hook proc
  2273. @deffnx {C Function} scm_remove_hook_x (hook, proc)
  2274. Remove the procedure @var{proc} from the hook @var{hook}. The
  2275. return value of this procedure is not specified.
  2276. @end deffn
  2277. reset-hook!
  2278. @c snarfed from hooks.c:237
  2279. @deffn {Scheme Procedure} reset-hook! hook
  2280. @deffnx {C Function} scm_reset_hook_x (hook)
  2281. Remove all procedures from the hook @var{hook}. The return
  2282. value of this procedure is not specified.
  2283. @end deffn
  2284. run-hook
  2285. @c snarfed from hooks.c:251
  2286. @deffn {Scheme Procedure} run-hook hook . args
  2287. @deffnx {C Function} scm_run_hook (hook, args)
  2288. Apply all procedures from the hook @var{hook} to the arguments
  2289. @var{args}. The order of the procedure application is first to
  2290. last. The return value of this procedure is not specified.
  2291. @end deffn
  2292. hook->list
  2293. @c snarfed from hooks.c:278
  2294. @deffn {Scheme Procedure} hook->list hook
  2295. @deffnx {C Function} scm_hook_to_list (hook)
  2296. Convert the procedure list of @var{hook} to a list.
  2297. @end deffn
  2298. gettext
  2299. @c snarfed from i18n.c:90
  2300. @deffn {Scheme Procedure} gettext msgid [domain [category]]
  2301. @deffnx {C Function} scm_gettext (msgid, domain, category)
  2302. Return the translation of @var{msgid} in the message domain @var{domain}. @var{domain} is optional and defaults to the domain set through (textdomain). @var{category} is optional and defaults to LC_MESSAGES.
  2303. @end deffn
  2304. ngettext
  2305. @c snarfed from i18n.c:146
  2306. @deffn {Scheme Procedure} ngettext msgid msgid_plural n [domain [category]]
  2307. @deffnx {C Function} scm_ngettext (msgid, msgid_plural, n, domain, category)
  2308. Return the translation of @var{msgid}/@var{msgid_plural} in the message domain @var{domain}, with the plural form being chosen appropriately for the number @var{n}. @var{domain} is optional and defaults to the domain set through (textdomain). @var{category} is optional and defaults to LC_MESSAGES.
  2309. @end deffn
  2310. textdomain
  2311. @c snarfed from i18n.c:209
  2312. @deffn {Scheme Procedure} textdomain [domainname]
  2313. @deffnx {C Function} scm_textdomain (domainname)
  2314. If optional parameter @var{domainname} is supplied, set the textdomain. Return the textdomain.
  2315. @end deffn
  2316. bindtextdomain
  2317. @c snarfed from i18n.c:241
  2318. @deffn {Scheme Procedure} bindtextdomain domainname [directory]
  2319. @deffnx {C Function} scm_bindtextdomain (domainname, directory)
  2320. If optional parameter @var{directory} is supplied, set message catalogs to directory @var{directory}. Return the directory bound to @var{domainname}.
  2321. @end deffn
  2322. bind-textdomain-codeset
  2323. @c snarfed from i18n.c:280
  2324. @deffn {Scheme Procedure} bind-textdomain-codeset domainname [encoding]
  2325. @deffnx {C Function} scm_bind_textdomain_codeset (domainname, encoding)
  2326. If optional parameter @var{encoding} is supplied, set encoding for message catalogs of @var{domainname}. Return the encoding of @var{domainname}.
  2327. @end deffn
  2328. ftell
  2329. @c snarfed from ioext.c:54
  2330. @deffn {Scheme Procedure} ftell fd_port
  2331. @deffnx {C Function} scm_ftell (fd_port)
  2332. Return an integer representing the current position of
  2333. @var{fd/port}, measured from the beginning. Equivalent to:
  2334. @lisp
  2335. (seek port 0 SEEK_CUR)
  2336. @end lisp
  2337. @end deffn
  2338. redirect-port
  2339. @c snarfed from ioext.c:72
  2340. @deffn {Scheme Procedure} redirect-port old new
  2341. @deffnx {C Function} scm_redirect_port (old, new)
  2342. This procedure takes two ports and duplicates the underlying file
  2343. descriptor from @var{old-port} into @var{new-port}. The
  2344. current file descriptor in @var{new-port} will be closed.
  2345. After the redirection the two ports will share a file position
  2346. and file status flags.
  2347. The return value is unspecified.
  2348. Unexpected behaviour can result if both ports are subsequently used
  2349. and the original and/or duplicate ports are buffered.
  2350. This procedure does not have any side effects on other ports or
  2351. revealed counts.
  2352. @end deffn
  2353. dup->fdes
  2354. @c snarfed from ioext.c:111
  2355. @deffn {Scheme Procedure} dup->fdes fd_or_port [fd]
  2356. @deffnx {C Function} scm_dup_to_fdes (fd_or_port, fd)
  2357. Return a new integer file descriptor referring to the open file
  2358. designated by @var{fd_or_port}, which must be either an open
  2359. file port or a file descriptor.
  2360. @end deffn
  2361. dup2
  2362. @c snarfed from ioext.c:158
  2363. @deffn {Scheme Procedure} dup2 oldfd newfd
  2364. @deffnx {C Function} scm_dup2 (oldfd, newfd)
  2365. A simple wrapper for the @code{dup2} system call.
  2366. Copies the file descriptor @var{oldfd} to descriptor
  2367. number @var{newfd}, replacing the previous meaning
  2368. of @var{newfd}. Both @var{oldfd} and @var{newfd} must
  2369. be integers.
  2370. Unlike for dup->fdes or primitive-move->fdes, no attempt
  2371. is made to move away ports which are using @var{newfd}.
  2372. The return value is unspecified.
  2373. @end deffn
  2374. fileno
  2375. @c snarfed from ioext.c:177
  2376. @deffn {Scheme Procedure} fileno port
  2377. @deffnx {C Function} scm_fileno (port)
  2378. Return the integer file descriptor underlying @var{port}. Does
  2379. not change its revealed count.
  2380. @end deffn
  2381. isatty?
  2382. @c snarfed from ioext.c:197
  2383. @deffn {Scheme Procedure} isatty? port
  2384. @deffnx {C Function} scm_isatty_p (port)
  2385. Return @code{#t} if @var{port} is using a serial non--file
  2386. device, otherwise @code{#f}.
  2387. @end deffn
  2388. fdopen
  2389. @c snarfed from ioext.c:219
  2390. @deffn {Scheme Procedure} fdopen fdes modes
  2391. @deffnx {C Function} scm_fdopen (fdes, modes)
  2392. Return a new port based on the file descriptor @var{fdes}.
  2393. Modes are given by the string @var{modes}. The revealed count
  2394. of the port is initialized to zero. The modes string is the
  2395. same as that accepted by @ref{File Ports, open-file}.
  2396. @end deffn
  2397. primitive-move->fdes
  2398. @c snarfed from ioext.c:241
  2399. @deffn {Scheme Procedure} primitive-move->fdes port fd
  2400. @deffnx {C Function} scm_primitive_move_to_fdes (port, fd)
  2401. Moves the underlying file descriptor for @var{port} to the integer
  2402. value @var{fdes} without changing the revealed count of @var{port}.
  2403. Any other ports already using this descriptor will be automatically
  2404. shifted to new descriptors and their revealed counts reset to zero.
  2405. The return value is @code{#f} if the file descriptor already had the
  2406. required value or @code{#t} if it was moved.
  2407. @end deffn
  2408. fdes->ports
  2409. @c snarfed from ioext.c:274
  2410. @deffn {Scheme Procedure} fdes->ports fd
  2411. @deffnx {C Function} scm_fdes_to_ports (fd)
  2412. Return a list of existing ports which have @var{fdes} as an
  2413. underlying file descriptor, without changing their revealed
  2414. counts.
  2415. @end deffn
  2416. keyword?
  2417. @c snarfed from keywords.c:52
  2418. @deffn {Scheme Procedure} keyword? obj
  2419. @deffnx {C Function} scm_keyword_p (obj)
  2420. Return @code{#t} if the argument @var{obj} is a keyword, else
  2421. @code{#f}.
  2422. @end deffn
  2423. symbol->keyword
  2424. @c snarfed from keywords.c:61
  2425. @deffn {Scheme Procedure} symbol->keyword symbol
  2426. @deffnx {C Function} scm_symbol_to_keyword (symbol)
  2427. Return the keyword with the same name as @var{symbol}.
  2428. @end deffn
  2429. keyword->symbol
  2430. @c snarfed from keywords.c:82
  2431. @deffn {Scheme Procedure} keyword->symbol keyword
  2432. @deffnx {C Function} scm_keyword_to_symbol (keyword)
  2433. Return the symbol with the same name as @var{keyword}.
  2434. @end deffn
  2435. list
  2436. @c snarfed from list.c:104
  2437. @deffn {Scheme Procedure} list . objs
  2438. @deffnx {C Function} scm_list (objs)
  2439. Return a list containing @var{objs}, the arguments to
  2440. @code{list}.
  2441. @end deffn
  2442. cons*
  2443. @c snarfed from list.c:119
  2444. @deffn {Scheme Procedure} cons* arg . rest
  2445. @deffnx {C Function} scm_cons_star (arg, rest)
  2446. Like @code{list}, but the last arg provides the tail of the
  2447. constructed list, returning @code{(cons @var{arg1} (cons
  2448. @var{arg2} (cons @dots{} @var{argn})))}. Requires at least one
  2449. argument. If given one argument, that argument is returned as
  2450. result. This function is called @code{list*} in some other
  2451. Schemes and in Common LISP.
  2452. @end deffn
  2453. null?
  2454. @c snarfed from list.c:143
  2455. @deffn {Scheme Procedure} null? x
  2456. @deffnx {C Function} scm_null_p (x)
  2457. Return @code{#t} iff @var{x} is the empty list, else @code{#f}.
  2458. @end deffn
  2459. list?
  2460. @c snarfed from list.c:153
  2461. @deffn {Scheme Procedure} list? x
  2462. @deffnx {C Function} scm_list_p (x)
  2463. Return @code{#t} iff @var{x} is a proper list, else @code{#f}.
  2464. @end deffn
  2465. length
  2466. @c snarfed from list.c:194
  2467. @deffn {Scheme Procedure} length lst
  2468. @deffnx {C Function} scm_length (lst)
  2469. Return the number of elements in list @var{lst}.
  2470. @end deffn
  2471. append
  2472. @c snarfed from list.c:223
  2473. @deffn {Scheme Procedure} append . args
  2474. @deffnx {C Function} scm_append (args)
  2475. Return a list consisting of the elements the lists passed as
  2476. arguments.
  2477. @lisp
  2478. (append '(x) '(y)) @result{} (x y)
  2479. (append '(a) '(b c d)) @result{} (a b c d)
  2480. (append '(a (b)) '((c))) @result{} (a (b) (c))
  2481. @end lisp
  2482. The resulting list is always newly allocated, except that it
  2483. shares structure with the last list argument. The last
  2484. argument may actually be any object; an improper list results
  2485. if the last argument is not a proper list.
  2486. @lisp
  2487. (append '(a b) '(c . d)) @result{} (a b c . d)
  2488. (append '() 'a) @result{} a
  2489. @end lisp
  2490. @end deffn
  2491. append!
  2492. @c snarfed from list.c:259
  2493. @deffn {Scheme Procedure} append! . lists
  2494. @deffnx {C Function} scm_append_x (lists)
  2495. A destructive version of @code{append} (@pxref{Pairs and
  2496. Lists,,,r5rs, The Revised^5 Report on Scheme}). The cdr field
  2497. of each list's final pair is changed to point to the head of
  2498. the next list, so no consing is performed. Return
  2499. the mutated list.
  2500. @end deffn
  2501. last-pair
  2502. @c snarfed from list.c:291
  2503. @deffn {Scheme Procedure} last-pair lst
  2504. @deffnx {C Function} scm_last_pair (lst)
  2505. Return the last pair in @var{lst}, signalling an error if
  2506. @var{lst} is circular.
  2507. @end deffn
  2508. reverse
  2509. @c snarfed from list.c:321
  2510. @deffn {Scheme Procedure} reverse lst
  2511. @deffnx {C Function} scm_reverse (lst)
  2512. Return a new list that contains the elements of @var{lst} but
  2513. in reverse order.
  2514. @end deffn
  2515. reverse!
  2516. @c snarfed from list.c:355
  2517. @deffn {Scheme Procedure} reverse! lst [new_tail]
  2518. @deffnx {C Function} scm_reverse_x (lst, new_tail)
  2519. A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r5rs,
  2520. The Revised^5 Report on Scheme}). The cdr of each cell in @var{lst} is
  2521. modified to point to the previous list element. Return the
  2522. reversed list.
  2523. Caveat: because the list is modified in place, the tail of the original
  2524. list now becomes its head, and the head of the original list now becomes
  2525. the tail. Therefore, the @var{lst} symbol to which the head of the
  2526. original list was bound now points to the tail. To ensure that the head
  2527. of the modified list is not lost, it is wise to save the return value of
  2528. @code{reverse!}
  2529. @end deffn
  2530. list-ref
  2531. @c snarfed from list.c:381
  2532. @deffn {Scheme Procedure} list-ref list k
  2533. @deffnx {C Function} scm_list_ref (list, k)
  2534. Return the @var{k}th element from @var{list}.
  2535. @end deffn
  2536. list-set!
  2537. @c snarfed from list.c:405
  2538. @deffn {Scheme Procedure} list-set! list k val
  2539. @deffnx {C Function} scm_list_set_x (list, k, val)
  2540. Set the @var{k}th element of @var{list} to @var{val}.
  2541. @end deffn
  2542. list-cdr-ref
  2543. @c snarfed from list.c:427
  2544. @deffn {Scheme Procedure} list-cdr-ref
  2545. implemented by the C function "scm_list_tail"
  2546. @end deffn
  2547. list-tail
  2548. @c snarfed from list.c:436
  2549. @deffn {Scheme Procedure} list-tail lst k
  2550. @deffnx {Scheme Procedure} list-cdr-ref lst k
  2551. @deffnx {C Function} scm_list_tail (lst, k)
  2552. Return the "tail" of @var{lst} beginning with its @var{k}th element.
  2553. The first element of the list is considered to be element 0.
  2554. @code{list-tail} and @code{list-cdr-ref} are identical. It may help to
  2555. think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list,
  2556. or returning the results of cdring @var{k} times down @var{lst}.
  2557. @end deffn
  2558. list-cdr-set!
  2559. @c snarfed from list.c:451
  2560. @deffn {Scheme Procedure} list-cdr-set! list k val
  2561. @deffnx {C Function} scm_list_cdr_set_x (list, k, val)
  2562. Set the @var{k}th cdr of @var{list} to @var{val}.
  2563. @end deffn
  2564. list-head
  2565. @c snarfed from list.c:479
  2566. @deffn {Scheme Procedure} list-head lst k
  2567. @deffnx {C Function} scm_list_head (lst, k)
  2568. Copy the first @var{k} elements from @var{lst} into a new list, and
  2569. return it.
  2570. @end deffn
  2571. list-copy
  2572. @c snarfed from list.c:530
  2573. @deffn {Scheme Procedure} list-copy lst
  2574. @deffnx {C Function} scm_list_copy (lst)
  2575. Return a (newly-created) copy of @var{lst}.
  2576. @end deffn
  2577. memq
  2578. @c snarfed from list.c:584
  2579. @deffn {Scheme Procedure} memq x lst
  2580. @deffnx {C Function} scm_memq (x, lst)
  2581. Return the first sublist of @var{lst} whose car is @code{eq?}
  2582. to @var{x} where the sublists of @var{lst} are the non-empty
  2583. lists returned by @code{(list-tail @var{lst} @var{k})} for
  2584. @var{k} less than the length of @var{lst}. If @var{x} does not
  2585. occur in @var{lst}, then @code{#f} (not the empty list) is
  2586. returned.
  2587. @end deffn
  2588. memv
  2589. @c snarfed from list.c:600
  2590. @deffn {Scheme Procedure} memv x lst
  2591. @deffnx {C Function} scm_memv (x, lst)
  2592. Return the first sublist of @var{lst} whose car is @code{eqv?}
  2593. to @var{x} where the sublists of @var{lst} are the non-empty
  2594. lists returned by @code{(list-tail @var{lst} @var{k})} for
  2595. @var{k} less than the length of @var{lst}. If @var{x} does not
  2596. occur in @var{lst}, then @code{#f} (not the empty list) is
  2597. returned.
  2598. @end deffn
  2599. member
  2600. @c snarfed from list.c:621
  2601. @deffn {Scheme Procedure} member x lst
  2602. @deffnx {C Function} scm_member (x, lst)
  2603. Return the first sublist of @var{lst} whose car is
  2604. @code{equal?} to @var{x} where the sublists of @var{lst} are
  2605. the non-empty lists returned by @code{(list-tail @var{lst}
  2606. @var{k})} for @var{k} less than the length of @var{lst}. If
  2607. @var{x} does not occur in @var{lst}, then @code{#f} (not the
  2608. empty list) is returned.
  2609. @end deffn
  2610. delq!
  2611. @c snarfed from list.c:646
  2612. @deffn {Scheme Procedure} delq! item lst
  2613. @deffnx {Scheme Procedure} delv! item lst
  2614. @deffnx {Scheme Procedure} delete! item lst
  2615. @deffnx {C Function} scm_delq_x (item, lst)
  2616. These procedures are destructive versions of @code{delq}, @code{delv}
  2617. and @code{delete}: they modify the existing @var{lst}
  2618. rather than creating a new list. Caveat evaluator: Like other
  2619. destructive list functions, these functions cannot modify the binding of
  2620. @var{lst}, and so cannot be used to delete the first element of
  2621. @var{lst} destructively.
  2622. @end deffn
  2623. delv!
  2624. @c snarfed from list.c:670
  2625. @deffn {Scheme Procedure} delv! item lst
  2626. @deffnx {C Function} scm_delv_x (item, lst)
  2627. Destructively remove all elements from @var{lst} that are
  2628. @code{eqv?} to @var{item}.
  2629. @end deffn
  2630. delete!
  2631. @c snarfed from list.c:695
  2632. @deffn {Scheme Procedure} delete! item lst
  2633. @deffnx {C Function} scm_delete_x (item, lst)
  2634. Destructively remove all elements from @var{lst} that are
  2635. @code{equal?} to @var{item}.
  2636. @end deffn
  2637. delq
  2638. @c snarfed from list.c:724
  2639. @deffn {Scheme Procedure} delq item lst
  2640. @deffnx {C Function} scm_delq (item, lst)
  2641. Return a newly-created copy of @var{lst} with elements
  2642. @code{eq?} to @var{item} removed. This procedure mirrors
  2643. @code{memq}: @code{delq} compares elements of @var{lst} against
  2644. @var{item} with @code{eq?}.
  2645. @end deffn
  2646. delv
  2647. @c snarfed from list.c:737
  2648. @deffn {Scheme Procedure} delv item lst
  2649. @deffnx {C Function} scm_delv (item, lst)
  2650. Return a newly-created copy of @var{lst} with elements
  2651. @code{eqv?} to @var{item} removed. This procedure mirrors
  2652. @code{memv}: @code{delv} compares elements of @var{lst} against
  2653. @var{item} with @code{eqv?}.
  2654. @end deffn
  2655. delete
  2656. @c snarfed from list.c:750
  2657. @deffn {Scheme Procedure} delete item lst
  2658. @deffnx {C Function} scm_delete (item, lst)
  2659. Return a newly-created copy of @var{lst} with elements
  2660. @code{equal?} to @var{item} removed. This procedure mirrors
  2661. @code{member}: @code{delete} compares elements of @var{lst}
  2662. against @var{item} with @code{equal?}.
  2663. @end deffn
  2664. delq1!
  2665. @c snarfed from list.c:763
  2666. @deffn {Scheme Procedure} delq1! item lst
  2667. @deffnx {C Function} scm_delq1_x (item, lst)
  2668. Like @code{delq!}, but only deletes the first occurrence of
  2669. @var{item} from @var{lst}. Tests for equality using
  2670. @code{eq?}. See also @code{delv1!} and @code{delete1!}.
  2671. @end deffn
  2672. delv1!
  2673. @c snarfed from list.c:791
  2674. @deffn {Scheme Procedure} delv1! item lst
  2675. @deffnx {C Function} scm_delv1_x (item, lst)
  2676. Like @code{delv!}, but only deletes the first occurrence of
  2677. @var{item} from @var{lst}. Tests for equality using
  2678. @code{eqv?}. See also @code{delq1!} and @code{delete1!}.
  2679. @end deffn
  2680. delete1!
  2681. @c snarfed from list.c:819
  2682. @deffn {Scheme Procedure} delete1! item lst
  2683. @deffnx {C Function} scm_delete1_x (item, lst)
  2684. Like @code{delete!}, but only deletes the first occurrence of
  2685. @var{item} from @var{lst}. Tests for equality using
  2686. @code{equal?}. See also @code{delq1!} and @code{delv1!}.
  2687. @end deffn
  2688. filter
  2689. @c snarfed from list.c:851
  2690. @deffn {Scheme Procedure} filter pred list
  2691. @deffnx {C Function} scm_filter (pred, list)
  2692. Return all the elements of 2nd arg @var{list} that satisfy predicate @var{pred}.
  2693. The list is not disordered -- elements that appear in the result list occur
  2694. in the same order as they occur in the argument list. The returned list may
  2695. share a common tail with the argument list. The dynamic order in which the
  2696. various applications of pred are made is not specified.
  2697. @lisp
  2698. (filter even? '(0 7 8 8 43 -4)) => (0 8 8 -4)
  2699. @end lisp
  2700. @end deffn
  2701. filter!
  2702. @c snarfed from list.c:878
  2703. @deffn {Scheme Procedure} filter! pred list
  2704. @deffnx {C Function} scm_filter_x (pred, list)
  2705. Linear-update variant of @code{filter}.
  2706. @end deffn
  2707. primitive-load
  2708. @c snarfed from load.c:72
  2709. @deffn {Scheme Procedure} primitive-load filename
  2710. @deffnx {C Function} scm_primitive_load (filename)
  2711. Load the file named @var{filename} and evaluate its contents in
  2712. the top-level environment. The load paths are not searched;
  2713. @var{filename} must either be a full pathname or be a pathname
  2714. relative to the current directory. If the variable
  2715. @code{%load-hook} is defined, it should be bound to a procedure
  2716. that will be called before any code is loaded. See the
  2717. documentation for @code{%load-hook} later in this section.
  2718. @end deffn
  2719. %package-data-dir
  2720. @c snarfed from load.c:117
  2721. @deffn {Scheme Procedure} %package-data-dir
  2722. @deffnx {C Function} scm_sys_package_data_dir ()
  2723. Return the name of the directory where Scheme packages, modules and
  2724. libraries are kept. On most Unix systems, this will be
  2725. @samp{/usr/local/share/guile}.
  2726. @end deffn
  2727. %library-dir
  2728. @c snarfed from load.c:129
  2729. @deffn {Scheme Procedure} %library-dir
  2730. @deffnx {C Function} scm_sys_library_dir ()
  2731. Return the directory where the Guile Scheme library files are installed.
  2732. E.g., may return "/usr/share/guile/1.3.5".
  2733. @end deffn
  2734. %site-dir
  2735. @c snarfed from load.c:141
  2736. @deffn {Scheme Procedure} %site-dir
  2737. @deffnx {C Function} scm_sys_site_dir ()
  2738. Return the directory where the Guile site files are installed.
  2739. E.g., may return "/usr/share/guile/site".
  2740. @end deffn
  2741. parse-path
  2742. @c snarfed from load.c:166
  2743. @deffn {Scheme Procedure} parse-path path [tail]
  2744. @deffnx {C Function} scm_parse_path (path, tail)
  2745. Parse @var{path}, which is expected to be a colon-separated
  2746. string, into a list and return the resulting list with
  2747. @var{tail} appended. If @var{path} is @code{#f}, @var{tail}
  2748. is returned.
  2749. @end deffn
  2750. search-path
  2751. @c snarfed from load.c:293
  2752. @deffn {Scheme Procedure} search-path path filename [extensions]
  2753. @deffnx {C Function} scm_search_path (path, filename, extensions)
  2754. Search @var{path} for a directory containing a file named
  2755. @var{filename}. The file must be readable, and not a directory.
  2756. If we find one, return its full filename; otherwise, return
  2757. @code{#f}. If @var{filename} is absolute, return it unchanged.
  2758. If given, @var{extensions} is a list of strings; for each
  2759. directory in @var{path}, we search for @var{filename}
  2760. concatenated with each @var{extension}.
  2761. @end deffn
  2762. %search-load-path
  2763. @c snarfed from load.c:430
  2764. @deffn {Scheme Procedure} %search-load-path filename
  2765. @deffnx {C Function} scm_sys_search_load_path (filename)
  2766. Search @var{%load-path} for the file named @var{filename},
  2767. which must be readable by the current user. If @var{filename}
  2768. is found in the list of paths to search or is an absolute
  2769. pathname, return its full pathname. Otherwise, return
  2770. @code{#f}. Filenames may have any of the optional extensions
  2771. in the @code{%load-extensions} list; @code{%search-load-path}
  2772. will try each extension automatically.
  2773. @end deffn
  2774. primitive-load-path
  2775. @c snarfed from load.c:451
  2776. @deffn {Scheme Procedure} primitive-load-path filename
  2777. @deffnx {C Function} scm_primitive_load_path (filename)
  2778. Search @var{%load-path} for the file named @var{filename} and
  2779. load it into the top-level environment. If @var{filename} is a
  2780. relative pathname and is not found in the list of search paths,
  2781. an error is signalled.
  2782. @end deffn
  2783. procedure->memoizing-macro
  2784. @c snarfed from macros.c:109
  2785. @deffn {Scheme Procedure} procedure->memoizing-macro code
  2786. @deffnx {C Function} scm_makmmacro (code)
  2787. Return a @dfn{macro} which, when a symbol defined to this value
  2788. appears as the first symbol in an expression, evaluates the
  2789. result of applying @var{code} to the expression and the
  2790. environment.
  2791. @code{procedure->memoizing-macro} is the same as
  2792. @code{procedure->macro}, except that the expression returned by
  2793. @var{code} replaces the original macro expression in the memoized
  2794. form of the containing code.
  2795. @end deffn
  2796. procedure->syntax
  2797. @c snarfed from macros.c:123
  2798. @deffn {Scheme Procedure} procedure->syntax code
  2799. @deffnx {C Function} scm_makacro (code)
  2800. Return a @dfn{macro} which, when a symbol defined to this value
  2801. appears as the first symbol in an expression, returns the
  2802. result of applying @var{code} to the expression and the
  2803. environment.
  2804. @end deffn
  2805. procedure->macro
  2806. @c snarfed from macros.c:146
  2807. @deffn {Scheme Procedure} procedure->macro code
  2808. @deffnx {C Function} scm_makmacro (code)
  2809. Return a @dfn{macro} which, when a symbol defined to this value
  2810. appears as the first symbol in an expression, evaluates the
  2811. result of applying @var{code} to the expression and the
  2812. environment. For example:
  2813. @lisp
  2814. (define trace
  2815. (procedure->macro
  2816. (lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr x))))))
  2817. (trace @i{foo}) @equiv{} (set! @i{foo} (tracef @i{foo} '@i{foo})).
  2818. @end lisp
  2819. @end deffn
  2820. macro?
  2821. @c snarfed from macros.c:165
  2822. @deffn {Scheme Procedure} macro? obj
  2823. @deffnx {C Function} scm_macro_p (obj)
  2824. Return @code{#t} if @var{obj} is a regular macro, a memoizing macro or a
  2825. syntax transformer.
  2826. @end deffn
  2827. macro-type
  2828. @c snarfed from macros.c:186
  2829. @deffn {Scheme Procedure} macro-type m
  2830. @deffnx {C Function} scm_macro_type (m)
  2831. Return one of the symbols @code{syntax}, @code{macro} or
  2832. @code{macro!}, depending on whether @var{m} is a syntax
  2833. transformer, a regular macro, or a memoizing macro,
  2834. respectively. If @var{m} is not a macro, @code{#f} is
  2835. returned.
  2836. @end deffn
  2837. macro-name
  2838. @c snarfed from macros.c:207
  2839. @deffn {Scheme Procedure} macro-name m
  2840. @deffnx {C Function} scm_macro_name (m)
  2841. Return the name of the macro @var{m}.
  2842. @end deffn
  2843. macro-transformer
  2844. @c snarfed from macros.c:218
  2845. @deffn {Scheme Procedure} macro-transformer m
  2846. @deffnx {C Function} scm_macro_transformer (m)
  2847. Return the transformer of the macro @var{m}.
  2848. @end deffn
  2849. current-module
  2850. @c snarfed from modules.c:45
  2851. @deffn {Scheme Procedure} current-module
  2852. @deffnx {C Function} scm_current_module ()
  2853. Return the current module.
  2854. @end deffn
  2855. set-current-module
  2856. @c snarfed from modules.c:57
  2857. @deffn {Scheme Procedure} set-current-module module
  2858. @deffnx {C Function} scm_set_current_module (module)
  2859. Set the current module to @var{module} and return
  2860. the previous current module.
  2861. @end deffn
  2862. interaction-environment
  2863. @c snarfed from modules.c:80
  2864. @deffn {Scheme Procedure} interaction-environment
  2865. @deffnx {C Function} scm_interaction_environment ()
  2866. Return a specifier for the environment that contains
  2867. implementation--defined bindings, typically a superset of those
  2868. listed in the report. The intent is that this procedure will
  2869. return the environment in which the implementation would
  2870. evaluate expressions dynamically typed by the user.
  2871. @end deffn
  2872. env-module
  2873. @c snarfed from modules.c:266
  2874. @deffn {Scheme Procedure} env-module env
  2875. @deffnx {C Function} scm_env_module (env)
  2876. Return the module of @var{ENV}, a lexical environment.
  2877. @end deffn
  2878. standard-eval-closure
  2879. @c snarfed from modules.c:342
  2880. @deffn {Scheme Procedure} standard-eval-closure module
  2881. @deffnx {C Function} scm_standard_eval_closure (module)
  2882. Return an eval closure for the module @var{module}.
  2883. @end deffn
  2884. standard-interface-eval-closure
  2885. @c snarfed from modules.c:353
  2886. @deffn {Scheme Procedure} standard-interface-eval-closure module
  2887. @deffnx {C Function} scm_standard_interface_eval_closure (module)
  2888. Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
  2889. @end deffn
  2890. module-import-interface
  2891. @c snarfed from modules.c:399
  2892. @deffn {Scheme Procedure} module-import-interface module sym
  2893. @deffnx {C Function} scm_module_import_interface (module, sym)
  2894. @end deffn
  2895. %get-pre-modules-obarray
  2896. @c snarfed from modules.c:616
  2897. @deffn {Scheme Procedure} %get-pre-modules-obarray
  2898. @deffnx {C Function} scm_get_pre_modules_obarray ()
  2899. Return the obarray that is used for all new bindings before the module system is booted. The first call to @code{set-current-module} will boot the module system.
  2900. @end deffn
  2901. exact?
  2902. @c snarfed from numbers.c:460
  2903. @deffn {Scheme Procedure} exact? x
  2904. @deffnx {C Function} scm_exact_p (x)
  2905. Return @code{#t} if @var{x} is an exact number, @code{#f}
  2906. otherwise.
  2907. @end deffn
  2908. odd?
  2909. @c snarfed from numbers.c:479
  2910. @deffn {Scheme Procedure} odd? n
  2911. @deffnx {C Function} scm_odd_p (n)
  2912. Return @code{#t} if @var{n} is an odd number, @code{#f}
  2913. otherwise.
  2914. @end deffn
  2915. even?
  2916. @c snarfed from numbers.c:514
  2917. @deffn {Scheme Procedure} even? n
  2918. @deffnx {C Function} scm_even_p (n)
  2919. Return @code{#t} if @var{n} is an even number, @code{#f}
  2920. otherwise.
  2921. @end deffn
  2922. inf?
  2923. @c snarfed from numbers.c:548
  2924. @deffn {Scheme Procedure} inf? x
  2925. @deffnx {C Function} scm_inf_p (x)
  2926. Return @code{#t} if @var{x} is either @samp{+inf.0}
  2927. or @samp{-inf.0}, @code{#f} otherwise.
  2928. @end deffn
  2929. nan?
  2930. @c snarfed from numbers.c:564
  2931. @deffn {Scheme Procedure} nan? n
  2932. @deffnx {C Function} scm_nan_p (n)
  2933. Return @code{#t} if @var{n} is a NaN, @code{#f}
  2934. otherwise.
  2935. @end deffn
  2936. inf
  2937. @c snarfed from numbers.c:634
  2938. @deffn {Scheme Procedure} inf
  2939. @deffnx {C Function} scm_inf ()
  2940. Return Inf.
  2941. @end deffn
  2942. nan
  2943. @c snarfed from numbers.c:649
  2944. @deffn {Scheme Procedure} nan
  2945. @deffnx {C Function} scm_nan ()
  2946. Return NaN.
  2947. @end deffn
  2948. abs
  2949. @c snarfed from numbers.c:665
  2950. @deffn {Scheme Procedure} abs x
  2951. @deffnx {C Function} scm_abs (x)
  2952. Return the absolute value of @var{x}.
  2953. @end deffn
  2954. logand
  2955. @c snarfed from numbers.c:1201
  2956. @deffn {Scheme Procedure} logand n1 n2
  2957. Return the bitwise AND of the integer arguments.
  2958. @lisp
  2959. (logand) @result{} -1
  2960. (logand 7) @result{} 7
  2961. (logand #b111 #b011 #b001) @result{} 1
  2962. @end lisp
  2963. @end deffn
  2964. logior
  2965. @c snarfed from numbers.c:1277
  2966. @deffn {Scheme Procedure} logior n1 n2
  2967. Return the bitwise OR of the integer arguments.
  2968. @lisp
  2969. (logior) @result{} 0
  2970. (logior 7) @result{} 7
  2971. (logior #b000 #b001 #b011) @result{} 3
  2972. @end lisp
  2973. @end deffn
  2974. logxor
  2975. @c snarfed from numbers.c:1353
  2976. @deffn {Scheme Procedure} logxor n1 n2
  2977. Return the bitwise XOR of the integer arguments. A bit is
  2978. set in the result if it is set in an odd number of arguments.
  2979. @lisp
  2980. (logxor) @result{} 0
  2981. (logxor 7) @result{} 7
  2982. (logxor #b000 #b001 #b011) @result{} 2
  2983. (logxor #b000 #b001 #b011 #b011) @result{} 1
  2984. @end lisp
  2985. @end deffn
  2986. logtest
  2987. @c snarfed from numbers.c:1428
  2988. @deffn {Scheme Procedure} logtest j k
  2989. @deffnx {C Function} scm_logtest (j, k)
  2990. Test whether @var{j} and @var{k} have any 1 bits in common.
  2991. This is equivalent to @code{(not (zero? (logand j k)))}, but
  2992. without actually calculating the @code{logand}, just testing
  2993. for non-zero.
  2994. @lisp
  2995. (logtest #b0100 #b1011) @result{} #f
  2996. (logtest #b0100 #b0111) @result{} #t
  2997. @end lisp
  2998. @end deffn
  2999. logbit?
  3000. @c snarfed from numbers.c:1501
  3001. @deffn {Scheme Procedure} logbit? index j
  3002. @deffnx {C Function} scm_logbit_p (index, j)
  3003. Test whether bit number @var{index} in @var{j} is set.
  3004. @var{index} starts from 0 for the least significant bit.
  3005. @lisp
  3006. (logbit? 0 #b1101) @result{} #t
  3007. (logbit? 1 #b1101) @result{} #f
  3008. (logbit? 2 #b1101) @result{} #t
  3009. (logbit? 3 #b1101) @result{} #t
  3010. (logbit? 4 #b1101) @result{} #f
  3011. @end lisp
  3012. @end deffn
  3013. lognot
  3014. @c snarfed from numbers.c:1535
  3015. @deffn {Scheme Procedure} lognot n
  3016. @deffnx {C Function} scm_lognot (n)
  3017. Return the integer which is the ones-complement of the integer
  3018. argument.
  3019. @lisp
  3020. (number->string (lognot #b10000000) 2)
  3021. @result{} "-10000001"
  3022. (number->string (lognot #b0) 2)
  3023. @result{} "-1"
  3024. @end lisp
  3025. @end deffn
  3026. modulo-expt
  3027. @c snarfed from numbers.c:1580
  3028. @deffn {Scheme Procedure} modulo-expt n k m
  3029. @deffnx {C Function} scm_modulo_expt (n, k, m)
  3030. Return @var{n} raised to the integer exponent
  3031. @var{k}, modulo @var{m}.
  3032. @lisp
  3033. (modulo-expt 2 3 5)
  3034. @result{} 3
  3035. @end lisp
  3036. @end deffn
  3037. integer-expt
  3038. @c snarfed from numbers.c:1689
  3039. @deffn {Scheme Procedure} integer-expt n k
  3040. @deffnx {C Function} scm_integer_expt (n, k)
  3041. Return @var{n} raised to the power @var{k}. @var{k} must be an
  3042. exact integer, @var{n} can be any number.
  3043. Negative @var{k} is supported, and results in @math{1/n^abs(k)}
  3044. in the usual way. @math{@var{n}^0} is 1, as usual, and that
  3045. includes @math{0^0} is 1.
  3046. @lisp
  3047. (integer-expt 2 5) @result{} 32
  3048. (integer-expt -3 3) @result{} -27
  3049. (integer-expt 5 -3) @result{} 1/125
  3050. (integer-expt 0 0) @result{} 1
  3051. @end lisp
  3052. @end deffn
  3053. ash
  3054. @c snarfed from numbers.c:1779
  3055. @deffn {Scheme Procedure} ash n cnt
  3056. @deffnx {C Function} scm_ash (n, cnt)
  3057. Return @var{n} shifted left by @var{cnt} bits, or shifted right
  3058. if @var{cnt} is negative. This is an ``arithmetic'' shift.
  3059. This is effectively a multiplication by 2^@var{cnt}, and when
  3060. @var{cnt} is negative it's a division, rounded towards negative
  3061. infinity. (Note that this is not the same rounding as
  3062. @code{quotient} does.)
  3063. With @var{n} viewed as an infinite precision twos complement,
  3064. @code{ash} means a left shift introducing zero bits, or a right
  3065. shift dropping bits.
  3066. @lisp
  3067. (number->string (ash #b1 3) 2) @result{} "1000"
  3068. (number->string (ash #b1010 -1) 2) @result{} "101"
  3069. ;; -23 is bits ...11101001, -6 is bits ...111010
  3070. (ash -23 -2) @result{} -6
  3071. @end lisp
  3072. @end deffn
  3073. bit-extract
  3074. @c snarfed from numbers.c:1870
  3075. @deffn {Scheme Procedure} bit-extract n start end
  3076. @deffnx {C Function} scm_bit_extract (n, start, end)
  3077. Return the integer composed of the @var{start} (inclusive)
  3078. through @var{end} (exclusive) bits of @var{n}. The
  3079. @var{start}th bit becomes the 0-th bit in the result.
  3080. @lisp
  3081. (number->string (bit-extract #b1101101010 0 4) 2)
  3082. @result{} "1010"
  3083. (number->string (bit-extract #b1101101010 4 9) 2)
  3084. @result{} "10110"
  3085. @end lisp
  3086. @end deffn
  3087. logcount
  3088. @c snarfed from numbers.c:1949
  3089. @deffn {Scheme Procedure} logcount n
  3090. @deffnx {C Function} scm_logcount (n)
  3091. Return the number of bits in integer @var{n}. If integer is
  3092. positive, the 1-bits in its binary representation are counted.
  3093. If negative, the 0-bits in its two's-complement binary
  3094. representation are counted. If 0, 0 is returned.
  3095. @lisp
  3096. (logcount #b10101010)
  3097. @result{} 4
  3098. (logcount 0)
  3099. @result{} 0
  3100. (logcount -2)
  3101. @result{} 1
  3102. @end lisp
  3103. @end deffn
  3104. integer-length
  3105. @c snarfed from numbers.c:1997
  3106. @deffn {Scheme Procedure} integer-length n
  3107. @deffnx {C Function} scm_integer_length (n)
  3108. Return the number of bits necessary to represent @var{n}.
  3109. @lisp
  3110. (integer-length #b10101010)
  3111. @result{} 8
  3112. (integer-length 0)
  3113. @result{} 0
  3114. (integer-length #b1111)
  3115. @result{} 4
  3116. @end lisp
  3117. @end deffn
  3118. number->string
  3119. @c snarfed from numbers.c:2337
  3120. @deffn {Scheme Procedure} number->string n [radix]
  3121. @deffnx {C Function} scm_number_to_string (n, radix)
  3122. Return a string holding the external representation of the
  3123. number @var{n} in the given @var{radix}. If @var{n} is
  3124. inexact, a radix of 10 will be used.
  3125. @end deffn
  3126. string->number
  3127. @c snarfed from numbers.c:3034
  3128. @deffn {Scheme Procedure} string->number string [radix]
  3129. @deffnx {C Function} scm_string_to_number (string, radix)
  3130. Return a number of the maximally precise representation
  3131. expressed by the given @var{string}. @var{radix} must be an
  3132. exact integer, either 2, 8, 10, or 16. If supplied, @var{radix}
  3133. is a default radix that may be overridden by an explicit radix
  3134. prefix in @var{string} (e.g. "#o177"). If @var{radix} is not
  3135. supplied, then the default radix is 10. If string is not a
  3136. syntactically valid notation for a number, then
  3137. @code{string->number} returns @code{#f}.
  3138. @end deffn
  3139. number?
  3140. @c snarfed from numbers.c:3097
  3141. @deffn {Scheme Procedure} number? x
  3142. @deffnx {C Function} scm_number_p (x)
  3143. Return @code{#t} if @var{x} is a number, @code{#f}
  3144. otherwise.
  3145. @end deffn
  3146. complex?
  3147. @c snarfed from numbers.c:3110
  3148. @deffn {Scheme Procedure} complex? x
  3149. @deffnx {C Function} scm_complex_p (x)
  3150. Return @code{#t} if @var{x} is a complex number, @code{#f}
  3151. otherwise. Note that the sets of real, rational and integer
  3152. values form subsets of the set of complex numbers, i. e. the
  3153. predicate will also be fulfilled if @var{x} is a real,
  3154. rational or integer number.
  3155. @end deffn
  3156. real?
  3157. @c snarfed from numbers.c:3123
  3158. @deffn {Scheme Procedure} real? x
  3159. @deffnx {C Function} scm_real_p (x)
  3160. Return @code{#t} if @var{x} is a real number, @code{#f}
  3161. otherwise. Note that the set of integer values forms a subset of
  3162. the set of real numbers, i. e. the predicate will also be
  3163. fulfilled if @var{x} is an integer number.
  3164. @end deffn
  3165. rational?
  3166. @c snarfed from numbers.c:3136
  3167. @deffn {Scheme Procedure} rational? x
  3168. @deffnx {C Function} scm_rational_p (x)
  3169. Return @code{#t} if @var{x} is a rational number, @code{#f}
  3170. otherwise. Note that the set of integer values forms a subset of
  3171. the set of rational numbers, i. e. the predicate will also be
  3172. fulfilled if @var{x} is an integer number.
  3173. @end deffn
  3174. integer?
  3175. @c snarfed from numbers.c:3159
  3176. @deffn {Scheme Procedure} integer? x
  3177. @deffnx {C Function} scm_integer_p (x)
  3178. Return @code{#t} if @var{x} is an integer number, @code{#f}
  3179. else.
  3180. @end deffn
  3181. inexact?
  3182. @c snarfed from numbers.c:3185
  3183. @deffn {Scheme Procedure} inexact? x
  3184. @deffnx {C Function} scm_inexact_p (x)
  3185. Return @code{#t} if @var{x} is an inexact number, @code{#f}
  3186. else.
  3187. @end deffn
  3188. truncate
  3189. @c snarfed from numbers.c:5060
  3190. @deffn {Scheme Procedure} truncate x
  3191. @deffnx {C Function} scm_truncate_number (x)
  3192. Round the number @var{x} towards zero.
  3193. @end deffn
  3194. round
  3195. @c snarfed from numbers.c:5076
  3196. @deffn {Scheme Procedure} round x
  3197. @deffnx {C Function} scm_round_number (x)
  3198. Round the number @var{x} towards the nearest integer. When it is exactly halfway between two integers, round towards the even one.
  3199. @end deffn
  3200. floor
  3201. @c snarfed from numbers.c:5102
  3202. @deffn {Scheme Procedure} floor x
  3203. @deffnx {C Function} scm_floor (x)
  3204. Round the number @var{x} towards minus infinity.
  3205. @end deffn
  3206. ceiling
  3207. @c snarfed from numbers.c:5133
  3208. @deffn {Scheme Procedure} ceiling x
  3209. @deffnx {C Function} scm_ceiling (x)
  3210. Round the number @var{x} towards infinity.
  3211. @end deffn
  3212. $expt
  3213. @c snarfed from numbers.c:5242
  3214. @deffn {Scheme Procedure} $expt x y
  3215. @deffnx {C Function} scm_sys_expt (x, y)
  3216. Return @var{x} raised to the power of @var{y}. This
  3217. procedure does not accept complex arguments.
  3218. @end deffn
  3219. $atan2
  3220. @c snarfed from numbers.c:5258
  3221. @deffn {Scheme Procedure} $atan2 x y
  3222. @deffnx {C Function} scm_sys_atan2 (x, y)
  3223. Return the arc tangent of the two arguments @var{x} and
  3224. @var{y}. This is similar to calculating the arc tangent of
  3225. @var{x} / @var{y}, except that the signs of both arguments
  3226. are used to determine the quadrant of the result. This
  3227. procedure does not accept complex arguments.
  3228. @end deffn
  3229. make-rectangular
  3230. @c snarfed from numbers.c:5286
  3231. @deffn {Scheme Procedure} make-rectangular real imaginary
  3232. @deffnx {C Function} scm_make_rectangular (real, imaginary)
  3233. Return a complex number constructed of the given @var{real} and
  3234. @var{imaginary} parts.
  3235. @end deffn
  3236. make-polar
  3237. @c snarfed from numbers.c:5310
  3238. @deffn {Scheme Procedure} make-polar x y
  3239. @deffnx {C Function} scm_make_polar (x, y)
  3240. Return the complex number @var{x} * e^(i * @var{y}).
  3241. @end deffn
  3242. inexact->exact
  3243. @c snarfed from numbers.c:5513
  3244. @deffn {Scheme Procedure} inexact->exact z
  3245. @deffnx {C Function} scm_inexact_to_exact (z)
  3246. Return an exact number that is numerically closest to @var{z}.
  3247. @end deffn
  3248. rationalize
  3249. @c snarfed from numbers.c:5550
  3250. @deffn {Scheme Procedure} rationalize x err
  3251. @deffnx {C Function} scm_rationalize (x, err)
  3252. Return an exact number that is within @var{err} of @var{x}.
  3253. @end deffn
  3254. entity?
  3255. @c snarfed from objects.c:192
  3256. @deffn {Scheme Procedure} entity? obj
  3257. @deffnx {C Function} scm_entity_p (obj)
  3258. Return @code{#t} if @var{obj} is an entity.
  3259. @end deffn
  3260. operator?
  3261. @c snarfed from objects.c:201
  3262. @deffn {Scheme Procedure} operator? obj
  3263. @deffnx {C Function} scm_operator_p (obj)
  3264. Return @code{#t} if @var{obj} is an operator.
  3265. @end deffn
  3266. valid-object-procedure?
  3267. @c snarfed from objects.c:217
  3268. @deffn {Scheme Procedure} valid-object-procedure? proc
  3269. @deffnx {C Function} scm_valid_object_procedure_p (proc)
  3270. Return @code{#t} iff @var{proc} is a procedure that can be used with @code{set-object-procedure}. It is always valid to use a closure constructed by @code{lambda}.
  3271. @end deffn
  3272. set-object-procedure!
  3273. @c snarfed from objects.c:239
  3274. @deffn {Scheme Procedure} set-object-procedure! obj proc
  3275. @deffnx {C Function} scm_set_object_procedure_x (obj, proc)
  3276. Set the object procedure of @var{obj} to @var{proc}.
  3277. @var{obj} must be either an entity or an operator.
  3278. @end deffn
  3279. make-class-object
  3280. @c snarfed from objects.c:299
  3281. @deffn {Scheme Procedure} make-class-object metaclass layout
  3282. @deffnx {C Function} scm_make_class_object (metaclass, layout)
  3283. Create a new class object of class @var{metaclass}, with the
  3284. slot layout specified by @var{layout}.
  3285. @end deffn
  3286. make-subclass-object
  3287. @c snarfed from objects.c:314
  3288. @deffn {Scheme Procedure} make-subclass-object class layout
  3289. @deffnx {C Function} scm_make_subclass_object (class, layout)
  3290. Create a subclass object of @var{class}, with the slot layout
  3291. specified by @var{layout}.
  3292. @end deffn
  3293. object-properties
  3294. @c snarfed from objprop.c:36
  3295. @deffn {Scheme Procedure} object-properties obj
  3296. @deffnx {C Function} scm_object_properties (obj)
  3297. Return @var{obj}'s property list.
  3298. @end deffn
  3299. set-object-properties!
  3300. @c snarfed from objprop.c:46
  3301. @deffn {Scheme Procedure} set-object-properties! obj alist
  3302. @deffnx {C Function} scm_set_object_properties_x (obj, alist)
  3303. Set @var{obj}'s property list to @var{alist}.
  3304. @end deffn
  3305. object-property
  3306. @c snarfed from objprop.c:57
  3307. @deffn {Scheme Procedure} object-property obj key
  3308. @deffnx {C Function} scm_object_property (obj, key)
  3309. Return the property of @var{obj} with name @var{key}.
  3310. @end deffn
  3311. set-object-property!
  3312. @c snarfed from objprop.c:69
  3313. @deffn {Scheme Procedure} set-object-property! obj key value
  3314. @deffnx {C Function} scm_set_object_property_x (obj, key, value)
  3315. In @var{obj}'s property list, set the property named @var{key}
  3316. to @var{value}.
  3317. @end deffn
  3318. cons
  3319. @c snarfed from pairs.c:56
  3320. @deffn {Scheme Procedure} cons x y
  3321. @deffnx {C Function} scm_cons (x, y)
  3322. Return a newly allocated pair whose car is @var{x} and whose
  3323. cdr is @var{y}. The pair is guaranteed to be different (in the
  3324. sense of @code{eq?}) from every previously existing object.
  3325. @end deffn
  3326. pair?
  3327. @c snarfed from pairs.c:74
  3328. @deffn {Scheme Procedure} pair? x
  3329. @deffnx {C Function} scm_pair_p (x)
  3330. Return @code{#t} if @var{x} is a pair; otherwise return
  3331. @code{#f}.
  3332. @end deffn
  3333. set-car!
  3334. @c snarfed from pairs.c:120
  3335. @deffn {Scheme Procedure} set-car! pair value
  3336. @deffnx {C Function} scm_set_car_x (pair, value)
  3337. Stores @var{value} in the car field of @var{pair}. The value returned
  3338. by @code{set-car!} is unspecified.
  3339. @end deffn
  3340. set-cdr!
  3341. @c snarfed from pairs.c:133
  3342. @deffn {Scheme Procedure} set-cdr! pair value
  3343. @deffnx {C Function} scm_set_cdr_x (pair, value)
  3344. Stores @var{value} in the cdr field of @var{pair}. The value returned
  3345. by @code{set-cdr!} is unspecified.
  3346. @end deffn
  3347. char-ready?
  3348. @c snarfed from ports.c:245
  3349. @deffn {Scheme Procedure} char-ready? [port]
  3350. @deffnx {C Function} scm_char_ready_p (port)
  3351. Return @code{#t} if a character is ready on input @var{port}
  3352. and return @code{#f} otherwise. If @code{char-ready?} returns
  3353. @code{#t} then the next @code{read-char} operation on
  3354. @var{port} is guaranteed not to hang. If @var{port} is a file
  3355. port at end of file then @code{char-ready?} returns @code{#t}.
  3356. @code{char-ready?} exists to make it possible for a
  3357. program to accept characters from interactive ports without
  3358. getting stuck waiting for input. Any input editors associated
  3359. with such ports must make sure that characters whose existence
  3360. has been asserted by @code{char-ready?} cannot be rubbed out.
  3361. If @code{char-ready?} were to return @code{#f} at end of file,
  3362. a port at end of file would be indistinguishable from an
  3363. interactive port that has no ready characters.
  3364. @end deffn
  3365. drain-input
  3366. @c snarfed from ports.c:322
  3367. @deffn {Scheme Procedure} drain-input port
  3368. @deffnx {C Function} scm_drain_input (port)
  3369. This procedure clears a port's input buffers, similar
  3370. to the way that force-output clears the output buffer. The
  3371. contents of the buffers are returned as a single string, e.g.,
  3372. @lisp
  3373. (define p (open-input-file ...))
  3374. (drain-input p) => empty string, nothing buffered yet.
  3375. (unread-char (read-char p) p)
  3376. (drain-input p) => initial chars from p, up to the buffer size.
  3377. @end lisp
  3378. Draining the buffers may be useful for cleanly finishing
  3379. buffered I/O so that the file descriptor can be used directly
  3380. for further input.
  3381. @end deffn
  3382. current-input-port
  3383. @c snarfed from ports.c:355
  3384. @deffn {Scheme Procedure} current-input-port
  3385. @deffnx {C Function} scm_current_input_port ()
  3386. Return the current input port. This is the default port used
  3387. by many input procedures. Initially, @code{current-input-port}
  3388. returns the @dfn{standard input} in Unix and C terminology.
  3389. @end deffn
  3390. current-output-port
  3391. @c snarfed from ports.c:367
  3392. @deffn {Scheme Procedure} current-output-port
  3393. @deffnx {C Function} scm_current_output_port ()
  3394. Return the current output port. This is the default port used
  3395. by many output procedures. Initially,
  3396. @code{current-output-port} returns the @dfn{standard output} in
  3397. Unix and C terminology.
  3398. @end deffn
  3399. current-error-port
  3400. @c snarfed from ports.c:377
  3401. @deffn {Scheme Procedure} current-error-port
  3402. @deffnx {C Function} scm_current_error_port ()
  3403. Return the port to which errors and warnings should be sent (the
  3404. @dfn{standard error} in Unix and C terminology).
  3405. @end deffn
  3406. current-load-port
  3407. @c snarfed from ports.c:387
  3408. @deffn {Scheme Procedure} current-load-port
  3409. @deffnx {C Function} scm_current_load_port ()
  3410. Return the current-load-port.
  3411. The load port is used internally by @code{primitive-load}.
  3412. @end deffn
  3413. set-current-input-port
  3414. @c snarfed from ports.c:400
  3415. @deffn {Scheme Procedure} set-current-input-port port
  3416. @deffnx {Scheme Procedure} set-current-output-port port
  3417. @deffnx {Scheme Procedure} set-current-error-port port
  3418. @deffnx {C Function} scm_set_current_input_port (port)
  3419. Change the ports returned by @code{current-input-port},
  3420. @code{current-output-port} and @code{current-error-port}, respectively,
  3421. so that they use the supplied @var{port} for input or output.
  3422. @end deffn
  3423. set-current-output-port
  3424. @c snarfed from ports.c:413
  3425. @deffn {Scheme Procedure} set-current-output-port port
  3426. @deffnx {C Function} scm_set_current_output_port (port)
  3427. Set the current default output port to @var{port}.
  3428. @end deffn
  3429. set-current-error-port
  3430. @c snarfed from ports.c:427
  3431. @deffn {Scheme Procedure} set-current-error-port port
  3432. @deffnx {C Function} scm_set_current_error_port (port)
  3433. Set the current default error port to @var{port}.
  3434. @end deffn
  3435. port-revealed
  3436. @c snarfed from ports.c:625
  3437. @deffn {Scheme Procedure} port-revealed port
  3438. @deffnx {C Function} scm_port_revealed (port)
  3439. Return the revealed count for @var{port}.
  3440. @end deffn
  3441. set-port-revealed!
  3442. @c snarfed from ports.c:638
  3443. @deffn {Scheme Procedure} set-port-revealed! port rcount
  3444. @deffnx {C Function} scm_set_port_revealed_x (port, rcount)
  3445. Sets the revealed count for a port to a given value.
  3446. The return value is unspecified.
  3447. @end deffn
  3448. port-mode
  3449. @c snarfed from ports.c:699
  3450. @deffn {Scheme Procedure} port-mode port
  3451. @deffnx {C Function} scm_port_mode (port)
  3452. Return the port modes associated with the open port @var{port}.
  3453. These will not necessarily be identical to the modes used when
  3454. the port was opened, since modes such as "append" which are
  3455. used only during port creation are not retained.
  3456. @end deffn
  3457. close-port
  3458. @c snarfed from ports.c:736
  3459. @deffn {Scheme Procedure} close-port port
  3460. @deffnx {C Function} scm_close_port (port)
  3461. Close the specified port object. Return @code{#t} if it
  3462. successfully closes a port or @code{#f} if it was already
  3463. closed. An exception may be raised if an error occurs, for
  3464. example when flushing buffered output. See also @ref{Ports and
  3465. File Descriptors, close}, for a procedure which can close file
  3466. descriptors.
  3467. @end deffn
  3468. close-input-port
  3469. @c snarfed from ports.c:766
  3470. @deffn {Scheme Procedure} close-input-port port
  3471. @deffnx {C Function} scm_close_input_port (port)
  3472. Close the specified input port object. The routine has no effect if
  3473. the file has already been closed. An exception may be raised if an
  3474. error occurs. The value returned is unspecified.
  3475. See also @ref{Ports and File Descriptors, close}, for a procedure
  3476. which can close file descriptors.
  3477. @end deffn
  3478. close-output-port
  3479. @c snarfed from ports.c:781
  3480. @deffn {Scheme Procedure} close-output-port port
  3481. @deffnx {C Function} scm_close_output_port (port)
  3482. Close the specified output port object. The routine has no effect if
  3483. the file has already been closed. An exception may be raised if an
  3484. error occurs. The value returned is unspecified.
  3485. See also @ref{Ports and File Descriptors, close}, for a procedure
  3486. which can close file descriptors.
  3487. @end deffn
  3488. port-for-each
  3489. @c snarfed from ports.c:827
  3490. @deffn {Scheme Procedure} port-for-each proc
  3491. @deffnx {C Function} scm_port_for_each (proc)
  3492. Apply @var{proc} to each port in the Guile port table
  3493. in turn. The return value is unspecified. More specifically,
  3494. @var{proc} is applied exactly once to every port that exists
  3495. in the system at the time @var{port-for-each} is invoked.
  3496. Changes to the port table while @var{port-for-each} is running
  3497. have no effect as far as @var{port-for-each} is concerned.
  3498. @end deffn
  3499. input-port?
  3500. @c snarfed from ports.c:845
  3501. @deffn {Scheme Procedure} input-port? x
  3502. @deffnx {C Function} scm_input_port_p (x)
  3503. Return @code{#t} if @var{x} is an input port, otherwise return
  3504. @code{#f}. Any object satisfying this predicate also satisfies
  3505. @code{port?}.
  3506. @end deffn
  3507. output-port?
  3508. @c snarfed from ports.c:856
  3509. @deffn {Scheme Procedure} output-port? x
  3510. @deffnx {C Function} scm_output_port_p (x)
  3511. Return @code{#t} if @var{x} is an output port, otherwise return
  3512. @code{#f}. Any object satisfying this predicate also satisfies
  3513. @code{port?}.
  3514. @end deffn
  3515. port?
  3516. @c snarfed from ports.c:868
  3517. @deffn {Scheme Procedure} port? x
  3518. @deffnx {C Function} scm_port_p (x)
  3519. Return a boolean indicating whether @var{x} is a port.
  3520. Equivalent to @code{(or (input-port? @var{x}) (output-port?
  3521. @var{x}))}.
  3522. @end deffn
  3523. port-closed?
  3524. @c snarfed from ports.c:878
  3525. @deffn {Scheme Procedure} port-closed? port
  3526. @deffnx {C Function} scm_port_closed_p (port)
  3527. Return @code{#t} if @var{port} is closed or @code{#f} if it is
  3528. open.
  3529. @end deffn
  3530. eof-object?
  3531. @c snarfed from ports.c:889
  3532. @deffn {Scheme Procedure} eof-object? x
  3533. @deffnx {C Function} scm_eof_object_p (x)
  3534. Return @code{#t} if @var{x} is an end-of-file object; otherwise
  3535. return @code{#f}.
  3536. @end deffn
  3537. force-output
  3538. @c snarfed from ports.c:903
  3539. @deffn {Scheme Procedure} force-output [port]
  3540. @deffnx {C Function} scm_force_output (port)
  3541. Flush the specified output port, or the current output port if @var{port}
  3542. is omitted. The current output buffer contents are passed to the
  3543. underlying port implementation (e.g., in the case of fports, the
  3544. data will be written to the file and the output buffer will be cleared.)
  3545. It has no effect on an unbuffered port.
  3546. The return value is unspecified.
  3547. @end deffn
  3548. flush-all-ports
  3549. @c snarfed from ports.c:921
  3550. @deffn {Scheme Procedure} flush-all-ports
  3551. @deffnx {C Function} scm_flush_all_ports ()
  3552. Equivalent to calling @code{force-output} on
  3553. all open output ports. The return value is unspecified.
  3554. @end deffn
  3555. read-char
  3556. @c snarfed from ports.c:941
  3557. @deffn {Scheme Procedure} read-char [port]
  3558. @deffnx {C Function} scm_read_char (port)
  3559. Return the next character available from @var{port}, updating
  3560. @var{port} to point to the following character. If no more
  3561. characters are available, the end-of-file object is returned.
  3562. @end deffn
  3563. peek-char
  3564. @c snarfed from ports.c:1283
  3565. @deffn {Scheme Procedure} peek-char [port]
  3566. @deffnx {C Function} scm_peek_char (port)
  3567. Return the next character available from @var{port},
  3568. @emph{without} updating @var{port} to point to the following
  3569. character. If no more characters are available, the
  3570. end-of-file object is returned.
  3571. The value returned by
  3572. a call to @code{peek-char} is the same as the value that would
  3573. have been returned by a call to @code{read-char} on the same
  3574. port. The only difference is that the very next call to
  3575. @code{read-char} or @code{peek-char} on that @var{port} will
  3576. return the value returned by the preceding call to
  3577. @code{peek-char}. In particular, a call to @code{peek-char} on
  3578. an interactive port will hang waiting for input whenever a call
  3579. to @code{read-char} would have hung.
  3580. @end deffn
  3581. unread-char
  3582. @c snarfed from ports.c:1306
  3583. @deffn {Scheme Procedure} unread-char cobj [port]
  3584. @deffnx {C Function} scm_unread_char (cobj, port)
  3585. Place @var{char} in @var{port} so that it will be read by the
  3586. next read operation. If called multiple times, the unread characters
  3587. will be read again in last-in first-out order. If @var{port} is
  3588. not supplied, the current input port is used.
  3589. @end deffn
  3590. unread-string
  3591. @c snarfed from ports.c:1329
  3592. @deffn {Scheme Procedure} unread-string str port
  3593. @deffnx {C Function} scm_unread_string (str, port)
  3594. Place the string @var{str} in @var{port} so that its characters will be
  3595. read in subsequent read operations. If called multiple times, the
  3596. unread characters will be read again in last-in first-out order. If
  3597. @var{port} is not supplied, the current-input-port is used.
  3598. @end deffn
  3599. seek
  3600. @c snarfed from ports.c:1368
  3601. @deffn {Scheme Procedure} seek fd_port offset whence
  3602. @deffnx {C Function} scm_seek (fd_port, offset, whence)
  3603. Sets the current position of @var{fd/port} to the integer
  3604. @var{offset}, which is interpreted according to the value of
  3605. @var{whence}.
  3606. One of the following variables should be supplied for
  3607. @var{whence}:
  3608. @defvar SEEK_SET
  3609. Seek from the beginning of the file.
  3610. @end defvar
  3611. @defvar SEEK_CUR
  3612. Seek from the current position.
  3613. @end defvar
  3614. @defvar SEEK_END
  3615. Seek from the end of the file.
  3616. @end defvar
  3617. If @var{fd/port} is a file descriptor, the underlying system
  3618. call is @code{lseek}. @var{port} may be a string port.
  3619. The value returned is the new position in the file. This means
  3620. that the current position of a port can be obtained using:
  3621. @lisp
  3622. (seek port 0 SEEK_CUR)
  3623. @end lisp
  3624. @end deffn
  3625. truncate-file
  3626. @c snarfed from ports.c:1426
  3627. @deffn {Scheme Procedure} truncate-file object [length]
  3628. @deffnx {C Function} scm_truncate_file (object, length)
  3629. Truncates the object referred to by @var{object} to at most
  3630. @var{length} bytes. @var{object} can be a string containing a
  3631. file name or an integer file descriptor or a port.
  3632. @var{length} may be omitted if @var{object} is not a file name,
  3633. in which case the truncation occurs at the current port
  3634. position. The return value is unspecified.
  3635. @end deffn
  3636. port-line
  3637. @c snarfed from ports.c:1486
  3638. @deffn {Scheme Procedure} port-line port
  3639. @deffnx {C Function} scm_port_line (port)
  3640. Return the current line number for @var{port}.
  3641. The first line of a file is 0. But you might want to add 1
  3642. when printing line numbers, since starting from 1 is
  3643. traditional in error messages, and likely to be more natural to
  3644. non-programmers.
  3645. @end deffn
  3646. set-port-line!
  3647. @c snarfed from ports.c:1498
  3648. @deffn {Scheme Procedure} set-port-line! port line
  3649. @deffnx {C Function} scm_set_port_line_x (port, line)
  3650. Set the current line number for @var{port} to @var{line}. The
  3651. first line of a file is 0.
  3652. @end deffn
  3653. port-column
  3654. @c snarfed from ports.c:1517
  3655. @deffn {Scheme Procedure} port-column port
  3656. @deffnx {C Function} scm_port_column (port)
  3657. Return the current column number of @var{port}.
  3658. If the number is
  3659. unknown, the result is #f. Otherwise, the result is a 0-origin integer
  3660. - i.e. the first character of the first line is line 0, column 0.
  3661. (However, when you display a file position, for example in an error
  3662. message, we recommend you add 1 to get 1-origin integers. This is
  3663. because lines and column numbers traditionally start with 1, and that is
  3664. what non-programmers will find most natural.)
  3665. @end deffn
  3666. set-port-column!
  3667. @c snarfed from ports.c:1529
  3668. @deffn {Scheme Procedure} set-port-column! port column
  3669. @deffnx {C Function} scm_set_port_column_x (port, column)
  3670. Set the current column of @var{port}. Before reading the first
  3671. character on a line the column should be 0.
  3672. @end deffn
  3673. port-filename
  3674. @c snarfed from ports.c:1543
  3675. @deffn {Scheme Procedure} port-filename port
  3676. @deffnx {C Function} scm_port_filename (port)
  3677. Return the filename associated with @var{port}. This function returns
  3678. the strings "standard input", "standard output" and "standard error"
  3679. when called on the current input, output and error ports respectively.
  3680. @end deffn
  3681. set-port-filename!
  3682. @c snarfed from ports.c:1557
  3683. @deffn {Scheme Procedure} set-port-filename! port filename
  3684. @deffnx {C Function} scm_set_port_filename_x (port, filename)
  3685. Change the filename associated with @var{port}, using the current input
  3686. port if none is specified. Note that this does not change the port's
  3687. source of data, but only the value that is returned by
  3688. @code{port-filename} and reported in diagnostic output.
  3689. @end deffn
  3690. %make-void-port
  3691. @c snarfed from ports.c:1651
  3692. @deffn {Scheme Procedure} %make-void-port mode
  3693. @deffnx {C Function} scm_sys_make_void_port (mode)
  3694. Create and return a new void port. A void port acts like
  3695. @file{/dev/null}. The @var{mode} argument
  3696. specifies the input/output modes for this port: see the
  3697. documentation for @code{open-file} in @ref{File Ports}.
  3698. @end deffn
  3699. print-options-interface
  3700. @c snarfed from print.c:87
  3701. @deffn {Scheme Procedure} print-options-interface [setting]
  3702. @deffnx {C Function} scm_print_options (setting)
  3703. Option interface for the print options. Instead of using
  3704. this procedure directly, use the procedures
  3705. @code{print-enable}, @code{print-disable}, @code{print-set!}
  3706. and @code{print-options}.
  3707. @end deffn
  3708. simple-format
  3709. @c snarfed from print.c:929
  3710. @deffn {Scheme Procedure} simple-format destination message . args
  3711. @deffnx {C Function} scm_simple_format (destination, message, args)
  3712. Write @var{message} to @var{destination}, defaulting to
  3713. the current output port.
  3714. @var{message} can contain @code{~A} (was @code{%s}) and
  3715. @code{~S} (was @code{%S}) escapes. When printed,
  3716. the escapes are replaced with corresponding members of
  3717. @var{ARGS}:
  3718. @code{~A} formats using @code{display} and @code{~S} formats
  3719. using @code{write}.
  3720. If @var{destination} is @code{#t}, then use the current output
  3721. port, if @var{destination} is @code{#f}, then return a string
  3722. containing the formatted text. Does not add a trailing newline.
  3723. @end deffn
  3724. newline
  3725. @c snarfed from print.c:1019
  3726. @deffn {Scheme Procedure} newline [port]
  3727. @deffnx {C Function} scm_newline (port)
  3728. Send a newline to @var{port}.
  3729. If @var{port} is omitted, send to the current output port.
  3730. @end deffn
  3731. write-char
  3732. @c snarfed from print.c:1034
  3733. @deffn {Scheme Procedure} write-char chr [port]
  3734. @deffnx {C Function} scm_write_char (chr, port)
  3735. Send character @var{chr} to @var{port}.
  3736. @end deffn
  3737. port-with-print-state
  3738. @c snarfed from print.c:1088
  3739. @deffn {Scheme Procedure} port-with-print-state port [pstate]
  3740. @deffnx {C Function} scm_port_with_print_state (port, pstate)
  3741. Create a new port which behaves like @var{port}, but with an
  3742. included print state @var{pstate}. @var{pstate} is optional.
  3743. If @var{pstate} isn't supplied and @var{port} already has
  3744. a print state, the old print state is reused.
  3745. @end deffn
  3746. get-print-state
  3747. @c snarfed from print.c:1101
  3748. @deffn {Scheme Procedure} get-print-state port
  3749. @deffnx {C Function} scm_get_print_state (port)
  3750. Return the print state of the port @var{port}. If @var{port}
  3751. has no associated print state, @code{#f} is returned.
  3752. @end deffn
  3753. procedure-properties
  3754. @c snarfed from procprop.c:160
  3755. @deffn {Scheme Procedure} procedure-properties proc
  3756. @deffnx {C Function} scm_procedure_properties (proc)
  3757. Return @var{obj}'s property list.
  3758. @end deffn
  3759. set-procedure-properties!
  3760. @c snarfed from procprop.c:173
  3761. @deffn {Scheme Procedure} set-procedure-properties! proc new_val
  3762. @deffnx {C Function} scm_set_procedure_properties_x (proc, new_val)
  3763. Set @var{obj}'s property list to @var{alist}.
  3764. @end deffn
  3765. procedure-property
  3766. @c snarfed from procprop.c:186
  3767. @deffn {Scheme Procedure} procedure-property p k
  3768. @deffnx {C Function} scm_procedure_property (p, k)
  3769. Return the property of @var{obj} with name @var{key}.
  3770. @end deffn
  3771. set-procedure-property!
  3772. @c snarfed from procprop.c:209
  3773. @deffn {Scheme Procedure} set-procedure-property! p k v
  3774. @deffnx {C Function} scm_set_procedure_property_x (p, k, v)
  3775. In @var{obj}'s property list, set the property named @var{key} to
  3776. @var{value}.
  3777. @end deffn
  3778. procedure?
  3779. @c snarfed from procs.c:162
  3780. @deffn {Scheme Procedure} procedure? obj
  3781. @deffnx {C Function} scm_procedure_p (obj)
  3782. Return @code{#t} if @var{obj} is a procedure.
  3783. @end deffn
  3784. closure?
  3785. @c snarfed from procs.c:189
  3786. @deffn {Scheme Procedure} closure? obj
  3787. @deffnx {C Function} scm_closure_p (obj)
  3788. Return @code{#t} if @var{obj} is a closure.
  3789. @end deffn
  3790. thunk?
  3791. @c snarfed from procs.c:198
  3792. @deffn {Scheme Procedure} thunk? obj
  3793. @deffnx {C Function} scm_thunk_p (obj)
  3794. Return @code{#t} if @var{obj} is a thunk.
  3795. @end deffn
  3796. procedure-documentation
  3797. @c snarfed from procs.c:248
  3798. @deffn {Scheme Procedure} procedure-documentation proc
  3799. @deffnx {C Function} scm_procedure_documentation (proc)
  3800. Return the documentation string associated with @code{proc}. By
  3801. convention, if a procedure contains more than one expression and the
  3802. first expression is a string constant, that string is assumed to contain
  3803. documentation for that procedure.
  3804. @end deffn
  3805. procedure-with-setter?
  3806. @c snarfed from procs.c:284
  3807. @deffn {Scheme Procedure} procedure-with-setter? obj
  3808. @deffnx {C Function} scm_procedure_with_setter_p (obj)
  3809. Return @code{#t} if @var{obj} is a procedure with an
  3810. associated setter procedure.
  3811. @end deffn
  3812. make-procedure-with-setter
  3813. @c snarfed from procs.c:294
  3814. @deffn {Scheme Procedure} make-procedure-with-setter procedure setter
  3815. @deffnx {C Function} scm_make_procedure_with_setter (procedure, setter)
  3816. Create a new procedure which behaves like @var{procedure}, but
  3817. with the associated setter @var{setter}.
  3818. @end deffn
  3819. procedure
  3820. @c snarfed from procs.c:308
  3821. @deffn {Scheme Procedure} procedure proc
  3822. @deffnx {C Function} scm_procedure (proc)
  3823. Return the procedure of @var{proc}, which must be either a
  3824. procedure with setter, or an operator struct.
  3825. @end deffn
  3826. primitive-make-property
  3827. @c snarfed from properties.c:40
  3828. @deffn {Scheme Procedure} primitive-make-property not_found_proc
  3829. @deffnx {C Function} scm_primitive_make_property (not_found_proc)
  3830. Create a @dfn{property token} that can be used with
  3831. @code{primitive-property-ref} and @code{primitive-property-set!}.
  3832. See @code{primitive-property-ref} for the significance of
  3833. @var{not_found_proc}.
  3834. @end deffn
  3835. primitive-property-ref
  3836. @c snarfed from properties.c:59
  3837. @deffn {Scheme Procedure} primitive-property-ref prop obj
  3838. @deffnx {C Function} scm_primitive_property_ref (prop, obj)
  3839. Return the property @var{prop} of @var{obj}.
  3840. When no value has yet been associated with @var{prop} and
  3841. @var{obj}, the @var{not-found-proc} from @var{prop} is used. A
  3842. call @code{(@var{not-found-proc} @var{prop} @var{obj})} is made
  3843. and the result set as the property value. If
  3844. @var{not-found-proc} is @code{#f} then @code{#f} is the
  3845. property value.
  3846. @end deffn
  3847. primitive-property-set!
  3848. @c snarfed from properties.c:90
  3849. @deffn {Scheme Procedure} primitive-property-set! prop obj val
  3850. @deffnx {C Function} scm_primitive_property_set_x (prop, obj, val)
  3851. Set the property @var{prop} of @var{obj} to @var{val}.
  3852. @end deffn
  3853. primitive-property-del!
  3854. @c snarfed from properties.c:111
  3855. @deffn {Scheme Procedure} primitive-property-del! prop obj
  3856. @deffnx {C Function} scm_primitive_property_del_x (prop, obj)
  3857. Remove any value associated with @var{prop} and @var{obj}.
  3858. @end deffn
  3859. random
  3860. @c snarfed from random.c:347
  3861. @deffn {Scheme Procedure} random n [state]
  3862. @deffnx {C Function} scm_random (n, state)
  3863. Return a number in [0, N).
  3864. Accepts a positive integer or real n and returns a
  3865. number of the same type between zero (inclusive) and
  3866. N (exclusive). The values returned have a uniform
  3867. distribution.
  3868. The optional argument @var{state} must be of the type produced
  3869. by @code{seed->random-state}. It defaults to the value of the
  3870. variable @var{*random-state*}. This object is used to maintain
  3871. the state of the pseudo-random-number generator and is altered
  3872. as a side effect of the random operation.
  3873. @end deffn
  3874. copy-random-state
  3875. @c snarfed from random.c:372
  3876. @deffn {Scheme Procedure} copy-random-state [state]
  3877. @deffnx {C Function} scm_copy_random_state (state)
  3878. Return a copy of the random state @var{state}.
  3879. @end deffn
  3880. seed->random-state
  3881. @c snarfed from random.c:384
  3882. @deffn {Scheme Procedure} seed->random-state seed
  3883. @deffnx {C Function} scm_seed_to_random_state (seed)
  3884. Return a new random state using @var{seed}.
  3885. @end deffn
  3886. random:uniform
  3887. @c snarfed from random.c:402
  3888. @deffn {Scheme Procedure} random:uniform [state]
  3889. @deffnx {C Function} scm_random_uniform (state)
  3890. Return a uniformly distributed inexact real random number in
  3891. [0,1).
  3892. @end deffn
  3893. random:normal
  3894. @c snarfed from random.c:417
  3895. @deffn {Scheme Procedure} random:normal [state]
  3896. @deffnx {C Function} scm_random_normal (state)
  3897. Return an inexact real in a normal distribution. The
  3898. distribution used has mean 0 and standard deviation 1. For a
  3899. normal distribution with mean m and standard deviation d use
  3900. @code{(+ m (* d (random:normal)))}.
  3901. @end deffn
  3902. random:solid-sphere!
  3903. @c snarfed from random.c:500
  3904. @deffn {Scheme Procedure} random:solid-sphere! v [state]
  3905. @deffnx {C Function} scm_random_solid_sphere_x (v, state)
  3906. Fills @var{vect} with inexact real random numbers the sum of
  3907. whose squares is less than 1.0. Thinking of @var{vect} as
  3908. coordinates in space of dimension @var{n} @math{=}
  3909. @code{(vector-length @var{vect})}, the coordinates are
  3910. uniformly distributed within the unit @var{n}-sphere.
  3911. @end deffn
  3912. random:hollow-sphere!
  3913. @c snarfed from random.c:522
  3914. @deffn {Scheme Procedure} random:hollow-sphere! v [state]
  3915. @deffnx {C Function} scm_random_hollow_sphere_x (v, state)
  3916. Fills vect with inexact real random numbers
  3917. the sum of whose squares is equal to 1.0.
  3918. Thinking of vect as coordinates in space of
  3919. dimension n = (vector-length vect), the coordinates
  3920. are uniformly distributed over the surface of the
  3921. unit n-sphere.
  3922. @end deffn
  3923. random:normal-vector!
  3924. @c snarfed from random.c:539
  3925. @deffn {Scheme Procedure} random:normal-vector! v [state]
  3926. @deffnx {C Function} scm_random_normal_vector_x (v, state)
  3927. Fills vect with inexact real random numbers that are
  3928. independent and standard normally distributed
  3929. (i.e., with mean 0 and variance 1).
  3930. @end deffn
  3931. random:exp
  3932. @c snarfed from random.c:577
  3933. @deffn {Scheme Procedure} random:exp [state]
  3934. @deffnx {C Function} scm_random_exp (state)
  3935. Return an inexact real in an exponential distribution with mean
  3936. 1. For an exponential distribution with mean u use (* u
  3937. (random:exp)).
  3938. @end deffn
  3939. %read-delimited!
  3940. @c snarfed from rdelim.c:55
  3941. @deffn {Scheme Procedure} %read-delimited! delims str gobble [port [start [end]]]
  3942. @deffnx {C Function} scm_read_delimited_x (delims, str, gobble, port, start, end)
  3943. Read characters from @var{port} into @var{str} until one of the
  3944. characters in the @var{delims} string is encountered. If
  3945. @var{gobble} is true, discard the delimiter character;
  3946. otherwise, leave it in the input stream for the next read. If
  3947. @var{port} is not specified, use the value of
  3948. @code{(current-input-port)}. If @var{start} or @var{end} are
  3949. specified, store data only into the substring of @var{str}
  3950. bounded by @var{start} and @var{end} (which default to the
  3951. beginning and end of the string, respectively).
  3952. Return a pair consisting of the delimiter that terminated the
  3953. string and the number of characters read. If reading stopped
  3954. at the end of file, the delimiter returned is the
  3955. @var{eof-object}; if the string was filled without encountering
  3956. a delimiter, this value is @code{#f}.
  3957. @end deffn
  3958. %read-line
  3959. @c snarfed from rdelim.c:202
  3960. @deffn {Scheme Procedure} %read-line [port]
  3961. @deffnx {C Function} scm_read_line (port)
  3962. Read a newline-terminated line from @var{port}, allocating storage as
  3963. necessary. The newline terminator (if any) is removed from the string,
  3964. and a pair consisting of the line and its delimiter is returned. The
  3965. delimiter may be either a newline or the @var{eof-object}; if
  3966. @code{%read-line} is called at the end of file, it returns the pair
  3967. @code{(#<eof> . #<eof>)}.
  3968. @end deffn
  3969. write-line
  3970. @c snarfed from rdelim.c:255
  3971. @deffn {Scheme Procedure} write-line obj [port]
  3972. @deffnx {C Function} scm_write_line (obj, port)
  3973. Display @var{obj} and a newline character to @var{port}. If
  3974. @var{port} is not specified, @code{(current-output-port)} is
  3975. used. This function is equivalent to:
  3976. @lisp
  3977. (display obj [port])
  3978. (newline [port])
  3979. @end lisp
  3980. @end deffn
  3981. read-options-interface
  3982. @c snarfed from read.c:110
  3983. @deffn {Scheme Procedure} read-options-interface [setting]
  3984. @deffnx {C Function} scm_read_options (setting)
  3985. Option interface for the read options. Instead of using
  3986. this procedure directly, use the procedures @code{read-enable},
  3987. @code{read-disable}, @code{read-set!} and @code{read-options}.
  3988. @end deffn
  3989. read
  3990. @c snarfed from read.c:130
  3991. @deffn {Scheme Procedure} read [port]
  3992. @deffnx {C Function} scm_read (port)
  3993. Read an s-expression from the input port @var{port}, or from
  3994. the current input port if @var{port} is not specified.
  3995. Any whitespace before the next token is discarded.
  3996. @end deffn
  3997. read-hash-extend
  3998. @c snarfed from read.c:898
  3999. @deffn {Scheme Procedure} read-hash-extend chr proc
  4000. @deffnx {C Function} scm_read_hash_extend (chr, proc)
  4001. Install the procedure @var{proc} for reading expressions
  4002. starting with the character sequence @code{#} and @var{chr}.
  4003. @var{proc} will be called with two arguments: the character
  4004. @var{chr} and the port to read further data from. The object
  4005. returned will be the return value of @code{read}.
  4006. @end deffn
  4007. call-with-dynamic-root
  4008. @c snarfed from root.c:160
  4009. @deffn {Scheme Procedure} call-with-dynamic-root thunk handler
  4010. @deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
  4011. Call @var{thunk} with a new dynamic state and withina continuation barrier. The @var{handler} catches allotherwise uncaught throws and executes within the samedynamic context as @var{thunk}.
  4012. @end deffn
  4013. dynamic-root
  4014. @c snarfed from root.c:171
  4015. @deffn {Scheme Procedure} dynamic-root
  4016. @deffnx {C Function} scm_dynamic_root ()
  4017. Return an object representing the current dynamic root.
  4018. These objects are only useful for comparison using @code{eq?}.
  4019. @end deffn
  4020. read-string!/partial
  4021. @c snarfed from rw.c:101
  4022. @deffn {Scheme Procedure} read-string!/partial str [port_or_fdes [start [end]]]
  4023. @deffnx {C Function} scm_read_string_x_partial (str, port_or_fdes, start, end)
  4024. Read characters from a port or file descriptor into a
  4025. string @var{str}. A port must have an underlying file
  4026. descriptor --- a so-called fport. This procedure is
  4027. scsh-compatible and can efficiently read large strings.
  4028. It will:
  4029. @itemize
  4030. @item
  4031. attempt to fill the entire string, unless the @var{start}
  4032. and/or @var{end} arguments are supplied. i.e., @var{start}
  4033. defaults to 0 and @var{end} defaults to
  4034. @code{(string-length str)}
  4035. @item
  4036. use the current input port if @var{port_or_fdes} is not
  4037. supplied.
  4038. @item
  4039. return fewer than the requested number of characters in some
  4040. cases, e.g., on end of file, if interrupted by a signal, or if
  4041. not all the characters are immediately available.
  4042. @item
  4043. wait indefinitely for some input if no characters are
  4044. currently available,
  4045. unless the port is in non-blocking mode.
  4046. @item
  4047. read characters from the port's input buffers if available,
  4048. instead from the underlying file descriptor.
  4049. @item
  4050. return @code{#f} if end-of-file is encountered before reading
  4051. any characters, otherwise return the number of characters
  4052. read.
  4053. @item
  4054. return 0 if the port is in non-blocking mode and no characters
  4055. are immediately available.
  4056. @item
  4057. return 0 if the request is for 0 bytes, with no
  4058. end-of-file check.
  4059. @end itemize
  4060. @end deffn
  4061. write-string/partial
  4062. @c snarfed from rw.c:205
  4063. @deffn {Scheme Procedure} write-string/partial str [port_or_fdes [start [end]]]
  4064. @deffnx {C Function} scm_write_string_partial (str, port_or_fdes, start, end)
  4065. Write characters from a string @var{str} to a port or file
  4066. descriptor. A port must have an underlying file descriptor
  4067. --- a so-called fport. This procedure is
  4068. scsh-compatible and can efficiently write large strings.
  4069. It will:
  4070. @itemize
  4071. @item
  4072. attempt to write the entire string, unless the @var{start}
  4073. and/or @var{end} arguments are supplied. i.e., @var{start}
  4074. defaults to 0 and @var{end} defaults to
  4075. @code{(string-length str)}
  4076. @item
  4077. use the current output port if @var{port_of_fdes} is not
  4078. supplied.
  4079. @item
  4080. in the case of a buffered port, store the characters in the
  4081. port's output buffer, if all will fit. If they will not fit
  4082. then any existing buffered characters will be flushed
  4083. before attempting
  4084. to write the new characters directly to the underlying file
  4085. descriptor. If the port is in non-blocking mode and
  4086. buffered characters can not be flushed immediately, then an
  4087. @code{EAGAIN} system-error exception will be raised (Note:
  4088. scsh does not support the use of non-blocking buffered ports.)
  4089. @item
  4090. write fewer than the requested number of
  4091. characters in some cases, e.g., if interrupted by a signal or
  4092. if not all of the output can be accepted immediately.
  4093. @item
  4094. wait indefinitely for at least one character
  4095. from @var{str} to be accepted by the port, unless the port is
  4096. in non-blocking mode.
  4097. @item
  4098. return the number of characters accepted by the port.
  4099. @item
  4100. return 0 if the port is in non-blocking mode and can not accept
  4101. at least one character from @var{str} immediately
  4102. @item
  4103. return 0 immediately if the request size is 0 bytes.
  4104. @end itemize
  4105. @end deffn
  4106. sigaction
  4107. @c snarfed from scmsigs.c:253
  4108. @deffn {Scheme Procedure} sigaction signum [handler [flags [thread]]]
  4109. @deffnx {C Function} scm_sigaction_for_thread (signum, handler, flags, thread)
  4110. Install or report the signal handler for a specified signal.
  4111. @var{signum} is the signal number, which can be specified using the value
  4112. of variables such as @code{SIGINT}.
  4113. If @var{handler} is omitted, @code{sigaction} returns a pair: the
  4114. CAR is the current
  4115. signal hander, which will be either an integer with the value @code{SIG_DFL}
  4116. (default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which
  4117. handles the signal, or @code{#f} if a non-Scheme procedure handles the
  4118. signal. The CDR contains the current @code{sigaction} flags for the handler.
  4119. If @var{handler} is provided, it is installed as the new handler for
  4120. @var{signum}. @var{handler} can be a Scheme procedure taking one
  4121. argument, or the value of @code{SIG_DFL} (default action) or
  4122. @code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler
  4123. was installed before @code{sigaction} was first used. When
  4124. a scheme procedure has been specified, that procedure will run
  4125. in the given @var{thread}. When no thread has been given, the
  4126. thread that made this call to @code{sigaction} is used.
  4127. Flags can optionally be specified for the new handler (@code{SA_RESTART} will
  4128. always be added if it's available and the system is using restartable
  4129. system calls.) The return value is a pair with information about the
  4130. old handler as described above.
  4131. This interface does not provide access to the "signal blocking"
  4132. facility. Maybe this is not needed, since the thread support may
  4133. provide solutions to the problem of consistent access to data
  4134. structures.
  4135. @end deffn
  4136. restore-signals
  4137. @c snarfed from scmsigs.c:427
  4138. @deffn {Scheme Procedure} restore-signals
  4139. @deffnx {C Function} scm_restore_signals ()
  4140. Return all signal handlers to the values they had before any call to
  4141. @code{sigaction} was made. The return value is unspecified.
  4142. @end deffn
  4143. alarm
  4144. @c snarfed from scmsigs.c:464
  4145. @deffn {Scheme Procedure} alarm i
  4146. @deffnx {C Function} scm_alarm (i)
  4147. Set a timer to raise a @code{SIGALRM} signal after the specified
  4148. number of seconds (an integer). It's advisable to install a signal
  4149. handler for
  4150. @code{SIGALRM} beforehand, since the default action is to terminate
  4151. the process.
  4152. The return value indicates the time remaining for the previous alarm,
  4153. if any. The new value replaces the previous alarm. If there was
  4154. no previous alarm, the return value is zero.
  4155. @end deffn
  4156. setitimer
  4157. @c snarfed from scmsigs.c:491
  4158. @deffn {Scheme Procedure} setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds
  4159. @deffnx {C Function} scm_setitimer (which_timer, interval_seconds, interval_microseconds, value_seconds, value_microseconds)
  4160. Set the timer specified by @var{which_timer} according to the given
  4161. @var{interval_seconds}, @var{interval_microseconds},
  4162. @var{value_seconds}, and @var{value_microseconds} values.
  4163. Return information about the timer's previous setting.
  4164. Errors are handled as described in the guile info pages under ``POSIX
  4165. Interface Conventions''.
  4166. The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
  4167. and @code{ITIMER_PROF}.
  4168. The return value will be a list of two cons pairs representing the
  4169. current state of the given timer. The first pair is the seconds and
  4170. microseconds of the timer @code{it_interval}, and the second pair is
  4171. the seconds and microseconds of the timer @code{it_value}.
  4172. @end deffn
  4173. getitimer
  4174. @c snarfed from scmsigs.c:532
  4175. @deffn {Scheme Procedure} getitimer which_timer
  4176. @deffnx {C Function} scm_getitimer (which_timer)
  4177. Return information about the timer specified by @var{which_timer}
  4178. Errors are handled as described in the guile info pages under ``POSIX
  4179. Interface Conventions''.
  4180. The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
  4181. and @code{ITIMER_PROF}.
  4182. The return value will be a list of two cons pairs representing the
  4183. current state of the given timer. The first pair is the seconds and
  4184. microseconds of the timer @code{it_interval}, and the second pair is
  4185. the seconds and microseconds of the timer @code{it_value}.
  4186. @end deffn
  4187. pause
  4188. @c snarfed from scmsigs.c:559
  4189. @deffn {Scheme Procedure} pause
  4190. @deffnx {C Function} scm_pause ()
  4191. Pause the current process (thread?) until a signal arrives whose
  4192. action is to either terminate the current process or invoke a
  4193. handler procedure. The return value is unspecified.
  4194. @end deffn
  4195. sleep
  4196. @c snarfed from scmsigs.c:572
  4197. @deffn {Scheme Procedure} sleep i
  4198. @deffnx {C Function} scm_sleep (i)
  4199. Wait for the given number of seconds (an integer) or until a signal
  4200. arrives. The return value is zero if the time elapses or the number
  4201. of seconds remaining otherwise.
  4202. @end deffn
  4203. usleep
  4204. @c snarfed from scmsigs.c:581
  4205. @deffn {Scheme Procedure} usleep i
  4206. @deffnx {C Function} scm_usleep (i)
  4207. Sleep for @var{i} microseconds.
  4208. @end deffn
  4209. raise
  4210. @c snarfed from scmsigs.c:591
  4211. @deffn {Scheme Procedure} raise sig
  4212. @deffnx {C Function} scm_raise (sig)
  4213. Sends a specified signal @var{sig} to the current process, where
  4214. @var{sig} is as described for the kill procedure.
  4215. @end deffn
  4216. system
  4217. @c snarfed from simpos.c:64
  4218. @deffn {Scheme Procedure} system [cmd]
  4219. @deffnx {C Function} scm_system (cmd)
  4220. Execute @var{cmd} using the operating system's "command
  4221. processor". Under Unix this is usually the default shell
  4222. @code{sh}. The value returned is @var{cmd}'s exit status as
  4223. returned by @code{waitpid}, which can be interpreted using
  4224. @code{status:exit-val} and friends.
  4225. If @code{system} is called without arguments, return a boolean
  4226. indicating whether the command processor is available.
  4227. @end deffn
  4228. system*
  4229. @c snarfed from simpos.c:114
  4230. @deffn {Scheme Procedure} system* . args
  4231. @deffnx {C Function} scm_system_star (args)
  4232. Execute the command indicated by @var{args}. The first element must
  4233. be a string indicating the command to be executed, and the remaining
  4234. items must be strings representing each of the arguments to that
  4235. command.
  4236. This function returns the exit status of the command as provided by
  4237. @code{waitpid}. This value can be handled with @code{status:exit-val}
  4238. and the related functions.
  4239. @code{system*} is similar to @code{system}, but accepts only one
  4240. string per-argument, and performs no shell interpretation. The
  4241. command is executed using fork and execlp. Accordingly this function
  4242. may be safer than @code{system} in situations where shell
  4243. interpretation is not required.
  4244. Example: (system* "echo" "foo" "bar")
  4245. @end deffn
  4246. getenv
  4247. @c snarfed from simpos.c:184
  4248. @deffn {Scheme Procedure} getenv nam
  4249. @deffnx {C Function} scm_getenv (nam)
  4250. Looks up the string @var{name} in the current environment. The return
  4251. value is @code{#f} unless a string of the form @code{NAME=VALUE} is
  4252. found, in which case the string @code{VALUE} is returned.
  4253. @end deffn
  4254. primitive-exit
  4255. @c snarfed from simpos.c:200
  4256. @deffn {Scheme Procedure} primitive-exit [status]
  4257. @deffnx {C Function} scm_primitive_exit (status)
  4258. Terminate the current process without unwinding the Scheme stack.
  4259. This is would typically be useful after a fork. The exit status
  4260. is @var{status} if supplied, otherwise zero.
  4261. @end deffn
  4262. restricted-vector-sort!
  4263. @c snarfed from sort.c:78
  4264. @deffn {Scheme Procedure} restricted-vector-sort! vec less startpos endpos
  4265. @deffnx {C Function} scm_restricted_vector_sort_x (vec, less, startpos, endpos)
  4266. Sort the vector @var{vec}, using @var{less} for comparing
  4267. the vector elements. @var{startpos} (inclusively) and
  4268. @var{endpos} (exclusively) delimit
  4269. the range of the vector which gets sorted. The return value
  4270. is not specified.
  4271. @end deffn
  4272. sorted?
  4273. @c snarfed from sort.c:111
  4274. @deffn {Scheme Procedure} sorted? items less
  4275. @deffnx {C Function} scm_sorted_p (items, less)
  4276. Return @code{#t} iff @var{items} is a list or a vector such that
  4277. for all 1 <= i <= m, the predicate @var{less} returns true when
  4278. applied to all elements i - 1 and i
  4279. @end deffn
  4280. merge
  4281. @c snarfed from sort.c:186
  4282. @deffn {Scheme Procedure} merge alist blist less
  4283. @deffnx {C Function} scm_merge (alist, blist, less)
  4284. Merge two already sorted lists into one.
  4285. Given two lists @var{alist} and @var{blist}, such that
  4286. @code{(sorted? alist less?)} and @code{(sorted? blist less?)},
  4287. return a new list in which the elements of @var{alist} and
  4288. @var{blist} have been stably interleaved so that
  4289. @code{(sorted? (merge alist blist less?) less?)}.
  4290. Note: this does _not_ accept vectors.
  4291. @end deffn
  4292. merge!
  4293. @c snarfed from sort.c:303
  4294. @deffn {Scheme Procedure} merge! alist blist less
  4295. @deffnx {C Function} scm_merge_x (alist, blist, less)
  4296. Takes two lists @var{alist} and @var{blist} such that
  4297. @code{(sorted? alist less?)} and @code{(sorted? blist less?)} and
  4298. returns a new list in which the elements of @var{alist} and
  4299. @var{blist} have been stably interleaved so that
  4300. @code{(sorted? (merge alist blist less?) less?)}.
  4301. This is the destructive variant of @code{merge}
  4302. Note: this does _not_ accept vectors.
  4303. @end deffn
  4304. sort!
  4305. @c snarfed from sort.c:373
  4306. @deffn {Scheme Procedure} sort! items less
  4307. @deffnx {C Function} scm_sort_x (items, less)
  4308. Sort the sequence @var{items}, which may be a list or a
  4309. vector. @var{less} is used for comparing the sequence
  4310. elements. The sorting is destructive, that means that the
  4311. input sequence is modified to produce the sorted result.
  4312. This is not a stable sort.
  4313. @end deffn
  4314. sort
  4315. @c snarfed from sort.c:404
  4316. @deffn {Scheme Procedure} sort items less
  4317. @deffnx {C Function} scm_sort (items, less)
  4318. Sort the sequence @var{items}, which may be a list or a
  4319. vector. @var{less} is used for comparing the sequence
  4320. elements. This is not a stable sort.
  4321. @end deffn
  4322. stable-sort!
  4323. @c snarfed from sort.c:487
  4324. @deffn {Scheme Procedure} stable-sort! items less
  4325. @deffnx {C Function} scm_stable_sort_x (items, less)
  4326. Sort the sequence @var{items}, which may be a list or a
  4327. vector. @var{less} is used for comparing the sequence elements.
  4328. The sorting is destructive, that means that the input sequence
  4329. is modified to produce the sorted result.
  4330. This is a stable sort.
  4331. @end deffn
  4332. stable-sort
  4333. @c snarfed from sort.c:531
  4334. @deffn {Scheme Procedure} stable-sort items less
  4335. @deffnx {C Function} scm_stable_sort (items, less)
  4336. Sort the sequence @var{items}, which may be a list or a
  4337. vector. @var{less} is used for comparing the sequence elements.
  4338. This is a stable sort.
  4339. @end deffn
  4340. sort-list!
  4341. @c snarfed from sort.c:549
  4342. @deffn {Scheme Procedure} sort-list! items less
  4343. @deffnx {C Function} scm_sort_list_x (items, less)
  4344. Sort the list @var{items}, using @var{less} for comparing the
  4345. list elements. The sorting is destructive, that means that the
  4346. input list is modified to produce the sorted result.
  4347. This is a stable sort.
  4348. @end deffn
  4349. sort-list
  4350. @c snarfed from sort.c:564
  4351. @deffn {Scheme Procedure} sort-list items less
  4352. @deffnx {C Function} scm_sort_list (items, less)
  4353. Sort the list @var{items}, using @var{less} for comparing the
  4354. list elements. This is a stable sort.
  4355. @end deffn
  4356. source-properties
  4357. @c snarfed from srcprop.c:153
  4358. @deffn {Scheme Procedure} source-properties obj
  4359. @deffnx {C Function} scm_source_properties (obj)
  4360. Return the source property association list of @var{obj}.
  4361. @end deffn
  4362. set-source-properties!
  4363. @c snarfed from srcprop.c:176
  4364. @deffn {Scheme Procedure} set-source-properties! obj plist
  4365. @deffnx {C Function} scm_set_source_properties_x (obj, plist)
  4366. Install the association list @var{plist} as the source property
  4367. list for @var{obj}.
  4368. @end deffn
  4369. source-property
  4370. @c snarfed from srcprop.c:194
  4371. @deffn {Scheme Procedure} source-property obj key
  4372. @deffnx {C Function} scm_source_property (obj, key)
  4373. Return the source property specified by @var{key} from
  4374. @var{obj}'s source property list.
  4375. @end deffn
  4376. set-source-property!
  4377. @c snarfed from srcprop.c:225
  4378. @deffn {Scheme Procedure} set-source-property! obj key datum
  4379. @deffnx {C Function} scm_set_source_property_x (obj, key, datum)
  4380. Set the source property of object @var{obj}, which is specified by
  4381. @var{key} to @var{datum}. Normally, the key will be a symbol.
  4382. @end deffn
  4383. stack?
  4384. @c snarfed from stacks.c:391
  4385. @deffn {Scheme Procedure} stack? obj
  4386. @deffnx {C Function} scm_stack_p (obj)
  4387. Return @code{#t} if @var{obj} is a calling stack.
  4388. @end deffn
  4389. make-stack
  4390. @c snarfed from stacks.c:422
  4391. @deffn {Scheme Procedure} make-stack obj . args
  4392. @deffnx {C Function} scm_make_stack (obj, args)
  4393. Create a new stack. If @var{obj} is @code{#t}, the current
  4394. evaluation stack is used for creating the stack frames,
  4395. otherwise the frames are taken from @var{obj} (which must be
  4396. either a debug object or a continuation).
  4397. @var{args} should be a list containing any combination of
  4398. integer, procedure and @code{#t} values.
  4399. These values specify various ways of cutting away uninteresting
  4400. stack frames from the top and bottom of the stack that
  4401. @code{make-stack} returns. They come in pairs like this:
  4402. @code{(@var{inner_cut_1} @var{outer_cut_1} @var{inner_cut_2}
  4403. @var{outer_cut_2} @dots{})}.
  4404. Each @var{inner_cut_N} can be @code{#t}, an integer, or a
  4405. procedure. @code{#t} means to cut away all frames up to but
  4406. excluding the first user module frame. An integer means to cut
  4407. away exactly that number of frames. A procedure means to cut
  4408. away all frames up to but excluding the application frame whose
  4409. procedure matches the specified one.
  4410. Each @var{outer_cut_N} can be an integer or a procedure. An
  4411. integer means to cut away that number of frames. A procedure
  4412. means to cut away frames down to but excluding the application
  4413. frame whose procedure matches the specified one.
  4414. If the @var{outer_cut_N} of the last pair is missing, it is
  4415. taken as 0.
  4416. @end deffn
  4417. stack-id
  4418. @c snarfed from stacks.c:511
  4419. @deffn {Scheme Procedure} stack-id stack
  4420. @deffnx {C Function} scm_stack_id (stack)
  4421. Return the identifier given to @var{stack} by @code{start-stack}.
  4422. @end deffn
  4423. stack-ref
  4424. @c snarfed from stacks.c:549
  4425. @deffn {Scheme Procedure} stack-ref stack index
  4426. @deffnx {C Function} scm_stack_ref (stack, index)
  4427. Return the @var{index}'th frame from @var{stack}.
  4428. @end deffn
  4429. stack-length
  4430. @c snarfed from stacks.c:562
  4431. @deffn {Scheme Procedure} stack-length stack
  4432. @deffnx {C Function} scm_stack_length (stack)
  4433. Return the length of @var{stack}.
  4434. @end deffn
  4435. frame?
  4436. @c snarfed from stacks.c:575
  4437. @deffn {Scheme Procedure} frame? obj
  4438. @deffnx {C Function} scm_frame_p (obj)
  4439. Return @code{#t} if @var{obj} is a stack frame.
  4440. @end deffn
  4441. last-stack-frame
  4442. @c snarfed from stacks.c:586
  4443. @deffn {Scheme Procedure} last-stack-frame obj
  4444. @deffnx {C Function} scm_last_stack_frame (obj)
  4445. Return a stack which consists of a single frame, which is the
  4446. last stack frame for @var{obj}. @var{obj} must be either a
  4447. debug object or a continuation.
  4448. @end deffn
  4449. frame-number
  4450. @c snarfed from stacks.c:625
  4451. @deffn {Scheme Procedure} frame-number frame
  4452. @deffnx {C Function} scm_frame_number (frame)
  4453. Return the frame number of @var{frame}.
  4454. @end deffn
  4455. frame-source
  4456. @c snarfed from stacks.c:635
  4457. @deffn {Scheme Procedure} frame-source frame
  4458. @deffnx {C Function} scm_frame_source (frame)
  4459. Return the source of @var{frame}.
  4460. @end deffn
  4461. frame-procedure
  4462. @c snarfed from stacks.c:646
  4463. @deffn {Scheme Procedure} frame-procedure frame
  4464. @deffnx {C Function} scm_frame_procedure (frame)
  4465. Return the procedure for @var{frame}, or @code{#f} if no
  4466. procedure is associated with @var{frame}.
  4467. @end deffn
  4468. frame-arguments
  4469. @c snarfed from stacks.c:658
  4470. @deffn {Scheme Procedure} frame-arguments frame
  4471. @deffnx {C Function} scm_frame_arguments (frame)
  4472. Return the arguments of @var{frame}.
  4473. @end deffn
  4474. frame-previous
  4475. @c snarfed from stacks.c:669
  4476. @deffn {Scheme Procedure} frame-previous frame
  4477. @deffnx {C Function} scm_frame_previous (frame)
  4478. Return the previous frame of @var{frame}, or @code{#f} if
  4479. @var{frame} is the first frame in its stack.
  4480. @end deffn
  4481. frame-next
  4482. @c snarfed from stacks.c:685
  4483. @deffn {Scheme Procedure} frame-next frame
  4484. @deffnx {C Function} scm_frame_next (frame)
  4485. Return the next frame of @var{frame}, or @code{#f} if
  4486. @var{frame} is the last frame in its stack.
  4487. @end deffn
  4488. frame-real?
  4489. @c snarfed from stacks.c:700
  4490. @deffn {Scheme Procedure} frame-real? frame
  4491. @deffnx {C Function} scm_frame_real_p (frame)
  4492. Return @code{#t} if @var{frame} is a real frame.
  4493. @end deffn
  4494. frame-procedure?
  4495. @c snarfed from stacks.c:710
  4496. @deffn {Scheme Procedure} frame-procedure? frame
  4497. @deffnx {C Function} scm_frame_procedure_p (frame)
  4498. Return @code{#t} if a procedure is associated with @var{frame}.
  4499. @end deffn
  4500. frame-evaluating-args?
  4501. @c snarfed from stacks.c:720
  4502. @deffn {Scheme Procedure} frame-evaluating-args? frame
  4503. @deffnx {C Function} scm_frame_evaluating_args_p (frame)
  4504. Return @code{#t} if @var{frame} contains evaluated arguments.
  4505. @end deffn
  4506. frame-overflow?
  4507. @c snarfed from stacks.c:730
  4508. @deffn {Scheme Procedure} frame-overflow? frame
  4509. @deffnx {C Function} scm_frame_overflow_p (frame)
  4510. Return @code{#t} if @var{frame} is an overflow frame.
  4511. @end deffn
  4512. get-internal-real-time
  4513. @c snarfed from stime.c:133
  4514. @deffn {Scheme Procedure} get-internal-real-time
  4515. @deffnx {C Function} scm_get_internal_real_time ()
  4516. Return the number of time units since the interpreter was
  4517. started.
  4518. @end deffn
  4519. times
  4520. @c snarfed from stime.c:180
  4521. @deffn {Scheme Procedure} times
  4522. @deffnx {C Function} scm_times ()
  4523. Return an object with information about real and processor
  4524. time. The following procedures accept such an object as an
  4525. argument and return a selected component:
  4526. @table @code
  4527. @item tms:clock
  4528. The current real time, expressed as time units relative to an
  4529. arbitrary base.
  4530. @item tms:utime
  4531. The CPU time units used by the calling process.
  4532. @item tms:stime
  4533. The CPU time units used by the system on behalf of the calling
  4534. process.
  4535. @item tms:cutime
  4536. The CPU time units used by terminated child processes of the
  4537. calling process, whose status has been collected (e.g., using
  4538. @code{waitpid}).
  4539. @item tms:cstime
  4540. Similarly, the CPU times units used by the system on behalf of
  4541. terminated child processes.
  4542. @end table
  4543. @end deffn
  4544. get-internal-run-time
  4545. @c snarfed from stime.c:212
  4546. @deffn {Scheme Procedure} get-internal-run-time
  4547. @deffnx {C Function} scm_get_internal_run_time ()
  4548. Return the number of time units of processor time used by the
  4549. interpreter. Both @emph{system} and @emph{user} time are
  4550. included but subprocesses are not.
  4551. @end deffn
  4552. current-time
  4553. @c snarfed from stime.c:229
  4554. @deffn {Scheme Procedure} current-time
  4555. @deffnx {C Function} scm_current_time ()
  4556. Return the number of seconds since 1970-01-01 00:00:00 UTC,
  4557. excluding leap seconds.
  4558. @end deffn
  4559. gettimeofday
  4560. @c snarfed from stime.c:248
  4561. @deffn {Scheme Procedure} gettimeofday
  4562. @deffnx {C Function} scm_gettimeofday ()
  4563. Return a pair containing the number of seconds and microseconds
  4564. since 1970-01-01 00:00:00 UTC, excluding leap seconds. Note:
  4565. whether true microsecond resolution is available depends on the
  4566. operating system.
  4567. @end deffn
  4568. localtime
  4569. @c snarfed from stime.c:364
  4570. @deffn {Scheme Procedure} localtime time [zone]
  4571. @deffnx {C Function} scm_localtime (time, zone)
  4572. Return an object representing the broken down components of
  4573. @var{time}, an integer like the one returned by
  4574. @code{current-time}. The time zone for the calculation is
  4575. optionally specified by @var{zone} (a string), otherwise the
  4576. @code{TZ} environment variable or the system default is used.
  4577. @end deffn
  4578. gmtime
  4579. @c snarfed from stime.c:449
  4580. @deffn {Scheme Procedure} gmtime time
  4581. @deffnx {C Function} scm_gmtime (time)
  4582. Return an object representing the broken down components of
  4583. @var{time}, an integer like the one returned by
  4584. @code{current-time}. The values are calculated for UTC.
  4585. @end deffn
  4586. mktime
  4587. @c snarfed from stime.c:517
  4588. @deffn {Scheme Procedure} mktime sbd_time [zone]
  4589. @deffnx {C Function} scm_mktime (sbd_time, zone)
  4590. @var{bd-time} is an object representing broken down time and @code{zone}
  4591. is an optional time zone specifier (otherwise the TZ environment variable
  4592. or the system default is used).
  4593. Returns a pair: the car is a corresponding
  4594. integer time value like that returned
  4595. by @code{current-time}; the cdr is a broken down time object, similar to
  4596. as @var{bd-time} but with normalized values.
  4597. @end deffn
  4598. tzset
  4599. @c snarfed from stime.c:603
  4600. @deffn {Scheme Procedure} tzset
  4601. @deffnx {C Function} scm_tzset ()
  4602. Initialize the timezone from the TZ environment variable
  4603. or the system default. It's not usually necessary to call this procedure
  4604. since it's done automatically by other procedures that depend on the
  4605. timezone.
  4606. @end deffn
  4607. strftime
  4608. @c snarfed from stime.c:620
  4609. @deffn {Scheme Procedure} strftime format stime
  4610. @deffnx {C Function} scm_strftime (format, stime)
  4611. Formats a time specification @var{time} using @var{template}. @var{time}
  4612. is an object with time components in the form returned by @code{localtime}
  4613. or @code{gmtime}. @var{template} is a string which can include formatting
  4614. specifications introduced by a @code{%} character. The formatting of
  4615. month and day names is dependent on the current locale. The value returned
  4616. is the formatted string.
  4617. @xref{Formatting Date and Time, , , libc, The GNU C Library Reference Manual}.)
  4618. @end deffn
  4619. strptime
  4620. @c snarfed from stime.c:721
  4621. @deffn {Scheme Procedure} strptime format string
  4622. @deffnx {C Function} scm_strptime (format, string)
  4623. Performs the reverse action to @code{strftime}, parsing
  4624. @var{string} according to the specification supplied in
  4625. @var{template}. The interpretation of month and day names is
  4626. dependent on the current locale. The value returned is a pair.
  4627. The car has an object with time components
  4628. in the form returned by @code{localtime} or @code{gmtime},
  4629. but the time zone components
  4630. are not usefully set.
  4631. The cdr reports the number of characters from @var{string}
  4632. which were used for the conversion.
  4633. @end deffn
  4634. string?
  4635. @c snarfed from strings.c:526
  4636. @deffn {Scheme Procedure} string? obj
  4637. @deffnx {C Function} scm_string_p (obj)
  4638. Return @code{#t} if @var{obj} is a string, else @code{#f}.
  4639. @end deffn
  4640. list->string
  4641. @c snarfed from strings.c:534
  4642. @deffn {Scheme Procedure} list->string
  4643. implemented by the C function "scm_string"
  4644. @end deffn
  4645. string
  4646. @c snarfed from strings.c:540
  4647. @deffn {Scheme Procedure} string . chrs
  4648. @deffnx {Scheme Procedure} list->string chrs
  4649. @deffnx {C Function} scm_string (chrs)
  4650. Return a newly allocated string composed of the arguments,
  4651. @var{chrs}.
  4652. @end deffn
  4653. make-string
  4654. @c snarfed from strings.c:578
  4655. @deffn {Scheme Procedure} make-string k [chr]
  4656. @deffnx {C Function} scm_make_string (k, chr)
  4657. Return a newly allocated string of
  4658. length @var{k}. If @var{chr} is given, then all elements of
  4659. the string are initialized to @var{chr}, otherwise the contents
  4660. of the @var{string} are unspecified.
  4661. @end deffn
  4662. string-length
  4663. @c snarfed from strings.c:604
  4664. @deffn {Scheme Procedure} string-length string
  4665. @deffnx {C Function} scm_string_length (string)
  4666. Return the number of characters in @var{string}.
  4667. @end deffn
  4668. string-ref
  4669. @c snarfed from strings.c:623
  4670. @deffn {Scheme Procedure} string-ref str k
  4671. @deffnx {C Function} scm_string_ref (str, k)
  4672. Return character @var{k} of @var{str} using zero-origin
  4673. indexing. @var{k} must be a valid index of @var{str}.
  4674. @end deffn
  4675. string-set!
  4676. @c snarfed from strings.c:646
  4677. @deffn {Scheme Procedure} string-set! str k chr
  4678. @deffnx {C Function} scm_string_set_x (str, k, chr)
  4679. Store @var{chr} in element @var{k} of @var{str} and return
  4680. an unspecified value. @var{k} must be a valid index of
  4681. @var{str}.
  4682. @end deffn
  4683. substring
  4684. @c snarfed from strings.c:682
  4685. @deffn {Scheme Procedure} substring str start [end]
  4686. @deffnx {C Function} scm_substring (str, start, end)
  4687. Return a newly allocated string formed from the characters
  4688. of @var{str} beginning with index @var{start} (inclusive) and
  4689. ending with index @var{end} (exclusive).
  4690. @var{str} must be a string, @var{start} and @var{end} must be
  4691. exact integers satisfying:
  4692. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4693. @end deffn
  4694. substring/read-only
  4695. @c snarfed from strings.c:708
  4696. @deffn {Scheme Procedure} substring/read-only str start [end]
  4697. @deffnx {C Function} scm_substring_read_only (str, start, end)
  4698. Return a newly allocated string formed from the characters
  4699. of @var{str} beginning with index @var{start} (inclusive) and
  4700. ending with index @var{end} (exclusive).
  4701. @var{str} must be a string, @var{start} and @var{end} must be
  4702. exact integers satisfying:
  4703. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4704. The returned string is read-only.
  4705. @end deffn
  4706. substring/copy
  4707. @c snarfed from strings.c:731
  4708. @deffn {Scheme Procedure} substring/copy str start [end]
  4709. @deffnx {C Function} scm_substring_copy (str, start, end)
  4710. Return a newly allocated string formed from the characters
  4711. of @var{str} beginning with index @var{start} (inclusive) and
  4712. ending with index @var{end} (exclusive).
  4713. @var{str} must be a string, @var{start} and @var{end} must be
  4714. exact integers satisfying:
  4715. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4716. @end deffn
  4717. substring/shared
  4718. @c snarfed from strings.c:755
  4719. @deffn {Scheme Procedure} substring/shared str start [end]
  4720. @deffnx {C Function} scm_substring_shared (str, start, end)
  4721. Return string that indirectly refers to the characters
  4722. of @var{str} beginning with index @var{start} (inclusive) and
  4723. ending with index @var{end} (exclusive).
  4724. @var{str} must be a string, @var{start} and @var{end} must be
  4725. exact integers satisfying:
  4726. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4727. @end deffn
  4728. string-append
  4729. @c snarfed from strings.c:774
  4730. @deffn {Scheme Procedure} string-append . args
  4731. @deffnx {C Function} scm_string_append (args)
  4732. Return a newly allocated string whose characters form the
  4733. concatenation of the given strings, @var{args}.
  4734. @end deffn
  4735. uniform-vector?
  4736. @c snarfed from srfi-4.c:651
  4737. @deffn {Scheme Procedure} uniform-vector? obj
  4738. @deffnx {C Function} scm_uniform_vector_p (obj)
  4739. Return @code{#t} if @var{obj} is a uniform vector.
  4740. @end deffn
  4741. uniform-vector-ref
  4742. @c snarfed from srfi-4.c:677
  4743. @deffn {Scheme Procedure} uniform-vector-ref v idx
  4744. @deffnx {C Function} scm_uniform_vector_ref (v, idx)
  4745. Return the element at index @var{idx} of the
  4746. homogenous numeric vector @var{v}.
  4747. @end deffn
  4748. uniform-vector-set!
  4749. @c snarfed from srfi-4.c:714
  4750. @deffn {Scheme Procedure} uniform-vector-set! v idx val
  4751. @deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
  4752. Set the element at index @var{idx} of the
  4753. homogenous numeric vector @var{v} to @var{val}.
  4754. @end deffn
  4755. uniform-vector->list
  4756. @c snarfed from srfi-4.c:737
  4757. @deffn {Scheme Procedure} uniform-vector->list uvec
  4758. @deffnx {C Function} scm_uniform_vector_to_list (uvec)
  4759. Convert the uniform numeric vector @var{uvec} to a list.
  4760. @end deffn
  4761. uniform-vector-length
  4762. @c snarfed from srfi-4.c:820
  4763. @deffn {Scheme Procedure} uniform-vector-length v
  4764. @deffnx {C Function} scm_uniform_vector_length (v)
  4765. Return the number of elements in the uniform vector @var{v}.
  4766. @end deffn
  4767. uniform-vector-read!
  4768. @c snarfed from srfi-4.c:845
  4769. @deffn {Scheme Procedure} uniform-vector-read! uvec [port_or_fd [start [end]]]
  4770. @deffnx {C Function} scm_uniform_vector_read_x (uvec, port_or_fd, start, end)
  4771. Fill the elements of @var{uvec} by reading
  4772. raw bytes from @var{port-or-fdes}, using host byte order.
  4773. The optional arguments @var{start} (inclusive) and @var{end}
  4774. (exclusive) allow a specified region to be read,
  4775. leaving the remainder of the vector unchanged.
  4776. When @var{port-or-fdes} is a port, all specified elements
  4777. of @var{uvec} are attempted to be read, potentially blocking
  4778. while waiting formore input or end-of-file.
  4779. When @var{port-or-fd} is an integer, a single call to
  4780. read(2) is made.
  4781. An error is signalled when the last element has only
  4782. been partially filled before reaching end-of-file or in
  4783. the single call to read(2).
  4784. @code{uniform-vector-read!} returns the number of elements
  4785. read.
  4786. @var{port-or-fdes} may be omitted, in which case it defaults
  4787. to the value returned by @code{(current-input-port)}.
  4788. @end deffn
  4789. uniform-vector-write
  4790. @c snarfed from srfi-4.c:958
  4791. @deffn {Scheme Procedure} uniform-vector-write uvec [port_or_fd [start [end]]]
  4792. @deffnx {C Function} scm_uniform_vector_write (uvec, port_or_fd, start, end)
  4793. Write the elements of @var{uvec} as raw bytes to
  4794. @var{port-or-fdes}, in the host byte order.
  4795. The optional arguments @var{start} (inclusive)
  4796. and @var{end} (exclusive) allow
  4797. a specified region to be written.
  4798. When @var{port-or-fdes} is a port, all specified elements
  4799. of @var{uvec} are attempted to be written, potentially blocking
  4800. while waiting for more room.
  4801. When @var{port-or-fd} is an integer, a single call to
  4802. write(2) is made.
  4803. An error is signalled when the last element has only
  4804. been partially written in the single call to write(2).
  4805. The number of objects actually written is returned.
  4806. @var{port-or-fdes} may be
  4807. omitted, in which case it defaults to the value returned by
  4808. @code{(current-output-port)}.
  4809. @end deffn
  4810. u8vector?
  4811. @c snarfed from ../libguile/srfi-4.i.c:41
  4812. @deffn {Scheme Procedure} u8vector? obj
  4813. @deffnx {C Function} scm_u8vector_p (obj)
  4814. Return @code{#t} if @var{obj} is a vector of type u8,
  4815. @code{#f} otherwise.
  4816. @end deffn
  4817. make-u8vector
  4818. @c snarfed from ../libguile/srfi-4.i.c:53
  4819. @deffn {Scheme Procedure} make-u8vector len [fill]
  4820. @deffnx {C Function} scm_make_u8vector (len, fill)
  4821. Return a newly allocated uniform numeric vector which can
  4822. hold @var{len} elements. If @var{fill} is given, it is used to
  4823. initialize the elements, otherwise the contents of the vector
  4824. is unspecified.
  4825. @end deffn
  4826. u8vector
  4827. @c snarfed from ../libguile/srfi-4.i.c:63
  4828. @deffn {Scheme Procedure} u8vector . l
  4829. @deffnx {C Function} scm_u8vector (l)
  4830. Return a newly allocated uniform numeric vector containing
  4831. all argument values.
  4832. @end deffn
  4833. u8vector-length
  4834. @c snarfed from ../libguile/srfi-4.i.c:74
  4835. @deffn {Scheme Procedure} u8vector-length uvec
  4836. @deffnx {C Function} scm_u8vector_length (uvec)
  4837. Return the number of elements in the uniform numeric vector
  4838. @var{uvec}.
  4839. @end deffn
  4840. u8vector-ref
  4841. @c snarfed from ../libguile/srfi-4.i.c:85
  4842. @deffn {Scheme Procedure} u8vector-ref uvec index
  4843. @deffnx {C Function} scm_u8vector_ref (uvec, index)
  4844. Return the element at @var{index} in the uniform numeric
  4845. vector @var{uvec}.
  4846. @end deffn
  4847. u8vector-set!
  4848. @c snarfed from ../libguile/srfi-4.i.c:97
  4849. @deffn {Scheme Procedure} u8vector-set! uvec index value
  4850. @deffnx {C Function} scm_u8vector_set_x (uvec, index, value)
  4851. Set the element at @var{index} in the uniform numeric
  4852. vector @var{uvec} to @var{value}. The return value is not
  4853. specified.
  4854. @end deffn
  4855. u8vector->list
  4856. @c snarfed from ../libguile/srfi-4.i.c:107
  4857. @deffn {Scheme Procedure} u8vector->list uvec
  4858. @deffnx {C Function} scm_u8vector_to_list (uvec)
  4859. Convert the uniform numeric vector @var{uvec} to a list.
  4860. @end deffn
  4861. list->u8vector
  4862. @c snarfed from ../libguile/srfi-4.i.c:117
  4863. @deffn {Scheme Procedure} list->u8vector l
  4864. @deffnx {C Function} scm_list_to_u8vector (l)
  4865. Convert the list @var{l} to a numeric uniform vector.
  4866. @end deffn
  4867. any->u8vector
  4868. @c snarfed from ../libguile/srfi-4.i.c:128
  4869. @deffn {Scheme Procedure} any->u8vector obj
  4870. @deffnx {C Function} scm_any_to_u8vector (obj)
  4871. Convert @var{obj}, which can be a list, vector, or
  4872. uniform vector, to a numeric uniform vector of
  4873. type u8.
  4874. @end deffn
  4875. s8vector?
  4876. @c snarfed from ../libguile/srfi-4.i.c:41
  4877. @deffn {Scheme Procedure} s8vector? obj
  4878. @deffnx {C Function} scm_s8vector_p (obj)
  4879. Return @code{#t} if @var{obj} is a vector of type s8,
  4880. @code{#f} otherwise.
  4881. @end deffn
  4882. make-s8vector
  4883. @c snarfed from ../libguile/srfi-4.i.c:53
  4884. @deffn {Scheme Procedure} make-s8vector len [fill]
  4885. @deffnx {C Function} scm_make_s8vector (len, fill)
  4886. Return a newly allocated uniform numeric vector which can
  4887. hold @var{len} elements. If @var{fill} is given, it is used to
  4888. initialize the elements, otherwise the contents of the vector
  4889. is unspecified.
  4890. @end deffn
  4891. s8vector
  4892. @c snarfed from ../libguile/srfi-4.i.c:63
  4893. @deffn {Scheme Procedure} s8vector . l
  4894. @deffnx {C Function} scm_s8vector (l)
  4895. Return a newly allocated uniform numeric vector containing
  4896. all argument values.
  4897. @end deffn
  4898. s8vector-length
  4899. @c snarfed from ../libguile/srfi-4.i.c:74
  4900. @deffn {Scheme Procedure} s8vector-length uvec
  4901. @deffnx {C Function} scm_s8vector_length (uvec)
  4902. Return the number of elements in the uniform numeric vector
  4903. @var{uvec}.
  4904. @end deffn
  4905. s8vector-ref
  4906. @c snarfed from ../libguile/srfi-4.i.c:85
  4907. @deffn {Scheme Procedure} s8vector-ref uvec index
  4908. @deffnx {C Function} scm_s8vector_ref (uvec, index)
  4909. Return the element at @var{index} in the uniform numeric
  4910. vector @var{uvec}.
  4911. @end deffn
  4912. s8vector-set!
  4913. @c snarfed from ../libguile/srfi-4.i.c:97
  4914. @deffn {Scheme Procedure} s8vector-set! uvec index value
  4915. @deffnx {C Function} scm_s8vector_set_x (uvec, index, value)
  4916. Set the element at @var{index} in the uniform numeric
  4917. vector @var{uvec} to @var{value}. The return value is not
  4918. specified.
  4919. @end deffn
  4920. s8vector->list
  4921. @c snarfed from ../libguile/srfi-4.i.c:107
  4922. @deffn {Scheme Procedure} s8vector->list uvec
  4923. @deffnx {C Function} scm_s8vector_to_list (uvec)
  4924. Convert the uniform numeric vector @var{uvec} to a list.
  4925. @end deffn
  4926. list->s8vector
  4927. @c snarfed from ../libguile/srfi-4.i.c:117
  4928. @deffn {Scheme Procedure} list->s8vector l
  4929. @deffnx {C Function} scm_list_to_s8vector (l)
  4930. Convert the list @var{l} to a numeric uniform vector.
  4931. @end deffn
  4932. any->s8vector
  4933. @c snarfed from ../libguile/srfi-4.i.c:128
  4934. @deffn {Scheme Procedure} any->s8vector obj
  4935. @deffnx {C Function} scm_any_to_s8vector (obj)
  4936. Convert @var{obj}, which can be a list, vector, or
  4937. uniform vector, to a numeric uniform vector of
  4938. type s8.
  4939. @end deffn
  4940. u16vector?
  4941. @c snarfed from ../libguile/srfi-4.i.c:41
  4942. @deffn {Scheme Procedure} u16vector? obj
  4943. @deffnx {C Function} scm_u16vector_p (obj)
  4944. Return @code{#t} if @var{obj} is a vector of type u16,
  4945. @code{#f} otherwise.
  4946. @end deffn
  4947. make-u16vector
  4948. @c snarfed from ../libguile/srfi-4.i.c:53
  4949. @deffn {Scheme Procedure} make-u16vector len [fill]
  4950. @deffnx {C Function} scm_make_u16vector (len, fill)
  4951. Return a newly allocated uniform numeric vector which can
  4952. hold @var{len} elements. If @var{fill} is given, it is used to
  4953. initialize the elements, otherwise the contents of the vector
  4954. is unspecified.
  4955. @end deffn
  4956. u16vector
  4957. @c snarfed from ../libguile/srfi-4.i.c:63
  4958. @deffn {Scheme Procedure} u16vector . l
  4959. @deffnx {C Function} scm_u16vector (l)
  4960. Return a newly allocated uniform numeric vector containing
  4961. all argument values.
  4962. @end deffn
  4963. u16vector-length
  4964. @c snarfed from ../libguile/srfi-4.i.c:74
  4965. @deffn {Scheme Procedure} u16vector-length uvec
  4966. @deffnx {C Function} scm_u16vector_length (uvec)
  4967. Return the number of elements in the uniform numeric vector
  4968. @var{uvec}.
  4969. @end deffn
  4970. u16vector-ref
  4971. @c snarfed from ../libguile/srfi-4.i.c:85
  4972. @deffn {Scheme Procedure} u16vector-ref uvec index
  4973. @deffnx {C Function} scm_u16vector_ref (uvec, index)
  4974. Return the element at @var{index} in the uniform numeric
  4975. vector @var{uvec}.
  4976. @end deffn
  4977. u16vector-set!
  4978. @c snarfed from ../libguile/srfi-4.i.c:97
  4979. @deffn {Scheme Procedure} u16vector-set! uvec index value
  4980. @deffnx {C Function} scm_u16vector_set_x (uvec, index, value)
  4981. Set the element at @var{index} in the uniform numeric
  4982. vector @var{uvec} to @var{value}. The return value is not
  4983. specified.
  4984. @end deffn
  4985. u16vector->list
  4986. @c snarfed from ../libguile/srfi-4.i.c:107
  4987. @deffn {Scheme Procedure} u16vector->list uvec
  4988. @deffnx {C Function} scm_u16vector_to_list (uvec)
  4989. Convert the uniform numeric vector @var{uvec} to a list.
  4990. @end deffn
  4991. list->u16vector
  4992. @c snarfed from ../libguile/srfi-4.i.c:117
  4993. @deffn {Scheme Procedure} list->u16vector l
  4994. @deffnx {C Function} scm_list_to_u16vector (l)
  4995. Convert the list @var{l} to a numeric uniform vector.
  4996. @end deffn
  4997. any->u16vector
  4998. @c snarfed from ../libguile/srfi-4.i.c:128
  4999. @deffn {Scheme Procedure} any->u16vector obj
  5000. @deffnx {C Function} scm_any_to_u16vector (obj)
  5001. Convert @var{obj}, which can be a list, vector, or
  5002. uniform vector, to a numeric uniform vector of
  5003. type u16.
  5004. @end deffn
  5005. s16vector?
  5006. @c snarfed from ../libguile/srfi-4.i.c:41
  5007. @deffn {Scheme Procedure} s16vector? obj
  5008. @deffnx {C Function} scm_s16vector_p (obj)
  5009. Return @code{#t} if @var{obj} is a vector of type s16,
  5010. @code{#f} otherwise.
  5011. @end deffn
  5012. make-s16vector
  5013. @c snarfed from ../libguile/srfi-4.i.c:53
  5014. @deffn {Scheme Procedure} make-s16vector len [fill]
  5015. @deffnx {C Function} scm_make_s16vector (len, fill)
  5016. Return a newly allocated uniform numeric vector which can
  5017. hold @var{len} elements. If @var{fill} is given, it is used to
  5018. initialize the elements, otherwise the contents of the vector
  5019. is unspecified.
  5020. @end deffn
  5021. s16vector
  5022. @c snarfed from ../libguile/srfi-4.i.c:63
  5023. @deffn {Scheme Procedure} s16vector . l
  5024. @deffnx {C Function} scm_s16vector (l)
  5025. Return a newly allocated uniform numeric vector containing
  5026. all argument values.
  5027. @end deffn
  5028. s16vector-length
  5029. @c snarfed from ../libguile/srfi-4.i.c:74
  5030. @deffn {Scheme Procedure} s16vector-length uvec
  5031. @deffnx {C Function} scm_s16vector_length (uvec)
  5032. Return the number of elements in the uniform numeric vector
  5033. @var{uvec}.
  5034. @end deffn
  5035. s16vector-ref
  5036. @c snarfed from ../libguile/srfi-4.i.c:85
  5037. @deffn {Scheme Procedure} s16vector-ref uvec index
  5038. @deffnx {C Function} scm_s16vector_ref (uvec, index)
  5039. Return the element at @var{index} in the uniform numeric
  5040. vector @var{uvec}.
  5041. @end deffn
  5042. s16vector-set!
  5043. @c snarfed from ../libguile/srfi-4.i.c:97
  5044. @deffn {Scheme Procedure} s16vector-set! uvec index value
  5045. @deffnx {C Function} scm_s16vector_set_x (uvec, index, value)
  5046. Set the element at @var{index} in the uniform numeric
  5047. vector @var{uvec} to @var{value}. The return value is not
  5048. specified.
  5049. @end deffn
  5050. s16vector->list
  5051. @c snarfed from ../libguile/srfi-4.i.c:107
  5052. @deffn {Scheme Procedure} s16vector->list uvec
  5053. @deffnx {C Function} scm_s16vector_to_list (uvec)
  5054. Convert the uniform numeric vector @var{uvec} to a list.
  5055. @end deffn
  5056. list->s16vector
  5057. @c snarfed from ../libguile/srfi-4.i.c:117
  5058. @deffn {Scheme Procedure} list->s16vector l
  5059. @deffnx {C Function} scm_list_to_s16vector (l)
  5060. Convert the list @var{l} to a numeric uniform vector.
  5061. @end deffn
  5062. any->s16vector
  5063. @c snarfed from ../libguile/srfi-4.i.c:128
  5064. @deffn {Scheme Procedure} any->s16vector obj
  5065. @deffnx {C Function} scm_any_to_s16vector (obj)
  5066. Convert @var{obj}, which can be a list, vector, or
  5067. uniform vector, to a numeric uniform vector of
  5068. type s16.
  5069. @end deffn
  5070. u32vector?
  5071. @c snarfed from ../libguile/srfi-4.i.c:41
  5072. @deffn {Scheme Procedure} u32vector? obj
  5073. @deffnx {C Function} scm_u32vector_p (obj)
  5074. Return @code{#t} if @var{obj} is a vector of type u32,
  5075. @code{#f} otherwise.
  5076. @end deffn
  5077. make-u32vector
  5078. @c snarfed from ../libguile/srfi-4.i.c:53
  5079. @deffn {Scheme Procedure} make-u32vector len [fill]
  5080. @deffnx {C Function} scm_make_u32vector (len, fill)
  5081. Return a newly allocated uniform numeric vector which can
  5082. hold @var{len} elements. If @var{fill} is given, it is used to
  5083. initialize the elements, otherwise the contents of the vector
  5084. is unspecified.
  5085. @end deffn
  5086. u32vector
  5087. @c snarfed from ../libguile/srfi-4.i.c:63
  5088. @deffn {Scheme Procedure} u32vector . l
  5089. @deffnx {C Function} scm_u32vector (l)
  5090. Return a newly allocated uniform numeric vector containing
  5091. all argument values.
  5092. @end deffn
  5093. u32vector-length
  5094. @c snarfed from ../libguile/srfi-4.i.c:74
  5095. @deffn {Scheme Procedure} u32vector-length uvec
  5096. @deffnx {C Function} scm_u32vector_length (uvec)
  5097. Return the number of elements in the uniform numeric vector
  5098. @var{uvec}.
  5099. @end deffn
  5100. u32vector-ref
  5101. @c snarfed from ../libguile/srfi-4.i.c:85
  5102. @deffn {Scheme Procedure} u32vector-ref uvec index
  5103. @deffnx {C Function} scm_u32vector_ref (uvec, index)
  5104. Return the element at @var{index} in the uniform numeric
  5105. vector @var{uvec}.
  5106. @end deffn
  5107. u32vector-set!
  5108. @c snarfed from ../libguile/srfi-4.i.c:97
  5109. @deffn {Scheme Procedure} u32vector-set! uvec index value
  5110. @deffnx {C Function} scm_u32vector_set_x (uvec, index, value)
  5111. Set the element at @var{index} in the uniform numeric
  5112. vector @var{uvec} to @var{value}. The return value is not
  5113. specified.
  5114. @end deffn
  5115. u32vector->list
  5116. @c snarfed from ../libguile/srfi-4.i.c:107
  5117. @deffn {Scheme Procedure} u32vector->list uvec
  5118. @deffnx {C Function} scm_u32vector_to_list (uvec)
  5119. Convert the uniform numeric vector @var{uvec} to a list.
  5120. @end deffn
  5121. list->u32vector
  5122. @c snarfed from ../libguile/srfi-4.i.c:117
  5123. @deffn {Scheme Procedure} list->u32vector l
  5124. @deffnx {C Function} scm_list_to_u32vector (l)
  5125. Convert the list @var{l} to a numeric uniform vector.
  5126. @end deffn
  5127. any->u32vector
  5128. @c snarfed from ../libguile/srfi-4.i.c:128
  5129. @deffn {Scheme Procedure} any->u32vector obj
  5130. @deffnx {C Function} scm_any_to_u32vector (obj)
  5131. Convert @var{obj}, which can be a list, vector, or
  5132. uniform vector, to a numeric uniform vector of
  5133. type u32.
  5134. @end deffn
  5135. s32vector?
  5136. @c snarfed from ../libguile/srfi-4.i.c:41
  5137. @deffn {Scheme Procedure} s32vector? obj
  5138. @deffnx {C Function} scm_s32vector_p (obj)
  5139. Return @code{#t} if @var{obj} is a vector of type s32,
  5140. @code{#f} otherwise.
  5141. @end deffn
  5142. make-s32vector
  5143. @c snarfed from ../libguile/srfi-4.i.c:53
  5144. @deffn {Scheme Procedure} make-s32vector len [fill]
  5145. @deffnx {C Function} scm_make_s32vector (len, fill)
  5146. Return a newly allocated uniform numeric vector which can
  5147. hold @var{len} elements. If @var{fill} is given, it is used to
  5148. initialize the elements, otherwise the contents of the vector
  5149. is unspecified.
  5150. @end deffn
  5151. s32vector
  5152. @c snarfed from ../libguile/srfi-4.i.c:63
  5153. @deffn {Scheme Procedure} s32vector . l
  5154. @deffnx {C Function} scm_s32vector (l)
  5155. Return a newly allocated uniform numeric vector containing
  5156. all argument values.
  5157. @end deffn
  5158. s32vector-length
  5159. @c snarfed from ../libguile/srfi-4.i.c:74
  5160. @deffn {Scheme Procedure} s32vector-length uvec
  5161. @deffnx {C Function} scm_s32vector_length (uvec)
  5162. Return the number of elements in the uniform numeric vector
  5163. @var{uvec}.
  5164. @end deffn
  5165. s32vector-ref
  5166. @c snarfed from ../libguile/srfi-4.i.c:85
  5167. @deffn {Scheme Procedure} s32vector-ref uvec index
  5168. @deffnx {C Function} scm_s32vector_ref (uvec, index)
  5169. Return the element at @var{index} in the uniform numeric
  5170. vector @var{uvec}.
  5171. @end deffn
  5172. s32vector-set!
  5173. @c snarfed from ../libguile/srfi-4.i.c:97
  5174. @deffn {Scheme Procedure} s32vector-set! uvec index value
  5175. @deffnx {C Function} scm_s32vector_set_x (uvec, index, value)
  5176. Set the element at @var{index} in the uniform numeric
  5177. vector @var{uvec} to @var{value}. The return value is not
  5178. specified.
  5179. @end deffn
  5180. s32vector->list
  5181. @c snarfed from ../libguile/srfi-4.i.c:107
  5182. @deffn {Scheme Procedure} s32vector->list uvec
  5183. @deffnx {C Function} scm_s32vector_to_list (uvec)
  5184. Convert the uniform numeric vector @var{uvec} to a list.
  5185. @end deffn
  5186. list->s32vector
  5187. @c snarfed from ../libguile/srfi-4.i.c:117
  5188. @deffn {Scheme Procedure} list->s32vector l
  5189. @deffnx {C Function} scm_list_to_s32vector (l)
  5190. Convert the list @var{l} to a numeric uniform vector.
  5191. @end deffn
  5192. any->s32vector
  5193. @c snarfed from ../libguile/srfi-4.i.c:128
  5194. @deffn {Scheme Procedure} any->s32vector obj
  5195. @deffnx {C Function} scm_any_to_s32vector (obj)
  5196. Convert @var{obj}, which can be a list, vector, or
  5197. uniform vector, to a numeric uniform vector of
  5198. type s32.
  5199. @end deffn
  5200. u64vector?
  5201. @c snarfed from ../libguile/srfi-4.i.c:41
  5202. @deffn {Scheme Procedure} u64vector? obj
  5203. @deffnx {C Function} scm_u64vector_p (obj)
  5204. Return @code{#t} if @var{obj} is a vector of type u64,
  5205. @code{#f} otherwise.
  5206. @end deffn
  5207. make-u64vector
  5208. @c snarfed from ../libguile/srfi-4.i.c:53
  5209. @deffn {Scheme Procedure} make-u64vector len [fill]
  5210. @deffnx {C Function} scm_make_u64vector (len, fill)
  5211. Return a newly allocated uniform numeric vector which can
  5212. hold @var{len} elements. If @var{fill} is given, it is used to
  5213. initialize the elements, otherwise the contents of the vector
  5214. is unspecified.
  5215. @end deffn
  5216. u64vector
  5217. @c snarfed from ../libguile/srfi-4.i.c:63
  5218. @deffn {Scheme Procedure} u64vector . l
  5219. @deffnx {C Function} scm_u64vector (l)
  5220. Return a newly allocated uniform numeric vector containing
  5221. all argument values.
  5222. @end deffn
  5223. u64vector-length
  5224. @c snarfed from ../libguile/srfi-4.i.c:74
  5225. @deffn {Scheme Procedure} u64vector-length uvec
  5226. @deffnx {C Function} scm_u64vector_length (uvec)
  5227. Return the number of elements in the uniform numeric vector
  5228. @var{uvec}.
  5229. @end deffn
  5230. u64vector-ref
  5231. @c snarfed from ../libguile/srfi-4.i.c:85
  5232. @deffn {Scheme Procedure} u64vector-ref uvec index
  5233. @deffnx {C Function} scm_u64vector_ref (uvec, index)
  5234. Return the element at @var{index} in the uniform numeric
  5235. vector @var{uvec}.
  5236. @end deffn
  5237. u64vector-set!
  5238. @c snarfed from ../libguile/srfi-4.i.c:97
  5239. @deffn {Scheme Procedure} u64vector-set! uvec index value
  5240. @deffnx {C Function} scm_u64vector_set_x (uvec, index, value)
  5241. Set the element at @var{index} in the uniform numeric
  5242. vector @var{uvec} to @var{value}. The return value is not
  5243. specified.
  5244. @end deffn
  5245. u64vector->list
  5246. @c snarfed from ../libguile/srfi-4.i.c:107
  5247. @deffn {Scheme Procedure} u64vector->list uvec
  5248. @deffnx {C Function} scm_u64vector_to_list (uvec)
  5249. Convert the uniform numeric vector @var{uvec} to a list.
  5250. @end deffn
  5251. list->u64vector
  5252. @c snarfed from ../libguile/srfi-4.i.c:117
  5253. @deffn {Scheme Procedure} list->u64vector l
  5254. @deffnx {C Function} scm_list_to_u64vector (l)
  5255. Convert the list @var{l} to a numeric uniform vector.
  5256. @end deffn
  5257. any->u64vector
  5258. @c snarfed from ../libguile/srfi-4.i.c:128
  5259. @deffn {Scheme Procedure} any->u64vector obj
  5260. @deffnx {C Function} scm_any_to_u64vector (obj)
  5261. Convert @var{obj}, which can be a list, vector, or
  5262. uniform vector, to a numeric uniform vector of
  5263. type u64.
  5264. @end deffn
  5265. s64vector?
  5266. @c snarfed from ../libguile/srfi-4.i.c:41
  5267. @deffn {Scheme Procedure} s64vector? obj
  5268. @deffnx {C Function} scm_s64vector_p (obj)
  5269. Return @code{#t} if @var{obj} is a vector of type s64,
  5270. @code{#f} otherwise.
  5271. @end deffn
  5272. make-s64vector
  5273. @c snarfed from ../libguile/srfi-4.i.c:53
  5274. @deffn {Scheme Procedure} make-s64vector len [fill]
  5275. @deffnx {C Function} scm_make_s64vector (len, fill)
  5276. Return a newly allocated uniform numeric vector which can
  5277. hold @var{len} elements. If @var{fill} is given, it is used to
  5278. initialize the elements, otherwise the contents of the vector
  5279. is unspecified.
  5280. @end deffn
  5281. s64vector
  5282. @c snarfed from ../libguile/srfi-4.i.c:63
  5283. @deffn {Scheme Procedure} s64vector . l
  5284. @deffnx {C Function} scm_s64vector (l)
  5285. Return a newly allocated uniform numeric vector containing
  5286. all argument values.
  5287. @end deffn
  5288. s64vector-length
  5289. @c snarfed from ../libguile/srfi-4.i.c:74
  5290. @deffn {Scheme Procedure} s64vector-length uvec
  5291. @deffnx {C Function} scm_s64vector_length (uvec)
  5292. Return the number of elements in the uniform numeric vector
  5293. @var{uvec}.
  5294. @end deffn
  5295. s64vector-ref
  5296. @c snarfed from ../libguile/srfi-4.i.c:85
  5297. @deffn {Scheme Procedure} s64vector-ref uvec index
  5298. @deffnx {C Function} scm_s64vector_ref (uvec, index)
  5299. Return the element at @var{index} in the uniform numeric
  5300. vector @var{uvec}.
  5301. @end deffn
  5302. s64vector-set!
  5303. @c snarfed from ../libguile/srfi-4.i.c:97
  5304. @deffn {Scheme Procedure} s64vector-set! uvec index value
  5305. @deffnx {C Function} scm_s64vector_set_x (uvec, index, value)
  5306. Set the element at @var{index} in the uniform numeric
  5307. vector @var{uvec} to @var{value}. The return value is not
  5308. specified.
  5309. @end deffn
  5310. s64vector->list
  5311. @c snarfed from ../libguile/srfi-4.i.c:107
  5312. @deffn {Scheme Procedure} s64vector->list uvec
  5313. @deffnx {C Function} scm_s64vector_to_list (uvec)
  5314. Convert the uniform numeric vector @var{uvec} to a list.
  5315. @end deffn
  5316. list->s64vector
  5317. @c snarfed from ../libguile/srfi-4.i.c:117
  5318. @deffn {Scheme Procedure} list->s64vector l
  5319. @deffnx {C Function} scm_list_to_s64vector (l)
  5320. Convert the list @var{l} to a numeric uniform vector.
  5321. @end deffn
  5322. any->s64vector
  5323. @c snarfed from ../libguile/srfi-4.i.c:128
  5324. @deffn {Scheme Procedure} any->s64vector obj
  5325. @deffnx {C Function} scm_any_to_s64vector (obj)
  5326. Convert @var{obj}, which can be a list, vector, or
  5327. uniform vector, to a numeric uniform vector of
  5328. type s64.
  5329. @end deffn
  5330. f32vector?
  5331. @c snarfed from ../libguile/srfi-4.i.c:41
  5332. @deffn {Scheme Procedure} f32vector? obj
  5333. @deffnx {C Function} scm_f32vector_p (obj)
  5334. Return @code{#t} if @var{obj} is a vector of type f32,
  5335. @code{#f} otherwise.
  5336. @end deffn
  5337. make-f32vector
  5338. @c snarfed from ../libguile/srfi-4.i.c:53
  5339. @deffn {Scheme Procedure} make-f32vector len [fill]
  5340. @deffnx {C Function} scm_make_f32vector (len, fill)
  5341. Return a newly allocated uniform numeric vector which can
  5342. hold @var{len} elements. If @var{fill} is given, it is used to
  5343. initialize the elements, otherwise the contents of the vector
  5344. is unspecified.
  5345. @end deffn
  5346. f32vector
  5347. @c snarfed from ../libguile/srfi-4.i.c:63
  5348. @deffn {Scheme Procedure} f32vector . l
  5349. @deffnx {C Function} scm_f32vector (l)
  5350. Return a newly allocated uniform numeric vector containing
  5351. all argument values.
  5352. @end deffn
  5353. f32vector-length
  5354. @c snarfed from ../libguile/srfi-4.i.c:74
  5355. @deffn {Scheme Procedure} f32vector-length uvec
  5356. @deffnx {C Function} scm_f32vector_length (uvec)
  5357. Return the number of elements in the uniform numeric vector
  5358. @var{uvec}.
  5359. @end deffn
  5360. f32vector-ref
  5361. @c snarfed from ../libguile/srfi-4.i.c:85
  5362. @deffn {Scheme Procedure} f32vector-ref uvec index
  5363. @deffnx {C Function} scm_f32vector_ref (uvec, index)
  5364. Return the element at @var{index} in the uniform numeric
  5365. vector @var{uvec}.
  5366. @end deffn
  5367. f32vector-set!
  5368. @c snarfed from ../libguile/srfi-4.i.c:97
  5369. @deffn {Scheme Procedure} f32vector-set! uvec index value
  5370. @deffnx {C Function} scm_f32vector_set_x (uvec, index, value)
  5371. Set the element at @var{index} in the uniform numeric
  5372. vector @var{uvec} to @var{value}. The return value is not
  5373. specified.
  5374. @end deffn
  5375. f32vector->list
  5376. @c snarfed from ../libguile/srfi-4.i.c:107
  5377. @deffn {Scheme Procedure} f32vector->list uvec
  5378. @deffnx {C Function} scm_f32vector_to_list (uvec)
  5379. Convert the uniform numeric vector @var{uvec} to a list.
  5380. @end deffn
  5381. list->f32vector
  5382. @c snarfed from ../libguile/srfi-4.i.c:117
  5383. @deffn {Scheme Procedure} list->f32vector l
  5384. @deffnx {C Function} scm_list_to_f32vector (l)
  5385. Convert the list @var{l} to a numeric uniform vector.
  5386. @end deffn
  5387. any->f32vector
  5388. @c snarfed from ../libguile/srfi-4.i.c:128
  5389. @deffn {Scheme Procedure} any->f32vector obj
  5390. @deffnx {C Function} scm_any_to_f32vector (obj)
  5391. Convert @var{obj}, which can be a list, vector, or
  5392. uniform vector, to a numeric uniform vector of
  5393. type f32.
  5394. @end deffn
  5395. f64vector?
  5396. @c snarfed from ../libguile/srfi-4.i.c:41
  5397. @deffn {Scheme Procedure} f64vector? obj
  5398. @deffnx {C Function} scm_f64vector_p (obj)
  5399. Return @code{#t} if @var{obj} is a vector of type f64,
  5400. @code{#f} otherwise.
  5401. @end deffn
  5402. make-f64vector
  5403. @c snarfed from ../libguile/srfi-4.i.c:53
  5404. @deffn {Scheme Procedure} make-f64vector len [fill]
  5405. @deffnx {C Function} scm_make_f64vector (len, fill)
  5406. Return a newly allocated uniform numeric vector which can
  5407. hold @var{len} elements. If @var{fill} is given, it is used to
  5408. initialize the elements, otherwise the contents of the vector
  5409. is unspecified.
  5410. @end deffn
  5411. f64vector
  5412. @c snarfed from ../libguile/srfi-4.i.c:63
  5413. @deffn {Scheme Procedure} f64vector . l
  5414. @deffnx {C Function} scm_f64vector (l)
  5415. Return a newly allocated uniform numeric vector containing
  5416. all argument values.
  5417. @end deffn
  5418. f64vector-length
  5419. @c snarfed from ../libguile/srfi-4.i.c:74
  5420. @deffn {Scheme Procedure} f64vector-length uvec
  5421. @deffnx {C Function} scm_f64vector_length (uvec)
  5422. Return the number of elements in the uniform numeric vector
  5423. @var{uvec}.
  5424. @end deffn
  5425. f64vector-ref
  5426. @c snarfed from ../libguile/srfi-4.i.c:85
  5427. @deffn {Scheme Procedure} f64vector-ref uvec index
  5428. @deffnx {C Function} scm_f64vector_ref (uvec, index)
  5429. Return the element at @var{index} in the uniform numeric
  5430. vector @var{uvec}.
  5431. @end deffn
  5432. f64vector-set!
  5433. @c snarfed from ../libguile/srfi-4.i.c:97
  5434. @deffn {Scheme Procedure} f64vector-set! uvec index value
  5435. @deffnx {C Function} scm_f64vector_set_x (uvec, index, value)
  5436. Set the element at @var{index} in the uniform numeric
  5437. vector @var{uvec} to @var{value}. The return value is not
  5438. specified.
  5439. @end deffn
  5440. f64vector->list
  5441. @c snarfed from ../libguile/srfi-4.i.c:107
  5442. @deffn {Scheme Procedure} f64vector->list uvec
  5443. @deffnx {C Function} scm_f64vector_to_list (uvec)
  5444. Convert the uniform numeric vector @var{uvec} to a list.
  5445. @end deffn
  5446. list->f64vector
  5447. @c snarfed from ../libguile/srfi-4.i.c:117
  5448. @deffn {Scheme Procedure} list->f64vector l
  5449. @deffnx {C Function} scm_list_to_f64vector (l)
  5450. Convert the list @var{l} to a numeric uniform vector.
  5451. @end deffn
  5452. any->f64vector
  5453. @c snarfed from ../libguile/srfi-4.i.c:128
  5454. @deffn {Scheme Procedure} any->f64vector obj
  5455. @deffnx {C Function} scm_any_to_f64vector (obj)
  5456. Convert @var{obj}, which can be a list, vector, or
  5457. uniform vector, to a numeric uniform vector of
  5458. type f64.
  5459. @end deffn
  5460. c32vector?
  5461. @c snarfed from ../libguile/srfi-4.i.c:41
  5462. @deffn {Scheme Procedure} c32vector? obj
  5463. @deffnx {C Function} scm_c32vector_p (obj)
  5464. Return @code{#t} if @var{obj} is a vector of type c32,
  5465. @code{#f} otherwise.
  5466. @end deffn
  5467. make-c32vector
  5468. @c snarfed from ../libguile/srfi-4.i.c:53
  5469. @deffn {Scheme Procedure} make-c32vector len [fill]
  5470. @deffnx {C Function} scm_make_c32vector (len, fill)
  5471. Return a newly allocated uniform numeric vector which can
  5472. hold @var{len} elements. If @var{fill} is given, it is used to
  5473. initialize the elements, otherwise the contents of the vector
  5474. is unspecified.
  5475. @end deffn
  5476. c32vector
  5477. @c snarfed from ../libguile/srfi-4.i.c:63
  5478. @deffn {Scheme Procedure} c32vector . l
  5479. @deffnx {C Function} scm_c32vector (l)
  5480. Return a newly allocated uniform numeric vector containing
  5481. all argument values.
  5482. @end deffn
  5483. c32vector-length
  5484. @c snarfed from ../libguile/srfi-4.i.c:74
  5485. @deffn {Scheme Procedure} c32vector-length uvec
  5486. @deffnx {C Function} scm_c32vector_length (uvec)
  5487. Return the number of elements in the uniform numeric vector
  5488. @var{uvec}.
  5489. @end deffn
  5490. c32vector-ref
  5491. @c snarfed from ../libguile/srfi-4.i.c:85
  5492. @deffn {Scheme Procedure} c32vector-ref uvec index
  5493. @deffnx {C Function} scm_c32vector_ref (uvec, index)
  5494. Return the element at @var{index} in the uniform numeric
  5495. vector @var{uvec}.
  5496. @end deffn
  5497. c32vector-set!
  5498. @c snarfed from ../libguile/srfi-4.i.c:97
  5499. @deffn {Scheme Procedure} c32vector-set! uvec index value
  5500. @deffnx {C Function} scm_c32vector_set_x (uvec, index, value)
  5501. Set the element at @var{index} in the uniform numeric
  5502. vector @var{uvec} to @var{value}. The return value is not
  5503. specified.
  5504. @end deffn
  5505. c32vector->list
  5506. @c snarfed from ../libguile/srfi-4.i.c:107
  5507. @deffn {Scheme Procedure} c32vector->list uvec
  5508. @deffnx {C Function} scm_c32vector_to_list (uvec)
  5509. Convert the uniform numeric vector @var{uvec} to a list.
  5510. @end deffn
  5511. list->c32vector
  5512. @c snarfed from ../libguile/srfi-4.i.c:117
  5513. @deffn {Scheme Procedure} list->c32vector l
  5514. @deffnx {C Function} scm_list_to_c32vector (l)
  5515. Convert the list @var{l} to a numeric uniform vector.
  5516. @end deffn
  5517. any->c32vector
  5518. @c snarfed from ../libguile/srfi-4.i.c:128
  5519. @deffn {Scheme Procedure} any->c32vector obj
  5520. @deffnx {C Function} scm_any_to_c32vector (obj)
  5521. Convert @var{obj}, which can be a list, vector, or
  5522. uniform vector, to a numeric uniform vector of
  5523. type c32.
  5524. @end deffn
  5525. c64vector?
  5526. @c snarfed from ../libguile/srfi-4.i.c:41
  5527. @deffn {Scheme Procedure} c64vector? obj
  5528. @deffnx {C Function} scm_c64vector_p (obj)
  5529. Return @code{#t} if @var{obj} is a vector of type c64,
  5530. @code{#f} otherwise.
  5531. @end deffn
  5532. make-c64vector
  5533. @c snarfed from ../libguile/srfi-4.i.c:53
  5534. @deffn {Scheme Procedure} make-c64vector len [fill]
  5535. @deffnx {C Function} scm_make_c64vector (len, fill)
  5536. Return a newly allocated uniform numeric vector which can
  5537. hold @var{len} elements. If @var{fill} is given, it is used to
  5538. initialize the elements, otherwise the contents of the vector
  5539. is unspecified.
  5540. @end deffn
  5541. c64vector
  5542. @c snarfed from ../libguile/srfi-4.i.c:63
  5543. @deffn {Scheme Procedure} c64vector . l
  5544. @deffnx {C Function} scm_c64vector (l)
  5545. Return a newly allocated uniform numeric vector containing
  5546. all argument values.
  5547. @end deffn
  5548. c64vector-length
  5549. @c snarfed from ../libguile/srfi-4.i.c:74
  5550. @deffn {Scheme Procedure} c64vector-length uvec
  5551. @deffnx {C Function} scm_c64vector_length (uvec)
  5552. Return the number of elements in the uniform numeric vector
  5553. @var{uvec}.
  5554. @end deffn
  5555. c64vector-ref
  5556. @c snarfed from ../libguile/srfi-4.i.c:85
  5557. @deffn {Scheme Procedure} c64vector-ref uvec index
  5558. @deffnx {C Function} scm_c64vector_ref (uvec, index)
  5559. Return the element at @var{index} in the uniform numeric
  5560. vector @var{uvec}.
  5561. @end deffn
  5562. c64vector-set!
  5563. @c snarfed from ../libguile/srfi-4.i.c:97
  5564. @deffn {Scheme Procedure} c64vector-set! uvec index value
  5565. @deffnx {C Function} scm_c64vector_set_x (uvec, index, value)
  5566. Set the element at @var{index} in the uniform numeric
  5567. vector @var{uvec} to @var{value}. The return value is not
  5568. specified.
  5569. @end deffn
  5570. c64vector->list
  5571. @c snarfed from ../libguile/srfi-4.i.c:107
  5572. @deffn {Scheme Procedure} c64vector->list uvec
  5573. @deffnx {C Function} scm_c64vector_to_list (uvec)
  5574. Convert the uniform numeric vector @var{uvec} to a list.
  5575. @end deffn
  5576. list->c64vector
  5577. @c snarfed from ../libguile/srfi-4.i.c:117
  5578. @deffn {Scheme Procedure} list->c64vector l
  5579. @deffnx {C Function} scm_list_to_c64vector (l)
  5580. Convert the list @var{l} to a numeric uniform vector.
  5581. @end deffn
  5582. any->c64vector
  5583. @c snarfed from ../libguile/srfi-4.i.c:128
  5584. @deffn {Scheme Procedure} any->c64vector obj
  5585. @deffnx {C Function} scm_any_to_c64vector (obj)
  5586. Convert @var{obj}, which can be a list, vector, or
  5587. uniform vector, to a numeric uniform vector of
  5588. type c64.
  5589. @end deffn
  5590. string-null?
  5591. @c snarfed from srfi-13.c:62
  5592. @deffn {Scheme Procedure} string-null? str
  5593. @deffnx {C Function} scm_string_null_p (str)
  5594. Return @code{#t} if @var{str}'s length is zero, and
  5595. @code{#f} otherwise.
  5596. @lisp
  5597. (string-null? "") @result{} #t
  5598. y @result{} "foo"
  5599. (string-null? y) @result{} #f
  5600. @end lisp
  5601. @end deffn
  5602. string-any-c-code
  5603. @c snarfed from srfi-13.c:94
  5604. @deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
  5605. @deffnx {C Function} scm_string_any (char_pred, s, start, end)
  5606. Check if @var{char_pred} is true for any character in string @var{s}.
  5607. @var{char_pred} can be a character to check for any equal to that, or
  5608. a character set (@pxref{Character Sets}) to check for any in that set,
  5609. or a predicate procedure to call.
  5610. For a procedure, calls @code{(@var{char_pred} c)} are made
  5611. successively on the characters from @var{start} to @var{end}. If
  5612. @var{char_pred} returns true (ie.@: non-@code{#f}), @code{string-any}
  5613. stops and that return value is the return from @code{string-any}. The
  5614. call on the last character (ie.@: at @math{@var{end}-1}), if that
  5615. point is reached, is a tail call.
  5616. If there are no characters in @var{s} (ie.@: @var{start} equals
  5617. @var{end}) then the return is @code{#f}.
  5618. @end deffn
  5619. string-every-c-code
  5620. @c snarfed from srfi-13.c:158
  5621. @deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
  5622. @deffnx {C Function} scm_string_every (char_pred, s, start, end)
  5623. Check if @var{char_pred} is true for every character in string
  5624. @var{s}.
  5625. @var{char_pred} can be a character to check for every character equal
  5626. to that, or a character set (@pxref{Character Sets}) to check for
  5627. every character being in that set, or a predicate procedure to call.
  5628. For a procedure, calls @code{(@var{char_pred} c)} are made
  5629. successively on the characters from @var{start} to @var{end}. If
  5630. @var{char_pred} returns @code{#f}, @code{string-every} stops and
  5631. returns @code{#f}. The call on the last character (ie.@: at
  5632. @math{@var{end}-1}), if that point is reached, is a tail call and the
  5633. return from that call is the return from @code{string-every}.
  5634. If there are no characters in @var{s} (ie.@: @var{start} equals
  5635. @var{end}) then the return is @code{#t}.
  5636. @end deffn
  5637. string-tabulate
  5638. @c snarfed from srfi-13.c:214
  5639. @deffn {Scheme Procedure} string-tabulate proc len
  5640. @deffnx {C Function} scm_string_tabulate (proc, len)
  5641. @var{proc} is an integer->char procedure. Construct a string
  5642. of size @var{len} by applying @var{proc} to each index to
  5643. produce the corresponding string element. The order in which
  5644. @var{proc} is applied to the indices is not specified.
  5645. @end deffn
  5646. string->list
  5647. @c snarfed from srfi-13.c:246
  5648. @deffn {Scheme Procedure} string->list str [start [end]]
  5649. @deffnx {C Function} scm_substring_to_list (str, start, end)
  5650. Convert the string @var{str} into a list of characters.
  5651. @end deffn
  5652. reverse-list->string
  5653. @c snarfed from srfi-13.c:285
  5654. @deffn {Scheme Procedure} reverse-list->string chrs
  5655. @deffnx {C Function} scm_reverse_list_to_string (chrs)
  5656. An efficient implementation of @code{(compose string->list
  5657. reverse)}:
  5658. @smalllisp
  5659. (reverse-list->string '(#\a #\B #\c)) @result{} "cBa"
  5660. @end smalllisp
  5661. @end deffn
  5662. string-join
  5663. @c snarfed from srfi-13.c:352
  5664. @deffn {Scheme Procedure} string-join ls [delimiter [grammar]]
  5665. @deffnx {C Function} scm_string_join (ls, delimiter, grammar)
  5666. Append the string in the string list @var{ls}, using the string
  5667. @var{delim} as a delimiter between the elements of @var{ls}.
  5668. @var{grammar} is a symbol which specifies how the delimiter is
  5669. placed between the strings, and defaults to the symbol
  5670. @code{infix}.
  5671. @table @code
  5672. @item infix
  5673. Insert the separator between list elements. An empty string
  5674. will produce an empty list.
  5675. @item string-infix
  5676. Like @code{infix}, but will raise an error if given the empty
  5677. list.
  5678. @item suffix
  5679. Insert the separator after every list element.
  5680. @item prefix
  5681. Insert the separator before each list element.
  5682. @end table
  5683. @end deffn
  5684. string-copy
  5685. @c snarfed from srfi-13.c:486
  5686. @deffn {Scheme Procedure} string-copy str [start [end]]
  5687. @deffnx {C Function} scm_srfi13_substring_copy (str, start, end)
  5688. Return a freshly allocated copy of the string @var{str}. If
  5689. given, @var{start} and @var{end} delimit the portion of
  5690. @var{str} which is copied.
  5691. @end deffn
  5692. string-copy!
  5693. @c snarfed from srfi-13.c:513
  5694. @deffn {Scheme Procedure} string-copy! target tstart s [start [end]]
  5695. @deffnx {C Function} scm_string_copy_x (target, tstart, s, start, end)
  5696. Copy the sequence of characters from index range [@var{start},
  5697. @var{end}) in string @var{s} to string @var{target}, beginning
  5698. at index @var{tstart}. The characters are copied left-to-right
  5699. or right-to-left as needed -- the copy is guaranteed to work,
  5700. even if @var{target} and @var{s} are the same string. It is an
  5701. error if the copy operation runs off the end of the target
  5702. string.
  5703. @end deffn
  5704. substring-move!
  5705. @c snarfed from srfi-13.c:543
  5706. @deffn {Scheme Procedure} substring-move! str1 start1 end1 str2 start2
  5707. @deffnx {C Function} scm_substring_move_x (str1, start1, end1, str2, start2)
  5708. Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}
  5709. into @var{str2} beginning at position @var{start2}.
  5710. @var{str1} and @var{str2} can be the same string.
  5711. @end deffn
  5712. string-take
  5713. @c snarfed from srfi-13.c:552
  5714. @deffn {Scheme Procedure} string-take s n
  5715. @deffnx {C Function} scm_string_take (s, n)
  5716. Return the @var{n} first characters of @var{s}.
  5717. @end deffn
  5718. string-drop
  5719. @c snarfed from srfi-13.c:562
  5720. @deffn {Scheme Procedure} string-drop s n
  5721. @deffnx {C Function} scm_string_drop (s, n)
  5722. Return all but the first @var{n} characters of @var{s}.
  5723. @end deffn
  5724. string-take-right
  5725. @c snarfed from srfi-13.c:572
  5726. @deffn {Scheme Procedure} string-take-right s n
  5727. @deffnx {C Function} scm_string_take_right (s, n)
  5728. Return the @var{n} last characters of @var{s}.
  5729. @end deffn
  5730. string-drop-right
  5731. @c snarfed from srfi-13.c:584
  5732. @deffn {Scheme Procedure} string-drop-right s n
  5733. @deffnx {C Function} scm_string_drop_right (s, n)
  5734. Return all but the last @var{n} characters of @var{s}.
  5735. @end deffn
  5736. string-pad
  5737. @c snarfed from srfi-13.c:599
  5738. @deffn {Scheme Procedure} string-pad s len [chr [start [end]]]
  5739. @deffnx {C Function} scm_string_pad (s, len, chr, start, end)
  5740. Take that characters from @var{start} to @var{end} from the
  5741. string @var{s} and return a new string, right-padded by the
  5742. character @var{chr} to length @var{len}. If the resulting
  5743. string is longer than @var{len}, it is truncated on the right.
  5744. @end deffn
  5745. string-pad-right
  5746. @c snarfed from srfi-13.c:639
  5747. @deffn {Scheme Procedure} string-pad-right s len [chr [start [end]]]
  5748. @deffnx {C Function} scm_string_pad_right (s, len, chr, start, end)
  5749. Take that characters from @var{start} to @var{end} from the
  5750. string @var{s} and return a new string, left-padded by the
  5751. character @var{chr} to length @var{len}. If the resulting
  5752. string is longer than @var{len}, it is truncated on the left.
  5753. @end deffn
  5754. string-trim
  5755. @c snarfed from srfi-13.c:692
  5756. @deffn {Scheme Procedure} string-trim s [char_pred [start [end]]]
  5757. @deffnx {C Function} scm_string_trim (s, char_pred, start, end)
  5758. Trim @var{s} by skipping over all characters on the left
  5759. that satisfy the parameter @var{char_pred}:
  5760. @itemize @bullet
  5761. @item
  5762. if it is the character @var{ch}, characters equal to
  5763. @var{ch} are trimmed,
  5764. @item
  5765. if it is a procedure @var{pred} characters that
  5766. satisfy @var{pred} are trimmed,
  5767. @item
  5768. if it is a character set, characters in that set are trimmed.
  5769. @end itemize
  5770. If called without a @var{char_pred} argument, all whitespace is
  5771. trimmed.
  5772. @end deffn
  5773. string-trim-right
  5774. @c snarfed from srfi-13.c:768
  5775. @deffn {Scheme Procedure} string-trim-right s [char_pred [start [end]]]
  5776. @deffnx {C Function} scm_string_trim_right (s, char_pred, start, end)
  5777. Trim @var{s} by skipping over all characters on the rightt
  5778. that satisfy the parameter @var{char_pred}:
  5779. @itemize @bullet
  5780. @item
  5781. if it is the character @var{ch}, characters equal to @var{ch}
  5782. are trimmed,
  5783. @item
  5784. if it is a procedure @var{pred} characters that satisfy
  5785. @var{pred} are trimmed,
  5786. @item
  5787. if it is a character sets, all characters in that set are
  5788. trimmed.
  5789. @end itemize
  5790. If called without a @var{char_pred} argument, all whitespace is
  5791. trimmed.
  5792. @end deffn
  5793. string-trim-both
  5794. @c snarfed from srfi-13.c:844
  5795. @deffn {Scheme Procedure} string-trim-both s [char_pred [start [end]]]
  5796. @deffnx {C Function} scm_string_trim_both (s, char_pred, start, end)
  5797. Trim @var{s} by skipping over all characters on both sides of
  5798. the string that satisfy the parameter @var{char_pred}:
  5799. @itemize @bullet
  5800. @item
  5801. if it is the character @var{ch}, characters equal to @var{ch}
  5802. are trimmed,
  5803. @item
  5804. if it is a procedure @var{pred} characters that satisfy
  5805. @var{pred} are trimmed,
  5806. @item
  5807. if it is a character set, the characters in the set are
  5808. trimmed.
  5809. @end itemize
  5810. If called without a @var{char_pred} argument, all whitespace is
  5811. trimmed.
  5812. @end deffn
  5813. string-fill!
  5814. @c snarfed from srfi-13.c:931
  5815. @deffn {Scheme Procedure} string-fill! str chr [start [end]]
  5816. @deffnx {C Function} scm_substring_fill_x (str, chr, start, end)
  5817. Stores @var{chr} in every element of the given @var{str} and
  5818. returns an unspecified value.
  5819. @end deffn
  5820. string-compare
  5821. @c snarfed from srfi-13.c:983
  5822. @deffn {Scheme Procedure} string-compare s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
  5823. @deffnx {C Function} scm_string_compare (s1, s2, proc_lt, proc_eq, proc_gt, start1, end1, start2, end2)
  5824. Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
  5825. mismatch index, depending upon whether @var{s1} is less than,
  5826. equal to, or greater than @var{s2}. The mismatch index is the
  5827. largest index @var{i} such that for every 0 <= @var{j} <
  5828. @var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
  5829. @var{i} is the first position that does not match.
  5830. @end deffn
  5831. string-compare-ci
  5832. @c snarfed from srfi-13.c:1037
  5833. @deffn {Scheme Procedure} string-compare-ci s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
  5834. @deffnx {C Function} scm_string_compare_ci (s1, s2, proc_lt, proc_eq, proc_gt, start1, end1, start2, end2)
  5835. Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
  5836. mismatch index, depending upon whether @var{s1} is less than,
  5837. equal to, or greater than @var{s2}. The mismatch index is the
  5838. largest index @var{i} such that for every 0 <= @var{j} <
  5839. @var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
  5840. @var{i} is the first position that does not match. The
  5841. character comparison is done case-insensitively.
  5842. @end deffn
  5843. string=
  5844. @c snarfed from srfi-13.c:1088
  5845. @deffn {Scheme Procedure} string= s1 s2 [start1 [end1 [start2 [end2]]]]
  5846. @deffnx {C Function} scm_string_eq (s1, s2, start1, end1, start2, end2)
  5847. Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
  5848. value otherwise.
  5849. @end deffn
  5850. string<>
  5851. @c snarfed from srfi-13.c:1127
  5852. @deffn {Scheme Procedure} string<> s1 s2 [start1 [end1 [start2 [end2]]]]
  5853. @deffnx {C Function} scm_string_neq (s1, s2, start1, end1, start2, end2)
  5854. Return @code{#f} if @var{s1} and @var{s2} are equal, a true
  5855. value otherwise.
  5856. @end deffn
  5857. string<
  5858. @c snarfed from srfi-13.c:1170
  5859. @deffn {Scheme Procedure} string< s1 s2 [start1 [end1 [start2 [end2]]]]
  5860. @deffnx {C Function} scm_string_lt (s1, s2, start1, end1, start2, end2)
  5861. Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
  5862. true value otherwise.
  5863. @end deffn
  5864. string>
  5865. @c snarfed from srfi-13.c:1213
  5866. @deffn {Scheme Procedure} string> s1 s2 [start1 [end1 [start2 [end2]]]]
  5867. @deffnx {C Function} scm_string_gt (s1, s2, start1, end1, start2, end2)
  5868. Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
  5869. true value otherwise.
  5870. @end deffn
  5871. string<=
  5872. @c snarfed from srfi-13.c:1256
  5873. @deffn {Scheme Procedure} string<= s1 s2 [start1 [end1 [start2 [end2]]]]
  5874. @deffnx {C Function} scm_string_le (s1, s2, start1, end1, start2, end2)
  5875. Return @code{#f} if @var{s1} is greater to @var{s2}, a true
  5876. value otherwise.
  5877. @end deffn
  5878. string>=
  5879. @c snarfed from srfi-13.c:1299
  5880. @deffn {Scheme Procedure} string>= s1 s2 [start1 [end1 [start2 [end2]]]]
  5881. @deffnx {C Function} scm_string_ge (s1, s2, start1, end1, start2, end2)
  5882. Return @code{#f} if @var{s1} is less to @var{s2}, a true value
  5883. otherwise.
  5884. @end deffn
  5885. string-ci=
  5886. @c snarfed from srfi-13.c:1343
  5887. @deffn {Scheme Procedure} string-ci= s1 s2 [start1 [end1 [start2 [end2]]]]
  5888. @deffnx {C Function} scm_string_ci_eq (s1, s2, start1, end1, start2, end2)
  5889. Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
  5890. value otherwise. The character comparison is done
  5891. case-insensitively.
  5892. @end deffn
  5893. string-ci<>
  5894. @c snarfed from srfi-13.c:1387
  5895. @deffn {Scheme Procedure} string-ci<> s1 s2 [start1 [end1 [start2 [end2]]]]
  5896. @deffnx {C Function} scm_string_ci_neq (s1, s2, start1, end1, start2, end2)
  5897. Return @code{#f} if @var{s1} and @var{s2} are equal, a true
  5898. value otherwise. The character comparison is done
  5899. case-insensitively.
  5900. @end deffn
  5901. string-ci<
  5902. @c snarfed from srfi-13.c:1431
  5903. @deffn {Scheme Procedure} string-ci< s1 s2 [start1 [end1 [start2 [end2]]]]
  5904. @deffnx {C Function} scm_string_ci_lt (s1, s2, start1, end1, start2, end2)
  5905. Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
  5906. true value otherwise. The character comparison is done
  5907. case-insensitively.
  5908. @end deffn
  5909. string-ci>
  5910. @c snarfed from srfi-13.c:1475
  5911. @deffn {Scheme Procedure} string-ci> s1 s2 [start1 [end1 [start2 [end2]]]]
  5912. @deffnx {C Function} scm_string_ci_gt (s1, s2, start1, end1, start2, end2)
  5913. Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
  5914. true value otherwise. The character comparison is done
  5915. case-insensitively.
  5916. @end deffn
  5917. string-ci<=
  5918. @c snarfed from srfi-13.c:1519
  5919. @deffn {Scheme Procedure} string-ci<= s1 s2 [start1 [end1 [start2 [end2]]]]
  5920. @deffnx {C Function} scm_string_ci_le (s1, s2, start1, end1, start2, end2)
  5921. Return @code{#f} if @var{s1} is greater to @var{s2}, a true
  5922. value otherwise. The character comparison is done
  5923. case-insensitively.
  5924. @end deffn
  5925. string-ci>=
  5926. @c snarfed from srfi-13.c:1563
  5927. @deffn {Scheme Procedure} string-ci>= s1 s2 [start1 [end1 [start2 [end2]]]]
  5928. @deffnx {C Function} scm_string_ci_ge (s1, s2, start1, end1, start2, end2)
  5929. Return @code{#f} if @var{s1} is less to @var{s2}, a true value
  5930. otherwise. The character comparison is done
  5931. case-insensitively.
  5932. @end deffn
  5933. string-hash
  5934. @c snarfed from srfi-13.c:1608
  5935. @deffn {Scheme Procedure} string-hash s [bound [start [end]]]
  5936. @deffnx {C Function} scm_substring_hash (s, bound, start, end)
  5937. Compute a hash value for @var{S}. the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
  5938. @end deffn
  5939. string-hash-ci
  5940. @c snarfed from srfi-13.c:1625
  5941. @deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
  5942. @deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
  5943. Compute a hash value for @var{S}. the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
  5944. @end deffn
  5945. string-prefix-length
  5946. @c snarfed from srfi-13.c:1637
  5947. @deffn {Scheme Procedure} string-prefix-length s1 s2 [start1 [end1 [start2 [end2]]]]
  5948. @deffnx {C Function} scm_string_prefix_length (s1, s2, start1, end1, start2, end2)
  5949. Return the length of the longest common prefix of the two
  5950. strings.
  5951. @end deffn
  5952. string-prefix-length-ci
  5953. @c snarfed from srfi-13.c:1669
  5954. @deffn {Scheme Procedure} string-prefix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
  5955. @deffnx {C Function} scm_string_prefix_length_ci (s1, s2, start1, end1, start2, end2)
  5956. Return the length of the longest common prefix of the two
  5957. strings, ignoring character case.
  5958. @end deffn
  5959. string-suffix-length
  5960. @c snarfed from srfi-13.c:1701
  5961. @deffn {Scheme Procedure} string-suffix-length s1 s2 [start1 [end1 [start2 [end2]]]]
  5962. @deffnx {C Function} scm_string_suffix_length (s1, s2, start1, end1, start2, end2)
  5963. Return the length of the longest common suffix of the two
  5964. strings.
  5965. @end deffn
  5966. string-suffix-length-ci
  5967. @c snarfed from srfi-13.c:1733
  5968. @deffn {Scheme Procedure} string-suffix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
  5969. @deffnx {C Function} scm_string_suffix_length_ci (s1, s2, start1, end1, start2, end2)
  5970. Return the length of the longest common suffix of the two
  5971. strings, ignoring character case.
  5972. @end deffn
  5973. string-prefix?
  5974. @c snarfed from srfi-13.c:1764
  5975. @deffn {Scheme Procedure} string-prefix? s1 s2 [start1 [end1 [start2 [end2]]]]
  5976. @deffnx {C Function} scm_string_prefix_p (s1, s2, start1, end1, start2, end2)
  5977. Is @var{s1} a prefix of @var{s2}?
  5978. @end deffn
  5979. string-prefix-ci?
  5980. @c snarfed from srfi-13.c:1796
  5981. @deffn {Scheme Procedure} string-prefix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
  5982. @deffnx {C Function} scm_string_prefix_ci_p (s1, s2, start1, end1, start2, end2)
  5983. Is @var{s1} a prefix of @var{s2}, ignoring character case?
  5984. @end deffn
  5985. string-suffix?
  5986. @c snarfed from srfi-13.c:1828
  5987. @deffn {Scheme Procedure} string-suffix? s1 s2 [start1 [end1 [start2 [end2]]]]
  5988. @deffnx {C Function} scm_string_suffix_p (s1, s2, start1, end1, start2, end2)
  5989. Is @var{s1} a suffix of @var{s2}?
  5990. @end deffn
  5991. string-suffix-ci?
  5992. @c snarfed from srfi-13.c:1860
  5993. @deffn {Scheme Procedure} string-suffix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
  5994. @deffnx {C Function} scm_string_suffix_ci_p (s1, s2, start1, end1, start2, end2)
  5995. Is @var{s1} a suffix of @var{s2}, ignoring character case?
  5996. @end deffn
  5997. string-index
  5998. @c snarfed from srfi-13.c:1904
  5999. @deffn {Scheme Procedure} string-index s char_pred [start [end]]
  6000. @deffnx {C Function} scm_string_index (s, char_pred, start, end)
  6001. Search through the string @var{s} from left to right, returning
  6002. the index of the first occurence of a character which
  6003. @itemize @bullet
  6004. @item
  6005. equals @var{char_pred}, if it is character,
  6006. @item
  6007. satisifies the predicate @var{char_pred}, if it is a procedure,
  6008. @item
  6009. is in the set @var{char_pred}, if it is a character set.
  6010. @end itemize
  6011. @end deffn
  6012. string-index-right
  6013. @c snarfed from srfi-13.c:1969
  6014. @deffn {Scheme Procedure} string-index-right s char_pred [start [end]]
  6015. @deffnx {C Function} scm_string_index_right (s, char_pred, start, end)
  6016. Search through the string @var{s} from right to left, returning
  6017. the index of the last occurence of a character which
  6018. @itemize @bullet
  6019. @item
  6020. equals @var{char_pred}, if it is character,
  6021. @item
  6022. satisifies the predicate @var{char_pred}, if it is a procedure,
  6023. @item
  6024. is in the set if @var{char_pred} is a character set.
  6025. @end itemize
  6026. @end deffn
  6027. string-rindex
  6028. @c snarfed from srfi-13.c:2034
  6029. @deffn {Scheme Procedure} string-rindex s char_pred [start [end]]
  6030. @deffnx {C Function} scm_string_rindex (s, char_pred, start, end)
  6031. Search through the string @var{s} from right to left, returning
  6032. the index of the last occurence of a character which
  6033. @itemize @bullet
  6034. @item
  6035. equals @var{char_pred}, if it is character,
  6036. @item
  6037. satisifies the predicate @var{char_pred}, if it is a procedure,
  6038. @item
  6039. is in the set if @var{char_pred} is a character set.
  6040. @end itemize
  6041. @end deffn
  6042. string-skip
  6043. @c snarfed from srfi-13.c:2056
  6044. @deffn {Scheme Procedure} string-skip s char_pred [start [end]]
  6045. @deffnx {C Function} scm_string_skip (s, char_pred, start, end)
  6046. Search through the string @var{s} from left to right, returning
  6047. the index of the first occurence of a character which
  6048. @itemize @bullet
  6049. @item
  6050. does not equal @var{char_pred}, if it is character,
  6051. @item
  6052. does not satisify the predicate @var{char_pred}, if it is a
  6053. procedure,
  6054. @item
  6055. is not in the set if @var{char_pred} is a character set.
  6056. @end itemize
  6057. @end deffn
  6058. string-skip-right
  6059. @c snarfed from srfi-13.c:2123
  6060. @deffn {Scheme Procedure} string-skip-right s char_pred [start [end]]
  6061. @deffnx {C Function} scm_string_skip_right (s, char_pred, start, end)
  6062. Search through the string @var{s} from right to left, returning
  6063. the index of the last occurence of a character which
  6064. @itemize @bullet
  6065. @item
  6066. does not equal @var{char_pred}, if it is character,
  6067. @item
  6068. does not satisfy the predicate @var{char_pred}, if it is a
  6069. procedure,
  6070. @item
  6071. is not in the set if @var{char_pred} is a character set.
  6072. @end itemize
  6073. @end deffn
  6074. string-count
  6075. @c snarfed from srfi-13.c:2190
  6076. @deffn {Scheme Procedure} string-count s char_pred [start [end]]
  6077. @deffnx {C Function} scm_string_count (s, char_pred, start, end)
  6078. Return the count of the number of characters in the string
  6079. @var{s} which
  6080. @itemize @bullet
  6081. @item
  6082. equals @var{char_pred}, if it is character,
  6083. @item
  6084. satisifies the predicate @var{char_pred}, if it is a procedure.
  6085. @item
  6086. is in the set @var{char_pred}, if it is a character set.
  6087. @end itemize
  6088. @end deffn
  6089. string-contains
  6090. @c snarfed from srfi-13.c:2247
  6091. @deffn {Scheme Procedure} string-contains s1 s2 [start1 [end1 [start2 [end2]]]]
  6092. @deffnx {C Function} scm_string_contains (s1, s2, start1, end1, start2, end2)
  6093. Does string @var{s1} contain string @var{s2}? Return the index
  6094. in @var{s1} where @var{s2} occurs as a substring, or false.
  6095. The optional start/end indices restrict the operation to the
  6096. indicated substrings.
  6097. @end deffn
  6098. string-contains-ci
  6099. @c snarfed from srfi-13.c:2294
  6100. @deffn {Scheme Procedure} string-contains-ci s1 s2 [start1 [end1 [start2 [end2]]]]
  6101. @deffnx {C Function} scm_string_contains_ci (s1, s2, start1, end1, start2, end2)
  6102. Does string @var{s1} contain string @var{s2}? Return the index
  6103. in @var{s1} where @var{s2} occurs as a substring, or false.
  6104. The optional start/end indices restrict the operation to the
  6105. indicated substrings. Character comparison is done
  6106. case-insensitively.
  6107. @end deffn
  6108. string-upcase!
  6109. @c snarfed from srfi-13.c:2359
  6110. @deffn {Scheme Procedure} string-upcase! str [start [end]]
  6111. @deffnx {C Function} scm_substring_upcase_x (str, start, end)
  6112. Destructively upcase every character in @code{str}.
  6113. @lisp
  6114. (string-upcase! y)
  6115. @result{} "ARRDEFG"
  6116. y
  6117. @result{} "ARRDEFG"
  6118. @end lisp
  6119. @end deffn
  6120. string-upcase
  6121. @c snarfed from srfi-13.c:2380
  6122. @deffn {Scheme Procedure} string-upcase str [start [end]]
  6123. @deffnx {C Function} scm_substring_upcase (str, start, end)
  6124. Upcase every character in @code{str}.
  6125. @end deffn
  6126. string-downcase!
  6127. @c snarfed from srfi-13.c:2427
  6128. @deffn {Scheme Procedure} string-downcase! str [start [end]]
  6129. @deffnx {C Function} scm_substring_downcase_x (str, start, end)
  6130. Destructively downcase every character in @var{str}.
  6131. @lisp
  6132. y
  6133. @result{} "ARRDEFG"
  6134. (string-downcase! y)
  6135. @result{} "arrdefg"
  6136. y
  6137. @result{} "arrdefg"
  6138. @end lisp
  6139. @end deffn
  6140. string-downcase
  6141. @c snarfed from srfi-13.c:2448
  6142. @deffn {Scheme Procedure} string-downcase str [start [end]]
  6143. @deffnx {C Function} scm_substring_downcase (str, start, end)
  6144. Downcase every character in @var{str}.
  6145. @end deffn
  6146. string-titlecase!
  6147. @c snarfed from srfi-13.c:2504
  6148. @deffn {Scheme Procedure} string-titlecase! str [start [end]]
  6149. @deffnx {C Function} scm_string_titlecase_x (str, start, end)
  6150. Destructively titlecase every first character in a word in
  6151. @var{str}.
  6152. @end deffn
  6153. string-titlecase
  6154. @c snarfed from srfi-13.c:2520
  6155. @deffn {Scheme Procedure} string-titlecase str [start [end]]
  6156. @deffnx {C Function} scm_string_titlecase (str, start, end)
  6157. Titlecase every first character in a word in @var{str}.
  6158. @end deffn
  6159. string-capitalize!
  6160. @c snarfed from srfi-13.c:2542
  6161. @deffn {Scheme Procedure} string-capitalize! str
  6162. @deffnx {C Function} scm_string_capitalize_x (str)
  6163. Upcase the first character of every word in @var{str}
  6164. destructively and return @var{str}.
  6165. @lisp
  6166. y @result{} "hello world"
  6167. (string-capitalize! y) @result{} "Hello World"
  6168. y @result{} "Hello World"
  6169. @end lisp
  6170. @end deffn
  6171. string-capitalize
  6172. @c snarfed from srfi-13.c:2554
  6173. @deffn {Scheme Procedure} string-capitalize str
  6174. @deffnx {C Function} scm_string_capitalize (str)
  6175. Return a freshly allocated string with the characters in
  6176. @var{str}, where the first character of every word is
  6177. capitalized.
  6178. @end deffn
  6179. string-reverse
  6180. @c snarfed from srfi-13.c:2588
  6181. @deffn {Scheme Procedure} string-reverse str [start [end]]
  6182. @deffnx {C Function} scm_string_reverse (str, start, end)
  6183. Reverse the string @var{str}. The optional arguments
  6184. @var{start} and @var{end} delimit the region of @var{str} to
  6185. operate on.
  6186. @end deffn
  6187. string-reverse!
  6188. @c snarfed from srfi-13.c:2613
  6189. @deffn {Scheme Procedure} string-reverse! str [start [end]]
  6190. @deffnx {C Function} scm_string_reverse_x (str, start, end)
  6191. Reverse the string @var{str} in-place. The optional arguments
  6192. @var{start} and @var{end} delimit the region of @var{str} to
  6193. operate on. The return value is unspecified.
  6194. @end deffn
  6195. string-append/shared
  6196. @c snarfed from srfi-13.c:2635
  6197. @deffn {Scheme Procedure} string-append/shared . ls
  6198. @deffnx {C Function} scm_string_append_shared (ls)
  6199. Like @code{string-append}, but the result may share memory
  6200. with the argument strings.
  6201. @end deffn
  6202. string-concatenate
  6203. @c snarfed from srfi-13.c:2656
  6204. @deffn {Scheme Procedure} string-concatenate ls
  6205. @deffnx {C Function} scm_string_concatenate (ls)
  6206. Append the elements of @var{ls} (which must be strings)
  6207. together into a single string. Guaranteed to return a freshly
  6208. allocated string.
  6209. @end deffn
  6210. string-concatenate-reverse
  6211. @c snarfed from srfi-13.c:2678
  6212. @deffn {Scheme Procedure} string-concatenate-reverse ls [final_string [end]]
  6213. @deffnx {C Function} scm_string_concatenate_reverse (ls, final_string, end)
  6214. Without optional arguments, this procedure is equivalent to
  6215. @smalllisp
  6216. (string-concatenate (reverse ls))
  6217. @end smalllisp
  6218. If the optional argument @var{final_string} is specified, it is
  6219. consed onto the beginning to @var{ls} before performing the
  6220. list-reverse and string-concatenate operations. If @var{end}
  6221. is given, only the characters of @var{final_string} up to index
  6222. @var{end} are used.
  6223. Guaranteed to return a freshly allocated string.
  6224. @end deffn
  6225. string-concatenate/shared
  6226. @c snarfed from srfi-13.c:2695
  6227. @deffn {Scheme Procedure} string-concatenate/shared ls
  6228. @deffnx {C Function} scm_string_concatenate_shared (ls)
  6229. Like @code{string-concatenate}, but the result may share memory
  6230. with the strings in the list @var{ls}.
  6231. @end deffn
  6232. string-concatenate-reverse/shared
  6233. @c snarfed from srfi-13.c:2706
  6234. @deffn {Scheme Procedure} string-concatenate-reverse/shared ls [final_string [end]]
  6235. @deffnx {C Function} scm_string_concatenate_reverse_shared (ls, final_string, end)
  6236. Like @code{string-concatenate-reverse}, but the result may
  6237. share memory with the the strings in the @var{ls} arguments.
  6238. @end deffn
  6239. string-map
  6240. @c snarfed from srfi-13.c:2719
  6241. @deffn {Scheme Procedure} string-map proc s [start [end]]
  6242. @deffnx {C Function} scm_string_map (proc, s, start, end)
  6243. @var{proc} is a char->char procedure, it is mapped over
  6244. @var{s}. The order in which the procedure is applied to the
  6245. string elements is not specified.
  6246. @end deffn
  6247. string-map!
  6248. @c snarfed from srfi-13.c:2749
  6249. @deffn {Scheme Procedure} string-map! proc s [start [end]]
  6250. @deffnx {C Function} scm_string_map_x (proc, s, start, end)
  6251. @var{proc} is a char->char procedure, it is mapped over
  6252. @var{s}. The order in which the procedure is applied to the
  6253. string elements is not specified. The string @var{s} is
  6254. modified in-place, the return value is not specified.
  6255. @end deffn
  6256. string-fold
  6257. @c snarfed from srfi-13.c:2776
  6258. @deffn {Scheme Procedure} string-fold kons knil s [start [end]]
  6259. @deffnx {C Function} scm_string_fold (kons, knil, s, start, end)
  6260. Fold @var{kons} over the characters of @var{s}, with @var{knil}
  6261. as the terminating element, from left to right. @var{kons}
  6262. must expect two arguments: The actual character and the last
  6263. result of @var{kons}' application.
  6264. @end deffn
  6265. string-fold-right
  6266. @c snarfed from srfi-13.c:2807
  6267. @deffn {Scheme Procedure} string-fold-right kons knil s [start [end]]
  6268. @deffnx {C Function} scm_string_fold_right (kons, knil, s, start, end)
  6269. Fold @var{kons} over the characters of @var{s}, with @var{knil}
  6270. as the terminating element, from right to left. @var{kons}
  6271. must expect two arguments: The actual character and the last
  6272. result of @var{kons}' application.
  6273. @end deffn
  6274. string-unfold
  6275. @c snarfed from srfi-13.c:2852
  6276. @deffn {Scheme Procedure} string-unfold p f g seed [base [make_final]]
  6277. @deffnx {C Function} scm_string_unfold (p, f, g, seed, base, make_final)
  6278. @itemize @bullet
  6279. @item @var{g} is used to generate a series of @emph{seed}
  6280. values from the initial @var{seed}: @var{seed}, (@var{g}
  6281. @var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
  6282. @dots{}
  6283. @item @var{p} tells us when to stop -- when it returns true
  6284. when applied to one of these seed values.
  6285. @item @var{f} maps each seed value to the corresponding
  6286. character in the result string. These chars are assembled
  6287. into the string in a left-to-right order.
  6288. @item @var{base} is the optional initial/leftmost portion
  6289. of the constructed string; it default to the empty
  6290. string.
  6291. @item @var{make_final} is applied to the terminal seed
  6292. value (on which @var{p} returns true) to produce
  6293. the final/rightmost portion of the constructed string.
  6294. It defaults to @code{(lambda (x) )}.
  6295. @end itemize
  6296. @end deffn
  6297. string-unfold-right
  6298. @c snarfed from srfi-13.c:2915
  6299. @deffn {Scheme Procedure} string-unfold-right p f g seed [base [make_final]]
  6300. @deffnx {C Function} scm_string_unfold_right (p, f, g, seed, base, make_final)
  6301. @itemize @bullet
  6302. @item @var{g} is used to generate a series of @emph{seed}
  6303. values from the initial @var{seed}: @var{seed}, (@var{g}
  6304. @var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
  6305. @dots{}
  6306. @item @var{p} tells us when to stop -- when it returns true
  6307. when applied to one of these seed values.
  6308. @item @var{f} maps each seed value to the corresponding
  6309. character in the result string. These chars are assembled
  6310. into the string in a right-to-left order.
  6311. @item @var{base} is the optional initial/rightmost portion
  6312. of the constructed string; it default to the empty
  6313. string.
  6314. @item @var{make_final} is applied to the terminal seed
  6315. value (on which @var{p} returns true) to produce
  6316. the final/leftmost portion of the constructed string.
  6317. It defaults to @code{(lambda (x) )}.
  6318. @end itemize
  6319. @end deffn
  6320. string-for-each
  6321. @c snarfed from srfi-13.c:2962
  6322. @deffn {Scheme Procedure} string-for-each proc s [start [end]]
  6323. @deffnx {C Function} scm_string_for_each (proc, s, start, end)
  6324. @var{proc} is mapped over @var{s} in left-to-right order. The
  6325. return value is not specified.
  6326. @end deffn
  6327. string-for-each-index
  6328. @c snarfed from srfi-13.c:2988
  6329. @deffn {Scheme Procedure} string-for-each-index proc s [start [end]]
  6330. @deffnx {C Function} scm_string_for_each_index (proc, s, start, end)
  6331. @var{proc} is mapped over @var{s} in left-to-right order. The
  6332. return value is not specified.
  6333. @end deffn
  6334. xsubstring
  6335. @c snarfed from srfi-13.c:3020
  6336. @deffn {Scheme Procedure} xsubstring s from [to [start [end]]]
  6337. @deffnx {C Function} scm_xsubstring (s, from, to, start, end)
  6338. This is the @emph{extended substring} procedure that implements
  6339. replicated copying of a substring of some string.
  6340. @var{s} is a string, @var{start} and @var{end} are optional
  6341. arguments that demarcate a substring of @var{s}, defaulting to
  6342. 0 and the length of @var{s}. Replicate this substring up and
  6343. down index space, in both the positive and negative directions.
  6344. @code{xsubstring} returns the substring of this string
  6345. beginning at index @var{from}, and ending at @var{to}, which
  6346. defaults to @var{from} + (@var{end} - @var{start}).
  6347. @end deffn
  6348. string-xcopy!
  6349. @c snarfed from srfi-13.c:3067
  6350. @deffn {Scheme Procedure} string-xcopy! target tstart s sfrom [sto [start [end]]]
  6351. @deffnx {C Function} scm_string_xcopy_x (target, tstart, s, sfrom, sto, start, end)
  6352. Exactly the same as @code{xsubstring}, but the extracted text
  6353. is written into the string @var{target} starting at index
  6354. @var{tstart}. The operation is not defined if @code{(eq?
  6355. @var{target} @var{s})} or these arguments share storage -- you
  6356. cannot copy a string on top of itself.
  6357. @end deffn
  6358. string-replace
  6359. @c snarfed from srfi-13.c:3117
  6360. @deffn {Scheme Procedure} string-replace s1 s2 [start1 [end1 [start2 [end2]]]]
  6361. @deffnx {C Function} scm_string_replace (s1, s2, start1, end1, start2, end2)
  6362. Return the string @var{s1}, but with the characters
  6363. @var{start1} @dots{} @var{end1} replaced by the characters
  6364. @var{start2} @dots{} @var{end2} from @var{s2}.
  6365. @end deffn
  6366. string-tokenize
  6367. @c snarfed from srfi-13.c:3154
  6368. @deffn {Scheme Procedure} string-tokenize s [token_set [start [end]]]
  6369. @deffnx {C Function} scm_string_tokenize (s, token_set, start, end)
  6370. Split the string @var{s} into a list of substrings, where each
  6371. substring is a maximal non-empty contiguous sequence of
  6372. characters from the character set @var{token_set}, which
  6373. defaults to @code{char-set:graphic}.
  6374. If @var{start} or @var{end} indices are provided, they restrict
  6375. @code{string-tokenize} to operating on the indicated substring
  6376. of @var{s}.
  6377. @end deffn
  6378. string-split
  6379. @c snarfed from srfi-13.c:3220
  6380. @deffn {Scheme Procedure} string-split str chr
  6381. @deffnx {C Function} scm_string_split (str, chr)
  6382. Split the string @var{str} into the a list of the substrings delimited
  6383. by appearances of the character @var{chr}. Note that an empty substring
  6384. between separator characters will result in an empty string in the
  6385. result list.
  6386. @lisp
  6387. (string-split "root:x:0:0:root:/root:/bin/bash" #\:)
  6388. @result{}
  6389. ("root" "x" "0" "0" "root" "/root" "/bin/bash")
  6390. (string-split "::" #\:)
  6391. @result{}
  6392. ("" "" "")
  6393. (string-split "" #\:)
  6394. @result{}
  6395. ("")
  6396. @end lisp
  6397. @end deffn
  6398. string-filter
  6399. @c snarfed from srfi-13.c:3258
  6400. @deffn {Scheme Procedure} string-filter s char_pred [start [end]]
  6401. @deffnx {C Function} scm_string_filter (s, char_pred, start, end)
  6402. Filter the string @var{s}, retaining only those characters that
  6403. satisfy the @var{char_pred} argument. If the argument is a
  6404. procedure, it is applied to each character as a predicate, if
  6405. it is a character, it is tested for equality and if it is a
  6406. character set, it is tested for membership.
  6407. @end deffn
  6408. string-delete
  6409. @c snarfed from srfi-13.c:3330
  6410. @deffn {Scheme Procedure} string-delete s char_pred [start [end]]
  6411. @deffnx {C Function} scm_string_delete (s, char_pred, start, end)
  6412. Filter the string @var{s}, retaining only those characters that
  6413. do not satisfy the @var{char_pred} argument. If the argument
  6414. is a procedure, it is applied to each character as a predicate,
  6415. if it is a character, it is tested for equality and if it is a
  6416. character set, it is tested for membership.
  6417. @end deffn
  6418. char-set?
  6419. @c snarfed from srfi-14.c:85
  6420. @deffn {Scheme Procedure} char-set? obj
  6421. @deffnx {C Function} scm_char_set_p (obj)
  6422. Return @code{#t} if @var{obj} is a character set, @code{#f}
  6423. otherwise.
  6424. @end deffn
  6425. char-set=
  6426. @c snarfed from srfi-14.c:95
  6427. @deffn {Scheme Procedure} char-set= . char_sets
  6428. @deffnx {C Function} scm_char_set_eq (char_sets)
  6429. Return @code{#t} if all given character sets are equal.
  6430. @end deffn
  6431. char-set<=
  6432. @c snarfed from srfi-14.c:125
  6433. @deffn {Scheme Procedure} char-set<= . char_sets
  6434. @deffnx {C Function} scm_char_set_leq (char_sets)
  6435. Return @code{#t} if every character set @var{cs}i is a subset
  6436. of character set @var{cs}i+1.
  6437. @end deffn
  6438. char-set-hash
  6439. @c snarfed from srfi-14.c:163
  6440. @deffn {Scheme Procedure} char-set-hash cs [bound]
  6441. @deffnx {C Function} scm_char_set_hash (cs, bound)
  6442. Compute a hash value for the character set @var{cs}. If
  6443. @var{bound} is given and non-zero, it restricts the
  6444. returned value to the range 0 @dots{} @var{bound - 1}.
  6445. @end deffn
  6446. char-set-cursor
  6447. @c snarfed from srfi-14.c:196
  6448. @deffn {Scheme Procedure} char-set-cursor cs
  6449. @deffnx {C Function} scm_char_set_cursor (cs)
  6450. Return a cursor into the character set @var{cs}.
  6451. @end deffn
  6452. char-set-ref
  6453. @c snarfed from srfi-14.c:216
  6454. @deffn {Scheme Procedure} char-set-ref cs cursor
  6455. @deffnx {C Function} scm_char_set_ref (cs, cursor)
  6456. Return the character at the current cursor position
  6457. @var{cursor} in the character set @var{cs}. It is an error to
  6458. pass a cursor for which @code{end-of-char-set?} returns true.
  6459. @end deffn
  6460. char-set-cursor-next
  6461. @c snarfed from srfi-14.c:233
  6462. @deffn {Scheme Procedure} char-set-cursor-next cs cursor
  6463. @deffnx {C Function} scm_char_set_cursor_next (cs, cursor)
  6464. Advance the character set cursor @var{cursor} to the next
  6465. character in the character set @var{cs}. It is an error if the
  6466. cursor given satisfies @code{end-of-char-set?}.
  6467. @end deffn
  6468. end-of-char-set?
  6469. @c snarfed from srfi-14.c:254
  6470. @deffn {Scheme Procedure} end-of-char-set? cursor
  6471. @deffnx {C Function} scm_end_of_char_set_p (cursor)
  6472. Return @code{#t} if @var{cursor} has reached the end of a
  6473. character set, @code{#f} otherwise.
  6474. @end deffn
  6475. char-set-fold
  6476. @c snarfed from srfi-14.c:266
  6477. @deffn {Scheme Procedure} char-set-fold kons knil cs
  6478. @deffnx {C Function} scm_char_set_fold (kons, knil, cs)
  6479. Fold the procedure @var{kons} over the character set @var{cs},
  6480. initializing it with @var{knil}.
  6481. @end deffn
  6482. char-set-unfold
  6483. @c snarfed from srfi-14.c:296
  6484. @deffn {Scheme Procedure} char-set-unfold p f g seed [base_cs]
  6485. @deffnx {C Function} scm_char_set_unfold (p, f, g, seed, base_cs)
  6486. This is a fundamental constructor for character sets.
  6487. @itemize @bullet
  6488. @item @var{g} is used to generate a series of ``seed'' values
  6489. from the initial seed: @var{seed}, (@var{g} @var{seed}),
  6490. (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
  6491. @item @var{p} tells us when to stop -- when it returns true
  6492. when applied to one of the seed values.
  6493. @item @var{f} maps each seed value to a character. These
  6494. characters are added to the base character set @var{base_cs} to
  6495. form the result; @var{base_cs} defaults to the empty set.
  6496. @end itemize
  6497. @end deffn
  6498. char-set-unfold!
  6499. @c snarfed from srfi-14.c:340
  6500. @deffn {Scheme Procedure} char-set-unfold! p f g seed base_cs
  6501. @deffnx {C Function} scm_char_set_unfold_x (p, f, g, seed, base_cs)
  6502. This is a fundamental constructor for character sets.
  6503. @itemize @bullet
  6504. @item @var{g} is used to generate a series of ``seed'' values
  6505. from the initial seed: @var{seed}, (@var{g} @var{seed}),
  6506. (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
  6507. @item @var{p} tells us when to stop -- when it returns true
  6508. when applied to one of the seed values.
  6509. @item @var{f} maps each seed value to a character. These
  6510. characters are added to the base character set @var{base_cs} to
  6511. form the result; @var{base_cs} defaults to the empty set.
  6512. @end itemize
  6513. @end deffn
  6514. char-set-for-each
  6515. @c snarfed from srfi-14.c:369
  6516. @deffn {Scheme Procedure} char-set-for-each proc cs
  6517. @deffnx {C Function} scm_char_set_for_each (proc, cs)
  6518. Apply @var{proc} to every character in the character set
  6519. @var{cs}. The return value is not specified.
  6520. @end deffn
  6521. char-set-map
  6522. @c snarfed from srfi-14.c:388
  6523. @deffn {Scheme Procedure} char-set-map proc cs
  6524. @deffnx {C Function} scm_char_set_map (proc, cs)
  6525. Map the procedure @var{proc} over every character in @var{cs}.
  6526. @var{proc} must be a character -> character procedure.
  6527. @end deffn
  6528. char-set-copy
  6529. @c snarfed from srfi-14.c:414
  6530. @deffn {Scheme Procedure} char-set-copy cs
  6531. @deffnx {C Function} scm_char_set_copy (cs)
  6532. Return a newly allocated character set containing all
  6533. characters in @var{cs}.
  6534. @end deffn
  6535. char-set
  6536. @c snarfed from srfi-14.c:434
  6537. @deffn {Scheme Procedure} char-set . rest
  6538. @deffnx {C Function} scm_char_set (rest)
  6539. Return a character set containing all given characters.
  6540. @end deffn
  6541. list->char-set
  6542. @c snarfed from srfi-14.c:462
  6543. @deffn {Scheme Procedure} list->char-set list [base_cs]
  6544. @deffnx {C Function} scm_list_to_char_set (list, base_cs)
  6545. Convert the character list @var{list} to a character set. If
  6546. the character set @var{base_cs} is given, the character in this
  6547. set are also included in the result.
  6548. @end deffn
  6549. list->char-set!
  6550. @c snarfed from srfi-14.c:496
  6551. @deffn {Scheme Procedure} list->char-set! list base_cs
  6552. @deffnx {C Function} scm_list_to_char_set_x (list, base_cs)
  6553. Convert the character list @var{list} to a character set. The
  6554. characters are added to @var{base_cs} and @var{base_cs} is
  6555. returned.
  6556. @end deffn
  6557. string->char-set
  6558. @c snarfed from srfi-14.c:523
  6559. @deffn {Scheme Procedure} string->char-set str [base_cs]
  6560. @deffnx {C Function} scm_string_to_char_set (str, base_cs)
  6561. Convert the string @var{str} to a character set. If the
  6562. character set @var{base_cs} is given, the characters in this
  6563. set are also included in the result.
  6564. @end deffn
  6565. string->char-set!
  6566. @c snarfed from srfi-14.c:557
  6567. @deffn {Scheme Procedure} string->char-set! str base_cs
  6568. @deffnx {C Function} scm_string_to_char_set_x (str, base_cs)
  6569. Convert the string @var{str} to a character set. The
  6570. characters from the string are added to @var{base_cs}, and
  6571. @var{base_cs} is returned.
  6572. @end deffn
  6573. char-set-filter
  6574. @c snarfed from srfi-14.c:584
  6575. @deffn {Scheme Procedure} char-set-filter pred cs [base_cs]
  6576. @deffnx {C Function} scm_char_set_filter (pred, cs, base_cs)
  6577. Return a character set containing every character from @var{cs}
  6578. so that it satisfies @var{pred}. If provided, the characters
  6579. from @var{base_cs} are added to the result.
  6580. @end deffn
  6581. char-set-filter!
  6582. @c snarfed from srfi-14.c:620
  6583. @deffn {Scheme Procedure} char-set-filter! pred cs base_cs
  6584. @deffnx {C Function} scm_char_set_filter_x (pred, cs, base_cs)
  6585. Return a character set containing every character from @var{cs}
  6586. so that it satisfies @var{pred}. The characters are added to
  6587. @var{base_cs} and @var{base_cs} is returned.
  6588. @end deffn
  6589. ucs-range->char-set
  6590. @c snarfed from srfi-14.c:658
  6591. @deffn {Scheme Procedure} ucs-range->char-set lower upper [error [base_cs]]
  6592. @deffnx {C Function} scm_ucs_range_to_char_set (lower, upper, error, base_cs)
  6593. Return a character set containing all characters whose
  6594. character codes lie in the half-open range
  6595. [@var{lower},@var{upper}).
  6596. If @var{error} is a true value, an error is signalled if the
  6597. specified range contains characters which are not contained in
  6598. the implemented character range. If @var{error} is @code{#f},
  6599. these characters are silently left out of the resultung
  6600. character set.
  6601. The characters in @var{base_cs} are added to the result, if
  6602. given.
  6603. @end deffn
  6604. ucs-range->char-set!
  6605. @c snarfed from srfi-14.c:711
  6606. @deffn {Scheme Procedure} ucs-range->char-set! lower upper error base_cs
  6607. @deffnx {C Function} scm_ucs_range_to_char_set_x (lower, upper, error, base_cs)
  6608. Return a character set containing all characters whose
  6609. character codes lie in the half-open range
  6610. [@var{lower},@var{upper}).
  6611. If @var{error} is a true value, an error is signalled if the
  6612. specified range contains characters which are not contained in
  6613. the implemented character range. If @var{error} is @code{#f},
  6614. these characters are silently left out of the resultung
  6615. character set.
  6616. The characters are added to @var{base_cs} and @var{base_cs} is
  6617. returned.
  6618. @end deffn
  6619. ->char-set
  6620. @c snarfed from srfi-14.c:741
  6621. @deffn {Scheme Procedure} ->char-set x
  6622. @deffnx {C Function} scm_to_char_set (x)
  6623. Coerces x into a char-set. @var{x} may be a string, character or char-set. A string is converted to the set of its constituent characters; a character is converted to a singleton set; a char-set is returned as-is.
  6624. @end deffn
  6625. char-set-size
  6626. @c snarfed from srfi-14.c:757
  6627. @deffn {Scheme Procedure} char-set-size cs
  6628. @deffnx {C Function} scm_char_set_size (cs)
  6629. Return the number of elements in character set @var{cs}.
  6630. @end deffn
  6631. char-set-count
  6632. @c snarfed from srfi-14.c:774
  6633. @deffn {Scheme Procedure} char-set-count pred cs
  6634. @deffnx {C Function} scm_char_set_count (pred, cs)
  6635. Return the number of the elements int the character set
  6636. @var{cs} which satisfy the predicate @var{pred}.
  6637. @end deffn
  6638. char-set->list
  6639. @c snarfed from srfi-14.c:797
  6640. @deffn {Scheme Procedure} char-set->list cs
  6641. @deffnx {C Function} scm_char_set_to_list (cs)
  6642. Return a list containing the elements of the character set
  6643. @var{cs}.
  6644. @end deffn
  6645. char-set->string
  6646. @c snarfed from srfi-14.c:816
  6647. @deffn {Scheme Procedure} char-set->string cs
  6648. @deffnx {C Function} scm_char_set_to_string (cs)
  6649. Return a string containing the elements of the character set
  6650. @var{cs}. The order in which the characters are placed in the
  6651. string is not defined.
  6652. @end deffn
  6653. char-set-contains?
  6654. @c snarfed from srfi-14.c:841
  6655. @deffn {Scheme Procedure} char-set-contains? cs ch
  6656. @deffnx {C Function} scm_char_set_contains_p (cs, ch)
  6657. Return @code{#t} iff the character @var{ch} is contained in the
  6658. character set @var{cs}.
  6659. @end deffn
  6660. char-set-every
  6661. @c snarfed from srfi-14.c:854
  6662. @deffn {Scheme Procedure} char-set-every pred cs
  6663. @deffnx {C Function} scm_char_set_every (pred, cs)
  6664. Return a true value if every character in the character set
  6665. @var{cs} satisfies the predicate @var{pred}.
  6666. @end deffn
  6667. char-set-any
  6668. @c snarfed from srfi-14.c:878
  6669. @deffn {Scheme Procedure} char-set-any pred cs
  6670. @deffnx {C Function} scm_char_set_any (pred, cs)
  6671. Return a true value if any character in the character set
  6672. @var{cs} satisfies the predicate @var{pred}.
  6673. @end deffn
  6674. char-set-adjoin
  6675. @c snarfed from srfi-14.c:901
  6676. @deffn {Scheme Procedure} char-set-adjoin cs . rest
  6677. @deffnx {C Function} scm_char_set_adjoin (cs, rest)
  6678. Add all character arguments to the first argument, which must
  6679. be a character set.
  6680. @end deffn
  6681. char-set-delete
  6682. @c snarfed from srfi-14.c:929
  6683. @deffn {Scheme Procedure} char-set-delete cs . rest
  6684. @deffnx {C Function} scm_char_set_delete (cs, rest)
  6685. Delete all character arguments from the first argument, which
  6686. must be a character set.
  6687. @end deffn
  6688. char-set-adjoin!
  6689. @c snarfed from srfi-14.c:957
  6690. @deffn {Scheme Procedure} char-set-adjoin! cs . rest
  6691. @deffnx {C Function} scm_char_set_adjoin_x (cs, rest)
  6692. Add all character arguments to the first argument, which must
  6693. be a character set.
  6694. @end deffn
  6695. char-set-delete!
  6696. @c snarfed from srfi-14.c:984
  6697. @deffn {Scheme Procedure} char-set-delete! cs . rest
  6698. @deffnx {C Function} scm_char_set_delete_x (cs, rest)
  6699. Delete all character arguments from the first argument, which
  6700. must be a character set.
  6701. @end deffn
  6702. char-set-complement
  6703. @c snarfed from srfi-14.c:1010
  6704. @deffn {Scheme Procedure} char-set-complement cs
  6705. @deffnx {C Function} scm_char_set_complement (cs)
  6706. Return the complement of the character set @var{cs}.
  6707. @end deffn
  6708. char-set-union
  6709. @c snarfed from srfi-14.c:1031
  6710. @deffn {Scheme Procedure} char-set-union . rest
  6711. @deffnx {C Function} scm_char_set_union (rest)
  6712. Return the union of all argument character sets.
  6713. @end deffn
  6714. char-set-intersection
  6715. @c snarfed from srfi-14.c:1060
  6716. @deffn {Scheme Procedure} char-set-intersection . rest
  6717. @deffnx {C Function} scm_char_set_intersection (rest)
  6718. Return the intersection of all argument character sets.
  6719. @end deffn
  6720. char-set-difference
  6721. @c snarfed from srfi-14.c:1100
  6722. @deffn {Scheme Procedure} char-set-difference cs1 . rest
  6723. @deffnx {C Function} scm_char_set_difference (cs1, rest)
  6724. Return the difference of all argument character sets.
  6725. @end deffn
  6726. char-set-xor
  6727. @c snarfed from srfi-14.c:1130
  6728. @deffn {Scheme Procedure} char-set-xor . rest
  6729. @deffnx {C Function} scm_char_set_xor (rest)
  6730. Return the exclusive-or of all argument character sets.
  6731. @end deffn
  6732. char-set-diff+intersection
  6733. @c snarfed from srfi-14.c:1171
  6734. @deffn {Scheme Procedure} char-set-diff+intersection cs1 . rest
  6735. @deffnx {C Function} scm_char_set_diff_plus_intersection (cs1, rest)
  6736. Return the difference and the intersection of all argument
  6737. character sets.
  6738. @end deffn
  6739. char-set-complement!
  6740. @c snarfed from srfi-14.c:1209
  6741. @deffn {Scheme Procedure} char-set-complement! cs
  6742. @deffnx {C Function} scm_char_set_complement_x (cs)
  6743. Return the complement of the character set @var{cs}.
  6744. @end deffn
  6745. char-set-union!
  6746. @c snarfed from srfi-14.c:1226
  6747. @deffn {Scheme Procedure} char-set-union! cs1 . rest
  6748. @deffnx {C Function} scm_char_set_union_x (cs1, rest)
  6749. Return the union of all argument character sets.
  6750. @end deffn
  6751. char-set-intersection!
  6752. @c snarfed from srfi-14.c:1254
  6753. @deffn {Scheme Procedure} char-set-intersection! cs1 . rest
  6754. @deffnx {C Function} scm_char_set_intersection_x (cs1, rest)
  6755. Return the intersection of all argument character sets.
  6756. @end deffn
  6757. char-set-difference!
  6758. @c snarfed from srfi-14.c:1282
  6759. @deffn {Scheme Procedure} char-set-difference! cs1 . rest
  6760. @deffnx {C Function} scm_char_set_difference_x (cs1, rest)
  6761. Return the difference of all argument character sets.
  6762. @end deffn
  6763. char-set-xor!
  6764. @c snarfed from srfi-14.c:1310
  6765. @deffn {Scheme Procedure} char-set-xor! cs1 . rest
  6766. @deffnx {C Function} scm_char_set_xor_x (cs1, rest)
  6767. Return the exclusive-or of all argument character sets.
  6768. @end deffn
  6769. char-set-diff+intersection!
  6770. @c snarfed from srfi-14.c:1349
  6771. @deffn {Scheme Procedure} char-set-diff+intersection! cs1 cs2 . rest
  6772. @deffnx {C Function} scm_char_set_diff_plus_intersection_x (cs1, cs2, rest)
  6773. Return the difference and the intersection of all argument
  6774. character sets.
  6775. @end deffn
  6776. string=?
  6777. @c snarfed from strorder.c:50
  6778. @deffn {Scheme Procedure} string=? s1 s2
  6779. Lexicographic equality predicate; return @code{#t} if the two
  6780. strings are the same length and contain the same characters in
  6781. the same positions, otherwise return @code{#f}.
  6782. The procedure @code{string-ci=?} treats upper and lower case
  6783. letters as though they were the same character, but
  6784. @code{string=?} treats upper and lower case as distinct
  6785. characters.
  6786. @end deffn
  6787. string-ci=?
  6788. @c snarfed from strorder.c:62
  6789. @deffn {Scheme Procedure} string-ci=? s1 s2
  6790. Case-insensitive string equality predicate; return @code{#t} if
  6791. the two strings are the same length and their component
  6792. characters match (ignoring case) at each position; otherwise
  6793. return @code{#f}.
  6794. @end deffn
  6795. string<?
  6796. @c snarfed from strorder.c:72
  6797. @deffn {Scheme Procedure} string<? s1 s2
  6798. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6799. is lexicographically less than @var{s2}.
  6800. @end deffn
  6801. string<=?
  6802. @c snarfed from strorder.c:82
  6803. @deffn {Scheme Procedure} string<=? s1 s2
  6804. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6805. is lexicographically less than or equal to @var{s2}.
  6806. @end deffn
  6807. string>?
  6808. @c snarfed from strorder.c:92
  6809. @deffn {Scheme Procedure} string>? s1 s2
  6810. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6811. is lexicographically greater than @var{s2}.
  6812. @end deffn
  6813. string>=?
  6814. @c snarfed from strorder.c:102
  6815. @deffn {Scheme Procedure} string>=? s1 s2
  6816. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6817. is lexicographically greater than or equal to @var{s2}.
  6818. @end deffn
  6819. string-ci<?
  6820. @c snarfed from strorder.c:113
  6821. @deffn {Scheme Procedure} string-ci<? s1 s2
  6822. Case insensitive lexicographic ordering predicate; return
  6823. @code{#t} if @var{s1} is lexicographically less than @var{s2}
  6824. regardless of case.
  6825. @end deffn
  6826. string-ci<=?
  6827. @c snarfed from strorder.c:124
  6828. @deffn {Scheme Procedure} string-ci<=? s1 s2
  6829. Case insensitive lexicographic ordering predicate; return
  6830. @code{#t} if @var{s1} is lexicographically less than or equal
  6831. to @var{s2} regardless of case.
  6832. @end deffn
  6833. string-ci>?
  6834. @c snarfed from strorder.c:135
  6835. @deffn {Scheme Procedure} string-ci>? s1 s2
  6836. Case insensitive lexicographic ordering predicate; return
  6837. @code{#t} if @var{s1} is lexicographically greater than
  6838. @var{s2} regardless of case.
  6839. @end deffn
  6840. string-ci>=?
  6841. @c snarfed from strorder.c:146
  6842. @deffn {Scheme Procedure} string-ci>=? s1 s2
  6843. Case insensitive lexicographic ordering predicate; return
  6844. @code{#t} if @var{s1} is lexicographically greater than or
  6845. equal to @var{s2} regardless of case.
  6846. @end deffn
  6847. object->string
  6848. @c snarfed from strports.c:332
  6849. @deffn {Scheme Procedure} object->string obj [printer]
  6850. @deffnx {C Function} scm_object_to_string (obj, printer)
  6851. Return a Scheme string obtained by printing @var{obj}.
  6852. Printing function can be specified by the optional second
  6853. argument @var{printer} (default: @code{write}).
  6854. @end deffn
  6855. call-with-output-string
  6856. @c snarfed from strports.c:356
  6857. @deffn {Scheme Procedure} call-with-output-string proc
  6858. @deffnx {C Function} scm_call_with_output_string (proc)
  6859. Calls the one-argument procedure @var{proc} with a newly created output
  6860. port. When the function returns, the string composed of the characters
  6861. written into the port is returned.
  6862. @end deffn
  6863. call-with-input-string
  6864. @c snarfed from strports.c:375
  6865. @deffn {Scheme Procedure} call-with-input-string string proc
  6866. @deffnx {C Function} scm_call_with_input_string (string, proc)
  6867. Calls the one-argument procedure @var{proc} with a newly
  6868. created input port from which @var{string}'s contents may be
  6869. read. The value yielded by the @var{proc} is returned.
  6870. @end deffn
  6871. open-input-string
  6872. @c snarfed from strports.c:388
  6873. @deffn {Scheme Procedure} open-input-string str
  6874. @deffnx {C Function} scm_open_input_string (str)
  6875. Take a string and return an input port that delivers characters
  6876. from the string. The port can be closed by
  6877. @code{close-input-port}, though its storage will be reclaimed
  6878. by the garbage collector if it becomes inaccessible.
  6879. @end deffn
  6880. open-output-string
  6881. @c snarfed from strports.c:402
  6882. @deffn {Scheme Procedure} open-output-string
  6883. @deffnx {C Function} scm_open_output_string ()
  6884. Return an output port that will accumulate characters for
  6885. retrieval by @code{get-output-string}. The port can be closed
  6886. by the procedure @code{close-output-port}, though its storage
  6887. will be reclaimed by the garbage collector if it becomes
  6888. inaccessible.
  6889. @end deffn
  6890. get-output-string
  6891. @c snarfed from strports.c:419
  6892. @deffn {Scheme Procedure} get-output-string port
  6893. @deffnx {C Function} scm_get_output_string (port)
  6894. Given an output port created by @code{open-output-string},
  6895. return a string consisting of the characters that have been
  6896. output to the port so far.
  6897. @end deffn
  6898. eval-string
  6899. @c snarfed from strports.c:488
  6900. @deffn {Scheme Procedure} eval-string string [module]
  6901. @deffnx {C Function} scm_eval_string_in_module (string, module)
  6902. Evaluate @var{string} as the text representation of a Scheme
  6903. form or forms, and return whatever value they produce.
  6904. Evaluation takes place in the given module, or the current
  6905. module when no module is given.
  6906. While the code is evaluated, the given module is made the
  6907. current one. The current module is restored when this
  6908. procedure returns.
  6909. @end deffn
  6910. make-struct-layout
  6911. @c snarfed from struct.c:56
  6912. @deffn {Scheme Procedure} make-struct-layout fields
  6913. @deffnx {C Function} scm_make_struct_layout (fields)
  6914. Return a new structure layout object.
  6915. @var{fields} must be a string made up of pairs of characters
  6916. strung together. The first character of each pair describes a field
  6917. type, the second a field protection. Allowed types are 'p' for
  6918. GC-protected Scheme data, 'u' for unprotected binary data, and 's' for
  6919. a field that points to the structure itself. Allowed protections
  6920. are 'w' for mutable fields, 'r' for read-only fields, and 'o' for opaque
  6921. fields. The last field protection specification may be capitalized to
  6922. indicate that the field is a tail-array.
  6923. @end deffn
  6924. struct?
  6925. @c snarfed from struct.c:223
  6926. @deffn {Scheme Procedure} struct? x
  6927. @deffnx {C Function} scm_struct_p (x)
  6928. Return @code{#t} iff @var{x} is a structure object, else
  6929. @code{#f}.
  6930. @end deffn
  6931. struct-vtable?
  6932. @c snarfed from struct.c:232
  6933. @deffn {Scheme Procedure} struct-vtable? x
  6934. @deffnx {C Function} scm_struct_vtable_p (x)
  6935. Return @code{#t} iff @var{x} is a vtable structure.
  6936. @end deffn
  6937. make-struct
  6938. @c snarfed from struct.c:418
  6939. @deffn {Scheme Procedure} make-struct vtable tail_array_size . init
  6940. @deffnx {C Function} scm_make_struct (vtable, tail_array_size, init)
  6941. Create a new structure.
  6942. @var{type} must be a vtable structure (@pxref{Vtables}).
  6943. @var{tail-elts} must be a non-negative integer. If the layout
  6944. specification indicated by @var{type} includes a tail-array,
  6945. this is the number of elements allocated to that array.
  6946. The @var{init1}, @dots{} are optional arguments describing how
  6947. successive fields of the structure should be initialized. Only fields
  6948. with protection 'r' or 'w' can be initialized, except for fields of
  6949. type 's', which are automatically initialized to point to the new
  6950. structure itself; fields with protection 'o' can not be initialized by
  6951. Scheme programs.
  6952. If fewer optional arguments than initializable fields are supplied,
  6953. fields of type 'p' get default value #f while fields of type 'u' are
  6954. initialized to 0.
  6955. Structs are currently the basic representation for record-like data
  6956. structures in Guile. The plan is to eventually replace them with a
  6957. new representation which will at the same time be easier to use and
  6958. more powerful.
  6959. For more information, see the documentation for @code{make-vtable-vtable}.
  6960. @end deffn
  6961. make-vtable-vtable
  6962. @c snarfed from struct.c:502
  6963. @deffn {Scheme Procedure} make-vtable-vtable user_fields tail_array_size . init
  6964. @deffnx {C Function} scm_make_vtable_vtable (user_fields, tail_array_size, init)
  6965. Return a new, self-describing vtable structure.
  6966. @var{user-fields} is a string describing user defined fields of the
  6967. vtable beginning at index @code{vtable-offset-user}
  6968. (see @code{make-struct-layout}).
  6969. @var{tail-size} specifies the size of the tail-array (if any) of
  6970. this vtable.
  6971. @var{init1}, @dots{} are the optional initializers for the fields of
  6972. the vtable.
  6973. Vtables have one initializable system field---the struct printer.
  6974. This field comes before the user fields in the initializers passed
  6975. to @code{make-vtable-vtable} and @code{make-struct}, and thus works as
  6976. a third optional argument to @code{make-vtable-vtable} and a fourth to
  6977. @code{make-struct} when creating vtables:
  6978. If the value is a procedure, it will be called instead of the standard
  6979. printer whenever a struct described by this vtable is printed.
  6980. The procedure will be called with arguments STRUCT and PORT.
  6981. The structure of a struct is described by a vtable, so the vtable is
  6982. in essence the type of the struct. The vtable is itself a struct with
  6983. a vtable. This could go on forever if it weren't for the
  6984. vtable-vtables which are self-describing vtables, and thus terminate
  6985. the chain.
  6986. There are several potential ways of using structs, but the standard
  6987. one is to use three kinds of structs, together building up a type
  6988. sub-system: one vtable-vtable working as the root and one or several
  6989. "types", each with a set of "instances". (The vtable-vtable should be
  6990. compared to the class <class> which is the class of itself.)
  6991. @lisp
  6992. (define ball-root (make-vtable-vtable "pr" 0))
  6993. (define (make-ball-type ball-color)
  6994. (make-struct ball-root 0
  6995. (make-struct-layout "pw")
  6996. (lambda (ball port)
  6997. (format port "#<a ~A ball owned by ~A>"
  6998. (color ball)
  6999. (owner ball)))
  7000. ball-color))
  7001. (define (color ball) (struct-ref (struct-vtable ball) vtable-offset-user))
  7002. (define (owner ball) (struct-ref ball 0))
  7003. (define red (make-ball-type 'red))
  7004. (define green (make-ball-type 'green))
  7005. (define (make-ball type owner) (make-struct type 0 owner))
  7006. (define ball (make-ball green 'Nisse))
  7007. ball @result{} #<a green ball owned by Nisse>
  7008. @end lisp
  7009. @end deffn
  7010. struct-ref
  7011. @c snarfed from struct.c:542
  7012. @deffn {Scheme Procedure} struct-ref handle pos
  7013. @deffnx {Scheme Procedure} struct-set! struct n value
  7014. @deffnx {C Function} scm_struct_ref (handle, pos)
  7015. Access (or modify) the @var{n}th field of @var{struct}.
  7016. If the field is of type 'p', then it can be set to an arbitrary value.
  7017. If the field is of type 'u', then it can only be set to a non-negative
  7018. integer value small enough to fit in one machine word.
  7019. @end deffn
  7020. struct-set!
  7021. @c snarfed from struct.c:621
  7022. @deffn {Scheme Procedure} struct-set! handle pos val
  7023. @deffnx {C Function} scm_struct_set_x (handle, pos, val)
  7024. Set the slot of the structure @var{handle} with index @var{pos}
  7025. to @var{val}. Signal an error if the slot can not be written
  7026. to.
  7027. @end deffn
  7028. struct-vtable
  7029. @c snarfed from struct.c:692
  7030. @deffn {Scheme Procedure} struct-vtable handle
  7031. @deffnx {C Function} scm_struct_vtable (handle)
  7032. Return the vtable structure that describes the type of @var{struct}.
  7033. @end deffn
  7034. struct-vtable-tag
  7035. @c snarfed from struct.c:703
  7036. @deffn {Scheme Procedure} struct-vtable-tag handle
  7037. @deffnx {C Function} scm_struct_vtable_tag (handle)
  7038. Return the vtable tag of the structure @var{handle}.
  7039. @end deffn
  7040. struct-vtable-name
  7041. @c snarfed from struct.c:742
  7042. @deffn {Scheme Procedure} struct-vtable-name vtable
  7043. @deffnx {C Function} scm_struct_vtable_name (vtable)
  7044. Return the name of the vtable @var{vtable}.
  7045. @end deffn
  7046. set-struct-vtable-name!
  7047. @c snarfed from struct.c:752
  7048. @deffn {Scheme Procedure} set-struct-vtable-name! vtable name
  7049. @deffnx {C Function} scm_set_struct_vtable_name_x (vtable, name)
  7050. Set the name of the vtable @var{vtable} to @var{name}.
  7051. @end deffn
  7052. symbol?
  7053. @c snarfed from symbols.c:156
  7054. @deffn {Scheme Procedure} symbol? obj
  7055. @deffnx {C Function} scm_symbol_p (obj)
  7056. Return @code{#t} if @var{obj} is a symbol, otherwise return
  7057. @code{#f}.
  7058. @end deffn
  7059. symbol-interned?
  7060. @c snarfed from symbols.c:166
  7061. @deffn {Scheme Procedure} symbol-interned? symbol
  7062. @deffnx {C Function} scm_symbol_interned_p (symbol)
  7063. Return @code{#t} if @var{symbol} is interned, otherwise return
  7064. @code{#f}.
  7065. @end deffn
  7066. make-symbol
  7067. @c snarfed from symbols.c:178
  7068. @deffn {Scheme Procedure} make-symbol name
  7069. @deffnx {C Function} scm_make_symbol (name)
  7070. Return a new uninterned symbol with the name @var{name}. The returned symbol is guaranteed to be unique and future calls to @code{string->symbol} will not return it.
  7071. @end deffn
  7072. symbol->string
  7073. @c snarfed from symbols.c:210
  7074. @deffn {Scheme Procedure} symbol->string s
  7075. @deffnx {C Function} scm_symbol_to_string (s)
  7076. Return the name of @var{symbol} as a string. If the symbol was
  7077. part of an object returned as the value of a literal expression
  7078. (section @pxref{Literal expressions,,,r5rs, The Revised^5
  7079. Report on Scheme}) or by a call to the @code{read} procedure,
  7080. and its name contains alphabetic characters, then the string
  7081. returned will contain characters in the implementation's
  7082. preferred standard case---some implementations will prefer
  7083. upper case, others lower case. If the symbol was returned by
  7084. @code{string->symbol}, the case of characters in the string
  7085. returned will be the same as the case in the string that was
  7086. passed to @code{string->symbol}. It is an error to apply
  7087. mutation procedures like @code{string-set!} to strings returned
  7088. by this procedure.
  7089. The following examples assume that the implementation's
  7090. standard case is lower case:
  7091. @lisp
  7092. (symbol->string 'flying-fish) @result{} "flying-fish"
  7093. (symbol->string 'Martin) @result{} "martin"
  7094. (symbol->string
  7095. (string->symbol "Malvina")) @result{} "Malvina"
  7096. @end lisp
  7097. @end deffn
  7098. string->symbol
  7099. @c snarfed from symbols.c:240
  7100. @deffn {Scheme Procedure} string->symbol string
  7101. @deffnx {C Function} scm_string_to_symbol (string)
  7102. Return the symbol whose name is @var{string}. This procedure
  7103. can create symbols with names containing special characters or
  7104. letters in the non-standard case, but it is usually a bad idea
  7105. to create such symbols because in some implementations of
  7106. Scheme they cannot be read as themselves. See
  7107. @code{symbol->string}.
  7108. The following examples assume that the implementation's
  7109. standard case is lower case:
  7110. @lisp
  7111. (eq? 'mISSISSIppi 'mississippi) @result{} #t
  7112. (string->symbol "mISSISSIppi") @result{} @r{the symbol with name "mISSISSIppi"}
  7113. (eq? 'bitBlt (string->symbol "bitBlt")) @result{} #f
  7114. (eq? 'JollyWog
  7115. (string->symbol (symbol->string 'JollyWog))) @result{} #t
  7116. (string=? "K. Harper, M.D."
  7117. (symbol->string
  7118. (string->symbol "K. Harper, M.D."))) @result{}#t
  7119. @end lisp
  7120. @end deffn
  7121. string-ci->symbol
  7122. @c snarfed from symbols.c:252
  7123. @deffn {Scheme Procedure} string-ci->symbol str
  7124. @deffnx {C Function} scm_string_ci_to_symbol (str)
  7125. Return the symbol whose name is @var{str}. @var{str} is
  7126. converted to lowercase before the conversion is done, if Guile
  7127. is currently reading symbols case-insensitively.
  7128. @end deffn
  7129. gensym
  7130. @c snarfed from symbols.c:269
  7131. @deffn {Scheme Procedure} gensym [prefix]
  7132. @deffnx {C Function} scm_gensym (prefix)
  7133. Create a new symbol with a name constructed from a prefix and
  7134. a counter value. The string @var{prefix} can be specified as
  7135. an optional argument. Default prefix is @code{ g}. The counter
  7136. is increased by 1 at each call. There is no provision for
  7137. resetting the counter.
  7138. @end deffn
  7139. symbol-hash
  7140. @c snarfed from symbols.c:295
  7141. @deffn {Scheme Procedure} symbol-hash symbol
  7142. @deffnx {C Function} scm_symbol_hash (symbol)
  7143. Return a hash value for @var{symbol}.
  7144. @end deffn
  7145. symbol-fref
  7146. @c snarfed from symbols.c:305
  7147. @deffn {Scheme Procedure} symbol-fref s
  7148. @deffnx {C Function} scm_symbol_fref (s)
  7149. Return the contents of @var{symbol}'s @dfn{function slot}.
  7150. @end deffn
  7151. symbol-pref
  7152. @c snarfed from symbols.c:316
  7153. @deffn {Scheme Procedure} symbol-pref s
  7154. @deffnx {C Function} scm_symbol_pref (s)
  7155. Return the @dfn{property list} currently associated with @var{symbol}.
  7156. @end deffn
  7157. symbol-fset!
  7158. @c snarfed from symbols.c:327
  7159. @deffn {Scheme Procedure} symbol-fset! s val
  7160. @deffnx {C Function} scm_symbol_fset_x (s, val)
  7161. Change the binding of @var{symbol}'s function slot.
  7162. @end deffn
  7163. symbol-pset!
  7164. @c snarfed from symbols.c:339
  7165. @deffn {Scheme Procedure} symbol-pset! s val
  7166. @deffnx {C Function} scm_symbol_pset_x (s, val)
  7167. Change the binding of @var{symbol}'s property slot.
  7168. @end deffn
  7169. call-with-new-thread
  7170. @c snarfed from threads.c:611
  7171. @deffn {Scheme Procedure} call-with-new-thread thunk [handler]
  7172. @deffnx {C Function} scm_call_with_new_thread (thunk, handler)
  7173. Call @code{thunk} in a new thread and with a new dynamic state,
  7174. returning a new thread object representing the thread. The procedure
  7175. @var{thunk} is called via @code{with-continuation-barrier}.
  7176. When @var{handler} is specified, then @var{thunk} is called from
  7177. within a @code{catch} with tag @code{#t} that has @var{handler} as its
  7178. handler. This catch is established inside the continuation barrier.
  7179. Once @var{thunk} or @var{handler} returns, the return value is made
  7180. the @emph{exit value} of the thread and the thread is terminated.
  7181. @end deffn
  7182. yield
  7183. @c snarfed from threads.c:722
  7184. @deffn {Scheme Procedure} yield
  7185. @deffnx {C Function} scm_yield ()
  7186. Move the calling thread to the end of the scheduling queue.
  7187. @end deffn
  7188. join-thread
  7189. @c snarfed from threads.c:732
  7190. @deffn {Scheme Procedure} join-thread thread
  7191. @deffnx {C Function} scm_join_thread (thread)
  7192. Suspend execution of the calling thread until the target @var{thread} terminates, unless the target @var{thread} has already terminated.
  7193. @end deffn
  7194. make-mutex
  7195. @c snarfed from threads.c:828
  7196. @deffn {Scheme Procedure} make-mutex
  7197. @deffnx {C Function} scm_make_mutex ()
  7198. Create a new mutex.
  7199. @end deffn
  7200. make-recursive-mutex
  7201. @c snarfed from threads.c:837
  7202. @deffn {Scheme Procedure} make-recursive-mutex
  7203. @deffnx {C Function} scm_make_recursive_mutex ()
  7204. Create a new recursive mutex.
  7205. @end deffn
  7206. lock-mutex
  7207. @c snarfed from threads.c:883
  7208. @deffn {Scheme Procedure} lock-mutex mx
  7209. @deffnx {C Function} scm_lock_mutex (mx)
  7210. Lock @var{mutex}. If the mutex is already locked, the calling thread blocks until the mutex becomes available. The function returns when the calling thread owns the lock on @var{mutex}. Locking a mutex that a thread already owns will succeed right away and will not block the thread. That is, Guile's mutexes are @emph{recursive}.
  7211. @end deffn
  7212. try-mutex
  7213. @c snarfed from threads.c:931
  7214. @deffn {Scheme Procedure} try-mutex mutex
  7215. @deffnx {C Function} scm_try_mutex (mutex)
  7216. Try to lock @var{mutex}. If the mutex is already locked by someone else, return @code{#f}. Else lock the mutex and return @code{#t}.
  7217. @end deffn
  7218. unlock-mutex
  7219. @c snarfed from threads.c:976
  7220. @deffn {Scheme Procedure} unlock-mutex mx
  7221. @deffnx {C Function} scm_unlock_mutex (mx)
  7222. Unlocks @var{mutex} if the calling thread owns the lock on @var{mutex}. Calling unlock-mutex on a mutex not owned by the current thread results in undefined behaviour. Once a mutex has been unlocked, one thread blocked on @var{mutex} is awakened and grabs the mutex lock. Every call to @code{lock-mutex} by this thread must be matched with a call to @code{unlock-mutex}. Only the last call to @code{unlock-mutex} will actually unlock the mutex.
  7223. @end deffn
  7224. make-condition-variable
  7225. @c snarfed from threads.c:1052
  7226. @deffn {Scheme Procedure} make-condition-variable
  7227. @deffnx {C Function} scm_make_condition_variable ()
  7228. Make a new condition variable.
  7229. @end deffn
  7230. wait-condition-variable
  7231. @c snarfed from threads.c:1120
  7232. @deffn {Scheme Procedure} wait-condition-variable cv mx [t]
  7233. @deffnx {C Function} scm_timed_wait_condition_variable (cv, mx, t)
  7234. Wait until @var{cond-var} has been signalled. While waiting, @var{mutex} is atomically unlocked (as with @code{unlock-mutex}) and is locked again when this function returns. When @var{time} is given, it specifies a point in time where the waiting should be aborted. It can be either a integer as returned by @code{current-time} or a pair as returned by @code{gettimeofday}. When the waiting is aborted the mutex is locked and @code{#f} is returned. When the condition variable is in fact signalled, the mutex is also locked and @code{#t} is returned.
  7235. @end deffn
  7236. signal-condition-variable
  7237. @c snarfed from threads.c:1157
  7238. @deffn {Scheme Procedure} signal-condition-variable cv
  7239. @deffnx {C Function} scm_signal_condition_variable (cv)
  7240. Wake up one thread that is waiting for @var{cv}
  7241. @end deffn
  7242. broadcast-condition-variable
  7243. @c snarfed from threads.c:1177
  7244. @deffn {Scheme Procedure} broadcast-condition-variable cv
  7245. @deffnx {C Function} scm_broadcast_condition_variable (cv)
  7246. Wake up all threads that are waiting for @var{cv}.
  7247. @end deffn
  7248. current-thread
  7249. @c snarfed from threads.c:1354
  7250. @deffn {Scheme Procedure} current-thread
  7251. @deffnx {C Function} scm_current_thread ()
  7252. Return the thread that called this function.
  7253. @end deffn
  7254. all-threads
  7255. @c snarfed from threads.c:1372
  7256. @deffn {Scheme Procedure} all-threads
  7257. @deffnx {C Function} scm_all_threads ()
  7258. Return a list of all threads.
  7259. @end deffn
  7260. thread-exited?
  7261. @c snarfed from threads.c:1398
  7262. @deffn {Scheme Procedure} thread-exited? thread
  7263. @deffnx {C Function} scm_thread_exited_p (thread)
  7264. Return @code{#t} iff @var{thread} has exited.
  7265. @end deffn
  7266. catch
  7267. @c snarfed from throw.c:512
  7268. @deffn {Scheme Procedure} catch key thunk handler
  7269. @deffnx {C Function} scm_catch (key, thunk, handler)
  7270. Invoke @var{thunk} in the dynamic context of @var{handler} for
  7271. exceptions matching @var{key}. If thunk throws to the symbol
  7272. @var{key}, then @var{handler} is invoked this way:
  7273. @lisp
  7274. (handler key args ...)
  7275. @end lisp
  7276. @var{key} is a symbol or @code{#t}.
  7277. @var{thunk} takes no arguments. If @var{thunk} returns
  7278. normally, that is the return value of @code{catch}.
  7279. Handler is invoked outside the scope of its own @code{catch}.
  7280. If @var{handler} again throws to the same key, a new handler
  7281. from further up the call chain is invoked.
  7282. If the key is @code{#t}, then a throw to @emph{any} symbol will
  7283. match this call to @code{catch}.
  7284. @end deffn
  7285. lazy-catch
  7286. @c snarfed from throw.c:540
  7287. @deffn {Scheme Procedure} lazy-catch key thunk handler
  7288. @deffnx {C Function} scm_lazy_catch (key, thunk, handler)
  7289. This behaves exactly like @code{catch}, except that it does
  7290. not unwind the stack before invoking @var{handler}.
  7291. The @var{handler} procedure is not allowed to return:
  7292. it must throw to another catch, or otherwise exit non-locally.
  7293. @end deffn
  7294. throw
  7295. @c snarfed from throw.c:573
  7296. @deffn {Scheme Procedure} throw key . args
  7297. @deffnx {C Function} scm_throw (key, args)
  7298. Invoke the catch form matching @var{key}, passing @var{args} to the
  7299. @var{handler}.
  7300. @var{key} is a symbol. It will match catches of the same symbol or of
  7301. @code{#t}.
  7302. If there is no handler at all, Guile prints an error and then exits.
  7303. @end deffn
  7304. values
  7305. @c snarfed from values.c:53
  7306. @deffn {Scheme Procedure} values . args
  7307. @deffnx {C Function} scm_values (args)
  7308. Delivers all of its arguments to its continuation. Except for
  7309. continuations created by the @code{call-with-values} procedure,
  7310. all continuations take exactly one value. The effect of
  7311. passing no value or more than one value to continuations that
  7312. were not created by @code{call-with-values} is unspecified.
  7313. @end deffn
  7314. make-variable
  7315. @c snarfed from variable.c:52
  7316. @deffn {Scheme Procedure} make-variable init
  7317. @deffnx {C Function} scm_make_variable (init)
  7318. Return a variable initialized to value @var{init}.
  7319. @end deffn
  7320. make-undefined-variable
  7321. @c snarfed from variable.c:62
  7322. @deffn {Scheme Procedure} make-undefined-variable
  7323. @deffnx {C Function} scm_make_undefined_variable ()
  7324. Return a variable that is initially unbound.
  7325. @end deffn
  7326. variable?
  7327. @c snarfed from variable.c:73
  7328. @deffn {Scheme Procedure} variable? obj
  7329. @deffnx {C Function} scm_variable_p (obj)
  7330. Return @code{#t} iff @var{obj} is a variable object, else
  7331. return @code{#f}.
  7332. @end deffn
  7333. variable-ref
  7334. @c snarfed from variable.c:85
  7335. @deffn {Scheme Procedure} variable-ref var
  7336. @deffnx {C Function} scm_variable_ref (var)
  7337. Dereference @var{var} and return its value.
  7338. @var{var} must be a variable object; see @code{make-variable}
  7339. and @code{make-undefined-variable}.
  7340. @end deffn
  7341. variable-set!
  7342. @c snarfed from variable.c:101
  7343. @deffn {Scheme Procedure} variable-set! var val
  7344. @deffnx {C Function} scm_variable_set_x (var, val)
  7345. Set the value of the variable @var{var} to @var{val}.
  7346. @var{var} must be a variable object, @var{val} can be any
  7347. value. Return an unspecified value.
  7348. @end deffn
  7349. variable-bound?
  7350. @c snarfed from variable.c:113
  7351. @deffn {Scheme Procedure} variable-bound? var
  7352. @deffnx {C Function} scm_variable_bound_p (var)
  7353. Return @code{#t} iff @var{var} is bound to a value.
  7354. Throws an error if @var{var} is not a variable object.
  7355. @end deffn
  7356. vector?
  7357. @c snarfed from vectors.c:91
  7358. @deffn {Scheme Procedure} vector? obj
  7359. @deffnx {C Function} scm_vector_p (obj)
  7360. Return @code{#t} if @var{obj} is a vector, otherwise return
  7361. @code{#f}.
  7362. @end deffn
  7363. list->vector
  7364. @c snarfed from vectors.c:123
  7365. @deffn {Scheme Procedure} list->vector
  7366. implemented by the C function "scm_vector"
  7367. @end deffn
  7368. vector
  7369. @c snarfed from vectors.c:140
  7370. @deffn {Scheme Procedure} vector . l
  7371. @deffnx {Scheme Procedure} list->vector l
  7372. @deffnx {C Function} scm_vector (l)
  7373. Return a newly allocated vector composed of the
  7374. given arguments. Analogous to @code{list}.
  7375. @lisp
  7376. (vector 'a 'b 'c) @result{} #(a b c)
  7377. @end lisp
  7378. @end deffn
  7379. make-vector
  7380. @c snarfed from vectors.c:276
  7381. @deffn {Scheme Procedure} make-vector k [fill]
  7382. @deffnx {C Function} scm_make_vector (k, fill)
  7383. Return a newly allocated vector of @var{k} elements. If a
  7384. second argument is given, then each position is initialized to
  7385. @var{fill}. Otherwise the initial contents of each position is
  7386. unspecified.
  7387. @end deffn
  7388. vector-copy
  7389. @c snarfed from vectors.c:318
  7390. @deffn {Scheme Procedure} vector-copy vec
  7391. @deffnx {C Function} scm_vector_copy (vec)
  7392. Return a copy of @var{vec}.
  7393. @end deffn
  7394. vector->list
  7395. @c snarfed from vectors.c:389
  7396. @deffn {Scheme Procedure} vector->list v
  7397. @deffnx {C Function} scm_vector_to_list (v)
  7398. Return a newly allocated list composed of the elements of @var{v}.
  7399. @lisp
  7400. (vector->list '#(dah dah didah)) @result{} (dah dah didah)
  7401. (list->vector '(dididit dah)) @result{} #(dididit dah)
  7402. @end lisp
  7403. @end deffn
  7404. vector-fill!
  7405. @c snarfed from vectors.c:413
  7406. @deffn {Scheme Procedure} vector-fill! v fill
  7407. @deffnx {C Function} scm_vector_fill_x (v, fill)
  7408. Store @var{fill} in every position of @var{vector}. The value
  7409. returned by @code{vector-fill!} is unspecified.
  7410. @end deffn
  7411. vector-move-left!
  7412. @c snarfed from vectors.c:450
  7413. @deffn {Scheme Procedure} vector-move-left! vec1 start1 end1 vec2 start2
  7414. @deffnx {C Function} scm_vector_move_left_x (vec1, start1, end1, vec2, start2)
  7415. Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
  7416. to @var{vec2} starting at position @var{start2}. @var{start1} and
  7417. @var{start2} are inclusive indices; @var{end1} is exclusive.
  7418. @code{vector-move-left!} copies elements in leftmost order.
  7419. Therefore, in the case where @var{vec1} and @var{vec2} refer to the
  7420. same vector, @code{vector-move-left!} is usually appropriate when
  7421. @var{start1} is greater than @var{start2}.
  7422. @end deffn
  7423. vector-move-right!
  7424. @c snarfed from vectors.c:488
  7425. @deffn {Scheme Procedure} vector-move-right! vec1 start1 end1 vec2 start2
  7426. @deffnx {C Function} scm_vector_move_right_x (vec1, start1, end1, vec2, start2)
  7427. Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
  7428. to @var{vec2} starting at position @var{start2}. @var{start1} and
  7429. @var{start2} are inclusive indices; @var{end1} is exclusive.
  7430. @code{vector-move-right!} copies elements in rightmost order.
  7431. Therefore, in the case where @var{vec1} and @var{vec2} refer to the
  7432. same vector, @code{vector-move-right!} is usually appropriate when
  7433. @var{start1} is less than @var{start2}.
  7434. @end deffn
  7435. generalized-vector?
  7436. @c snarfed from vectors.c:537
  7437. @deffn {Scheme Procedure} generalized-vector? obj
  7438. @deffnx {C Function} scm_generalized_vector_p (obj)
  7439. Return @code{#t} if @var{obj} is a vector, string,
  7440. bitvector, or uniform numeric vector.
  7441. @end deffn
  7442. generalized-vector-length
  7443. @c snarfed from vectors.c:569
  7444. @deffn {Scheme Procedure} generalized-vector-length v
  7445. @deffnx {C Function} scm_generalized_vector_length (v)
  7446. Return the length of the generalized vector @var{v}.
  7447. @end deffn
  7448. generalized-vector-ref
  7449. @c snarfed from vectors.c:594
  7450. @deffn {Scheme Procedure} generalized-vector-ref v idx
  7451. @deffnx {C Function} scm_generalized_vector_ref (v, idx)
  7452. Return the element at index @var{idx} of the
  7453. generalized vector @var{v}.
  7454. @end deffn
  7455. generalized-vector-set!
  7456. @c snarfed from vectors.c:619
  7457. @deffn {Scheme Procedure} generalized-vector-set! v idx val
  7458. @deffnx {C Function} scm_generalized_vector_set_x (v, idx, val)
  7459. Set the element at index @var{idx} of the
  7460. generalized vector @var{v} to @var{val}.
  7461. @end deffn
  7462. generalized-vector->list
  7463. @c snarfed from vectors.c:630
  7464. @deffn {Scheme Procedure} generalized-vector->list v
  7465. @deffnx {C Function} scm_generalized_vector_to_list (v)
  7466. Return a new list whose elements are the elements of the
  7467. generalized vector @var{v}.
  7468. @end deffn
  7469. major-version
  7470. @c snarfed from version.c:35
  7471. @deffn {Scheme Procedure} major-version
  7472. @deffnx {C Function} scm_major_version ()
  7473. Return a string containing Guile's major version number.
  7474. E.g., the 1 in "1.6.5".
  7475. @end deffn
  7476. minor-version
  7477. @c snarfed from version.c:48
  7478. @deffn {Scheme Procedure} minor-version
  7479. @deffnx {C Function} scm_minor_version ()
  7480. Return a string containing Guile's minor version number.
  7481. E.g., the 6 in "1.6.5".
  7482. @end deffn
  7483. micro-version
  7484. @c snarfed from version.c:61
  7485. @deffn {Scheme Procedure} micro-version
  7486. @deffnx {C Function} scm_micro_version ()
  7487. Return a string containing Guile's micro version number.
  7488. E.g., the 5 in "1.6.5".
  7489. @end deffn
  7490. version
  7491. @c snarfed from version.c:83
  7492. @deffn {Scheme Procedure} version
  7493. @deffnx {Scheme Procedure} major-version
  7494. @deffnx {Scheme Procedure} minor-version
  7495. @deffnx {Scheme Procedure} micro-version
  7496. @deffnx {C Function} scm_version ()
  7497. Return a string describing Guile's version number, or its major, minor
  7498. or micro version number, respectively.
  7499. @lisp
  7500. (version) @result{} "1.6.0"
  7501. (major-version) @result{} "1"
  7502. (minor-version) @result{} "6"
  7503. (micro-version) @result{} "0"
  7504. @end lisp
  7505. @end deffn
  7506. effective-version
  7507. @c snarfed from version.c:113
  7508. @deffn {Scheme Procedure} effective-version
  7509. @deffnx {C Function} scm_effective_version ()
  7510. Return a string describing Guile's effective version number.
  7511. @lisp
  7512. (version) @result{} "1.6.0"
  7513. (effective-version) @result{} "1.6"
  7514. (major-version) @result{} "1"
  7515. (minor-version) @result{} "6"
  7516. (micro-version) @result{} "0"
  7517. @end lisp
  7518. @end deffn
  7519. make-soft-port
  7520. @c snarfed from vports.c:185
  7521. @deffn {Scheme Procedure} make-soft-port pv modes
  7522. @deffnx {C Function} scm_make_soft_port (pv, modes)
  7523. Return a port capable of receiving or delivering characters as
  7524. specified by the @var{modes} string (@pxref{File Ports,
  7525. open-file}). @var{pv} must be a vector of length 5 or 6. Its
  7526. components are as follows:
  7527. @enumerate 0
  7528. @item
  7529. procedure accepting one character for output
  7530. @item
  7531. procedure accepting a string for output
  7532. @item
  7533. thunk for flushing output
  7534. @item
  7535. thunk for getting one character
  7536. @item
  7537. thunk for closing port (not by garbage collection)
  7538. @item
  7539. (if present and not @code{#f}) thunk for computing the number of
  7540. characters that can be read from the port without blocking.
  7541. @end enumerate
  7542. For an output-only port only elements 0, 1, 2, and 4 need be
  7543. procedures. For an input-only port only elements 3 and 4 need
  7544. be procedures. Thunks 2 and 4 can instead be @code{#f} if
  7545. there is no useful operation for them to perform.
  7546. If thunk 3 returns @code{#f} or an @code{eof-object}
  7547. (@pxref{Input, eof-object?, ,r5rs, The Revised^5 Report on
  7548. Scheme}) it indicates that the port has reached end-of-file.
  7549. For example:
  7550. @lisp
  7551. (define stdout (current-output-port))
  7552. (define p (make-soft-port
  7553. (vector
  7554. (lambda (c) (write c stdout))
  7555. (lambda (s) (display s stdout))
  7556. (lambda () (display "." stdout))
  7557. (lambda () (char-upcase (read-char)))
  7558. (lambda () (display "@@" stdout)))
  7559. "rw"))
  7560. (write p p) @result{} #<input-output: soft 8081e20>
  7561. @end lisp
  7562. @end deffn
  7563. make-weak-vector
  7564. @c snarfed from weaks.c:74
  7565. @deffn {Scheme Procedure} make-weak-vector size [fill]
  7566. @deffnx {C Function} scm_make_weak_vector (size, fill)
  7567. Return a weak vector with @var{size} elements. If the optional
  7568. argument @var{fill} is given, all entries in the vector will be
  7569. set to @var{fill}. The default value for @var{fill} is the
  7570. empty list.
  7571. @end deffn
  7572. list->weak-vector
  7573. @c snarfed from weaks.c:82
  7574. @deffn {Scheme Procedure} list->weak-vector
  7575. implemented by the C function "scm_weak_vector"
  7576. @end deffn
  7577. weak-vector
  7578. @c snarfed from weaks.c:90
  7579. @deffn {Scheme Procedure} weak-vector . l
  7580. @deffnx {Scheme Procedure} list->weak-vector l
  7581. @deffnx {C Function} scm_weak_vector (l)
  7582. Construct a weak vector from a list: @code{weak-vector} uses
  7583. the list of its arguments while @code{list->weak-vector} uses
  7584. its only argument @var{l} (a list) to construct a weak vector
  7585. the same way @code{list->vector} would.
  7586. @end deffn
  7587. weak-vector?
  7588. @c snarfed from weaks.c:120
  7589. @deffn {Scheme Procedure} weak-vector? obj
  7590. @deffnx {C Function} scm_weak_vector_p (obj)
  7591. Return @code{#t} if @var{obj} is a weak vector. Note that all
  7592. weak hashes are also weak vectors.
  7593. @end deffn
  7594. make-weak-key-alist-vector
  7595. @c snarfed from weaks.c:138
  7596. @deffn {Scheme Procedure} make-weak-key-alist-vector [size]
  7597. @deffnx {Scheme Procedure} make-weak-value-alist-vector size
  7598. @deffnx {Scheme Procedure} make-doubly-weak-alist-vector size
  7599. @deffnx {C Function} scm_make_weak_key_alist_vector (size)
  7600. Return a weak hash table with @var{size} buckets. As with any
  7601. hash table, choosing a good size for the table requires some
  7602. caution.
  7603. You can modify weak hash tables in exactly the same way you
  7604. would modify regular hash tables. (@pxref{Hash Tables})
  7605. @end deffn
  7606. make-weak-value-alist-vector
  7607. @c snarfed from weaks.c:150
  7608. @deffn {Scheme Procedure} make-weak-value-alist-vector [size]
  7609. @deffnx {C Function} scm_make_weak_value_alist_vector (size)
  7610. Return a hash table with weak values with @var{size} buckets.
  7611. (@pxref{Hash Tables})
  7612. @end deffn
  7613. make-doubly-weak-alist-vector
  7614. @c snarfed from weaks.c:162
  7615. @deffn {Scheme Procedure} make-doubly-weak-alist-vector size
  7616. @deffnx {C Function} scm_make_doubly_weak_alist_vector (size)
  7617. Return a hash table with weak keys and values with @var{size}
  7618. buckets. (@pxref{Hash Tables})
  7619. @end deffn
  7620. weak-key-alist-vector?
  7621. @c snarfed from weaks.c:177
  7622. @deffn {Scheme Procedure} weak-key-alist-vector? obj
  7623. @deffnx {Scheme Procedure} weak-value-alist-vector? obj
  7624. @deffnx {Scheme Procedure} doubly-weak-alist-vector? obj
  7625. @deffnx {C Function} scm_weak_key_alist_vector_p (obj)
  7626. Return @code{#t} if @var{obj} is the specified weak hash
  7627. table. Note that a doubly weak hash table is neither a weak key
  7628. nor a weak value hash table.
  7629. @end deffn
  7630. weak-value-alist-vector?
  7631. @c snarfed from weaks.c:187
  7632. @deffn {Scheme Procedure} weak-value-alist-vector? obj
  7633. @deffnx {C Function} scm_weak_value_alist_vector_p (obj)
  7634. Return @code{#t} if @var{obj} is a weak value hash table.
  7635. @end deffn
  7636. doubly-weak-alist-vector?
  7637. @c snarfed from weaks.c:197
  7638. @deffn {Scheme Procedure} doubly-weak-alist-vector? obj
  7639. @deffnx {C Function} scm_doubly_weak_alist_vector_p (obj)
  7640. Return @code{#t} if @var{obj} is a doubly weak hash table.
  7641. @end deffn
  7642. array-fill!
  7643. @c snarfed from ramap.c:352
  7644. @deffn {Scheme Procedure} array-fill! ra fill
  7645. @deffnx {C Function} scm_array_fill_x (ra, fill)
  7646. Store @var{fill} in every element of @var{array}. The value returned
  7647. is unspecified.
  7648. @end deffn
  7649. array-copy-in-order!
  7650. @c snarfed from ramap.c:399
  7651. @deffn {Scheme Procedure} array-copy-in-order!
  7652. implemented by the C function "scm_array_copy_x"
  7653. @end deffn
  7654. array-copy!
  7655. @c snarfed from ramap.c:408
  7656. @deffn {Scheme Procedure} array-copy! src dst
  7657. @deffnx {Scheme Procedure} array-copy-in-order! src dst
  7658. @deffnx {C Function} scm_array_copy_x (src, dst)
  7659. Copy every element from vector or array @var{source} to the
  7660. corresponding element of @var{destination}. @var{destination} must have
  7661. the same rank as @var{source}, and be at least as large in each
  7662. dimension. The order is unspecified.
  7663. @end deffn
  7664. array-map-in-order!
  7665. @c snarfed from ramap.c:798
  7666. @deffn {Scheme Procedure} array-map-in-order!
  7667. implemented by the C function "scm_array_map_x"
  7668. @end deffn
  7669. array-map!
  7670. @c snarfed from ramap.c:809
  7671. @deffn {Scheme Procedure} array-map! ra0 proc . lra
  7672. @deffnx {Scheme Procedure} array-map-in-order! ra0 proc . lra
  7673. @deffnx {C Function} scm_array_map_x (ra0, proc, lra)
  7674. @var{array1}, @dots{} must have the same number of dimensions as
  7675. @var{array0} and have a range for each index which includes the range
  7676. for the corresponding index in @var{array0}. @var{proc} is applied to
  7677. each tuple of elements of @var{array1} @dots{} and the result is stored
  7678. as the corresponding element in @var{array0}. The value returned is
  7679. unspecified. The order of application is unspecified.
  7680. @end deffn
  7681. array-for-each
  7682. @c snarfed from ramap.c:950
  7683. @deffn {Scheme Procedure} array-for-each proc ra0 . lra
  7684. @deffnx {C Function} scm_array_for_each (proc, ra0, lra)
  7685. Apply @var{proc} to each tuple of elements of @var{array0} @dots{}
  7686. in row-major order. The value returned is unspecified.
  7687. @end deffn
  7688. array-index-map!
  7689. @c snarfed from ramap.c:978
  7690. @deffn {Scheme Procedure} array-index-map! ra proc
  7691. @deffnx {C Function} scm_array_index_map_x (ra, proc)
  7692. Apply @var{proc} to the indices of each element of @var{array} in
  7693. turn, storing the result in the corresponding element. The value
  7694. returned and the order of application are unspecified.
  7695. One can implement @var{array-indexes} as
  7696. @lisp
  7697. (define (array-indexes array)
  7698. (let ((ra (apply make-array #f (array-shape array))))
  7699. (array-index-map! ra (lambda x x))
  7700. ra))
  7701. @end lisp
  7702. Another example:
  7703. @lisp
  7704. (define (apl:index-generator n)
  7705. (let ((v (make-uniform-vector n 1)))
  7706. (array-index-map! v (lambda (i) i))
  7707. v))
  7708. @end lisp
  7709. @end deffn
  7710. array?
  7711. @c snarfed from unif.c:501
  7712. @deffn {Scheme Procedure} array? obj [prot]
  7713. @deffnx {C Function} scm_array_p (obj, prot)
  7714. Return @code{#t} if the @var{obj} is an array, and @code{#f} if
  7715. not.
  7716. @end deffn
  7717. typed-array?
  7718. @c snarfed from unif.c:548
  7719. @deffn {Scheme Procedure} typed-array? obj type
  7720. @deffnx {C Function} scm_typed_array_p (obj, type)
  7721. Return @code{#t} if the @var{obj} is an array of type
  7722. @var{type}, and @code{#f} if not.
  7723. @end deffn
  7724. array-rank
  7725. @c snarfed from unif.c:569
  7726. @deffn {Scheme Procedure} array-rank array
  7727. @deffnx {C Function} scm_array_rank (array)
  7728. Return the number of dimensions of the array @var{array.}
  7729. @end deffn
  7730. array-dimensions
  7731. @c snarfed from unif.c:583
  7732. @deffn {Scheme Procedure} array-dimensions ra
  7733. @deffnx {C Function} scm_array_dimensions (ra)
  7734. @code{array-dimensions} is similar to @code{array-shape} but replaces
  7735. elements with a @code{0} minimum with one greater than the maximum. So:
  7736. @lisp
  7737. (array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) 5)
  7738. @end lisp
  7739. @end deffn
  7740. shared-array-root
  7741. @c snarfed from unif.c:611
  7742. @deffn {Scheme Procedure} shared-array-root ra
  7743. @deffnx {C Function} scm_shared_array_root (ra)
  7744. Return the root vector of a shared array.
  7745. @end deffn
  7746. shared-array-offset
  7747. @c snarfed from unif.c:625
  7748. @deffn {Scheme Procedure} shared-array-offset ra
  7749. @deffnx {C Function} scm_shared_array_offset (ra)
  7750. Return the root vector index of the first element in the array.
  7751. @end deffn
  7752. shared-array-increments
  7753. @c snarfed from unif.c:641
  7754. @deffn {Scheme Procedure} shared-array-increments ra
  7755. @deffnx {C Function} scm_shared_array_increments (ra)
  7756. For each dimension, return the distance between elements in the root vector.
  7757. @end deffn
  7758. make-typed-array
  7759. @c snarfed from unif.c:740
  7760. @deffn {Scheme Procedure} make-typed-array type fill . bounds
  7761. @deffnx {C Function} scm_make_typed_array (type, fill, bounds)
  7762. Create and return an array of type @var{type}.
  7763. @end deffn
  7764. make-array
  7765. @c snarfed from unif.c:775
  7766. @deffn {Scheme Procedure} make-array fill . bounds
  7767. @deffnx {C Function} scm_make_array (fill, bounds)
  7768. Create and return an array.
  7769. @end deffn
  7770. dimensions->uniform-array
  7771. @c snarfed from unif.c:790
  7772. @deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
  7773. @deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
  7774. @deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
  7775. Create and return a uniform array or vector of type
  7776. corresponding to @var{prototype} with dimensions @var{dims} or
  7777. length @var{length}. If @var{fill} is supplied, it's used to
  7778. fill the array, otherwise @var{prototype} is used.
  7779. @end deffn
  7780. make-shared-array
  7781. @c snarfed from unif.c:843
  7782. @deffn {Scheme Procedure} make-shared-array oldra mapfunc . dims
  7783. @deffnx {C Function} scm_make_shared_array (oldra, mapfunc, dims)
  7784. @code{make-shared-array} can be used to create shared subarrays of other
  7785. arrays. The @var{mapper} is a function that translates coordinates in
  7786. the new array into coordinates in the old array. A @var{mapper} must be
  7787. linear, and its range must stay within the bounds of the old array, but
  7788. it can be otherwise arbitrary. A simple example:
  7789. @lisp
  7790. (define fred (make-array #f 8 8))
  7791. (define freds-diagonal
  7792. (make-shared-array fred (lambda (i) (list i i)) 8))
  7793. (array-set! freds-diagonal 'foo 3)
  7794. (array-ref fred 3 3) @result{} foo
  7795. (define freds-center
  7796. (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))
  7797. (array-ref freds-center 0 0) @result{} foo
  7798. @end lisp
  7799. @end deffn
  7800. transpose-array
  7801. @c snarfed from unif.c:961
  7802. @deffn {Scheme Procedure} transpose-array ra . args
  7803. @deffnx {C Function} scm_transpose_array (ra, args)
  7804. Return an array sharing contents with @var{array}, but with
  7805. dimensions arranged in a different order. There must be one
  7806. @var{dim} argument for each dimension of @var{array}.
  7807. @var{dim0}, @var{dim1}, @dots{} should be integers between 0
  7808. and the rank of the array to be returned. Each integer in that
  7809. range must appear at least once in the argument list.
  7810. The values of @var{dim0}, @var{dim1}, @dots{} correspond to
  7811. dimensions in the array to be returned, their positions in the
  7812. argument list to dimensions of @var{array}. Several @var{dim}s
  7813. may have the same value, in which case the returned array will
  7814. have smaller rank than @var{array}.
  7815. @lisp
  7816. (transpose-array '#2((a b) (c d)) 1 0) @result{} #2((a c) (b d))
  7817. (transpose-array '#2((a b) (c d)) 0 0) @result{} #1(a d)
  7818. (transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) @result{}
  7819. #2((a 4) (b 5) (c 6))
  7820. @end lisp
  7821. @end deffn
  7822. enclose-array
  7823. @c snarfed from unif.c:1059
  7824. @deffn {Scheme Procedure} enclose-array ra . axes
  7825. @deffnx {C Function} scm_enclose_array (ra, axes)
  7826. @var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than
  7827. the rank of @var{array}. @var{enclose-array} returns an array
  7828. resembling an array of shared arrays. The dimensions of each shared
  7829. array are the same as the @var{dim}th dimensions of the original array,
  7830. the dimensions of the outer array are the same as those of the original
  7831. array that did not match a @var{dim}.
  7832. An enclosed array is not a general Scheme array. Its elements may not
  7833. be set using @code{array-set!}. Two references to the same element of
  7834. an enclosed array will be @code{equal?} but will not in general be
  7835. @code{eq?}. The value returned by @var{array-prototype} when given an
  7836. enclosed array is unspecified.
  7837. examples:
  7838. @lisp
  7839. (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) @result{}
  7840. #<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))>
  7841. (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) @result{}
  7842. #<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))>
  7843. @end lisp
  7844. @end deffn
  7845. array-in-bounds?
  7846. @c snarfed from unif.c:1132
  7847. @deffn {Scheme Procedure} array-in-bounds? v . args
  7848. @deffnx {C Function} scm_array_in_bounds_p (v, args)
  7849. Return @code{#t} if its arguments would be acceptable to
  7850. @code{array-ref}.
  7851. @end deffn
  7852. array-ref
  7853. @c snarfed from unif.c:1209
  7854. @deffn {Scheme Procedure} array-ref v . args
  7855. @deffnx {C Function} scm_array_ref (v, args)
  7856. Return the element at the @code{(index1, index2)} element in
  7857. @var{array}.
  7858. @end deffn
  7859. array-set!
  7860. @c snarfed from unif.c:1226
  7861. @deffn {Scheme Procedure} array-set! v obj . args
  7862. @deffnx {C Function} scm_array_set_x (v, obj, args)
  7863. Set the element at the @code{(index1, index2)} element in @var{array} to
  7864. @var{new-value}. The value returned by array-set! is unspecified.
  7865. @end deffn
  7866. array-contents
  7867. @c snarfed from unif.c:1252
  7868. @deffn {Scheme Procedure} array-contents ra [strict]
  7869. @deffnx {C Function} scm_array_contents (ra, strict)
  7870. If @var{array} may be @dfn{unrolled} into a one dimensional shared array
  7871. without changing their order (last subscript changing fastest), then
  7872. @code{array-contents} returns that shared array, otherwise it returns
  7873. @code{#f}. All arrays made by @var{make-array} and
  7874. @var{make-uniform-array} may be unrolled, some arrays made by
  7875. @var{make-shared-array} may not be.
  7876. If the optional argument @var{strict} is provided, a shared array will
  7877. be returned only if its elements are stored internally contiguous in
  7878. memory.
  7879. @end deffn
  7880. uniform-array-read!
  7881. @c snarfed from unif.c:1352
  7882. @deffn {Scheme Procedure} uniform-array-read! ura [port_or_fd [start [end]]]
  7883. @deffnx {Scheme Procedure} uniform-vector-read! uve [port-or-fdes] [start] [end]
  7884. @deffnx {C Function} scm_uniform_array_read_x (ura, port_or_fd, start, end)
  7885. Attempt to read all elements of @var{ura}, in lexicographic order, as
  7886. binary objects from @var{port-or-fdes}.
  7887. If an end of file is encountered,
  7888. the objects up to that point are put into @var{ura}
  7889. (starting at the beginning) and the remainder of the array is
  7890. unchanged.
  7891. The optional arguments @var{start} and @var{end} allow
  7892. a specified region of a vector (or linearized array) to be read,
  7893. leaving the remainder of the vector unchanged.
  7894. @code{uniform-array-read!} returns the number of objects read.
  7895. @var{port-or-fdes} may be omitted, in which case it defaults to the value
  7896. returned by @code{(current-input-port)}.
  7897. @end deffn
  7898. uniform-array-write
  7899. @c snarfed from unif.c:1406
  7900. @deffn {Scheme Procedure} uniform-array-write ura [port_or_fd [start [end]]]
  7901. @deffnx {C Function} scm_uniform_array_write (ura, port_or_fd, start, end)
  7902. Writes all elements of @var{ura} as binary objects to
  7903. @var{port-or-fdes}.
  7904. The optional arguments @var{start}
  7905. and @var{end} allow
  7906. a specified region of a vector (or linearized array) to be written.
  7907. The number of objects actually written is returned.
  7908. @var{port-or-fdes} may be
  7909. omitted, in which case it defaults to the value returned by
  7910. @code{(current-output-port)}.
  7911. @end deffn
  7912. bitvector?
  7913. @c snarfed from unif.c:1518
  7914. @deffn {Scheme Procedure} bitvector? obj
  7915. @deffnx {C Function} scm_bitvector_p (obj)
  7916. Return @code{#t} when @var{obj} is a bitvector, else
  7917. return @code{#f}.
  7918. @end deffn
  7919. make-bitvector
  7920. @c snarfed from unif.c:1545
  7921. @deffn {Scheme Procedure} make-bitvector len [fill]
  7922. @deffnx {C Function} scm_make_bitvector (len, fill)
  7923. Create a new bitvector of length @var{len} and
  7924. optionally initialize all elements to @var{fill}.
  7925. @end deffn
  7926. bitvector
  7927. @c snarfed from unif.c:1554
  7928. @deffn {Scheme Procedure} bitvector . bits
  7929. @deffnx {C Function} scm_bitvector (bits)
  7930. Create a new bitvector with the arguments as elements.
  7931. @end deffn
  7932. bitvector-length
  7933. @c snarfed from unif.c:1570
  7934. @deffn {Scheme Procedure} bitvector-length vec
  7935. @deffnx {C Function} scm_bitvector_length (vec)
  7936. Return the length of the bitvector @var{vec}.
  7937. @end deffn
  7938. bitvector-ref
  7939. @c snarfed from unif.c:1661
  7940. @deffn {Scheme Procedure} bitvector-ref vec idx
  7941. @deffnx {C Function} scm_bitvector_ref (vec, idx)
  7942. Return the element at index @var{idx} of the bitvector
  7943. @var{vec}.
  7944. @end deffn
  7945. bitvector-set!
  7946. @c snarfed from unif.c:1704
  7947. @deffn {Scheme Procedure} bitvector-set! vec idx val
  7948. @deffnx {C Function} scm_bitvector_set_x (vec, idx, val)
  7949. Set the element at index @var{idx} of the bitvector
  7950. @var{vec} when @var{val} is true, else clear it.
  7951. @end deffn
  7952. bitvector-fill!
  7953. @c snarfed from unif.c:1715
  7954. @deffn {Scheme Procedure} bitvector-fill! vec val
  7955. @deffnx {C Function} scm_bitvector_fill_x (vec, val)
  7956. Set all elements of the bitvector
  7957. @var{vec} when @var{val} is true, else clear them.
  7958. @end deffn
  7959. list->bitvector
  7960. @c snarfed from unif.c:1760
  7961. @deffn {Scheme Procedure} list->bitvector list
  7962. @deffnx {C Function} scm_list_to_bitvector (list)
  7963. Return a new bitvector initialized with the elements
  7964. of @var{list}.
  7965. @end deffn
  7966. bitvector->list
  7967. @c snarfed from unif.c:1790
  7968. @deffn {Scheme Procedure} bitvector->list vec
  7969. @deffnx {C Function} scm_bitvector_to_list (vec)
  7970. Return a new list initialized with the elements
  7971. of the bitvector @var{vec}.
  7972. @end deffn
  7973. bit-count
  7974. @c snarfed from unif.c:1854
  7975. @deffn {Scheme Procedure} bit-count b bitvector
  7976. @deffnx {C Function} scm_bit_count (b, bitvector)
  7977. Return the number of occurrences of the boolean @var{b} in
  7978. @var{bitvector}.
  7979. @end deffn
  7980. bit-position
  7981. @c snarfed from unif.c:1923
  7982. @deffn {Scheme Procedure} bit-position item v k
  7983. @deffnx {C Function} scm_bit_position (item, v, k)
  7984. Return the index of the first occurrance of @var{item} in bit
  7985. vector @var{v}, starting from @var{k}. If there is no
  7986. @var{item} entry between @var{k} and the end of
  7987. @var{bitvector}, then return @code{#f}. For example,
  7988. @example
  7989. (bit-position #t #*000101 0) @result{} 3
  7990. (bit-position #f #*0001111 3) @result{} #f
  7991. @end example
  7992. @end deffn
  7993. bit-set*!
  7994. @c snarfed from unif.c:2006
  7995. @deffn {Scheme Procedure} bit-set*! v kv obj
  7996. @deffnx {C Function} scm_bit_set_star_x (v, kv, obj)
  7997. Set entries of bit vector @var{v} to @var{obj}, with @var{kv}
  7998. selecting the entries to change. The return value is
  7999. unspecified.
  8000. If @var{kv} is a bit vector, then those entries where it has
  8001. @code{#t} are the ones in @var{v} which are set to @var{obj}.
  8002. @var{kv} and @var{v} must be the same length. When @var{obj}
  8003. is @code{#t} it's like @var{kv} is OR'ed into @var{v}. Or when
  8004. @var{obj} is @code{#f} it can be seen as an ANDNOT.
  8005. @example
  8006. (define bv #*01000010)
  8007. (bit-set*! bv #*10010001 #t)
  8008. bv
  8009. @result{} #*11010011
  8010. @end example
  8011. If @var{kv} is a u32vector, then its elements are
  8012. indices into @var{v} which are set to @var{obj}.
  8013. @example
  8014. (define bv #*01000010)
  8015. (bit-set*! bv #u32(5 2 7) #t)
  8016. bv
  8017. @result{} #*01100111
  8018. @end example
  8019. @end deffn
  8020. bit-count*
  8021. @c snarfed from unif.c:2109
  8022. @deffn {Scheme Procedure} bit-count* v kv obj
  8023. @deffnx {C Function} scm_bit_count_star (v, kv, obj)
  8024. Return a count of how many entries in bit vector @var{v} are
  8025. equal to @var{obj}, with @var{kv} selecting the entries to
  8026. consider.
  8027. If @var{kv} is a bit vector, then those entries where it has
  8028. @code{#t} are the ones in @var{v} which are considered.
  8029. @var{kv} and @var{v} must be the same length.
  8030. If @var{kv} is a u32vector, then it contains
  8031. the indexes in @var{v} to consider.
  8032. For example,
  8033. @example
  8034. (bit-count* #*01110111 #*11001101 #t) @result{} 3
  8035. (bit-count* #*01110111 #u32(7 0 4) #f) @result{} 2
  8036. @end example
  8037. @end deffn
  8038. bit-invert!
  8039. @c snarfed from unif.c:2196
  8040. @deffn {Scheme Procedure} bit-invert! v
  8041. @deffnx {C Function} scm_bit_invert_x (v)
  8042. Modify the bit vector @var{v} by replacing each element with
  8043. its negation.
  8044. @end deffn
  8045. array->list
  8046. @c snarfed from unif.c:2303
  8047. @deffn {Scheme Procedure} array->list v
  8048. @deffnx {C Function} scm_array_to_list (v)
  8049. Return a list consisting of all the elements, in order, of
  8050. @var{array}.
  8051. @end deffn
  8052. list->typed-array
  8053. @c snarfed from unif.c:2332
  8054. @deffn {Scheme Procedure} list->typed-array type shape lst
  8055. @deffnx {C Function} scm_list_to_typed_array (type, shape, lst)
  8056. Return an array of the type @var{type}
  8057. with elements the same as those of @var{lst}.
  8058. The argument @var{shape} determines the number of dimensions
  8059. of the array and their shape. It is either an exact integer,
  8060. giving the
  8061. number of dimensions directly, or a list whose length
  8062. specifies the number of dimensions and each element specified
  8063. the lower and optionally the upper bound of the corresponding
  8064. dimension.
  8065. When the element is list of two elements, these elements
  8066. give the lower and upper bounds. When it is an exact
  8067. integer, it gives only the lower bound.
  8068. @end deffn
  8069. list->array
  8070. @c snarfed from unif.c:2390
  8071. @deffn {Scheme Procedure} list->array ndim lst
  8072. @deffnx {C Function} scm_list_to_array (ndim, lst)
  8073. Return an array with elements the same as those of @var{lst}.
  8074. @end deffn
  8075. list->uniform-array
  8076. @c snarfed from unif.c:2440
  8077. @deffn {Scheme Procedure} list->uniform-array ndim prot lst
  8078. @deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
  8079. Return a uniform array of the type indicated by prototype
  8080. @var{prot} with elements the same as those of @var{lst}.
  8081. Elements must be of the appropriate type, no coercions are
  8082. done.
  8083. The argument @var{ndim} determines the number of dimensions
  8084. of the array. It is either an exact integer, giving the
  8085. number directly, or a list of exact integers, whose length
  8086. specifies the number of dimensions and each element is the
  8087. lower index bound of its dimension.
  8088. @end deffn
  8089. array-type
  8090. @c snarfed from unif.c:2789
  8091. @deffn {Scheme Procedure} array-type ra
  8092. @deffnx {C Function} scm_array_type (ra)
  8093. @end deffn
  8094. array-prototype
  8095. @c snarfed from unif.c:2809
  8096. @deffn {Scheme Procedure} array-prototype ra
  8097. @deffnx {C Function} scm_array_prototype (ra)
  8098. Return an object that would produce an array of the same type
  8099. as @var{array}, if used as the @var{prototype} for
  8100. @code{make-uniform-array}.
  8101. @end deffn
  8102. dynamic-link
  8103. @c snarfed from dynl.c:149
  8104. @deffn {Scheme Procedure} dynamic-link filename
  8105. @deffnx {C Function} scm_dynamic_link (filename)
  8106. Find the shared object (shared library) denoted by
  8107. @var{filename} and link it into the running Guile
  8108. application. The returned
  8109. scheme object is a ``handle'' for the library which can
  8110. be passed to @code{dynamic-func}, @code{dynamic-call} etc.
  8111. Searching for object files is system dependent. Normally,
  8112. if @var{filename} does have an explicit directory it will
  8113. be searched for in locations
  8114. such as @file{/usr/lib} and @file{/usr/local/lib}.
  8115. @end deffn
  8116. dynamic-object?
  8117. @c snarfed from dynl.c:168
  8118. @deffn {Scheme Procedure} dynamic-object? obj
  8119. @deffnx {C Function} scm_dynamic_object_p (obj)
  8120. Return @code{#t} if @var{obj} is a dynamic object handle,
  8121. or @code{#f} otherwise.
  8122. @end deffn
  8123. dynamic-unlink
  8124. @c snarfed from dynl.c:182
  8125. @deffn {Scheme Procedure} dynamic-unlink dobj
  8126. @deffnx {C Function} scm_dynamic_unlink (dobj)
  8127. Unlink a dynamic object from the application, if possible. The
  8128. object must have been linked by @code{dynamic-link}, with
  8129. @var{dobj} the corresponding handle. After this procedure
  8130. is called, the handle can no longer be used to access the
  8131. object.
  8132. @end deffn
  8133. dynamic-func
  8134. @c snarfed from dynl.c:207
  8135. @deffn {Scheme Procedure} dynamic-func name dobj
  8136. @deffnx {C Function} scm_dynamic_func (name, dobj)
  8137. Return a ``handle'' for the function @var{name} in the
  8138. shared object referred to by @var{dobj}. The handle
  8139. can be passed to @code{dynamic-call} to actually
  8140. call the function.
  8141. Regardless whether your C compiler prepends an underscore
  8142. @samp{_} to the global names in a program, you should
  8143. @strong{not} include this underscore in @var{name}
  8144. since it will be added automatically when necessary.
  8145. @end deffn
  8146. dynamic-call
  8147. @c snarfed from dynl.c:253
  8148. @deffn {Scheme Procedure} dynamic-call func dobj
  8149. @deffnx {C Function} scm_dynamic_call (func, dobj)
  8150. Call a C function in a dynamic object. Two styles of
  8151. invocation are supported:
  8152. @itemize @bullet
  8153. @item @var{func} can be a function handle returned by
  8154. @code{dynamic-func}. In this case @var{dobj} is
  8155. ignored
  8156. @item @var{func} can be a string with the name of the
  8157. function to call, with @var{dobj} the handle of the
  8158. dynamic object in which to find the function.
  8159. This is equivalent to
  8160. @smallexample
  8161. (dynamic-call (dynamic-func @var{func} @var{dobj}) #f)
  8162. @end smallexample
  8163. @end itemize
  8164. In either case, the function is passed no arguments
  8165. and its return value is ignored.
  8166. @end deffn
  8167. dynamic-args-call
  8168. @c snarfed from dynl.c:285
  8169. @deffn {Scheme Procedure} dynamic-args-call func dobj args
  8170. @deffnx {C Function} scm_dynamic_args_call (func, dobj, args)
  8171. Call the C function indicated by @var{func} and @var{dobj},
  8172. just like @code{dynamic-call}, but pass it some arguments and
  8173. return its return value. The C function is expected to take
  8174. two arguments and return an @code{int}, just like @code{main}:
  8175. @smallexample
  8176. int c_func (int argc, char **argv);
  8177. @end smallexample
  8178. The parameter @var{args} must be a list of strings and is
  8179. converted into an array of @code{char *}. The array is passed
  8180. in @var{argv} and its size in @var{argc}. The return value is
  8181. converted to a Scheme number and returned from the call to
  8182. @code{dynamic-args-call}.
  8183. @end deffn
  8184. chown
  8185. @c snarfed from filesys.c:224
  8186. @deffn {Scheme Procedure} chown object owner group
  8187. @deffnx {C Function} scm_chown (object, owner, group)
  8188. Change the ownership and group of the file referred to by @var{object} to
  8189. the integer values @var{owner} and @var{group}. @var{object} can be
  8190. a string containing a file name or, if the platform
  8191. supports fchown, a port or integer file descriptor
  8192. which is open on the file. The return value
  8193. is unspecified.
  8194. If @var{object} is a symbolic link, either the
  8195. ownership of the link or the ownership of the referenced file will be
  8196. changed depending on the operating system (lchown is
  8197. unsupported at present). If @var{owner} or @var{group} is specified
  8198. as @code{-1}, then that ID is not changed.
  8199. @end deffn
  8200. chmod
  8201. @c snarfed from filesys.c:262
  8202. @deffn {Scheme Procedure} chmod object mode
  8203. @deffnx {C Function} scm_chmod (object, mode)
  8204. Changes the permissions of the file referred to by @var{obj}.
  8205. @var{obj} can be a string containing a file name or a port or integer file
  8206. descriptor which is open on a file (in which case @code{fchmod} is used
  8207. as the underlying system call).
  8208. @var{mode} specifies
  8209. the new permissions as a decimal number, e.g., @code{(chmod "foo" #o755)}.
  8210. The return value is unspecified.
  8211. @end deffn
  8212. umask
  8213. @c snarfed from filesys.c:294
  8214. @deffn {Scheme Procedure} umask [mode]
  8215. @deffnx {C Function} scm_umask (mode)
  8216. If @var{mode} is omitted, returns a decimal number representing the current
  8217. file creation mask. Otherwise the file creation mask is set to
  8218. @var{mode} and the previous value is returned.
  8219. E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18.
  8220. @end deffn
  8221. open-fdes
  8222. @c snarfed from filesys.c:316
  8223. @deffn {Scheme Procedure} open-fdes path flags [mode]
  8224. @deffnx {C Function} scm_open_fdes (path, flags, mode)
  8225. Similar to @code{open} but return a file descriptor instead of
  8226. a port.
  8227. @end deffn
  8228. open
  8229. @c snarfed from filesys.c:357
  8230. @deffn {Scheme Procedure} open path flags [mode]
  8231. @deffnx {C Function} scm_open (path, flags, mode)
  8232. Open the file named by @var{path} for reading and/or writing.
  8233. @var{flags} is an integer specifying how the file should be opened.
  8234. @var{mode} is an integer specifying the permission bits of the file, if
  8235. it needs to be created, before the umask is applied. The default is 666
  8236. (Unix itself has no default).
  8237. @var{flags} can be constructed by combining variables using @code{logior}.
  8238. Basic flags are:
  8239. @defvar O_RDONLY
  8240. Open the file read-only.
  8241. @end defvar
  8242. @defvar O_WRONLY
  8243. Open the file write-only.
  8244. @end defvar
  8245. @defvar O_RDWR
  8246. Open the file read/write.
  8247. @end defvar
  8248. @defvar O_APPEND
  8249. Append to the file instead of truncating.
  8250. @end defvar
  8251. @defvar O_CREAT
  8252. Create the file if it does not already exist.
  8253. @end defvar
  8254. See the Unix documentation of the @code{open} system call
  8255. for additional flags.
  8256. @end deffn
  8257. close
  8258. @c snarfed from filesys.c:395
  8259. @deffn {Scheme Procedure} close fd_or_port
  8260. @deffnx {C Function} scm_close (fd_or_port)
  8261. Similar to close-port (@pxref{Closing, close-port}),
  8262. but also works on file descriptors. A side
  8263. effect of closing a file descriptor is that any ports using that file
  8264. descriptor are moved to a different file descriptor and have
  8265. their revealed counts set to zero.
  8266. @end deffn
  8267. close-fdes
  8268. @c snarfed from filesys.c:422
  8269. @deffn {Scheme Procedure} close-fdes fd
  8270. @deffnx {C Function} scm_close_fdes (fd)
  8271. A simple wrapper for the @code{close} system call.
  8272. Close file descriptor @var{fd}, which must be an integer.
  8273. Unlike close (@pxref{Ports and File Descriptors, close}),
  8274. the file descriptor will be closed even if a port is using it.
  8275. The return value is unspecified.
  8276. @end deffn
  8277. stat
  8278. @c snarfed from filesys.c:624
  8279. @deffn {Scheme Procedure} stat object
  8280. @deffnx {C Function} scm_stat (object)
  8281. Return an object containing various information about the file
  8282. determined by @var{obj}. @var{obj} can be a string containing
  8283. a file name or a port or integer file descriptor which is open
  8284. on a file (in which case @code{fstat} is used as the underlying
  8285. system call).
  8286. The object returned by @code{stat} can be passed as a single
  8287. parameter to the following procedures, all of which return
  8288. integers:
  8289. @table @code
  8290. @item stat:dev
  8291. The device containing the file.
  8292. @item stat:ino
  8293. The file serial number, which distinguishes this file from all
  8294. other files on the same device.
  8295. @item stat:mode
  8296. The mode of the file. This includes file type information and
  8297. the file permission bits. See @code{stat:type} and
  8298. @code{stat:perms} below.
  8299. @item stat:nlink
  8300. The number of hard links to the file.
  8301. @item stat:uid
  8302. The user ID of the file's owner.
  8303. @item stat:gid
  8304. The group ID of the file.
  8305. @item stat:rdev
  8306. Device ID; this entry is defined only for character or block
  8307. special files.
  8308. @item stat:size
  8309. The size of a regular file in bytes.
  8310. @item stat:atime
  8311. The last access time for the file.
  8312. @item stat:mtime
  8313. The last modification time for the file.
  8314. @item stat:ctime
  8315. The last modification time for the attributes of the file.
  8316. @item stat:blksize
  8317. The optimal block size for reading or writing the file, in
  8318. bytes.
  8319. @item stat:blocks
  8320. The amount of disk space that the file occupies measured in
  8321. units of 512 byte blocks.
  8322. @end table
  8323. In addition, the following procedures return the information
  8324. from stat:mode in a more convenient form:
  8325. @table @code
  8326. @item stat:type
  8327. A symbol representing the type of file. Possible values are
  8328. regular, directory, symlink, block-special, char-special, fifo,
  8329. socket and unknown
  8330. @item stat:perms
  8331. An integer representing the access permission bits.
  8332. @end table
  8333. @end deffn
  8334. link
  8335. @c snarfed from filesys.c:686
  8336. @deffn {Scheme Procedure} link oldpath newpath
  8337. @deffnx {C Function} scm_link (oldpath, newpath)
  8338. Creates a new name @var{newpath} in the file system for the
  8339. file named by @var{oldpath}. If @var{oldpath} is a symbolic
  8340. link, the link may or may not be followed depending on the
  8341. system.
  8342. @end deffn
  8343. rename-file
  8344. @c snarfed from filesys.c:724
  8345. @deffn {Scheme Procedure} rename-file oldname newname
  8346. @deffnx {C Function} scm_rename (oldname, newname)
  8347. Renames the file specified by @var{oldname} to @var{newname}.
  8348. The return value is unspecified.
  8349. @end deffn
  8350. delete-file
  8351. @c snarfed from filesys.c:741
  8352. @deffn {Scheme Procedure} delete-file str
  8353. @deffnx {C Function} scm_delete_file (str)
  8354. Deletes (or "unlinks") the file specified by @var{path}.
  8355. @end deffn
  8356. mkdir
  8357. @c snarfed from filesys.c:758
  8358. @deffn {Scheme Procedure} mkdir path [mode]
  8359. @deffnx {C Function} scm_mkdir (path, mode)
  8360. Create a new directory named by @var{path}. If @var{mode} is omitted
  8361. then the permissions of the directory file are set using the current
  8362. umask. Otherwise they are set to the decimal value specified with
  8363. @var{mode}. The return value is unspecified.
  8364. @end deffn
  8365. rmdir
  8366. @c snarfed from filesys.c:785
  8367. @deffn {Scheme Procedure} rmdir path
  8368. @deffnx {C Function} scm_rmdir (path)
  8369. Remove the existing directory named by @var{path}. The directory must
  8370. be empty for this to succeed. The return value is unspecified.
  8371. @end deffn
  8372. directory-stream?
  8373. @c snarfed from filesys.c:809
  8374. @deffn {Scheme Procedure} directory-stream? obj
  8375. @deffnx {C Function} scm_directory_stream_p (obj)
  8376. Return a boolean indicating whether @var{object} is a directory
  8377. stream as returned by @code{opendir}.
  8378. @end deffn
  8379. opendir
  8380. @c snarfed from filesys.c:820
  8381. @deffn {Scheme Procedure} opendir dirname
  8382. @deffnx {C Function} scm_opendir (dirname)
  8383. Open the directory specified by @var{path} and return a directory
  8384. stream.
  8385. @end deffn
  8386. readdir
  8387. @c snarfed from filesys.c:841
  8388. @deffn {Scheme Procedure} readdir port
  8389. @deffnx {C Function} scm_readdir (port)
  8390. Return (as a string) the next directory entry from the directory stream
  8391. @var{stream}. If there is no remaining entry to be read then the
  8392. end of file object is returned.
  8393. @end deffn
  8394. rewinddir
  8395. @c snarfed from filesys.c:880
  8396. @deffn {Scheme Procedure} rewinddir port
  8397. @deffnx {C Function} scm_rewinddir (port)
  8398. Reset the directory port @var{stream} so that the next call to
  8399. @code{readdir} will return the first directory entry.
  8400. @end deffn
  8401. closedir
  8402. @c snarfed from filesys.c:897
  8403. @deffn {Scheme Procedure} closedir port
  8404. @deffnx {C Function} scm_closedir (port)
  8405. Close the directory stream @var{stream}.
  8406. The return value is unspecified.
  8407. @end deffn
  8408. chdir
  8409. @c snarfed from filesys.c:947
  8410. @deffn {Scheme Procedure} chdir str
  8411. @deffnx {C Function} scm_chdir (str)
  8412. Change the current working directory to @var{path}.
  8413. The return value is unspecified.
  8414. @end deffn
  8415. getcwd
  8416. @c snarfed from filesys.c:962
  8417. @deffn {Scheme Procedure} getcwd
  8418. @deffnx {C Function} scm_getcwd ()
  8419. Return the name of the current working directory.
  8420. @end deffn
  8421. select
  8422. @c snarfed from filesys.c:1164
  8423. @deffn {Scheme Procedure} select reads writes excepts [secs [usecs]]
  8424. @deffnx {C Function} scm_select (reads, writes, excepts, secs, usecs)
  8425. This procedure has a variety of uses: waiting for the ability
  8426. to provide input, accept output, or the existence of
  8427. exceptional conditions on a collection of ports or file
  8428. descriptors, or waiting for a timeout to occur.
  8429. It also returns if interrupted by a signal.
  8430. @var{reads}, @var{writes} and @var{excepts} can be lists or
  8431. vectors, with each member a port or a file descriptor.
  8432. The value returned is a list of three corresponding
  8433. lists or vectors containing only the members which meet the
  8434. specified requirement. The ability of port buffers to
  8435. provide input or accept output is taken into account.
  8436. Ordering of the input lists or vectors is not preserved.
  8437. The optional arguments @var{secs} and @var{usecs} specify the
  8438. timeout. Either @var{secs} can be specified alone, as
  8439. either an integer or a real number, or both @var{secs} and
  8440. @var{usecs} can be specified as integers, in which case
  8441. @var{usecs} is an additional timeout expressed in
  8442. microseconds. If @var{secs} is omitted or is @code{#f} then
  8443. select will wait for as long as it takes for one of the other
  8444. conditions to be satisfied.
  8445. The scsh version of @code{select} differs as follows:
  8446. Only vectors are accepted for the first three arguments.
  8447. The @var{usecs} argument is not supported.
  8448. Multiple values are returned instead of a list.
  8449. Duplicates in the input vectors appear only once in output.
  8450. An additional @code{select!} interface is provided.
  8451. @end deffn
  8452. fcntl
  8453. @c snarfed from filesys.c:1302
  8454. @deffn {Scheme Procedure} fcntl object cmd [value]
  8455. @deffnx {C Function} scm_fcntl (object, cmd, value)
  8456. Apply @var{command} to the specified file descriptor or the underlying
  8457. file descriptor of the specified port. @var{value} is an optional
  8458. integer argument.
  8459. Values for @var{command} are:
  8460. @table @code
  8461. @item F_DUPFD
  8462. Duplicate a file descriptor
  8463. @item F_GETFD
  8464. Get flags associated with the file descriptor.
  8465. @item F_SETFD
  8466. Set flags associated with the file descriptor to @var{value}.
  8467. @item F_GETFL
  8468. Get flags associated with the open file.
  8469. @item F_SETFL
  8470. Set flags associated with the open file to @var{value}
  8471. @item F_GETOWN
  8472. Get the process ID of a socket's owner, for @code{SIGIO} signals.
  8473. @item F_SETOWN
  8474. Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.
  8475. @item FD_CLOEXEC
  8476. The value used to indicate the "close on exec" flag with @code{F_GETFL} or
  8477. @code{F_SETFL}.
  8478. @end table
  8479. @end deffn
  8480. fsync
  8481. @c snarfed from filesys.c:1334
  8482. @deffn {Scheme Procedure} fsync object
  8483. @deffnx {C Function} scm_fsync (object)
  8484. Copies any unwritten data for the specified output file descriptor to disk.
  8485. If @var{port/fd} is a port, its buffer is flushed before the underlying
  8486. file descriptor is fsync'd.
  8487. The return value is unspecified.
  8488. @end deffn
  8489. symlink
  8490. @c snarfed from filesys.c:1359
  8491. @deffn {Scheme Procedure} symlink oldpath newpath
  8492. @deffnx {C Function} scm_symlink (oldpath, newpath)
  8493. Create a symbolic link named @var{path-to} with the value (i.e., pointing to)
  8494. @var{path-from}. The return value is unspecified.
  8495. @end deffn
  8496. readlink
  8497. @c snarfed from filesys.c:1378
  8498. @deffn {Scheme Procedure} readlink path
  8499. @deffnx {C Function} scm_readlink (path)
  8500. Return the value of the symbolic link named by @var{path} (a
  8501. string), i.e., the file that the link points to.
  8502. @end deffn
  8503. lstat
  8504. @c snarfed from filesys.c:1420
  8505. @deffn {Scheme Procedure} lstat str
  8506. @deffnx {C Function} scm_lstat (str)
  8507. Similar to @code{stat}, but does not follow symbolic links, i.e.,
  8508. it will return information about a symbolic link itself, not the
  8509. file it points to. @var{path} must be a string.
  8510. @end deffn
  8511. copy-file
  8512. @c snarfed from filesys.c:1443
  8513. @deffn {Scheme Procedure} copy-file oldfile newfile
  8514. @deffnx {C Function} scm_copy_file (oldfile, newfile)
  8515. Copy the file specified by @var{path-from} to @var{path-to}.
  8516. The return value is unspecified.
  8517. @end deffn
  8518. dirname
  8519. @c snarfed from filesys.c:1506
  8520. @deffn {Scheme Procedure} dirname filename
  8521. @deffnx {C Function} scm_dirname (filename)
  8522. Return the directory name component of the file name
  8523. @var{filename}. If @var{filename} does not contain a directory
  8524. component, @code{.} is returned.
  8525. @end deffn
  8526. basename
  8527. @c snarfed from filesys.c:1549
  8528. @deffn {Scheme Procedure} basename filename [suffix]
  8529. @deffnx {C Function} scm_basename (filename, suffix)
  8530. Return the base name of the file name @var{filename}. The
  8531. base name is the file name without any directory components.
  8532. If @var{suffix} is provided, and is equal to the end of
  8533. @var{basename}, it is removed also.
  8534. @end deffn
  8535. pipe
  8536. @c snarfed from posix.c:233
  8537. @deffn {Scheme Procedure} pipe
  8538. @deffnx {C Function} scm_pipe ()
  8539. Return a newly created pipe: a pair of ports which are linked
  8540. together on the local machine. The @emph{car} is the input
  8541. port and the @emph{cdr} is the output port. Data written (and
  8542. flushed) to the output port can be read from the input port.
  8543. Pipes are commonly used for communication with a newly forked
  8544. child process. The need to flush the output port can be
  8545. avoided by making it unbuffered using @code{setvbuf}.
  8546. Writes occur atomically provided the size of the data in bytes
  8547. is not greater than the value of @code{PIPE_BUF}. Note that
  8548. the output port is likely to block if too much data (typically
  8549. equal to @code{PIPE_BUF}) has been written but not yet read
  8550. from the input port.
  8551. @end deffn
  8552. getgroups
  8553. @c snarfed from posix.c:254
  8554. @deffn {Scheme Procedure} getgroups
  8555. @deffnx {C Function} scm_getgroups ()
  8556. Return a vector of integers representing the current
  8557. supplementary group IDs.
  8558. @end deffn
  8559. setgroups
  8560. @c snarfed from posix.c:287
  8561. @deffn {Scheme Procedure} setgroups group_vec
  8562. @deffnx {C Function} scm_setgroups (group_vec)
  8563. Set the current set of supplementary group IDs to the integers
  8564. in the given vector @var{vec}. The return value is
  8565. unspecified.
  8566. Generally only the superuser can set the process group IDs.
  8567. @end deffn
  8568. getpw
  8569. @c snarfed from posix.c:336
  8570. @deffn {Scheme Procedure} getpw [user]
  8571. @deffnx {C Function} scm_getpwuid (user)
  8572. Look up an entry in the user database. @var{obj} can be an integer,
  8573. a string, or omitted, giving the behaviour of getpwuid, getpwnam
  8574. or getpwent respectively.
  8575. @end deffn
  8576. setpw
  8577. @c snarfed from posix.c:386
  8578. @deffn {Scheme Procedure} setpw [arg]
  8579. @deffnx {C Function} scm_setpwent (arg)
  8580. If called with a true argument, initialize or reset the password data
  8581. stream. Otherwise, close the stream. The @code{setpwent} and
  8582. @code{endpwent} procedures are implemented on top of this.
  8583. @end deffn
  8584. getgr
  8585. @c snarfed from posix.c:405
  8586. @deffn {Scheme Procedure} getgr [name]
  8587. @deffnx {C Function} scm_getgrgid (name)
  8588. Look up an entry in the group database. @var{obj} can be an integer,
  8589. a string, or omitted, giving the behaviour of getgrgid, getgrnam
  8590. or getgrent respectively.
  8591. @end deffn
  8592. setgr
  8593. @c snarfed from posix.c:441
  8594. @deffn {Scheme Procedure} setgr [arg]
  8595. @deffnx {C Function} scm_setgrent (arg)
  8596. If called with a true argument, initialize or reset the group data
  8597. stream. Otherwise, close the stream. The @code{setgrent} and
  8598. @code{endgrent} procedures are implemented on top of this.
  8599. @end deffn
  8600. kill
  8601. @c snarfed from posix.c:477
  8602. @deffn {Scheme Procedure} kill pid sig
  8603. @deffnx {C Function} scm_kill (pid, sig)
  8604. Sends a signal to the specified process or group of processes.
  8605. @var{pid} specifies the processes to which the signal is sent:
  8606. @table @r
  8607. @item @var{pid} greater than 0
  8608. The process whose identifier is @var{pid}.
  8609. @item @var{pid} equal to 0
  8610. All processes in the current process group.
  8611. @item @var{pid} less than -1
  8612. The process group whose identifier is -@var{pid}
  8613. @item @var{pid} equal to -1
  8614. If the process is privileged, all processes except for some special
  8615. system processes. Otherwise, all processes with the current effective
  8616. user ID.
  8617. @end table
  8618. @var{sig} should be specified using a variable corresponding to
  8619. the Unix symbolic name, e.g.,
  8620. @defvar SIGHUP
  8621. Hang-up signal.
  8622. @end defvar
  8623. @defvar SIGINT
  8624. Interrupt signal.
  8625. @end defvar
  8626. @end deffn
  8627. waitpid
  8628. @c snarfed from posix.c:528
  8629. @deffn {Scheme Procedure} waitpid pid [options]
  8630. @deffnx {C Function} scm_waitpid (pid, options)
  8631. This procedure collects status information from a child process which
  8632. has terminated or (optionally) stopped. Normally it will
  8633. suspend the calling process until this can be done. If more than one
  8634. child process is eligible then one will be chosen by the operating system.
  8635. The value of @var{pid} determines the behaviour:
  8636. @table @r
  8637. @item @var{pid} greater than 0
  8638. Request status information from the specified child process.
  8639. @item @var{pid} equal to -1 or WAIT_ANY
  8640. Request status information for any child process.
  8641. @item @var{pid} equal to 0 or WAIT_MYPGRP
  8642. Request status information for any child process in the current process
  8643. group.
  8644. @item @var{pid} less than -1
  8645. Request status information for any child process whose process group ID
  8646. is -@var{PID}.
  8647. @end table
  8648. The @var{options} argument, if supplied, should be the bitwise OR of the
  8649. values of zero or more of the following variables:
  8650. @defvar WNOHANG
  8651. Return immediately even if there are no child processes to be collected.
  8652. @end defvar
  8653. @defvar WUNTRACED
  8654. Report status information for stopped processes as well as terminated
  8655. processes.
  8656. @end defvar
  8657. The return value is a pair containing:
  8658. @enumerate
  8659. @item
  8660. The process ID of the child process, or 0 if @code{WNOHANG} was
  8661. specified and no process was collected.
  8662. @item
  8663. The integer status value.
  8664. @end enumerate
  8665. @end deffn
  8666. status:exit-val
  8667. @c snarfed from posix.c:554
  8668. @deffn {Scheme Procedure} status:exit-val status
  8669. @deffnx {C Function} scm_status_exit_val (status)
  8670. Return the exit status value, as would be set if a process
  8671. ended normally through a call to @code{exit} or @code{_exit},
  8672. if any, otherwise @code{#f}.
  8673. @end deffn
  8674. status:term-sig
  8675. @c snarfed from posix.c:572
  8676. @deffn {Scheme Procedure} status:term-sig status
  8677. @deffnx {C Function} scm_status_term_sig (status)
  8678. Return the signal number which terminated the process, if any,
  8679. otherwise @code{#f}.
  8680. @end deffn
  8681. status:stop-sig
  8682. @c snarfed from posix.c:588
  8683. @deffn {Scheme Procedure} status:stop-sig status
  8684. @deffnx {C Function} scm_status_stop_sig (status)
  8685. Return the signal number which stopped the process, if any,
  8686. otherwise @code{#f}.
  8687. @end deffn
  8688. getppid
  8689. @c snarfed from posix.c:606
  8690. @deffn {Scheme Procedure} getppid
  8691. @deffnx {C Function} scm_getppid ()
  8692. Return an integer representing the process ID of the parent
  8693. process.
  8694. @end deffn
  8695. getuid
  8696. @c snarfed from posix.c:618
  8697. @deffn {Scheme Procedure} getuid
  8698. @deffnx {C Function} scm_getuid ()
  8699. Return an integer representing the current real user ID.
  8700. @end deffn
  8701. getgid
  8702. @c snarfed from posix.c:629
  8703. @deffn {Scheme Procedure} getgid
  8704. @deffnx {C Function} scm_getgid ()
  8705. Return an integer representing the current real group ID.
  8706. @end deffn
  8707. geteuid
  8708. @c snarfed from posix.c:643
  8709. @deffn {Scheme Procedure} geteuid
  8710. @deffnx {C Function} scm_geteuid ()
  8711. Return an integer representing the current effective user ID.
  8712. If the system does not support effective IDs, then the real ID
  8713. is returned. @code{(provided? 'EIDs)} reports whether the
  8714. system supports effective IDs.
  8715. @end deffn
  8716. getegid
  8717. @c snarfed from posix.c:660
  8718. @deffn {Scheme Procedure} getegid
  8719. @deffnx {C Function} scm_getegid ()
  8720. Return an integer representing the current effective group ID.
  8721. If the system does not support effective IDs, then the real ID
  8722. is returned. @code{(provided? 'EIDs)} reports whether the
  8723. system supports effective IDs.
  8724. @end deffn
  8725. setuid
  8726. @c snarfed from posix.c:676
  8727. @deffn {Scheme Procedure} setuid id
  8728. @deffnx {C Function} scm_setuid (id)
  8729. Sets both the real and effective user IDs to the integer @var{id}, provided
  8730. the process has appropriate privileges.
  8731. The return value is unspecified.
  8732. @end deffn
  8733. setgid
  8734. @c snarfed from posix.c:689
  8735. @deffn {Scheme Procedure} setgid id
  8736. @deffnx {C Function} scm_setgid (id)
  8737. Sets both the real and effective group IDs to the integer @var{id}, provided
  8738. the process has appropriate privileges.
  8739. The return value is unspecified.
  8740. @end deffn
  8741. seteuid
  8742. @c snarfed from posix.c:704
  8743. @deffn {Scheme Procedure} seteuid id
  8744. @deffnx {C Function} scm_seteuid (id)
  8745. Sets the effective user ID to the integer @var{id}, provided the process
  8746. has appropriate privileges. If effective IDs are not supported, the
  8747. real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
  8748. system supports effective IDs.
  8749. The return value is unspecified.
  8750. @end deffn
  8751. setegid
  8752. @c snarfed from posix.c:729
  8753. @deffn {Scheme Procedure} setegid id
  8754. @deffnx {C Function} scm_setegid (id)
  8755. Sets the effective group ID to the integer @var{id}, provided the process
  8756. has appropriate privileges. If effective IDs are not supported, the
  8757. real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
  8758. system supports effective IDs.
  8759. The return value is unspecified.
  8760. @end deffn
  8761. getpgrp
  8762. @c snarfed from posix.c:752
  8763. @deffn {Scheme Procedure} getpgrp
  8764. @deffnx {C Function} scm_getpgrp ()
  8765. Return an integer representing the current process group ID.
  8766. This is the POSIX definition, not BSD.
  8767. @end deffn
  8768. setpgid
  8769. @c snarfed from posix.c:770
  8770. @deffn {Scheme Procedure} setpgid pid pgid
  8771. @deffnx {C Function} scm_setpgid (pid, pgid)
  8772. Move the process @var{pid} into the process group @var{pgid}. @var{pid} or
  8773. @var{pgid} must be integers: they can be zero to indicate the ID of the
  8774. current process.
  8775. Fails on systems that do not support job control.
  8776. The return value is unspecified.
  8777. @end deffn
  8778. setsid
  8779. @c snarfed from posix.c:787
  8780. @deffn {Scheme Procedure} setsid
  8781. @deffnx {C Function} scm_setsid ()
  8782. Creates a new session. The current process becomes the session leader
  8783. and is put in a new process group. The process will be detached
  8784. from its controlling terminal if it has one.
  8785. The return value is an integer representing the new process group ID.
  8786. @end deffn
  8787. ttyname
  8788. @c snarfed from posix.c:811
  8789. @deffn {Scheme Procedure} ttyname port
  8790. @deffnx {C Function} scm_ttyname (port)
  8791. Return a string with the name of the serial terminal device
  8792. underlying @var{port}.
  8793. @end deffn
  8794. ctermid
  8795. @c snarfed from posix.c:850
  8796. @deffn {Scheme Procedure} ctermid
  8797. @deffnx {C Function} scm_ctermid ()
  8798. Return a string containing the file name of the controlling
  8799. terminal for the current process.
  8800. @end deffn
  8801. tcgetpgrp
  8802. @c snarfed from posix.c:874
  8803. @deffn {Scheme Procedure} tcgetpgrp port
  8804. @deffnx {C Function} scm_tcgetpgrp (port)
  8805. Return the process group ID of the foreground process group
  8806. associated with the terminal open on the file descriptor
  8807. underlying @var{port}.
  8808. If there is no foreground process group, the return value is a
  8809. number greater than 1 that does not match the process group ID
  8810. of any existing process group. This can happen if all of the
  8811. processes in the job that was formerly the foreground job have
  8812. terminated, and no other job has yet been moved into the
  8813. foreground.
  8814. @end deffn
  8815. tcsetpgrp
  8816. @c snarfed from posix.c:898
  8817. @deffn {Scheme Procedure} tcsetpgrp port pgid
  8818. @deffnx {C Function} scm_tcsetpgrp (port, pgid)
  8819. Set the foreground process group ID for the terminal used by the file
  8820. descriptor underlying @var{port} to the integer @var{pgid}.
  8821. The calling process
  8822. must be a member of the same session as @var{pgid} and must have the same
  8823. controlling terminal. The return value is unspecified.
  8824. @end deffn
  8825. execl
  8826. @c snarfed from posix.c:930
  8827. @deffn {Scheme Procedure} execl filename . args
  8828. @deffnx {C Function} scm_execl (filename, args)
  8829. Executes the file named by @var{path} as a new process image.
  8830. The remaining arguments are supplied to the process; from a C program
  8831. they are accessible as the @code{argv} argument to @code{main}.
  8832. Conventionally the first @var{arg} is the same as @var{path}.
  8833. All arguments must be strings.
  8834. If @var{arg} is missing, @var{path} is executed with a null
  8835. argument list, which may have system-dependent side-effects.
  8836. This procedure is currently implemented using the @code{execv} system
  8837. call, but we call it @code{execl} because of its Scheme calling interface.
  8838. @end deffn
  8839. execlp
  8840. @c snarfed from posix.c:961
  8841. @deffn {Scheme Procedure} execlp filename . args
  8842. @deffnx {C Function} scm_execlp (filename, args)
  8843. Similar to @code{execl}, however if
  8844. @var{filename} does not contain a slash
  8845. then the file to execute will be located by searching the
  8846. directories listed in the @code{PATH} environment variable.
  8847. This procedure is currently implemented using the @code{execvp} system
  8848. call, but we call it @code{execlp} because of its Scheme calling interface.
  8849. @end deffn
  8850. execle
  8851. @c snarfed from posix.c:995
  8852. @deffn {Scheme Procedure} execle filename env . args
  8853. @deffnx {C Function} scm_execle (filename, env, args)
  8854. Similar to @code{execl}, but the environment of the new process is
  8855. specified by @var{env}, which must be a list of strings as returned by the
  8856. @code{environ} procedure.
  8857. This procedure is currently implemented using the @code{execve} system
  8858. call, but we call it @code{execle} because of its Scheme calling interface.
  8859. @end deffn
  8860. primitive-fork
  8861. @c snarfed from posix.c:1031
  8862. @deffn {Scheme Procedure} primitive-fork
  8863. @deffnx {C Function} scm_fork ()
  8864. Creates a new "child" process by duplicating the current "parent" process.
  8865. In the child the return value is 0. In the parent the return value is
  8866. the integer process ID of the child.
  8867. This procedure has been renamed from @code{fork} to avoid a naming conflict
  8868. with the scsh fork.
  8869. @end deffn
  8870. uname
  8871. @c snarfed from posix.c:1051
  8872. @deffn {Scheme Procedure} uname
  8873. @deffnx {C Function} scm_uname ()
  8874. Return an object with some information about the computer
  8875. system the program is running on.
  8876. @end deffn
  8877. environ
  8878. @c snarfed from posix.c:1080
  8879. @deffn {Scheme Procedure} environ [env]
  8880. @deffnx {C Function} scm_environ (env)
  8881. If @var{env} is omitted, return the current environment (in the
  8882. Unix sense) as a list of strings. Otherwise set the current
  8883. environment, which is also the default environment for child
  8884. processes, to the supplied list of strings. Each member of
  8885. @var{env} should be of the form @code{NAME=VALUE} and values of
  8886. @code{NAME} should not be duplicated. If @var{env} is supplied
  8887. then the return value is unspecified.
  8888. @end deffn
  8889. tmpnam
  8890. @c snarfed from posix.c:1113
  8891. @deffn {Scheme Procedure} tmpnam
  8892. @deffnx {C Function} scm_tmpnam ()
  8893. Return a name in the file system that does not match any
  8894. existing file. However there is no guarantee that another
  8895. process will not create the file after @code{tmpnam} is called.
  8896. Care should be taken if opening the file, e.g., use the
  8897. @code{O_EXCL} open flag or use @code{mkstemp!} instead.
  8898. @end deffn
  8899. mkstemp!
  8900. @c snarfed from posix.c:1144
  8901. @deffn {Scheme Procedure} mkstemp! tmpl
  8902. @deffnx {C Function} scm_mkstemp (tmpl)
  8903. Create a new unique file in the file system and returns a new
  8904. buffered port open for reading and writing to the file.
  8905. @var{tmpl} is a string specifying where the file should be
  8906. created: it must end with @samp{XXXXXX} and will be changed in
  8907. place to return the name of the temporary file.
  8908. The file is created with mode @code{0600}, which means read and
  8909. write for the owner only. @code{chmod} can be used to change
  8910. this.
  8911. @end deffn
  8912. utime
  8913. @c snarfed from posix.c:1179
  8914. @deffn {Scheme Procedure} utime pathname [actime [modtime]]
  8915. @deffnx {C Function} scm_utime (pathname, actime, modtime)
  8916. @code{utime} sets the access and modification times for the
  8917. file named by @var{path}. If @var{actime} or @var{modtime} is
  8918. not supplied, then the current time is used. @var{actime} and
  8919. @var{modtime} must be integer time values as returned by the
  8920. @code{current-time} procedure.
  8921. @lisp
  8922. (utime "foo" (- (current-time) 3600))
  8923. @end lisp
  8924. will set the access time to one hour in the past and the
  8925. modification time to the current time.
  8926. @end deffn
  8927. access?
  8928. @c snarfed from posix.c:1244
  8929. @deffn {Scheme Procedure} access? path how
  8930. @deffnx {C Function} scm_access (path, how)
  8931. Test accessibility of a file under the real UID and GID of the
  8932. calling process. The return is @code{#t} if @var{path} exists
  8933. and the permissions requested by @var{how} are all allowed, or
  8934. @code{#f} if not.
  8935. @var{how} is an integer which is one of the following values,
  8936. or a bitwise-OR (@code{logior}) of multiple values.
  8937. @defvar R_OK
  8938. Test for read permission.
  8939. @end defvar
  8940. @defvar W_OK
  8941. Test for write permission.
  8942. @end defvar
  8943. @defvar X_OK
  8944. Test for execute permission.
  8945. @end defvar
  8946. @defvar F_OK
  8947. Test for existence of the file. This is implied by each of the
  8948. other tests, so there's no need to combine it with them.
  8949. @end defvar
  8950. It's important to note that @code{access?} does not simply
  8951. indicate what will happen on attempting to read or write a
  8952. file. In normal circumstances it does, but in a set-UID or
  8953. set-GID program it doesn't because @code{access?} tests the
  8954. real ID, whereas an open or execute attempt uses the effective
  8955. ID.
  8956. A program which will never run set-UID/GID can ignore the
  8957. difference between real and effective IDs, but for maximum
  8958. generality, especially in library functions, it's best not to
  8959. use @code{access?} to predict the result of an open or execute,
  8960. instead simply attempt that and catch any exception.
  8961. The main use for @code{access?} is to let a set-UID/GID program
  8962. determine what the invoking user would have been allowed to do,
  8963. without the greater (or perhaps lesser) privileges afforded by
  8964. the effective ID. For more on this, see ``Testing File
  8965. Access'' in The GNU C Library Reference Manual.
  8966. @end deffn
  8967. getpid
  8968. @c snarfed from posix.c:1257
  8969. @deffn {Scheme Procedure} getpid
  8970. @deffnx {C Function} scm_getpid ()
  8971. Return an integer representing the current process ID.
  8972. @end deffn
  8973. putenv
  8974. @c snarfed from posix.c:1274
  8975. @deffn {Scheme Procedure} putenv str
  8976. @deffnx {C Function} scm_putenv (str)
  8977. Modifies the environment of the current process, which is
  8978. also the default environment inherited by child processes.
  8979. If @var{string} is of the form @code{NAME=VALUE} then it will be written
  8980. directly into the environment, replacing any existing environment string
  8981. with
  8982. name matching @code{NAME}. If @var{string} does not contain an equal
  8983. sign, then any existing string with name matching @var{string} will
  8984. be removed.
  8985. The return value is unspecified.
  8986. @end deffn
  8987. setlocale
  8988. @c snarfed from posix.c:1358
  8989. @deffn {Scheme Procedure} setlocale category [locale]
  8990. @deffnx {C Function} scm_setlocale (category, locale)
  8991. If @var{locale} is omitted, return the current value of the
  8992. specified locale category as a system-dependent string.
  8993. @var{category} should be specified using the values
  8994. @code{LC_COLLATE}, @code{LC_ALL} etc.
  8995. Otherwise the specified locale category is set to the string
  8996. @var{locale} and the new value is returned as a
  8997. system-dependent string. If @var{locale} is an empty string,
  8998. the locale will be set using environment variables.
  8999. @end deffn
  9000. mknod
  9001. @c snarfed from posix.c:1407
  9002. @deffn {Scheme Procedure} mknod path type perms dev
  9003. @deffnx {C Function} scm_mknod (path, type, perms, dev)
  9004. Creates a new special file, such as a file corresponding to a device.
  9005. @var{path} specifies the name of the file. @var{type} should
  9006. be one of the following symbols:
  9007. regular, directory, symlink, block-special, char-special,
  9008. fifo, or socket. @var{perms} (an integer) specifies the file permissions.
  9009. @var{dev} (an integer) specifies which device the special file refers
  9010. to. Its exact interpretation depends on the kind of special file
  9011. being created.
  9012. E.g.,
  9013. @lisp
  9014. (mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2))
  9015. @end lisp
  9016. The return value is unspecified.
  9017. @end deffn
  9018. nice
  9019. @c snarfed from posix.c:1453
  9020. @deffn {Scheme Procedure} nice incr
  9021. @deffnx {C Function} scm_nice (incr)
  9022. Increment the priority of the current process by @var{incr}. A higher
  9023. priority value means that the process runs less often.
  9024. The return value is unspecified.
  9025. @end deffn
  9026. sync
  9027. @c snarfed from posix.c:1471
  9028. @deffn {Scheme Procedure} sync
  9029. @deffnx {C Function} scm_sync ()
  9030. Flush the operating system disk buffers.
  9031. The return value is unspecified.
  9032. @end deffn
  9033. crypt
  9034. @c snarfed from posix.c:1502
  9035. @deffn {Scheme Procedure} crypt key salt
  9036. @deffnx {C Function} scm_crypt (key, salt)
  9037. Encrypt @var{key} using @var{salt} as the salt value to the
  9038. crypt(3) library call.
  9039. @end deffn
  9040. chroot
  9041. @c snarfed from posix.c:1531
  9042. @deffn {Scheme Procedure} chroot path
  9043. @deffnx {C Function} scm_chroot (path)
  9044. Change the root directory to that specified in @var{path}.
  9045. This directory will be used for path names beginning with
  9046. @file{/}. The root directory is inherited by all children
  9047. of the current process. Only the superuser may change the
  9048. root directory.
  9049. @end deffn
  9050. getlogin
  9051. @c snarfed from posix.c:1565
  9052. @deffn {Scheme Procedure} getlogin
  9053. @deffnx {C Function} scm_getlogin ()
  9054. Return a string containing the name of the user logged in on
  9055. the controlling terminal of the process, or @code{#f} if this
  9056. information cannot be obtained.
  9057. @end deffn
  9058. cuserid
  9059. @c snarfed from posix.c:1583
  9060. @deffn {Scheme Procedure} cuserid
  9061. @deffnx {C Function} scm_cuserid ()
  9062. Return a string containing a user name associated with the
  9063. effective user id of the process. Return @code{#f} if this
  9064. information cannot be obtained.
  9065. @end deffn
  9066. getpriority
  9067. @c snarfed from posix.c:1609
  9068. @deffn {Scheme Procedure} getpriority which who
  9069. @deffnx {C Function} scm_getpriority (which, who)
  9070. Return the scheduling priority of the process, process group
  9071. or user, as indicated by @var{which} and @var{who}. @var{which}
  9072. is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
  9073. or @code{PRIO_USER}, and @var{who} is interpreted relative to
  9074. @var{which} (a process identifier for @code{PRIO_PROCESS},
  9075. process group identifier for @code{PRIO_PGRP}, and a user
  9076. identifier for @code{PRIO_USER}. A zero value of @var{who}
  9077. denotes the current process, process group, or user. Return
  9078. the highest priority (lowest numerical value) of any of the
  9079. specified processes.
  9080. @end deffn
  9081. setpriority
  9082. @c snarfed from posix.c:1643
  9083. @deffn {Scheme Procedure} setpriority which who prio
  9084. @deffnx {C Function} scm_setpriority (which, who, prio)
  9085. Set the scheduling priority of the process, process group
  9086. or user, as indicated by @var{which} and @var{who}. @var{which}
  9087. is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
  9088. or @code{PRIO_USER}, and @var{who} is interpreted relative to
  9089. @var{which} (a process identifier for @code{PRIO_PROCESS},
  9090. process group identifier for @code{PRIO_PGRP}, and a user
  9091. identifier for @code{PRIO_USER}. A zero value of @var{who}
  9092. denotes the current process, process group, or user.
  9093. @var{prio} is a value in the range -20 and 20, the default
  9094. priority is 0; lower priorities cause more favorable
  9095. scheduling. Sets the priority of all of the specified
  9096. processes. Only the super-user may lower priorities.
  9097. The return value is not specified.
  9098. @end deffn
  9099. getpass
  9100. @c snarfed from posix.c:1668
  9101. @deffn {Scheme Procedure} getpass prompt
  9102. @deffnx {C Function} scm_getpass (prompt)
  9103. Display @var{prompt} to the standard error output and read
  9104. a password from @file{/dev/tty}. If this file is not
  9105. accessible, it reads from standard input. The password may be
  9106. up to 127 characters in length. Additional characters and the
  9107. terminating newline character are discarded. While reading
  9108. the password, echoing and the generation of signals by special
  9109. characters is disabled.
  9110. @end deffn
  9111. flock
  9112. @c snarfed from posix.c:1780
  9113. @deffn {Scheme Procedure} flock file operation
  9114. @deffnx {C Function} scm_flock (file, operation)
  9115. Apply or remove an advisory lock on an open file.
  9116. @var{operation} specifies the action to be done:
  9117. @defvar LOCK_SH
  9118. Shared lock. More than one process may hold a shared lock
  9119. for a given file at a given time.
  9120. @end defvar
  9121. @defvar LOCK_EX
  9122. Exclusive lock. Only one process may hold an exclusive lock
  9123. for a given file at a given time.
  9124. @end defvar
  9125. @defvar LOCK_UN
  9126. Unlock the file.
  9127. @end defvar
  9128. @defvar LOCK_NB
  9129. Don't block when locking. This is combined with one of the
  9130. other operations using @code{logior}. If @code{flock} would
  9131. block an @code{EWOULDBLOCK} error is thrown.
  9132. @end defvar
  9133. The return value is not specified. @var{file} may be an open
  9134. file descriptor or an open file descriptor port.
  9135. Note that @code{flock} does not lock files across NFS.
  9136. @end deffn
  9137. sethostname
  9138. @c snarfed from posix.c:1805
  9139. @deffn {Scheme Procedure} sethostname name
  9140. @deffnx {C Function} scm_sethostname (name)
  9141. Set the host name of the current processor to @var{name}. May
  9142. only be used by the superuser. The return value is not
  9143. specified.
  9144. @end deffn
  9145. gethostname
  9146. @c snarfed from posix.c:1823
  9147. @deffn {Scheme Procedure} gethostname
  9148. @deffnx {C Function} scm_gethostname ()
  9149. Return the host name of the current processor.
  9150. @end deffn
  9151. gethost
  9152. @c snarfed from net_db.c:134
  9153. @deffn {Scheme Procedure} gethost [host]
  9154. @deffnx {Scheme Procedure} gethostbyname hostname
  9155. @deffnx {Scheme Procedure} gethostbyaddr address
  9156. @deffnx {C Function} scm_gethost (host)
  9157. Look up a host by name or address, returning a host object. The
  9158. @code{gethost} procedure will accept either a string name or an integer
  9159. address; if given no arguments, it behaves like @code{gethostent} (see
  9160. below). If a name or address is supplied but the address can not be
  9161. found, an error will be thrown to one of the keys:
  9162. @code{host-not-found}, @code{try-again}, @code{no-recovery} or
  9163. @code{no-data}, corresponding to the equivalent @code{h_error} values.
  9164. Unusual conditions may result in errors thrown to the
  9165. @code{system-error} or @code{misc_error} keys.
  9166. @end deffn
  9167. getnet
  9168. @c snarfed from net_db.c:216
  9169. @deffn {Scheme Procedure} getnet [net]
  9170. @deffnx {Scheme Procedure} getnetbyname net-name
  9171. @deffnx {Scheme Procedure} getnetbyaddr net-number
  9172. @deffnx {C Function} scm_getnet (net)
  9173. Look up a network by name or net number in the network database. The
  9174. @var{net-name} argument must be a string, and the @var{net-number}
  9175. argument must be an integer. @code{getnet} will accept either type of
  9176. argument, behaving like @code{getnetent} (see below) if no arguments are
  9177. given.
  9178. @end deffn
  9179. getproto
  9180. @c snarfed from net_db.c:268
  9181. @deffn {Scheme Procedure} getproto [protocol]
  9182. @deffnx {Scheme Procedure} getprotobyname name
  9183. @deffnx {Scheme Procedure} getprotobynumber number
  9184. @deffnx {C Function} scm_getproto (protocol)
  9185. Look up a network protocol by name or by number. @code{getprotobyname}
  9186. takes a string argument, and @code{getprotobynumber} takes an integer
  9187. argument. @code{getproto} will accept either type, behaving like
  9188. @code{getprotoent} (see below) if no arguments are supplied.
  9189. @end deffn
  9190. getserv
  9191. @c snarfed from net_db.c:334
  9192. @deffn {Scheme Procedure} getserv [name [protocol]]
  9193. @deffnx {Scheme Procedure} getservbyname name protocol
  9194. @deffnx {Scheme Procedure} getservbyport port protocol
  9195. @deffnx {C Function} scm_getserv (name, protocol)
  9196. Look up a network service by name or by service number, and return a
  9197. network service object. The @var{protocol} argument specifies the name
  9198. of the desired protocol; if the protocol found in the network service
  9199. database does not match this name, a system error is signalled.
  9200. The @code{getserv} procedure will take either a service name or number
  9201. as its first argument; if given no arguments, it behaves like
  9202. @code{getservent} (see below).
  9203. @end deffn
  9204. sethost
  9205. @c snarfed from net_db.c:385
  9206. @deffn {Scheme Procedure} sethost [stayopen]
  9207. @deffnx {C Function} scm_sethost (stayopen)
  9208. If @var{stayopen} is omitted, this is equivalent to @code{endhostent}.
  9209. Otherwise it is equivalent to @code{sethostent stayopen}.
  9210. @end deffn
  9211. setnet
  9212. @c snarfed from net_db.c:401
  9213. @deffn {Scheme Procedure} setnet [stayopen]
  9214. @deffnx {C Function} scm_setnet (stayopen)
  9215. If @var{stayopen} is omitted, this is equivalent to @code{endnetent}.
  9216. Otherwise it is equivalent to @code{setnetent stayopen}.
  9217. @end deffn
  9218. setproto
  9219. @c snarfed from net_db.c:417
  9220. @deffn {Scheme Procedure} setproto [stayopen]
  9221. @deffnx {C Function} scm_setproto (stayopen)
  9222. If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}.
  9223. Otherwise it is equivalent to @code{setprotoent stayopen}.
  9224. @end deffn
  9225. setserv
  9226. @c snarfed from net_db.c:433
  9227. @deffn {Scheme Procedure} setserv [stayopen]
  9228. @deffnx {C Function} scm_setserv (stayopen)
  9229. If @var{stayopen} is omitted, this is equivalent to @code{endservent}.
  9230. Otherwise it is equivalent to @code{setservent stayopen}.
  9231. @end deffn
  9232. htons
  9233. @c snarfed from socket.c:80
  9234. @deffn {Scheme Procedure} htons value
  9235. @deffnx {C Function} scm_htons (value)
  9236. Convert a 16 bit quantity from host to network byte ordering.
  9237. @var{value} is packed into 2 bytes, which are then converted
  9238. and returned as a new integer.
  9239. @end deffn
  9240. ntohs
  9241. @c snarfed from socket.c:91
  9242. @deffn {Scheme Procedure} ntohs value
  9243. @deffnx {C Function} scm_ntohs (value)
  9244. Convert a 16 bit quantity from network to host byte ordering.
  9245. @var{value} is packed into 2 bytes, which are then converted
  9246. and returned as a new integer.
  9247. @end deffn
  9248. htonl
  9249. @c snarfed from socket.c:102
  9250. @deffn {Scheme Procedure} htonl value
  9251. @deffnx {C Function} scm_htonl (value)
  9252. Convert a 32 bit quantity from host to network byte ordering.
  9253. @var{value} is packed into 4 bytes, which are then converted
  9254. and returned as a new integer.
  9255. @end deffn
  9256. ntohl
  9257. @c snarfed from socket.c:115
  9258. @deffn {Scheme Procedure} ntohl value
  9259. @deffnx {C Function} scm_ntohl (value)
  9260. Convert a 32 bit quantity from network to host byte ordering.
  9261. @var{value} is packed into 4 bytes, which are then converted
  9262. and returned as a new integer.
  9263. @end deffn
  9264. inet-aton
  9265. @c snarfed from socket.c:135
  9266. @deffn {Scheme Procedure} inet-aton address
  9267. @deffnx {C Function} scm_inet_aton (address)
  9268. Convert an IPv4 Internet address from printable string
  9269. (dotted decimal notation) to an integer. E.g.,
  9270. @lisp
  9271. (inet-aton "127.0.0.1") @result{} 2130706433
  9272. @end lisp
  9273. @end deffn
  9274. inet-ntoa
  9275. @c snarfed from socket.c:158
  9276. @deffn {Scheme Procedure} inet-ntoa inetid
  9277. @deffnx {C Function} scm_inet_ntoa (inetid)
  9278. Convert an IPv4 Internet address to a printable
  9279. (dotted decimal notation) string. E.g.,
  9280. @lisp
  9281. (inet-ntoa 2130706433) @result{} "127.0.0.1"
  9282. @end lisp
  9283. @end deffn
  9284. inet-netof
  9285. @c snarfed from socket.c:178
  9286. @deffn {Scheme Procedure} inet-netof address
  9287. @deffnx {C Function} scm_inet_netof (address)
  9288. Return the network number part of the given IPv4
  9289. Internet address. E.g.,
  9290. @lisp
  9291. (inet-netof 2130706433) @result{} 127
  9292. @end lisp
  9293. @end deffn
  9294. inet-lnaof
  9295. @c snarfed from socket.c:196
  9296. @deffn {Scheme Procedure} inet-lnaof address
  9297. @deffnx {C Function} scm_lnaof (address)
  9298. Return the local-address-with-network part of the given
  9299. IPv4 Internet address, using the obsolete class A/B/C system.
  9300. E.g.,
  9301. @lisp
  9302. (inet-lnaof 2130706433) @result{} 1
  9303. @end lisp
  9304. @end deffn
  9305. inet-makeaddr
  9306. @c snarfed from socket.c:214
  9307. @deffn {Scheme Procedure} inet-makeaddr net lna
  9308. @deffnx {C Function} scm_inet_makeaddr (net, lna)
  9309. Make an IPv4 Internet address by combining the network number
  9310. @var{net} with the local-address-within-network number
  9311. @var{lna}. E.g.,
  9312. @lisp
  9313. (inet-makeaddr 127 1) @result{} 2130706433
  9314. @end lisp
  9315. @end deffn
  9316. inet-pton
  9317. @c snarfed from socket.c:350
  9318. @deffn {Scheme Procedure} inet-pton family address
  9319. @deffnx {C Function} scm_inet_pton (family, address)
  9320. Convert a string containing a printable network address to
  9321. an integer address. Note that unlike the C version of this
  9322. function,
  9323. the result is an integer with normal host byte ordering.
  9324. @var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,
  9325. @lisp
  9326. (inet-pton AF_INET "127.0.0.1") @result{} 2130706433
  9327. (inet-pton AF_INET6 "::1") @result{} 1
  9328. @end lisp
  9329. @end deffn
  9330. inet-ntop
  9331. @c snarfed from socket.c:388
  9332. @deffn {Scheme Procedure} inet-ntop family address
  9333. @deffnx {C Function} scm_inet_ntop (family, address)
  9334. Convert a network address into a printable string.
  9335. Note that unlike the C version of this function,
  9336. the input is an integer with normal host byte ordering.
  9337. @var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,
  9338. @lisp
  9339. (inet-ntop AF_INET 2130706433) @result{} "127.0.0.1"
  9340. (inet-ntop AF_INET6 (- (expt 2 128) 1))
  9341. @result{} "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
  9342. @end lisp
  9343. @end deffn
  9344. socket
  9345. @c snarfed from socket.c:430
  9346. @deffn {Scheme Procedure} socket family style proto
  9347. @deffnx {C Function} scm_socket (family, style, proto)
  9348. Return a new socket port of the type specified by @var{family},
  9349. @var{style} and @var{proto}. All three parameters are
  9350. integers. Supported values for @var{family} are
  9351. @code{AF_UNIX}, @code{AF_INET} and @code{AF_INET6}.
  9352. Typical values for @var{style} are @code{SOCK_STREAM},
  9353. @code{SOCK_DGRAM} and @code{SOCK_RAW}.
  9354. @var{proto} can be obtained from a protocol name using
  9355. @code{getprotobyname}. A value of zero specifies the default
  9356. protocol, which is usually right.
  9357. A single socket port cannot by used for communication until it
  9358. has been connected to another socket.
  9359. @end deffn
  9360. socketpair
  9361. @c snarfed from socket.c:451
  9362. @deffn {Scheme Procedure} socketpair family style proto
  9363. @deffnx {C Function} scm_socketpair (family, style, proto)
  9364. Return a pair of connected (but unnamed) socket ports of the
  9365. type specified by @var{family}, @var{style} and @var{proto}.
  9366. Many systems support only socket pairs of the @code{AF_UNIX}
  9367. family. Zero is likely to be the only meaningful value for
  9368. @var{proto}.
  9369. @end deffn
  9370. getsockopt
  9371. @c snarfed from socket.c:476
  9372. @deffn {Scheme Procedure} getsockopt sock level optname
  9373. @deffnx {C Function} scm_getsockopt (sock, level, optname)
  9374. Return the value of a particular socket option for the socket
  9375. port @var{sock}. @var{level} is an integer code for type of
  9376. option being requested, e.g., @code{SOL_SOCKET} for
  9377. socket-level options. @var{optname} is an integer code for the
  9378. option required and should be specified using one of the
  9379. symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.
  9380. The returned value is typically an integer but @code{SO_LINGER}
  9381. returns a pair of integers.
  9382. @end deffn
  9383. setsockopt
  9384. @c snarfed from socket.c:544
  9385. @deffn {Scheme Procedure} setsockopt sock level optname value
  9386. @deffnx {C Function} scm_setsockopt (sock, level, optname, value)
  9387. Set the value of a particular socket option for the socket
  9388. port @var{sock}. @var{level} is an integer code for type of option
  9389. being set, e.g., @code{SOL_SOCKET} for socket-level options.
  9390. @var{optname} is an
  9391. integer code for the option to set and should be specified using one of
  9392. the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.
  9393. @var{value} is the value to which the option should be set. For
  9394. most options this must be an integer, but for @code{SO_LINGER} it must
  9395. be a pair.
  9396. The return value is unspecified.
  9397. @end deffn
  9398. shutdown
  9399. @c snarfed from socket.c:646
  9400. @deffn {Scheme Procedure} shutdown sock how
  9401. @deffnx {C Function} scm_shutdown (sock, how)
  9402. Sockets can be closed simply by using @code{close-port}. The
  9403. @code{shutdown} procedure allows reception or transmission on a
  9404. connection to be shut down individually, according to the parameter
  9405. @var{how}:
  9406. @table @asis
  9407. @item 0
  9408. Stop receiving data for this socket. If further data arrives, reject it.
  9409. @item 1
  9410. Stop trying to transmit data from this socket. Discard any
  9411. data waiting to be sent. Stop looking for acknowledgement of
  9412. data already sent; don't retransmit it if it is lost.
  9413. @item 2
  9414. Stop both reception and transmission.
  9415. @end table
  9416. The return value is unspecified.
  9417. @end deffn
  9418. connect
  9419. @c snarfed from socket.c:789
  9420. @deffn {Scheme Procedure} connect sock fam address . args
  9421. @deffnx {C Function} scm_connect (sock, fam, address, args)
  9422. Initiate a connection from a socket using a specified address
  9423. family to the address
  9424. specified by @var{address} and possibly @var{args}.
  9425. The format required for @var{address}
  9426. and @var{args} depends on the family of the socket.
  9427. For a socket of family @code{AF_UNIX},
  9428. only @var{address} is specified and must be a string with the
  9429. filename where the socket is to be created.
  9430. For a socket of family @code{AF_INET},
  9431. @var{address} must be an integer IPv4 host address and
  9432. @var{args} must be a single integer port number.
  9433. For a socket of family @code{AF_INET6},
  9434. @var{address} must be an integer IPv6 host address and
  9435. @var{args} may be up to three integers:
  9436. port [flowinfo] [scope_id],
  9437. where flowinfo and scope_id default to zero.
  9438. The return value is unspecified.
  9439. @end deffn
  9440. bind
  9441. @c snarfed from socket.c:848
  9442. @deffn {Scheme Procedure} bind sock fam address . args
  9443. @deffnx {C Function} scm_bind (sock, fam, address, args)
  9444. Assign an address to the socket port @var{sock}.
  9445. Generally this only needs to be done for server sockets,
  9446. so they know where to look for incoming connections. A socket
  9447. without an address will be assigned one automatically when it
  9448. starts communicating.
  9449. The format of @var{address} and @var{args} depends
  9450. on the family of the socket.
  9451. For a socket of family @code{AF_UNIX}, only @var{address}
  9452. is specified and must be a string with the filename where
  9453. the socket is to be created.
  9454. For a socket of family @code{AF_INET}, @var{address}
  9455. must be an integer IPv4 address and @var{args}
  9456. must be a single integer port number.
  9457. The values of the following variables can also be used for
  9458. @var{address}:
  9459. @defvar INADDR_ANY
  9460. Allow connections from any address.
  9461. @end defvar
  9462. @defvar INADDR_LOOPBACK
  9463. The address of the local host using the loopback device.
  9464. @end defvar
  9465. @defvar INADDR_BROADCAST
  9466. The broadcast address on the local network.
  9467. @end defvar
  9468. @defvar INADDR_NONE
  9469. No address.
  9470. @end defvar
  9471. For a socket of family @code{AF_INET6}, @var{address}
  9472. must be an integer IPv6 address and @var{args}
  9473. may be up to three integers:
  9474. port [flowinfo] [scope_id],
  9475. where flowinfo and scope_id default to zero.
  9476. The return value is unspecified.
  9477. @end deffn
  9478. listen
  9479. @c snarfed from socket.c:881
  9480. @deffn {Scheme Procedure} listen sock backlog
  9481. @deffnx {C Function} scm_listen (sock, backlog)
  9482. Enable @var{sock} to accept connection
  9483. requests. @var{backlog} is an integer specifying
  9484. the maximum length of the queue for pending connections.
  9485. If the queue fills, new clients will fail to connect until
  9486. the server calls @code{accept} to accept a connection from
  9487. the queue.
  9488. The return value is unspecified.
  9489. @end deffn
  9490. accept
  9491. @c snarfed from socket.c:993
  9492. @deffn {Scheme Procedure} accept sock
  9493. @deffnx {C Function} scm_accept (sock)
  9494. Accept a connection on a bound, listening socket.
  9495. If there
  9496. are no pending connections in the queue, wait until
  9497. one is available unless the non-blocking option has been
  9498. set on the socket.
  9499. The return value is a
  9500. pair in which the @emph{car} is a new socket port for the
  9501. connection and
  9502. the @emph{cdr} is an object with address information about the
  9503. client which initiated the connection.
  9504. @var{sock} does not become part of the
  9505. connection and will continue to accept new requests.
  9506. @end deffn
  9507. getsockname
  9508. @c snarfed from socket.c:1020
  9509. @deffn {Scheme Procedure} getsockname sock
  9510. @deffnx {C Function} scm_getsockname (sock)
  9511. Return the address of @var{sock}, in the same form as the
  9512. object returned by @code{accept}. On many systems the address
  9513. of a socket in the @code{AF_FILE} namespace cannot be read.
  9514. @end deffn
  9515. getpeername
  9516. @c snarfed from socket.c:1042
  9517. @deffn {Scheme Procedure} getpeername sock
  9518. @deffnx {C Function} scm_getpeername (sock)
  9519. Return the address that @var{sock}
  9520. is connected to, in the same form as the object returned by
  9521. @code{accept}. On many systems the address of a socket in the
  9522. @code{AF_FILE} namespace cannot be read.
  9523. @end deffn
  9524. recv!
  9525. @c snarfed from socket.c:1077
  9526. @deffn {Scheme Procedure} recv! sock buf [flags]
  9527. @deffnx {C Function} scm_recv (sock, buf, flags)
  9528. Receive data from a socket port.
  9529. @var{sock} must already
  9530. be bound to the address from which data is to be received.
  9531. @var{buf} is a string into which
  9532. the data will be written. The size of @var{buf} limits
  9533. the amount of
  9534. data which can be received: in the case of packet
  9535. protocols, if a packet larger than this limit is encountered
  9536. then some data
  9537. will be irrevocably lost.
  9538. The optional @var{flags} argument is a value or
  9539. bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  9540. The value returned is the number of bytes read from the
  9541. socket.
  9542. Note that the data is read directly from the socket file
  9543. descriptor:
  9544. any unread buffered port data is ignored.
  9545. @end deffn
  9546. send
  9547. @c snarfed from socket.c:1120
  9548. @deffn {Scheme Procedure} send sock message [flags]
  9549. @deffnx {C Function} scm_send (sock, message, flags)
  9550. Transmit the string @var{message} on a socket port @var{sock}.
  9551. @var{sock} must already be bound to a destination address. The
  9552. value returned is the number of bytes transmitted --
  9553. it's possible for
  9554. this to be less than the length of @var{message}
  9555. if the socket is
  9556. set to be non-blocking. The optional @var{flags} argument
  9557. is a value or
  9558. bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  9559. Note that the data is written directly to the socket
  9560. file descriptor:
  9561. any unflushed buffered port data is ignored.
  9562. @end deffn
  9563. recvfrom!
  9564. @c snarfed from socket.c:1171
  9565. @deffn {Scheme Procedure} recvfrom! sock str [flags [start [end]]]
  9566. @deffnx {C Function} scm_recvfrom (sock, str, flags, start, end)
  9567. Return data from the socket port @var{sock} and also
  9568. information about where the data was received from.
  9569. @var{sock} must already be bound to the address from which
  9570. data is to be received. @code{str}, is a string into which the
  9571. data will be written. The size of @var{str} limits the amount
  9572. of data which can be received: in the case of packet protocols,
  9573. if a packet larger than this limit is encountered then some
  9574. data will be irrevocably lost.
  9575. The optional @var{flags} argument is a value or bitwise OR of
  9576. @code{MSG_OOB}, @code{MSG_PEEK}, @code{MSG_DONTROUTE} etc.
  9577. The value returned is a pair: the @emph{car} is the number of
  9578. bytes read from the socket and the @emph{cdr} an address object
  9579. in the same form as returned by @code{accept}. The address
  9580. will given as @code{#f} if not available, as is usually the
  9581. case for stream sockets.
  9582. The @var{start} and @var{end} arguments specify a substring of
  9583. @var{str} to which the data should be written.
  9584. Note that the data is read directly from the socket file
  9585. descriptor: any unread buffered port data is ignored.
  9586. @end deffn
  9587. sendto
  9588. @c snarfed from socket.c:1236
  9589. @deffn {Scheme Procedure} sendto sock message fam address . args_and_flags
  9590. @deffnx {C Function} scm_sendto (sock, message, fam, address, args_and_flags)
  9591. Transmit the string @var{message} on the socket port
  9592. @var{sock}. The
  9593. destination address is specified using the @var{fam},
  9594. @var{address} and
  9595. @var{args_and_flags} arguments, in a similar way to the
  9596. @code{connect} procedure. @var{args_and_flags} contains
  9597. the usual connection arguments optionally followed by
  9598. a flags argument, which is a value or
  9599. bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  9600. The value returned is the number of bytes transmitted --
  9601. it's possible for
  9602. this to be less than the length of @var{message} if the
  9603. socket is
  9604. set to be non-blocking.
  9605. Note that the data is written directly to the socket
  9606. file descriptor:
  9607. any unflushed buffered port data is ignored.
  9608. @end deffn
  9609. regexp?
  9610. @c snarfed from regex-posix.c:106
  9611. @deffn {Scheme Procedure} regexp? obj
  9612. @deffnx {C Function} scm_regexp_p (obj)
  9613. Return @code{#t} if @var{obj} is a compiled regular expression,
  9614. or @code{#f} otherwise.
  9615. @end deffn
  9616. make-regexp
  9617. @c snarfed from regex-posix.c:151
  9618. @deffn {Scheme Procedure} make-regexp pat . flags
  9619. @deffnx {C Function} scm_make_regexp (pat, flags)
  9620. Compile the regular expression described by @var{pat}, and
  9621. return the compiled regexp structure. If @var{pat} does not
  9622. describe a legal regular expression, @code{make-regexp} throws
  9623. a @code{regular-expression-syntax} error.
  9624. The @var{flags} arguments change the behavior of the compiled
  9625. regular expression. The following flags may be supplied:
  9626. @table @code
  9627. @item regexp/icase
  9628. Consider uppercase and lowercase letters to be the same when
  9629. matching.
  9630. @item regexp/newline
  9631. If a newline appears in the target string, then permit the
  9632. @samp{^} and @samp{$} operators to match immediately after or
  9633. immediately before the newline, respectively. Also, the
  9634. @samp{.} and @samp{[^...]} operators will never match a newline
  9635. character. The intent of this flag is to treat the target
  9636. string as a buffer containing many lines of text, and the
  9637. regular expression as a pattern that may match a single one of
  9638. those lines.
  9639. @item regexp/basic
  9640. Compile a basic (``obsolete'') regexp instead of the extended
  9641. (``modern'') regexps that are the default. Basic regexps do
  9642. not consider @samp{|}, @samp{+} or @samp{?} to be special
  9643. characters, and require the @samp{@{...@}} and @samp{(...)}
  9644. metacharacters to be backslash-escaped (@pxref{Backslash
  9645. Escapes}). There are several other differences between basic
  9646. and extended regular expressions, but these are the most
  9647. significant.
  9648. @item regexp/extended
  9649. Compile an extended regular expression rather than a basic
  9650. regexp. This is the default behavior; this flag will not
  9651. usually be needed. If a call to @code{make-regexp} includes
  9652. both @code{regexp/basic} and @code{regexp/extended} flags, the
  9653. one which comes last will override the earlier one.
  9654. @end table
  9655. @end deffn
  9656. regexp-exec
  9657. @c snarfed from regex-posix.c:217
  9658. @deffn {Scheme Procedure} regexp-exec rx str [start [flags]]
  9659. @deffnx {C Function} scm_regexp_exec (rx, str, start, flags)
  9660. Match the compiled regular expression @var{rx} against
  9661. @code{str}. If the optional integer @var{start} argument is
  9662. provided, begin matching from that position in the string.
  9663. Return a match structure describing the results of the match,
  9664. or @code{#f} if no match could be found.
  9665. The @var{flags} arguments change the matching behavior.
  9666. The following flags may be supplied:
  9667. @table @code
  9668. @item regexp/notbol
  9669. Operator @samp{^} always fails (unless @code{regexp/newline}
  9670. is used). Use this when the beginning of the string should
  9671. not be considered the beginning of a line.
  9672. @item regexp/noteol
  9673. Operator @samp{$} always fails (unless @code{regexp/newline}
  9674. is used). Use this when the end of the string should not be
  9675. considered the end of a line.
  9676. @end table
  9677. @end deffn