guile.texi 371 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092
  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. gc-live-object-stats
  1537. @c snarfed from gc.c:276
  1538. @deffn {Scheme Procedure} gc-live-object-stats
  1539. @deffnx {C Function} scm_gc_live_object_stats ()
  1540. Return an alist of statistics of the current live objects.
  1541. @end deffn
  1542. gc-stats
  1543. @c snarfed from gc.c:293
  1544. @deffn {Scheme Procedure} gc-stats
  1545. @deffnx {C Function} scm_gc_stats ()
  1546. Return an association list of statistics about Guile's current
  1547. use of storage.
  1548. @end deffn
  1549. object-address
  1550. @c snarfed from gc.c:429
  1551. @deffn {Scheme Procedure} object-address obj
  1552. @deffnx {C Function} scm_object_address (obj)
  1553. Return an integer that for the lifetime of @var{obj} is uniquely
  1554. returned by this function for @var{obj}
  1555. @end deffn
  1556. gc
  1557. @c snarfed from gc.c:440
  1558. @deffn {Scheme Procedure} gc
  1559. @deffnx {C Function} scm_gc ()
  1560. Scans all of SCM objects and reclaims for further use those that are
  1561. no longer accessible.
  1562. @end deffn
  1563. class-of
  1564. @c snarfed from goops.c:166
  1565. @deffn {Scheme Procedure} class-of x
  1566. @deffnx {C Function} scm_class_of (x)
  1567. Return the class of @var{x}.
  1568. @end deffn
  1569. %compute-slots
  1570. @c snarfed from goops.c:407
  1571. @deffn {Scheme Procedure} %compute-slots class
  1572. @deffnx {C Function} scm_sys_compute_slots (class)
  1573. Return a list consisting of the names of all slots belonging to
  1574. class @var{class}, i. e. the slots of @var{class} and of all of
  1575. its superclasses.
  1576. @end deffn
  1577. get-keyword
  1578. @c snarfed from goops.c:498
  1579. @deffn {Scheme Procedure} get-keyword key l default_value
  1580. @deffnx {C Function} scm_get_keyword (key, l, default_value)
  1581. Determine an associated value for the keyword @var{key} from
  1582. the list @var{l}. The list @var{l} has to consist of an even
  1583. number of elements, where, starting with the first, every
  1584. second element is a keyword, followed by its associated value.
  1585. If @var{l} does not hold a value for @var{key}, the value
  1586. @var{default_value} is returned.
  1587. @end deffn
  1588. %initialize-object
  1589. @c snarfed from goops.c:521
  1590. @deffn {Scheme Procedure} %initialize-object obj initargs
  1591. @deffnx {C Function} scm_sys_initialize_object (obj, initargs)
  1592. Initialize the object @var{obj} with the given arguments
  1593. @var{initargs}.
  1594. @end deffn
  1595. %prep-layout!
  1596. @c snarfed from goops.c:619
  1597. @deffn {Scheme Procedure} %prep-layout! class
  1598. @deffnx {C Function} scm_sys_prep_layout_x (class)
  1599. @end deffn
  1600. %inherit-magic!
  1601. @c snarfed from goops.c:718
  1602. @deffn {Scheme Procedure} %inherit-magic! class dsupers
  1603. @deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
  1604. @end deffn
  1605. instance?
  1606. @c snarfed from goops.c:958
  1607. @deffn {Scheme Procedure} instance? obj
  1608. @deffnx {C Function} scm_instance_p (obj)
  1609. Return @code{#t} if @var{obj} is an instance.
  1610. @end deffn
  1611. class-name
  1612. @c snarfed from goops.c:973
  1613. @deffn {Scheme Procedure} class-name obj
  1614. @deffnx {C Function} scm_class_name (obj)
  1615. Return the class name of @var{obj}.
  1616. @end deffn
  1617. class-direct-supers
  1618. @c snarfed from goops.c:983
  1619. @deffn {Scheme Procedure} class-direct-supers obj
  1620. @deffnx {C Function} scm_class_direct_supers (obj)
  1621. Return the direct superclasses of the class @var{obj}.
  1622. @end deffn
  1623. class-direct-slots
  1624. @c snarfed from goops.c:993
  1625. @deffn {Scheme Procedure} class-direct-slots obj
  1626. @deffnx {C Function} scm_class_direct_slots (obj)
  1627. Return the direct slots of the class @var{obj}.
  1628. @end deffn
  1629. class-direct-subclasses
  1630. @c snarfed from goops.c:1003
  1631. @deffn {Scheme Procedure} class-direct-subclasses obj
  1632. @deffnx {C Function} scm_class_direct_subclasses (obj)
  1633. Return the direct subclasses of the class @var{obj}.
  1634. @end deffn
  1635. class-direct-methods
  1636. @c snarfed from goops.c:1013
  1637. @deffn {Scheme Procedure} class-direct-methods obj
  1638. @deffnx {C Function} scm_class_direct_methods (obj)
  1639. Return the direct methods of the class @var{obj}
  1640. @end deffn
  1641. class-precedence-list
  1642. @c snarfed from goops.c:1023
  1643. @deffn {Scheme Procedure} class-precedence-list obj
  1644. @deffnx {C Function} scm_class_precedence_list (obj)
  1645. Return the class precedence list of the class @var{obj}.
  1646. @end deffn
  1647. class-slots
  1648. @c snarfed from goops.c:1033
  1649. @deffn {Scheme Procedure} class-slots obj
  1650. @deffnx {C Function} scm_class_slots (obj)
  1651. Return the slot list of the class @var{obj}.
  1652. @end deffn
  1653. class-environment
  1654. @c snarfed from goops.c:1043
  1655. @deffn {Scheme Procedure} class-environment obj
  1656. @deffnx {C Function} scm_class_environment (obj)
  1657. Return the environment of the class @var{obj}.
  1658. @end deffn
  1659. generic-function-name
  1660. @c snarfed from goops.c:1054
  1661. @deffn {Scheme Procedure} generic-function-name obj
  1662. @deffnx {C Function} scm_generic_function_name (obj)
  1663. Return the name of the generic function @var{obj}.
  1664. @end deffn
  1665. generic-function-methods
  1666. @c snarfed from goops.c:1099
  1667. @deffn {Scheme Procedure} generic-function-methods obj
  1668. @deffnx {C Function} scm_generic_function_methods (obj)
  1669. Return the methods of the generic function @var{obj}.
  1670. @end deffn
  1671. method-generic-function
  1672. @c snarfed from goops.c:1112
  1673. @deffn {Scheme Procedure} method-generic-function obj
  1674. @deffnx {C Function} scm_method_generic_function (obj)
  1675. Return the generic function for the method @var{obj}.
  1676. @end deffn
  1677. method-specializers
  1678. @c snarfed from goops.c:1122
  1679. @deffn {Scheme Procedure} method-specializers obj
  1680. @deffnx {C Function} scm_method_specializers (obj)
  1681. Return specializers of the method @var{obj}.
  1682. @end deffn
  1683. method-procedure
  1684. @c snarfed from goops.c:1132
  1685. @deffn {Scheme Procedure} method-procedure obj
  1686. @deffnx {C Function} scm_method_procedure (obj)
  1687. Return the procedure of the method @var{obj}.
  1688. @end deffn
  1689. accessor-method-slot-definition
  1690. @c snarfed from goops.c:1142
  1691. @deffn {Scheme Procedure} accessor-method-slot-definition obj
  1692. @deffnx {C Function} scm_accessor_method_slot_definition (obj)
  1693. Return the slot definition of the accessor @var{obj}.
  1694. @end deffn
  1695. %tag-body
  1696. @c snarfed from goops.c:1152
  1697. @deffn {Scheme Procedure} %tag-body body
  1698. @deffnx {C Function} scm_sys_tag_body (body)
  1699. Internal GOOPS magic---don't use this function!
  1700. @end deffn
  1701. make-unbound
  1702. @c snarfed from goops.c:1167
  1703. @deffn {Scheme Procedure} make-unbound
  1704. @deffnx {C Function} scm_make_unbound ()
  1705. Return the unbound value.
  1706. @end deffn
  1707. unbound?
  1708. @c snarfed from goops.c:1176
  1709. @deffn {Scheme Procedure} unbound? obj
  1710. @deffnx {C Function} scm_unbound_p (obj)
  1711. Return @code{#t} if @var{obj} is unbound.
  1712. @end deffn
  1713. assert-bound
  1714. @c snarfed from goops.c:1186
  1715. @deffn {Scheme Procedure} assert-bound value obj
  1716. @deffnx {C Function} scm_assert_bound (value, obj)
  1717. Return @var{value} if it is bound, and invoke the
  1718. @var{slot-unbound} method of @var{obj} if it is not.
  1719. @end deffn
  1720. @@assert-bound-ref
  1721. @c snarfed from goops.c:1198
  1722. @deffn {Scheme Procedure} @@assert-bound-ref obj index
  1723. @deffnx {C Function} scm_at_assert_bound_ref (obj, index)
  1724. Like @code{assert-bound}, but use @var{index} for accessing
  1725. the value from @var{obj}.
  1726. @end deffn
  1727. %fast-slot-ref
  1728. @c snarfed from goops.c:1210
  1729. @deffn {Scheme Procedure} %fast-slot-ref obj index
  1730. @deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
  1731. Return the slot value with index @var{index} from @var{obj}.
  1732. @end deffn
  1733. %fast-slot-set!
  1734. @c snarfed from goops.c:1224
  1735. @deffn {Scheme Procedure} %fast-slot-set! obj index value
  1736. @deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
  1737. Set the slot with index @var{index} in @var{obj} to
  1738. @var{value}.
  1739. @end deffn
  1740. slot-ref-using-class
  1741. @c snarfed from goops.c:1361
  1742. @deffn {Scheme Procedure} slot-ref-using-class class obj slot_name
  1743. @deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name)
  1744. @end deffn
  1745. slot-set-using-class!
  1746. @c snarfed from goops.c:1380
  1747. @deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value
  1748. @deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value)
  1749. @end deffn
  1750. slot-bound-using-class?
  1751. @c snarfed from goops.c:1394
  1752. @deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name
  1753. @deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name)
  1754. @end deffn
  1755. slot-exists-using-class?
  1756. @c snarfed from goops.c:1409
  1757. @deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name
  1758. @deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name)
  1759. @end deffn
  1760. slot-ref
  1761. @c snarfed from goops.c:1425
  1762. @deffn {Scheme Procedure} slot-ref obj slot_name
  1763. @deffnx {C Function} scm_slot_ref (obj, slot_name)
  1764. Return the value from @var{obj}'s slot with the name
  1765. @var{slot_name}.
  1766. @end deffn
  1767. slot-set!
  1768. @c snarfed from goops.c:1442
  1769. @deffn {Scheme Procedure} slot-set! obj slot_name value
  1770. @deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
  1771. Set the slot named @var{slot_name} of @var{obj} to @var{value}.
  1772. @end deffn
  1773. slot-bound?
  1774. @c snarfed from goops.c:1459
  1775. @deffn {Scheme Procedure} slot-bound? obj slot_name
  1776. @deffnx {C Function} scm_slot_bound_p (obj, slot_name)
  1777. Return @code{#t} if the slot named @var{slot_name} of @var{obj}
  1778. is bound.
  1779. @end deffn
  1780. slot-exists?
  1781. @c snarfed from goops.c:1477
  1782. @deffn {Scheme Procedure} slot-exists? obj slot_name
  1783. @deffnx {C Function} scm_slot_exists_p (obj, slot_name)
  1784. Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
  1785. @end deffn
  1786. %allocate-instance
  1787. @c snarfed from goops.c:1516
  1788. @deffn {Scheme Procedure} %allocate-instance class initargs
  1789. @deffnx {C Function} scm_sys_allocate_instance (class, initargs)
  1790. Create a new instance of class @var{class} and initialize it
  1791. from the arguments @var{initargs}.
  1792. @end deffn
  1793. %set-object-setter!
  1794. @c snarfed from goops.c:1586
  1795. @deffn {Scheme Procedure} %set-object-setter! obj setter
  1796. @deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
  1797. @end deffn
  1798. %modify-instance
  1799. @c snarfed from goops.c:1611
  1800. @deffn {Scheme Procedure} %modify-instance old new
  1801. @deffnx {C Function} scm_sys_modify_instance (old, new)
  1802. @end deffn
  1803. %modify-class
  1804. @c snarfed from goops.c:1637
  1805. @deffn {Scheme Procedure} %modify-class old new
  1806. @deffnx {C Function} scm_sys_modify_class (old, new)
  1807. @end deffn
  1808. %invalidate-class
  1809. @c snarfed from goops.c:1661
  1810. @deffn {Scheme Procedure} %invalidate-class class
  1811. @deffnx {C Function} scm_sys_invalidate_class (class)
  1812. @end deffn
  1813. %invalidate-method-cache!
  1814. @c snarfed from goops.c:1783
  1815. @deffn {Scheme Procedure} %invalidate-method-cache! gf
  1816. @deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
  1817. @end deffn
  1818. generic-capability?
  1819. @c snarfed from goops.c:1809
  1820. @deffn {Scheme Procedure} generic-capability? proc
  1821. @deffnx {C Function} scm_generic_capability_p (proc)
  1822. @end deffn
  1823. enable-primitive-generic!
  1824. @c snarfed from goops.c:1822
  1825. @deffn {Scheme Procedure} enable-primitive-generic! . subrs
  1826. @deffnx {C Function} scm_enable_primitive_generic_x (subrs)
  1827. @end deffn
  1828. primitive-generic-generic
  1829. @c snarfed from goops.c:1843
  1830. @deffn {Scheme Procedure} primitive-generic-generic subr
  1831. @deffnx {C Function} scm_primitive_generic_generic (subr)
  1832. @end deffn
  1833. make
  1834. @c snarfed from goops.c:2209
  1835. @deffn {Scheme Procedure} make . args
  1836. @deffnx {C Function} scm_make (args)
  1837. Make a new object. @var{args} must contain the class and
  1838. all necessary initialization information.
  1839. @end deffn
  1840. find-method
  1841. @c snarfed from goops.c:2298
  1842. @deffn {Scheme Procedure} find-method . l
  1843. @deffnx {C Function} scm_find_method (l)
  1844. @end deffn
  1845. %method-more-specific?
  1846. @c snarfed from goops.c:2318
  1847. @deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
  1848. @deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
  1849. Return true if method @var{m1} is more specific than @var{m2} given the argument types (classes) listed in @var{targs}.
  1850. @end deffn
  1851. %goops-loaded
  1852. @c snarfed from goops.c:2944
  1853. @deffn {Scheme Procedure} %goops-loaded
  1854. @deffnx {C Function} scm_sys_goops_loaded ()
  1855. Announce that GOOPS is loaded and perform initialization
  1856. on the C level which depends on the loaded GOOPS modules.
  1857. @end deffn
  1858. make-guardian
  1859. @c snarfed from guardians.c:307
  1860. @deffn {Scheme Procedure} make-guardian [greedy_p]
  1861. @deffnx {C Function} scm_make_guardian (greedy_p)
  1862. Create a new guardian.
  1863. A guardian protects a set of objects from garbage collection,
  1864. allowing a program to apply cleanup or other actions.
  1865. @code{make-guardian} returns a procedure representing the guardian.
  1866. Calling the guardian procedure with an argument adds the
  1867. argument to the guardian's set of protected objects.
  1868. Calling the guardian procedure without an argument returns
  1869. one of the protected objects which are ready for garbage
  1870. collection, or @code{#f} if no such object is available.
  1871. Objects which are returned in this way are removed from
  1872. the guardian.
  1873. @code{make-guardian} takes one optional argument that says whether the
  1874. new guardian should be greedy or sharing. If there is any chance
  1875. that any object protected by the guardian may be resurrected,
  1876. then you should make the guardian greedy (this is the default).
  1877. See R. Kent Dybvig, Carl Bruggeman, and David Eby (1993)
  1878. "Guardians in a Generation-Based Garbage Collector".
  1879. ACM SIGPLAN Conference on Programming Language Design
  1880. and Implementation, June 1993.
  1881. (the semantics are slightly different at this point, but the
  1882. paper still (mostly) accurately describes the interface).
  1883. @end deffn
  1884. guardian-destroyed?
  1885. @c snarfed from guardians.c:335
  1886. @deffn {Scheme Procedure} guardian-destroyed? guardian
  1887. @deffnx {C Function} scm_guardian_destroyed_p (guardian)
  1888. Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.
  1889. @end deffn
  1890. guardian-greedy?
  1891. @c snarfed from guardians.c:353
  1892. @deffn {Scheme Procedure} guardian-greedy? guardian
  1893. @deffnx {C Function} scm_guardian_greedy_p (guardian)
  1894. Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.
  1895. @end deffn
  1896. destroy-guardian!
  1897. @c snarfed from guardians.c:364
  1898. @deffn {Scheme Procedure} destroy-guardian! guardian
  1899. @deffnx {C Function} scm_destroy_guardian_x (guardian)
  1900. Destroys @var{guardian}, by making it impossible to put any more
  1901. objects in it or get any objects from it. It also unguards any
  1902. objects guarded by @var{guardian}.
  1903. @end deffn
  1904. hashq
  1905. @c snarfed from hash.c:183
  1906. @deffn {Scheme Procedure} hashq key size
  1907. @deffnx {C Function} scm_hashq (key, size)
  1908. Determine a hash value for @var{key} that is suitable for
  1909. lookups in a hashtable of size @var{size}, where @code{eq?} is
  1910. used as the equality predicate. The function returns an
  1911. integer in the range 0 to @var{size} - 1. Note that
  1912. @code{hashq} may use internal addresses. Thus two calls to
  1913. hashq where the keys are @code{eq?} are not guaranteed to
  1914. deliver the same value if the key object gets garbage collected
  1915. in between. This can happen, for example with symbols:
  1916. @code{(hashq 'foo n) (gc) (hashq 'foo n)} may produce two
  1917. different values, since @code{foo} will be garbage collected.
  1918. @end deffn
  1919. hashv
  1920. @c snarfed from hash.c:219
  1921. @deffn {Scheme Procedure} hashv key size
  1922. @deffnx {C Function} scm_hashv (key, size)
  1923. Determine a hash value for @var{key} that is suitable for
  1924. lookups in a hashtable of size @var{size}, where @code{eqv?} is
  1925. used as the equality predicate. The function returns an
  1926. integer in the range 0 to @var{size} - 1. Note that
  1927. @code{(hashv key)} may use internal addresses. Thus two calls
  1928. to hashv where the keys are @code{eqv?} are not guaranteed to
  1929. deliver the same value if the key object gets garbage collected
  1930. in between. This can happen, for example with symbols:
  1931. @code{(hashv 'foo n) (gc) (hashv 'foo n)} may produce two
  1932. different values, since @code{foo} will be garbage collected.
  1933. @end deffn
  1934. hash
  1935. @c snarfed from hash.c:242
  1936. @deffn {Scheme Procedure} hash key size
  1937. @deffnx {C Function} scm_hash (key, size)
  1938. Determine a hash value for @var{key} that is suitable for
  1939. lookups in a hashtable of size @var{size}, where @code{equal?}
  1940. is used as the equality predicate. The function returns an
  1941. integer in the range 0 to @var{size} - 1.
  1942. @end deffn
  1943. make-hash-table
  1944. @c snarfed from hashtab.c:332
  1945. @deffn {Scheme Procedure} make-hash-table [n]
  1946. @deffnx {C Function} scm_make_hash_table (n)
  1947. Make a new abstract hash table object with minimum number of buckets @var{n}
  1948. @end deffn
  1949. make-weak-key-hash-table
  1950. @c snarfed from hashtab.c:349
  1951. @deffn {Scheme Procedure} make-weak-key-hash-table [n]
  1952. @deffnx {Scheme Procedure} make-weak-value-hash-table size
  1953. @deffnx {Scheme Procedure} make-doubly-weak-hash-table size
  1954. @deffnx {C Function} scm_make_weak_key_hash_table (n)
  1955. Return a weak hash table with @var{size} buckets.
  1956. You can modify weak hash tables in exactly the same way you
  1957. would modify regular hash tables. (@pxref{Hash Tables})
  1958. @end deffn
  1959. make-weak-value-hash-table
  1960. @c snarfed from hashtab.c:364
  1961. @deffn {Scheme Procedure} make-weak-value-hash-table [n]
  1962. @deffnx {C Function} scm_make_weak_value_hash_table (n)
  1963. Return a hash table with weak values with @var{size} buckets.
  1964. (@pxref{Hash Tables})
  1965. @end deffn
  1966. make-doubly-weak-hash-table
  1967. @c snarfed from hashtab.c:381
  1968. @deffn {Scheme Procedure} make-doubly-weak-hash-table n
  1969. @deffnx {C Function} scm_make_doubly_weak_hash_table (n)
  1970. Return a hash table with weak keys and values with @var{size}
  1971. buckets. (@pxref{Hash Tables})
  1972. @end deffn
  1973. hash-table?
  1974. @c snarfed from hashtab.c:400
  1975. @deffn {Scheme Procedure} hash-table? obj
  1976. @deffnx {C Function} scm_hash_table_p (obj)
  1977. Return @code{#t} if @var{obj} is an abstract hash table object.
  1978. @end deffn
  1979. weak-key-hash-table?
  1980. @c snarfed from hashtab.c:414
  1981. @deffn {Scheme Procedure} weak-key-hash-table? obj
  1982. @deffnx {Scheme Procedure} weak-value-hash-table? obj
  1983. @deffnx {Scheme Procedure} doubly-weak-hash-table? obj
  1984. @deffnx {C Function} scm_weak_key_hash_table_p (obj)
  1985. Return @code{#t} if @var{obj} is the specified weak hash
  1986. table. Note that a doubly weak hash table is neither a weak key
  1987. nor a weak value hash table.
  1988. @end deffn
  1989. weak-value-hash-table?
  1990. @c snarfed from hashtab.c:424
  1991. @deffn {Scheme Procedure} weak-value-hash-table? obj
  1992. @deffnx {C Function} scm_weak_value_hash_table_p (obj)
  1993. Return @code{#t} if @var{obj} is a weak value hash table.
  1994. @end deffn
  1995. doubly-weak-hash-table?
  1996. @c snarfed from hashtab.c:434
  1997. @deffn {Scheme Procedure} doubly-weak-hash-table? obj
  1998. @deffnx {C Function} scm_doubly_weak_hash_table_p (obj)
  1999. Return @code{#t} if @var{obj} is a doubly weak hash table.
  2000. @end deffn
  2001. hash-clear!
  2002. @c snarfed from hashtab.c:586
  2003. @deffn {Scheme Procedure} hash-clear! table
  2004. @deffnx {C Function} scm_hash_clear_x (table)
  2005. Remove all items from @var{table} (without triggering a resize).
  2006. @end deffn
  2007. hashq-get-handle
  2008. @c snarfed from hashtab.c:607
  2009. @deffn {Scheme Procedure} hashq-get-handle table key
  2010. @deffnx {C Function} scm_hashq_get_handle (table, key)
  2011. This procedure returns the @code{(key . value)} pair from the
  2012. hash table @var{table}. If @var{table} does not hold an
  2013. associated value for @var{key}, @code{#f} is returned.
  2014. Uses @code{eq?} for equality testing.
  2015. @end deffn
  2016. hashq-create-handle!
  2017. @c snarfed from hashtab.c:619
  2018. @deffn {Scheme Procedure} hashq-create-handle! table key init
  2019. @deffnx {C Function} scm_hashq_create_handle_x (table, key, init)
  2020. This function looks up @var{key} in @var{table} and returns its handle.
  2021. If @var{key} is not already present, a new handle is created which
  2022. associates @var{key} with @var{init}.
  2023. @end deffn
  2024. hashq-ref
  2025. @c snarfed from hashtab.c:632
  2026. @deffn {Scheme Procedure} hashq-ref table key [dflt]
  2027. @deffnx {C Function} scm_hashq_ref (table, key, dflt)
  2028. Look up @var{key} in the hash table @var{table}, and return the
  2029. value (if any) associated with it. If @var{key} is not found,
  2030. return @var{default} (or @code{#f} if no @var{default} argument
  2031. is supplied). Uses @code{eq?} for equality testing.
  2032. @end deffn
  2033. hashq-set!
  2034. @c snarfed from hashtab.c:646
  2035. @deffn {Scheme Procedure} hashq-set! table key val
  2036. @deffnx {C Function} scm_hashq_set_x (table, key, val)
  2037. Find the entry in @var{table} associated with @var{key}, and
  2038. store @var{value} there. Uses @code{eq?} for equality testing.
  2039. @end deffn
  2040. hashq-remove!
  2041. @c snarfed from hashtab.c:658
  2042. @deffn {Scheme Procedure} hashq-remove! table key
  2043. @deffnx {C Function} scm_hashq_remove_x (table, key)
  2044. Remove @var{key} (and any value associated with it) from
  2045. @var{table}. Uses @code{eq?} for equality tests.
  2046. @end deffn
  2047. hashv-get-handle
  2048. @c snarfed from hashtab.c:673
  2049. @deffn {Scheme Procedure} hashv-get-handle table key
  2050. @deffnx {C Function} scm_hashv_get_handle (table, key)
  2051. This procedure returns the @code{(key . value)} pair from the
  2052. hash table @var{table}. If @var{table} does not hold an
  2053. associated value for @var{key}, @code{#f} is returned.
  2054. Uses @code{eqv?} for equality testing.
  2055. @end deffn
  2056. hashv-create-handle!
  2057. @c snarfed from hashtab.c:685
  2058. @deffn {Scheme Procedure} hashv-create-handle! table key init
  2059. @deffnx {C Function} scm_hashv_create_handle_x (table, key, init)
  2060. This function looks up @var{key} in @var{table} and returns its handle.
  2061. If @var{key} is not already present, a new handle is created which
  2062. associates @var{key} with @var{init}.
  2063. @end deffn
  2064. hashv-ref
  2065. @c snarfed from hashtab.c:699
  2066. @deffn {Scheme Procedure} hashv-ref table key [dflt]
  2067. @deffnx {C Function} scm_hashv_ref (table, key, dflt)
  2068. Look up @var{key} in the hash table @var{table}, and return the
  2069. value (if any) associated with it. If @var{key} is not found,
  2070. return @var{default} (or @code{#f} if no @var{default} argument
  2071. is supplied). Uses @code{eqv?} for equality testing.
  2072. @end deffn
  2073. hashv-set!
  2074. @c snarfed from hashtab.c:713
  2075. @deffn {Scheme Procedure} hashv-set! table key val
  2076. @deffnx {C Function} scm_hashv_set_x (table, key, val)
  2077. Find the entry in @var{table} associated with @var{key}, and
  2078. store @var{value} there. Uses @code{eqv?} for equality testing.
  2079. @end deffn
  2080. hashv-remove!
  2081. @c snarfed from hashtab.c:724
  2082. @deffn {Scheme Procedure} hashv-remove! table key
  2083. @deffnx {C Function} scm_hashv_remove_x (table, key)
  2084. Remove @var{key} (and any value associated with it) from
  2085. @var{table}. Uses @code{eqv?} for equality tests.
  2086. @end deffn
  2087. hash-get-handle
  2088. @c snarfed from hashtab.c:738
  2089. @deffn {Scheme Procedure} hash-get-handle table key
  2090. @deffnx {C Function} scm_hash_get_handle (table, key)
  2091. This procedure returns the @code{(key . value)} pair from the
  2092. hash table @var{table}. If @var{table} does not hold an
  2093. associated value for @var{key}, @code{#f} is returned.
  2094. Uses @code{equal?} for equality testing.
  2095. @end deffn
  2096. hash-create-handle!
  2097. @c snarfed from hashtab.c:750
  2098. @deffn {Scheme Procedure} hash-create-handle! table key init
  2099. @deffnx {C Function} scm_hash_create_handle_x (table, key, init)
  2100. This function looks up @var{key} in @var{table} and returns its handle.
  2101. If @var{key} is not already present, a new handle is created which
  2102. associates @var{key} with @var{init}.
  2103. @end deffn
  2104. hash-ref
  2105. @c snarfed from hashtab.c:763
  2106. @deffn {Scheme Procedure} hash-ref table key [dflt]
  2107. @deffnx {C Function} scm_hash_ref (table, key, dflt)
  2108. Look up @var{key} in the hash table @var{table}, and return the
  2109. value (if any) associated with it. If @var{key} is not found,
  2110. return @var{default} (or @code{#f} if no @var{default} argument
  2111. is supplied). Uses @code{equal?} for equality testing.
  2112. @end deffn
  2113. hash-set!
  2114. @c snarfed from hashtab.c:778
  2115. @deffn {Scheme Procedure} hash-set! table key val
  2116. @deffnx {C Function} scm_hash_set_x (table, key, val)
  2117. Find the entry in @var{table} associated with @var{key}, and
  2118. store @var{value} there. Uses @code{equal?} for equality
  2119. testing.
  2120. @end deffn
  2121. hash-remove!
  2122. @c snarfed from hashtab.c:790
  2123. @deffn {Scheme Procedure} hash-remove! table key
  2124. @deffnx {C Function} scm_hash_remove_x (table, key)
  2125. Remove @var{key} (and any value associated with it) from
  2126. @var{table}. Uses @code{equal?} for equality tests.
  2127. @end deffn
  2128. hashx-get-handle
  2129. @c snarfed from hashtab.c:831
  2130. @deffn {Scheme Procedure} hashx-get-handle hash assoc table key
  2131. @deffnx {C Function} scm_hashx_get_handle (hash, assoc, table, key)
  2132. This behaves the same way as the corresponding
  2133. @code{-get-handle} function, but uses @var{hash} as a hash
  2134. function and @var{assoc} to compare keys. @code{hash} must be
  2135. a function that takes two arguments, a key to be hashed and a
  2136. table size. @code{assoc} must be an associator function, like
  2137. @code{assoc}, @code{assq} or @code{assv}.
  2138. @end deffn
  2139. hashx-create-handle!
  2140. @c snarfed from hashtab.c:850
  2141. @deffn {Scheme Procedure} hashx-create-handle! hash assoc table key init
  2142. @deffnx {C Function} scm_hashx_create_handle_x (hash, assoc, table, key, init)
  2143. This behaves the same way as the corresponding
  2144. @code{-create-handle} function, but uses @var{hash} as a hash
  2145. function and @var{assoc} to compare keys. @code{hash} must be
  2146. a function that takes two arguments, a key to be hashed and a
  2147. table size. @code{assoc} must be an associator function, like
  2148. @code{assoc}, @code{assq} or @code{assv}.
  2149. @end deffn
  2150. hashx-ref
  2151. @c snarfed from hashtab.c:873
  2152. @deffn {Scheme Procedure} hashx-ref hash assoc table key [dflt]
  2153. @deffnx {C Function} scm_hashx_ref (hash, assoc, table, key, dflt)
  2154. This behaves the same way as the corresponding @code{ref}
  2155. function, but uses @var{hash} as a hash function and
  2156. @var{assoc} to compare keys. @code{hash} must be a function
  2157. that takes two arguments, a key to be hashed and a table size.
  2158. @code{assoc} must be an associator function, like @code{assoc},
  2159. @code{assq} or @code{assv}.
  2160. By way of illustration, @code{hashq-ref table key} is
  2161. equivalent to @code{hashx-ref hashq assq table key}.
  2162. @end deffn
  2163. hashx-set!
  2164. @c snarfed from hashtab.c:899
  2165. @deffn {Scheme Procedure} hashx-set! hash assoc table key val
  2166. @deffnx {C Function} scm_hashx_set_x (hash, assoc, table, key, val)
  2167. This behaves the same way as the corresponding @code{set!}
  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-set! table key} is
  2174. equivalent to @code{hashx-set! hashq assq table key}.
  2175. @end deffn
  2176. hashx-remove!
  2177. @c snarfed from hashtab.c:920
  2178. @deffn {Scheme Procedure} hashx-remove! hash assoc table obj
  2179. @deffnx {C Function} scm_hashx_remove_x (hash, assoc, table, obj)
  2180. This behaves the same way as the corresponding @code{remove!}
  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-remove! table key} is
  2187. equivalent to @code{hashx-remove! hashq assq #f table key}.
  2188. @end deffn
  2189. hash-fold
  2190. @c snarfed from hashtab.c:1009
  2191. @deffn {Scheme Procedure} hash-fold proc init table
  2192. @deffnx {C Function} scm_hash_fold (proc, init, table)
  2193. An iterator over hash-table elements.
  2194. Accumulates and returns a result by applying PROC successively.
  2195. The arguments to PROC are "(key value prior-result)" where key
  2196. and value are successive pairs from the hash table TABLE, and
  2197. prior-result is either INIT (for the first application of PROC)
  2198. or the return value of the previous application of PROC.
  2199. For example, @code{(hash-fold acons '() tab)} will convert a hash
  2200. table into an a-list of key-value pairs.
  2201. @end deffn
  2202. hash-for-each
  2203. @c snarfed from hashtab.c:1030
  2204. @deffn {Scheme Procedure} hash-for-each proc table
  2205. @deffnx {C Function} scm_hash_for_each (proc, table)
  2206. An iterator over hash-table elements.
  2207. Applies PROC successively on all hash table items.
  2208. The arguments to PROC are "(key value)" where key
  2209. and value are successive pairs from the hash table TABLE.
  2210. @end deffn
  2211. hash-for-each-handle
  2212. @c snarfed from hashtab.c:1047
  2213. @deffn {Scheme Procedure} hash-for-each-handle proc table
  2214. @deffnx {C Function} scm_hash_for_each_handle (proc, table)
  2215. An iterator over hash-table elements.
  2216. Applies PROC successively on all hash table handles.
  2217. @end deffn
  2218. hash-map->list
  2219. @c snarfed from hashtab.c:1073
  2220. @deffn {Scheme Procedure} hash-map->list proc table
  2221. @deffnx {C Function} scm_hash_map_to_list (proc, table)
  2222. An iterator over hash-table elements.
  2223. Accumulates and returns as a list the results of applying PROC successively.
  2224. The arguments to PROC are "(key value)" where key
  2225. and value are successive pairs from the hash table TABLE.
  2226. @end deffn
  2227. make-hook
  2228. @c snarfed from hooks.c:154
  2229. @deffn {Scheme Procedure} make-hook [n_args]
  2230. @deffnx {C Function} scm_make_hook (n_args)
  2231. Create a hook for storing procedure of arity @var{n_args}.
  2232. @var{n_args} defaults to zero. The returned value is a hook
  2233. object to be used with the other hook procedures.
  2234. @end deffn
  2235. hook?
  2236. @c snarfed from hooks.c:171
  2237. @deffn {Scheme Procedure} hook? x
  2238. @deffnx {C Function} scm_hook_p (x)
  2239. Return @code{#t} if @var{x} is a hook, @code{#f} otherwise.
  2240. @end deffn
  2241. hook-empty?
  2242. @c snarfed from hooks.c:182
  2243. @deffn {Scheme Procedure} hook-empty? hook
  2244. @deffnx {C Function} scm_hook_empty_p (hook)
  2245. Return @code{#t} if @var{hook} is an empty hook, @code{#f}
  2246. otherwise.
  2247. @end deffn
  2248. add-hook!
  2249. @c snarfed from hooks.c:196
  2250. @deffn {Scheme Procedure} add-hook! hook proc [append_p]
  2251. @deffnx {C Function} scm_add_hook_x (hook, proc, append_p)
  2252. Add the procedure @var{proc} to the hook @var{hook}. The
  2253. procedure is added to the end if @var{append_p} is true,
  2254. otherwise it is added to the front. The return value of this
  2255. procedure is not specified.
  2256. @end deffn
  2257. remove-hook!
  2258. @c snarfed from hooks.c:223
  2259. @deffn {Scheme Procedure} remove-hook! hook proc
  2260. @deffnx {C Function} scm_remove_hook_x (hook, proc)
  2261. Remove the procedure @var{proc} from the hook @var{hook}. The
  2262. return value of this procedure is not specified.
  2263. @end deffn
  2264. reset-hook!
  2265. @c snarfed from hooks.c:237
  2266. @deffn {Scheme Procedure} reset-hook! hook
  2267. @deffnx {C Function} scm_reset_hook_x (hook)
  2268. Remove all procedures from the hook @var{hook}. The return
  2269. value of this procedure is not specified.
  2270. @end deffn
  2271. run-hook
  2272. @c snarfed from hooks.c:251
  2273. @deffn {Scheme Procedure} run-hook hook . args
  2274. @deffnx {C Function} scm_run_hook (hook, args)
  2275. Apply all procedures from the hook @var{hook} to the arguments
  2276. @var{args}. The order of the procedure application is first to
  2277. last. The return value of this procedure is not specified.
  2278. @end deffn
  2279. hook->list
  2280. @c snarfed from hooks.c:278
  2281. @deffn {Scheme Procedure} hook->list hook
  2282. @deffnx {C Function} scm_hook_to_list (hook)
  2283. Convert the procedure list of @var{hook} to a list.
  2284. @end deffn
  2285. gettext
  2286. @c snarfed from i18n.c:90
  2287. @deffn {Scheme Procedure} gettext msgid [domain [category]]
  2288. @deffnx {C Function} scm_gettext (msgid, domain, category)
  2289. 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.
  2290. @end deffn
  2291. ngettext
  2292. @c snarfed from i18n.c:146
  2293. @deffn {Scheme Procedure} ngettext msgid msgid_plural n [domain [category]]
  2294. @deffnx {C Function} scm_ngettext (msgid, msgid_plural, n, domain, category)
  2295. 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.
  2296. @end deffn
  2297. textdomain
  2298. @c snarfed from i18n.c:209
  2299. @deffn {Scheme Procedure} textdomain [domainname]
  2300. @deffnx {C Function} scm_textdomain (domainname)
  2301. If optional parameter @var{domainname} is supplied, set the textdomain. Return the textdomain.
  2302. @end deffn
  2303. bindtextdomain
  2304. @c snarfed from i18n.c:241
  2305. @deffn {Scheme Procedure} bindtextdomain domainname [directory]
  2306. @deffnx {C Function} scm_bindtextdomain (domainname, directory)
  2307. If optional parameter @var{directory} is supplied, set message catalogs to directory @var{directory}. Return the directory bound to @var{domainname}.
  2308. @end deffn
  2309. bind-textdomain-codeset
  2310. @c snarfed from i18n.c:280
  2311. @deffn {Scheme Procedure} bind-textdomain-codeset domainname [encoding]
  2312. @deffnx {C Function} scm_bind_textdomain_codeset (domainname, encoding)
  2313. If optional parameter @var{encoding} is supplied, set encoding for message catalogs of @var{domainname}. Return the encoding of @var{domainname}.
  2314. @end deffn
  2315. ftell
  2316. @c snarfed from ioext.c:54
  2317. @deffn {Scheme Procedure} ftell fd_port
  2318. @deffnx {C Function} scm_ftell (fd_port)
  2319. Return an integer representing the current position of
  2320. @var{fd/port}, measured from the beginning. Equivalent to:
  2321. @lisp
  2322. (seek port 0 SEEK_CUR)
  2323. @end lisp
  2324. @end deffn
  2325. redirect-port
  2326. @c snarfed from ioext.c:72
  2327. @deffn {Scheme Procedure} redirect-port old new
  2328. @deffnx {C Function} scm_redirect_port (old, new)
  2329. This procedure takes two ports and duplicates the underlying file
  2330. descriptor from @var{old-port} into @var{new-port}. The
  2331. current file descriptor in @var{new-port} will be closed.
  2332. After the redirection the two ports will share a file position
  2333. and file status flags.
  2334. The return value is unspecified.
  2335. Unexpected behaviour can result if both ports are subsequently used
  2336. and the original and/or duplicate ports are buffered.
  2337. This procedure does not have any side effects on other ports or
  2338. revealed counts.
  2339. @end deffn
  2340. dup->fdes
  2341. @c snarfed from ioext.c:111
  2342. @deffn {Scheme Procedure} dup->fdes fd_or_port [fd]
  2343. @deffnx {C Function} scm_dup_to_fdes (fd_or_port, fd)
  2344. Return a new integer file descriptor referring to the open file
  2345. designated by @var{fd_or_port}, which must be either an open
  2346. file port or a file descriptor.
  2347. @end deffn
  2348. dup2
  2349. @c snarfed from ioext.c:158
  2350. @deffn {Scheme Procedure} dup2 oldfd newfd
  2351. @deffnx {C Function} scm_dup2 (oldfd, newfd)
  2352. A simple wrapper for the @code{dup2} system call.
  2353. Copies the file descriptor @var{oldfd} to descriptor
  2354. number @var{newfd}, replacing the previous meaning
  2355. of @var{newfd}. Both @var{oldfd} and @var{newfd} must
  2356. be integers.
  2357. Unlike for dup->fdes or primitive-move->fdes, no attempt
  2358. is made to move away ports which are using @var{newfd}.
  2359. The return value is unspecified.
  2360. @end deffn
  2361. fileno
  2362. @c snarfed from ioext.c:177
  2363. @deffn {Scheme Procedure} fileno port
  2364. @deffnx {C Function} scm_fileno (port)
  2365. Return the integer file descriptor underlying @var{port}. Does
  2366. not change its revealed count.
  2367. @end deffn
  2368. isatty?
  2369. @c snarfed from ioext.c:197
  2370. @deffn {Scheme Procedure} isatty? port
  2371. @deffnx {C Function} scm_isatty_p (port)
  2372. Return @code{#t} if @var{port} is using a serial non--file
  2373. device, otherwise @code{#f}.
  2374. @end deffn
  2375. fdopen
  2376. @c snarfed from ioext.c:219
  2377. @deffn {Scheme Procedure} fdopen fdes modes
  2378. @deffnx {C Function} scm_fdopen (fdes, modes)
  2379. Return a new port based on the file descriptor @var{fdes}.
  2380. Modes are given by the string @var{modes}. The revealed count
  2381. of the port is initialized to zero. The modes string is the
  2382. same as that accepted by @ref{File Ports, open-file}.
  2383. @end deffn
  2384. primitive-move->fdes
  2385. @c snarfed from ioext.c:241
  2386. @deffn {Scheme Procedure} primitive-move->fdes port fd
  2387. @deffnx {C Function} scm_primitive_move_to_fdes (port, fd)
  2388. Moves the underlying file descriptor for @var{port} to the integer
  2389. value @var{fdes} without changing the revealed count of @var{port}.
  2390. Any other ports already using this descriptor will be automatically
  2391. shifted to new descriptors and their revealed counts reset to zero.
  2392. The return value is @code{#f} if the file descriptor already had the
  2393. required value or @code{#t} if it was moved.
  2394. @end deffn
  2395. fdes->ports
  2396. @c snarfed from ioext.c:274
  2397. @deffn {Scheme Procedure} fdes->ports fd
  2398. @deffnx {C Function} scm_fdes_to_ports (fd)
  2399. Return a list of existing ports which have @var{fdes} as an
  2400. underlying file descriptor, without changing their revealed
  2401. counts.
  2402. @end deffn
  2403. keyword?
  2404. @c snarfed from keywords.c:52
  2405. @deffn {Scheme Procedure} keyword? obj
  2406. @deffnx {C Function} scm_keyword_p (obj)
  2407. Return @code{#t} if the argument @var{obj} is a keyword, else
  2408. @code{#f}.
  2409. @end deffn
  2410. symbol->keyword
  2411. @c snarfed from keywords.c:61
  2412. @deffn {Scheme Procedure} symbol->keyword symbol
  2413. @deffnx {C Function} scm_symbol_to_keyword (symbol)
  2414. Return the keyword with the same name as @var{symbol}.
  2415. @end deffn
  2416. keyword->symbol
  2417. @c snarfed from keywords.c:82
  2418. @deffn {Scheme Procedure} keyword->symbol keyword
  2419. @deffnx {C Function} scm_keyword_to_symbol (keyword)
  2420. Return the symbol with the same name as @var{keyword}.
  2421. @end deffn
  2422. list
  2423. @c snarfed from list.c:104
  2424. @deffn {Scheme Procedure} list . objs
  2425. @deffnx {C Function} scm_list (objs)
  2426. Return a list containing @var{objs}, the arguments to
  2427. @code{list}.
  2428. @end deffn
  2429. cons*
  2430. @c snarfed from list.c:119
  2431. @deffn {Scheme Procedure} cons* arg . rest
  2432. @deffnx {C Function} scm_cons_star (arg, rest)
  2433. Like @code{list}, but the last arg provides the tail of the
  2434. constructed list, returning @code{(cons @var{arg1} (cons
  2435. @var{arg2} (cons @dots{} @var{argn})))}. Requires at least one
  2436. argument. If given one argument, that argument is returned as
  2437. result. This function is called @code{list*} in some other
  2438. Schemes and in Common LISP.
  2439. @end deffn
  2440. null?
  2441. @c snarfed from list.c:143
  2442. @deffn {Scheme Procedure} null? x
  2443. @deffnx {C Function} scm_null_p (x)
  2444. Return @code{#t} iff @var{x} is the empty list, else @code{#f}.
  2445. @end deffn
  2446. list?
  2447. @c snarfed from list.c:153
  2448. @deffn {Scheme Procedure} list? x
  2449. @deffnx {C Function} scm_list_p (x)
  2450. Return @code{#t} iff @var{x} is a proper list, else @code{#f}.
  2451. @end deffn
  2452. length
  2453. @c snarfed from list.c:194
  2454. @deffn {Scheme Procedure} length lst
  2455. @deffnx {C Function} scm_length (lst)
  2456. Return the number of elements in list @var{lst}.
  2457. @end deffn
  2458. append
  2459. @c snarfed from list.c:223
  2460. @deffn {Scheme Procedure} append . args
  2461. @deffnx {C Function} scm_append (args)
  2462. Return a list consisting of the elements the lists passed as
  2463. arguments.
  2464. @lisp
  2465. (append '(x) '(y)) @result{} (x y)
  2466. (append '(a) '(b c d)) @result{} (a b c d)
  2467. (append '(a (b)) '((c))) @result{} (a (b) (c))
  2468. @end lisp
  2469. The resulting list is always newly allocated, except that it
  2470. shares structure with the last list argument. The last
  2471. argument may actually be any object; an improper list results
  2472. if the last argument is not a proper list.
  2473. @lisp
  2474. (append '(a b) '(c . d)) @result{} (a b c . d)
  2475. (append '() 'a) @result{} a
  2476. @end lisp
  2477. @end deffn
  2478. append!
  2479. @c snarfed from list.c:259
  2480. @deffn {Scheme Procedure} append! . lists
  2481. @deffnx {C Function} scm_append_x (lists)
  2482. A destructive version of @code{append} (@pxref{Pairs and
  2483. Lists,,,r5rs, The Revised^5 Report on Scheme}). The cdr field
  2484. of each list's final pair is changed to point to the head of
  2485. the next list, so no consing is performed. Return
  2486. the mutated list.
  2487. @end deffn
  2488. last-pair
  2489. @c snarfed from list.c:291
  2490. @deffn {Scheme Procedure} last-pair lst
  2491. @deffnx {C Function} scm_last_pair (lst)
  2492. Return the last pair in @var{lst}, signalling an error if
  2493. @var{lst} is circular.
  2494. @end deffn
  2495. reverse
  2496. @c snarfed from list.c:321
  2497. @deffn {Scheme Procedure} reverse lst
  2498. @deffnx {C Function} scm_reverse (lst)
  2499. Return a new list that contains the elements of @var{lst} but
  2500. in reverse order.
  2501. @end deffn
  2502. reverse!
  2503. @c snarfed from list.c:355
  2504. @deffn {Scheme Procedure} reverse! lst [new_tail]
  2505. @deffnx {C Function} scm_reverse_x (lst, new_tail)
  2506. A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r5rs,
  2507. The Revised^5 Report on Scheme}). The cdr of each cell in @var{lst} is
  2508. modified to point to the previous list element. Return the
  2509. reversed list.
  2510. Caveat: because the list is modified in place, the tail of the original
  2511. list now becomes its head, and the head of the original list now becomes
  2512. the tail. Therefore, the @var{lst} symbol to which the head of the
  2513. original list was bound now points to the tail. To ensure that the head
  2514. of the modified list is not lost, it is wise to save the return value of
  2515. @code{reverse!}
  2516. @end deffn
  2517. list-ref
  2518. @c snarfed from list.c:381
  2519. @deffn {Scheme Procedure} list-ref list k
  2520. @deffnx {C Function} scm_list_ref (list, k)
  2521. Return the @var{k}th element from @var{list}.
  2522. @end deffn
  2523. list-set!
  2524. @c snarfed from list.c:405
  2525. @deffn {Scheme Procedure} list-set! list k val
  2526. @deffnx {C Function} scm_list_set_x (list, k, val)
  2527. Set the @var{k}th element of @var{list} to @var{val}.
  2528. @end deffn
  2529. list-cdr-ref
  2530. @c snarfed from list.c:427
  2531. @deffn {Scheme Procedure} list-cdr-ref
  2532. implemented by the C function "scm_list_tail"
  2533. @end deffn
  2534. list-tail
  2535. @c snarfed from list.c:436
  2536. @deffn {Scheme Procedure} list-tail lst k
  2537. @deffnx {Scheme Procedure} list-cdr-ref lst k
  2538. @deffnx {C Function} scm_list_tail (lst, k)
  2539. Return the "tail" of @var{lst} beginning with its @var{k}th element.
  2540. The first element of the list is considered to be element 0.
  2541. @code{list-tail} and @code{list-cdr-ref} are identical. It may help to
  2542. think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list,
  2543. or returning the results of cdring @var{k} times down @var{lst}.
  2544. @end deffn
  2545. list-cdr-set!
  2546. @c snarfed from list.c:451
  2547. @deffn {Scheme Procedure} list-cdr-set! list k val
  2548. @deffnx {C Function} scm_list_cdr_set_x (list, k, val)
  2549. Set the @var{k}th cdr of @var{list} to @var{val}.
  2550. @end deffn
  2551. list-head
  2552. @c snarfed from list.c:479
  2553. @deffn {Scheme Procedure} list-head lst k
  2554. @deffnx {C Function} scm_list_head (lst, k)
  2555. Copy the first @var{k} elements from @var{lst} into a new list, and
  2556. return it.
  2557. @end deffn
  2558. list-copy
  2559. @c snarfed from list.c:530
  2560. @deffn {Scheme Procedure} list-copy lst
  2561. @deffnx {C Function} scm_list_copy (lst)
  2562. Return a (newly-created) copy of @var{lst}.
  2563. @end deffn
  2564. memq
  2565. @c snarfed from list.c:584
  2566. @deffn {Scheme Procedure} memq x lst
  2567. @deffnx {C Function} scm_memq (x, lst)
  2568. Return the first sublist of @var{lst} whose car is @code{eq?}
  2569. to @var{x} where the sublists of @var{lst} are the non-empty
  2570. lists returned by @code{(list-tail @var{lst} @var{k})} for
  2571. @var{k} less than the length of @var{lst}. If @var{x} does not
  2572. occur in @var{lst}, then @code{#f} (not the empty list) is
  2573. returned.
  2574. @end deffn
  2575. memv
  2576. @c snarfed from list.c:600
  2577. @deffn {Scheme Procedure} memv x lst
  2578. @deffnx {C Function} scm_memv (x, lst)
  2579. Return the first sublist of @var{lst} whose car is @code{eqv?}
  2580. to @var{x} where the sublists of @var{lst} are the non-empty
  2581. lists returned by @code{(list-tail @var{lst} @var{k})} for
  2582. @var{k} less than the length of @var{lst}. If @var{x} does not
  2583. occur in @var{lst}, then @code{#f} (not the empty list) is
  2584. returned.
  2585. @end deffn
  2586. member
  2587. @c snarfed from list.c:621
  2588. @deffn {Scheme Procedure} member x lst
  2589. @deffnx {C Function} scm_member (x, lst)
  2590. Return the first sublist of @var{lst} whose car is
  2591. @code{equal?} to @var{x} where the sublists of @var{lst} are
  2592. the non-empty lists returned by @code{(list-tail @var{lst}
  2593. @var{k})} for @var{k} less than the length of @var{lst}. If
  2594. @var{x} does not occur in @var{lst}, then @code{#f} (not the
  2595. empty list) is returned.
  2596. @end deffn
  2597. delq!
  2598. @c snarfed from list.c:646
  2599. @deffn {Scheme Procedure} delq! item lst
  2600. @deffnx {Scheme Procedure} delv! item lst
  2601. @deffnx {Scheme Procedure} delete! item lst
  2602. @deffnx {C Function} scm_delq_x (item, lst)
  2603. These procedures are destructive versions of @code{delq}, @code{delv}
  2604. and @code{delete}: they modify the existing @var{lst}
  2605. rather than creating a new list. Caveat evaluator: Like other
  2606. destructive list functions, these functions cannot modify the binding of
  2607. @var{lst}, and so cannot be used to delete the first element of
  2608. @var{lst} destructively.
  2609. @end deffn
  2610. delv!
  2611. @c snarfed from list.c:670
  2612. @deffn {Scheme Procedure} delv! item lst
  2613. @deffnx {C Function} scm_delv_x (item, lst)
  2614. Destructively remove all elements from @var{lst} that are
  2615. @code{eqv?} to @var{item}.
  2616. @end deffn
  2617. delete!
  2618. @c snarfed from list.c:695
  2619. @deffn {Scheme Procedure} delete! item lst
  2620. @deffnx {C Function} scm_delete_x (item, lst)
  2621. Destructively remove all elements from @var{lst} that are
  2622. @code{equal?} to @var{item}.
  2623. @end deffn
  2624. delq
  2625. @c snarfed from list.c:724
  2626. @deffn {Scheme Procedure} delq item lst
  2627. @deffnx {C Function} scm_delq (item, lst)
  2628. Return a newly-created copy of @var{lst} with elements
  2629. @code{eq?} to @var{item} removed. This procedure mirrors
  2630. @code{memq}: @code{delq} compares elements of @var{lst} against
  2631. @var{item} with @code{eq?}.
  2632. @end deffn
  2633. delv
  2634. @c snarfed from list.c:737
  2635. @deffn {Scheme Procedure} delv item lst
  2636. @deffnx {C Function} scm_delv (item, lst)
  2637. Return a newly-created copy of @var{lst} with elements
  2638. @code{eqv?} to @var{item} removed. This procedure mirrors
  2639. @code{memv}: @code{delv} compares elements of @var{lst} against
  2640. @var{item} with @code{eqv?}.
  2641. @end deffn
  2642. delete
  2643. @c snarfed from list.c:750
  2644. @deffn {Scheme Procedure} delete item lst
  2645. @deffnx {C Function} scm_delete (item, lst)
  2646. Return a newly-created copy of @var{lst} with elements
  2647. @code{equal?} to @var{item} removed. This procedure mirrors
  2648. @code{member}: @code{delete} compares elements of @var{lst}
  2649. against @var{item} with @code{equal?}.
  2650. @end deffn
  2651. delq1!
  2652. @c snarfed from list.c:763
  2653. @deffn {Scheme Procedure} delq1! item lst
  2654. @deffnx {C Function} scm_delq1_x (item, lst)
  2655. Like @code{delq!}, but only deletes the first occurrence of
  2656. @var{item} from @var{lst}. Tests for equality using
  2657. @code{eq?}. See also @code{delv1!} and @code{delete1!}.
  2658. @end deffn
  2659. delv1!
  2660. @c snarfed from list.c:791
  2661. @deffn {Scheme Procedure} delv1! item lst
  2662. @deffnx {C Function} scm_delv1_x (item, lst)
  2663. Like @code{delv!}, but only deletes the first occurrence of
  2664. @var{item} from @var{lst}. Tests for equality using
  2665. @code{eqv?}. See also @code{delq1!} and @code{delete1!}.
  2666. @end deffn
  2667. delete1!
  2668. @c snarfed from list.c:819
  2669. @deffn {Scheme Procedure} delete1! item lst
  2670. @deffnx {C Function} scm_delete1_x (item, lst)
  2671. Like @code{delete!}, but only deletes the first occurrence of
  2672. @var{item} from @var{lst}. Tests for equality using
  2673. @code{equal?}. See also @code{delq1!} and @code{delv1!}.
  2674. @end deffn
  2675. filter
  2676. @c snarfed from list.c:851
  2677. @deffn {Scheme Procedure} filter pred list
  2678. @deffnx {C Function} scm_filter (pred, list)
  2679. Return all the elements of 2nd arg @var{list} that satisfy predicate @var{pred}.
  2680. The list is not disordered -- elements that appear in the result list occur
  2681. in the same order as they occur in the argument list. The returned list may
  2682. share a common tail with the argument list. The dynamic order in which the
  2683. various applications of pred are made is not specified.
  2684. @lisp
  2685. (filter even? '(0 7 8 8 43 -4)) => (0 8 8 -4)
  2686. @end lisp
  2687. @end deffn
  2688. filter!
  2689. @c snarfed from list.c:878
  2690. @deffn {Scheme Procedure} filter! pred list
  2691. @deffnx {C Function} scm_filter_x (pred, list)
  2692. Linear-update variant of @code{filter}.
  2693. @end deffn
  2694. primitive-load
  2695. @c snarfed from load.c:72
  2696. @deffn {Scheme Procedure} primitive-load filename
  2697. @deffnx {C Function} scm_primitive_load (filename)
  2698. Load the file named @var{filename} and evaluate its contents in
  2699. the top-level environment. The load paths are not searched;
  2700. @var{filename} must either be a full pathname or be a pathname
  2701. relative to the current directory. If the variable
  2702. @code{%load-hook} is defined, it should be bound to a procedure
  2703. that will be called before any code is loaded. See the
  2704. documentation for @code{%load-hook} later in this section.
  2705. @end deffn
  2706. %package-data-dir
  2707. @c snarfed from load.c:117
  2708. @deffn {Scheme Procedure} %package-data-dir
  2709. @deffnx {C Function} scm_sys_package_data_dir ()
  2710. Return the name of the directory where Scheme packages, modules and
  2711. libraries are kept. On most Unix systems, this will be
  2712. @samp{/usr/local/share/guile}.
  2713. @end deffn
  2714. %library-dir
  2715. @c snarfed from load.c:129
  2716. @deffn {Scheme Procedure} %library-dir
  2717. @deffnx {C Function} scm_sys_library_dir ()
  2718. Return the directory where the Guile Scheme library files are installed.
  2719. E.g., may return "/usr/share/guile/1.3.5".
  2720. @end deffn
  2721. %site-dir
  2722. @c snarfed from load.c:141
  2723. @deffn {Scheme Procedure} %site-dir
  2724. @deffnx {C Function} scm_sys_site_dir ()
  2725. Return the directory where the Guile site files are installed.
  2726. E.g., may return "/usr/share/guile/site".
  2727. @end deffn
  2728. parse-path
  2729. @c snarfed from load.c:166
  2730. @deffn {Scheme Procedure} parse-path path [tail]
  2731. @deffnx {C Function} scm_parse_path (path, tail)
  2732. Parse @var{path}, which is expected to be a colon-separated
  2733. string, into a list and return the resulting list with
  2734. @var{tail} appended. If @var{path} is @code{#f}, @var{tail}
  2735. is returned.
  2736. @end deffn
  2737. search-path
  2738. @c snarfed from load.c:293
  2739. @deffn {Scheme Procedure} search-path path filename [extensions]
  2740. @deffnx {C Function} scm_search_path (path, filename, extensions)
  2741. Search @var{path} for a directory containing a file named
  2742. @var{filename}. The file must be readable, and not a directory.
  2743. If we find one, return its full filename; otherwise, return
  2744. @code{#f}. If @var{filename} is absolute, return it unchanged.
  2745. If given, @var{extensions} is a list of strings; for each
  2746. directory in @var{path}, we search for @var{filename}
  2747. concatenated with each @var{extension}.
  2748. @end deffn
  2749. %search-load-path
  2750. @c snarfed from load.c:430
  2751. @deffn {Scheme Procedure} %search-load-path filename
  2752. @deffnx {C Function} scm_sys_search_load_path (filename)
  2753. Search @var{%load-path} for the file named @var{filename},
  2754. which must be readable by the current user. If @var{filename}
  2755. is found in the list of paths to search or is an absolute
  2756. pathname, return its full pathname. Otherwise, return
  2757. @code{#f}. Filenames may have any of the optional extensions
  2758. in the @code{%load-extensions} list; @code{%search-load-path}
  2759. will try each extension automatically.
  2760. @end deffn
  2761. primitive-load-path
  2762. @c snarfed from load.c:451
  2763. @deffn {Scheme Procedure} primitive-load-path filename
  2764. @deffnx {C Function} scm_primitive_load_path (filename)
  2765. Search @var{%load-path} for the file named @var{filename} and
  2766. load it into the top-level environment. If @var{filename} is a
  2767. relative pathname and is not found in the list of search paths,
  2768. an error is signalled.
  2769. @end deffn
  2770. procedure->memoizing-macro
  2771. @c snarfed from macros.c:109
  2772. @deffn {Scheme Procedure} procedure->memoizing-macro code
  2773. @deffnx {C Function} scm_makmmacro (code)
  2774. Return a @dfn{macro} which, when a symbol defined to this value
  2775. appears as the first symbol in an expression, evaluates the
  2776. result of applying @var{code} to the expression and the
  2777. environment.
  2778. @code{procedure->memoizing-macro} is the same as
  2779. @code{procedure->macro}, except that the expression returned by
  2780. @var{code} replaces the original macro expression in the memoized
  2781. form of the containing code.
  2782. @end deffn
  2783. procedure->syntax
  2784. @c snarfed from macros.c:123
  2785. @deffn {Scheme Procedure} procedure->syntax code
  2786. @deffnx {C Function} scm_makacro (code)
  2787. Return a @dfn{macro} which, when a symbol defined to this value
  2788. appears as the first symbol in an expression, returns the
  2789. result of applying @var{code} to the expression and the
  2790. environment.
  2791. @end deffn
  2792. procedure->macro
  2793. @c snarfed from macros.c:146
  2794. @deffn {Scheme Procedure} procedure->macro code
  2795. @deffnx {C Function} scm_makmacro (code)
  2796. Return a @dfn{macro} which, when a symbol defined to this value
  2797. appears as the first symbol in an expression, evaluates the
  2798. result of applying @var{code} to the expression and the
  2799. environment. For example:
  2800. @lisp
  2801. (define trace
  2802. (procedure->macro
  2803. (lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr x))))))
  2804. (trace @i{foo}) @equiv{} (set! @i{foo} (tracef @i{foo} '@i{foo})).
  2805. @end lisp
  2806. @end deffn
  2807. macro?
  2808. @c snarfed from macros.c:165
  2809. @deffn {Scheme Procedure} macro? obj
  2810. @deffnx {C Function} scm_macro_p (obj)
  2811. Return @code{#t} if @var{obj} is a regular macro, a memoizing macro, a
  2812. syntax transformer, or a syntax-case macro.
  2813. @end deffn
  2814. macro-type
  2815. @c snarfed from macros.c:186
  2816. @deffn {Scheme Procedure} macro-type m
  2817. @deffnx {C Function} scm_macro_type (m)
  2818. Return one of the symbols @code{syntax}, @code{macro},
  2819. @code{macro!}, or @code{syntax-case}, depending on whether
  2820. @var{m} is a syntax transformer, a regular macro, a memoizing
  2821. macro, or a syntax-case macro, respectively. If @var{m} is
  2822. not a macro, @code{#f} is returned.
  2823. @end deffn
  2824. macro-name
  2825. @c snarfed from macros.c:207
  2826. @deffn {Scheme Procedure} macro-name m
  2827. @deffnx {C Function} scm_macro_name (m)
  2828. Return the name of the macro @var{m}.
  2829. @end deffn
  2830. macro-transformer
  2831. @c snarfed from macros.c:218
  2832. @deffn {Scheme Procedure} macro-transformer m
  2833. @deffnx {C Function} scm_macro_transformer (m)
  2834. Return the transformer of the macro @var{m}.
  2835. @end deffn
  2836. current-module
  2837. @c snarfed from modules.c:45
  2838. @deffn {Scheme Procedure} current-module
  2839. @deffnx {C Function} scm_current_module ()
  2840. Return the current module.
  2841. @end deffn
  2842. set-current-module
  2843. @c snarfed from modules.c:57
  2844. @deffn {Scheme Procedure} set-current-module module
  2845. @deffnx {C Function} scm_set_current_module (module)
  2846. Set the current module to @var{module} and return
  2847. the previous current module.
  2848. @end deffn
  2849. interaction-environment
  2850. @c snarfed from modules.c:80
  2851. @deffn {Scheme Procedure} interaction-environment
  2852. @deffnx {C Function} scm_interaction_environment ()
  2853. Return a specifier for the environment that contains
  2854. implementation--defined bindings, typically a superset of those
  2855. listed in the report. The intent is that this procedure will
  2856. return the environment in which the implementation would
  2857. evaluate expressions dynamically typed by the user.
  2858. @end deffn
  2859. env-module
  2860. @c snarfed from modules.c:266
  2861. @deffn {Scheme Procedure} env-module env
  2862. @deffnx {C Function} scm_env_module (env)
  2863. Return the module of @var{ENV}, a lexical environment.
  2864. @end deffn
  2865. standard-eval-closure
  2866. @c snarfed from modules.c:342
  2867. @deffn {Scheme Procedure} standard-eval-closure module
  2868. @deffnx {C Function} scm_standard_eval_closure (module)
  2869. Return an eval closure for the module @var{module}.
  2870. @end deffn
  2871. standard-interface-eval-closure
  2872. @c snarfed from modules.c:353
  2873. @deffn {Scheme Procedure} standard-interface-eval-closure module
  2874. @deffnx {C Function} scm_standard_interface_eval_closure (module)
  2875. Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
  2876. @end deffn
  2877. module-import-interface
  2878. @c snarfed from modules.c:399
  2879. @deffn {Scheme Procedure} module-import-interface module sym
  2880. @deffnx {C Function} scm_module_import_interface (module, sym)
  2881. Return the module or interface from which @var{sym} is imported in @var{module}. If @var{sym} is not imported (i.e., it is not defined in @var{module} or it is a module-local binding instead of an imported one), then @code{#f} is returned.
  2882. @end deffn
  2883. %get-pre-modules-obarray
  2884. @c snarfed from modules.c:616
  2885. @deffn {Scheme Procedure} %get-pre-modules-obarray
  2886. @deffnx {C Function} scm_get_pre_modules_obarray ()
  2887. 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.
  2888. @end deffn
  2889. exact?
  2890. @c snarfed from numbers.c:460
  2891. @deffn {Scheme Procedure} exact? x
  2892. @deffnx {C Function} scm_exact_p (x)
  2893. Return @code{#t} if @var{x} is an exact number, @code{#f}
  2894. otherwise.
  2895. @end deffn
  2896. odd?
  2897. @c snarfed from numbers.c:479
  2898. @deffn {Scheme Procedure} odd? n
  2899. @deffnx {C Function} scm_odd_p (n)
  2900. Return @code{#t} if @var{n} is an odd number, @code{#f}
  2901. otherwise.
  2902. @end deffn
  2903. even?
  2904. @c snarfed from numbers.c:514
  2905. @deffn {Scheme Procedure} even? n
  2906. @deffnx {C Function} scm_even_p (n)
  2907. Return @code{#t} if @var{n} is an even number, @code{#f}
  2908. otherwise.
  2909. @end deffn
  2910. inf?
  2911. @c snarfed from numbers.c:548
  2912. @deffn {Scheme Procedure} inf? x
  2913. @deffnx {C Function} scm_inf_p (x)
  2914. Return @code{#t} if @var{x} is either @samp{+inf.0}
  2915. or @samp{-inf.0}, @code{#f} otherwise.
  2916. @end deffn
  2917. nan?
  2918. @c snarfed from numbers.c:564
  2919. @deffn {Scheme Procedure} nan? n
  2920. @deffnx {C Function} scm_nan_p (n)
  2921. Return @code{#t} if @var{n} is a NaN, @code{#f}
  2922. otherwise.
  2923. @end deffn
  2924. inf
  2925. @c snarfed from numbers.c:634
  2926. @deffn {Scheme Procedure} inf
  2927. @deffnx {C Function} scm_inf ()
  2928. Return Inf.
  2929. @end deffn
  2930. nan
  2931. @c snarfed from numbers.c:649
  2932. @deffn {Scheme Procedure} nan
  2933. @deffnx {C Function} scm_nan ()
  2934. Return NaN.
  2935. @end deffn
  2936. abs
  2937. @c snarfed from numbers.c:665
  2938. @deffn {Scheme Procedure} abs x
  2939. @deffnx {C Function} scm_abs (x)
  2940. Return the absolute value of @var{x}.
  2941. @end deffn
  2942. logand
  2943. @c snarfed from numbers.c:1201
  2944. @deffn {Scheme Procedure} logand n1 n2
  2945. Return the bitwise AND of the integer arguments.
  2946. @lisp
  2947. (logand) @result{} -1
  2948. (logand 7) @result{} 7
  2949. (logand #b111 #b011 #b001) @result{} 1
  2950. @end lisp
  2951. @end deffn
  2952. logior
  2953. @c snarfed from numbers.c:1277
  2954. @deffn {Scheme Procedure} logior n1 n2
  2955. Return the bitwise OR of the integer arguments.
  2956. @lisp
  2957. (logior) @result{} 0
  2958. (logior 7) @result{} 7
  2959. (logior #b000 #b001 #b011) @result{} 3
  2960. @end lisp
  2961. @end deffn
  2962. logxor
  2963. @c snarfed from numbers.c:1353
  2964. @deffn {Scheme Procedure} logxor n1 n2
  2965. Return the bitwise XOR of the integer arguments. A bit is
  2966. set in the result if it is set in an odd number of arguments.
  2967. @lisp
  2968. (logxor) @result{} 0
  2969. (logxor 7) @result{} 7
  2970. (logxor #b000 #b001 #b011) @result{} 2
  2971. (logxor #b000 #b001 #b011 #b011) @result{} 1
  2972. @end lisp
  2973. @end deffn
  2974. logtest
  2975. @c snarfed from numbers.c:1428
  2976. @deffn {Scheme Procedure} logtest j k
  2977. @deffnx {C Function} scm_logtest (j, k)
  2978. Test whether @var{j} and @var{k} have any 1 bits in common.
  2979. This is equivalent to @code{(not (zero? (logand j k)))}, but
  2980. without actually calculating the @code{logand}, just testing
  2981. for non-zero.
  2982. @lisp
  2983. (logtest #b0100 #b1011) @result{} #f
  2984. (logtest #b0100 #b0111) @result{} #t
  2985. @end lisp
  2986. @end deffn
  2987. logbit?
  2988. @c snarfed from numbers.c:1501
  2989. @deffn {Scheme Procedure} logbit? index j
  2990. @deffnx {C Function} scm_logbit_p (index, j)
  2991. Test whether bit number @var{index} in @var{j} is set.
  2992. @var{index} starts from 0 for the least significant bit.
  2993. @lisp
  2994. (logbit? 0 #b1101) @result{} #t
  2995. (logbit? 1 #b1101) @result{} #f
  2996. (logbit? 2 #b1101) @result{} #t
  2997. (logbit? 3 #b1101) @result{} #t
  2998. (logbit? 4 #b1101) @result{} #f
  2999. @end lisp
  3000. @end deffn
  3001. lognot
  3002. @c snarfed from numbers.c:1535
  3003. @deffn {Scheme Procedure} lognot n
  3004. @deffnx {C Function} scm_lognot (n)
  3005. Return the integer which is the ones-complement of the integer
  3006. argument.
  3007. @lisp
  3008. (number->string (lognot #b10000000) 2)
  3009. @result{} "-10000001"
  3010. (number->string (lognot #b0) 2)
  3011. @result{} "-1"
  3012. @end lisp
  3013. @end deffn
  3014. modulo-expt
  3015. @c snarfed from numbers.c:1580
  3016. @deffn {Scheme Procedure} modulo-expt n k m
  3017. @deffnx {C Function} scm_modulo_expt (n, k, m)
  3018. Return @var{n} raised to the integer exponent
  3019. @var{k}, modulo @var{m}.
  3020. @lisp
  3021. (modulo-expt 2 3 5)
  3022. @result{} 3
  3023. @end lisp
  3024. @end deffn
  3025. integer-expt
  3026. @c snarfed from numbers.c:1689
  3027. @deffn {Scheme Procedure} integer-expt n k
  3028. @deffnx {C Function} scm_integer_expt (n, k)
  3029. Return @var{n} raised to the power @var{k}. @var{k} must be an
  3030. exact integer, @var{n} can be any number.
  3031. Negative @var{k} is supported, and results in @math{1/n^abs(k)}
  3032. in the usual way. @math{@var{n}^0} is 1, as usual, and that
  3033. includes @math{0^0} is 1.
  3034. @lisp
  3035. (integer-expt 2 5) @result{} 32
  3036. (integer-expt -3 3) @result{} -27
  3037. (integer-expt 5 -3) @result{} 1/125
  3038. (integer-expt 0 0) @result{} 1
  3039. @end lisp
  3040. @end deffn
  3041. ash
  3042. @c snarfed from numbers.c:1779
  3043. @deffn {Scheme Procedure} ash n cnt
  3044. @deffnx {C Function} scm_ash (n, cnt)
  3045. Return @var{n} shifted left by @var{cnt} bits, or shifted right
  3046. if @var{cnt} is negative. This is an ``arithmetic'' shift.
  3047. This is effectively a multiplication by 2^@var{cnt}, and when
  3048. @var{cnt} is negative it's a division, rounded towards negative
  3049. infinity. (Note that this is not the same rounding as
  3050. @code{quotient} does.)
  3051. With @var{n} viewed as an infinite precision twos complement,
  3052. @code{ash} means a left shift introducing zero bits, or a right
  3053. shift dropping bits.
  3054. @lisp
  3055. (number->string (ash #b1 3) 2) @result{} "1000"
  3056. (number->string (ash #b1010 -1) 2) @result{} "101"
  3057. ;; -23 is bits ...11101001, -6 is bits ...111010
  3058. (ash -23 -2) @result{} -6
  3059. @end lisp
  3060. @end deffn
  3061. bit-extract
  3062. @c snarfed from numbers.c:1870
  3063. @deffn {Scheme Procedure} bit-extract n start end
  3064. @deffnx {C Function} scm_bit_extract (n, start, end)
  3065. Return the integer composed of the @var{start} (inclusive)
  3066. through @var{end} (exclusive) bits of @var{n}. The
  3067. @var{start}th bit becomes the 0-th bit in the result.
  3068. @lisp
  3069. (number->string (bit-extract #b1101101010 0 4) 2)
  3070. @result{} "1010"
  3071. (number->string (bit-extract #b1101101010 4 9) 2)
  3072. @result{} "10110"
  3073. @end lisp
  3074. @end deffn
  3075. logcount
  3076. @c snarfed from numbers.c:1949
  3077. @deffn {Scheme Procedure} logcount n
  3078. @deffnx {C Function} scm_logcount (n)
  3079. Return the number of bits in integer @var{n}. If integer is
  3080. positive, the 1-bits in its binary representation are counted.
  3081. If negative, the 0-bits in its two's-complement binary
  3082. representation are counted. If 0, 0 is returned.
  3083. @lisp
  3084. (logcount #b10101010)
  3085. @result{} 4
  3086. (logcount 0)
  3087. @result{} 0
  3088. (logcount -2)
  3089. @result{} 1
  3090. @end lisp
  3091. @end deffn
  3092. integer-length
  3093. @c snarfed from numbers.c:1997
  3094. @deffn {Scheme Procedure} integer-length n
  3095. @deffnx {C Function} scm_integer_length (n)
  3096. Return the number of bits necessary to represent @var{n}.
  3097. @lisp
  3098. (integer-length #b10101010)
  3099. @result{} 8
  3100. (integer-length 0)
  3101. @result{} 0
  3102. (integer-length #b1111)
  3103. @result{} 4
  3104. @end lisp
  3105. @end deffn
  3106. number->string
  3107. @c snarfed from numbers.c:2337
  3108. @deffn {Scheme Procedure} number->string n [radix]
  3109. @deffnx {C Function} scm_number_to_string (n, radix)
  3110. Return a string holding the external representation of the
  3111. number @var{n} in the given @var{radix}. If @var{n} is
  3112. inexact, a radix of 10 will be used.
  3113. @end deffn
  3114. string->number
  3115. @c snarfed from numbers.c:3034
  3116. @deffn {Scheme Procedure} string->number string [radix]
  3117. @deffnx {C Function} scm_string_to_number (string, radix)
  3118. Return a number of the maximally precise representation
  3119. expressed by the given @var{string}. @var{radix} must be an
  3120. exact integer, either 2, 8, 10, or 16. If supplied, @var{radix}
  3121. is a default radix that may be overridden by an explicit radix
  3122. prefix in @var{string} (e.g. "#o177"). If @var{radix} is not
  3123. supplied, then the default radix is 10. If string is not a
  3124. syntactically valid notation for a number, then
  3125. @code{string->number} returns @code{#f}.
  3126. @end deffn
  3127. number?
  3128. @c snarfed from numbers.c:3097
  3129. @deffn {Scheme Procedure} number? x
  3130. @deffnx {C Function} scm_number_p (x)
  3131. Return @code{#t} if @var{x} is a number, @code{#f}
  3132. otherwise.
  3133. @end deffn
  3134. complex?
  3135. @c snarfed from numbers.c:3110
  3136. @deffn {Scheme Procedure} complex? x
  3137. @deffnx {C Function} scm_complex_p (x)
  3138. Return @code{#t} if @var{x} is a complex number, @code{#f}
  3139. otherwise. Note that the sets of real, rational and integer
  3140. values form subsets of the set of complex numbers, i. e. the
  3141. predicate will also be fulfilled if @var{x} is a real,
  3142. rational or integer number.
  3143. @end deffn
  3144. real?
  3145. @c snarfed from numbers.c:3123
  3146. @deffn {Scheme Procedure} real? x
  3147. @deffnx {C Function} scm_real_p (x)
  3148. Return @code{#t} if @var{x} is a real number, @code{#f}
  3149. otherwise. Note that the set of integer values forms a subset of
  3150. the set of real numbers, i. e. the predicate will also be
  3151. fulfilled if @var{x} is an integer number.
  3152. @end deffn
  3153. rational?
  3154. @c snarfed from numbers.c:3136
  3155. @deffn {Scheme Procedure} rational? x
  3156. @deffnx {C Function} scm_rational_p (x)
  3157. Return @code{#t} if @var{x} is a rational number, @code{#f}
  3158. otherwise. Note that the set of integer values forms a subset of
  3159. the set of rational numbers, i. e. the predicate will also be
  3160. fulfilled if @var{x} is an integer number.
  3161. @end deffn
  3162. integer?
  3163. @c snarfed from numbers.c:3159
  3164. @deffn {Scheme Procedure} integer? x
  3165. @deffnx {C Function} scm_integer_p (x)
  3166. Return @code{#t} if @var{x} is an integer number, @code{#f}
  3167. else.
  3168. @end deffn
  3169. inexact?
  3170. @c snarfed from numbers.c:3185
  3171. @deffn {Scheme Procedure} inexact? x
  3172. @deffnx {C Function} scm_inexact_p (x)
  3173. Return @code{#t} if @var{x} is an inexact number, @code{#f}
  3174. else.
  3175. @end deffn
  3176. truncate
  3177. @c snarfed from numbers.c:5060
  3178. @deffn {Scheme Procedure} truncate x
  3179. @deffnx {C Function} scm_truncate_number (x)
  3180. Round the number @var{x} towards zero.
  3181. @end deffn
  3182. round
  3183. @c snarfed from numbers.c:5076
  3184. @deffn {Scheme Procedure} round x
  3185. @deffnx {C Function} scm_round_number (x)
  3186. Round the number @var{x} towards the nearest integer. When it is exactly halfway between two integers, round towards the even one.
  3187. @end deffn
  3188. floor
  3189. @c snarfed from numbers.c:5102
  3190. @deffn {Scheme Procedure} floor x
  3191. @deffnx {C Function} scm_floor (x)
  3192. Round the number @var{x} towards minus infinity.
  3193. @end deffn
  3194. ceiling
  3195. @c snarfed from numbers.c:5133
  3196. @deffn {Scheme Procedure} ceiling x
  3197. @deffnx {C Function} scm_ceiling (x)
  3198. Round the number @var{x} towards infinity.
  3199. @end deffn
  3200. $expt
  3201. @c snarfed from numbers.c:5242
  3202. @deffn {Scheme Procedure} $expt x y
  3203. @deffnx {C Function} scm_sys_expt (x, y)
  3204. Return @var{x} raised to the power of @var{y}. This
  3205. procedure does not accept complex arguments.
  3206. @end deffn
  3207. $atan2
  3208. @c snarfed from numbers.c:5258
  3209. @deffn {Scheme Procedure} $atan2 x y
  3210. @deffnx {C Function} scm_sys_atan2 (x, y)
  3211. Return the arc tangent of the two arguments @var{x} and
  3212. @var{y}. This is similar to calculating the arc tangent of
  3213. @var{x} / @var{y}, except that the signs of both arguments
  3214. are used to determine the quadrant of the result. This
  3215. procedure does not accept complex arguments.
  3216. @end deffn
  3217. make-rectangular
  3218. @c snarfed from numbers.c:5286
  3219. @deffn {Scheme Procedure} make-rectangular real_part imaginary_part
  3220. @deffnx {C Function} scm_make_rectangular (real_part, imaginary_part)
  3221. Return a complex number constructed of the given @var{real-part} and @var{imaginary-part} parts.
  3222. @end deffn
  3223. make-polar
  3224. @c snarfed from numbers.c:5310
  3225. @deffn {Scheme Procedure} make-polar x y
  3226. @deffnx {C Function} scm_make_polar (x, y)
  3227. Return the complex number @var{x} * e^(i * @var{y}).
  3228. @end deffn
  3229. inexact->exact
  3230. @c snarfed from numbers.c:5513
  3231. @deffn {Scheme Procedure} inexact->exact z
  3232. @deffnx {C Function} scm_inexact_to_exact (z)
  3233. Return an exact number that is numerically closest to @var{z}.
  3234. @end deffn
  3235. rationalize
  3236. @c snarfed from numbers.c:5550
  3237. @deffn {Scheme Procedure} rationalize x err
  3238. @deffnx {C Function} scm_rationalize (x, err)
  3239. Return an exact number that is within @var{err} of @var{x}.
  3240. @end deffn
  3241. entity?
  3242. @c snarfed from objects.c:192
  3243. @deffn {Scheme Procedure} entity? obj
  3244. @deffnx {C Function} scm_entity_p (obj)
  3245. Return @code{#t} if @var{obj} is an entity.
  3246. @end deffn
  3247. operator?
  3248. @c snarfed from objects.c:201
  3249. @deffn {Scheme Procedure} operator? obj
  3250. @deffnx {C Function} scm_operator_p (obj)
  3251. Return @code{#t} if @var{obj} is an operator.
  3252. @end deffn
  3253. valid-object-procedure?
  3254. @c snarfed from objects.c:217
  3255. @deffn {Scheme Procedure} valid-object-procedure? proc
  3256. @deffnx {C Function} scm_valid_object_procedure_p (proc)
  3257. 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}.
  3258. @end deffn
  3259. set-object-procedure!
  3260. @c snarfed from objects.c:239
  3261. @deffn {Scheme Procedure} set-object-procedure! obj proc
  3262. @deffnx {C Function} scm_set_object_procedure_x (obj, proc)
  3263. Set the object procedure of @var{obj} to @var{proc}.
  3264. @var{obj} must be either an entity or an operator.
  3265. @end deffn
  3266. make-class-object
  3267. @c snarfed from objects.c:299
  3268. @deffn {Scheme Procedure} make-class-object metaclass layout
  3269. @deffnx {C Function} scm_make_class_object (metaclass, layout)
  3270. Create a new class object of class @var{metaclass}, with the
  3271. slot layout specified by @var{layout}.
  3272. @end deffn
  3273. make-subclass-object
  3274. @c snarfed from objects.c:314
  3275. @deffn {Scheme Procedure} make-subclass-object class layout
  3276. @deffnx {C Function} scm_make_subclass_object (class, layout)
  3277. Create a subclass object of @var{class}, with the slot layout
  3278. specified by @var{layout}.
  3279. @end deffn
  3280. object-properties
  3281. @c snarfed from objprop.c:36
  3282. @deffn {Scheme Procedure} object-properties obj
  3283. @deffnx {C Function} scm_object_properties (obj)
  3284. Return @var{obj}'s property list.
  3285. @end deffn
  3286. set-object-properties!
  3287. @c snarfed from objprop.c:46
  3288. @deffn {Scheme Procedure} set-object-properties! obj alist
  3289. @deffnx {C Function} scm_set_object_properties_x (obj, alist)
  3290. Set @var{obj}'s property list to @var{alist}.
  3291. @end deffn
  3292. object-property
  3293. @c snarfed from objprop.c:57
  3294. @deffn {Scheme Procedure} object-property obj key
  3295. @deffnx {C Function} scm_object_property (obj, key)
  3296. Return the property of @var{obj} with name @var{key}.
  3297. @end deffn
  3298. set-object-property!
  3299. @c snarfed from objprop.c:69
  3300. @deffn {Scheme Procedure} set-object-property! obj key value
  3301. @deffnx {C Function} scm_set_object_property_x (obj, key, value)
  3302. In @var{obj}'s property list, set the property named @var{key}
  3303. to @var{value}.
  3304. @end deffn
  3305. cons
  3306. @c snarfed from pairs.c:56
  3307. @deffn {Scheme Procedure} cons x y
  3308. @deffnx {C Function} scm_cons (x, y)
  3309. Return a newly allocated pair whose car is @var{x} and whose
  3310. cdr is @var{y}. The pair is guaranteed to be different (in the
  3311. sense of @code{eq?}) from every previously existing object.
  3312. @end deffn
  3313. pair?
  3314. @c snarfed from pairs.c:74
  3315. @deffn {Scheme Procedure} pair? x
  3316. @deffnx {C Function} scm_pair_p (x)
  3317. Return @code{#t} if @var{x} is a pair; otherwise return
  3318. @code{#f}.
  3319. @end deffn
  3320. set-car!
  3321. @c snarfed from pairs.c:120
  3322. @deffn {Scheme Procedure} set-car! pair value
  3323. @deffnx {C Function} scm_set_car_x (pair, value)
  3324. Stores @var{value} in the car field of @var{pair}. The value returned
  3325. by @code{set-car!} is unspecified.
  3326. @end deffn
  3327. set-cdr!
  3328. @c snarfed from pairs.c:133
  3329. @deffn {Scheme Procedure} set-cdr! pair value
  3330. @deffnx {C Function} scm_set_cdr_x (pair, value)
  3331. Stores @var{value} in the cdr field of @var{pair}. The value returned
  3332. by @code{set-cdr!} is unspecified.
  3333. @end deffn
  3334. char-ready?
  3335. @c snarfed from ports.c:245
  3336. @deffn {Scheme Procedure} char-ready? [port]
  3337. @deffnx {C Function} scm_char_ready_p (port)
  3338. Return @code{#t} if a character is ready on input @var{port}
  3339. and return @code{#f} otherwise. If @code{char-ready?} returns
  3340. @code{#t} then the next @code{read-char} operation on
  3341. @var{port} is guaranteed not to hang. If @var{port} is a file
  3342. port at end of file then @code{char-ready?} returns @code{#t}.
  3343. @code{char-ready?} exists to make it possible for a
  3344. program to accept characters from interactive ports without
  3345. getting stuck waiting for input. Any input editors associated
  3346. with such ports must make sure that characters whose existence
  3347. has been asserted by @code{char-ready?} cannot be rubbed out.
  3348. If @code{char-ready?} were to return @code{#f} at end of file,
  3349. a port at end of file would be indistinguishable from an
  3350. interactive port that has no ready characters.
  3351. @end deffn
  3352. drain-input
  3353. @c snarfed from ports.c:322
  3354. @deffn {Scheme Procedure} drain-input port
  3355. @deffnx {C Function} scm_drain_input (port)
  3356. This procedure clears a port's input buffers, similar
  3357. to the way that force-output clears the output buffer. The
  3358. contents of the buffers are returned as a single string, e.g.,
  3359. @lisp
  3360. (define p (open-input-file ...))
  3361. (drain-input p) => empty string, nothing buffered yet.
  3362. (unread-char (read-char p) p)
  3363. (drain-input p) => initial chars from p, up to the buffer size.
  3364. @end lisp
  3365. Draining the buffers may be useful for cleanly finishing
  3366. buffered I/O so that the file descriptor can be used directly
  3367. for further input.
  3368. @end deffn
  3369. current-input-port
  3370. @c snarfed from ports.c:355
  3371. @deffn {Scheme Procedure} current-input-port
  3372. @deffnx {C Function} scm_current_input_port ()
  3373. Return the current input port. This is the default port used
  3374. by many input procedures. Initially, @code{current-input-port}
  3375. returns the @dfn{standard input} in Unix and C terminology.
  3376. @end deffn
  3377. current-output-port
  3378. @c snarfed from ports.c:367
  3379. @deffn {Scheme Procedure} current-output-port
  3380. @deffnx {C Function} scm_current_output_port ()
  3381. Return the current output port. This is the default port used
  3382. by many output procedures. Initially,
  3383. @code{current-output-port} returns the @dfn{standard output} in
  3384. Unix and C terminology.
  3385. @end deffn
  3386. current-error-port
  3387. @c snarfed from ports.c:377
  3388. @deffn {Scheme Procedure} current-error-port
  3389. @deffnx {C Function} scm_current_error_port ()
  3390. Return the port to which errors and warnings should be sent (the
  3391. @dfn{standard error} in Unix and C terminology).
  3392. @end deffn
  3393. current-load-port
  3394. @c snarfed from ports.c:387
  3395. @deffn {Scheme Procedure} current-load-port
  3396. @deffnx {C Function} scm_current_load_port ()
  3397. Return the current-load-port.
  3398. The load port is used internally by @code{primitive-load}.
  3399. @end deffn
  3400. set-current-input-port
  3401. @c snarfed from ports.c:400
  3402. @deffn {Scheme Procedure} set-current-input-port port
  3403. @deffnx {Scheme Procedure} set-current-output-port port
  3404. @deffnx {Scheme Procedure} set-current-error-port port
  3405. @deffnx {C Function} scm_set_current_input_port (port)
  3406. Change the ports returned by @code{current-input-port},
  3407. @code{current-output-port} and @code{current-error-port}, respectively,
  3408. so that they use the supplied @var{port} for input or output.
  3409. @end deffn
  3410. set-current-output-port
  3411. @c snarfed from ports.c:413
  3412. @deffn {Scheme Procedure} set-current-output-port port
  3413. @deffnx {C Function} scm_set_current_output_port (port)
  3414. Set the current default output port to @var{port}.
  3415. @end deffn
  3416. set-current-error-port
  3417. @c snarfed from ports.c:427
  3418. @deffn {Scheme Procedure} set-current-error-port port
  3419. @deffnx {C Function} scm_set_current_error_port (port)
  3420. Set the current default error port to @var{port}.
  3421. @end deffn
  3422. port-revealed
  3423. @c snarfed from ports.c:625
  3424. @deffn {Scheme Procedure} port-revealed port
  3425. @deffnx {C Function} scm_port_revealed (port)
  3426. Return the revealed count for @var{port}.
  3427. @end deffn
  3428. set-port-revealed!
  3429. @c snarfed from ports.c:638
  3430. @deffn {Scheme Procedure} set-port-revealed! port rcount
  3431. @deffnx {C Function} scm_set_port_revealed_x (port, rcount)
  3432. Sets the revealed count for a port to a given value.
  3433. The return value is unspecified.
  3434. @end deffn
  3435. port-mode
  3436. @c snarfed from ports.c:699
  3437. @deffn {Scheme Procedure} port-mode port
  3438. @deffnx {C Function} scm_port_mode (port)
  3439. Return the port modes associated with the open port @var{port}.
  3440. These will not necessarily be identical to the modes used when
  3441. the port was opened, since modes such as "append" which are
  3442. used only during port creation are not retained.
  3443. @end deffn
  3444. close-port
  3445. @c snarfed from ports.c:736
  3446. @deffn {Scheme Procedure} close-port port
  3447. @deffnx {C Function} scm_close_port (port)
  3448. Close the specified port object. Return @code{#t} if it
  3449. successfully closes a port or @code{#f} if it was already
  3450. closed. An exception may be raised if an error occurs, for
  3451. example when flushing buffered output. See also @ref{Ports and
  3452. File Descriptors, close}, for a procedure which can close file
  3453. descriptors.
  3454. @end deffn
  3455. close-input-port
  3456. @c snarfed from ports.c:766
  3457. @deffn {Scheme Procedure} close-input-port port
  3458. @deffnx {C Function} scm_close_input_port (port)
  3459. Close the specified input port object. The routine has no effect if
  3460. the file has already been closed. An exception may be raised if an
  3461. error occurs. The value returned is unspecified.
  3462. See also @ref{Ports and File Descriptors, close}, for a procedure
  3463. which can close file descriptors.
  3464. @end deffn
  3465. close-output-port
  3466. @c snarfed from ports.c:781
  3467. @deffn {Scheme Procedure} close-output-port port
  3468. @deffnx {C Function} scm_close_output_port (port)
  3469. Close the specified output port object. The routine has no effect if
  3470. the file has already been closed. An exception may be raised if an
  3471. error occurs. The value returned is unspecified.
  3472. See also @ref{Ports and File Descriptors, close}, for a procedure
  3473. which can close file descriptors.
  3474. @end deffn
  3475. port-for-each
  3476. @c snarfed from ports.c:827
  3477. @deffn {Scheme Procedure} port-for-each proc
  3478. @deffnx {C Function} scm_port_for_each (proc)
  3479. Apply @var{proc} to each port in the Guile port table
  3480. in turn. The return value is unspecified. More specifically,
  3481. @var{proc} is applied exactly once to every port that exists
  3482. in the system at the time @var{port-for-each} is invoked.
  3483. Changes to the port table while @var{port-for-each} is running
  3484. have no effect as far as @var{port-for-each} is concerned.
  3485. @end deffn
  3486. input-port?
  3487. @c snarfed from ports.c:845
  3488. @deffn {Scheme Procedure} input-port? x
  3489. @deffnx {C Function} scm_input_port_p (x)
  3490. Return @code{#t} if @var{x} is an input port, otherwise return
  3491. @code{#f}. Any object satisfying this predicate also satisfies
  3492. @code{port?}.
  3493. @end deffn
  3494. output-port?
  3495. @c snarfed from ports.c:856
  3496. @deffn {Scheme Procedure} output-port? x
  3497. @deffnx {C Function} scm_output_port_p (x)
  3498. Return @code{#t} if @var{x} is an output port, otherwise return
  3499. @code{#f}. Any object satisfying this predicate also satisfies
  3500. @code{port?}.
  3501. @end deffn
  3502. port?
  3503. @c snarfed from ports.c:868
  3504. @deffn {Scheme Procedure} port? x
  3505. @deffnx {C Function} scm_port_p (x)
  3506. Return a boolean indicating whether @var{x} is a port.
  3507. Equivalent to @code{(or (input-port? @var{x}) (output-port?
  3508. @var{x}))}.
  3509. @end deffn
  3510. port-closed?
  3511. @c snarfed from ports.c:878
  3512. @deffn {Scheme Procedure} port-closed? port
  3513. @deffnx {C Function} scm_port_closed_p (port)
  3514. Return @code{#t} if @var{port} is closed or @code{#f} if it is
  3515. open.
  3516. @end deffn
  3517. eof-object?
  3518. @c snarfed from ports.c:889
  3519. @deffn {Scheme Procedure} eof-object? x
  3520. @deffnx {C Function} scm_eof_object_p (x)
  3521. Return @code{#t} if @var{x} is an end-of-file object; otherwise
  3522. return @code{#f}.
  3523. @end deffn
  3524. force-output
  3525. @c snarfed from ports.c:903
  3526. @deffn {Scheme Procedure} force-output [port]
  3527. @deffnx {C Function} scm_force_output (port)
  3528. Flush the specified output port, or the current output port if @var{port}
  3529. is omitted. The current output buffer contents are passed to the
  3530. underlying port implementation (e.g., in the case of fports, the
  3531. data will be written to the file and the output buffer will be cleared.)
  3532. It has no effect on an unbuffered port.
  3533. The return value is unspecified.
  3534. @end deffn
  3535. flush-all-ports
  3536. @c snarfed from ports.c:921
  3537. @deffn {Scheme Procedure} flush-all-ports
  3538. @deffnx {C Function} scm_flush_all_ports ()
  3539. Equivalent to calling @code{force-output} on
  3540. all open output ports. The return value is unspecified.
  3541. @end deffn
  3542. read-char
  3543. @c snarfed from ports.c:941
  3544. @deffn {Scheme Procedure} read-char [port]
  3545. @deffnx {C Function} scm_read_char (port)
  3546. Return the next character available from @var{port}, updating
  3547. @var{port} to point to the following character. If no more
  3548. characters are available, the end-of-file object is returned.
  3549. @end deffn
  3550. peek-char
  3551. @c snarfed from ports.c:1283
  3552. @deffn {Scheme Procedure} peek-char [port]
  3553. @deffnx {C Function} scm_peek_char (port)
  3554. Return the next character available from @var{port},
  3555. @emph{without} updating @var{port} to point to the following
  3556. character. If no more characters are available, the
  3557. end-of-file object is returned.
  3558. The value returned by
  3559. a call to @code{peek-char} is the same as the value that would
  3560. have been returned by a call to @code{read-char} on the same
  3561. port. The only difference is that the very next call to
  3562. @code{read-char} or @code{peek-char} on that @var{port} will
  3563. return the value returned by the preceding call to
  3564. @code{peek-char}. In particular, a call to @code{peek-char} on
  3565. an interactive port will hang waiting for input whenever a call
  3566. to @code{read-char} would have hung.
  3567. @end deffn
  3568. unread-char
  3569. @c snarfed from ports.c:1306
  3570. @deffn {Scheme Procedure} unread-char cobj [port]
  3571. @deffnx {C Function} scm_unread_char (cobj, port)
  3572. Place @var{char} in @var{port} so that it will be read by the
  3573. next read operation. If called multiple times, the unread characters
  3574. will be read again in last-in first-out order. If @var{port} is
  3575. not supplied, the current input port is used.
  3576. @end deffn
  3577. unread-string
  3578. @c snarfed from ports.c:1329
  3579. @deffn {Scheme Procedure} unread-string str port
  3580. @deffnx {C Function} scm_unread_string (str, port)
  3581. Place the string @var{str} in @var{port} so that its characters will be
  3582. read in subsequent read operations. If called multiple times, the
  3583. unread characters will be read again in last-in first-out order. If
  3584. @var{port} is not supplied, the current-input-port is used.
  3585. @end deffn
  3586. seek
  3587. @c snarfed from ports.c:1368
  3588. @deffn {Scheme Procedure} seek fd_port offset whence
  3589. @deffnx {C Function} scm_seek (fd_port, offset, whence)
  3590. Sets the current position of @var{fd/port} to the integer
  3591. @var{offset}, which is interpreted according to the value of
  3592. @var{whence}.
  3593. One of the following variables should be supplied for
  3594. @var{whence}:
  3595. @defvar SEEK_SET
  3596. Seek from the beginning of the file.
  3597. @end defvar
  3598. @defvar SEEK_CUR
  3599. Seek from the current position.
  3600. @end defvar
  3601. @defvar SEEK_END
  3602. Seek from the end of the file.
  3603. @end defvar
  3604. If @var{fd/port} is a file descriptor, the underlying system
  3605. call is @code{lseek}. @var{port} may be a string port.
  3606. The value returned is the new position in the file. This means
  3607. that the current position of a port can be obtained using:
  3608. @lisp
  3609. (seek port 0 SEEK_CUR)
  3610. @end lisp
  3611. @end deffn
  3612. truncate-file
  3613. @c snarfed from ports.c:1426
  3614. @deffn {Scheme Procedure} truncate-file object [length]
  3615. @deffnx {C Function} scm_truncate_file (object, length)
  3616. Truncates the object referred to by @var{object} to at most
  3617. @var{length} bytes. @var{object} can be a string containing a
  3618. file name or an integer file descriptor or a port.
  3619. @var{length} may be omitted if @var{object} is not a file name,
  3620. in which case the truncation occurs at the current port
  3621. position. The return value is unspecified.
  3622. @end deffn
  3623. port-line
  3624. @c snarfed from ports.c:1486
  3625. @deffn {Scheme Procedure} port-line port
  3626. @deffnx {C Function} scm_port_line (port)
  3627. Return the current line number for @var{port}.
  3628. The first line of a file is 0. But you might want to add 1
  3629. when printing line numbers, since starting from 1 is
  3630. traditional in error messages, and likely to be more natural to
  3631. non-programmers.
  3632. @end deffn
  3633. set-port-line!
  3634. @c snarfed from ports.c:1498
  3635. @deffn {Scheme Procedure} set-port-line! port line
  3636. @deffnx {C Function} scm_set_port_line_x (port, line)
  3637. Set the current line number for @var{port} to @var{line}. The
  3638. first line of a file is 0.
  3639. @end deffn
  3640. port-column
  3641. @c snarfed from ports.c:1517
  3642. @deffn {Scheme Procedure} port-column port
  3643. @deffnx {C Function} scm_port_column (port)
  3644. Return the current column number of @var{port}.
  3645. If the number is
  3646. unknown, the result is #f. Otherwise, the result is a 0-origin integer
  3647. - i.e. the first character of the first line is line 0, column 0.
  3648. (However, when you display a file position, for example in an error
  3649. message, we recommend you add 1 to get 1-origin integers. This is
  3650. because lines and column numbers traditionally start with 1, and that is
  3651. what non-programmers will find most natural.)
  3652. @end deffn
  3653. set-port-column!
  3654. @c snarfed from ports.c:1529
  3655. @deffn {Scheme Procedure} set-port-column! port column
  3656. @deffnx {C Function} scm_set_port_column_x (port, column)
  3657. Set the current column of @var{port}. Before reading the first
  3658. character on a line the column should be 0.
  3659. @end deffn
  3660. port-filename
  3661. @c snarfed from ports.c:1543
  3662. @deffn {Scheme Procedure} port-filename port
  3663. @deffnx {C Function} scm_port_filename (port)
  3664. Return the filename associated with @var{port}. This function returns
  3665. the strings "standard input", "standard output" and "standard error"
  3666. when called on the current input, output and error ports respectively.
  3667. @end deffn
  3668. set-port-filename!
  3669. @c snarfed from ports.c:1557
  3670. @deffn {Scheme Procedure} set-port-filename! port filename
  3671. @deffnx {C Function} scm_set_port_filename_x (port, filename)
  3672. Change the filename associated with @var{port}, using the current input
  3673. port if none is specified. Note that this does not change the port's
  3674. source of data, but only the value that is returned by
  3675. @code{port-filename} and reported in diagnostic output.
  3676. @end deffn
  3677. %make-void-port
  3678. @c snarfed from ports.c:1651
  3679. @deffn {Scheme Procedure} %make-void-port mode
  3680. @deffnx {C Function} scm_sys_make_void_port (mode)
  3681. Create and return a new void port. A void port acts like
  3682. @file{/dev/null}. The @var{mode} argument
  3683. specifies the input/output modes for this port: see the
  3684. documentation for @code{open-file} in @ref{File Ports}.
  3685. @end deffn
  3686. print-options-interface
  3687. @c snarfed from print.c:87
  3688. @deffn {Scheme Procedure} print-options-interface [setting]
  3689. @deffnx {C Function} scm_print_options (setting)
  3690. Option interface for the print options. Instead of using
  3691. this procedure directly, use the procedures
  3692. @code{print-enable}, @code{print-disable}, @code{print-set!}
  3693. and @code{print-options}.
  3694. @end deffn
  3695. simple-format
  3696. @c snarfed from print.c:929
  3697. @deffn {Scheme Procedure} simple-format destination message . args
  3698. @deffnx {C Function} scm_simple_format (destination, message, args)
  3699. Write @var{message} to @var{destination}, defaulting to
  3700. the current output port.
  3701. @var{message} can contain @code{~A} (was @code{%s}) and
  3702. @code{~S} (was @code{%S}) escapes. When printed,
  3703. the escapes are replaced with corresponding members of
  3704. @var{ARGS}:
  3705. @code{~A} formats using @code{display} and @code{~S} formats
  3706. using @code{write}.
  3707. If @var{destination} is @code{#t}, then use the current output
  3708. port, if @var{destination} is @code{#f}, then return a string
  3709. containing the formatted text. Does not add a trailing newline.
  3710. @end deffn
  3711. newline
  3712. @c snarfed from print.c:1019
  3713. @deffn {Scheme Procedure} newline [port]
  3714. @deffnx {C Function} scm_newline (port)
  3715. Send a newline to @var{port}.
  3716. If @var{port} is omitted, send to the current output port.
  3717. @end deffn
  3718. write-char
  3719. @c snarfed from print.c:1034
  3720. @deffn {Scheme Procedure} write-char chr [port]
  3721. @deffnx {C Function} scm_write_char (chr, port)
  3722. Send character @var{chr} to @var{port}.
  3723. @end deffn
  3724. port-with-print-state
  3725. @c snarfed from print.c:1088
  3726. @deffn {Scheme Procedure} port-with-print-state port [pstate]
  3727. @deffnx {C Function} scm_port_with_print_state (port, pstate)
  3728. Create a new port which behaves like @var{port}, but with an
  3729. included print state @var{pstate}. @var{pstate} is optional.
  3730. If @var{pstate} isn't supplied and @var{port} already has
  3731. a print state, the old print state is reused.
  3732. @end deffn
  3733. get-print-state
  3734. @c snarfed from print.c:1101
  3735. @deffn {Scheme Procedure} get-print-state port
  3736. @deffnx {C Function} scm_get_print_state (port)
  3737. Return the print state of the port @var{port}. If @var{port}
  3738. has no associated print state, @code{#f} is returned.
  3739. @end deffn
  3740. procedure-properties
  3741. @c snarfed from procprop.c:160
  3742. @deffn {Scheme Procedure} procedure-properties proc
  3743. @deffnx {C Function} scm_procedure_properties (proc)
  3744. Return @var{obj}'s property list.
  3745. @end deffn
  3746. set-procedure-properties!
  3747. @c snarfed from procprop.c:173
  3748. @deffn {Scheme Procedure} set-procedure-properties! proc new_val
  3749. @deffnx {C Function} scm_set_procedure_properties_x (proc, new_val)
  3750. Set @var{obj}'s property list to @var{alist}.
  3751. @end deffn
  3752. procedure-property
  3753. @c snarfed from procprop.c:186
  3754. @deffn {Scheme Procedure} procedure-property p k
  3755. @deffnx {C Function} scm_procedure_property (p, k)
  3756. Return the property of @var{obj} with name @var{key}.
  3757. @end deffn
  3758. set-procedure-property!
  3759. @c snarfed from procprop.c:209
  3760. @deffn {Scheme Procedure} set-procedure-property! p k v
  3761. @deffnx {C Function} scm_set_procedure_property_x (p, k, v)
  3762. In @var{obj}'s property list, set the property named @var{key} to
  3763. @var{value}.
  3764. @end deffn
  3765. procedure?
  3766. @c snarfed from procs.c:162
  3767. @deffn {Scheme Procedure} procedure? obj
  3768. @deffnx {C Function} scm_procedure_p (obj)
  3769. Return @code{#t} if @var{obj} is a procedure.
  3770. @end deffn
  3771. closure?
  3772. @c snarfed from procs.c:189
  3773. @deffn {Scheme Procedure} closure? obj
  3774. @deffnx {C Function} scm_closure_p (obj)
  3775. Return @code{#t} if @var{obj} is a closure.
  3776. @end deffn
  3777. thunk?
  3778. @c snarfed from procs.c:198
  3779. @deffn {Scheme Procedure} thunk? obj
  3780. @deffnx {C Function} scm_thunk_p (obj)
  3781. Return @code{#t} if @var{obj} is a thunk.
  3782. @end deffn
  3783. procedure-documentation
  3784. @c snarfed from procs.c:248
  3785. @deffn {Scheme Procedure} procedure-documentation proc
  3786. @deffnx {C Function} scm_procedure_documentation (proc)
  3787. Return the documentation string associated with @code{proc}. By
  3788. convention, if a procedure contains more than one expression and the
  3789. first expression is a string constant, that string is assumed to contain
  3790. documentation for that procedure.
  3791. @end deffn
  3792. procedure-with-setter?
  3793. @c snarfed from procs.c:284
  3794. @deffn {Scheme Procedure} procedure-with-setter? obj
  3795. @deffnx {C Function} scm_procedure_with_setter_p (obj)
  3796. Return @code{#t} if @var{obj} is a procedure with an
  3797. associated setter procedure.
  3798. @end deffn
  3799. make-procedure-with-setter
  3800. @c snarfed from procs.c:294
  3801. @deffn {Scheme Procedure} make-procedure-with-setter procedure setter
  3802. @deffnx {C Function} scm_make_procedure_with_setter (procedure, setter)
  3803. Create a new procedure which behaves like @var{procedure}, but
  3804. with the associated setter @var{setter}.
  3805. @end deffn
  3806. procedure
  3807. @c snarfed from procs.c:308
  3808. @deffn {Scheme Procedure} procedure proc
  3809. @deffnx {C Function} scm_procedure (proc)
  3810. Return the procedure of @var{proc}, which must be an
  3811. applicable struct.
  3812. @end deffn
  3813. primitive-make-property
  3814. @c snarfed from properties.c:40
  3815. @deffn {Scheme Procedure} primitive-make-property not_found_proc
  3816. @deffnx {C Function} scm_primitive_make_property (not_found_proc)
  3817. Create a @dfn{property token} that can be used with
  3818. @code{primitive-property-ref} and @code{primitive-property-set!}.
  3819. See @code{primitive-property-ref} for the significance of
  3820. @var{not_found_proc}.
  3821. @end deffn
  3822. primitive-property-ref
  3823. @c snarfed from properties.c:59
  3824. @deffn {Scheme Procedure} primitive-property-ref prop obj
  3825. @deffnx {C Function} scm_primitive_property_ref (prop, obj)
  3826. Return the property @var{prop} of @var{obj}.
  3827. When no value has yet been associated with @var{prop} and
  3828. @var{obj}, the @var{not-found-proc} from @var{prop} is used. A
  3829. call @code{(@var{not-found-proc} @var{prop} @var{obj})} is made
  3830. and the result set as the property value. If
  3831. @var{not-found-proc} is @code{#f} then @code{#f} is the
  3832. property value.
  3833. @end deffn
  3834. primitive-property-set!
  3835. @c snarfed from properties.c:90
  3836. @deffn {Scheme Procedure} primitive-property-set! prop obj val
  3837. @deffnx {C Function} scm_primitive_property_set_x (prop, obj, val)
  3838. Set the property @var{prop} of @var{obj} to @var{val}.
  3839. @end deffn
  3840. primitive-property-del!
  3841. @c snarfed from properties.c:111
  3842. @deffn {Scheme Procedure} primitive-property-del! prop obj
  3843. @deffnx {C Function} scm_primitive_property_del_x (prop, obj)
  3844. Remove any value associated with @var{prop} and @var{obj}.
  3845. @end deffn
  3846. random
  3847. @c snarfed from random.c:347
  3848. @deffn {Scheme Procedure} random n [state]
  3849. @deffnx {C Function} scm_random (n, state)
  3850. Return a number in [0, N).
  3851. Accepts a positive integer or real n and returns a
  3852. number of the same type between zero (inclusive) and
  3853. N (exclusive). The values returned have a uniform
  3854. distribution.
  3855. The optional argument @var{state} must be of the type produced
  3856. by @code{seed->random-state}. It defaults to the value of the
  3857. variable @var{*random-state*}. This object is used to maintain
  3858. the state of the pseudo-random-number generator and is altered
  3859. as a side effect of the random operation.
  3860. @end deffn
  3861. copy-random-state
  3862. @c snarfed from random.c:372
  3863. @deffn {Scheme Procedure} copy-random-state [state]
  3864. @deffnx {C Function} scm_copy_random_state (state)
  3865. Return a copy of the random state @var{state}.
  3866. @end deffn
  3867. seed->random-state
  3868. @c snarfed from random.c:384
  3869. @deffn {Scheme Procedure} seed->random-state seed
  3870. @deffnx {C Function} scm_seed_to_random_state (seed)
  3871. Return a new random state using @var{seed}.
  3872. @end deffn
  3873. random:uniform
  3874. @c snarfed from random.c:402
  3875. @deffn {Scheme Procedure} random:uniform [state]
  3876. @deffnx {C Function} scm_random_uniform (state)
  3877. Return a uniformly distributed inexact real random number in
  3878. [0,1).
  3879. @end deffn
  3880. random:normal
  3881. @c snarfed from random.c:417
  3882. @deffn {Scheme Procedure} random:normal [state]
  3883. @deffnx {C Function} scm_random_normal (state)
  3884. Return an inexact real in a normal distribution. The
  3885. distribution used has mean 0 and standard deviation 1. For a
  3886. normal distribution with mean m and standard deviation d use
  3887. @code{(+ m (* d (random:normal)))}.
  3888. @end deffn
  3889. random:solid-sphere!
  3890. @c snarfed from random.c:500
  3891. @deffn {Scheme Procedure} random:solid-sphere! v [state]
  3892. @deffnx {C Function} scm_random_solid_sphere_x (v, state)
  3893. Fills @var{vect} with inexact real random numbers the sum of
  3894. whose squares is less than 1.0. Thinking of @var{vect} as
  3895. coordinates in space of dimension @var{n} @math{=}
  3896. @code{(vector-length @var{vect})}, the coordinates are
  3897. uniformly distributed within the unit @var{n}-sphere.
  3898. @end deffn
  3899. random:hollow-sphere!
  3900. @c snarfed from random.c:522
  3901. @deffn {Scheme Procedure} random:hollow-sphere! v [state]
  3902. @deffnx {C Function} scm_random_hollow_sphere_x (v, state)
  3903. Fills vect with inexact real random numbers
  3904. the sum of whose squares is equal to 1.0.
  3905. Thinking of vect as coordinates in space of
  3906. dimension n = (vector-length vect), the coordinates
  3907. are uniformly distributed over the surface of the
  3908. unit n-sphere.
  3909. @end deffn
  3910. random:normal-vector!
  3911. @c snarfed from random.c:539
  3912. @deffn {Scheme Procedure} random:normal-vector! v [state]
  3913. @deffnx {C Function} scm_random_normal_vector_x (v, state)
  3914. Fills vect with inexact real random numbers that are
  3915. independent and standard normally distributed
  3916. (i.e., with mean 0 and variance 1).
  3917. @end deffn
  3918. random:exp
  3919. @c snarfed from random.c:577
  3920. @deffn {Scheme Procedure} random:exp [state]
  3921. @deffnx {C Function} scm_random_exp (state)
  3922. Return an inexact real in an exponential distribution with mean
  3923. 1. For an exponential distribution with mean u use (* u
  3924. (random:exp)).
  3925. @end deffn
  3926. %read-delimited!
  3927. @c snarfed from rdelim.c:55
  3928. @deffn {Scheme Procedure} %read-delimited! delims str gobble [port [start [end]]]
  3929. @deffnx {C Function} scm_read_delimited_x (delims, str, gobble, port, start, end)
  3930. Read characters from @var{port} into @var{str} until one of the
  3931. characters in the @var{delims} string is encountered. If
  3932. @var{gobble} is true, discard the delimiter character;
  3933. otherwise, leave it in the input stream for the next read. If
  3934. @var{port} is not specified, use the value of
  3935. @code{(current-input-port)}. If @var{start} or @var{end} are
  3936. specified, store data only into the substring of @var{str}
  3937. bounded by @var{start} and @var{end} (which default to the
  3938. beginning and end of the string, respectively).
  3939. Return a pair consisting of the delimiter that terminated the
  3940. string and the number of characters read. If reading stopped
  3941. at the end of file, the delimiter returned is the
  3942. @var{eof-object}; if the string was filled without encountering
  3943. a delimiter, this value is @code{#f}.
  3944. @end deffn
  3945. %read-line
  3946. @c snarfed from rdelim.c:202
  3947. @deffn {Scheme Procedure} %read-line [port]
  3948. @deffnx {C Function} scm_read_line (port)
  3949. Read a newline-terminated line from @var{port}, allocating storage as
  3950. necessary. The newline terminator (if any) is removed from the string,
  3951. and a pair consisting of the line and its delimiter is returned. The
  3952. delimiter may be either a newline or the @var{eof-object}; if
  3953. @code{%read-line} is called at the end of file, it returns the pair
  3954. @code{(#<eof> . #<eof>)}.
  3955. @end deffn
  3956. write-line
  3957. @c snarfed from rdelim.c:255
  3958. @deffn {Scheme Procedure} write-line obj [port]
  3959. @deffnx {C Function} scm_write_line (obj, port)
  3960. Display @var{obj} and a newline character to @var{port}. If
  3961. @var{port} is not specified, @code{(current-output-port)} is
  3962. used. This function is equivalent to:
  3963. @lisp
  3964. (display obj [port])
  3965. (newline [port])
  3966. @end lisp
  3967. @end deffn
  3968. read-options-interface
  3969. @c snarfed from read.c:110
  3970. @deffn {Scheme Procedure} read-options-interface [setting]
  3971. @deffnx {C Function} scm_read_options (setting)
  3972. Option interface for the read options. Instead of using
  3973. this procedure directly, use the procedures @code{read-enable},
  3974. @code{read-disable}, @code{read-set!} and @code{read-options}.
  3975. @end deffn
  3976. read
  3977. @c snarfed from read.c:130
  3978. @deffn {Scheme Procedure} read [port]
  3979. @deffnx {C Function} scm_read (port)
  3980. Read an s-expression from the input port @var{port}, or from
  3981. the current input port if @var{port} is not specified.
  3982. Any whitespace before the next token is discarded.
  3983. @end deffn
  3984. read-hash-extend
  3985. @c snarfed from read.c:898
  3986. @deffn {Scheme Procedure} read-hash-extend chr proc
  3987. @deffnx {C Function} scm_read_hash_extend (chr, proc)
  3988. Install the procedure @var{proc} for reading expressions
  3989. starting with the character sequence @code{#} and @var{chr}.
  3990. @var{proc} will be called with two arguments: the character
  3991. @var{chr} and the port to read further data from. The object
  3992. returned will be the return value of @code{read}.
  3993. Passing @code{#f} for @var{proc} will remove a previous setting.
  3994. @end deffn
  3995. call-with-dynamic-root
  3996. @c snarfed from root.c:160
  3997. @deffn {Scheme Procedure} call-with-dynamic-root thunk handler
  3998. @deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
  3999. 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}.
  4000. @end deffn
  4001. dynamic-root
  4002. @c snarfed from root.c:171
  4003. @deffn {Scheme Procedure} dynamic-root
  4004. @deffnx {C Function} scm_dynamic_root ()
  4005. Return an object representing the current dynamic root.
  4006. These objects are only useful for comparison using @code{eq?}.
  4007. @end deffn
  4008. read-string!/partial
  4009. @c snarfed from rw.c:101
  4010. @deffn {Scheme Procedure} read-string!/partial str [port_or_fdes [start [end]]]
  4011. @deffnx {C Function} scm_read_string_x_partial (str, port_or_fdes, start, end)
  4012. Read characters from a port or file descriptor into a
  4013. string @var{str}. A port must have an underlying file
  4014. descriptor --- a so-called fport. This procedure is
  4015. scsh-compatible and can efficiently read large strings.
  4016. It will:
  4017. @itemize
  4018. @item
  4019. attempt to fill the entire string, unless the @var{start}
  4020. and/or @var{end} arguments are supplied. i.e., @var{start}
  4021. defaults to 0 and @var{end} defaults to
  4022. @code{(string-length str)}
  4023. @item
  4024. use the current input port if @var{port_or_fdes} is not
  4025. supplied.
  4026. @item
  4027. return fewer than the requested number of characters in some
  4028. cases, e.g., on end of file, if interrupted by a signal, or if
  4029. not all the characters are immediately available.
  4030. @item
  4031. wait indefinitely for some input if no characters are
  4032. currently available,
  4033. unless the port is in non-blocking mode.
  4034. @item
  4035. read characters from the port's input buffers if available,
  4036. instead from the underlying file descriptor.
  4037. @item
  4038. return @code{#f} if end-of-file is encountered before reading
  4039. any characters, otherwise return the number of characters
  4040. read.
  4041. @item
  4042. return 0 if the port is in non-blocking mode and no characters
  4043. are immediately available.
  4044. @item
  4045. return 0 if the request is for 0 bytes, with no
  4046. end-of-file check.
  4047. @end itemize
  4048. @end deffn
  4049. write-string/partial
  4050. @c snarfed from rw.c:205
  4051. @deffn {Scheme Procedure} write-string/partial str [port_or_fdes [start [end]]]
  4052. @deffnx {C Function} scm_write_string_partial (str, port_or_fdes, start, end)
  4053. Write characters from a string @var{str} to a port or file
  4054. descriptor. A port must have an underlying file descriptor
  4055. --- a so-called fport. This procedure is
  4056. scsh-compatible and can efficiently write large strings.
  4057. It will:
  4058. @itemize
  4059. @item
  4060. attempt to write the entire string, unless the @var{start}
  4061. and/or @var{end} arguments are supplied. i.e., @var{start}
  4062. defaults to 0 and @var{end} defaults to
  4063. @code{(string-length str)}
  4064. @item
  4065. use the current output port if @var{port_of_fdes} is not
  4066. supplied.
  4067. @item
  4068. in the case of a buffered port, store the characters in the
  4069. port's output buffer, if all will fit. If they will not fit
  4070. then any existing buffered characters will be flushed
  4071. before attempting
  4072. to write the new characters directly to the underlying file
  4073. descriptor. If the port is in non-blocking mode and
  4074. buffered characters can not be flushed immediately, then an
  4075. @code{EAGAIN} system-error exception will be raised (Note:
  4076. scsh does not support the use of non-blocking buffered ports.)
  4077. @item
  4078. write fewer than the requested number of
  4079. characters in some cases, e.g., if interrupted by a signal or
  4080. if not all of the output can be accepted immediately.
  4081. @item
  4082. wait indefinitely for at least one character
  4083. from @var{str} to be accepted by the port, unless the port is
  4084. in non-blocking mode.
  4085. @item
  4086. return the number of characters accepted by the port.
  4087. @item
  4088. return 0 if the port is in non-blocking mode and can not accept
  4089. at least one character from @var{str} immediately
  4090. @item
  4091. return 0 immediately if the request size is 0 bytes.
  4092. @end itemize
  4093. @end deffn
  4094. sigaction
  4095. @c snarfed from scmsigs.c:253
  4096. @deffn {Scheme Procedure} sigaction signum [handler [flags [thread]]]
  4097. @deffnx {C Function} scm_sigaction_for_thread (signum, handler, flags, thread)
  4098. Install or report the signal handler for a specified signal.
  4099. @var{signum} is the signal number, which can be specified using the value
  4100. of variables such as @code{SIGINT}.
  4101. If @var{handler} is omitted, @code{sigaction} returns a pair: the
  4102. CAR is the current
  4103. signal hander, which will be either an integer with the value @code{SIG_DFL}
  4104. (default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which
  4105. handles the signal, or @code{#f} if a non-Scheme procedure handles the
  4106. signal. The CDR contains the current @code{sigaction} flags for the handler.
  4107. If @var{handler} is provided, it is installed as the new handler for
  4108. @var{signum}. @var{handler} can be a Scheme procedure taking one
  4109. argument, or the value of @code{SIG_DFL} (default action) or
  4110. @code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler
  4111. was installed before @code{sigaction} was first used. When
  4112. a scheme procedure has been specified, that procedure will run
  4113. in the given @var{thread}. When no thread has been given, the
  4114. thread that made this call to @code{sigaction} is used.
  4115. Flags can optionally be specified for the new handler (@code{SA_RESTART} will
  4116. always be added if it's available and the system is using restartable
  4117. system calls.) The return value is a pair with information about the
  4118. old handler as described above.
  4119. This interface does not provide access to the "signal blocking"
  4120. facility. Maybe this is not needed, since the thread support may
  4121. provide solutions to the problem of consistent access to data
  4122. structures.
  4123. @end deffn
  4124. restore-signals
  4125. @c snarfed from scmsigs.c:427
  4126. @deffn {Scheme Procedure} restore-signals
  4127. @deffnx {C Function} scm_restore_signals ()
  4128. Return all signal handlers to the values they had before any call to
  4129. @code{sigaction} was made. The return value is unspecified.
  4130. @end deffn
  4131. alarm
  4132. @c snarfed from scmsigs.c:464
  4133. @deffn {Scheme Procedure} alarm i
  4134. @deffnx {C Function} scm_alarm (i)
  4135. Set a timer to raise a @code{SIGALRM} signal after the specified
  4136. number of seconds (an integer). It's advisable to install a signal
  4137. handler for
  4138. @code{SIGALRM} beforehand, since the default action is to terminate
  4139. the process.
  4140. The return value indicates the time remaining for the previous alarm,
  4141. if any. The new value replaces the previous alarm. If there was
  4142. no previous alarm, the return value is zero.
  4143. @end deffn
  4144. setitimer
  4145. @c snarfed from scmsigs.c:491
  4146. @deffn {Scheme Procedure} setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds
  4147. @deffnx {C Function} scm_setitimer (which_timer, interval_seconds, interval_microseconds, value_seconds, value_microseconds)
  4148. Set the timer specified by @var{which_timer} according to the given
  4149. @var{interval_seconds}, @var{interval_microseconds},
  4150. @var{value_seconds}, and @var{value_microseconds} values.
  4151. Return information about the timer's previous setting.
  4152. Errors are handled as described in the guile info pages under ``POSIX
  4153. Interface Conventions''.
  4154. The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
  4155. and @code{ITIMER_PROF}.
  4156. The return value will be a list of two cons pairs representing the
  4157. current state of the given timer. The first pair is the seconds and
  4158. microseconds of the timer @code{it_interval}, and the second pair is
  4159. the seconds and microseconds of the timer @code{it_value}.
  4160. @end deffn
  4161. getitimer
  4162. @c snarfed from scmsigs.c:532
  4163. @deffn {Scheme Procedure} getitimer which_timer
  4164. @deffnx {C Function} scm_getitimer (which_timer)
  4165. Return information about the timer specified by @var{which_timer}
  4166. Errors are handled as described in the guile info pages under ``POSIX
  4167. Interface Conventions''.
  4168. The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
  4169. and @code{ITIMER_PROF}.
  4170. The return value will be a list of two cons pairs representing the
  4171. current state of the given timer. The first pair is the seconds and
  4172. microseconds of the timer @code{it_interval}, and the second pair is
  4173. the seconds and microseconds of the timer @code{it_value}.
  4174. @end deffn
  4175. pause
  4176. @c snarfed from scmsigs.c:559
  4177. @deffn {Scheme Procedure} pause
  4178. @deffnx {C Function} scm_pause ()
  4179. Pause the current process (thread?) until a signal arrives whose
  4180. action is to either terminate the current process or invoke a
  4181. handler procedure. The return value is unspecified.
  4182. @end deffn
  4183. sleep
  4184. @c snarfed from scmsigs.c:572
  4185. @deffn {Scheme Procedure} sleep i
  4186. @deffnx {C Function} scm_sleep (i)
  4187. Wait for the given number of seconds (an integer) or until a signal
  4188. arrives. The return value is zero if the time elapses or the number
  4189. of seconds remaining otherwise.
  4190. @end deffn
  4191. usleep
  4192. @c snarfed from scmsigs.c:581
  4193. @deffn {Scheme Procedure} usleep i
  4194. @deffnx {C Function} scm_usleep (i)
  4195. Sleep for @var{i} microseconds.
  4196. @end deffn
  4197. raise
  4198. @c snarfed from scmsigs.c:591
  4199. @deffn {Scheme Procedure} raise sig
  4200. @deffnx {C Function} scm_raise (sig)
  4201. Sends a specified signal @var{sig} to the current process, where
  4202. @var{sig} is as described for the kill procedure.
  4203. @end deffn
  4204. system
  4205. @c snarfed from simpos.c:64
  4206. @deffn {Scheme Procedure} system [cmd]
  4207. @deffnx {C Function} scm_system (cmd)
  4208. Execute @var{cmd} using the operating system's "command
  4209. processor". Under Unix this is usually the default shell
  4210. @code{sh}. The value returned is @var{cmd}'s exit status as
  4211. returned by @code{waitpid}, which can be interpreted using
  4212. @code{status:exit-val} and friends.
  4213. If @code{system} is called without arguments, return a boolean
  4214. indicating whether the command processor is available.
  4215. @end deffn
  4216. system*
  4217. @c snarfed from simpos.c:114
  4218. @deffn {Scheme Procedure} system* . args
  4219. @deffnx {C Function} scm_system_star (args)
  4220. Execute the command indicated by @var{args}. The first element must
  4221. be a string indicating the command to be executed, and the remaining
  4222. items must be strings representing each of the arguments to that
  4223. command.
  4224. This function returns the exit status of the command as provided by
  4225. @code{waitpid}. This value can be handled with @code{status:exit-val}
  4226. and the related functions.
  4227. @code{system*} is similar to @code{system}, but accepts only one
  4228. string per-argument, and performs no shell interpretation. The
  4229. command is executed using fork and execlp. Accordingly this function
  4230. may be safer than @code{system} in situations where shell
  4231. interpretation is not required.
  4232. Example: (system* "echo" "foo" "bar")
  4233. @end deffn
  4234. getenv
  4235. @c snarfed from simpos.c:184
  4236. @deffn {Scheme Procedure} getenv nam
  4237. @deffnx {C Function} scm_getenv (nam)
  4238. Looks up the string @var{name} in the current environment. The return
  4239. value is @code{#f} unless a string of the form @code{NAME=VALUE} is
  4240. found, in which case the string @code{VALUE} is returned.
  4241. @end deffn
  4242. primitive-exit
  4243. @c snarfed from simpos.c:200
  4244. @deffn {Scheme Procedure} primitive-exit [status]
  4245. @deffnx {C Function} scm_primitive_exit (status)
  4246. Terminate the current process without unwinding the Scheme stack.
  4247. This is would typically be useful after a fork. The exit status
  4248. is @var{status} if supplied, otherwise zero.
  4249. @end deffn
  4250. restricted-vector-sort!
  4251. @c snarfed from sort.c:78
  4252. @deffn {Scheme Procedure} restricted-vector-sort! vec less startpos endpos
  4253. @deffnx {C Function} scm_restricted_vector_sort_x (vec, less, startpos, endpos)
  4254. Sort the vector @var{vec}, using @var{less} for comparing
  4255. the vector elements. @var{startpos} (inclusively) and
  4256. @var{endpos} (exclusively) delimit
  4257. the range of the vector which gets sorted. The return value
  4258. is not specified.
  4259. @end deffn
  4260. sorted?
  4261. @c snarfed from sort.c:111
  4262. @deffn {Scheme Procedure} sorted? items less
  4263. @deffnx {C Function} scm_sorted_p (items, less)
  4264. Return @code{#t} iff @var{items} is a list or a vector such that
  4265. for all 1 <= i <= m, the predicate @var{less} returns true when
  4266. applied to all elements i - 1 and i
  4267. @end deffn
  4268. merge
  4269. @c snarfed from sort.c:186
  4270. @deffn {Scheme Procedure} merge alist blist less
  4271. @deffnx {C Function} scm_merge (alist, blist, less)
  4272. Merge two already sorted lists into one.
  4273. Given two lists @var{alist} and @var{blist}, such that
  4274. @code{(sorted? alist less?)} and @code{(sorted? blist less?)},
  4275. return a new list in which the elements of @var{alist} and
  4276. @var{blist} have been stably interleaved so that
  4277. @code{(sorted? (merge alist blist less?) less?)}.
  4278. Note: this does _not_ accept vectors.
  4279. @end deffn
  4280. merge!
  4281. @c snarfed from sort.c:303
  4282. @deffn {Scheme Procedure} merge! alist blist less
  4283. @deffnx {C Function} scm_merge_x (alist, blist, less)
  4284. Takes two lists @var{alist} and @var{blist} such that
  4285. @code{(sorted? alist less?)} and @code{(sorted? blist less?)} and
  4286. returns a new list in which the elements of @var{alist} and
  4287. @var{blist} have been stably interleaved so that
  4288. @code{(sorted? (merge alist blist less?) less?)}.
  4289. This is the destructive variant of @code{merge}
  4290. Note: this does _not_ accept vectors.
  4291. @end deffn
  4292. sort!
  4293. @c snarfed from sort.c:373
  4294. @deffn {Scheme Procedure} sort! items less
  4295. @deffnx {C Function} scm_sort_x (items, less)
  4296. Sort the sequence @var{items}, which may be a list or a
  4297. vector. @var{less} is used for comparing the sequence
  4298. elements. The sorting is destructive, that means that the
  4299. input sequence is modified to produce the sorted result.
  4300. This is not a stable sort.
  4301. @end deffn
  4302. sort
  4303. @c snarfed from sort.c:404
  4304. @deffn {Scheme Procedure} sort items less
  4305. @deffnx {C Function} scm_sort (items, less)
  4306. Sort the sequence @var{items}, which may be a list or a
  4307. vector. @var{less} is used for comparing the sequence
  4308. elements. This is not a stable sort.
  4309. @end deffn
  4310. stable-sort!
  4311. @c snarfed from sort.c:487
  4312. @deffn {Scheme Procedure} stable-sort! items less
  4313. @deffnx {C Function} scm_stable_sort_x (items, less)
  4314. Sort the sequence @var{items}, which may be a list or a
  4315. vector. @var{less} is used for comparing the sequence elements.
  4316. The sorting is destructive, that means that the input sequence
  4317. is modified to produce the sorted result.
  4318. This is a stable sort.
  4319. @end deffn
  4320. stable-sort
  4321. @c snarfed from sort.c:531
  4322. @deffn {Scheme Procedure} stable-sort items less
  4323. @deffnx {C Function} scm_stable_sort (items, less)
  4324. Sort the sequence @var{items}, which may be a list or a
  4325. vector. @var{less} is used for comparing the sequence elements.
  4326. This is a stable sort.
  4327. @end deffn
  4328. sort-list!
  4329. @c snarfed from sort.c:549
  4330. @deffn {Scheme Procedure} sort-list! items less
  4331. @deffnx {C Function} scm_sort_list_x (items, less)
  4332. Sort the list @var{items}, using @var{less} for comparing the
  4333. list elements. The sorting is destructive, that means that the
  4334. input list is modified to produce the sorted result.
  4335. This is a stable sort.
  4336. @end deffn
  4337. sort-list
  4338. @c snarfed from sort.c:564
  4339. @deffn {Scheme Procedure} sort-list items less
  4340. @deffnx {C Function} scm_sort_list (items, less)
  4341. Sort the list @var{items}, using @var{less} for comparing the
  4342. list elements. This is a stable sort.
  4343. @end deffn
  4344. source-properties
  4345. @c snarfed from srcprop.c:153
  4346. @deffn {Scheme Procedure} source-properties obj
  4347. @deffnx {C Function} scm_source_properties (obj)
  4348. Return the source property association list of @var{obj}.
  4349. @end deffn
  4350. set-source-properties!
  4351. @c snarfed from srcprop.c:176
  4352. @deffn {Scheme Procedure} set-source-properties! obj plist
  4353. @deffnx {C Function} scm_set_source_properties_x (obj, plist)
  4354. Install the association list @var{plist} as the source property
  4355. list for @var{obj}.
  4356. @end deffn
  4357. source-property
  4358. @c snarfed from srcprop.c:194
  4359. @deffn {Scheme Procedure} source-property obj key
  4360. @deffnx {C Function} scm_source_property (obj, key)
  4361. Return the source property specified by @var{key} from
  4362. @var{obj}'s source property list.
  4363. @end deffn
  4364. set-source-property!
  4365. @c snarfed from srcprop.c:225
  4366. @deffn {Scheme Procedure} set-source-property! obj key datum
  4367. @deffnx {C Function} scm_set_source_property_x (obj, key, datum)
  4368. Set the source property of object @var{obj}, which is specified by
  4369. @var{key} to @var{datum}. Normally, the key will be a symbol.
  4370. @end deffn
  4371. stack?
  4372. @c snarfed from stacks.c:391
  4373. @deffn {Scheme Procedure} stack? obj
  4374. @deffnx {C Function} scm_stack_p (obj)
  4375. Return @code{#t} if @var{obj} is a calling stack.
  4376. @end deffn
  4377. make-stack
  4378. @c snarfed from stacks.c:422
  4379. @deffn {Scheme Procedure} make-stack obj . args
  4380. @deffnx {C Function} scm_make_stack (obj, args)
  4381. Create a new stack. If @var{obj} is @code{#t}, the current
  4382. evaluation stack is used for creating the stack frames,
  4383. otherwise the frames are taken from @var{obj} (which must be
  4384. either a debug object or a continuation).
  4385. @var{args} should be a list containing any combination of
  4386. integer, procedure and @code{#t} values.
  4387. These values specify various ways of cutting away uninteresting
  4388. stack frames from the top and bottom of the stack that
  4389. @code{make-stack} returns. They come in pairs like this:
  4390. @code{(@var{inner_cut_1} @var{outer_cut_1} @var{inner_cut_2}
  4391. @var{outer_cut_2} @dots{})}.
  4392. Each @var{inner_cut_N} can be @code{#t}, an integer, or a
  4393. procedure. @code{#t} means to cut away all frames up to but
  4394. excluding the first user module frame. An integer means to cut
  4395. away exactly that number of frames. A procedure means to cut
  4396. away all frames up to but excluding the application frame whose
  4397. procedure matches the specified one.
  4398. Each @var{outer_cut_N} can be an integer or a procedure. An
  4399. integer means to cut away that number of frames. A procedure
  4400. means to cut away frames down to but excluding the application
  4401. frame whose procedure matches the specified one.
  4402. If the @var{outer_cut_N} of the last pair is missing, it is
  4403. taken as 0.
  4404. @end deffn
  4405. stack-id
  4406. @c snarfed from stacks.c:511
  4407. @deffn {Scheme Procedure} stack-id stack
  4408. @deffnx {C Function} scm_stack_id (stack)
  4409. Return the identifier given to @var{stack} by @code{start-stack}.
  4410. @end deffn
  4411. stack-ref
  4412. @c snarfed from stacks.c:549
  4413. @deffn {Scheme Procedure} stack-ref stack index
  4414. @deffnx {C Function} scm_stack_ref (stack, index)
  4415. Return the @var{index}'th frame from @var{stack}.
  4416. @end deffn
  4417. stack-length
  4418. @c snarfed from stacks.c:562
  4419. @deffn {Scheme Procedure} stack-length stack
  4420. @deffnx {C Function} scm_stack_length (stack)
  4421. Return the length of @var{stack}.
  4422. @end deffn
  4423. frame?
  4424. @c snarfed from stacks.c:575
  4425. @deffn {Scheme Procedure} frame? obj
  4426. @deffnx {C Function} scm_frame_p (obj)
  4427. Return @code{#t} if @var{obj} is a stack frame.
  4428. @end deffn
  4429. last-stack-frame
  4430. @c snarfed from stacks.c:586
  4431. @deffn {Scheme Procedure} last-stack-frame obj
  4432. @deffnx {C Function} scm_last_stack_frame (obj)
  4433. Return a stack which consists of a single frame, which is the
  4434. last stack frame for @var{obj}. @var{obj} must be either a
  4435. debug object or a continuation.
  4436. @end deffn
  4437. frame-number
  4438. @c snarfed from stacks.c:625
  4439. @deffn {Scheme Procedure} frame-number frame
  4440. @deffnx {C Function} scm_frame_number (frame)
  4441. Return the frame number of @var{frame}.
  4442. @end deffn
  4443. frame-source
  4444. @c snarfed from stacks.c:635
  4445. @deffn {Scheme Procedure} frame-source frame
  4446. @deffnx {C Function} scm_frame_source (frame)
  4447. Return the source of @var{frame}.
  4448. @end deffn
  4449. frame-procedure
  4450. @c snarfed from stacks.c:646
  4451. @deffn {Scheme Procedure} frame-procedure frame
  4452. @deffnx {C Function} scm_frame_procedure (frame)
  4453. Return the procedure for @var{frame}, or @code{#f} if no
  4454. procedure is associated with @var{frame}.
  4455. @end deffn
  4456. frame-arguments
  4457. @c snarfed from stacks.c:658
  4458. @deffn {Scheme Procedure} frame-arguments frame
  4459. @deffnx {C Function} scm_frame_arguments (frame)
  4460. Return the arguments of @var{frame}.
  4461. @end deffn
  4462. frame-previous
  4463. @c snarfed from stacks.c:669
  4464. @deffn {Scheme Procedure} frame-previous frame
  4465. @deffnx {C Function} scm_frame_previous (frame)
  4466. Return the previous frame of @var{frame}, or @code{#f} if
  4467. @var{frame} is the first frame in its stack.
  4468. @end deffn
  4469. frame-next
  4470. @c snarfed from stacks.c:685
  4471. @deffn {Scheme Procedure} frame-next frame
  4472. @deffnx {C Function} scm_frame_next (frame)
  4473. Return the next frame of @var{frame}, or @code{#f} if
  4474. @var{frame} is the last frame in its stack.
  4475. @end deffn
  4476. frame-real?
  4477. @c snarfed from stacks.c:700
  4478. @deffn {Scheme Procedure} frame-real? frame
  4479. @deffnx {C Function} scm_frame_real_p (frame)
  4480. Return @code{#t} if @var{frame} is a real frame.
  4481. @end deffn
  4482. frame-procedure?
  4483. @c snarfed from stacks.c:710
  4484. @deffn {Scheme Procedure} frame-procedure? frame
  4485. @deffnx {C Function} scm_frame_procedure_p (frame)
  4486. Return @code{#t} if a procedure is associated with @var{frame}.
  4487. @end deffn
  4488. frame-evaluating-args?
  4489. @c snarfed from stacks.c:720
  4490. @deffn {Scheme Procedure} frame-evaluating-args? frame
  4491. @deffnx {C Function} scm_frame_evaluating_args_p (frame)
  4492. Return @code{#t} if @var{frame} contains evaluated arguments.
  4493. @end deffn
  4494. frame-overflow?
  4495. @c snarfed from stacks.c:730
  4496. @deffn {Scheme Procedure} frame-overflow? frame
  4497. @deffnx {C Function} scm_frame_overflow_p (frame)
  4498. Return @code{#t} if @var{frame} is an overflow frame.
  4499. @end deffn
  4500. get-internal-real-time
  4501. @c snarfed from stime.c:133
  4502. @deffn {Scheme Procedure} get-internal-real-time
  4503. @deffnx {C Function} scm_get_internal_real_time ()
  4504. Return the number of time units since the interpreter was
  4505. started.
  4506. @end deffn
  4507. times
  4508. @c snarfed from stime.c:180
  4509. @deffn {Scheme Procedure} times
  4510. @deffnx {C Function} scm_times ()
  4511. Return an object with information about real and processor
  4512. time. The following procedures accept such an object as an
  4513. argument and return a selected component:
  4514. @table @code
  4515. @item tms:clock
  4516. The current real time, expressed as time units relative to an
  4517. arbitrary base.
  4518. @item tms:utime
  4519. The CPU time units used by the calling process.
  4520. @item tms:stime
  4521. The CPU time units used by the system on behalf of the calling
  4522. process.
  4523. @item tms:cutime
  4524. The CPU time units used by terminated child processes of the
  4525. calling process, whose status has been collected (e.g., using
  4526. @code{waitpid}).
  4527. @item tms:cstime
  4528. Similarly, the CPU times units used by the system on behalf of
  4529. terminated child processes.
  4530. @end table
  4531. @end deffn
  4532. get-internal-run-time
  4533. @c snarfed from stime.c:212
  4534. @deffn {Scheme Procedure} get-internal-run-time
  4535. @deffnx {C Function} scm_get_internal_run_time ()
  4536. Return the number of time units of processor time used by the
  4537. interpreter. Both @emph{system} and @emph{user} time are
  4538. included but subprocesses are not.
  4539. @end deffn
  4540. current-time
  4541. @c snarfed from stime.c:229
  4542. @deffn {Scheme Procedure} current-time
  4543. @deffnx {C Function} scm_current_time ()
  4544. Return the number of seconds since 1970-01-01 00:00:00 UTC,
  4545. excluding leap seconds.
  4546. @end deffn
  4547. gettimeofday
  4548. @c snarfed from stime.c:248
  4549. @deffn {Scheme Procedure} gettimeofday
  4550. @deffnx {C Function} scm_gettimeofday ()
  4551. Return a pair containing the number of seconds and microseconds
  4552. since 1970-01-01 00:00:00 UTC, excluding leap seconds. Note:
  4553. whether true microsecond resolution is available depends on the
  4554. operating system.
  4555. @end deffn
  4556. localtime
  4557. @c snarfed from stime.c:364
  4558. @deffn {Scheme Procedure} localtime time [zone]
  4559. @deffnx {C Function} scm_localtime (time, zone)
  4560. Return an object representing the broken down components of
  4561. @var{time}, an integer like the one returned by
  4562. @code{current-time}. The time zone for the calculation is
  4563. optionally specified by @var{zone} (a string), otherwise the
  4564. @code{TZ} environment variable or the system default is used.
  4565. @end deffn
  4566. gmtime
  4567. @c snarfed from stime.c:449
  4568. @deffn {Scheme Procedure} gmtime time
  4569. @deffnx {C Function} scm_gmtime (time)
  4570. Return an object representing the broken down components of
  4571. @var{time}, an integer like the one returned by
  4572. @code{current-time}. The values are calculated for UTC.
  4573. @end deffn
  4574. mktime
  4575. @c snarfed from stime.c:517
  4576. @deffn {Scheme Procedure} mktime sbd_time [zone]
  4577. @deffnx {C Function} scm_mktime (sbd_time, zone)
  4578. @var{bd-time} is an object representing broken down time and @code{zone}
  4579. is an optional time zone specifier (otherwise the TZ environment variable
  4580. or the system default is used).
  4581. Returns a pair: the car is a corresponding
  4582. integer time value like that returned
  4583. by @code{current-time}; the cdr is a broken down time object, similar to
  4584. as @var{bd-time} but with normalized values.
  4585. @end deffn
  4586. tzset
  4587. @c snarfed from stime.c:603
  4588. @deffn {Scheme Procedure} tzset
  4589. @deffnx {C Function} scm_tzset ()
  4590. Initialize the timezone from the TZ environment variable
  4591. or the system default. It's not usually necessary to call this procedure
  4592. since it's done automatically by other procedures that depend on the
  4593. timezone.
  4594. @end deffn
  4595. strftime
  4596. @c snarfed from stime.c:620
  4597. @deffn {Scheme Procedure} strftime format stime
  4598. @deffnx {C Function} scm_strftime (format, stime)
  4599. Formats a time specification @var{time} using @var{template}. @var{time}
  4600. is an object with time components in the form returned by @code{localtime}
  4601. or @code{gmtime}. @var{template} is a string which can include formatting
  4602. specifications introduced by a @code{%} character. The formatting of
  4603. month and day names is dependent on the current locale. The value returned
  4604. is the formatted string.
  4605. @xref{Formatting Date and Time, , , libc, The GNU C Library Reference Manual}.)
  4606. @end deffn
  4607. strptime
  4608. @c snarfed from stime.c:721
  4609. @deffn {Scheme Procedure} strptime format string
  4610. @deffnx {C Function} scm_strptime (format, string)
  4611. Performs the reverse action to @code{strftime}, parsing
  4612. @var{string} according to the specification supplied in
  4613. @var{template}. The interpretation of month and day names is
  4614. dependent on the current locale. The value returned is a pair.
  4615. The car has an object with time components
  4616. in the form returned by @code{localtime} or @code{gmtime},
  4617. but the time zone components
  4618. are not usefully set.
  4619. The cdr reports the number of characters from @var{string}
  4620. which were used for the conversion.
  4621. @end deffn
  4622. string?
  4623. @c snarfed from strings.c:526
  4624. @deffn {Scheme Procedure} string? obj
  4625. @deffnx {C Function} scm_string_p (obj)
  4626. Return @code{#t} if @var{obj} is a string, else @code{#f}.
  4627. @end deffn
  4628. list->string
  4629. @c snarfed from strings.c:534
  4630. @deffn {Scheme Procedure} list->string
  4631. implemented by the C function "scm_string"
  4632. @end deffn
  4633. string
  4634. @c snarfed from strings.c:540
  4635. @deffn {Scheme Procedure} string . chrs
  4636. @deffnx {Scheme Procedure} list->string chrs
  4637. @deffnx {C Function} scm_string (chrs)
  4638. Return a newly allocated string composed of the arguments,
  4639. @var{chrs}.
  4640. @end deffn
  4641. make-string
  4642. @c snarfed from strings.c:578
  4643. @deffn {Scheme Procedure} make-string k [chr]
  4644. @deffnx {C Function} scm_make_string (k, chr)
  4645. Return a newly allocated string of
  4646. length @var{k}. If @var{chr} is given, then all elements of
  4647. the string are initialized to @var{chr}, otherwise the contents
  4648. of the @var{string} are unspecified.
  4649. @end deffn
  4650. string-length
  4651. @c snarfed from strings.c:604
  4652. @deffn {Scheme Procedure} string-length string
  4653. @deffnx {C Function} scm_string_length (string)
  4654. Return the number of characters in @var{string}.
  4655. @end deffn
  4656. string-ref
  4657. @c snarfed from strings.c:623
  4658. @deffn {Scheme Procedure} string-ref str k
  4659. @deffnx {C Function} scm_string_ref (str, k)
  4660. Return character @var{k} of @var{str} using zero-origin
  4661. indexing. @var{k} must be a valid index of @var{str}.
  4662. @end deffn
  4663. string-set!
  4664. @c snarfed from strings.c:646
  4665. @deffn {Scheme Procedure} string-set! str k chr
  4666. @deffnx {C Function} scm_string_set_x (str, k, chr)
  4667. Store @var{chr} in element @var{k} of @var{str} and return
  4668. an unspecified value. @var{k} must be a valid index of
  4669. @var{str}.
  4670. @end deffn
  4671. substring
  4672. @c snarfed from strings.c:682
  4673. @deffn {Scheme Procedure} substring str start [end]
  4674. @deffnx {C Function} scm_substring (str, start, end)
  4675. Return a newly allocated string formed from the characters
  4676. of @var{str} beginning with index @var{start} (inclusive) and
  4677. ending with index @var{end} (exclusive).
  4678. @var{str} must be a string, @var{start} and @var{end} must be
  4679. exact integers satisfying:
  4680. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4681. @end deffn
  4682. substring/read-only
  4683. @c snarfed from strings.c:708
  4684. @deffn {Scheme Procedure} substring/read-only str start [end]
  4685. @deffnx {C Function} scm_substring_read_only (str, start, end)
  4686. Return a newly allocated string formed from the characters
  4687. of @var{str} beginning with index @var{start} (inclusive) and
  4688. ending with index @var{end} (exclusive).
  4689. @var{str} must be a string, @var{start} and @var{end} must be
  4690. exact integers satisfying:
  4691. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4692. The returned string is read-only.
  4693. @end deffn
  4694. substring/copy
  4695. @c snarfed from strings.c:731
  4696. @deffn {Scheme Procedure} substring/copy str start [end]
  4697. @deffnx {C Function} scm_substring_copy (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. @end deffn
  4705. substring/shared
  4706. @c snarfed from strings.c:755
  4707. @deffn {Scheme Procedure} substring/shared str start [end]
  4708. @deffnx {C Function} scm_substring_shared (str, start, end)
  4709. Return string that indirectly refers to the characters
  4710. of @var{str} beginning with index @var{start} (inclusive) and
  4711. ending with index @var{end} (exclusive).
  4712. @var{str} must be a string, @var{start} and @var{end} must be
  4713. exact integers satisfying:
  4714. 0 <= @var{start} <= @var{end} <= (string-length @var{str}).
  4715. @end deffn
  4716. string-append
  4717. @c snarfed from strings.c:774
  4718. @deffn {Scheme Procedure} string-append . args
  4719. @deffnx {C Function} scm_string_append (args)
  4720. Return a newly allocated string whose characters form the
  4721. concatenation of the given strings, @var{args}.
  4722. @end deffn
  4723. uniform-vector?
  4724. @c snarfed from srfi-4.c:651
  4725. @deffn {Scheme Procedure} uniform-vector? obj
  4726. @deffnx {C Function} scm_uniform_vector_p (obj)
  4727. Return @code{#t} if @var{obj} is a uniform vector.
  4728. @end deffn
  4729. uniform-vector-ref
  4730. @c snarfed from srfi-4.c:677
  4731. @deffn {Scheme Procedure} uniform-vector-ref v idx
  4732. @deffnx {C Function} scm_uniform_vector_ref (v, idx)
  4733. Return the element at index @var{idx} of the
  4734. homogenous numeric vector @var{v}.
  4735. @end deffn
  4736. uniform-vector-set!
  4737. @c snarfed from srfi-4.c:714
  4738. @deffn {Scheme Procedure} uniform-vector-set! v idx val
  4739. @deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
  4740. Set the element at index @var{idx} of the
  4741. homogenous numeric vector @var{v} to @var{val}.
  4742. @end deffn
  4743. uniform-vector->list
  4744. @c snarfed from srfi-4.c:737
  4745. @deffn {Scheme Procedure} uniform-vector->list uvec
  4746. @deffnx {C Function} scm_uniform_vector_to_list (uvec)
  4747. Convert the uniform numeric vector @var{uvec} to a list.
  4748. @end deffn
  4749. uniform-vector-length
  4750. @c snarfed from srfi-4.c:820
  4751. @deffn {Scheme Procedure} uniform-vector-length v
  4752. @deffnx {C Function} scm_uniform_vector_length (v)
  4753. Return the number of elements in the uniform vector @var{v}.
  4754. @end deffn
  4755. uniform-vector-read!
  4756. @c snarfed from srfi-4.c:845
  4757. @deffn {Scheme Procedure} uniform-array-read! ura [port_or_fd [start [end]]]
  4758. @deffnx {Scheme Procedure} uniform-vector-read! uve [port-or-fdes] [start] [end]
  4759. @deffnx {C Function} scm_uniform_array_read_x (ura, port_or_fd, start, end)
  4760. Attempt to read all elements of @var{ura}, in lexicographic order, as
  4761. binary objects from @var{port-or-fdes}.
  4762. If an end of file is encountered,
  4763. the objects up to that point are put into @var{ura}
  4764. (starting at the beginning) and the remainder of the array is
  4765. unchanged.
  4766. The optional arguments @var{start} and @var{end} allow
  4767. a specified region of a vector (or linearized array) to be read,
  4768. leaving the remainder of the vector unchanged.
  4769. @code{uniform-array-read!} returns the number of objects read.
  4770. @var{port-or-fdes} may be omitted, in which case it defaults to the value
  4771. returned by @code{(current-input-port)}.
  4772. @end deffn
  4773. uniform-vector-write
  4774. @c snarfed from srfi-4.c:958
  4775. @deffn {Scheme Procedure} uniform-vector-write uvec [port_or_fd [start [end]]]
  4776. @deffnx {C Function} scm_uniform_vector_write (uvec, port_or_fd, start, end)
  4777. Write the elements of @var{uvec} as raw bytes to
  4778. @var{port-or-fdes}, in the host byte order.
  4779. The optional arguments @var{start} (inclusive)
  4780. and @var{end} (exclusive) allow
  4781. a specified region to be written.
  4782. When @var{port-or-fdes} is a port, all specified elements
  4783. of @var{uvec} are attempted to be written, potentially blocking
  4784. while waiting for more room.
  4785. When @var{port-or-fd} is an integer, a single call to
  4786. write(2) is made.
  4787. An error is signalled when the last element has only
  4788. been partially written in the single call to write(2).
  4789. The number of objects actually written is returned.
  4790. @var{port-or-fdes} may be
  4791. omitted, in which case it defaults to the value returned by
  4792. @code{(current-output-port)}.
  4793. @end deffn
  4794. u8vector?
  4795. @c snarfed from ../libguile/srfi-4.i.c:41
  4796. @deffn {Scheme Procedure} u8vector? obj
  4797. @deffnx {C Function} scm_u8vector_p (obj)
  4798. Return @code{#t} if @var{obj} is a vector of type u8,
  4799. @code{#f} otherwise.
  4800. @end deffn
  4801. make-u8vector
  4802. @c snarfed from ../libguile/srfi-4.i.c:53
  4803. @deffn {Scheme Procedure} make-u8vector len [fill]
  4804. @deffnx {C Function} scm_make_u8vector (len, fill)
  4805. Return a newly allocated uniform numeric vector which can
  4806. hold @var{len} elements. If @var{fill} is given, it is used to
  4807. initialize the elements, otherwise the contents of the vector
  4808. is unspecified.
  4809. @end deffn
  4810. u8vector
  4811. @c snarfed from ../libguile/srfi-4.i.c:63
  4812. @deffn {Scheme Procedure} u8vector . l
  4813. @deffnx {C Function} scm_u8vector (l)
  4814. Return a newly allocated uniform numeric vector containing
  4815. all argument values.
  4816. @end deffn
  4817. u8vector-length
  4818. @c snarfed from ../libguile/srfi-4.i.c:74
  4819. @deffn {Scheme Procedure} u8vector-length uvec
  4820. @deffnx {C Function} scm_u8vector_length (uvec)
  4821. Return the number of elements in the uniform numeric vector
  4822. @var{uvec}.
  4823. @end deffn
  4824. u8vector-ref
  4825. @c snarfed from ../libguile/srfi-4.i.c:85
  4826. @deffn {Scheme Procedure} u8vector-ref uvec index
  4827. @deffnx {C Function} scm_u8vector_ref (uvec, index)
  4828. Return the element at @var{index} in the uniform numeric
  4829. vector @var{uvec}.
  4830. @end deffn
  4831. u8vector-set!
  4832. @c snarfed from ../libguile/srfi-4.i.c:97
  4833. @deffn {Scheme Procedure} u8vector-set! uvec index value
  4834. @deffnx {C Function} scm_u8vector_set_x (uvec, index, value)
  4835. Set the element at @var{index} in the uniform numeric
  4836. vector @var{uvec} to @var{value}. The return value is not
  4837. specified.
  4838. @end deffn
  4839. u8vector->list
  4840. @c snarfed from ../libguile/srfi-4.i.c:107
  4841. @deffn {Scheme Procedure} u8vector->list uvec
  4842. @deffnx {C Function} scm_u8vector_to_list (uvec)
  4843. Convert the uniform numeric vector @var{uvec} to a list.
  4844. @end deffn
  4845. list->u8vector
  4846. @c snarfed from ../libguile/srfi-4.i.c:117
  4847. @deffn {Scheme Procedure} list->u8vector l
  4848. @deffnx {C Function} scm_list_to_u8vector (l)
  4849. Convert the list @var{l} to a numeric uniform vector.
  4850. @end deffn
  4851. any->u8vector
  4852. @c snarfed from ../libguile/srfi-4.i.c:128
  4853. @deffn {Scheme Procedure} any->u8vector obj
  4854. @deffnx {C Function} scm_any_to_u8vector (obj)
  4855. Convert @var{obj}, which can be a list, vector, or
  4856. uniform vector, to a numeric uniform vector of
  4857. type u8.
  4858. @end deffn
  4859. s8vector?
  4860. @c snarfed from ../libguile/srfi-4.i.c:41
  4861. @deffn {Scheme Procedure} s8vector? obj
  4862. @deffnx {C Function} scm_s8vector_p (obj)
  4863. Return @code{#t} if @var{obj} is a vector of type s8,
  4864. @code{#f} otherwise.
  4865. @end deffn
  4866. make-s8vector
  4867. @c snarfed from ../libguile/srfi-4.i.c:53
  4868. @deffn {Scheme Procedure} make-s8vector len [fill]
  4869. @deffnx {C Function} scm_make_s8vector (len, fill)
  4870. Return a newly allocated uniform numeric vector which can
  4871. hold @var{len} elements. If @var{fill} is given, it is used to
  4872. initialize the elements, otherwise the contents of the vector
  4873. is unspecified.
  4874. @end deffn
  4875. s8vector
  4876. @c snarfed from ../libguile/srfi-4.i.c:63
  4877. @deffn {Scheme Procedure} s8vector . l
  4878. @deffnx {C Function} scm_s8vector (l)
  4879. Return a newly allocated uniform numeric vector containing
  4880. all argument values.
  4881. @end deffn
  4882. s8vector-length
  4883. @c snarfed from ../libguile/srfi-4.i.c:74
  4884. @deffn {Scheme Procedure} s8vector-length uvec
  4885. @deffnx {C Function} scm_s8vector_length (uvec)
  4886. Return the number of elements in the uniform numeric vector
  4887. @var{uvec}.
  4888. @end deffn
  4889. s8vector-ref
  4890. @c snarfed from ../libguile/srfi-4.i.c:85
  4891. @deffn {Scheme Procedure} s8vector-ref uvec index
  4892. @deffnx {C Function} scm_s8vector_ref (uvec, index)
  4893. Return the element at @var{index} in the uniform numeric
  4894. vector @var{uvec}.
  4895. @end deffn
  4896. s8vector-set!
  4897. @c snarfed from ../libguile/srfi-4.i.c:97
  4898. @deffn {Scheme Procedure} s8vector-set! uvec index value
  4899. @deffnx {C Function} scm_s8vector_set_x (uvec, index, value)
  4900. Set the element at @var{index} in the uniform numeric
  4901. vector @var{uvec} to @var{value}. The return value is not
  4902. specified.
  4903. @end deffn
  4904. s8vector->list
  4905. @c snarfed from ../libguile/srfi-4.i.c:107
  4906. @deffn {Scheme Procedure} s8vector->list uvec
  4907. @deffnx {C Function} scm_s8vector_to_list (uvec)
  4908. Convert the uniform numeric vector @var{uvec} to a list.
  4909. @end deffn
  4910. list->s8vector
  4911. @c snarfed from ../libguile/srfi-4.i.c:117
  4912. @deffn {Scheme Procedure} list->s8vector l
  4913. @deffnx {C Function} scm_list_to_s8vector (l)
  4914. Convert the list @var{l} to a numeric uniform vector.
  4915. @end deffn
  4916. any->s8vector
  4917. @c snarfed from ../libguile/srfi-4.i.c:128
  4918. @deffn {Scheme Procedure} any->s8vector obj
  4919. @deffnx {C Function} scm_any_to_s8vector (obj)
  4920. Convert @var{obj}, which can be a list, vector, or
  4921. uniform vector, to a numeric uniform vector of
  4922. type s8.
  4923. @end deffn
  4924. u16vector?
  4925. @c snarfed from ../libguile/srfi-4.i.c:41
  4926. @deffn {Scheme Procedure} u16vector? obj
  4927. @deffnx {C Function} scm_u16vector_p (obj)
  4928. Return @code{#t} if @var{obj} is a vector of type u16,
  4929. @code{#f} otherwise.
  4930. @end deffn
  4931. make-u16vector
  4932. @c snarfed from ../libguile/srfi-4.i.c:53
  4933. @deffn {Scheme Procedure} make-u16vector len [fill]
  4934. @deffnx {C Function} scm_make_u16vector (len, fill)
  4935. Return a newly allocated uniform numeric vector which can
  4936. hold @var{len} elements. If @var{fill} is given, it is used to
  4937. initialize the elements, otherwise the contents of the vector
  4938. is unspecified.
  4939. @end deffn
  4940. u16vector
  4941. @c snarfed from ../libguile/srfi-4.i.c:63
  4942. @deffn {Scheme Procedure} u16vector . l
  4943. @deffnx {C Function} scm_u16vector (l)
  4944. Return a newly allocated uniform numeric vector containing
  4945. all argument values.
  4946. @end deffn
  4947. u16vector-length
  4948. @c snarfed from ../libguile/srfi-4.i.c:74
  4949. @deffn {Scheme Procedure} u16vector-length uvec
  4950. @deffnx {C Function} scm_u16vector_length (uvec)
  4951. Return the number of elements in the uniform numeric vector
  4952. @var{uvec}.
  4953. @end deffn
  4954. u16vector-ref
  4955. @c snarfed from ../libguile/srfi-4.i.c:85
  4956. @deffn {Scheme Procedure} u16vector-ref uvec index
  4957. @deffnx {C Function} scm_u16vector_ref (uvec, index)
  4958. Return the element at @var{index} in the uniform numeric
  4959. vector @var{uvec}.
  4960. @end deffn
  4961. u16vector-set!
  4962. @c snarfed from ../libguile/srfi-4.i.c:97
  4963. @deffn {Scheme Procedure} u16vector-set! uvec index value
  4964. @deffnx {C Function} scm_u16vector_set_x (uvec, index, value)
  4965. Set the element at @var{index} in the uniform numeric
  4966. vector @var{uvec} to @var{value}. The return value is not
  4967. specified.
  4968. @end deffn
  4969. u16vector->list
  4970. @c snarfed from ../libguile/srfi-4.i.c:107
  4971. @deffn {Scheme Procedure} u16vector->list uvec
  4972. @deffnx {C Function} scm_u16vector_to_list (uvec)
  4973. Convert the uniform numeric vector @var{uvec} to a list.
  4974. @end deffn
  4975. list->u16vector
  4976. @c snarfed from ../libguile/srfi-4.i.c:117
  4977. @deffn {Scheme Procedure} list->u16vector l
  4978. @deffnx {C Function} scm_list_to_u16vector (l)
  4979. Convert the list @var{l} to a numeric uniform vector.
  4980. @end deffn
  4981. any->u16vector
  4982. @c snarfed from ../libguile/srfi-4.i.c:128
  4983. @deffn {Scheme Procedure} any->u16vector obj
  4984. @deffnx {C Function} scm_any_to_u16vector (obj)
  4985. Convert @var{obj}, which can be a list, vector, or
  4986. uniform vector, to a numeric uniform vector of
  4987. type u16.
  4988. @end deffn
  4989. s16vector?
  4990. @c snarfed from ../libguile/srfi-4.i.c:41
  4991. @deffn {Scheme Procedure} s16vector? obj
  4992. @deffnx {C Function} scm_s16vector_p (obj)
  4993. Return @code{#t} if @var{obj} is a vector of type s16,
  4994. @code{#f} otherwise.
  4995. @end deffn
  4996. make-s16vector
  4997. @c snarfed from ../libguile/srfi-4.i.c:53
  4998. @deffn {Scheme Procedure} make-s16vector len [fill]
  4999. @deffnx {C Function} scm_make_s16vector (len, fill)
  5000. Return a newly allocated uniform numeric vector which can
  5001. hold @var{len} elements. If @var{fill} is given, it is used to
  5002. initialize the elements, otherwise the contents of the vector
  5003. is unspecified.
  5004. @end deffn
  5005. s16vector
  5006. @c snarfed from ../libguile/srfi-4.i.c:63
  5007. @deffn {Scheme Procedure} s16vector . l
  5008. @deffnx {C Function} scm_s16vector (l)
  5009. Return a newly allocated uniform numeric vector containing
  5010. all argument values.
  5011. @end deffn
  5012. s16vector-length
  5013. @c snarfed from ../libguile/srfi-4.i.c:74
  5014. @deffn {Scheme Procedure} s16vector-length uvec
  5015. @deffnx {C Function} scm_s16vector_length (uvec)
  5016. Return the number of elements in the uniform numeric vector
  5017. @var{uvec}.
  5018. @end deffn
  5019. s16vector-ref
  5020. @c snarfed from ../libguile/srfi-4.i.c:85
  5021. @deffn {Scheme Procedure} s16vector-ref uvec index
  5022. @deffnx {C Function} scm_s16vector_ref (uvec, index)
  5023. Return the element at @var{index} in the uniform numeric
  5024. vector @var{uvec}.
  5025. @end deffn
  5026. s16vector-set!
  5027. @c snarfed from ../libguile/srfi-4.i.c:97
  5028. @deffn {Scheme Procedure} s16vector-set! uvec index value
  5029. @deffnx {C Function} scm_s16vector_set_x (uvec, index, value)
  5030. Set the element at @var{index} in the uniform numeric
  5031. vector @var{uvec} to @var{value}. The return value is not
  5032. specified.
  5033. @end deffn
  5034. s16vector->list
  5035. @c snarfed from ../libguile/srfi-4.i.c:107
  5036. @deffn {Scheme Procedure} s16vector->list uvec
  5037. @deffnx {C Function} scm_s16vector_to_list (uvec)
  5038. Convert the uniform numeric vector @var{uvec} to a list.
  5039. @end deffn
  5040. list->s16vector
  5041. @c snarfed from ../libguile/srfi-4.i.c:117
  5042. @deffn {Scheme Procedure} list->s16vector l
  5043. @deffnx {C Function} scm_list_to_s16vector (l)
  5044. Convert the list @var{l} to a numeric uniform vector.
  5045. @end deffn
  5046. any->s16vector
  5047. @c snarfed from ../libguile/srfi-4.i.c:128
  5048. @deffn {Scheme Procedure} any->s16vector obj
  5049. @deffnx {C Function} scm_any_to_s16vector (obj)
  5050. Convert @var{obj}, which can be a list, vector, or
  5051. uniform vector, to a numeric uniform vector of
  5052. type s16.
  5053. @end deffn
  5054. u32vector?
  5055. @c snarfed from ../libguile/srfi-4.i.c:41
  5056. @deffn {Scheme Procedure} u32vector? obj
  5057. @deffnx {C Function} scm_u32vector_p (obj)
  5058. Return @code{#t} if @var{obj} is a vector of type u32,
  5059. @code{#f} otherwise.
  5060. @end deffn
  5061. make-u32vector
  5062. @c snarfed from ../libguile/srfi-4.i.c:53
  5063. @deffn {Scheme Procedure} make-u32vector len [fill]
  5064. @deffnx {C Function} scm_make_u32vector (len, fill)
  5065. Return a newly allocated uniform numeric vector which can
  5066. hold @var{len} elements. If @var{fill} is given, it is used to
  5067. initialize the elements, otherwise the contents of the vector
  5068. is unspecified.
  5069. @end deffn
  5070. u32vector
  5071. @c snarfed from ../libguile/srfi-4.i.c:63
  5072. @deffn {Scheme Procedure} u32vector . l
  5073. @deffnx {C Function} scm_u32vector (l)
  5074. Return a newly allocated uniform numeric vector containing
  5075. all argument values.
  5076. @end deffn
  5077. u32vector-length
  5078. @c snarfed from ../libguile/srfi-4.i.c:74
  5079. @deffn {Scheme Procedure} u32vector-length uvec
  5080. @deffnx {C Function} scm_u32vector_length (uvec)
  5081. Return the number of elements in the uniform numeric vector
  5082. @var{uvec}.
  5083. @end deffn
  5084. u32vector-ref
  5085. @c snarfed from ../libguile/srfi-4.i.c:85
  5086. @deffn {Scheme Procedure} u32vector-ref uvec index
  5087. @deffnx {C Function} scm_u32vector_ref (uvec, index)
  5088. Return the element at @var{index} in the uniform numeric
  5089. vector @var{uvec}.
  5090. @end deffn
  5091. u32vector-set!
  5092. @c snarfed from ../libguile/srfi-4.i.c:97
  5093. @deffn {Scheme Procedure} u32vector-set! uvec index value
  5094. @deffnx {C Function} scm_u32vector_set_x (uvec, index, value)
  5095. Set the element at @var{index} in the uniform numeric
  5096. vector @var{uvec} to @var{value}. The return value is not
  5097. specified.
  5098. @end deffn
  5099. u32vector->list
  5100. @c snarfed from ../libguile/srfi-4.i.c:107
  5101. @deffn {Scheme Procedure} u32vector->list uvec
  5102. @deffnx {C Function} scm_u32vector_to_list (uvec)
  5103. Convert the uniform numeric vector @var{uvec} to a list.
  5104. @end deffn
  5105. list->u32vector
  5106. @c snarfed from ../libguile/srfi-4.i.c:117
  5107. @deffn {Scheme Procedure} list->u32vector l
  5108. @deffnx {C Function} scm_list_to_u32vector (l)
  5109. Convert the list @var{l} to a numeric uniform vector.
  5110. @end deffn
  5111. any->u32vector
  5112. @c snarfed from ../libguile/srfi-4.i.c:128
  5113. @deffn {Scheme Procedure} any->u32vector obj
  5114. @deffnx {C Function} scm_any_to_u32vector (obj)
  5115. Convert @var{obj}, which can be a list, vector, or
  5116. uniform vector, to a numeric uniform vector of
  5117. type u32.
  5118. @end deffn
  5119. s32vector?
  5120. @c snarfed from ../libguile/srfi-4.i.c:41
  5121. @deffn {Scheme Procedure} s32vector? obj
  5122. @deffnx {C Function} scm_s32vector_p (obj)
  5123. Return @code{#t} if @var{obj} is a vector of type s32,
  5124. @code{#f} otherwise.
  5125. @end deffn
  5126. make-s32vector
  5127. @c snarfed from ../libguile/srfi-4.i.c:53
  5128. @deffn {Scheme Procedure} make-s32vector len [fill]
  5129. @deffnx {C Function} scm_make_s32vector (len, fill)
  5130. Return a newly allocated uniform numeric vector which can
  5131. hold @var{len} elements. If @var{fill} is given, it is used to
  5132. initialize the elements, otherwise the contents of the vector
  5133. is unspecified.
  5134. @end deffn
  5135. s32vector
  5136. @c snarfed from ../libguile/srfi-4.i.c:63
  5137. @deffn {Scheme Procedure} s32vector . l
  5138. @deffnx {C Function} scm_s32vector (l)
  5139. Return a newly allocated uniform numeric vector containing
  5140. all argument values.
  5141. @end deffn
  5142. s32vector-length
  5143. @c snarfed from ../libguile/srfi-4.i.c:74
  5144. @deffn {Scheme Procedure} s32vector-length uvec
  5145. @deffnx {C Function} scm_s32vector_length (uvec)
  5146. Return the number of elements in the uniform numeric vector
  5147. @var{uvec}.
  5148. @end deffn
  5149. s32vector-ref
  5150. @c snarfed from ../libguile/srfi-4.i.c:85
  5151. @deffn {Scheme Procedure} s32vector-ref uvec index
  5152. @deffnx {C Function} scm_s32vector_ref (uvec, index)
  5153. Return the element at @var{index} in the uniform numeric
  5154. vector @var{uvec}.
  5155. @end deffn
  5156. s32vector-set!
  5157. @c snarfed from ../libguile/srfi-4.i.c:97
  5158. @deffn {Scheme Procedure} s32vector-set! uvec index value
  5159. @deffnx {C Function} scm_s32vector_set_x (uvec, index, value)
  5160. Set the element at @var{index} in the uniform numeric
  5161. vector @var{uvec} to @var{value}. The return value is not
  5162. specified.
  5163. @end deffn
  5164. s32vector->list
  5165. @c snarfed from ../libguile/srfi-4.i.c:107
  5166. @deffn {Scheme Procedure} s32vector->list uvec
  5167. @deffnx {C Function} scm_s32vector_to_list (uvec)
  5168. Convert the uniform numeric vector @var{uvec} to a list.
  5169. @end deffn
  5170. list->s32vector
  5171. @c snarfed from ../libguile/srfi-4.i.c:117
  5172. @deffn {Scheme Procedure} list->s32vector l
  5173. @deffnx {C Function} scm_list_to_s32vector (l)
  5174. Convert the list @var{l} to a numeric uniform vector.
  5175. @end deffn
  5176. any->s32vector
  5177. @c snarfed from ../libguile/srfi-4.i.c:128
  5178. @deffn {Scheme Procedure} any->s32vector obj
  5179. @deffnx {C Function} scm_any_to_s32vector (obj)
  5180. Convert @var{obj}, which can be a list, vector, or
  5181. uniform vector, to a numeric uniform vector of
  5182. type s32.
  5183. @end deffn
  5184. u64vector?
  5185. @c snarfed from ../libguile/srfi-4.i.c:41
  5186. @deffn {Scheme Procedure} u64vector? obj
  5187. @deffnx {C Function} scm_u64vector_p (obj)
  5188. Return @code{#t} if @var{obj} is a vector of type u64,
  5189. @code{#f} otherwise.
  5190. @end deffn
  5191. make-u64vector
  5192. @c snarfed from ../libguile/srfi-4.i.c:53
  5193. @deffn {Scheme Procedure} make-u64vector len [fill]
  5194. @deffnx {C Function} scm_make_u64vector (len, fill)
  5195. Return a newly allocated uniform numeric vector which can
  5196. hold @var{len} elements. If @var{fill} is given, it is used to
  5197. initialize the elements, otherwise the contents of the vector
  5198. is unspecified.
  5199. @end deffn
  5200. u64vector
  5201. @c snarfed from ../libguile/srfi-4.i.c:63
  5202. @deffn {Scheme Procedure} u64vector . l
  5203. @deffnx {C Function} scm_u64vector (l)
  5204. Return a newly allocated uniform numeric vector containing
  5205. all argument values.
  5206. @end deffn
  5207. u64vector-length
  5208. @c snarfed from ../libguile/srfi-4.i.c:74
  5209. @deffn {Scheme Procedure} u64vector-length uvec
  5210. @deffnx {C Function} scm_u64vector_length (uvec)
  5211. Return the number of elements in the uniform numeric vector
  5212. @var{uvec}.
  5213. @end deffn
  5214. u64vector-ref
  5215. @c snarfed from ../libguile/srfi-4.i.c:85
  5216. @deffn {Scheme Procedure} u64vector-ref uvec index
  5217. @deffnx {C Function} scm_u64vector_ref (uvec, index)
  5218. Return the element at @var{index} in the uniform numeric
  5219. vector @var{uvec}.
  5220. @end deffn
  5221. u64vector-set!
  5222. @c snarfed from ../libguile/srfi-4.i.c:97
  5223. @deffn {Scheme Procedure} u64vector-set! uvec index value
  5224. @deffnx {C Function} scm_u64vector_set_x (uvec, index, value)
  5225. Set the element at @var{index} in the uniform numeric
  5226. vector @var{uvec} to @var{value}. The return value is not
  5227. specified.
  5228. @end deffn
  5229. u64vector->list
  5230. @c snarfed from ../libguile/srfi-4.i.c:107
  5231. @deffn {Scheme Procedure} u64vector->list uvec
  5232. @deffnx {C Function} scm_u64vector_to_list (uvec)
  5233. Convert the uniform numeric vector @var{uvec} to a list.
  5234. @end deffn
  5235. list->u64vector
  5236. @c snarfed from ../libguile/srfi-4.i.c:117
  5237. @deffn {Scheme Procedure} list->u64vector l
  5238. @deffnx {C Function} scm_list_to_u64vector (l)
  5239. Convert the list @var{l} to a numeric uniform vector.
  5240. @end deffn
  5241. any->u64vector
  5242. @c snarfed from ../libguile/srfi-4.i.c:128
  5243. @deffn {Scheme Procedure} any->u64vector obj
  5244. @deffnx {C Function} scm_any_to_u64vector (obj)
  5245. Convert @var{obj}, which can be a list, vector, or
  5246. uniform vector, to a numeric uniform vector of
  5247. type u64.
  5248. @end deffn
  5249. s64vector?
  5250. @c snarfed from ../libguile/srfi-4.i.c:41
  5251. @deffn {Scheme Procedure} s64vector? obj
  5252. @deffnx {C Function} scm_s64vector_p (obj)
  5253. Return @code{#t} if @var{obj} is a vector of type s64,
  5254. @code{#f} otherwise.
  5255. @end deffn
  5256. make-s64vector
  5257. @c snarfed from ../libguile/srfi-4.i.c:53
  5258. @deffn {Scheme Procedure} make-s64vector len [fill]
  5259. @deffnx {C Function} scm_make_s64vector (len, fill)
  5260. Return a newly allocated uniform numeric vector which can
  5261. hold @var{len} elements. If @var{fill} is given, it is used to
  5262. initialize the elements, otherwise the contents of the vector
  5263. is unspecified.
  5264. @end deffn
  5265. s64vector
  5266. @c snarfed from ../libguile/srfi-4.i.c:63
  5267. @deffn {Scheme Procedure} s64vector . l
  5268. @deffnx {C Function} scm_s64vector (l)
  5269. Return a newly allocated uniform numeric vector containing
  5270. all argument values.
  5271. @end deffn
  5272. s64vector-length
  5273. @c snarfed from ../libguile/srfi-4.i.c:74
  5274. @deffn {Scheme Procedure} s64vector-length uvec
  5275. @deffnx {C Function} scm_s64vector_length (uvec)
  5276. Return the number of elements in the uniform numeric vector
  5277. @var{uvec}.
  5278. @end deffn
  5279. s64vector-ref
  5280. @c snarfed from ../libguile/srfi-4.i.c:85
  5281. @deffn {Scheme Procedure} s64vector-ref uvec index
  5282. @deffnx {C Function} scm_s64vector_ref (uvec, index)
  5283. Return the element at @var{index} in the uniform numeric
  5284. vector @var{uvec}.
  5285. @end deffn
  5286. s64vector-set!
  5287. @c snarfed from ../libguile/srfi-4.i.c:97
  5288. @deffn {Scheme Procedure} s64vector-set! uvec index value
  5289. @deffnx {C Function} scm_s64vector_set_x (uvec, index, value)
  5290. Set the element at @var{index} in the uniform numeric
  5291. vector @var{uvec} to @var{value}. The return value is not
  5292. specified.
  5293. @end deffn
  5294. s64vector->list
  5295. @c snarfed from ../libguile/srfi-4.i.c:107
  5296. @deffn {Scheme Procedure} s64vector->list uvec
  5297. @deffnx {C Function} scm_s64vector_to_list (uvec)
  5298. Convert the uniform numeric vector @var{uvec} to a list.
  5299. @end deffn
  5300. list->s64vector
  5301. @c snarfed from ../libguile/srfi-4.i.c:117
  5302. @deffn {Scheme Procedure} list->s64vector l
  5303. @deffnx {C Function} scm_list_to_s64vector (l)
  5304. Convert the list @var{l} to a numeric uniform vector.
  5305. @end deffn
  5306. any->s64vector
  5307. @c snarfed from ../libguile/srfi-4.i.c:128
  5308. @deffn {Scheme Procedure} any->s64vector obj
  5309. @deffnx {C Function} scm_any_to_s64vector (obj)
  5310. Convert @var{obj}, which can be a list, vector, or
  5311. uniform vector, to a numeric uniform vector of
  5312. type s64.
  5313. @end deffn
  5314. f32vector?
  5315. @c snarfed from ../libguile/srfi-4.i.c:41
  5316. @deffn {Scheme Procedure} f32vector? obj
  5317. @deffnx {C Function} scm_f32vector_p (obj)
  5318. Return @code{#t} if @var{obj} is a vector of type f32,
  5319. @code{#f} otherwise.
  5320. @end deffn
  5321. make-f32vector
  5322. @c snarfed from ../libguile/srfi-4.i.c:53
  5323. @deffn {Scheme Procedure} make-f32vector len [fill]
  5324. @deffnx {C Function} scm_make_f32vector (len, fill)
  5325. Return a newly allocated uniform numeric vector which can
  5326. hold @var{len} elements. If @var{fill} is given, it is used to
  5327. initialize the elements, otherwise the contents of the vector
  5328. is unspecified.
  5329. @end deffn
  5330. f32vector
  5331. @c snarfed from ../libguile/srfi-4.i.c:63
  5332. @deffn {Scheme Procedure} f32vector . l
  5333. @deffnx {C Function} scm_f32vector (l)
  5334. Return a newly allocated uniform numeric vector containing
  5335. all argument values.
  5336. @end deffn
  5337. f32vector-length
  5338. @c snarfed from ../libguile/srfi-4.i.c:74
  5339. @deffn {Scheme Procedure} f32vector-length uvec
  5340. @deffnx {C Function} scm_f32vector_length (uvec)
  5341. Return the number of elements in the uniform numeric vector
  5342. @var{uvec}.
  5343. @end deffn
  5344. f32vector-ref
  5345. @c snarfed from ../libguile/srfi-4.i.c:85
  5346. @deffn {Scheme Procedure} f32vector-ref uvec index
  5347. @deffnx {C Function} scm_f32vector_ref (uvec, index)
  5348. Return the element at @var{index} in the uniform numeric
  5349. vector @var{uvec}.
  5350. @end deffn
  5351. f32vector-set!
  5352. @c snarfed from ../libguile/srfi-4.i.c:97
  5353. @deffn {Scheme Procedure} f32vector-set! uvec index value
  5354. @deffnx {C Function} scm_f32vector_set_x (uvec, index, value)
  5355. Set the element at @var{index} in the uniform numeric
  5356. vector @var{uvec} to @var{value}. The return value is not
  5357. specified.
  5358. @end deffn
  5359. f32vector->list
  5360. @c snarfed from ../libguile/srfi-4.i.c:107
  5361. @deffn {Scheme Procedure} f32vector->list uvec
  5362. @deffnx {C Function} scm_f32vector_to_list (uvec)
  5363. Convert the uniform numeric vector @var{uvec} to a list.
  5364. @end deffn
  5365. list->f32vector
  5366. @c snarfed from ../libguile/srfi-4.i.c:117
  5367. @deffn {Scheme Procedure} list->f32vector l
  5368. @deffnx {C Function} scm_list_to_f32vector (l)
  5369. Convert the list @var{l} to a numeric uniform vector.
  5370. @end deffn
  5371. any->f32vector
  5372. @c snarfed from ../libguile/srfi-4.i.c:128
  5373. @deffn {Scheme Procedure} any->f32vector obj
  5374. @deffnx {C Function} scm_any_to_f32vector (obj)
  5375. Convert @var{obj}, which can be a list, vector, or
  5376. uniform vector, to a numeric uniform vector of
  5377. type f32.
  5378. @end deffn
  5379. f64vector?
  5380. @c snarfed from ../libguile/srfi-4.i.c:41
  5381. @deffn {Scheme Procedure} f64vector? obj
  5382. @deffnx {C Function} scm_f64vector_p (obj)
  5383. Return @code{#t} if @var{obj} is a vector of type f64,
  5384. @code{#f} otherwise.
  5385. @end deffn
  5386. make-f64vector
  5387. @c snarfed from ../libguile/srfi-4.i.c:53
  5388. @deffn {Scheme Procedure} make-f64vector len [fill]
  5389. @deffnx {C Function} scm_make_f64vector (len, fill)
  5390. Return a newly allocated uniform numeric vector which can
  5391. hold @var{len} elements. If @var{fill} is given, it is used to
  5392. initialize the elements, otherwise the contents of the vector
  5393. is unspecified.
  5394. @end deffn
  5395. f64vector
  5396. @c snarfed from ../libguile/srfi-4.i.c:63
  5397. @deffn {Scheme Procedure} f64vector . l
  5398. @deffnx {C Function} scm_f64vector (l)
  5399. Return a newly allocated uniform numeric vector containing
  5400. all argument values.
  5401. @end deffn
  5402. f64vector-length
  5403. @c snarfed from ../libguile/srfi-4.i.c:74
  5404. @deffn {Scheme Procedure} f64vector-length uvec
  5405. @deffnx {C Function} scm_f64vector_length (uvec)
  5406. Return the number of elements in the uniform numeric vector
  5407. @var{uvec}.
  5408. @end deffn
  5409. f64vector-ref
  5410. @c snarfed from ../libguile/srfi-4.i.c:85
  5411. @deffn {Scheme Procedure} f64vector-ref uvec index
  5412. @deffnx {C Function} scm_f64vector_ref (uvec, index)
  5413. Return the element at @var{index} in the uniform numeric
  5414. vector @var{uvec}.
  5415. @end deffn
  5416. f64vector-set!
  5417. @c snarfed from ../libguile/srfi-4.i.c:97
  5418. @deffn {Scheme Procedure} f64vector-set! uvec index value
  5419. @deffnx {C Function} scm_f64vector_set_x (uvec, index, value)
  5420. Set the element at @var{index} in the uniform numeric
  5421. vector @var{uvec} to @var{value}. The return value is not
  5422. specified.
  5423. @end deffn
  5424. f64vector->list
  5425. @c snarfed from ../libguile/srfi-4.i.c:107
  5426. @deffn {Scheme Procedure} f64vector->list uvec
  5427. @deffnx {C Function} scm_f64vector_to_list (uvec)
  5428. Convert the uniform numeric vector @var{uvec} to a list.
  5429. @end deffn
  5430. list->f64vector
  5431. @c snarfed from ../libguile/srfi-4.i.c:117
  5432. @deffn {Scheme Procedure} list->f64vector l
  5433. @deffnx {C Function} scm_list_to_f64vector (l)
  5434. Convert the list @var{l} to a numeric uniform vector.
  5435. @end deffn
  5436. any->f64vector
  5437. @c snarfed from ../libguile/srfi-4.i.c:128
  5438. @deffn {Scheme Procedure} any->f64vector obj
  5439. @deffnx {C Function} scm_any_to_f64vector (obj)
  5440. Convert @var{obj}, which can be a list, vector, or
  5441. uniform vector, to a numeric uniform vector of
  5442. type f64.
  5443. @end deffn
  5444. c32vector?
  5445. @c snarfed from ../libguile/srfi-4.i.c:41
  5446. @deffn {Scheme Procedure} c32vector? obj
  5447. @deffnx {C Function} scm_c32vector_p (obj)
  5448. Return @code{#t} if @var{obj} is a vector of type c32,
  5449. @code{#f} otherwise.
  5450. @end deffn
  5451. make-c32vector
  5452. @c snarfed from ../libguile/srfi-4.i.c:53
  5453. @deffn {Scheme Procedure} make-c32vector len [fill]
  5454. @deffnx {C Function} scm_make_c32vector (len, fill)
  5455. Return a newly allocated uniform numeric vector which can
  5456. hold @var{len} elements. If @var{fill} is given, it is used to
  5457. initialize the elements, otherwise the contents of the vector
  5458. is unspecified.
  5459. @end deffn
  5460. c32vector
  5461. @c snarfed from ../libguile/srfi-4.i.c:63
  5462. @deffn {Scheme Procedure} c32vector . l
  5463. @deffnx {C Function} scm_c32vector (l)
  5464. Return a newly allocated uniform numeric vector containing
  5465. all argument values.
  5466. @end deffn
  5467. c32vector-length
  5468. @c snarfed from ../libguile/srfi-4.i.c:74
  5469. @deffn {Scheme Procedure} c32vector-length uvec
  5470. @deffnx {C Function} scm_c32vector_length (uvec)
  5471. Return the number of elements in the uniform numeric vector
  5472. @var{uvec}.
  5473. @end deffn
  5474. c32vector-ref
  5475. @c snarfed from ../libguile/srfi-4.i.c:85
  5476. @deffn {Scheme Procedure} c32vector-ref uvec index
  5477. @deffnx {C Function} scm_c32vector_ref (uvec, index)
  5478. Return the element at @var{index} in the uniform numeric
  5479. vector @var{uvec}.
  5480. @end deffn
  5481. c32vector-set!
  5482. @c snarfed from ../libguile/srfi-4.i.c:97
  5483. @deffn {Scheme Procedure} c32vector-set! uvec index value
  5484. @deffnx {C Function} scm_c32vector_set_x (uvec, index, value)
  5485. Set the element at @var{index} in the uniform numeric
  5486. vector @var{uvec} to @var{value}. The return value is not
  5487. specified.
  5488. @end deffn
  5489. c32vector->list
  5490. @c snarfed from ../libguile/srfi-4.i.c:107
  5491. @deffn {Scheme Procedure} c32vector->list uvec
  5492. @deffnx {C Function} scm_c32vector_to_list (uvec)
  5493. Convert the uniform numeric vector @var{uvec} to a list.
  5494. @end deffn
  5495. list->c32vector
  5496. @c snarfed from ../libguile/srfi-4.i.c:117
  5497. @deffn {Scheme Procedure} list->c32vector l
  5498. @deffnx {C Function} scm_list_to_c32vector (l)
  5499. Convert the list @var{l} to a numeric uniform vector.
  5500. @end deffn
  5501. any->c32vector
  5502. @c snarfed from ../libguile/srfi-4.i.c:128
  5503. @deffn {Scheme Procedure} any->c32vector obj
  5504. @deffnx {C Function} scm_any_to_c32vector (obj)
  5505. Convert @var{obj}, which can be a list, vector, or
  5506. uniform vector, to a numeric uniform vector of
  5507. type c32.
  5508. @end deffn
  5509. c64vector?
  5510. @c snarfed from ../libguile/srfi-4.i.c:41
  5511. @deffn {Scheme Procedure} c64vector? obj
  5512. @deffnx {C Function} scm_c64vector_p (obj)
  5513. Return @code{#t} if @var{obj} is a vector of type c64,
  5514. @code{#f} otherwise.
  5515. @end deffn
  5516. make-c64vector
  5517. @c snarfed from ../libguile/srfi-4.i.c:53
  5518. @deffn {Scheme Procedure} make-c64vector len [fill]
  5519. @deffnx {C Function} scm_make_c64vector (len, fill)
  5520. Return a newly allocated uniform numeric vector which can
  5521. hold @var{len} elements. If @var{fill} is given, it is used to
  5522. initialize the elements, otherwise the contents of the vector
  5523. is unspecified.
  5524. @end deffn
  5525. c64vector
  5526. @c snarfed from ../libguile/srfi-4.i.c:63
  5527. @deffn {Scheme Procedure} c64vector . l
  5528. @deffnx {C Function} scm_c64vector (l)
  5529. Return a newly allocated uniform numeric vector containing
  5530. all argument values.
  5531. @end deffn
  5532. c64vector-length
  5533. @c snarfed from ../libguile/srfi-4.i.c:74
  5534. @deffn {Scheme Procedure} c64vector-length uvec
  5535. @deffnx {C Function} scm_c64vector_length (uvec)
  5536. Return the number of elements in the uniform numeric vector
  5537. @var{uvec}.
  5538. @end deffn
  5539. c64vector-ref
  5540. @c snarfed from ../libguile/srfi-4.i.c:85
  5541. @deffn {Scheme Procedure} c64vector-ref uvec index
  5542. @deffnx {C Function} scm_c64vector_ref (uvec, index)
  5543. Return the element at @var{index} in the uniform numeric
  5544. vector @var{uvec}.
  5545. @end deffn
  5546. c64vector-set!
  5547. @c snarfed from ../libguile/srfi-4.i.c:97
  5548. @deffn {Scheme Procedure} c64vector-set! uvec index value
  5549. @deffnx {C Function} scm_c64vector_set_x (uvec, index, value)
  5550. Set the element at @var{index} in the uniform numeric
  5551. vector @var{uvec} to @var{value}. The return value is not
  5552. specified.
  5553. @end deffn
  5554. c64vector->list
  5555. @c snarfed from ../libguile/srfi-4.i.c:107
  5556. @deffn {Scheme Procedure} c64vector->list uvec
  5557. @deffnx {C Function} scm_c64vector_to_list (uvec)
  5558. Convert the uniform numeric vector @var{uvec} to a list.
  5559. @end deffn
  5560. list->c64vector
  5561. @c snarfed from ../libguile/srfi-4.i.c:117
  5562. @deffn {Scheme Procedure} list->c64vector l
  5563. @deffnx {C Function} scm_list_to_c64vector (l)
  5564. Convert the list @var{l} to a numeric uniform vector.
  5565. @end deffn
  5566. any->c64vector
  5567. @c snarfed from ../libguile/srfi-4.i.c:128
  5568. @deffn {Scheme Procedure} any->c64vector obj
  5569. @deffnx {C Function} scm_any_to_c64vector (obj)
  5570. Convert @var{obj}, which can be a list, vector, or
  5571. uniform vector, to a numeric uniform vector of
  5572. type c64.
  5573. @end deffn
  5574. string-null?
  5575. @c snarfed from srfi-13.c:62
  5576. @deffn {Scheme Procedure} string-null? str
  5577. @deffnx {C Function} scm_string_null_p (str)
  5578. Return @code{#t} if @var{str}'s length is zero, and
  5579. @code{#f} otherwise.
  5580. @lisp
  5581. (string-null? "") @result{} #t
  5582. y @result{} "foo"
  5583. (string-null? y) @result{} #f
  5584. @end lisp
  5585. @end deffn
  5586. string-any-c-code
  5587. @c snarfed from srfi-13.c:94
  5588. @deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
  5589. @deffnx {C Function} scm_string_any (char_pred, s, start, end)
  5590. Check if @var{char_pred} is true for any character in string @var{s}.
  5591. @var{char_pred} can be a character to check for any equal to that, or
  5592. a character set (@pxref{Character Sets}) to check for any in that set,
  5593. or a predicate procedure to call.
  5594. For a procedure, calls @code{(@var{char_pred} c)} are made
  5595. successively on the characters from @var{start} to @var{end}. If
  5596. @var{char_pred} returns true (ie.@: non-@code{#f}), @code{string-any}
  5597. stops and that return value is the return from @code{string-any}. The
  5598. call on the last character (ie.@: at @math{@var{end}-1}), if that
  5599. point is reached, is a tail call.
  5600. If there are no characters in @var{s} (ie.@: @var{start} equals
  5601. @var{end}) then the return is @code{#f}.
  5602. @end deffn
  5603. string-every-c-code
  5604. @c snarfed from srfi-13.c:158
  5605. @deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
  5606. @deffnx {C Function} scm_string_every (char_pred, s, start, end)
  5607. Check if @var{char_pred} is true for every character in string
  5608. @var{s}.
  5609. @var{char_pred} can be a character to check for every character equal
  5610. to that, or a character set (@pxref{Character Sets}) to check for
  5611. every character being in that set, or a predicate procedure to call.
  5612. For a procedure, calls @code{(@var{char_pred} c)} are made
  5613. successively on the characters from @var{start} to @var{end}. If
  5614. @var{char_pred} returns @code{#f}, @code{string-every} stops and
  5615. returns @code{#f}. The call on the last character (ie.@: at
  5616. @math{@var{end}-1}), if that point is reached, is a tail call and the
  5617. return from that call is the return from @code{string-every}.
  5618. If there are no characters in @var{s} (ie.@: @var{start} equals
  5619. @var{end}) then the return is @code{#t}.
  5620. @end deffn
  5621. string-tabulate
  5622. @c snarfed from srfi-13.c:214
  5623. @deffn {Scheme Procedure} string-tabulate proc len
  5624. @deffnx {C Function} scm_string_tabulate (proc, len)
  5625. @var{proc} is an integer->char procedure. Construct a string
  5626. of size @var{len} by applying @var{proc} to each index to
  5627. produce the corresponding string element. The order in which
  5628. @var{proc} is applied to the indices is not specified.
  5629. @end deffn
  5630. string->list
  5631. @c snarfed from srfi-13.c:246
  5632. @deffn {Scheme Procedure} string->list str [start [end]]
  5633. @deffnx {C Function} scm_substring_to_list (str, start, end)
  5634. Convert the string @var{str} into a list of characters.
  5635. @end deffn
  5636. reverse-list->string
  5637. @c snarfed from srfi-13.c:285
  5638. @deffn {Scheme Procedure} reverse-list->string chrs
  5639. @deffnx {C Function} scm_reverse_list_to_string (chrs)
  5640. An efficient implementation of @code{(compose string->list
  5641. reverse)}:
  5642. @smalllisp
  5643. (reverse-list->string '(#\a #\B #\c)) @result{} "cBa"
  5644. @end smalllisp
  5645. @end deffn
  5646. string-join
  5647. @c snarfed from srfi-13.c:352
  5648. @deffn {Scheme Procedure} string-join ls [delimiter [grammar]]
  5649. @deffnx {C Function} scm_string_join (ls, delimiter, grammar)
  5650. Append the string in the string list @var{ls}, using the string
  5651. @var{delim} as a delimiter between the elements of @var{ls}.
  5652. @var{grammar} is a symbol which specifies how the delimiter is
  5653. placed between the strings, and defaults to the symbol
  5654. @code{infix}.
  5655. @table @code
  5656. @item infix
  5657. Insert the separator between list elements. An empty string
  5658. will produce an empty list.
  5659. @item string-infix
  5660. Like @code{infix}, but will raise an error if given the empty
  5661. list.
  5662. @item suffix
  5663. Insert the separator after every list element.
  5664. @item prefix
  5665. Insert the separator before each list element.
  5666. @end table
  5667. @end deffn
  5668. string-copy
  5669. @c snarfed from srfi-13.c:486
  5670. @deffn {Scheme Procedure} string-copy str [start [end]]
  5671. @deffnx {C Function} scm_srfi13_substring_copy (str, start, end)
  5672. Return a freshly allocated copy of the string @var{str}. If
  5673. given, @var{start} and @var{end} delimit the portion of
  5674. @var{str} which is copied.
  5675. @end deffn
  5676. string-copy!
  5677. @c snarfed from srfi-13.c:513
  5678. @deffn {Scheme Procedure} string-copy! target tstart s [start [end]]
  5679. @deffnx {C Function} scm_string_copy_x (target, tstart, s, start, end)
  5680. Copy the sequence of characters from index range [@var{start},
  5681. @var{end}) in string @var{s} to string @var{target}, beginning
  5682. at index @var{tstart}. The characters are copied left-to-right
  5683. or right-to-left as needed -- the copy is guaranteed to work,
  5684. even if @var{target} and @var{s} are the same string. It is an
  5685. error if the copy operation runs off the end of the target
  5686. string.
  5687. @end deffn
  5688. substring-move!
  5689. @c snarfed from srfi-13.c:543
  5690. @deffn {Scheme Procedure} substring-move! str1 start1 end1 str2 start2
  5691. @deffnx {C Function} scm_substring_move_x (str1, start1, end1, str2, start2)
  5692. Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}
  5693. into @var{str2} beginning at position @var{start2}.
  5694. @var{str1} and @var{str2} can be the same string.
  5695. @end deffn
  5696. string-take
  5697. @c snarfed from srfi-13.c:552
  5698. @deffn {Scheme Procedure} string-take s n
  5699. @deffnx {C Function} scm_string_take (s, n)
  5700. Return the @var{n} first characters of @var{s}.
  5701. @end deffn
  5702. string-drop
  5703. @c snarfed from srfi-13.c:562
  5704. @deffn {Scheme Procedure} string-drop s n
  5705. @deffnx {C Function} scm_string_drop (s, n)
  5706. Return all but the first @var{n} characters of @var{s}.
  5707. @end deffn
  5708. string-take-right
  5709. @c snarfed from srfi-13.c:572
  5710. @deffn {Scheme Procedure} string-take-right s n
  5711. @deffnx {C Function} scm_string_take_right (s, n)
  5712. Return the @var{n} last characters of @var{s}.
  5713. @end deffn
  5714. string-drop-right
  5715. @c snarfed from srfi-13.c:584
  5716. @deffn {Scheme Procedure} string-drop-right s n
  5717. @deffnx {C Function} scm_string_drop_right (s, n)
  5718. Return all but the last @var{n} characters of @var{s}.
  5719. @end deffn
  5720. string-pad
  5721. @c snarfed from srfi-13.c:599
  5722. @deffn {Scheme Procedure} string-pad s len [chr [start [end]]]
  5723. @deffnx {C Function} scm_string_pad (s, len, chr, start, end)
  5724. Take that characters from @var{start} to @var{end} from the
  5725. string @var{s} and return a new string, right-padded by the
  5726. character @var{chr} to length @var{len}. If the resulting
  5727. string is longer than @var{len}, it is truncated on the right.
  5728. @end deffn
  5729. string-pad-right
  5730. @c snarfed from srfi-13.c:639
  5731. @deffn {Scheme Procedure} string-pad-right s len [chr [start [end]]]
  5732. @deffnx {C Function} scm_string_pad_right (s, len, chr, start, end)
  5733. Take that characters from @var{start} to @var{end} from the
  5734. string @var{s} and return a new string, left-padded by the
  5735. character @var{chr} to length @var{len}. If the resulting
  5736. string is longer than @var{len}, it is truncated on the left.
  5737. @end deffn
  5738. string-trim
  5739. @c snarfed from srfi-13.c:692
  5740. @deffn {Scheme Procedure} string-trim s [char_pred [start [end]]]
  5741. @deffnx {C Function} scm_string_trim (s, char_pred, start, end)
  5742. Trim @var{s} by skipping over all characters on the left
  5743. that satisfy the parameter @var{char_pred}:
  5744. @itemize @bullet
  5745. @item
  5746. if it is the character @var{ch}, characters equal to
  5747. @var{ch} are trimmed,
  5748. @item
  5749. if it is a procedure @var{pred} characters that
  5750. satisfy @var{pred} are trimmed,
  5751. @item
  5752. if it is a character set, characters in that set are trimmed.
  5753. @end itemize
  5754. If called without a @var{char_pred} argument, all whitespace is
  5755. trimmed.
  5756. @end deffn
  5757. string-trim-right
  5758. @c snarfed from srfi-13.c:768
  5759. @deffn {Scheme Procedure} string-trim-right s [char_pred [start [end]]]
  5760. @deffnx {C Function} scm_string_trim_right (s, char_pred, start, end)
  5761. Trim @var{s} by skipping over all characters on the rightt
  5762. that satisfy the parameter @var{char_pred}:
  5763. @itemize @bullet
  5764. @item
  5765. if it is the character @var{ch}, characters equal to @var{ch}
  5766. are trimmed,
  5767. @item
  5768. if it is a procedure @var{pred} characters that satisfy
  5769. @var{pred} are trimmed,
  5770. @item
  5771. if it is a character sets, all characters in that set are
  5772. trimmed.
  5773. @end itemize
  5774. If called without a @var{char_pred} argument, all whitespace is
  5775. trimmed.
  5776. @end deffn
  5777. string-trim-both
  5778. @c snarfed from srfi-13.c:844
  5779. @deffn {Scheme Procedure} string-trim-both s [char_pred [start [end]]]
  5780. @deffnx {C Function} scm_string_trim_both (s, char_pred, start, end)
  5781. Trim @var{s} by skipping over all characters on both sides of
  5782. the string that satisfy the parameter @var{char_pred}:
  5783. @itemize @bullet
  5784. @item
  5785. if it is the character @var{ch}, characters equal to @var{ch}
  5786. are trimmed,
  5787. @item
  5788. if it is a procedure @var{pred} characters that satisfy
  5789. @var{pred} are trimmed,
  5790. @item
  5791. if it is a character set, the characters in the set are
  5792. trimmed.
  5793. @end itemize
  5794. If called without a @var{char_pred} argument, all whitespace is
  5795. trimmed.
  5796. @end deffn
  5797. string-fill!
  5798. @c snarfed from srfi-13.c:931
  5799. @deffn {Scheme Procedure} string-fill! str chr [start [end]]
  5800. @deffnx {C Function} scm_substring_fill_x (str, chr, start, end)
  5801. Stores @var{chr} in every element of the given @var{str} and
  5802. returns an unspecified value.
  5803. @end deffn
  5804. string-compare
  5805. @c snarfed from srfi-13.c:983
  5806. @deffn {Scheme Procedure} string-compare s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
  5807. @deffnx {C Function} scm_string_compare (s1, s2, proc_lt, proc_eq, proc_gt, start1, end1, start2, end2)
  5808. Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
  5809. mismatch index, depending upon whether @var{s1} is less than,
  5810. equal to, or greater than @var{s2}. The mismatch index is the
  5811. largest index @var{i} such that for every 0 <= @var{j} <
  5812. @var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
  5813. @var{i} is the first position that does not match.
  5814. @end deffn
  5815. string-compare-ci
  5816. @c snarfed from srfi-13.c:1037
  5817. @deffn {Scheme Procedure} string-compare-ci s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
  5818. @deffnx {C Function} scm_string_compare_ci (s1, s2, proc_lt, proc_eq, proc_gt, start1, end1, start2, end2)
  5819. Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
  5820. mismatch index, depending upon whether @var{s1} is less than,
  5821. equal to, or greater than @var{s2}. The mismatch index is the
  5822. largest index @var{i} such that for every 0 <= @var{j} <
  5823. @var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
  5824. @var{i} is the first position where the lowercased letters
  5825. do not match.
  5826. @end deffn
  5827. string=
  5828. @c snarfed from srfi-13.c:1088
  5829. @deffn {Scheme Procedure} string= s1 s2 [start1 [end1 [start2 [end2]]]]
  5830. @deffnx {C Function} scm_string_eq (s1, s2, start1, end1, start2, end2)
  5831. Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
  5832. value otherwise.
  5833. @end deffn
  5834. string<>
  5835. @c snarfed from srfi-13.c:1127
  5836. @deffn {Scheme Procedure} string<> s1 s2 [start1 [end1 [start2 [end2]]]]
  5837. @deffnx {C Function} scm_string_neq (s1, s2, start1, end1, start2, end2)
  5838. Return @code{#f} if @var{s1} and @var{s2} are equal, a true
  5839. value otherwise.
  5840. @end deffn
  5841. string<
  5842. @c snarfed from srfi-13.c:1170
  5843. @deffn {Scheme Procedure} string< s1 s2 [start1 [end1 [start2 [end2]]]]
  5844. @deffnx {C Function} scm_string_lt (s1, s2, start1, end1, start2, end2)
  5845. Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
  5846. true value otherwise.
  5847. @end deffn
  5848. string>
  5849. @c snarfed from srfi-13.c:1213
  5850. @deffn {Scheme Procedure} string> s1 s2 [start1 [end1 [start2 [end2]]]]
  5851. @deffnx {C Function} scm_string_gt (s1, s2, start1, end1, start2, end2)
  5852. Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
  5853. true value otherwise.
  5854. @end deffn
  5855. string<=
  5856. @c snarfed from srfi-13.c:1256
  5857. @deffn {Scheme Procedure} string<= s1 s2 [start1 [end1 [start2 [end2]]]]
  5858. @deffnx {C Function} scm_string_le (s1, s2, start1, end1, start2, end2)
  5859. Return @code{#f} if @var{s1} is greater to @var{s2}, a true
  5860. value otherwise.
  5861. @end deffn
  5862. string>=
  5863. @c snarfed from srfi-13.c:1299
  5864. @deffn {Scheme Procedure} string>= s1 s2 [start1 [end1 [start2 [end2]]]]
  5865. @deffnx {C Function} scm_string_ge (s1, s2, start1, end1, start2, end2)
  5866. Return @code{#f} if @var{s1} is less to @var{s2}, a true value
  5867. otherwise.
  5868. @end deffn
  5869. string-ci=
  5870. @c snarfed from srfi-13.c:1343
  5871. @deffn {Scheme Procedure} string-ci= s1 s2 [start1 [end1 [start2 [end2]]]]
  5872. @deffnx {C Function} scm_string_ci_eq (s1, s2, start1, end1, start2, end2)
  5873. Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
  5874. value otherwise. The character comparison is done
  5875. case-insensitively.
  5876. @end deffn
  5877. string-ci<>
  5878. @c snarfed from srfi-13.c:1387
  5879. @deffn {Scheme Procedure} string-ci<> s1 s2 [start1 [end1 [start2 [end2]]]]
  5880. @deffnx {C Function} scm_string_ci_neq (s1, s2, start1, end1, start2, end2)
  5881. Return @code{#f} if @var{s1} and @var{s2} are equal, a true
  5882. value otherwise. The character comparison is done
  5883. case-insensitively.
  5884. @end deffn
  5885. string-ci<
  5886. @c snarfed from srfi-13.c:1431
  5887. @deffn {Scheme Procedure} string-ci< s1 s2 [start1 [end1 [start2 [end2]]]]
  5888. @deffnx {C Function} scm_string_ci_lt (s1, s2, start1, end1, start2, end2)
  5889. Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
  5890. true value otherwise. The character comparison is done
  5891. case-insensitively.
  5892. @end deffn
  5893. string-ci>
  5894. @c snarfed from srfi-13.c:1475
  5895. @deffn {Scheme Procedure} string-ci> s1 s2 [start1 [end1 [start2 [end2]]]]
  5896. @deffnx {C Function} scm_string_ci_gt (s1, s2, start1, end1, start2, end2)
  5897. Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
  5898. true value otherwise. The character comparison is done
  5899. case-insensitively.
  5900. @end deffn
  5901. string-ci<=
  5902. @c snarfed from srfi-13.c:1519
  5903. @deffn {Scheme Procedure} string-ci<= s1 s2 [start1 [end1 [start2 [end2]]]]
  5904. @deffnx {C Function} scm_string_ci_le (s1, s2, start1, end1, start2, end2)
  5905. Return @code{#f} if @var{s1} is greater to @var{s2}, a true
  5906. value otherwise. The character comparison is done
  5907. case-insensitively.
  5908. @end deffn
  5909. string-ci>=
  5910. @c snarfed from srfi-13.c:1563
  5911. @deffn {Scheme Procedure} string-ci>= s1 s2 [start1 [end1 [start2 [end2]]]]
  5912. @deffnx {C Function} scm_string_ci_ge (s1, s2, start1, end1, start2, end2)
  5913. Return @code{#f} if @var{s1} is less to @var{s2}, a true value
  5914. otherwise. The character comparison is done
  5915. case-insensitively.
  5916. @end deffn
  5917. string-hash
  5918. @c snarfed from srfi-13.c:1608
  5919. @deffn {Scheme Procedure} string-hash s [bound [start [end]]]
  5920. @deffnx {C Function} scm_substring_hash (s, bound, start, end)
  5921. 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).
  5922. @end deffn
  5923. string-hash-ci
  5924. @c snarfed from srfi-13.c:1625
  5925. @deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
  5926. @deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
  5927. 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).
  5928. @end deffn
  5929. string-prefix-length
  5930. @c snarfed from srfi-13.c:1637
  5931. @deffn {Scheme Procedure} string-prefix-length s1 s2 [start1 [end1 [start2 [end2]]]]
  5932. @deffnx {C Function} scm_string_prefix_length (s1, s2, start1, end1, start2, end2)
  5933. Return the length of the longest common prefix of the two
  5934. strings.
  5935. @end deffn
  5936. string-prefix-length-ci
  5937. @c snarfed from srfi-13.c:1669
  5938. @deffn {Scheme Procedure} string-prefix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
  5939. @deffnx {C Function} scm_string_prefix_length_ci (s1, s2, start1, end1, start2, end2)
  5940. Return the length of the longest common prefix of the two
  5941. strings, ignoring character case.
  5942. @end deffn
  5943. string-suffix-length
  5944. @c snarfed from srfi-13.c:1701
  5945. @deffn {Scheme Procedure} string-suffix-length s1 s2 [start1 [end1 [start2 [end2]]]]
  5946. @deffnx {C Function} scm_string_suffix_length (s1, s2, start1, end1, start2, end2)
  5947. Return the length of the longest common suffix of the two
  5948. strings.
  5949. @end deffn
  5950. string-suffix-length-ci
  5951. @c snarfed from srfi-13.c:1733
  5952. @deffn {Scheme Procedure} string-suffix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
  5953. @deffnx {C Function} scm_string_suffix_length_ci (s1, s2, start1, end1, start2, end2)
  5954. Return the length of the longest common suffix of the two
  5955. strings, ignoring character case.
  5956. @end deffn
  5957. string-prefix?
  5958. @c snarfed from srfi-13.c:1764
  5959. @deffn {Scheme Procedure} string-prefix? s1 s2 [start1 [end1 [start2 [end2]]]]
  5960. @deffnx {C Function} scm_string_prefix_p (s1, s2, start1, end1, start2, end2)
  5961. Is @var{s1} a prefix of @var{s2}?
  5962. @end deffn
  5963. string-prefix-ci?
  5964. @c snarfed from srfi-13.c:1796
  5965. @deffn {Scheme Procedure} string-prefix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
  5966. @deffnx {C Function} scm_string_prefix_ci_p (s1, s2, start1, end1, start2, end2)
  5967. Is @var{s1} a prefix of @var{s2}, ignoring character case?
  5968. @end deffn
  5969. string-suffix?
  5970. @c snarfed from srfi-13.c:1828
  5971. @deffn {Scheme Procedure} string-suffix? s1 s2 [start1 [end1 [start2 [end2]]]]
  5972. @deffnx {C Function} scm_string_suffix_p (s1, s2, start1, end1, start2, end2)
  5973. Is @var{s1} a suffix of @var{s2}?
  5974. @end deffn
  5975. string-suffix-ci?
  5976. @c snarfed from srfi-13.c:1860
  5977. @deffn {Scheme Procedure} string-suffix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
  5978. @deffnx {C Function} scm_string_suffix_ci_p (s1, s2, start1, end1, start2, end2)
  5979. Is @var{s1} a suffix of @var{s2}, ignoring character case?
  5980. @end deffn
  5981. string-index
  5982. @c snarfed from srfi-13.c:1904
  5983. @deffn {Scheme Procedure} string-index s char_pred [start [end]]
  5984. @deffnx {C Function} scm_string_index (s, char_pred, start, end)
  5985. Search through the string @var{s} from left to right, returning
  5986. the index of the first occurence of a character which
  5987. @itemize @bullet
  5988. @item
  5989. equals @var{char_pred}, if it is character,
  5990. @item
  5991. satisifies the predicate @var{char_pred}, if it is a procedure,
  5992. @item
  5993. is in the set @var{char_pred}, if it is a character set.
  5994. @end itemize
  5995. @end deffn
  5996. string-index-right
  5997. @c snarfed from srfi-13.c:1969
  5998. @deffn {Scheme Procedure} string-index-right s char_pred [start [end]]
  5999. @deffnx {C Function} scm_string_index_right (s, char_pred, start, end)
  6000. Search through the string @var{s} from right to left, returning
  6001. the index of the last occurence of a character which
  6002. @itemize @bullet
  6003. @item
  6004. equals @var{char_pred}, if it is character,
  6005. @item
  6006. satisifies the predicate @var{char_pred}, if it is a procedure,
  6007. @item
  6008. is in the set if @var{char_pred} is a character set.
  6009. @end itemize
  6010. @end deffn
  6011. string-rindex
  6012. @c snarfed from srfi-13.c:2034
  6013. @deffn {Scheme Procedure} string-rindex s char_pred [start [end]]
  6014. @deffnx {C Function} scm_string_rindex (s, char_pred, start, end)
  6015. Search through the string @var{s} from right to left, returning
  6016. the index of the last occurence of a character which
  6017. @itemize @bullet
  6018. @item
  6019. equals @var{char_pred}, if it is character,
  6020. @item
  6021. satisifies the predicate @var{char_pred}, if it is a procedure,
  6022. @item
  6023. is in the set if @var{char_pred} is a character set.
  6024. @end itemize
  6025. @end deffn
  6026. string-skip
  6027. @c snarfed from srfi-13.c:2056
  6028. @deffn {Scheme Procedure} string-skip s char_pred [start [end]]
  6029. @deffnx {C Function} scm_string_skip (s, char_pred, start, end)
  6030. Search through the string @var{s} from left to right, returning
  6031. the index of the first occurence of a character which
  6032. @itemize @bullet
  6033. @item
  6034. does not equal @var{char_pred}, if it is character,
  6035. @item
  6036. does not satisify the predicate @var{char_pred}, if it is a
  6037. procedure,
  6038. @item
  6039. is not in the set if @var{char_pred} is a character set.
  6040. @end itemize
  6041. @end deffn
  6042. string-skip-right
  6043. @c snarfed from srfi-13.c:2123
  6044. @deffn {Scheme Procedure} string-skip-right s char_pred [start [end]]
  6045. @deffnx {C Function} scm_string_skip_right (s, char_pred, start, end)
  6046. Search through the string @var{s} from right to left, returning
  6047. the index of the last 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 satisfy 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-count
  6059. @c snarfed from srfi-13.c:2190
  6060. @deffn {Scheme Procedure} string-count s char_pred [start [end]]
  6061. @deffnx {C Function} scm_string_count (s, char_pred, start, end)
  6062. Return the count of the number of characters in the string
  6063. @var{s} which
  6064. @itemize @bullet
  6065. @item
  6066. equals @var{char_pred}, if it is character,
  6067. @item
  6068. satisifies the predicate @var{char_pred}, if it is a procedure.
  6069. @item
  6070. is in the set @var{char_pred}, if it is a character set.
  6071. @end itemize
  6072. @end deffn
  6073. string-contains
  6074. @c snarfed from srfi-13.c:2247
  6075. @deffn {Scheme Procedure} string-contains s1 s2 [start1 [end1 [start2 [end2]]]]
  6076. @deffnx {C Function} scm_string_contains (s1, s2, start1, end1, start2, end2)
  6077. Does string @var{s1} contain string @var{s2}? Return the index
  6078. in @var{s1} where @var{s2} occurs as a substring, or false.
  6079. The optional start/end indices restrict the operation to the
  6080. indicated substrings.
  6081. @end deffn
  6082. string-contains-ci
  6083. @c snarfed from srfi-13.c:2294
  6084. @deffn {Scheme Procedure} string-contains-ci s1 s2 [start1 [end1 [start2 [end2]]]]
  6085. @deffnx {C Function} scm_string_contains_ci (s1, s2, start1, end1, start2, end2)
  6086. Does string @var{s1} contain string @var{s2}? Return the index
  6087. in @var{s1} where @var{s2} occurs as a substring, or false.
  6088. The optional start/end indices restrict the operation to the
  6089. indicated substrings. Character comparison is done
  6090. case-insensitively.
  6091. @end deffn
  6092. string-upcase!
  6093. @c snarfed from srfi-13.c:2359
  6094. @deffn {Scheme Procedure} string-upcase! str [start [end]]
  6095. @deffnx {C Function} scm_substring_upcase_x (str, start, end)
  6096. Destructively upcase every character in @code{str}.
  6097. @lisp
  6098. (string-upcase! y)
  6099. @result{} "ARRDEFG"
  6100. y
  6101. @result{} "ARRDEFG"
  6102. @end lisp
  6103. @end deffn
  6104. string-upcase
  6105. @c snarfed from srfi-13.c:2380
  6106. @deffn {Scheme Procedure} string-upcase str [start [end]]
  6107. @deffnx {C Function} scm_substring_upcase (str, start, end)
  6108. Upcase every character in @code{str}.
  6109. @end deffn
  6110. string-downcase!
  6111. @c snarfed from srfi-13.c:2427
  6112. @deffn {Scheme Procedure} string-downcase! str [start [end]]
  6113. @deffnx {C Function} scm_substring_downcase_x (str, start, end)
  6114. Destructively downcase every character in @var{str}.
  6115. @lisp
  6116. y
  6117. @result{} "ARRDEFG"
  6118. (string-downcase! y)
  6119. @result{} "arrdefg"
  6120. y
  6121. @result{} "arrdefg"
  6122. @end lisp
  6123. @end deffn
  6124. string-downcase
  6125. @c snarfed from srfi-13.c:2448
  6126. @deffn {Scheme Procedure} string-downcase str [start [end]]
  6127. @deffnx {C Function} scm_substring_downcase (str, start, end)
  6128. Downcase every character in @var{str}.
  6129. @end deffn
  6130. string-titlecase!
  6131. @c snarfed from srfi-13.c:2504
  6132. @deffn {Scheme Procedure} string-titlecase! str [start [end]]
  6133. @deffnx {C Function} scm_string_titlecase_x (str, start, end)
  6134. Destructively titlecase every first character in a word in
  6135. @var{str}.
  6136. @end deffn
  6137. string-titlecase
  6138. @c snarfed from srfi-13.c:2520
  6139. @deffn {Scheme Procedure} string-titlecase str [start [end]]
  6140. @deffnx {C Function} scm_string_titlecase (str, start, end)
  6141. Titlecase every first character in a word in @var{str}.
  6142. @end deffn
  6143. string-capitalize!
  6144. @c snarfed from srfi-13.c:2542
  6145. @deffn {Scheme Procedure} string-capitalize! str
  6146. @deffnx {C Function} scm_string_capitalize_x (str)
  6147. Upcase the first character of every word in @var{str}
  6148. destructively and return @var{str}.
  6149. @lisp
  6150. y @result{} "hello world"
  6151. (string-capitalize! y) @result{} "Hello World"
  6152. y @result{} "Hello World"
  6153. @end lisp
  6154. @end deffn
  6155. string-capitalize
  6156. @c snarfed from srfi-13.c:2554
  6157. @deffn {Scheme Procedure} string-capitalize str
  6158. @deffnx {C Function} scm_string_capitalize (str)
  6159. Return a freshly allocated string with the characters in
  6160. @var{str}, where the first character of every word is
  6161. capitalized.
  6162. @end deffn
  6163. string-reverse
  6164. @c snarfed from srfi-13.c:2588
  6165. @deffn {Scheme Procedure} string-reverse str [start [end]]
  6166. @deffnx {C Function} scm_string_reverse (str, start, end)
  6167. Reverse the string @var{str}. The optional arguments
  6168. @var{start} and @var{end} delimit the region of @var{str} to
  6169. operate on.
  6170. @end deffn
  6171. string-reverse!
  6172. @c snarfed from srfi-13.c:2613
  6173. @deffn {Scheme Procedure} string-reverse! str [start [end]]
  6174. @deffnx {C Function} scm_string_reverse_x (str, start, end)
  6175. Reverse the string @var{str} in-place. The optional arguments
  6176. @var{start} and @var{end} delimit the region of @var{str} to
  6177. operate on. The return value is unspecified.
  6178. @end deffn
  6179. string-append/shared
  6180. @c snarfed from srfi-13.c:2635
  6181. @deffn {Scheme Procedure} string-append/shared . rest
  6182. @deffnx {C Function} scm_string_append_shared (rest)
  6183. Like @code{string-append}, but the result may share memory
  6184. with the argument strings.
  6185. @end deffn
  6186. string-concatenate
  6187. @c snarfed from srfi-13.c:2656
  6188. @deffn {Scheme Procedure} string-concatenate ls
  6189. @deffnx {C Function} scm_string_concatenate (ls)
  6190. Append the elements of @var{ls} (which must be strings)
  6191. together into a single string. Guaranteed to return a freshly
  6192. allocated string.
  6193. @end deffn
  6194. string-concatenate-reverse
  6195. @c snarfed from srfi-13.c:2678
  6196. @deffn {Scheme Procedure} string-concatenate-reverse ls [final_string [end]]
  6197. @deffnx {C Function} scm_string_concatenate_reverse (ls, final_string, end)
  6198. Without optional arguments, this procedure is equivalent to
  6199. @smalllisp
  6200. (string-concatenate (reverse ls))
  6201. @end smalllisp
  6202. If the optional argument @var{final_string} is specified, it is
  6203. consed onto the beginning to @var{ls} before performing the
  6204. list-reverse and string-concatenate operations. If @var{end}
  6205. is given, only the characters of @var{final_string} up to index
  6206. @var{end} are used.
  6207. Guaranteed to return a freshly allocated string.
  6208. @end deffn
  6209. string-concatenate/shared
  6210. @c snarfed from srfi-13.c:2695
  6211. @deffn {Scheme Procedure} string-concatenate/shared ls
  6212. @deffnx {C Function} scm_string_concatenate_shared (ls)
  6213. Like @code{string-concatenate}, but the result may share memory
  6214. with the strings in the list @var{ls}.
  6215. @end deffn
  6216. string-concatenate-reverse/shared
  6217. @c snarfed from srfi-13.c:2706
  6218. @deffn {Scheme Procedure} string-concatenate-reverse/shared ls [final_string [end]]
  6219. @deffnx {C Function} scm_string_concatenate_reverse_shared (ls, final_string, end)
  6220. Like @code{string-concatenate-reverse}, but the result may
  6221. share memory with the strings in the @var{ls} arguments.
  6222. @end deffn
  6223. string-map
  6224. @c snarfed from srfi-13.c:2719
  6225. @deffn {Scheme Procedure} string-map proc s [start [end]]
  6226. @deffnx {C Function} scm_string_map (proc, s, start, end)
  6227. @var{proc} is a char->char procedure, it is mapped over
  6228. @var{s}. The order in which the procedure is applied to the
  6229. string elements is not specified.
  6230. @end deffn
  6231. string-map!
  6232. @c snarfed from srfi-13.c:2749
  6233. @deffn {Scheme Procedure} string-map! proc s [start [end]]
  6234. @deffnx {C Function} scm_string_map_x (proc, s, start, end)
  6235. @var{proc} is a char->char procedure, it is mapped over
  6236. @var{s}. The order in which the procedure is applied to the
  6237. string elements is not specified. The string @var{s} is
  6238. modified in-place, the return value is not specified.
  6239. @end deffn
  6240. string-fold
  6241. @c snarfed from srfi-13.c:2776
  6242. @deffn {Scheme Procedure} string-fold kons knil s [start [end]]
  6243. @deffnx {C Function} scm_string_fold (kons, knil, s, start, end)
  6244. Fold @var{kons} over the characters of @var{s}, with @var{knil}
  6245. as the terminating element, from left to right. @var{kons}
  6246. must expect two arguments: The actual character and the last
  6247. result of @var{kons}' application.
  6248. @end deffn
  6249. string-fold-right
  6250. @c snarfed from srfi-13.c:2807
  6251. @deffn {Scheme Procedure} string-fold-right kons knil s [start [end]]
  6252. @deffnx {C Function} scm_string_fold_right (kons, knil, s, start, end)
  6253. Fold @var{kons} over the characters of @var{s}, with @var{knil}
  6254. as the terminating element, from right to left. @var{kons}
  6255. must expect two arguments: The actual character and the last
  6256. result of @var{kons}' application.
  6257. @end deffn
  6258. string-unfold
  6259. @c snarfed from srfi-13.c:2852
  6260. @deffn {Scheme Procedure} string-unfold p f g seed [base [make_final]]
  6261. @deffnx {C Function} scm_string_unfold (p, f, g, seed, base, make_final)
  6262. @itemize @bullet
  6263. @item @var{g} is used to generate a series of @emph{seed}
  6264. values from the initial @var{seed}: @var{seed}, (@var{g}
  6265. @var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
  6266. @dots{}
  6267. @item @var{p} tells us when to stop -- when it returns true
  6268. when applied to one of these seed values.
  6269. @item @var{f} maps each seed value to the corresponding
  6270. character in the result string. These chars are assembled
  6271. into the string in a left-to-right order.
  6272. @item @var{base} is the optional initial/leftmost portion
  6273. of the constructed string; it default to the empty
  6274. string.
  6275. @item @var{make_final} is applied to the terminal seed
  6276. value (on which @var{p} returns true) to produce
  6277. the final/rightmost portion of the constructed string.
  6278. It defaults to @code{(lambda (x) )}.
  6279. @end itemize
  6280. @end deffn
  6281. string-unfold-right
  6282. @c snarfed from srfi-13.c:2915
  6283. @deffn {Scheme Procedure} string-unfold-right p f g seed [base [make_final]]
  6284. @deffnx {C Function} scm_string_unfold_right (p, f, g, seed, base, make_final)
  6285. @itemize @bullet
  6286. @item @var{g} is used to generate a series of @emph{seed}
  6287. values from the initial @var{seed}: @var{seed}, (@var{g}
  6288. @var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
  6289. @dots{}
  6290. @item @var{p} tells us when to stop -- when it returns true
  6291. when applied to one of these seed values.
  6292. @item @var{f} maps each seed value to the corresponding
  6293. character in the result string. These chars are assembled
  6294. into the string in a right-to-left order.
  6295. @item @var{base} is the optional initial/rightmost portion
  6296. of the constructed string; it default to the empty
  6297. string.
  6298. @item @var{make_final} is applied to the terminal seed
  6299. value (on which @var{p} returns true) to produce
  6300. the final/leftmost portion of the constructed string.
  6301. It defaults to @code{(lambda (x) )}.
  6302. @end itemize
  6303. @end deffn
  6304. string-for-each
  6305. @c snarfed from srfi-13.c:2962
  6306. @deffn {Scheme Procedure} string-for-each proc s [start [end]]
  6307. @deffnx {C Function} scm_string_for_each (proc, s, start, end)
  6308. @var{proc} is mapped over @var{s} in left-to-right order. The
  6309. return value is not specified.
  6310. @end deffn
  6311. string-for-each-index
  6312. @c snarfed from srfi-13.c:2988
  6313. @deffn {Scheme Procedure} string-for-each-index proc s [start [end]]
  6314. @deffnx {C Function} scm_string_for_each_index (proc, s, start, end)
  6315. @var{proc} is mapped over @var{s} in left-to-right order. The
  6316. return value is not specified.
  6317. @end deffn
  6318. xsubstring
  6319. @c snarfed from srfi-13.c:3020
  6320. @deffn {Scheme Procedure} xsubstring s from [to [start [end]]]
  6321. @deffnx {C Function} scm_xsubstring (s, from, to, start, end)
  6322. This is the @emph{extended substring} procedure that implements
  6323. replicated copying of a substring of some string.
  6324. @var{s} is a string, @var{start} and @var{end} are optional
  6325. arguments that demarcate a substring of @var{s}, defaulting to
  6326. 0 and the length of @var{s}. Replicate this substring up and
  6327. down index space, in both the positive and negative directions.
  6328. @code{xsubstring} returns the substring of this string
  6329. beginning at index @var{from}, and ending at @var{to}, which
  6330. defaults to @var{from} + (@var{end} - @var{start}).
  6331. @end deffn
  6332. string-xcopy!
  6333. @c snarfed from srfi-13.c:3067
  6334. @deffn {Scheme Procedure} string-xcopy! target tstart s sfrom [sto [start [end]]]
  6335. @deffnx {C Function} scm_string_xcopy_x (target, tstart, s, sfrom, sto, start, end)
  6336. Exactly the same as @code{xsubstring}, but the extracted text
  6337. is written into the string @var{target} starting at index
  6338. @var{tstart}. The operation is not defined if @code{(eq?
  6339. @var{target} @var{s})} or these arguments share storage -- you
  6340. cannot copy a string on top of itself.
  6341. @end deffn
  6342. string-replace
  6343. @c snarfed from srfi-13.c:3117
  6344. @deffn {Scheme Procedure} string-replace s1 s2 [start1 [end1 [start2 [end2]]]]
  6345. @deffnx {C Function} scm_string_replace (s1, s2, start1, end1, start2, end2)
  6346. Return the string @var{s1}, but with the characters
  6347. @var{start1} @dots{} @var{end1} replaced by the characters
  6348. @var{start2} @dots{} @var{end2} from @var{s2}.
  6349. @end deffn
  6350. string-tokenize
  6351. @c snarfed from srfi-13.c:3154
  6352. @deffn {Scheme Procedure} string-tokenize s [token_set [start [end]]]
  6353. @deffnx {C Function} scm_string_tokenize (s, token_set, start, end)
  6354. Split the string @var{s} into a list of substrings, where each
  6355. substring is a maximal non-empty contiguous sequence of
  6356. characters from the character set @var{token_set}, which
  6357. defaults to @code{char-set:graphic}.
  6358. If @var{start} or @var{end} indices are provided, they restrict
  6359. @code{string-tokenize} to operating on the indicated substring
  6360. of @var{s}.
  6361. @end deffn
  6362. string-split
  6363. @c snarfed from srfi-13.c:3220
  6364. @deffn {Scheme Procedure} string-split str chr
  6365. @deffnx {C Function} scm_string_split (str, chr)
  6366. Split the string @var{str} into the a list of the substrings delimited
  6367. by appearances of the character @var{chr}. Note that an empty substring
  6368. between separator characters will result in an empty string in the
  6369. result list.
  6370. @lisp
  6371. (string-split "root:x:0:0:root:/root:/bin/bash" #\:)
  6372. @result{}
  6373. ("root" "x" "0" "0" "root" "/root" "/bin/bash")
  6374. (string-split "::" #\:)
  6375. @result{}
  6376. ("" "" "")
  6377. (string-split "" #\:)
  6378. @result{}
  6379. ("")
  6380. @end lisp
  6381. @end deffn
  6382. string-filter
  6383. @c snarfed from srfi-13.c:3258
  6384. @deffn {Scheme Procedure} string-filter s char_pred [start [end]]
  6385. @deffnx {C Function} scm_string_filter (s, char_pred, start, end)
  6386. Filter the string @var{s}, retaining only those characters that
  6387. satisfy the @var{char_pred} argument. If the argument is a
  6388. procedure, it is applied to each character as a predicate, if
  6389. it is a character, it is tested for equality and if it is a
  6390. character set, it is tested for membership.
  6391. @end deffn
  6392. string-delete
  6393. @c snarfed from srfi-13.c:3330
  6394. @deffn {Scheme Procedure} string-delete s char_pred [start [end]]
  6395. @deffnx {C Function} scm_string_delete (s, char_pred, start, end)
  6396. Filter the string @var{s}, retaining only those characters that
  6397. do not satisfy the @var{char_pred} argument. If the argument
  6398. is a procedure, it is applied to each character as a predicate,
  6399. if it is a character, it is tested for equality and if it is a
  6400. character set, it is tested for membership.
  6401. @end deffn
  6402. char-set?
  6403. @c snarfed from srfi-14.c:85
  6404. @deffn {Scheme Procedure} char-set? obj
  6405. @deffnx {C Function} scm_char_set_p (obj)
  6406. Return @code{#t} if @var{obj} is a character set, @code{#f}
  6407. otherwise.
  6408. @end deffn
  6409. char-set=
  6410. @c snarfed from srfi-14.c:95
  6411. @deffn {Scheme Procedure} char-set= . char_sets
  6412. @deffnx {C Function} scm_char_set_eq (char_sets)
  6413. Return @code{#t} if all given character sets are equal.
  6414. @end deffn
  6415. char-set<=
  6416. @c snarfed from srfi-14.c:125
  6417. @deffn {Scheme Procedure} char-set<= . char_sets
  6418. @deffnx {C Function} scm_char_set_leq (char_sets)
  6419. Return @code{#t} if every character set @var{cs}i is a subset
  6420. of character set @var{cs}i+1.
  6421. @end deffn
  6422. char-set-hash
  6423. @c snarfed from srfi-14.c:163
  6424. @deffn {Scheme Procedure} char-set-hash cs [bound]
  6425. @deffnx {C Function} scm_char_set_hash (cs, bound)
  6426. Compute a hash value for the character set @var{cs}. If
  6427. @var{bound} is given and non-zero, it restricts the
  6428. returned value to the range 0 @dots{} @var{bound - 1}.
  6429. @end deffn
  6430. char-set-cursor
  6431. @c snarfed from srfi-14.c:196
  6432. @deffn {Scheme Procedure} char-set-cursor cs
  6433. @deffnx {C Function} scm_char_set_cursor (cs)
  6434. Return a cursor into the character set @var{cs}.
  6435. @end deffn
  6436. char-set-ref
  6437. @c snarfed from srfi-14.c:216
  6438. @deffn {Scheme Procedure} char-set-ref cs cursor
  6439. @deffnx {C Function} scm_char_set_ref (cs, cursor)
  6440. Return the character at the current cursor position
  6441. @var{cursor} in the character set @var{cs}. It is an error to
  6442. pass a cursor for which @code{end-of-char-set?} returns true.
  6443. @end deffn
  6444. char-set-cursor-next
  6445. @c snarfed from srfi-14.c:233
  6446. @deffn {Scheme Procedure} char-set-cursor-next cs cursor
  6447. @deffnx {C Function} scm_char_set_cursor_next (cs, cursor)
  6448. Advance the character set cursor @var{cursor} to the next
  6449. character in the character set @var{cs}. It is an error if the
  6450. cursor given satisfies @code{end-of-char-set?}.
  6451. @end deffn
  6452. end-of-char-set?
  6453. @c snarfed from srfi-14.c:254
  6454. @deffn {Scheme Procedure} end-of-char-set? cursor
  6455. @deffnx {C Function} scm_end_of_char_set_p (cursor)
  6456. Return @code{#t} if @var{cursor} has reached the end of a
  6457. character set, @code{#f} otherwise.
  6458. @end deffn
  6459. char-set-fold
  6460. @c snarfed from srfi-14.c:266
  6461. @deffn {Scheme Procedure} char-set-fold kons knil cs
  6462. @deffnx {C Function} scm_char_set_fold (kons, knil, cs)
  6463. Fold the procedure @var{kons} over the character set @var{cs},
  6464. initializing it with @var{knil}.
  6465. @end deffn
  6466. char-set-unfold
  6467. @c snarfed from srfi-14.c:296
  6468. @deffn {Scheme Procedure} char-set-unfold p f g seed [base_cs]
  6469. @deffnx {C Function} scm_char_set_unfold (p, f, g, seed, base_cs)
  6470. This is a fundamental constructor for character sets.
  6471. @itemize @bullet
  6472. @item @var{g} is used to generate a series of ``seed'' values
  6473. from the initial seed: @var{seed}, (@var{g} @var{seed}),
  6474. (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
  6475. @item @var{p} tells us when to stop -- when it returns true
  6476. when applied to one of the seed values.
  6477. @item @var{f} maps each seed value to a character. These
  6478. characters are added to the base character set @var{base_cs} to
  6479. form the result; @var{base_cs} defaults to the empty set.
  6480. @end itemize
  6481. @end deffn
  6482. char-set-unfold!
  6483. @c snarfed from srfi-14.c:340
  6484. @deffn {Scheme Procedure} char-set-unfold! p f g seed base_cs
  6485. @deffnx {C Function} scm_char_set_unfold_x (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-for-each
  6499. @c snarfed from srfi-14.c:369
  6500. @deffn {Scheme Procedure} char-set-for-each proc cs
  6501. @deffnx {C Function} scm_char_set_for_each (proc, cs)
  6502. Apply @var{proc} to every character in the character set
  6503. @var{cs}. The return value is not specified.
  6504. @end deffn
  6505. char-set-map
  6506. @c snarfed from srfi-14.c:388
  6507. @deffn {Scheme Procedure} char-set-map proc cs
  6508. @deffnx {C Function} scm_char_set_map (proc, cs)
  6509. Map the procedure @var{proc} over every character in @var{cs}.
  6510. @var{proc} must be a character -> character procedure.
  6511. @end deffn
  6512. char-set-copy
  6513. @c snarfed from srfi-14.c:414
  6514. @deffn {Scheme Procedure} char-set-copy cs
  6515. @deffnx {C Function} scm_char_set_copy (cs)
  6516. Return a newly allocated character set containing all
  6517. characters in @var{cs}.
  6518. @end deffn
  6519. char-set
  6520. @c snarfed from srfi-14.c:434
  6521. @deffn {Scheme Procedure} char-set . rest
  6522. @deffnx {C Function} scm_char_set (rest)
  6523. Return a character set containing all given characters.
  6524. @end deffn
  6525. list->char-set
  6526. @c snarfed from srfi-14.c:462
  6527. @deffn {Scheme Procedure} list->char-set list [base_cs]
  6528. @deffnx {C Function} scm_list_to_char_set (list, base_cs)
  6529. Convert the character list @var{list} to a character set. If
  6530. the character set @var{base_cs} is given, the character in this
  6531. set are also included in the result.
  6532. @end deffn
  6533. list->char-set!
  6534. @c snarfed from srfi-14.c:496
  6535. @deffn {Scheme Procedure} list->char-set! list base_cs
  6536. @deffnx {C Function} scm_list_to_char_set_x (list, base_cs)
  6537. Convert the character list @var{list} to a character set. The
  6538. characters are added to @var{base_cs} and @var{base_cs} is
  6539. returned.
  6540. @end deffn
  6541. string->char-set
  6542. @c snarfed from srfi-14.c:523
  6543. @deffn {Scheme Procedure} string->char-set str [base_cs]
  6544. @deffnx {C Function} scm_string_to_char_set (str, base_cs)
  6545. Convert the string @var{str} to a character set. If the
  6546. character set @var{base_cs} is given, the characters in this
  6547. set are also included in the result.
  6548. @end deffn
  6549. string->char-set!
  6550. @c snarfed from srfi-14.c:557
  6551. @deffn {Scheme Procedure} string->char-set! str base_cs
  6552. @deffnx {C Function} scm_string_to_char_set_x (str, base_cs)
  6553. Convert the string @var{str} to a character set. The
  6554. characters from the string are added to @var{base_cs}, and
  6555. @var{base_cs} is returned.
  6556. @end deffn
  6557. char-set-filter
  6558. @c snarfed from srfi-14.c:584
  6559. @deffn {Scheme Procedure} char-set-filter pred cs [base_cs]
  6560. @deffnx {C Function} scm_char_set_filter (pred, cs, base_cs)
  6561. Return a character set containing every character from @var{cs}
  6562. so that it satisfies @var{pred}. If provided, the characters
  6563. from @var{base_cs} are added to the result.
  6564. @end deffn
  6565. char-set-filter!
  6566. @c snarfed from srfi-14.c:620
  6567. @deffn {Scheme Procedure} char-set-filter! pred cs base_cs
  6568. @deffnx {C Function} scm_char_set_filter_x (pred, cs, base_cs)
  6569. Return a character set containing every character from @var{cs}
  6570. so that it satisfies @var{pred}. The characters are added to
  6571. @var{base_cs} and @var{base_cs} is returned.
  6572. @end deffn
  6573. ucs-range->char-set
  6574. @c snarfed from srfi-14.c:658
  6575. @deffn {Scheme Procedure} ucs-range->char-set lower upper [error [base_cs]]
  6576. @deffnx {C Function} scm_ucs_range_to_char_set (lower, upper, error, base_cs)
  6577. Return a character set containing all characters whose
  6578. character codes lie in the half-open range
  6579. [@var{lower},@var{upper}).
  6580. If @var{error} is a true value, an error is signalled if the
  6581. specified range contains characters which are not contained in
  6582. the implemented character range. If @var{error} is @code{#f},
  6583. these characters are silently left out of the resultung
  6584. character set.
  6585. The characters in @var{base_cs} are added to the result, if
  6586. given.
  6587. @end deffn
  6588. ucs-range->char-set!
  6589. @c snarfed from srfi-14.c:711
  6590. @deffn {Scheme Procedure} ucs-range->char-set! lower upper error base_cs
  6591. @deffnx {C Function} scm_ucs_range_to_char_set_x (lower, upper, error, base_cs)
  6592. Return a character set containing all characters whose
  6593. character codes lie in the half-open range
  6594. [@var{lower},@var{upper}).
  6595. If @var{error} is a true value, an error is signalled if the
  6596. specified range contains characters which are not contained in
  6597. the implemented character range. If @var{error} is @code{#f},
  6598. these characters are silently left out of the resultung
  6599. character set.
  6600. The characters are added to @var{base_cs} and @var{base_cs} is
  6601. returned.
  6602. @end deffn
  6603. ->char-set
  6604. @c snarfed from srfi-14.c:741
  6605. @deffn {Scheme Procedure} ->char-set x
  6606. @deffnx {C Function} scm_to_char_set (x)
  6607. 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.
  6608. @end deffn
  6609. char-set-size
  6610. @c snarfed from srfi-14.c:757
  6611. @deffn {Scheme Procedure} char-set-size cs
  6612. @deffnx {C Function} scm_char_set_size (cs)
  6613. Return the number of elements in character set @var{cs}.
  6614. @end deffn
  6615. char-set-count
  6616. @c snarfed from srfi-14.c:774
  6617. @deffn {Scheme Procedure} char-set-count pred cs
  6618. @deffnx {C Function} scm_char_set_count (pred, cs)
  6619. Return the number of the elements int the character set
  6620. @var{cs} which satisfy the predicate @var{pred}.
  6621. @end deffn
  6622. char-set->list
  6623. @c snarfed from srfi-14.c:797
  6624. @deffn {Scheme Procedure} char-set->list cs
  6625. @deffnx {C Function} scm_char_set_to_list (cs)
  6626. Return a list containing the elements of the character set
  6627. @var{cs}.
  6628. @end deffn
  6629. char-set->string
  6630. @c snarfed from srfi-14.c:816
  6631. @deffn {Scheme Procedure} char-set->string cs
  6632. @deffnx {C Function} scm_char_set_to_string (cs)
  6633. Return a string containing the elements of the character set
  6634. @var{cs}. The order in which the characters are placed in the
  6635. string is not defined.
  6636. @end deffn
  6637. char-set-contains?
  6638. @c snarfed from srfi-14.c:841
  6639. @deffn {Scheme Procedure} char-set-contains? cs ch
  6640. @deffnx {C Function} scm_char_set_contains_p (cs, ch)
  6641. Return @code{#t} iff the character @var{ch} is contained in the
  6642. character set @var{cs}.
  6643. @end deffn
  6644. char-set-every
  6645. @c snarfed from srfi-14.c:854
  6646. @deffn {Scheme Procedure} char-set-every pred cs
  6647. @deffnx {C Function} scm_char_set_every (pred, cs)
  6648. Return a true value if every character in the character set
  6649. @var{cs} satisfies the predicate @var{pred}.
  6650. @end deffn
  6651. char-set-any
  6652. @c snarfed from srfi-14.c:878
  6653. @deffn {Scheme Procedure} char-set-any pred cs
  6654. @deffnx {C Function} scm_char_set_any (pred, cs)
  6655. Return a true value if any character in the character set
  6656. @var{cs} satisfies the predicate @var{pred}.
  6657. @end deffn
  6658. char-set-adjoin
  6659. @c snarfed from srfi-14.c:901
  6660. @deffn {Scheme Procedure} char-set-adjoin cs . rest
  6661. @deffnx {C Function} scm_char_set_adjoin (cs, rest)
  6662. Add all character arguments to the first argument, which must
  6663. be a character set.
  6664. @end deffn
  6665. char-set-delete
  6666. @c snarfed from srfi-14.c:929
  6667. @deffn {Scheme Procedure} char-set-delete cs . rest
  6668. @deffnx {C Function} scm_char_set_delete (cs, rest)
  6669. Delete all character arguments from the first argument, which
  6670. must be a character set.
  6671. @end deffn
  6672. char-set-adjoin!
  6673. @c snarfed from srfi-14.c:957
  6674. @deffn {Scheme Procedure} char-set-adjoin! cs . rest
  6675. @deffnx {C Function} scm_char_set_adjoin_x (cs, rest)
  6676. Add all character arguments to the first argument, which must
  6677. be a character set.
  6678. @end deffn
  6679. char-set-delete!
  6680. @c snarfed from srfi-14.c:984
  6681. @deffn {Scheme Procedure} char-set-delete! cs . rest
  6682. @deffnx {C Function} scm_char_set_delete_x (cs, rest)
  6683. Delete all character arguments from the first argument, which
  6684. must be a character set.
  6685. @end deffn
  6686. char-set-complement
  6687. @c snarfed from srfi-14.c:1010
  6688. @deffn {Scheme Procedure} char-set-complement cs
  6689. @deffnx {C Function} scm_char_set_complement (cs)
  6690. Return the complement of the character set @var{cs}.
  6691. @end deffn
  6692. char-set-union
  6693. @c snarfed from srfi-14.c:1031
  6694. @deffn {Scheme Procedure} char-set-union . rest
  6695. @deffnx {C Function} scm_char_set_union (rest)
  6696. Return the union of all argument character sets.
  6697. @end deffn
  6698. char-set-intersection
  6699. @c snarfed from srfi-14.c:1060
  6700. @deffn {Scheme Procedure} char-set-intersection . rest
  6701. @deffnx {C Function} scm_char_set_intersection (rest)
  6702. Return the intersection of all argument character sets.
  6703. @end deffn
  6704. char-set-difference
  6705. @c snarfed from srfi-14.c:1100
  6706. @deffn {Scheme Procedure} char-set-difference cs1 . rest
  6707. @deffnx {C Function} scm_char_set_difference (cs1, rest)
  6708. Return the difference of all argument character sets.
  6709. @end deffn
  6710. char-set-xor
  6711. @c snarfed from srfi-14.c:1130
  6712. @deffn {Scheme Procedure} char-set-xor . rest
  6713. @deffnx {C Function} scm_char_set_xor (rest)
  6714. Return the exclusive-or of all argument character sets.
  6715. @end deffn
  6716. char-set-diff+intersection
  6717. @c snarfed from srfi-14.c:1171
  6718. @deffn {Scheme Procedure} char-set-diff+intersection cs1 . rest
  6719. @deffnx {C Function} scm_char_set_diff_plus_intersection (cs1, rest)
  6720. Return the difference and the intersection of all argument
  6721. character sets.
  6722. @end deffn
  6723. char-set-complement!
  6724. @c snarfed from srfi-14.c:1209
  6725. @deffn {Scheme Procedure} char-set-complement! cs
  6726. @deffnx {C Function} scm_char_set_complement_x (cs)
  6727. Return the complement of the character set @var{cs}.
  6728. @end deffn
  6729. char-set-union!
  6730. @c snarfed from srfi-14.c:1226
  6731. @deffn {Scheme Procedure} char-set-union! cs1 . rest
  6732. @deffnx {C Function} scm_char_set_union_x (cs1, rest)
  6733. Return the union of all argument character sets.
  6734. @end deffn
  6735. char-set-intersection!
  6736. @c snarfed from srfi-14.c:1254
  6737. @deffn {Scheme Procedure} char-set-intersection! cs1 . rest
  6738. @deffnx {C Function} scm_char_set_intersection_x (cs1, rest)
  6739. Return the intersection of all argument character sets.
  6740. @end deffn
  6741. char-set-difference!
  6742. @c snarfed from srfi-14.c:1282
  6743. @deffn {Scheme Procedure} char-set-difference! cs1 . rest
  6744. @deffnx {C Function} scm_char_set_difference_x (cs1, rest)
  6745. Return the difference of all argument character sets.
  6746. @end deffn
  6747. char-set-xor!
  6748. @c snarfed from srfi-14.c:1310
  6749. @deffn {Scheme Procedure} char-set-xor! cs1 . rest
  6750. @deffnx {C Function} scm_char_set_xor_x (cs1, rest)
  6751. Return the exclusive-or of all argument character sets.
  6752. @end deffn
  6753. char-set-diff+intersection!
  6754. @c snarfed from srfi-14.c:1349
  6755. @deffn {Scheme Procedure} char-set-diff+intersection! cs1 cs2 . rest
  6756. @deffnx {C Function} scm_char_set_diff_plus_intersection_x (cs1, cs2, rest)
  6757. Return the difference and the intersection of all argument
  6758. character sets.
  6759. @end deffn
  6760. string=?
  6761. @c snarfed from strorder.c:50
  6762. @deffn {Scheme Procedure} string=? [s1 [s2 . rest]]
  6763. @deffnx {C Function} scm_i_string_equal_p (s1, s2, rest)
  6764. Lexicographic equality predicate; return @code{#t} if the two
  6765. strings are the same length and contain the same characters in
  6766. the same positions, otherwise return @code{#f}.
  6767. The procedure @code{string-ci=?} treats upper and lower case
  6768. letters as though they were the same character, but
  6769. @code{string=?} treats upper and lower case as distinct
  6770. characters.
  6771. @end deffn
  6772. string-ci=?
  6773. @c snarfed from strorder.c:62
  6774. @deffn {Scheme Procedure} string-ci=? [s1 [s2 . rest]]
  6775. @deffnx {C Function} scm_i_string_ci_equal_p (s1, s2, rest)
  6776. Case-insensitive string equality predicate; return @code{#t} if
  6777. the two strings are the same length and their component
  6778. characters match (ignoring case) at each position; otherwise
  6779. return @code{#f}.
  6780. @end deffn
  6781. string<?
  6782. @c snarfed from strorder.c:72
  6783. @deffn {Scheme Procedure} string<? [s1 [s2 . rest]]
  6784. @deffnx {C Function} scm_i_string_less_p (s1, s2, rest)
  6785. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6786. is lexicographically less than @var{s2}.
  6787. @end deffn
  6788. string<=?
  6789. @c snarfed from strorder.c:82
  6790. @deffn {Scheme Procedure} string<=? [s1 [s2 . rest]]
  6791. @deffnx {C Function} scm_i_string_leq_p (s1, s2, rest)
  6792. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6793. is lexicographically less than or equal to @var{s2}.
  6794. @end deffn
  6795. string>?
  6796. @c snarfed from strorder.c:92
  6797. @deffn {Scheme Procedure} string>? [s1 [s2 . rest]]
  6798. @deffnx {C Function} scm_i_string_gr_p (s1, s2, rest)
  6799. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6800. is lexicographically greater than @var{s2}.
  6801. @end deffn
  6802. string>=?
  6803. @c snarfed from strorder.c:102
  6804. @deffn {Scheme Procedure} string>=? [s1 [s2 . rest]]
  6805. @deffnx {C Function} scm_i_string_geq_p (s1, s2, rest)
  6806. Lexicographic ordering predicate; return @code{#t} if @var{s1}
  6807. is lexicographically greater than or equal to @var{s2}.
  6808. @end deffn
  6809. string-ci<?
  6810. @c snarfed from strorder.c:113
  6811. @deffn {Scheme Procedure} string-ci<? [s1 [s2 . rest]]
  6812. @deffnx {C Function} scm_i_string_ci_less_p (s1, s2, rest)
  6813. Case insensitive lexicographic ordering predicate; return
  6814. @code{#t} if @var{s1} is lexicographically less than @var{s2}
  6815. regardless of case.
  6816. @end deffn
  6817. string-ci<=?
  6818. @c snarfed from strorder.c:124
  6819. @deffn {Scheme Procedure} string-ci<=? [s1 [s2 . rest]]
  6820. @deffnx {C Function} scm_i_string_ci_leq_p (s1, s2, rest)
  6821. Case insensitive lexicographic ordering predicate; return
  6822. @code{#t} if @var{s1} is lexicographically less than or equal
  6823. to @var{s2} regardless of case.
  6824. @end deffn
  6825. string-ci>?
  6826. @c snarfed from strorder.c:135
  6827. @deffn {Scheme Procedure} string-ci>? [s1 [s2 . rest]]
  6828. @deffnx {C Function} scm_i_string_ci_gr_p (s1, s2, rest)
  6829. Case insensitive lexicographic ordering predicate; return
  6830. @code{#t} if @var{s1} is lexicographically greater than
  6831. @var{s2} regardless of case.
  6832. @end deffn
  6833. string-ci>=?
  6834. @c snarfed from strorder.c:146
  6835. @deffn {Scheme Procedure} string-ci>=? [s1 [s2 . rest]]
  6836. @deffnx {C Function} scm_i_string_ci_geq_p (s1, s2, rest)
  6837. Case insensitive lexicographic ordering predicate; return
  6838. @code{#t} if @var{s1} is lexicographically greater than or
  6839. equal to @var{s2} regardless of case.
  6840. @end deffn
  6841. object->string
  6842. @c snarfed from strports.c:332
  6843. @deffn {Scheme Procedure} object->string obj [printer]
  6844. @deffnx {C Function} scm_object_to_string (obj, printer)
  6845. Return a Scheme string obtained by printing @var{obj}.
  6846. Printing function can be specified by the optional second
  6847. argument @var{printer} (default: @code{write}).
  6848. @end deffn
  6849. call-with-output-string
  6850. @c snarfed from strports.c:356
  6851. @deffn {Scheme Procedure} call-with-output-string proc
  6852. @deffnx {C Function} scm_call_with_output_string (proc)
  6853. Calls the one-argument procedure @var{proc} with a newly created output
  6854. port. When the function returns, the string composed of the characters
  6855. written into the port is returned.
  6856. @end deffn
  6857. call-with-input-string
  6858. @c snarfed from strports.c:375
  6859. @deffn {Scheme Procedure} call-with-input-string string proc
  6860. @deffnx {C Function} scm_call_with_input_string (string, proc)
  6861. Calls the one-argument procedure @var{proc} with a newly
  6862. created input port from which @var{string}'s contents may be
  6863. read. The value yielded by the @var{proc} is returned.
  6864. @end deffn
  6865. open-input-string
  6866. @c snarfed from strports.c:388
  6867. @deffn {Scheme Procedure} open-input-string str
  6868. @deffnx {C Function} scm_open_input_string (str)
  6869. Take a string and return an input port that delivers characters
  6870. from the string. The port can be closed by
  6871. @code{close-input-port}, though its storage will be reclaimed
  6872. by the garbage collector if it becomes inaccessible.
  6873. @end deffn
  6874. open-output-string
  6875. @c snarfed from strports.c:402
  6876. @deffn {Scheme Procedure} open-output-string
  6877. @deffnx {C Function} scm_open_output_string ()
  6878. Return an output port that will accumulate characters for
  6879. retrieval by @code{get-output-string}. The port can be closed
  6880. by the procedure @code{close-output-port}, though its storage
  6881. will be reclaimed by the garbage collector if it becomes
  6882. inaccessible.
  6883. @end deffn
  6884. get-output-string
  6885. @c snarfed from strports.c:419
  6886. @deffn {Scheme Procedure} get-output-string port
  6887. @deffnx {C Function} scm_get_output_string (port)
  6888. Given an output port created by @code{open-output-string},
  6889. return a string consisting of the characters that have been
  6890. output to the port so far.
  6891. @end deffn
  6892. eval-string
  6893. @c snarfed from strports.c:488
  6894. @deffn {Scheme Procedure} eval-string string [module]
  6895. @deffnx {C Function} scm_eval_string_in_module (string, module)
  6896. Evaluate @var{string} as the text representation of a Scheme
  6897. form or forms, and return whatever value they produce.
  6898. Evaluation takes place in the given module, or the current
  6899. module when no module is given.
  6900. While the code is evaluated, the given module is made the
  6901. current one. The current module is restored when this
  6902. procedure returns.
  6903. @end deffn
  6904. make-struct-layout
  6905. @c snarfed from struct.c:56
  6906. @deffn {Scheme Procedure} make-struct-layout fields
  6907. @deffnx {C Function} scm_make_struct_layout (fields)
  6908. Return a new structure layout object.
  6909. @var{fields} must be a string made up of pairs of characters
  6910. strung together. The first character of each pair describes a field
  6911. type, the second a field protection. Allowed types are 'p' for
  6912. GC-protected Scheme data, 'u' for unprotected binary data, and 's' for
  6913. a field that points to the structure itself. Allowed protections
  6914. are 'w' for mutable fields, 'r' for read-only fields, and 'o' for opaque
  6915. fields. The last field protection specification may be capitalized to
  6916. indicate that the field is a tail-array.
  6917. @end deffn
  6918. struct?
  6919. @c snarfed from struct.c:223
  6920. @deffn {Scheme Procedure} struct? x
  6921. @deffnx {C Function} scm_struct_p (x)
  6922. Return @code{#t} iff @var{x} is a structure object, else
  6923. @code{#f}.
  6924. @end deffn
  6925. struct-vtable?
  6926. @c snarfed from struct.c:232
  6927. @deffn {Scheme Procedure} struct-vtable? x
  6928. @deffnx {C Function} scm_struct_vtable_p (x)
  6929. Return @code{#t} iff @var{x} is a vtable structure.
  6930. @end deffn
  6931. make-struct
  6932. @c snarfed from struct.c:418
  6933. @deffn {Scheme Procedure} make-struct vtable tail_array_size . init
  6934. @deffnx {C Function} scm_make_struct (vtable, tail_array_size, init)
  6935. Create a new structure.
  6936. @var{type} must be a vtable structure (@pxref{Vtables}).
  6937. @var{tail-elts} must be a non-negative integer. If the layout
  6938. specification indicated by @var{type} includes a tail-array,
  6939. this is the number of elements allocated to that array.
  6940. The @var{init1}, @dots{} are optional arguments describing how
  6941. successive fields of the structure should be initialized. Only fields
  6942. with protection 'r' or 'w' can be initialized, except for fields of
  6943. type 's', which are automatically initialized to point to the new
  6944. structure itself; fields with protection 'o' can not be initialized by
  6945. Scheme programs.
  6946. If fewer optional arguments than initializable fields are supplied,
  6947. fields of type 'p' get default value #f while fields of type 'u' are
  6948. initialized to 0.
  6949. Structs are currently the basic representation for record-like data
  6950. structures in Guile. The plan is to eventually replace them with a
  6951. new representation which will at the same time be easier to use and
  6952. more powerful.
  6953. For more information, see the documentation for @code{make-vtable-vtable}.
  6954. @end deffn
  6955. make-vtable-vtable
  6956. @c snarfed from struct.c:502
  6957. @deffn {Scheme Procedure} make-vtable-vtable user_fields tail_array_size . init
  6958. @deffnx {C Function} scm_make_vtable_vtable (user_fields, tail_array_size, init)
  6959. Return a new, self-describing vtable structure.
  6960. @var{user-fields} is a string describing user defined fields of the
  6961. vtable beginning at index @code{vtable-offset-user}
  6962. (see @code{make-struct-layout}).
  6963. @var{tail-size} specifies the size of the tail-array (if any) of
  6964. this vtable.
  6965. @var{init1}, @dots{} are the optional initializers for the fields of
  6966. the vtable.
  6967. Vtables have one initializable system field---the struct printer.
  6968. This field comes before the user fields in the initializers passed
  6969. to @code{make-vtable-vtable} and @code{make-struct}, and thus works as
  6970. a third optional argument to @code{make-vtable-vtable} and a fourth to
  6971. @code{make-struct} when creating vtables:
  6972. If the value is a procedure, it will be called instead of the standard
  6973. printer whenever a struct described by this vtable is printed.
  6974. The procedure will be called with arguments STRUCT and PORT.
  6975. The structure of a struct is described by a vtable, so the vtable is
  6976. in essence the type of the struct. The vtable is itself a struct with
  6977. a vtable. This could go on forever if it weren't for the
  6978. vtable-vtables which are self-describing vtables, and thus terminate
  6979. the chain.
  6980. There are several potential ways of using structs, but the standard
  6981. one is to use three kinds of structs, together building up a type
  6982. sub-system: one vtable-vtable working as the root and one or several
  6983. "types", each with a set of "instances". (The vtable-vtable should be
  6984. compared to the class <class> which is the class of itself.)
  6985. @lisp
  6986. (define ball-root (make-vtable-vtable "pr" 0))
  6987. (define (make-ball-type ball-color)
  6988. (make-struct ball-root 0
  6989. (make-struct-layout "pw")
  6990. (lambda (ball port)
  6991. (format port "#<a ~A ball owned by ~A>"
  6992. (color ball)
  6993. (owner ball)))
  6994. ball-color))
  6995. (define (color ball) (struct-ref (struct-vtable ball) vtable-offset-user))
  6996. (define (owner ball) (struct-ref ball 0))
  6997. (define red (make-ball-type 'red))
  6998. (define green (make-ball-type 'green))
  6999. (define (make-ball type owner) (make-struct type 0 owner))
  7000. (define ball (make-ball green 'Nisse))
  7001. ball @result{} #<a green ball owned by Nisse>
  7002. @end lisp
  7003. @end deffn
  7004. struct-ref
  7005. @c snarfed from struct.c:542
  7006. @deffn {Scheme Procedure} struct-ref handle pos
  7007. @deffnx {Scheme Procedure} struct-set! struct n value
  7008. @deffnx {C Function} scm_struct_ref (handle, pos)
  7009. Access (or modify) the @var{n}th field of @var{struct}.
  7010. If the field is of type 'p', then it can be set to an arbitrary value.
  7011. If the field is of type 'u', then it can only be set to a non-negative
  7012. integer value small enough to fit in one machine word.
  7013. @end deffn
  7014. struct-set!
  7015. @c snarfed from struct.c:621
  7016. @deffn {Scheme Procedure} struct-set! handle pos val
  7017. @deffnx {C Function} scm_struct_set_x (handle, pos, val)
  7018. Set the slot of the structure @var{handle} with index @var{pos}
  7019. to @var{val}. Signal an error if the slot can not be written
  7020. to.
  7021. @end deffn
  7022. struct-vtable
  7023. @c snarfed from struct.c:692
  7024. @deffn {Scheme Procedure} struct-vtable handle
  7025. @deffnx {C Function} scm_struct_vtable (handle)
  7026. Return the vtable structure that describes the type of @var{struct}.
  7027. @end deffn
  7028. struct-vtable-tag
  7029. @c snarfed from struct.c:703
  7030. @deffn {Scheme Procedure} struct-vtable-tag handle
  7031. @deffnx {C Function} scm_struct_vtable_tag (handle)
  7032. Return the vtable tag of the structure @var{handle}.
  7033. @end deffn
  7034. struct-vtable-name
  7035. @c snarfed from struct.c:742
  7036. @deffn {Scheme Procedure} struct-vtable-name vtable
  7037. @deffnx {C Function} scm_struct_vtable_name (vtable)
  7038. Return the name of the vtable @var{vtable}.
  7039. @end deffn
  7040. set-struct-vtable-name!
  7041. @c snarfed from struct.c:752
  7042. @deffn {Scheme Procedure} set-struct-vtable-name! vtable name
  7043. @deffnx {C Function} scm_set_struct_vtable_name_x (vtable, name)
  7044. Set the name of the vtable @var{vtable} to @var{name}.
  7045. @end deffn
  7046. symbol?
  7047. @c snarfed from symbols.c:156
  7048. @deffn {Scheme Procedure} symbol? obj
  7049. @deffnx {C Function} scm_symbol_p (obj)
  7050. Return @code{#t} if @var{obj} is a symbol, otherwise return
  7051. @code{#f}.
  7052. @end deffn
  7053. symbol-interned?
  7054. @c snarfed from symbols.c:166
  7055. @deffn {Scheme Procedure} symbol-interned? symbol
  7056. @deffnx {C Function} scm_symbol_interned_p (symbol)
  7057. Return @code{#t} if @var{symbol} is interned, otherwise return
  7058. @code{#f}.
  7059. @end deffn
  7060. make-symbol
  7061. @c snarfed from symbols.c:178
  7062. @deffn {Scheme Procedure} make-symbol name
  7063. @deffnx {C Function} scm_make_symbol (name)
  7064. 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.
  7065. @end deffn
  7066. symbol->string
  7067. @c snarfed from symbols.c:210
  7068. @deffn {Scheme Procedure} symbol->string s
  7069. @deffnx {C Function} scm_symbol_to_string (s)
  7070. Return the name of @var{symbol} as a string. If the symbol was
  7071. part of an object returned as the value of a literal expression
  7072. (section @pxref{Literal expressions,,,r5rs, The Revised^5
  7073. Report on Scheme}) or by a call to the @code{read} procedure,
  7074. and its name contains alphabetic characters, then the string
  7075. returned will contain characters in the implementation's
  7076. preferred standard case---some implementations will prefer
  7077. upper case, others lower case. If the symbol was returned by
  7078. @code{string->symbol}, the case of characters in the string
  7079. returned will be the same as the case in the string that was
  7080. passed to @code{string->symbol}. It is an error to apply
  7081. mutation procedures like @code{string-set!} to strings returned
  7082. by this procedure.
  7083. The following examples assume that the implementation's
  7084. standard case is lower case:
  7085. @lisp
  7086. (symbol->string 'flying-fish) @result{} "flying-fish"
  7087. (symbol->string 'Martin) @result{} "martin"
  7088. (symbol->string
  7089. (string->symbol "Malvina")) @result{} "Malvina"
  7090. @end lisp
  7091. @end deffn
  7092. string->symbol
  7093. @c snarfed from symbols.c:240
  7094. @deffn {Scheme Procedure} string->symbol string
  7095. @deffnx {C Function} scm_string_to_symbol (string)
  7096. Return the symbol whose name is @var{string}. This procedure
  7097. can create symbols with names containing special characters or
  7098. letters in the non-standard case, but it is usually a bad idea
  7099. to create such symbols because in some implementations of
  7100. Scheme they cannot be read as themselves. See
  7101. @code{symbol->string}.
  7102. The following examples assume that the implementation's
  7103. standard case is lower case:
  7104. @lisp
  7105. (eq? 'mISSISSIppi 'mississippi) @result{} #t
  7106. (string->symbol "mISSISSIppi") @result{} @r{the symbol with name "mISSISSIppi"}
  7107. (eq? 'bitBlt (string->symbol "bitBlt")) @result{} #f
  7108. (eq? 'JollyWog
  7109. (string->symbol (symbol->string 'JollyWog))) @result{} #t
  7110. (string=? "K. Harper, M.D."
  7111. (symbol->string
  7112. (string->symbol "K. Harper, M.D."))) @result{}#t
  7113. @end lisp
  7114. @end deffn
  7115. string-ci->symbol
  7116. @c snarfed from symbols.c:252
  7117. @deffn {Scheme Procedure} string-ci->symbol str
  7118. @deffnx {C Function} scm_string_ci_to_symbol (str)
  7119. Return the symbol whose name is @var{str}. @var{str} is
  7120. converted to lowercase before the conversion is done, if Guile
  7121. is currently reading symbols case-insensitively.
  7122. @end deffn
  7123. gensym
  7124. @c snarfed from symbols.c:269
  7125. @deffn {Scheme Procedure} gensym [prefix]
  7126. @deffnx {C Function} scm_gensym (prefix)
  7127. Create a new symbol with a name constructed from a prefix and
  7128. a counter value. The string @var{prefix} can be specified as
  7129. an optional argument. Default prefix is @code{ g}. The counter
  7130. is increased by 1 at each call. There is no provision for
  7131. resetting the counter.
  7132. @end deffn
  7133. symbol-hash
  7134. @c snarfed from symbols.c:295
  7135. @deffn {Scheme Procedure} symbol-hash symbol
  7136. @deffnx {C Function} scm_symbol_hash (symbol)
  7137. Return a hash value for @var{symbol}.
  7138. @end deffn
  7139. symbol-fref
  7140. @c snarfed from symbols.c:305
  7141. @deffn {Scheme Procedure} symbol-fref s
  7142. @deffnx {C Function} scm_symbol_fref (s)
  7143. Return the contents of @var{symbol}'s @dfn{function slot}.
  7144. @end deffn
  7145. symbol-pref
  7146. @c snarfed from symbols.c:316
  7147. @deffn {Scheme Procedure} symbol-pref s
  7148. @deffnx {C Function} scm_symbol_pref (s)
  7149. Return the @dfn{property list} currently associated with @var{symbol}.
  7150. @end deffn
  7151. symbol-fset!
  7152. @c snarfed from symbols.c:327
  7153. @deffn {Scheme Procedure} symbol-fset! s val
  7154. @deffnx {C Function} scm_symbol_fset_x (s, val)
  7155. Change the binding of @var{symbol}'s function slot.
  7156. @end deffn
  7157. symbol-pset!
  7158. @c snarfed from symbols.c:339
  7159. @deffn {Scheme Procedure} symbol-pset! s val
  7160. @deffnx {C Function} scm_symbol_pset_x (s, val)
  7161. Change the binding of @var{symbol}'s property slot.
  7162. @end deffn
  7163. call-with-new-thread
  7164. @c snarfed from threads.c:611
  7165. @deffn {Scheme Procedure} call-with-new-thread thunk [handler]
  7166. @deffnx {C Function} scm_call_with_new_thread (thunk, handler)
  7167. Call @code{thunk} in a new thread and with a new dynamic state,
  7168. returning a new thread object representing the thread. The procedure
  7169. @var{thunk} is called via @code{with-continuation-barrier}.
  7170. When @var{handler} is specified, then @var{thunk} is called from
  7171. within a @code{catch} with tag @code{#t} that has @var{handler} as its
  7172. handler. This catch is established inside the continuation barrier.
  7173. Once @var{thunk} or @var{handler} returns, the return value is made
  7174. the @emph{exit value} of the thread and the thread is terminated.
  7175. @end deffn
  7176. yield
  7177. @c snarfed from threads.c:722
  7178. @deffn {Scheme Procedure} yield
  7179. @deffnx {C Function} scm_yield ()
  7180. Move the calling thread to the end of the scheduling queue.
  7181. @end deffn
  7182. join-thread
  7183. @c snarfed from threads.c:732
  7184. @deffn {Scheme Procedure} join-thread thread
  7185. @deffnx {C Function} scm_join_thread (thread)
  7186. Suspend execution of the calling thread until the target @var{thread} terminates, unless the target @var{thread} has already terminated.
  7187. @end deffn
  7188. make-mutex
  7189. @c snarfed from threads.c:828
  7190. @deffn {Scheme Procedure} make-mutex
  7191. @deffnx {C Function} scm_make_mutex ()
  7192. Create a new mutex.
  7193. @end deffn
  7194. make-recursive-mutex
  7195. @c snarfed from threads.c:837
  7196. @deffn {Scheme Procedure} make-recursive-mutex
  7197. @deffnx {C Function} scm_make_recursive_mutex ()
  7198. Create a new recursive mutex.
  7199. @end deffn
  7200. lock-mutex
  7201. @c snarfed from threads.c:883
  7202. @deffn {Scheme Procedure} lock-mutex mx
  7203. @deffnx {C Function} scm_lock_mutex (mx)
  7204. 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}.
  7205. @end deffn
  7206. try-mutex
  7207. @c snarfed from threads.c:931
  7208. @deffn {Scheme Procedure} try-mutex mutex
  7209. @deffnx {C Function} scm_try_mutex (mutex)
  7210. 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}.
  7211. @end deffn
  7212. unlock-mutex
  7213. @c snarfed from threads.c:976
  7214. @deffn {Scheme Procedure} unlock-mutex mx
  7215. @deffnx {C Function} scm_unlock_mutex (mx)
  7216. 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.
  7217. @end deffn
  7218. make-condition-variable
  7219. @c snarfed from threads.c:1052
  7220. @deffn {Scheme Procedure} make-condition-variable
  7221. @deffnx {C Function} scm_make_condition_variable ()
  7222. Make a new condition variable.
  7223. @end deffn
  7224. wait-condition-variable
  7225. @c snarfed from threads.c:1120
  7226. @deffn {Scheme Procedure} wait-condition-variable cv mx [t]
  7227. @deffnx {C Function} scm_timed_wait_condition_variable (cv, mx, t)
  7228. 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.
  7229. @end deffn
  7230. signal-condition-variable
  7231. @c snarfed from threads.c:1157
  7232. @deffn {Scheme Procedure} signal-condition-variable cv
  7233. @deffnx {C Function} scm_signal_condition_variable (cv)
  7234. Wake up one thread that is waiting for @var{cv}
  7235. @end deffn
  7236. broadcast-condition-variable
  7237. @c snarfed from threads.c:1177
  7238. @deffn {Scheme Procedure} broadcast-condition-variable cv
  7239. @deffnx {C Function} scm_broadcast_condition_variable (cv)
  7240. Wake up all threads that are waiting for @var{cv}.
  7241. @end deffn
  7242. current-thread
  7243. @c snarfed from threads.c:1354
  7244. @deffn {Scheme Procedure} current-thread
  7245. @deffnx {C Function} scm_current_thread ()
  7246. Return the thread that called this function.
  7247. @end deffn
  7248. all-threads
  7249. @c snarfed from threads.c:1372
  7250. @deffn {Scheme Procedure} all-threads
  7251. @deffnx {C Function} scm_all_threads ()
  7252. Return a list of all threads.
  7253. @end deffn
  7254. thread-exited?
  7255. @c snarfed from threads.c:1398
  7256. @deffn {Scheme Procedure} thread-exited? thread
  7257. @deffnx {C Function} scm_thread_exited_p (thread)
  7258. Return @code{#t} iff @var{thread} has exited.
  7259. @end deffn
  7260. catch
  7261. @c snarfed from throw.c:512
  7262. @deffn {Scheme Procedure} catch key thunk handler
  7263. @deffnx {C Function} scm_catch (key, thunk, handler)
  7264. Invoke @var{thunk} in the dynamic context of @var{handler} for
  7265. exceptions matching @var{key}. If thunk throws to the symbol
  7266. @var{key}, then @var{handler} is invoked this way:
  7267. @lisp
  7268. (handler key args ...)
  7269. @end lisp
  7270. @var{key} is a symbol or @code{#t}.
  7271. @var{thunk} takes no arguments. If @var{thunk} returns
  7272. normally, that is the return value of @code{catch}.
  7273. Handler is invoked outside the scope of its own @code{catch}.
  7274. If @var{handler} again throws to the same key, a new handler
  7275. from further up the call chain is invoked.
  7276. If the key is @code{#t}, then a throw to @emph{any} symbol will
  7277. match this call to @code{catch}.
  7278. @end deffn
  7279. lazy-catch
  7280. @c snarfed from throw.c:540
  7281. @deffn {Scheme Procedure} lazy-catch key thunk handler
  7282. @deffnx {C Function} scm_lazy_catch (key, thunk, handler)
  7283. This behaves exactly like @code{catch}, except that it does
  7284. not unwind the stack before invoking @var{handler}.
  7285. The @var{handler} procedure is not allowed to return:
  7286. it must throw to another catch, or otherwise exit non-locally.
  7287. @end deffn
  7288. throw
  7289. @c snarfed from throw.c:573
  7290. @deffn {Scheme Procedure} throw key . args
  7291. @deffnx {C Function} scm_throw (key, args)
  7292. Invoke the catch form matching @var{key}, passing @var{args} to the
  7293. @var{handler}.
  7294. @var{key} is a symbol. It will match catches of the same symbol or of
  7295. @code{#t}.
  7296. If there is no handler at all, Guile prints an error and then exits.
  7297. @end deffn
  7298. values
  7299. @c snarfed from values.c:53
  7300. @deffn {Scheme Procedure} values . args
  7301. @deffnx {C Function} scm_values (args)
  7302. Delivers all of its arguments to its continuation. Except for
  7303. continuations created by the @code{call-with-values} procedure,
  7304. all continuations take exactly one value. The effect of
  7305. passing no value or more than one value to continuations that
  7306. were not created by @code{call-with-values} is unspecified.
  7307. @end deffn
  7308. make-variable
  7309. @c snarfed from variable.c:52
  7310. @deffn {Scheme Procedure} make-variable init
  7311. @deffnx {C Function} scm_make_variable (init)
  7312. Return a variable initialized to value @var{init}.
  7313. @end deffn
  7314. make-undefined-variable
  7315. @c snarfed from variable.c:62
  7316. @deffn {Scheme Procedure} make-undefined-variable
  7317. @deffnx {C Function} scm_make_undefined_variable ()
  7318. Return a variable that is initially unbound.
  7319. @end deffn
  7320. variable?
  7321. @c snarfed from variable.c:73
  7322. @deffn {Scheme Procedure} variable? obj
  7323. @deffnx {C Function} scm_variable_p (obj)
  7324. Return @code{#t} iff @var{obj} is a variable object, else
  7325. return @code{#f}.
  7326. @end deffn
  7327. variable-ref
  7328. @c snarfed from variable.c:85
  7329. @deffn {Scheme Procedure} variable-ref var
  7330. @deffnx {C Function} scm_variable_ref (var)
  7331. Dereference @var{var} and return its value.
  7332. @var{var} must be a variable object; see @code{make-variable}
  7333. and @code{make-undefined-variable}.
  7334. @end deffn
  7335. variable-set!
  7336. @c snarfed from variable.c:101
  7337. @deffn {Scheme Procedure} variable-set! var val
  7338. @deffnx {C Function} scm_variable_set_x (var, val)
  7339. Set the value of the variable @var{var} to @var{val}.
  7340. @var{var} must be a variable object, @var{val} can be any
  7341. value. Return an unspecified value.
  7342. @end deffn
  7343. variable-bound?
  7344. @c snarfed from variable.c:113
  7345. @deffn {Scheme Procedure} variable-bound? var
  7346. @deffnx {C Function} scm_variable_bound_p (var)
  7347. Return @code{#t} iff @var{var} is bound to a value.
  7348. Throws an error if @var{var} is not a variable object.
  7349. @end deffn
  7350. vector?
  7351. @c snarfed from vectors.c:91
  7352. @deffn {Scheme Procedure} vector? obj
  7353. @deffnx {C Function} scm_vector_p (obj)
  7354. Return @code{#t} if @var{obj} is a vector, otherwise return
  7355. @code{#f}.
  7356. @end deffn
  7357. list->vector
  7358. @c snarfed from vectors.c:123
  7359. @deffn {Scheme Procedure} list->vector
  7360. implemented by the C function "scm_vector"
  7361. @end deffn
  7362. vector
  7363. @c snarfed from vectors.c:140
  7364. @deffn {Scheme Procedure} vector . l
  7365. @deffnx {Scheme Procedure} list->vector l
  7366. @deffnx {C Function} scm_vector (l)
  7367. Return a newly allocated vector composed of the
  7368. given arguments. Analogous to @code{list}.
  7369. @lisp
  7370. (vector 'a 'b 'c) @result{} #(a b c)
  7371. @end lisp
  7372. @end deffn
  7373. make-vector
  7374. @c snarfed from vectors.c:276
  7375. @deffn {Scheme Procedure} make-vector k [fill]
  7376. @deffnx {C Function} scm_make_vector (k, fill)
  7377. Return a newly allocated vector of @var{k} elements. If a
  7378. second argument is given, then each position is initialized to
  7379. @var{fill}. Otherwise the initial contents of each position is
  7380. unspecified.
  7381. @end deffn
  7382. vector-copy
  7383. @c snarfed from vectors.c:318
  7384. @deffn {Scheme Procedure} vector-copy vec
  7385. @deffnx {C Function} scm_vector_copy (vec)
  7386. Return a copy of @var{vec}.
  7387. @end deffn
  7388. vector->list
  7389. @c snarfed from vectors.c:389
  7390. @deffn {Scheme Procedure} vector->list v
  7391. @deffnx {C Function} scm_vector_to_list (v)
  7392. Return a newly allocated list composed of the elements of @var{v}.
  7393. @lisp
  7394. (vector->list '#(dah dah didah)) @result{} (dah dah didah)
  7395. (list->vector '(dididit dah)) @result{} #(dididit dah)
  7396. @end lisp
  7397. @end deffn
  7398. vector-fill!
  7399. @c snarfed from vectors.c:413
  7400. @deffn {Scheme Procedure} vector-fill! v fill
  7401. @deffnx {C Function} scm_vector_fill_x (v, fill)
  7402. Store @var{fill} in every position of @var{vector}. The value
  7403. returned by @code{vector-fill!} is unspecified.
  7404. @end deffn
  7405. vector-move-left!
  7406. @c snarfed from vectors.c:450
  7407. @deffn {Scheme Procedure} vector-move-left! vec1 start1 end1 vec2 start2
  7408. @deffnx {C Function} scm_vector_move_left_x (vec1, start1, end1, vec2, start2)
  7409. Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
  7410. to @var{vec2} starting at position @var{start2}. @var{start1} and
  7411. @var{start2} are inclusive indices; @var{end1} is exclusive.
  7412. @code{vector-move-left!} copies elements in leftmost order.
  7413. Therefore, in the case where @var{vec1} and @var{vec2} refer to the
  7414. same vector, @code{vector-move-left!} is usually appropriate when
  7415. @var{start1} is greater than @var{start2}.
  7416. @end deffn
  7417. vector-move-right!
  7418. @c snarfed from vectors.c:488
  7419. @deffn {Scheme Procedure} vector-move-right! vec1 start1 end1 vec2 start2
  7420. @deffnx {C Function} scm_vector_move_right_x (vec1, start1, end1, vec2, start2)
  7421. Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
  7422. to @var{vec2} starting at position @var{start2}. @var{start1} and
  7423. @var{start2} are inclusive indices; @var{end1} is exclusive.
  7424. @code{vector-move-right!} copies elements in rightmost order.
  7425. Therefore, in the case where @var{vec1} and @var{vec2} refer to the
  7426. same vector, @code{vector-move-right!} is usually appropriate when
  7427. @var{start1} is less than @var{start2}.
  7428. @end deffn
  7429. generalized-vector?
  7430. @c snarfed from vectors.c:537
  7431. @deffn {Scheme Procedure} generalized-vector? obj
  7432. @deffnx {C Function} scm_generalized_vector_p (obj)
  7433. Return @code{#t} if @var{obj} is a vector, string,
  7434. bitvector, or uniform numeric vector.
  7435. @end deffn
  7436. generalized-vector-length
  7437. @c snarfed from vectors.c:569
  7438. @deffn {Scheme Procedure} generalized-vector-length v
  7439. @deffnx {C Function} scm_generalized_vector_length (v)
  7440. Return the length of the generalized vector @var{v}.
  7441. @end deffn
  7442. generalized-vector-ref
  7443. @c snarfed from vectors.c:594
  7444. @deffn {Scheme Procedure} generalized-vector-ref v idx
  7445. @deffnx {C Function} scm_generalized_vector_ref (v, idx)
  7446. Return the element at index @var{idx} of the
  7447. generalized vector @var{v}.
  7448. @end deffn
  7449. generalized-vector-set!
  7450. @c snarfed from vectors.c:619
  7451. @deffn {Scheme Procedure} generalized-vector-set! v idx val
  7452. @deffnx {C Function} scm_generalized_vector_set_x (v, idx, val)
  7453. Set the element at index @var{idx} of the
  7454. generalized vector @var{v} to @var{val}.
  7455. @end deffn
  7456. generalized-vector->list
  7457. @c snarfed from vectors.c:630
  7458. @deffn {Scheme Procedure} generalized-vector->list v
  7459. @deffnx {C Function} scm_generalized_vector_to_list (v)
  7460. Return a new list whose elements are the elements of the
  7461. generalized vector @var{v}.
  7462. @end deffn
  7463. major-version
  7464. @c snarfed from version.c:35
  7465. @deffn {Scheme Procedure} major-version
  7466. @deffnx {C Function} scm_major_version ()
  7467. Return a string containing Guile's major version number.
  7468. E.g., the 1 in "1.6.5".
  7469. @end deffn
  7470. minor-version
  7471. @c snarfed from version.c:48
  7472. @deffn {Scheme Procedure} minor-version
  7473. @deffnx {C Function} scm_minor_version ()
  7474. Return a string containing Guile's minor version number.
  7475. E.g., the 6 in "1.6.5".
  7476. @end deffn
  7477. micro-version
  7478. @c snarfed from version.c:61
  7479. @deffn {Scheme Procedure} micro-version
  7480. @deffnx {C Function} scm_micro_version ()
  7481. Return a string containing Guile's micro version number.
  7482. E.g., the 5 in "1.6.5".
  7483. @end deffn
  7484. version
  7485. @c snarfed from version.c:83
  7486. @deffn {Scheme Procedure} version
  7487. @deffnx {Scheme Procedure} major-version
  7488. @deffnx {Scheme Procedure} minor-version
  7489. @deffnx {Scheme Procedure} micro-version
  7490. @deffnx {C Function} scm_version ()
  7491. Return a string describing Guile's version number, or its major, minor
  7492. or micro version number, respectively.
  7493. @lisp
  7494. (version) @result{} "1.6.0"
  7495. (major-version) @result{} "1"
  7496. (minor-version) @result{} "6"
  7497. (micro-version) @result{} "0"
  7498. @end lisp
  7499. @end deffn
  7500. effective-version
  7501. @c snarfed from version.c:113
  7502. @deffn {Scheme Procedure} effective-version
  7503. @deffnx {C Function} scm_effective_version ()
  7504. Return a string describing Guile's effective version number.
  7505. @lisp
  7506. (version) @result{} "1.6.0"
  7507. (effective-version) @result{} "1.6"
  7508. (major-version) @result{} "1"
  7509. (minor-version) @result{} "6"
  7510. (micro-version) @result{} "0"
  7511. @end lisp
  7512. @end deffn
  7513. make-soft-port
  7514. @c snarfed from vports.c:185
  7515. @deffn {Scheme Procedure} make-soft-port pv modes
  7516. @deffnx {C Function} scm_make_soft_port (pv, modes)
  7517. Return a port capable of receiving or delivering characters as
  7518. specified by the @var{modes} string (@pxref{File Ports,
  7519. open-file}). @var{pv} must be a vector of length 5 or 6. Its
  7520. components are as follows:
  7521. @enumerate 0
  7522. @item
  7523. procedure accepting one character for output
  7524. @item
  7525. procedure accepting a string for output
  7526. @item
  7527. thunk for flushing output
  7528. @item
  7529. thunk for getting one character
  7530. @item
  7531. thunk for closing port (not by garbage collection)
  7532. @item
  7533. (if present and not @code{#f}) thunk for computing the number of
  7534. characters that can be read from the port without blocking.
  7535. @end enumerate
  7536. For an output-only port only elements 0, 1, 2, and 4 need be
  7537. procedures. For an input-only port only elements 3 and 4 need
  7538. be procedures. Thunks 2 and 4 can instead be @code{#f} if
  7539. there is no useful operation for them to perform.
  7540. If thunk 3 returns @code{#f} or an @code{eof-object}
  7541. (@pxref{Input, eof-object?, ,r5rs, The Revised^5 Report on
  7542. Scheme}) it indicates that the port has reached end-of-file.
  7543. For example:
  7544. @lisp
  7545. (define stdout (current-output-port))
  7546. (define p (make-soft-port
  7547. (vector
  7548. (lambda (c) (write c stdout))
  7549. (lambda (s) (display s stdout))
  7550. (lambda () (display "." stdout))
  7551. (lambda () (char-upcase (read-char)))
  7552. (lambda () (display "@@" stdout)))
  7553. "rw"))
  7554. (write p p) @result{} #<input-output: soft 8081e20>
  7555. @end lisp
  7556. @end deffn
  7557. make-weak-vector
  7558. @c snarfed from weaks.c:74
  7559. @deffn {Scheme Procedure} make-weak-vector size [fill]
  7560. @deffnx {C Function} scm_make_weak_vector (size, fill)
  7561. Return a weak vector with @var{size} elements. If the optional
  7562. argument @var{fill} is given, all entries in the vector will be
  7563. set to @var{fill}. The default value for @var{fill} is the
  7564. empty list.
  7565. @end deffn
  7566. list->weak-vector
  7567. @c snarfed from weaks.c:82
  7568. @deffn {Scheme Procedure} list->weak-vector
  7569. implemented by the C function "scm_weak_vector"
  7570. @end deffn
  7571. weak-vector
  7572. @c snarfed from weaks.c:90
  7573. @deffn {Scheme Procedure} weak-vector . l
  7574. @deffnx {Scheme Procedure} list->weak-vector l
  7575. @deffnx {C Function} scm_weak_vector (l)
  7576. Construct a weak vector from a list: @code{weak-vector} uses
  7577. the list of its arguments while @code{list->weak-vector} uses
  7578. its only argument @var{l} (a list) to construct a weak vector
  7579. the same way @code{list->vector} would.
  7580. @end deffn
  7581. weak-vector?
  7582. @c snarfed from weaks.c:120
  7583. @deffn {Scheme Procedure} weak-vector? obj
  7584. @deffnx {C Function} scm_weak_vector_p (obj)
  7585. Return @code{#t} if @var{obj} is a weak vector. Note that all
  7586. weak hashes are also weak vectors.
  7587. @end deffn
  7588. make-weak-key-alist-vector
  7589. @c snarfed from weaks.c:138
  7590. @deffn {Scheme Procedure} make-weak-key-alist-vector [size]
  7591. @deffnx {Scheme Procedure} make-weak-value-alist-vector size
  7592. @deffnx {Scheme Procedure} make-doubly-weak-alist-vector size
  7593. @deffnx {C Function} scm_make_weak_key_alist_vector (size)
  7594. Return a weak hash table with @var{size} buckets. As with any
  7595. hash table, choosing a good size for the table requires some
  7596. caution.
  7597. You can modify weak hash tables in exactly the same way you
  7598. would modify regular hash tables. (@pxref{Hash Tables})
  7599. @end deffn
  7600. make-weak-value-alist-vector
  7601. @c snarfed from weaks.c:150
  7602. @deffn {Scheme Procedure} make-weak-value-alist-vector [size]
  7603. @deffnx {C Function} scm_make_weak_value_alist_vector (size)
  7604. Return a hash table with weak values with @var{size} buckets.
  7605. (@pxref{Hash Tables})
  7606. @end deffn
  7607. make-doubly-weak-alist-vector
  7608. @c snarfed from weaks.c:162
  7609. @deffn {Scheme Procedure} make-doubly-weak-alist-vector size
  7610. @deffnx {C Function} scm_make_doubly_weak_alist_vector (size)
  7611. Return a hash table with weak keys and values with @var{size}
  7612. buckets. (@pxref{Hash Tables})
  7613. @end deffn
  7614. weak-key-alist-vector?
  7615. @c snarfed from weaks.c:177
  7616. @deffn {Scheme Procedure} weak-key-alist-vector? obj
  7617. @deffnx {Scheme Procedure} weak-value-alist-vector? obj
  7618. @deffnx {Scheme Procedure} doubly-weak-alist-vector? obj
  7619. @deffnx {C Function} scm_weak_key_alist_vector_p (obj)
  7620. Return @code{#t} if @var{obj} is the specified weak hash
  7621. table. Note that a doubly weak hash table is neither a weak key
  7622. nor a weak value hash table.
  7623. @end deffn
  7624. weak-value-alist-vector?
  7625. @c snarfed from weaks.c:187
  7626. @deffn {Scheme Procedure} weak-value-alist-vector? obj
  7627. @deffnx {C Function} scm_weak_value_alist_vector_p (obj)
  7628. Return @code{#t} if @var{obj} is a weak value hash table.
  7629. @end deffn
  7630. doubly-weak-alist-vector?
  7631. @c snarfed from weaks.c:197
  7632. @deffn {Scheme Procedure} doubly-weak-alist-vector? obj
  7633. @deffnx {C Function} scm_doubly_weak_alist_vector_p (obj)
  7634. Return @code{#t} if @var{obj} is a doubly weak hash table.
  7635. @end deffn
  7636. array-fill!
  7637. @c snarfed from ramap.c:352
  7638. @deffn {Scheme Procedure} array-fill! ra fill
  7639. @deffnx {C Function} scm_array_fill_x (ra, fill)
  7640. Store @var{fill} in every element of @var{array}. The value returned
  7641. is unspecified.
  7642. @end deffn
  7643. array-copy-in-order!
  7644. @c snarfed from ramap.c:399
  7645. @deffn {Scheme Procedure} array-copy-in-order!
  7646. implemented by the C function "scm_array_copy_x"
  7647. @end deffn
  7648. array-copy!
  7649. @c snarfed from ramap.c:408
  7650. @deffn {Scheme Procedure} array-copy! src dst
  7651. @deffnx {Scheme Procedure} array-copy-in-order! src dst
  7652. @deffnx {C Function} scm_array_copy_x (src, dst)
  7653. Copy every element from vector or array @var{source} to the
  7654. corresponding element of @var{destination}. @var{destination} must have
  7655. the same rank as @var{source}, and be at least as large in each
  7656. dimension. The order is unspecified.
  7657. @end deffn
  7658. array-map-in-order!
  7659. @c snarfed from ramap.c:798
  7660. @deffn {Scheme Procedure} array-map-in-order!
  7661. implemented by the C function "scm_array_map_x"
  7662. @end deffn
  7663. array-map!
  7664. @c snarfed from ramap.c:809
  7665. @deffn {Scheme Procedure} array-map! ra0 proc . lra
  7666. @deffnx {Scheme Procedure} array-map-in-order! ra0 proc . lra
  7667. @deffnx {C Function} scm_array_map_x (ra0, proc, lra)
  7668. @var{array1}, @dots{} must have the same number of dimensions as
  7669. @var{array0} and have a range for each index which includes the range
  7670. for the corresponding index in @var{array0}. @var{proc} is applied to
  7671. each tuple of elements of @var{array1} @dots{} and the result is stored
  7672. as the corresponding element in @var{array0}. The value returned is
  7673. unspecified. The order of application is unspecified.
  7674. @end deffn
  7675. array-for-each
  7676. @c snarfed from ramap.c:950
  7677. @deffn {Scheme Procedure} array-for-each proc ra0 . lra
  7678. @deffnx {C Function} scm_array_for_each (proc, ra0, lra)
  7679. Apply @var{proc} to each tuple of elements of @var{array0} @dots{}
  7680. in row-major order. The value returned is unspecified.
  7681. @end deffn
  7682. array-index-map!
  7683. @c snarfed from ramap.c:978
  7684. @deffn {Scheme Procedure} array-index-map! ra proc
  7685. @deffnx {C Function} scm_array_index_map_x (ra, proc)
  7686. Apply @var{proc} to the indices of each element of @var{array} in
  7687. turn, storing the result in the corresponding element. The value
  7688. returned and the order of application are unspecified.
  7689. One can implement @var{array-indexes} as
  7690. @lisp
  7691. (define (array-indexes array)
  7692. (let ((ra (apply make-array #f (array-shape array))))
  7693. (array-index-map! ra (lambda x x))
  7694. ra))
  7695. @end lisp
  7696. Another example:
  7697. @lisp
  7698. (define (apl:index-generator n)
  7699. (let ((v (make-uniform-vector n 1)))
  7700. (array-index-map! v (lambda (i) i))
  7701. v))
  7702. @end lisp
  7703. @end deffn
  7704. array?
  7705. @c snarfed from unif.c:501
  7706. @deffn {Scheme Procedure} array? obj [prot]
  7707. @deffnx {C Function} scm_array_p (obj, prot)
  7708. Return @code{#t} if the @var{obj} is an array, and @code{#f} if
  7709. not.
  7710. @end deffn
  7711. typed-array?
  7712. @c snarfed from unif.c:548
  7713. @deffn {Scheme Procedure} typed-array? obj type
  7714. @deffnx {C Function} scm_typed_array_p (obj, type)
  7715. Return @code{#t} if the @var{obj} is an array of type
  7716. @var{type}, and @code{#f} if not.
  7717. @end deffn
  7718. array-rank
  7719. @c snarfed from unif.c:569
  7720. @deffn {Scheme Procedure} array-rank array
  7721. @deffnx {C Function} scm_array_rank (array)
  7722. Return the number of dimensions of the array @var{array.}
  7723. @end deffn
  7724. array-dimensions
  7725. @c snarfed from unif.c:583
  7726. @deffn {Scheme Procedure} array-dimensions ra
  7727. @deffnx {C Function} scm_array_dimensions (ra)
  7728. @code{array-dimensions} is similar to @code{array-shape} but replaces
  7729. elements with a @code{0} minimum with one greater than the maximum. So:
  7730. @lisp
  7731. (array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) 5)
  7732. @end lisp
  7733. @end deffn
  7734. shared-array-root
  7735. @c snarfed from unif.c:611
  7736. @deffn {Scheme Procedure} shared-array-root ra
  7737. @deffnx {C Function} scm_shared_array_root (ra)
  7738. Return the root vector of a shared array.
  7739. @end deffn
  7740. shared-array-offset
  7741. @c snarfed from unif.c:625
  7742. @deffn {Scheme Procedure} shared-array-offset ra
  7743. @deffnx {C Function} scm_shared_array_offset (ra)
  7744. Return the root vector index of the first element in the array.
  7745. @end deffn
  7746. shared-array-increments
  7747. @c snarfed from unif.c:641
  7748. @deffn {Scheme Procedure} shared-array-increments ra
  7749. @deffnx {C Function} scm_shared_array_increments (ra)
  7750. For each dimension, return the distance between elements in the root vector.
  7751. @end deffn
  7752. make-typed-array
  7753. @c snarfed from unif.c:740
  7754. @deffn {Scheme Procedure} make-typed-array type fill . bounds
  7755. @deffnx {C Function} scm_make_typed_array (type, fill, bounds)
  7756. Create and return an array of type @var{type}.
  7757. @end deffn
  7758. make-array
  7759. @c snarfed from unif.c:775
  7760. @deffn {Scheme Procedure} make-array fill . bounds
  7761. @deffnx {C Function} scm_make_array (fill, bounds)
  7762. Create and return an array.
  7763. @end deffn
  7764. dimensions->uniform-array
  7765. @c snarfed from unif.c:790
  7766. @deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
  7767. @deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
  7768. @deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
  7769. Create and return a uniform array or vector of type
  7770. corresponding to @var{prototype} with dimensions @var{dims} or
  7771. length @var{length}. If @var{fill} is supplied, it's used to
  7772. fill the array, otherwise @var{prototype} is used.
  7773. @end deffn
  7774. make-shared-array
  7775. @c snarfed from unif.c:843
  7776. @deffn {Scheme Procedure} make-shared-array oldra mapfunc . dims
  7777. @deffnx {C Function} scm_make_shared_array (oldra, mapfunc, dims)
  7778. @code{make-shared-array} can be used to create shared subarrays of other
  7779. arrays. The @var{mapper} is a function that translates coordinates in
  7780. the new array into coordinates in the old array. A @var{mapper} must be
  7781. linear, and its range must stay within the bounds of the old array, but
  7782. it can be otherwise arbitrary. A simple example:
  7783. @lisp
  7784. (define fred (make-array #f 8 8))
  7785. (define freds-diagonal
  7786. (make-shared-array fred (lambda (i) (list i i)) 8))
  7787. (array-set! freds-diagonal 'foo 3)
  7788. (array-ref fred 3 3) @result{} foo
  7789. (define freds-center
  7790. (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))
  7791. (array-ref freds-center 0 0) @result{} foo
  7792. @end lisp
  7793. @end deffn
  7794. transpose-array
  7795. @c snarfed from unif.c:961
  7796. @deffn {Scheme Procedure} transpose-array ra . args
  7797. @deffnx {C Function} scm_transpose_array (ra, args)
  7798. Return an array sharing contents with @var{array}, but with
  7799. dimensions arranged in a different order. There must be one
  7800. @var{dim} argument for each dimension of @var{array}.
  7801. @var{dim0}, @var{dim1}, @dots{} should be integers between 0
  7802. and the rank of the array to be returned. Each integer in that
  7803. range must appear at least once in the argument list.
  7804. The values of @var{dim0}, @var{dim1}, @dots{} correspond to
  7805. dimensions in the array to be returned, their positions in the
  7806. argument list to dimensions of @var{array}. Several @var{dim}s
  7807. may have the same value, in which case the returned array will
  7808. have smaller rank than @var{array}.
  7809. @lisp
  7810. (transpose-array '#2((a b) (c d)) 1 0) @result{} #2((a c) (b d))
  7811. (transpose-array '#2((a b) (c d)) 0 0) @result{} #1(a d)
  7812. (transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) @result{}
  7813. #2((a 4) (b 5) (c 6))
  7814. @end lisp
  7815. @end deffn
  7816. enclose-array
  7817. @c snarfed from unif.c:1059
  7818. @deffn {Scheme Procedure} enclose-array ra . axes
  7819. @deffnx {C Function} scm_enclose_array (ra, axes)
  7820. @var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than
  7821. the rank of @var{array}. @var{enclose-array} returns an array
  7822. resembling an array of shared arrays. The dimensions of each shared
  7823. array are the same as the @var{dim}th dimensions of the original array,
  7824. the dimensions of the outer array are the same as those of the original
  7825. array that did not match a @var{dim}.
  7826. An enclosed array is not a general Scheme array. Its elements may not
  7827. be set using @code{array-set!}. Two references to the same element of
  7828. an enclosed array will be @code{equal?} but will not in general be
  7829. @code{eq?}. The value returned by @var{array-prototype} when given an
  7830. enclosed array is unspecified.
  7831. examples:
  7832. @lisp
  7833. (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) @result{}
  7834. #<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))>
  7835. (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) @result{}
  7836. #<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))>
  7837. @end lisp
  7838. @end deffn
  7839. array-in-bounds?
  7840. @c snarfed from unif.c:1132
  7841. @deffn {Scheme Procedure} array-in-bounds? v . args
  7842. @deffnx {C Function} scm_array_in_bounds_p (v, args)
  7843. Return @code{#t} if its arguments would be acceptable to
  7844. @code{array-ref}.
  7845. @end deffn
  7846. array-ref
  7847. @c snarfed from unif.c:1209
  7848. @deffn {Scheme Procedure} array-ref v . args
  7849. @deffnx {C Function} scm_array_ref (v, args)
  7850. Return the element at the @code{(index1, index2)} element in
  7851. @var{array}.
  7852. @end deffn
  7853. array-set!
  7854. @c snarfed from unif.c:1226
  7855. @deffn {Scheme Procedure} array-set! v obj . args
  7856. @deffnx {C Function} scm_array_set_x (v, obj, args)
  7857. Set the element at the @code{(index1, index2)} element in @var{array} to
  7858. @var{new-value}. The value returned by array-set! is unspecified.
  7859. @end deffn
  7860. array-contents
  7861. @c snarfed from unif.c:1252
  7862. @deffn {Scheme Procedure} array-contents ra [strict]
  7863. @deffnx {C Function} scm_array_contents (ra, strict)
  7864. If @var{array} may be @dfn{unrolled} into a one dimensional shared array
  7865. without changing their order (last subscript changing fastest), then
  7866. @code{array-contents} returns that shared array, otherwise it returns
  7867. @code{#f}. All arrays made by @var{make-array} and
  7868. @var{make-uniform-array} may be unrolled, some arrays made by
  7869. @var{make-shared-array} may not be.
  7870. If the optional argument @var{strict} is provided, a shared array will
  7871. be returned only if its elements are stored internally contiguous in
  7872. memory.
  7873. @end deffn
  7874. uniform-array-read!
  7875. @c snarfed from unif.c:1352
  7876. @deffn {Scheme Procedure} uniform-array-read! ura [port_or_fd [start [end]]]
  7877. @deffnx {Scheme Procedure} uniform-vector-read! uve [port-or-fdes] [start] [end]
  7878. @deffnx {C Function} scm_uniform_array_read_x (ura, port_or_fd, start, end)
  7879. Attempt to read all elements of @var{ura}, in lexicographic order, as
  7880. binary objects from @var{port-or-fdes}.
  7881. If an end of file is encountered,
  7882. the objects up to that point are put into @var{ura}
  7883. (starting at the beginning) and the remainder of the array is
  7884. unchanged.
  7885. The optional arguments @var{start} and @var{end} allow
  7886. a specified region of a vector (or linearized array) to be read,
  7887. leaving the remainder of the vector unchanged.
  7888. @code{uniform-array-read!} returns the number of objects read.
  7889. @var{port-or-fdes} may be omitted, in which case it defaults to the value
  7890. returned by @code{(current-input-port)}.
  7891. @end deffn
  7892. uniform-array-write
  7893. @c snarfed from unif.c:1406
  7894. @deffn {Scheme Procedure} uniform-array-write ura [port_or_fd [start [end]]]
  7895. @deffnx {C Function} scm_uniform_array_write (ura, port_or_fd, start, end)
  7896. Writes all elements of @var{ura} as binary objects to
  7897. @var{port-or-fdes}.
  7898. The optional arguments @var{start}
  7899. and @var{end} allow
  7900. a specified region of a vector (or linearized array) to be written.
  7901. The number of objects actually written is returned.
  7902. @var{port-or-fdes} may be
  7903. omitted, in which case it defaults to the value returned by
  7904. @code{(current-output-port)}.
  7905. @end deffn
  7906. bitvector?
  7907. @c snarfed from unif.c:1518
  7908. @deffn {Scheme Procedure} bitvector? obj
  7909. @deffnx {C Function} scm_bitvector_p (obj)
  7910. Return @code{#t} when @var{obj} is a bitvector, else
  7911. return @code{#f}.
  7912. @end deffn
  7913. make-bitvector
  7914. @c snarfed from unif.c:1545
  7915. @deffn {Scheme Procedure} make-bitvector len [fill]
  7916. @deffnx {C Function} scm_make_bitvector (len, fill)
  7917. Create a new bitvector of length @var{len} and
  7918. optionally initialize all elements to @var{fill}.
  7919. @end deffn
  7920. bitvector
  7921. @c snarfed from unif.c:1554
  7922. @deffn {Scheme Procedure} bitvector . bits
  7923. @deffnx {C Function} scm_bitvector (bits)
  7924. Create a new bitvector with the arguments as elements.
  7925. @end deffn
  7926. bitvector-length
  7927. @c snarfed from unif.c:1570
  7928. @deffn {Scheme Procedure} bitvector-length vec
  7929. @deffnx {C Function} scm_bitvector_length (vec)
  7930. Return the length of the bitvector @var{vec}.
  7931. @end deffn
  7932. bitvector-ref
  7933. @c snarfed from unif.c:1661
  7934. @deffn {Scheme Procedure} bitvector-ref vec idx
  7935. @deffnx {C Function} scm_bitvector_ref (vec, idx)
  7936. Return the element at index @var{idx} of the bitvector
  7937. @var{vec}.
  7938. @end deffn
  7939. bitvector-set!
  7940. @c snarfed from unif.c:1704
  7941. @deffn {Scheme Procedure} bitvector-set! vec idx val
  7942. @deffnx {C Function} scm_bitvector_set_x (vec, idx, val)
  7943. Set the element at index @var{idx} of the bitvector
  7944. @var{vec} when @var{val} is true, else clear it.
  7945. @end deffn
  7946. bitvector-fill!
  7947. @c snarfed from unif.c:1715
  7948. @deffn {Scheme Procedure} bitvector-fill! vec val
  7949. @deffnx {C Function} scm_bitvector_fill_x (vec, val)
  7950. Set all elements of the bitvector
  7951. @var{vec} when @var{val} is true, else clear them.
  7952. @end deffn
  7953. list->bitvector
  7954. @c snarfed from unif.c:1760
  7955. @deffn {Scheme Procedure} list->bitvector list
  7956. @deffnx {C Function} scm_list_to_bitvector (list)
  7957. Return a new bitvector initialized with the elements
  7958. of @var{list}.
  7959. @end deffn
  7960. bitvector->list
  7961. @c snarfed from unif.c:1790
  7962. @deffn {Scheme Procedure} bitvector->list vec
  7963. @deffnx {C Function} scm_bitvector_to_list (vec)
  7964. Return a new list initialized with the elements
  7965. of the bitvector @var{vec}.
  7966. @end deffn
  7967. bit-count
  7968. @c snarfed from unif.c:1854
  7969. @deffn {Scheme Procedure} bit-count b bitvector
  7970. @deffnx {C Function} scm_bit_count (b, bitvector)
  7971. Return the number of occurrences of the boolean @var{b} in
  7972. @var{bitvector}.
  7973. @end deffn
  7974. bit-position
  7975. @c snarfed from unif.c:1923
  7976. @deffn {Scheme Procedure} bit-position item v k
  7977. @deffnx {C Function} scm_bit_position (item, v, k)
  7978. Return the index of the first occurrance of @var{item} in bit
  7979. vector @var{v}, starting from @var{k}. If there is no
  7980. @var{item} entry between @var{k} and the end of
  7981. @var{bitvector}, then return @code{#f}. For example,
  7982. @example
  7983. (bit-position #t #*000101 0) @result{} 3
  7984. (bit-position #f #*0001111 3) @result{} #f
  7985. @end example
  7986. @end deffn
  7987. bit-set*!
  7988. @c snarfed from unif.c:2006
  7989. @deffn {Scheme Procedure} bit-set*! v kv obj
  7990. @deffnx {C Function} scm_bit_set_star_x (v, kv, obj)
  7991. Set entries of bit vector @var{v} to @var{obj}, with @var{kv}
  7992. selecting the entries to change. The return value is
  7993. unspecified.
  7994. If @var{kv} is a bit vector, then those entries where it has
  7995. @code{#t} are the ones in @var{v} which are set to @var{obj}.
  7996. @var{kv} and @var{v} must be the same length. When @var{obj}
  7997. is @code{#t} it's like @var{kv} is OR'ed into @var{v}. Or when
  7998. @var{obj} is @code{#f} it can be seen as an ANDNOT.
  7999. @example
  8000. (define bv #*01000010)
  8001. (bit-set*! bv #*10010001 #t)
  8002. bv
  8003. @result{} #*11010011
  8004. @end example
  8005. If @var{kv} is a u32vector, then its elements are
  8006. indices into @var{v} which are set to @var{obj}.
  8007. @example
  8008. (define bv #*01000010)
  8009. (bit-set*! bv #u32(5 2 7) #t)
  8010. bv
  8011. @result{} #*01100111
  8012. @end example
  8013. @end deffn
  8014. bit-count*
  8015. @c snarfed from unif.c:2109
  8016. @deffn {Scheme Procedure} bit-count* v kv obj
  8017. @deffnx {C Function} scm_bit_count_star (v, kv, obj)
  8018. Return a count of how many entries in bit vector @var{v} are
  8019. equal to @var{obj}, with @var{kv} selecting the entries to
  8020. consider.
  8021. If @var{kv} is a bit vector, then those entries where it has
  8022. @code{#t} are the ones in @var{v} which are considered.
  8023. @var{kv} and @var{v} must be the same length.
  8024. If @var{kv} is a u32vector, then it contains
  8025. the indexes in @var{v} to consider.
  8026. For example,
  8027. @example
  8028. (bit-count* #*01110111 #*11001101 #t) @result{} 3
  8029. (bit-count* #*01110111 #u32(7 0 4) #f) @result{} 2
  8030. @end example
  8031. @end deffn
  8032. bit-invert!
  8033. @c snarfed from unif.c:2196
  8034. @deffn {Scheme Procedure} bit-invert! v
  8035. @deffnx {C Function} scm_bit_invert_x (v)
  8036. Modify the bit vector @var{v} by replacing each element with
  8037. its negation.
  8038. @end deffn
  8039. array->list
  8040. @c snarfed from unif.c:2303
  8041. @deffn {Scheme Procedure} array->list v
  8042. @deffnx {C Function} scm_array_to_list (v)
  8043. Return a list consisting of all the elements, in order, of
  8044. @var{array}.
  8045. @end deffn
  8046. list->typed-array
  8047. @c snarfed from unif.c:2332
  8048. @deffn {Scheme Procedure} list->typed-array type shape lst
  8049. @deffnx {C Function} scm_list_to_typed_array (type, shape, lst)
  8050. Return an array of the type @var{type}
  8051. with elements the same as those of @var{lst}.
  8052. The argument @var{shape} determines the number of dimensions
  8053. of the array and their shape. It is either an exact integer,
  8054. giving the
  8055. number of dimensions directly, or a list whose length
  8056. specifies the number of dimensions and each element specified
  8057. the lower and optionally the upper bound of the corresponding
  8058. dimension.
  8059. When the element is list of two elements, these elements
  8060. give the lower and upper bounds. When it is an exact
  8061. integer, it gives only the lower bound.
  8062. @end deffn
  8063. list->array
  8064. @c snarfed from unif.c:2390
  8065. @deffn {Scheme Procedure} list->array ndim lst
  8066. @deffnx {C Function} scm_list_to_array (ndim, lst)
  8067. Return an array with elements the same as those of @var{lst}.
  8068. @end deffn
  8069. list->uniform-array
  8070. @c snarfed from unif.c:2440
  8071. @deffn {Scheme Procedure} list->uniform-array ndim prot lst
  8072. @deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
  8073. Return a uniform array of the type indicated by prototype
  8074. @var{prot} with elements the same as those of @var{lst}.
  8075. Elements must be of the appropriate type, no coercions are
  8076. done.
  8077. The argument @var{ndim} determines the number of dimensions
  8078. of the array. It is either an exact integer, giving the
  8079. number directly, or a list of exact integers, whose length
  8080. specifies the number of dimensions and each element is the
  8081. lower index bound of its dimension.
  8082. @end deffn
  8083. array-type
  8084. @c snarfed from unif.c:2789
  8085. @deffn {Scheme Procedure} array-type ra
  8086. @deffnx {C Function} scm_array_type (ra)
  8087. @end deffn
  8088. array-prototype
  8089. @c snarfed from unif.c:2809
  8090. @deffn {Scheme Procedure} array-prototype ra
  8091. @deffnx {C Function} scm_array_prototype (ra)
  8092. Return an object that would produce an array of the same type
  8093. as @var{array}, if used as the @var{prototype} for
  8094. @code{make-uniform-array}.
  8095. @end deffn
  8096. dynamic-link
  8097. @c snarfed from dynl.c:149
  8098. @deffn {Scheme Procedure} dynamic-link filename
  8099. @deffnx {C Function} scm_dynamic_link (filename)
  8100. Find the shared object (shared library) denoted by
  8101. @var{filename} and link it into the running Guile
  8102. application. The returned
  8103. scheme object is a ``handle'' for the library which can
  8104. be passed to @code{dynamic-func}, @code{dynamic-call} etc.
  8105. Searching for object files is system dependent. Normally,
  8106. if @var{filename} does have an explicit directory it will
  8107. be searched for in locations
  8108. such as @file{/usr/lib} and @file{/usr/local/lib}.
  8109. @end deffn
  8110. dynamic-object?
  8111. @c snarfed from dynl.c:168
  8112. @deffn {Scheme Procedure} dynamic-object? obj
  8113. @deffnx {C Function} scm_dynamic_object_p (obj)
  8114. Return @code{#t} if @var{obj} is a dynamic object handle,
  8115. or @code{#f} otherwise.
  8116. @end deffn
  8117. dynamic-unlink
  8118. @c snarfed from dynl.c:182
  8119. @deffn {Scheme Procedure} dynamic-unlink dobj
  8120. @deffnx {C Function} scm_dynamic_unlink (dobj)
  8121. Unlink a dynamic object from the application, if possible. The
  8122. object must have been linked by @code{dynamic-link}, with
  8123. @var{dobj} the corresponding handle. After this procedure
  8124. is called, the handle can no longer be used to access the
  8125. object.
  8126. @end deffn
  8127. dynamic-func
  8128. @c snarfed from dynl.c:207
  8129. @deffn {Scheme Procedure} dynamic-func name dobj
  8130. @deffnx {C Function} scm_dynamic_func (name, dobj)
  8131. Return a ``handle'' for the function @var{name} in the
  8132. shared object referred to by @var{dobj}. The handle
  8133. can be passed to @code{dynamic-call} to actually
  8134. call the function.
  8135. Regardless whether your C compiler prepends an underscore
  8136. @samp{_} to the global names in a program, you should
  8137. @strong{not} include this underscore in @var{name}
  8138. since it will be added automatically when necessary.
  8139. @end deffn
  8140. dynamic-call
  8141. @c snarfed from dynl.c:253
  8142. @deffn {Scheme Procedure} dynamic-call func dobj
  8143. @deffnx {C Function} scm_dynamic_call (func, dobj)
  8144. Call a C function in a dynamic object. Two styles of
  8145. invocation are supported:
  8146. @itemize @bullet
  8147. @item @var{func} can be a function handle returned by
  8148. @code{dynamic-func}. In this case @var{dobj} is
  8149. ignored
  8150. @item @var{func} can be a string with the name of the
  8151. function to call, with @var{dobj} the handle of the
  8152. dynamic object in which to find the function.
  8153. This is equivalent to
  8154. @smallexample
  8155. (dynamic-call (dynamic-func @var{func} @var{dobj}) #f)
  8156. @end smallexample
  8157. @end itemize
  8158. In either case, the function is passed no arguments
  8159. and its return value is ignored.
  8160. @end deffn
  8161. dynamic-args-call
  8162. @c snarfed from dynl.c:285
  8163. @deffn {Scheme Procedure} dynamic-args-call func dobj args
  8164. @deffnx {C Function} scm_dynamic_args_call (func, dobj, args)
  8165. Call the C function indicated by @var{func} and @var{dobj},
  8166. just like @code{dynamic-call}, but pass it some arguments and
  8167. return its return value. The C function is expected to take
  8168. two arguments and return an @code{int}, just like @code{main}:
  8169. @smallexample
  8170. int c_func (int argc, char **argv);
  8171. @end smallexample
  8172. The parameter @var{args} must be a list of strings and is
  8173. converted into an array of @code{char *}. The array is passed
  8174. in @var{argv} and its size in @var{argc}. The return value is
  8175. converted to a Scheme number and returned from the call to
  8176. @code{dynamic-args-call}.
  8177. @end deffn
  8178. chown
  8179. @c snarfed from filesys.c:224
  8180. @deffn {Scheme Procedure} chown object owner group
  8181. @deffnx {C Function} scm_chown (object, owner, group)
  8182. Change the ownership and group of the file referred to by @var{object} to
  8183. the integer values @var{owner} and @var{group}. @var{object} can be
  8184. a string containing a file name or, if the platform
  8185. supports fchown, a port or integer file descriptor
  8186. which is open on the file. The return value
  8187. is unspecified.
  8188. If @var{object} is a symbolic link, either the
  8189. ownership of the link or the ownership of the referenced file will be
  8190. changed depending on the operating system (lchown is
  8191. unsupported at present). If @var{owner} or @var{group} is specified
  8192. as @code{-1}, then that ID is not changed.
  8193. @end deffn
  8194. chmod
  8195. @c snarfed from filesys.c:262
  8196. @deffn {Scheme Procedure} chmod object mode
  8197. @deffnx {C Function} scm_chmod (object, mode)
  8198. Changes the permissions of the file referred to by @var{obj}.
  8199. @var{obj} can be a string containing a file name or a port or integer file
  8200. descriptor which is open on a file (in which case @code{fchmod} is used
  8201. as the underlying system call).
  8202. @var{mode} specifies
  8203. the new permissions as a decimal number, e.g., @code{(chmod "foo" #o755)}.
  8204. The return value is unspecified.
  8205. @end deffn
  8206. umask
  8207. @c snarfed from filesys.c:294
  8208. @deffn {Scheme Procedure} umask [mode]
  8209. @deffnx {C Function} scm_umask (mode)
  8210. If @var{mode} is omitted, returns a decimal number representing the current
  8211. file creation mask. Otherwise the file creation mask is set to
  8212. @var{mode} and the previous value is returned.
  8213. E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18.
  8214. @end deffn
  8215. open-fdes
  8216. @c snarfed from filesys.c:316
  8217. @deffn {Scheme Procedure} open-fdes path flags [mode]
  8218. @deffnx {C Function} scm_open_fdes (path, flags, mode)
  8219. Similar to @code{open} but return a file descriptor instead of
  8220. a port.
  8221. @end deffn
  8222. open
  8223. @c snarfed from filesys.c:357
  8224. @deffn {Scheme Procedure} open path flags [mode]
  8225. @deffnx {C Function} scm_open (path, flags, mode)
  8226. Open the file named by @var{path} for reading and/or writing.
  8227. @var{flags} is an integer specifying how the file should be opened.
  8228. @var{mode} is an integer specifying the permission bits of the file, if
  8229. it needs to be created, before the umask is applied. The default is 666
  8230. (Unix itself has no default).
  8231. @var{flags} can be constructed by combining variables using @code{logior}.
  8232. Basic flags are:
  8233. @defvar O_RDONLY
  8234. Open the file read-only.
  8235. @end defvar
  8236. @defvar O_WRONLY
  8237. Open the file write-only.
  8238. @end defvar
  8239. @defvar O_RDWR
  8240. Open the file read/write.
  8241. @end defvar
  8242. @defvar O_APPEND
  8243. Append to the file instead of truncating.
  8244. @end defvar
  8245. @defvar O_CREAT
  8246. Create the file if it does not already exist.
  8247. @end defvar
  8248. See the Unix documentation of the @code{open} system call
  8249. for additional flags.
  8250. @end deffn
  8251. close
  8252. @c snarfed from filesys.c:395
  8253. @deffn {Scheme Procedure} close fd_or_port
  8254. @deffnx {C Function} scm_close (fd_or_port)
  8255. Similar to close-port (@pxref{Closing, close-port}),
  8256. but also works on file descriptors. A side
  8257. effect of closing a file descriptor is that any ports using that file
  8258. descriptor are moved to a different file descriptor and have
  8259. their revealed counts set to zero.
  8260. @end deffn
  8261. close-fdes
  8262. @c snarfed from filesys.c:422
  8263. @deffn {Scheme Procedure} close-fdes fd
  8264. @deffnx {C Function} scm_close_fdes (fd)
  8265. A simple wrapper for the @code{close} system call.
  8266. Close file descriptor @var{fd}, which must be an integer.
  8267. Unlike close (@pxref{Ports and File Descriptors, close}),
  8268. the file descriptor will be closed even if a port is using it.
  8269. The return value is unspecified.
  8270. @end deffn
  8271. stat
  8272. @c snarfed from filesys.c:624
  8273. @deffn {Scheme Procedure} stat object
  8274. @deffnx {C Function} scm_stat (object)
  8275. Return an object containing various information about the file
  8276. determined by @var{obj}. @var{obj} can be a string containing
  8277. a file name or a port or integer file descriptor which is open
  8278. on a file (in which case @code{fstat} is used as the underlying
  8279. system call).
  8280. The object returned by @code{stat} can be passed as a single
  8281. parameter to the following procedures, all of which return
  8282. integers:
  8283. @table @code
  8284. @item stat:dev
  8285. The device containing the file.
  8286. @item stat:ino
  8287. The file serial number, which distinguishes this file from all
  8288. other files on the same device.
  8289. @item stat:mode
  8290. The mode of the file. This includes file type information and
  8291. the file permission bits. See @code{stat:type} and
  8292. @code{stat:perms} below.
  8293. @item stat:nlink
  8294. The number of hard links to the file.
  8295. @item stat:uid
  8296. The user ID of the file's owner.
  8297. @item stat:gid
  8298. The group ID of the file.
  8299. @item stat:rdev
  8300. Device ID; this entry is defined only for character or block
  8301. special files.
  8302. @item stat:size
  8303. The size of a regular file in bytes.
  8304. @item stat:atime
  8305. The last access time for the file.
  8306. @item stat:mtime
  8307. The last modification time for the file.
  8308. @item stat:ctime
  8309. The last modification time for the attributes of the file.
  8310. @item stat:blksize
  8311. The optimal block size for reading or writing the file, in
  8312. bytes.
  8313. @item stat:blocks
  8314. The amount of disk space that the file occupies measured in
  8315. units of 512 byte blocks.
  8316. @end table
  8317. In addition, the following procedures return the information
  8318. from stat:mode in a more convenient form:
  8319. @table @code
  8320. @item stat:type
  8321. A symbol representing the type of file. Possible values are
  8322. regular, directory, symlink, block-special, char-special, fifo,
  8323. socket and unknown
  8324. @item stat:perms
  8325. An integer representing the access permission bits.
  8326. @end table
  8327. @end deffn
  8328. link
  8329. @c snarfed from filesys.c:686
  8330. @deffn {Scheme Procedure} link oldpath newpath
  8331. @deffnx {C Function} scm_link (oldpath, newpath)
  8332. Creates a new name @var{newpath} in the file system for the
  8333. file named by @var{oldpath}. If @var{oldpath} is a symbolic
  8334. link, the link may or may not be followed depending on the
  8335. system.
  8336. @end deffn
  8337. rename-file
  8338. @c snarfed from filesys.c:724
  8339. @deffn {Scheme Procedure} rename-file oldname newname
  8340. @deffnx {C Function} scm_rename (oldname, newname)
  8341. Renames the file specified by @var{oldname} to @var{newname}.
  8342. The return value is unspecified.
  8343. @end deffn
  8344. delete-file
  8345. @c snarfed from filesys.c:741
  8346. @deffn {Scheme Procedure} delete-file str
  8347. @deffnx {C Function} scm_delete_file (str)
  8348. Deletes (or "unlinks") the file specified by @var{path}.
  8349. @end deffn
  8350. mkdir
  8351. @c snarfed from filesys.c:758
  8352. @deffn {Scheme Procedure} mkdir path [mode]
  8353. @deffnx {C Function} scm_mkdir (path, mode)
  8354. Create a new directory named by @var{path}. If @var{mode} is omitted
  8355. then the permissions of the directory file are set using the current
  8356. umask. Otherwise they are set to the decimal value specified with
  8357. @var{mode}. The return value is unspecified.
  8358. @end deffn
  8359. rmdir
  8360. @c snarfed from filesys.c:785
  8361. @deffn {Scheme Procedure} rmdir path
  8362. @deffnx {C Function} scm_rmdir (path)
  8363. Remove the existing directory named by @var{path}. The directory must
  8364. be empty for this to succeed. The return value is unspecified.
  8365. @end deffn
  8366. directory-stream?
  8367. @c snarfed from filesys.c:809
  8368. @deffn {Scheme Procedure} directory-stream? obj
  8369. @deffnx {C Function} scm_directory_stream_p (obj)
  8370. Return a boolean indicating whether @var{object} is a directory
  8371. stream as returned by @code{opendir}.
  8372. @end deffn
  8373. opendir
  8374. @c snarfed from filesys.c:820
  8375. @deffn {Scheme Procedure} opendir dirname
  8376. @deffnx {C Function} scm_opendir (dirname)
  8377. Open the directory specified by @var{path} and return a directory
  8378. stream.
  8379. @end deffn
  8380. readdir
  8381. @c snarfed from filesys.c:841
  8382. @deffn {Scheme Procedure} readdir port
  8383. @deffnx {C Function} scm_readdir (port)
  8384. Return (as a string) the next directory entry from the directory stream
  8385. @var{stream}. If there is no remaining entry to be read then the
  8386. end of file object is returned.
  8387. @end deffn
  8388. rewinddir
  8389. @c snarfed from filesys.c:880
  8390. @deffn {Scheme Procedure} rewinddir port
  8391. @deffnx {C Function} scm_rewinddir (port)
  8392. Reset the directory port @var{stream} so that the next call to
  8393. @code{readdir} will return the first directory entry.
  8394. @end deffn
  8395. closedir
  8396. @c snarfed from filesys.c:897
  8397. @deffn {Scheme Procedure} closedir port
  8398. @deffnx {C Function} scm_closedir (port)
  8399. Close the directory stream @var{stream}.
  8400. The return value is unspecified.
  8401. @end deffn
  8402. chdir
  8403. @c snarfed from filesys.c:947
  8404. @deffn {Scheme Procedure} chdir str
  8405. @deffnx {C Function} scm_chdir (str)
  8406. Change the current working directory to @var{path}.
  8407. The return value is unspecified.
  8408. @end deffn
  8409. getcwd
  8410. @c snarfed from filesys.c:962
  8411. @deffn {Scheme Procedure} getcwd
  8412. @deffnx {C Function} scm_getcwd ()
  8413. Return the name of the current working directory.
  8414. @end deffn
  8415. select
  8416. @c snarfed from filesys.c:1164
  8417. @deffn {Scheme Procedure} select reads writes excepts [secs [usecs]]
  8418. @deffnx {C Function} scm_select (reads, writes, excepts, secs, usecs)
  8419. This procedure has a variety of uses: waiting for the ability
  8420. to provide input, accept output, or the existence of
  8421. exceptional conditions on a collection of ports or file
  8422. descriptors, or waiting for a timeout to occur.
  8423. It also returns if interrupted by a signal.
  8424. @var{reads}, @var{writes} and @var{excepts} can be lists or
  8425. vectors, with each member a port or a file descriptor.
  8426. The value returned is a list of three corresponding
  8427. lists or vectors containing only the members which meet the
  8428. specified requirement. The ability of port buffers to
  8429. provide input or accept output is taken into account.
  8430. Ordering of the input lists or vectors is not preserved.
  8431. The optional arguments @var{secs} and @var{usecs} specify the
  8432. timeout. Either @var{secs} can be specified alone, as
  8433. either an integer or a real number, or both @var{secs} and
  8434. @var{usecs} can be specified as integers, in which case
  8435. @var{usecs} is an additional timeout expressed in
  8436. microseconds. If @var{secs} is omitted or is @code{#f} then
  8437. select will wait for as long as it takes for one of the other
  8438. conditions to be satisfied.
  8439. The scsh version of @code{select} differs as follows:
  8440. Only vectors are accepted for the first three arguments.
  8441. The @var{usecs} argument is not supported.
  8442. Multiple values are returned instead of a list.
  8443. Duplicates in the input vectors appear only once in output.
  8444. An additional @code{select!} interface is provided.
  8445. @end deffn
  8446. fcntl
  8447. @c snarfed from filesys.c:1302
  8448. @deffn {Scheme Procedure} fcntl object cmd [value]
  8449. @deffnx {C Function} scm_fcntl (object, cmd, value)
  8450. Apply @var{command} to the specified file descriptor or the underlying
  8451. file descriptor of the specified port. @var{value} is an optional
  8452. integer argument.
  8453. Values for @var{command} are:
  8454. @table @code
  8455. @item F_DUPFD
  8456. Duplicate a file descriptor
  8457. @item F_GETFD
  8458. Get flags associated with the file descriptor.
  8459. @item F_SETFD
  8460. Set flags associated with the file descriptor to @var{value}.
  8461. @item F_GETFL
  8462. Get flags associated with the open file.
  8463. @item F_SETFL
  8464. Set flags associated with the open file to @var{value}
  8465. @item F_GETOWN
  8466. Get the process ID of a socket's owner, for @code{SIGIO} signals.
  8467. @item F_SETOWN
  8468. Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.
  8469. @item FD_CLOEXEC
  8470. The value used to indicate the "close on exec" flag with @code{F_GETFL} or
  8471. @code{F_SETFL}.
  8472. @end table
  8473. @end deffn
  8474. fsync
  8475. @c snarfed from filesys.c:1334
  8476. @deffn {Scheme Procedure} fsync object
  8477. @deffnx {C Function} scm_fsync (object)
  8478. Copies any unwritten data for the specified output file descriptor to disk.
  8479. If @var{port/fd} is a port, its buffer is flushed before the underlying
  8480. file descriptor is fsync'd.
  8481. The return value is unspecified.
  8482. @end deffn
  8483. symlink
  8484. @c snarfed from filesys.c:1359
  8485. @deffn {Scheme Procedure} symlink oldpath newpath
  8486. @deffnx {C Function} scm_symlink (oldpath, newpath)
  8487. Create a symbolic link named @var{path-to} with the value (i.e., pointing to)
  8488. @var{path-from}. The return value is unspecified.
  8489. @end deffn
  8490. readlink
  8491. @c snarfed from filesys.c:1378
  8492. @deffn {Scheme Procedure} readlink path
  8493. @deffnx {C Function} scm_readlink (path)
  8494. Return the value of the symbolic link named by @var{path} (a
  8495. string), i.e., the file that the link points to.
  8496. @end deffn
  8497. lstat
  8498. @c snarfed from filesys.c:1420
  8499. @deffn {Scheme Procedure} lstat str
  8500. @deffnx {C Function} scm_lstat (str)
  8501. Similar to @code{stat}, but does not follow symbolic links, i.e.,
  8502. it will return information about a symbolic link itself, not the
  8503. file it points to. @var{path} must be a string.
  8504. @end deffn
  8505. copy-file
  8506. @c snarfed from filesys.c:1443
  8507. @deffn {Scheme Procedure} copy-file oldfile newfile
  8508. @deffnx {C Function} scm_copy_file (oldfile, newfile)
  8509. Copy the file specified by @var{path-from} to @var{path-to}.
  8510. The return value is unspecified.
  8511. @end deffn
  8512. dirname
  8513. @c snarfed from filesys.c:1506
  8514. @deffn {Scheme Procedure} dirname filename
  8515. @deffnx {C Function} scm_dirname (filename)
  8516. Return the directory name component of the file name
  8517. @var{filename}. If @var{filename} does not contain a directory
  8518. component, @code{.} is returned.
  8519. @end deffn
  8520. basename
  8521. @c snarfed from filesys.c:1549
  8522. @deffn {Scheme Procedure} basename filename [suffix]
  8523. @deffnx {C Function} scm_basename (filename, suffix)
  8524. Return the base name of the file name @var{filename}. The
  8525. base name is the file name without any directory components.
  8526. If @var{suffix} is provided, and is equal to the end of
  8527. @var{basename}, it is removed also.
  8528. @end deffn
  8529. pipe
  8530. @c snarfed from posix.c:233
  8531. @deffn {Scheme Procedure} pipe
  8532. @deffnx {C Function} scm_pipe ()
  8533. Return a newly created pipe: a pair of ports which are linked
  8534. together on the local machine. The @emph{car} is the input
  8535. port and the @emph{cdr} is the output port. Data written (and
  8536. flushed) to the output port can be read from the input port.
  8537. Pipes are commonly used for communication with a newly forked
  8538. child process. The need to flush the output port can be
  8539. avoided by making it unbuffered using @code{setvbuf}.
  8540. Writes occur atomically provided the size of the data in bytes
  8541. is not greater than the value of @code{PIPE_BUF}. Note that
  8542. the output port is likely to block if too much data (typically
  8543. equal to @code{PIPE_BUF}) has been written but not yet read
  8544. from the input port.
  8545. @end deffn
  8546. getgroups
  8547. @c snarfed from posix.c:254
  8548. @deffn {Scheme Procedure} getgroups
  8549. @deffnx {C Function} scm_getgroups ()
  8550. Return a vector of integers representing the current
  8551. supplementary group IDs.
  8552. @end deffn
  8553. setgroups
  8554. @c snarfed from posix.c:287
  8555. @deffn {Scheme Procedure} setgroups group_vec
  8556. @deffnx {C Function} scm_setgroups (group_vec)
  8557. Set the current set of supplementary group IDs to the integers
  8558. in the given vector @var{vec}. The return value is
  8559. unspecified.
  8560. Generally only the superuser can set the process group IDs.
  8561. @end deffn
  8562. getpw
  8563. @c snarfed from posix.c:336
  8564. @deffn {Scheme Procedure} getpw [user]
  8565. @deffnx {C Function} scm_getpwuid (user)
  8566. Look up an entry in the user database. @var{obj} can be an integer,
  8567. a string, or omitted, giving the behaviour of getpwuid, getpwnam
  8568. or getpwent respectively.
  8569. @end deffn
  8570. setpw
  8571. @c snarfed from posix.c:386
  8572. @deffn {Scheme Procedure} setpw [arg]
  8573. @deffnx {C Function} scm_setpwent (arg)
  8574. If called with a true argument, initialize or reset the password data
  8575. stream. Otherwise, close the stream. The @code{setpwent} and
  8576. @code{endpwent} procedures are implemented on top of this.
  8577. @end deffn
  8578. getgr
  8579. @c snarfed from posix.c:405
  8580. @deffn {Scheme Procedure} getgr [name]
  8581. @deffnx {C Function} scm_getgrgid (name)
  8582. Look up an entry in the group database. @var{obj} can be an integer,
  8583. a string, or omitted, giving the behaviour of getgrgid, getgrnam
  8584. or getgrent respectively.
  8585. @end deffn
  8586. setgr
  8587. @c snarfed from posix.c:441
  8588. @deffn {Scheme Procedure} setgr [arg]
  8589. @deffnx {C Function} scm_setgrent (arg)
  8590. If called with a true argument, initialize or reset the group data
  8591. stream. Otherwise, close the stream. The @code{setgrent} and
  8592. @code{endgrent} procedures are implemented on top of this.
  8593. @end deffn
  8594. kill
  8595. @c snarfed from posix.c:477
  8596. @deffn {Scheme Procedure} kill pid sig
  8597. @deffnx {C Function} scm_kill (pid, sig)
  8598. Sends a signal to the specified process or group of processes.
  8599. @var{pid} specifies the processes to which the signal is sent:
  8600. @table @r
  8601. @item @var{pid} greater than 0
  8602. The process whose identifier is @var{pid}.
  8603. @item @var{pid} equal to 0
  8604. All processes in the current process group.
  8605. @item @var{pid} less than -1
  8606. The process group whose identifier is -@var{pid}
  8607. @item @var{pid} equal to -1
  8608. If the process is privileged, all processes except for some special
  8609. system processes. Otherwise, all processes with the current effective
  8610. user ID.
  8611. @end table
  8612. @var{sig} should be specified using a variable corresponding to
  8613. the Unix symbolic name, e.g.,
  8614. @defvar SIGHUP
  8615. Hang-up signal.
  8616. @end defvar
  8617. @defvar SIGINT
  8618. Interrupt signal.
  8619. @end defvar
  8620. @end deffn
  8621. waitpid
  8622. @c snarfed from posix.c:528
  8623. @deffn {Scheme Procedure} waitpid pid [options]
  8624. @deffnx {C Function} scm_waitpid (pid, options)
  8625. This procedure collects status information from a child process which
  8626. has terminated or (optionally) stopped. Normally it will
  8627. suspend the calling process until this can be done. If more than one
  8628. child process is eligible then one will be chosen by the operating system.
  8629. The value of @var{pid} determines the behaviour:
  8630. @table @r
  8631. @item @var{pid} greater than 0
  8632. Request status information from the specified child process.
  8633. @item @var{pid} equal to -1 or WAIT_ANY
  8634. Request status information for any child process.
  8635. @item @var{pid} equal to 0 or WAIT_MYPGRP
  8636. Request status information for any child process in the current process
  8637. group.
  8638. @item @var{pid} less than -1
  8639. Request status information for any child process whose process group ID
  8640. is -@var{PID}.
  8641. @end table
  8642. The @var{options} argument, if supplied, should be the bitwise OR of the
  8643. values of zero or more of the following variables:
  8644. @defvar WNOHANG
  8645. Return immediately even if there are no child processes to be collected.
  8646. @end defvar
  8647. @defvar WUNTRACED
  8648. Report status information for stopped processes as well as terminated
  8649. processes.
  8650. @end defvar
  8651. The return value is a pair containing:
  8652. @enumerate
  8653. @item
  8654. The process ID of the child process, or 0 if @code{WNOHANG} was
  8655. specified and no process was collected.
  8656. @item
  8657. The integer status value.
  8658. @end enumerate
  8659. @end deffn
  8660. status:exit-val
  8661. @c snarfed from posix.c:554
  8662. @deffn {Scheme Procedure} status:exit-val status
  8663. @deffnx {C Function} scm_status_exit_val (status)
  8664. Return the exit status value, as would be set if a process
  8665. ended normally through a call to @code{exit} or @code{_exit},
  8666. if any, otherwise @code{#f}.
  8667. @end deffn
  8668. status:term-sig
  8669. @c snarfed from posix.c:572
  8670. @deffn {Scheme Procedure} status:term-sig status
  8671. @deffnx {C Function} scm_status_term_sig (status)
  8672. Return the signal number which terminated the process, if any,
  8673. otherwise @code{#f}.
  8674. @end deffn
  8675. status:stop-sig
  8676. @c snarfed from posix.c:588
  8677. @deffn {Scheme Procedure} status:stop-sig status
  8678. @deffnx {C Function} scm_status_stop_sig (status)
  8679. Return the signal number which stopped the process, if any,
  8680. otherwise @code{#f}.
  8681. @end deffn
  8682. getppid
  8683. @c snarfed from posix.c:606
  8684. @deffn {Scheme Procedure} getppid
  8685. @deffnx {C Function} scm_getppid ()
  8686. Return an integer representing the process ID of the parent
  8687. process.
  8688. @end deffn
  8689. getuid
  8690. @c snarfed from posix.c:618
  8691. @deffn {Scheme Procedure} getuid
  8692. @deffnx {C Function} scm_getuid ()
  8693. Return an integer representing the current real user ID.
  8694. @end deffn
  8695. getgid
  8696. @c snarfed from posix.c:629
  8697. @deffn {Scheme Procedure} getgid
  8698. @deffnx {C Function} scm_getgid ()
  8699. Return an integer representing the current real group ID.
  8700. @end deffn
  8701. geteuid
  8702. @c snarfed from posix.c:643
  8703. @deffn {Scheme Procedure} geteuid
  8704. @deffnx {C Function} scm_geteuid ()
  8705. Return an integer representing the current effective user ID.
  8706. If the system does not support effective IDs, then the real ID
  8707. is returned. @code{(provided? 'EIDs)} reports whether the
  8708. system supports effective IDs.
  8709. @end deffn
  8710. getegid
  8711. @c snarfed from posix.c:660
  8712. @deffn {Scheme Procedure} getegid
  8713. @deffnx {C Function} scm_getegid ()
  8714. Return an integer representing the current effective group ID.
  8715. If the system does not support effective IDs, then the real ID
  8716. is returned. @code{(provided? 'EIDs)} reports whether the
  8717. system supports effective IDs.
  8718. @end deffn
  8719. setuid
  8720. @c snarfed from posix.c:676
  8721. @deffn {Scheme Procedure} setuid id
  8722. @deffnx {C Function} scm_setuid (id)
  8723. Sets both the real and effective user IDs to the integer @var{id}, provided
  8724. the process has appropriate privileges.
  8725. The return value is unspecified.
  8726. @end deffn
  8727. setgid
  8728. @c snarfed from posix.c:689
  8729. @deffn {Scheme Procedure} setgid id
  8730. @deffnx {C Function} scm_setgid (id)
  8731. Sets both the real and effective group IDs to the integer @var{id}, provided
  8732. the process has appropriate privileges.
  8733. The return value is unspecified.
  8734. @end deffn
  8735. seteuid
  8736. @c snarfed from posix.c:704
  8737. @deffn {Scheme Procedure} seteuid id
  8738. @deffnx {C Function} scm_seteuid (id)
  8739. Sets the effective user ID to the integer @var{id}, provided the process
  8740. has appropriate privileges. If effective IDs are not supported, the
  8741. real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
  8742. system supports effective IDs.
  8743. The return value is unspecified.
  8744. @end deffn
  8745. setegid
  8746. @c snarfed from posix.c:729
  8747. @deffn {Scheme Procedure} setegid id
  8748. @deffnx {C Function} scm_setegid (id)
  8749. Sets the effective group ID to the integer @var{id}, provided the process
  8750. has appropriate privileges. If effective IDs are not supported, the
  8751. real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
  8752. system supports effective IDs.
  8753. The return value is unspecified.
  8754. @end deffn
  8755. getpgrp
  8756. @c snarfed from posix.c:752
  8757. @deffn {Scheme Procedure} getpgrp
  8758. @deffnx {C Function} scm_getpgrp ()
  8759. Return an integer representing the current process group ID.
  8760. This is the POSIX definition, not BSD.
  8761. @end deffn
  8762. setpgid
  8763. @c snarfed from posix.c:770
  8764. @deffn {Scheme Procedure} setpgid pid pgid
  8765. @deffnx {C Function} scm_setpgid (pid, pgid)
  8766. Move the process @var{pid} into the process group @var{pgid}. @var{pid} or
  8767. @var{pgid} must be integers: they can be zero to indicate the ID of the
  8768. current process.
  8769. Fails on systems that do not support job control.
  8770. The return value is unspecified.
  8771. @end deffn
  8772. setsid
  8773. @c snarfed from posix.c:787
  8774. @deffn {Scheme Procedure} setsid
  8775. @deffnx {C Function} scm_setsid ()
  8776. Creates a new session. The current process becomes the session leader
  8777. and is put in a new process group. The process will be detached
  8778. from its controlling terminal if it has one.
  8779. The return value is an integer representing the new process group ID.
  8780. @end deffn
  8781. ttyname
  8782. @c snarfed from posix.c:811
  8783. @deffn {Scheme Procedure} ttyname port
  8784. @deffnx {C Function} scm_ttyname (port)
  8785. Return a string with the name of the serial terminal device
  8786. underlying @var{port}.
  8787. @end deffn
  8788. ctermid
  8789. @c snarfed from posix.c:850
  8790. @deffn {Scheme Procedure} ctermid
  8791. @deffnx {C Function} scm_ctermid ()
  8792. Return a string containing the file name of the controlling
  8793. terminal for the current process.
  8794. @end deffn
  8795. tcgetpgrp
  8796. @c snarfed from posix.c:874
  8797. @deffn {Scheme Procedure} tcgetpgrp port
  8798. @deffnx {C Function} scm_tcgetpgrp (port)
  8799. Return the process group ID of the foreground process group
  8800. associated with the terminal open on the file descriptor
  8801. underlying @var{port}.
  8802. If there is no foreground process group, the return value is a
  8803. number greater than 1 that does not match the process group ID
  8804. of any existing process group. This can happen if all of the
  8805. processes in the job that was formerly the foreground job have
  8806. terminated, and no other job has yet been moved into the
  8807. foreground.
  8808. @end deffn
  8809. tcsetpgrp
  8810. @c snarfed from posix.c:898
  8811. @deffn {Scheme Procedure} tcsetpgrp port pgid
  8812. @deffnx {C Function} scm_tcsetpgrp (port, pgid)
  8813. Set the foreground process group ID for the terminal used by the file
  8814. descriptor underlying @var{port} to the integer @var{pgid}.
  8815. The calling process
  8816. must be a member of the same session as @var{pgid} and must have the same
  8817. controlling terminal. The return value is unspecified.
  8818. @end deffn
  8819. execl
  8820. @c snarfed from posix.c:930
  8821. @deffn {Scheme Procedure} execl filename . args
  8822. @deffnx {C Function} scm_execl (filename, args)
  8823. Executes the file named by @var{path} as a new process image.
  8824. The remaining arguments are supplied to the process; from a C program
  8825. they are accessible as the @code{argv} argument to @code{main}.
  8826. Conventionally the first @var{arg} is the same as @var{path}.
  8827. All arguments must be strings.
  8828. If @var{arg} is missing, @var{path} is executed with a null
  8829. argument list, which may have system-dependent side-effects.
  8830. This procedure is currently implemented using the @code{execv} system
  8831. call, but we call it @code{execl} because of its Scheme calling interface.
  8832. @end deffn
  8833. execlp
  8834. @c snarfed from posix.c:961
  8835. @deffn {Scheme Procedure} execlp filename . args
  8836. @deffnx {C Function} scm_execlp (filename, args)
  8837. Similar to @code{execl}, however if
  8838. @var{filename} does not contain a slash
  8839. then the file to execute will be located by searching the
  8840. directories listed in the @code{PATH} environment variable.
  8841. This procedure is currently implemented using the @code{execvp} system
  8842. call, but we call it @code{execlp} because of its Scheme calling interface.
  8843. @end deffn
  8844. execle
  8845. @c snarfed from posix.c:995
  8846. @deffn {Scheme Procedure} execle filename env . args
  8847. @deffnx {C Function} scm_execle (filename, env, args)
  8848. Similar to @code{execl}, but the environment of the new process is
  8849. specified by @var{env}, which must be a list of strings as returned by the
  8850. @code{environ} procedure.
  8851. This procedure is currently implemented using the @code{execve} system
  8852. call, but we call it @code{execle} because of its Scheme calling interface.
  8853. @end deffn
  8854. primitive-fork
  8855. @c snarfed from posix.c:1031
  8856. @deffn {Scheme Procedure} primitive-fork
  8857. @deffnx {C Function} scm_fork ()
  8858. Creates a new "child" process by duplicating the current "parent" process.
  8859. In the child the return value is 0. In the parent the return value is
  8860. the integer process ID of the child.
  8861. This procedure has been renamed from @code{fork} to avoid a naming conflict
  8862. with the scsh fork.
  8863. @end deffn
  8864. uname
  8865. @c snarfed from posix.c:1051
  8866. @deffn {Scheme Procedure} uname
  8867. @deffnx {C Function} scm_uname ()
  8868. Return an object with some information about the computer
  8869. system the program is running on.
  8870. @end deffn
  8871. environ
  8872. @c snarfed from posix.c:1080
  8873. @deffn {Scheme Procedure} environ [env]
  8874. @deffnx {C Function} scm_environ (env)
  8875. If @var{env} is omitted, return the current environment (in the
  8876. Unix sense) as a list of strings. Otherwise set the current
  8877. environment, which is also the default environment for child
  8878. processes, to the supplied list of strings. Each member of
  8879. @var{env} should be of the form @code{NAME=VALUE} and values of
  8880. @code{NAME} should not be duplicated. If @var{env} is supplied
  8881. then the return value is unspecified.
  8882. @end deffn
  8883. tmpnam
  8884. @c snarfed from posix.c:1113
  8885. @deffn {Scheme Procedure} tmpnam
  8886. @deffnx {C Function} scm_tmpnam ()
  8887. Return a name in the file system that does not match any
  8888. existing file. However there is no guarantee that another
  8889. process will not create the file after @code{tmpnam} is called.
  8890. Care should be taken if opening the file, e.g., use the
  8891. @code{O_EXCL} open flag or use @code{mkstemp!} instead.
  8892. @end deffn
  8893. mkstemp!
  8894. @c snarfed from posix.c:1144
  8895. @deffn {Scheme Procedure} mkstemp! tmpl
  8896. @deffnx {C Function} scm_mkstemp (tmpl)
  8897. Create a new unique file in the file system and returns a new
  8898. buffered port open for reading and writing to the file.
  8899. @var{tmpl} is a string specifying where the file should be
  8900. created: it must end with @samp{XXXXXX} and will be changed in
  8901. place to return the name of the temporary file.
  8902. The file is created with mode @code{0600}, which means read and
  8903. write for the owner only. @code{chmod} can be used to change
  8904. this.
  8905. @end deffn
  8906. utime
  8907. @c snarfed from posix.c:1179
  8908. @deffn {Scheme Procedure} utime pathname [actime [modtime]]
  8909. @deffnx {C Function} scm_utime (pathname, actime, modtime)
  8910. @code{utime} sets the access and modification times for the
  8911. file named by @var{path}. If @var{actime} or @var{modtime} is
  8912. not supplied, then the current time is used. @var{actime} and
  8913. @var{modtime} must be integer time values as returned by the
  8914. @code{current-time} procedure.
  8915. @lisp
  8916. (utime "foo" (- (current-time) 3600))
  8917. @end lisp
  8918. will set the access time to one hour in the past and the
  8919. modification time to the current time.
  8920. @end deffn
  8921. access?
  8922. @c snarfed from posix.c:1244
  8923. @deffn {Scheme Procedure} access? path how
  8924. @deffnx {C Function} scm_access (path, how)
  8925. Test accessibility of a file under the real UID and GID of the
  8926. calling process. The return is @code{#t} if @var{path} exists
  8927. and the permissions requested by @var{how} are all allowed, or
  8928. @code{#f} if not.
  8929. @var{how} is an integer which is one of the following values,
  8930. or a bitwise-OR (@code{logior}) of multiple values.
  8931. @defvar R_OK
  8932. Test for read permission.
  8933. @end defvar
  8934. @defvar W_OK
  8935. Test for write permission.
  8936. @end defvar
  8937. @defvar X_OK
  8938. Test for execute permission.
  8939. @end defvar
  8940. @defvar F_OK
  8941. Test for existence of the file. This is implied by each of the
  8942. other tests, so there's no need to combine it with them.
  8943. @end defvar
  8944. It's important to note that @code{access?} does not simply
  8945. indicate what will happen on attempting to read or write a
  8946. file. In normal circumstances it does, but in a set-UID or
  8947. set-GID program it doesn't because @code{access?} tests the
  8948. real ID, whereas an open or execute attempt uses the effective
  8949. ID.
  8950. A program which will never run set-UID/GID can ignore the
  8951. difference between real and effective IDs, but for maximum
  8952. generality, especially in library functions, it's best not to
  8953. use @code{access?} to predict the result of an open or execute,
  8954. instead simply attempt that and catch any exception.
  8955. The main use for @code{access?} is to let a set-UID/GID program
  8956. determine what the invoking user would have been allowed to do,
  8957. without the greater (or perhaps lesser) privileges afforded by
  8958. the effective ID. For more on this, see ``Testing File
  8959. Access'' in The GNU C Library Reference Manual.
  8960. @end deffn
  8961. getpid
  8962. @c snarfed from posix.c:1257
  8963. @deffn {Scheme Procedure} getpid
  8964. @deffnx {C Function} scm_getpid ()
  8965. Return an integer representing the current process ID.
  8966. @end deffn
  8967. putenv
  8968. @c snarfed from posix.c:1274
  8969. @deffn {Scheme Procedure} putenv str
  8970. @deffnx {C Function} scm_putenv (str)
  8971. Modifies the environment of the current process, which is
  8972. also the default environment inherited by child processes.
  8973. If @var{string} is of the form @code{NAME=VALUE} then it will be written
  8974. directly into the environment, replacing any existing environment string
  8975. with
  8976. name matching @code{NAME}. If @var{string} does not contain an equal
  8977. sign, then any existing string with name matching @var{string} will
  8978. be removed.
  8979. The return value is unspecified.
  8980. @end deffn
  8981. setlocale
  8982. @c snarfed from posix.c:1358
  8983. @deffn {Scheme Procedure} setlocale category [locale]
  8984. @deffnx {C Function} scm_setlocale (category, locale)
  8985. If @var{locale} is omitted, return the current value of the
  8986. specified locale category as a system-dependent string.
  8987. @var{category} should be specified using the values
  8988. @code{LC_COLLATE}, @code{LC_ALL} etc.
  8989. Otherwise the specified locale category is set to the string
  8990. @var{locale} and the new value is returned as a
  8991. system-dependent string. If @var{locale} is an empty string,
  8992. the locale will be set using environment variables.
  8993. @end deffn
  8994. mknod
  8995. @c snarfed from posix.c:1407
  8996. @deffn {Scheme Procedure} mknod path type perms dev
  8997. @deffnx {C Function} scm_mknod (path, type, perms, dev)
  8998. Creates a new special file, such as a file corresponding to a device.
  8999. @var{path} specifies the name of the file. @var{type} should
  9000. be one of the following symbols:
  9001. regular, directory, symlink, block-special, char-special,
  9002. fifo, or socket. @var{perms} (an integer) specifies the file permissions.
  9003. @var{dev} (an integer) specifies which device the special file refers
  9004. to. Its exact interpretation depends on the kind of special file
  9005. being created.
  9006. E.g.,
  9007. @lisp
  9008. (mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2))
  9009. @end lisp
  9010. The return value is unspecified.
  9011. @end deffn
  9012. nice
  9013. @c snarfed from posix.c:1453
  9014. @deffn {Scheme Procedure} nice incr
  9015. @deffnx {C Function} scm_nice (incr)
  9016. Increment the priority of the current process by @var{incr}. A higher
  9017. priority value means that the process runs less often.
  9018. The return value is unspecified.
  9019. @end deffn
  9020. sync
  9021. @c snarfed from posix.c:1471
  9022. @deffn {Scheme Procedure} sync
  9023. @deffnx {C Function} scm_sync ()
  9024. Flush the operating system disk buffers.
  9025. The return value is unspecified.
  9026. @end deffn
  9027. crypt
  9028. @c snarfed from posix.c:1502
  9029. @deffn {Scheme Procedure} crypt key salt
  9030. @deffnx {C Function} scm_crypt (key, salt)
  9031. Encrypt @var{key} using @var{salt} as the salt value to the
  9032. crypt(3) library call.
  9033. @end deffn
  9034. chroot
  9035. @c snarfed from posix.c:1531
  9036. @deffn {Scheme Procedure} chroot path
  9037. @deffnx {C Function} scm_chroot (path)
  9038. Change the root directory to that specified in @var{path}.
  9039. This directory will be used for path names beginning with
  9040. @file{/}. The root directory is inherited by all children
  9041. of the current process. Only the superuser may change the
  9042. root directory.
  9043. @end deffn
  9044. getlogin
  9045. @c snarfed from posix.c:1565
  9046. @deffn {Scheme Procedure} getlogin
  9047. @deffnx {C Function} scm_getlogin ()
  9048. Return a string containing the name of the user logged in on
  9049. the controlling terminal of the process, or @code{#f} if this
  9050. information cannot be obtained.
  9051. @end deffn
  9052. cuserid
  9053. @c snarfed from posix.c:1583
  9054. @deffn {Scheme Procedure} cuserid
  9055. @deffnx {C Function} scm_cuserid ()
  9056. Return a string containing a user name associated with the
  9057. effective user id of the process. Return @code{#f} if this
  9058. information cannot be obtained.
  9059. @end deffn
  9060. getpriority
  9061. @c snarfed from posix.c:1609
  9062. @deffn {Scheme Procedure} getpriority which who
  9063. @deffnx {C Function} scm_getpriority (which, who)
  9064. Return the scheduling priority of the process, process group
  9065. or user, as indicated by @var{which} and @var{who}. @var{which}
  9066. is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
  9067. or @code{PRIO_USER}, and @var{who} is interpreted relative to
  9068. @var{which} (a process identifier for @code{PRIO_PROCESS},
  9069. process group identifier for @code{PRIO_PGRP}, and a user
  9070. identifier for @code{PRIO_USER}. A zero value of @var{who}
  9071. denotes the current process, process group, or user. Return
  9072. the highest priority (lowest numerical value) of any of the
  9073. specified processes.
  9074. @end deffn
  9075. setpriority
  9076. @c snarfed from posix.c:1643
  9077. @deffn {Scheme Procedure} setpriority which who prio
  9078. @deffnx {C Function} scm_setpriority (which, who, prio)
  9079. Set the scheduling priority of the process, process group
  9080. or user, as indicated by @var{which} and @var{who}. @var{which}
  9081. is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
  9082. or @code{PRIO_USER}, and @var{who} is interpreted relative to
  9083. @var{which} (a process identifier for @code{PRIO_PROCESS},
  9084. process group identifier for @code{PRIO_PGRP}, and a user
  9085. identifier for @code{PRIO_USER}. A zero value of @var{who}
  9086. denotes the current process, process group, or user.
  9087. @var{prio} is a value in the range -20 and 20, the default
  9088. priority is 0; lower priorities cause more favorable
  9089. scheduling. Sets the priority of all of the specified
  9090. processes. Only the super-user may lower priorities.
  9091. The return value is not specified.
  9092. @end deffn
  9093. getpass
  9094. @c snarfed from posix.c:1668
  9095. @deffn {Scheme Procedure} getpass prompt
  9096. @deffnx {C Function} scm_getpass (prompt)
  9097. Display @var{prompt} to the standard error output and read
  9098. a password from @file{/dev/tty}. If this file is not
  9099. accessible, it reads from standard input. The password may be
  9100. up to 127 characters in length. Additional characters and the
  9101. terminating newline character are discarded. While reading
  9102. the password, echoing and the generation of signals by special
  9103. characters is disabled.
  9104. @end deffn
  9105. flock
  9106. @c snarfed from posix.c:1780
  9107. @deffn {Scheme Procedure} flock file operation
  9108. @deffnx {C Function} scm_flock (file, operation)
  9109. Apply or remove an advisory lock on an open file.
  9110. @var{operation} specifies the action to be done:
  9111. @defvar LOCK_SH
  9112. Shared lock. More than one process may hold a shared lock
  9113. for a given file at a given time.
  9114. @end defvar
  9115. @defvar LOCK_EX
  9116. Exclusive lock. Only one process may hold an exclusive lock
  9117. for a given file at a given time.
  9118. @end defvar
  9119. @defvar LOCK_UN
  9120. Unlock the file.
  9121. @end defvar
  9122. @defvar LOCK_NB
  9123. Don't block when locking. This is combined with one of the
  9124. other operations using @code{logior}. If @code{flock} would
  9125. block an @code{EWOULDBLOCK} error is thrown.
  9126. @end defvar
  9127. The return value is not specified. @var{file} may be an open
  9128. file descriptor or an open file descriptor port.
  9129. Note that @code{flock} does not lock files across NFS.
  9130. @end deffn
  9131. sethostname
  9132. @c snarfed from posix.c:1805
  9133. @deffn {Scheme Procedure} sethostname name
  9134. @deffnx {C Function} scm_sethostname (name)
  9135. Set the host name of the current processor to @var{name}. May
  9136. only be used by the superuser. The return value is not
  9137. specified.
  9138. @end deffn
  9139. gethostname
  9140. @c snarfed from posix.c:1823
  9141. @deffn {Scheme Procedure} gethostname
  9142. @deffnx {C Function} scm_gethostname ()
  9143. Return the host name of the current processor.
  9144. @end deffn
  9145. gethost
  9146. @c snarfed from net_db.c:134
  9147. @deffn {Scheme Procedure} gethost [host]
  9148. @deffnx {Scheme Procedure} gethostbyname hostname
  9149. @deffnx {Scheme Procedure} gethostbyaddr address
  9150. @deffnx {C Function} scm_gethost (host)
  9151. Look up a host by name or address, returning a host object. The
  9152. @code{gethost} procedure will accept either a string name or an integer
  9153. address; if given no arguments, it behaves like @code{gethostent} (see
  9154. below). If a name or address is supplied but the address can not be
  9155. found, an error will be thrown to one of the keys:
  9156. @code{host-not-found}, @code{try-again}, @code{no-recovery} or
  9157. @code{no-data}, corresponding to the equivalent @code{h_error} values.
  9158. Unusual conditions may result in errors thrown to the
  9159. @code{system-error} or @code{misc_error} keys.
  9160. @end deffn
  9161. getnet
  9162. @c snarfed from net_db.c:216
  9163. @deffn {Scheme Procedure} getnet [net]
  9164. @deffnx {Scheme Procedure} getnetbyname net-name
  9165. @deffnx {Scheme Procedure} getnetbyaddr net-number
  9166. @deffnx {C Function} scm_getnet (net)
  9167. Look up a network by name or net number in the network database. The
  9168. @var{net-name} argument must be a string, and the @var{net-number}
  9169. argument must be an integer. @code{getnet} will accept either type of
  9170. argument, behaving like @code{getnetent} (see below) if no arguments are
  9171. given.
  9172. @end deffn
  9173. getproto
  9174. @c snarfed from net_db.c:268
  9175. @deffn {Scheme Procedure} getproto [protocol]
  9176. @deffnx {Scheme Procedure} getprotobyname name
  9177. @deffnx {Scheme Procedure} getprotobynumber number
  9178. @deffnx {C Function} scm_getproto (protocol)
  9179. Look up a network protocol by name or by number. @code{getprotobyname}
  9180. takes a string argument, and @code{getprotobynumber} takes an integer
  9181. argument. @code{getproto} will accept either type, behaving like
  9182. @code{getprotoent} (see below) if no arguments are supplied.
  9183. @end deffn
  9184. getserv
  9185. @c snarfed from net_db.c:334
  9186. @deffn {Scheme Procedure} getserv [name [protocol]]
  9187. @deffnx {Scheme Procedure} getservbyname name protocol
  9188. @deffnx {Scheme Procedure} getservbyport port protocol
  9189. @deffnx {C Function} scm_getserv (name, protocol)
  9190. Look up a network service by name or by service number, and return a
  9191. network service object. The @var{protocol} argument specifies the name
  9192. of the desired protocol; if the protocol found in the network service
  9193. database does not match this name, a system error is signalled.
  9194. The @code{getserv} procedure will take either a service name or number
  9195. as its first argument; if given no arguments, it behaves like
  9196. @code{getservent} (see below).
  9197. @end deffn
  9198. sethost
  9199. @c snarfed from net_db.c:385
  9200. @deffn {Scheme Procedure} sethost [stayopen]
  9201. @deffnx {C Function} scm_sethost (stayopen)
  9202. If @var{stayopen} is omitted, this is equivalent to @code{endhostent}.
  9203. Otherwise it is equivalent to @code{sethostent stayopen}.
  9204. @end deffn
  9205. setnet
  9206. @c snarfed from net_db.c:401
  9207. @deffn {Scheme Procedure} setnet [stayopen]
  9208. @deffnx {C Function} scm_setnet (stayopen)
  9209. If @var{stayopen} is omitted, this is equivalent to @code{endnetent}.
  9210. Otherwise it is equivalent to @code{setnetent stayopen}.
  9211. @end deffn
  9212. setproto
  9213. @c snarfed from net_db.c:417
  9214. @deffn {Scheme Procedure} setproto [stayopen]
  9215. @deffnx {C Function} scm_setproto (stayopen)
  9216. If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}.
  9217. Otherwise it is equivalent to @code{setprotoent stayopen}.
  9218. @end deffn
  9219. setserv
  9220. @c snarfed from net_db.c:433
  9221. @deffn {Scheme Procedure} setserv [stayopen]
  9222. @deffnx {C Function} scm_setserv (stayopen)
  9223. If @var{stayopen} is omitted, this is equivalent to @code{endservent}.
  9224. Otherwise it is equivalent to @code{setservent stayopen}.
  9225. @end deffn
  9226. htons
  9227. @c snarfed from socket.c:80
  9228. @deffn {Scheme Procedure} htons value
  9229. @deffnx {C Function} scm_htons (value)
  9230. Convert a 16 bit quantity from host to network byte ordering.
  9231. @var{value} is packed into 2 bytes, which are then converted
  9232. and returned as a new integer.
  9233. @end deffn
  9234. ntohs
  9235. @c snarfed from socket.c:91
  9236. @deffn {Scheme Procedure} ntohs value
  9237. @deffnx {C Function} scm_ntohs (value)
  9238. Convert a 16 bit quantity from network to host byte ordering.
  9239. @var{value} is packed into 2 bytes, which are then converted
  9240. and returned as a new integer.
  9241. @end deffn
  9242. htonl
  9243. @c snarfed from socket.c:102
  9244. @deffn {Scheme Procedure} htonl value
  9245. @deffnx {C Function} scm_htonl (value)
  9246. Convert a 32 bit quantity from host to network byte ordering.
  9247. @var{value} is packed into 4 bytes, which are then converted
  9248. and returned as a new integer.
  9249. @end deffn
  9250. ntohl
  9251. @c snarfed from socket.c:115
  9252. @deffn {Scheme Procedure} ntohl value
  9253. @deffnx {C Function} scm_ntohl (value)
  9254. Convert a 32 bit quantity from network to host byte ordering.
  9255. @var{value} is packed into 4 bytes, which are then converted
  9256. and returned as a new integer.
  9257. @end deffn
  9258. inet-aton
  9259. @c snarfed from socket.c:135
  9260. @deffn {Scheme Procedure} inet-aton address
  9261. @deffnx {C Function} scm_inet_aton (address)
  9262. Convert an IPv4 Internet address from printable string
  9263. (dotted decimal notation) to an integer. E.g.,
  9264. @lisp
  9265. (inet-aton "127.0.0.1") @result{} 2130706433
  9266. @end lisp
  9267. @end deffn
  9268. inet-ntoa
  9269. @c snarfed from socket.c:158
  9270. @deffn {Scheme Procedure} inet-ntoa inetid
  9271. @deffnx {C Function} scm_inet_ntoa (inetid)
  9272. Convert an IPv4 Internet address to a printable
  9273. (dotted decimal notation) string. E.g.,
  9274. @lisp
  9275. (inet-ntoa 2130706433) @result{} "127.0.0.1"
  9276. @end lisp
  9277. @end deffn
  9278. inet-netof
  9279. @c snarfed from socket.c:178
  9280. @deffn {Scheme Procedure} inet-netof address
  9281. @deffnx {C Function} scm_inet_netof (address)
  9282. Return the network number part of the given IPv4
  9283. Internet address. E.g.,
  9284. @lisp
  9285. (inet-netof 2130706433) @result{} 127
  9286. @end lisp
  9287. @end deffn
  9288. inet-lnaof
  9289. @c snarfed from socket.c:196
  9290. @deffn {Scheme Procedure} inet-lnaof address
  9291. @deffnx {C Function} scm_lnaof (address)
  9292. Return the local-address-with-network part of the given
  9293. IPv4 Internet address, using the obsolete class A/B/C system.
  9294. E.g.,
  9295. @lisp
  9296. (inet-lnaof 2130706433) @result{} 1
  9297. @end lisp
  9298. @end deffn
  9299. inet-makeaddr
  9300. @c snarfed from socket.c:214
  9301. @deffn {Scheme Procedure} inet-makeaddr net lna
  9302. @deffnx {C Function} scm_inet_makeaddr (net, lna)
  9303. Make an IPv4 Internet address by combining the network number
  9304. @var{net} with the local-address-within-network number
  9305. @var{lna}. E.g.,
  9306. @lisp
  9307. (inet-makeaddr 127 1) @result{} 2130706433
  9308. @end lisp
  9309. @end deffn
  9310. inet-pton
  9311. @c snarfed from socket.c:350
  9312. @deffn {Scheme Procedure} inet-pton family address
  9313. @deffnx {C Function} scm_inet_pton (family, address)
  9314. Convert a string containing a printable network address to
  9315. an integer address. Note that unlike the C version of this
  9316. function,
  9317. the result is an integer with normal host byte ordering.
  9318. @var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,
  9319. @lisp
  9320. (inet-pton AF_INET "127.0.0.1") @result{} 2130706433
  9321. (inet-pton AF_INET6 "::1") @result{} 1
  9322. @end lisp
  9323. @end deffn
  9324. inet-ntop
  9325. @c snarfed from socket.c:388
  9326. @deffn {Scheme Procedure} inet-ntop family address
  9327. @deffnx {C Function} scm_inet_ntop (family, address)
  9328. Convert a network address into a printable string.
  9329. Note that unlike the C version of this function,
  9330. the input is an integer with normal host byte ordering.
  9331. @var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,
  9332. @lisp
  9333. (inet-ntop AF_INET 2130706433) @result{} "127.0.0.1"
  9334. (inet-ntop AF_INET6 (- (expt 2 128) 1))
  9335. @result{} "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
  9336. @end lisp
  9337. @end deffn
  9338. socket
  9339. @c snarfed from socket.c:430
  9340. @deffn {Scheme Procedure} socket family style proto
  9341. @deffnx {C Function} scm_socket (family, style, proto)
  9342. Return a new socket port of the type specified by @var{family},
  9343. @var{style} and @var{proto}. All three parameters are
  9344. integers. Supported values for @var{family} are
  9345. @code{AF_UNIX}, @code{AF_INET} and @code{AF_INET6}.
  9346. Typical values for @var{style} are @code{SOCK_STREAM},
  9347. @code{SOCK_DGRAM} and @code{SOCK_RAW}.
  9348. @var{proto} can be obtained from a protocol name using
  9349. @code{getprotobyname}. A value of zero specifies the default
  9350. protocol, which is usually right.
  9351. A single socket port cannot by used for communication until it
  9352. has been connected to another socket.
  9353. @end deffn
  9354. socketpair
  9355. @c snarfed from socket.c:451
  9356. @deffn {Scheme Procedure} socketpair family style proto
  9357. @deffnx {C Function} scm_socketpair (family, style, proto)
  9358. Return a pair of connected (but unnamed) socket ports of the
  9359. type specified by @var{family}, @var{style} and @var{proto}.
  9360. Many systems support only socket pairs of the @code{AF_UNIX}
  9361. family. Zero is likely to be the only meaningful value for
  9362. @var{proto}.
  9363. @end deffn
  9364. getsockopt
  9365. @c snarfed from socket.c:476
  9366. @deffn {Scheme Procedure} getsockopt sock level optname
  9367. @deffnx {C Function} scm_getsockopt (sock, level, optname)
  9368. Return the value of a particular socket option for the socket
  9369. port @var{sock}. @var{level} is an integer code for type of
  9370. option being requested, e.g., @code{SOL_SOCKET} for
  9371. socket-level options. @var{optname} is an integer code for the
  9372. option required and should be specified using one of the
  9373. symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.
  9374. The returned value is typically an integer but @code{SO_LINGER}
  9375. returns a pair of integers.
  9376. @end deffn
  9377. setsockopt
  9378. @c snarfed from socket.c:544
  9379. @deffn {Scheme Procedure} setsockopt sock level optname value
  9380. @deffnx {C Function} scm_setsockopt (sock, level, optname, value)
  9381. Set the value of a particular socket option for the socket
  9382. port @var{sock}. @var{level} is an integer code for type of option
  9383. being set, e.g., @code{SOL_SOCKET} for socket-level options.
  9384. @var{optname} is an
  9385. integer code for the option to set and should be specified using one of
  9386. the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.
  9387. @var{value} is the value to which the option should be set. For
  9388. most options this must be an integer, but for @code{SO_LINGER} it must
  9389. be a pair.
  9390. The return value is unspecified.
  9391. @end deffn
  9392. shutdown
  9393. @c snarfed from socket.c:646
  9394. @deffn {Scheme Procedure} shutdown sock how
  9395. @deffnx {C Function} scm_shutdown (sock, how)
  9396. Sockets can be closed simply by using @code{close-port}. The
  9397. @code{shutdown} procedure allows reception or transmission on a
  9398. connection to be shut down individually, according to the parameter
  9399. @var{how}:
  9400. @table @asis
  9401. @item 0
  9402. Stop receiving data for this socket. If further data arrives, reject it.
  9403. @item 1
  9404. Stop trying to transmit data from this socket. Discard any
  9405. data waiting to be sent. Stop looking for acknowledgement of
  9406. data already sent; don't retransmit it if it is lost.
  9407. @item 2
  9408. Stop both reception and transmission.
  9409. @end table
  9410. The return value is unspecified.
  9411. @end deffn
  9412. connect
  9413. @c snarfed from socket.c:789
  9414. @deffn {Scheme Procedure} connect sock fam address . args
  9415. @deffnx {C Function} scm_connect (sock, fam, address, args)
  9416. Initiate a connection from a socket using a specified address
  9417. family to the address
  9418. specified by @var{address} and possibly @var{args}.
  9419. The format required for @var{address}
  9420. and @var{args} depends on the family of the socket.
  9421. For a socket of family @code{AF_UNIX},
  9422. only @var{address} is specified and must be a string with the
  9423. filename where the socket is to be created.
  9424. For a socket of family @code{AF_INET},
  9425. @var{address} must be an integer IPv4 host address and
  9426. @var{args} must be a single integer port number.
  9427. For a socket of family @code{AF_INET6},
  9428. @var{address} must be an integer IPv6 host address and
  9429. @var{args} may be up to three integers:
  9430. port [flowinfo] [scope_id],
  9431. where flowinfo and scope_id default to zero.
  9432. The return value is unspecified.
  9433. @end deffn
  9434. bind
  9435. @c snarfed from socket.c:848
  9436. @deffn {Scheme Procedure} bind sock fam address . args
  9437. @deffnx {C Function} scm_bind (sock, fam, address, args)
  9438. Assign an address to the socket port @var{sock}.
  9439. Generally this only needs to be done for server sockets,
  9440. so they know where to look for incoming connections. A socket
  9441. without an address will be assigned one automatically when it
  9442. starts communicating.
  9443. The format of @var{address} and @var{args} depends
  9444. on the family of the socket.
  9445. For a socket of family @code{AF_UNIX}, only @var{address}
  9446. is specified and must be a string with the filename where
  9447. the socket is to be created.
  9448. For a socket of family @code{AF_INET}, @var{address}
  9449. must be an integer IPv4 address and @var{args}
  9450. must be a single integer port number.
  9451. The values of the following variables can also be used for
  9452. @var{address}:
  9453. @defvar INADDR_ANY
  9454. Allow connections from any address.
  9455. @end defvar
  9456. @defvar INADDR_LOOPBACK
  9457. The address of the local host using the loopback device.
  9458. @end defvar
  9459. @defvar INADDR_BROADCAST
  9460. The broadcast address on the local network.
  9461. @end defvar
  9462. @defvar INADDR_NONE
  9463. No address.
  9464. @end defvar
  9465. For a socket of family @code{AF_INET6}, @var{address}
  9466. must be an integer IPv6 address and @var{args}
  9467. may be up to three integers:
  9468. port [flowinfo] [scope_id],
  9469. where flowinfo and scope_id default to zero.
  9470. The return value is unspecified.
  9471. @end deffn
  9472. listen
  9473. @c snarfed from socket.c:881
  9474. @deffn {Scheme Procedure} listen sock backlog
  9475. @deffnx {C Function} scm_listen (sock, backlog)
  9476. Enable @var{sock} to accept connection
  9477. requests. @var{backlog} is an integer specifying
  9478. the maximum length of the queue for pending connections.
  9479. If the queue fills, new clients will fail to connect until
  9480. the server calls @code{accept} to accept a connection from
  9481. the queue.
  9482. The return value is unspecified.
  9483. @end deffn
  9484. accept
  9485. @c snarfed from socket.c:993
  9486. @deffn {Scheme Procedure} accept sock
  9487. @deffnx {C Function} scm_accept (sock)
  9488. Accept a connection on a bound, listening socket.
  9489. If there
  9490. are no pending connections in the queue, wait until
  9491. one is available unless the non-blocking option has been
  9492. set on the socket.
  9493. The return value is a
  9494. pair in which the @emph{car} is a new socket port for the
  9495. connection and
  9496. the @emph{cdr} is an object with address information about the
  9497. client which initiated the connection.
  9498. @var{sock} does not become part of the
  9499. connection and will continue to accept new requests.
  9500. @end deffn
  9501. getsockname
  9502. @c snarfed from socket.c:1020
  9503. @deffn {Scheme Procedure} getsockname sock
  9504. @deffnx {C Function} scm_getsockname (sock)
  9505. Return the address of @var{sock}, in the same form as the
  9506. object returned by @code{accept}. On many systems the address
  9507. of a socket in the @code{AF_FILE} namespace cannot be read.
  9508. @end deffn
  9509. getpeername
  9510. @c snarfed from socket.c:1042
  9511. @deffn {Scheme Procedure} getpeername sock
  9512. @deffnx {C Function} scm_getpeername (sock)
  9513. Return the address that @var{sock}
  9514. is connected to, in the same form as the object returned by
  9515. @code{accept}. On many systems the address of a socket in the
  9516. @code{AF_FILE} namespace cannot be read.
  9517. @end deffn
  9518. recv!
  9519. @c snarfed from socket.c:1077
  9520. @deffn {Scheme Procedure} recv! sock buf [flags]
  9521. @deffnx {C Function} scm_recv (sock, buf, flags)
  9522. Receive data from a socket port.
  9523. @var{sock} must already
  9524. be bound to the address from which data is to be received.
  9525. @var{buf} is a string into which
  9526. the data will be written. The size of @var{buf} limits
  9527. the amount of
  9528. data which can be received: in the case of packet
  9529. protocols, if a packet larger than this limit is encountered
  9530. then some data
  9531. will be irrevocably lost.
  9532. The optional @var{flags} argument is a value or
  9533. bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  9534. The value returned is the number of bytes read from the
  9535. socket.
  9536. Note that the data is read directly from the socket file
  9537. descriptor:
  9538. any unread buffered port data is ignored.
  9539. @end deffn
  9540. send
  9541. @c snarfed from socket.c:1120
  9542. @deffn {Scheme Procedure} send sock message [flags]
  9543. @deffnx {C Function} scm_send (sock, message, flags)
  9544. Transmit the string @var{message} on a socket port @var{sock}.
  9545. @var{sock} must already be bound to a destination address. The
  9546. value returned is the number of bytes transmitted --
  9547. it's possible for
  9548. this to be less than the length of @var{message}
  9549. if the socket is
  9550. set to be non-blocking. The optional @var{flags} argument
  9551. is a value or
  9552. bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  9553. Note that the data is written directly to the socket
  9554. file descriptor:
  9555. any unflushed buffered port data is ignored.
  9556. @end deffn
  9557. recvfrom!
  9558. @c snarfed from socket.c:1171
  9559. @deffn {Scheme Procedure} recvfrom! sock str [flags [start [end]]]
  9560. @deffnx {C Function} scm_recvfrom (sock, str, flags, start, end)
  9561. Return data from the socket port @var{sock} and also
  9562. information about where the data was received from.
  9563. @var{sock} must already be bound to the address from which
  9564. data is to be received. @code{str}, is a string into which the
  9565. data will be written. The size of @var{str} limits the amount
  9566. of data which can be received: in the case of packet protocols,
  9567. if a packet larger than this limit is encountered then some
  9568. data will be irrevocably lost.
  9569. The optional @var{flags} argument is a value or bitwise OR of
  9570. @code{MSG_OOB}, @code{MSG_PEEK}, @code{MSG_DONTROUTE} etc.
  9571. The value returned is a pair: the @emph{car} is the number of
  9572. bytes read from the socket and the @emph{cdr} an address object
  9573. in the same form as returned by @code{accept}. The address
  9574. will given as @code{#f} if not available, as is usually the
  9575. case for stream sockets.
  9576. The @var{start} and @var{end} arguments specify a substring of
  9577. @var{str} to which the data should be written.
  9578. Note that the data is read directly from the socket file
  9579. descriptor: any unread buffered port data is ignored.
  9580. @end deffn
  9581. sendto
  9582. @c snarfed from socket.c:1236
  9583. @deffn {Scheme Procedure} sendto sock message fam address . args_and_flags
  9584. @deffnx {C Function} scm_sendto (sock, message, fam, address, args_and_flags)
  9585. Transmit the string @var{message} on the socket port
  9586. @var{sock}. The
  9587. destination address is specified using the @var{fam},
  9588. @var{address} and
  9589. @var{args_and_flags} arguments, in a similar way to the
  9590. @code{connect} procedure. @var{args_and_flags} contains
  9591. the usual connection arguments optionally followed by
  9592. a flags argument, which is a value or
  9593. bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  9594. The value returned is the number of bytes transmitted --
  9595. it's possible for
  9596. this to be less than the length of @var{message} if the
  9597. socket is
  9598. set to be non-blocking.
  9599. Note that the data is written directly to the socket
  9600. file descriptor:
  9601. any unflushed buffered port data is ignored.
  9602. @end deffn
  9603. regexp?
  9604. @c snarfed from regex-posix.c:106
  9605. @deffn {Scheme Procedure} regexp? obj
  9606. @deffnx {C Function} scm_regexp_p (obj)
  9607. Return @code{#t} if @var{obj} is a compiled regular expression,
  9608. or @code{#f} otherwise.
  9609. @end deffn
  9610. make-regexp
  9611. @c snarfed from regex-posix.c:151
  9612. @deffn {Scheme Procedure} make-regexp pat . flags
  9613. @deffnx {C Function} scm_make_regexp (pat, flags)
  9614. Compile the regular expression described by @var{pat}, and
  9615. return the compiled regexp structure. If @var{pat} does not
  9616. describe a legal regular expression, @code{make-regexp} throws
  9617. a @code{regular-expression-syntax} error.
  9618. The @var{flags} arguments change the behavior of the compiled
  9619. regular expression. The following flags may be supplied:
  9620. @table @code
  9621. @item regexp/icase
  9622. Consider uppercase and lowercase letters to be the same when
  9623. matching.
  9624. @item regexp/newline
  9625. If a newline appears in the target string, then permit the
  9626. @samp{^} and @samp{$} operators to match immediately after or
  9627. immediately before the newline, respectively. Also, the
  9628. @samp{.} and @samp{[^...]} operators will never match a newline
  9629. character. The intent of this flag is to treat the target
  9630. string as a buffer containing many lines of text, and the
  9631. regular expression as a pattern that may match a single one of
  9632. those lines.
  9633. @item regexp/basic
  9634. Compile a basic (``obsolete'') regexp instead of the extended
  9635. (``modern'') regexps that are the default. Basic regexps do
  9636. not consider @samp{|}, @samp{+} or @samp{?} to be special
  9637. characters, and require the @samp{@{...@}} and @samp{(...)}
  9638. metacharacters to be backslash-escaped (@pxref{Backslash
  9639. Escapes}). There are several other differences between basic
  9640. and extended regular expressions, but these are the most
  9641. significant.
  9642. @item regexp/extended
  9643. Compile an extended regular expression rather than a basic
  9644. regexp. This is the default behavior; this flag will not
  9645. usually be needed. If a call to @code{make-regexp} includes
  9646. both @code{regexp/basic} and @code{regexp/extended} flags, the
  9647. one which comes last will override the earlier one.
  9648. @end table
  9649. @end deffn
  9650. regexp-exec
  9651. @c snarfed from regex-posix.c:217
  9652. @deffn {Scheme Procedure} regexp-exec rx str [start [flags]]
  9653. @deffnx {C Function} scm_regexp_exec (rx, str, start, flags)
  9654. Match the compiled regular expression @var{rx} against
  9655. @code{str}. If the optional integer @var{start} argument is
  9656. provided, begin matching from that position in the string.
  9657. Return a match structure describing the results of the match,
  9658. or @code{#f} if no match could be found.
  9659. The @var{flags} arguments change the matching behavior.
  9660. The following flags may be supplied:
  9661. @table @code
  9662. @item regexp/notbol
  9663. Operator @samp{^} always fails (unless @code{regexp/newline}
  9664. is used). Use this when the beginning of the string should
  9665. not be considered the beginning of a line.
  9666. @item regexp/noteol
  9667. Operator @samp{$} always fails (unless @code{regexp/newline}
  9668. is used). Use this when the end of the string should not be
  9669. considered the end of a line.
  9670. @end table
  9671. @end deffn