÷ƒ’À; è TeX output 2020.10.30:1007‹ ÿÿÿÿŸò Ž ƒ33 þšà‘GóKÂÖN ¼j cmbx12ëKGNU–ÆqHistory“LibraryŽŽ‘GŸ0‰ ±ž¸Ÿšª’ Õ@„ó6Kñ`y
ó3
cmr10áEdition–¦f8.1,“for“ó7ßê<x
ó3
cmtt10âHistory“Library“áV‘ÿeersion“8.1.ŽŸ
’qiOctobMÞer‘¦f2020Ž õzó]ÂÖN ff cmbx12ë]Chet–ffRamey›þ¦f,“Case“W˜estern“ReservšŒÌe“Univ˜ersit˜yŽŸ Brian–ffF›þ¦foŒÌx,“F˜ree“Soft•ŒÌw“are‘ffF˜oundationŽŸÌ̉ ±ž¸ŽŒ‹ *Ÿò Ž ƒ33Ÿfh‘GáThis–K§došMÞcumen²!t“describ˜es“the“GNU‘K}History“library“(v²!ersion“8.1,‘t÷29“Octob˜er“2020),‘t÷a“pro-Ž¤
33‘Ggramming–¯toMÞol“that‘¯proš²!vides“a“consisten˜t“user‘¯in˜terface“for“recalling“lines‘¯of“previously“t˜ypMÞedŽ¡‘Ginput.Ž¤33‘GCop•²!yrigh“t‘±ž«‚cŽŽŽ‘¦fó?!",š
ó3
cmsy10ê
ŽŽŽŽ‘@á1988{2020–¦fF›ÿeree“Soft•²!w“are–¦fF˜oundation,“Inc.Ž¡‘.ùœP•²!ermission›t#is‘t"gran“ted˜to›t"cop“y‘ÿe,‘±ddistribute˜and/or–t#moMÞdify˜this“doMÞcumen²!t˜under“theŽ¤
33‘.ùœterms–
~of“the“GNU‘
WF›ÿeree“DoMÞcumen²!tation“License,‘)V˜ersion“1.3“or“anš²!y“later“v˜ersionŽ¡‘.ùœpublished–^õbš²!y“the“F‘ÿeree“Soft˜w˜are“F‘ÿeoundation;‘;<with“no“In˜v‘ÿdDarian˜t“Sections,‘ÍnoŽ¡‘.ùœF›ÿeron•²!t-Co“v“er–xfT˜exts,‘™and›xeno“Bac•²!k-Co“v“er˜T‘ÿeexts.‘ΈA‘xZcop“y–xfof˜the“license˜is“includedŽ¡‘.ùœin–¦fthe“section“enš²!titled“\GNU“F‘ÿeree“DoMÞcumen˜tation“License".ŽŽŒ‹ÿÿÿÿ ÛŸò ’À¥TáiŽŽŽ ƒ33 ý ÌÍ‘GóTÂÖN G® cmbx12ëTT‘þaGable–z³of“Con–ÿuÂten“tsŽŽŽŒ‹ »Ÿò ’¾6eá1ŽŽŽ ƒ33 ý ÌÍ‘GëT1‘ ¸QUsing–z³History“In–ÿuÂteractiv“elyŽŽŸxŠ‘GáThis–‚cš²!hapter‘describMÞes“ho˜w›to“use˜the“ó<Œ-ø
ó3
cmcsc10çgnu˜áHistory“Library˜in•²!teractiv“ely‘ÿe,‘zfrom˜a‘‚user'sŽ¤
33‘GstandpšMÞoin²!t.‘ úIt–pshould“b˜e›oconsidered“a“user's˜guide.‘ úF‘ÿeor“information“on“using˜the“çgnuŽ¡‘GáHistory–5½Library“in“yš²!our“o˜wn“programs,‘Y’see“Chapter“2“[Programming“with“GNU‘5˜History],Ž¡‘Gpage‘¦f4.ŽŸ‚#‘Gë]1.1‘™History‘f@ExpansionŽŽŸ33‘GáThe–pHistory“library“pro²!vides›pa“history“expansion“feature“that“is˜similar“to“the“historyŽ¡‘Gexpansion–eproš²!vided“b˜y“âcshá.‘
¶This“section“describMÞes“the“syn˜tax‘eused“to“manipulate“theŽ¡‘Ghistory‘¦finformation.Ž©tD‘!GHistory–¨3expansions“inš²!troMÞduce“w˜ords“from“the“history“list“in˜to“the“input“stream,‘¨¦makingŽ¡‘Git–¦deasy“to›¦crepMÞeat“commands,‘¦einsert˜the“argumen²!ts“to“a“previous“command˜inš²!to“the“curren˜tŽ¡‘Ginput–¦fline,“or“x“errors“in“previous“commands“quic²!kly‘ÿe.Ž¦‘!GHistory–g
expansion“takš²!es“place“in“t˜w˜o“parts.‘ÉThe“rst“is“to“determine“whic˜h“line“fromŽ¡‘Gthe–÷§history“list›÷¦should“bMÞe“used“during˜substitution.‘Ñ The˜second“is“to“select˜pMÞortions“ofŽ¡‘Gthat–¬line“for‘¬inclusion“inš²!to“the“curren˜t“one.‘î¸The“line“selected“from“the‘¬history“is“called“theŽ¡‘Gó:p®0J
ó3
cmsl10åev•²!en“tá,‘Wðand–DSthe“pMÞortions›DRof“that“line“that˜are“acted“upMÞon“are˜called“åw²!ordsá.‘½,V‘ÿearious“åmoMÞdiersŽ¡‘Gáare–õ-aš²!v‘ÿdDailable“to“manipulate“the“selected“w˜ords.‘Ê3The“line“is“brok˜en“in˜to“w˜ords“in“the“sameŽ¡‘Gfashion–¼Ëthat›¼ÊBash“doMÞes,‘ëƒso˜that“sev•²!eral˜w“ords‘¼Ësurrounded˜b“y–¼Ëquotes˜are“considered˜one“w²!ord.Ž¡‘GHistory–kãexpansions‘kâare“inš²!troMÞduced“b˜y›kâthe“appMÞearance˜of“the“history˜expansion“c²!haracter,Ž¡‘Gwhicš²!h–¦fis“`â!á'“b˜y“default.ŽŸtE‘!GHistory–%>expansion‘%=implemenš²!ts“shell-lik˜e“quoting–%=con˜v˜en˜tions:‘Ja“bac˜kslash–%>can“bMÞe‘%=used“toŽ¡‘Gremo•²!v“e–ä+the“spMÞecial“handling“for“the“next“cš²!haracter;‘$êsingle“quotes“enclose“v˜erbatim“sequencesŽ¡‘Gof–€Jcš²!haracters,‘‡éand“can“bMÞe“used“to“inhibit‘€Ihistory“expansion;‘Œþand“c˜haracters“enclosed“withinŽ¡‘Gdouble–µ«quotes›µ¬ma²!y“bMÞe“sub‘ ›»ject˜to“history˜expansion,‘¹|since˜bac²!kslash“can“escapMÞe˜the“historyŽ¡‘Gexpansion–Žècš²!haracter,‘“šbut“single“quotes‘Žçma˜y“not,‘“›since›Žçthey“are“not“treated˜spMÞecially“withinŽ¡‘Gdouble‘¦fquotes.ŽŸ‚"‘GógÂÖN
#× cmbx12ëg1.1.1‘d(Ev•–áen“t‘íMDesignatorsŽŽŸ³3‘GáAn›ï€ev•²!en“t˜designator–ïis˜a˜reference˜to“a˜command˜line˜en²!try˜in“the˜history˜list.‘¹,Unless˜theŽ¡‘Greference–¦fis“absolute,“ev•²!en“ts–¦fare“relativš²!e“to“the“curren˜t“pMÞosition“in“the“history“list.Ž©µV‘Gâ!‘4IáStart–ña“history›ðsubstitution,‘Texcept“when˜follo•²!w“ed›ñb“y˜a˜space,–Stab,“the˜end˜ofŽ¡‘Kâ:the–¦fline,“or“`â=á'.Ž¦‘Gâ!ó=ßê<x
ó3
cmsltt10èn‘.QŸáRefer–¦fto“command“line“åná.Ž¦‘Gâ!-èn‘(‘õáRefer–¦fto“the“command“ån“álines“bac²!k.ŽŸµU‘Gâ!!‘.QŸáRefer–¦fto“the“previous“command.‘ÝÝThis“is“a“synon²!ym“for“`â!-1á'.Ž¦‘Gâ!èstring‘“MáRefer–ÿto›þthe“most“recen²!t“command“preceding˜the“curren²!t“pMÞosition˜in“the“historyŽ¡‘Kâ:list–¦fstarting“with“åstringá.Ž¦‘Gâ!?èstringâ[?]Ž¡‘Kâ:áRefer–ÿto›þthe“most“recen²!t“command“preceding˜the“curren²!t“pMÞosition˜in“the“historyŽ¡‘Kâ:list›Ò/con²!taining–Ò0åstringá.‘a9The“trailing˜`â?á'“ma²!y˜bMÞe“omitted˜if“the˜åstring‘ÂHáis˜follo•²!w“edŽ¡‘Kâ:immediately–‹«b²!y“a›‹ªnewline.‘ÔôIf“åstring‘{Ãáis“missing,‘‘the“string“from˜the“most“recen²!tŽ¡‘Kâ:searcš²!h–¦fis“used;“it“is“an“error“if“there“is“no“previous“searc˜h“string.ŽŽŒ‹ CŸò ‘GáChapter–¦f1:‘ÝÝUsing“History“In•²!teractiv“ely’ òcä2ŽŽŽ ƒ33 ý ÌÍ‘Gâ^èstring1â^èstring2â^Ž¤
33‘Kâ:áQuic²!k–ÐHSubstitution.‘[‚RepMÞeat“the“last“command,‘ÚÀreplacing“åstring1‘¯áwith“åstring2á.Ž¡‘Kâ:Equiv‘ÿdDalen²!t–¦fto“â!!:s^èstring1â^èstring2â^á.Ž©Á‘Gâ!#‘.QŸáThe–¦fenš²!tire“command“line“t˜ypMÞed“so“far.ŽŸj‘Gëg1.1.2‘d(W‘þÄ£ord‘íMDesignatorsŽŽŸ³3‘GáW‘ÿeord–A[designators“are“used“to“select“desired‘AZwš²!ords“from“the“ev˜en˜t.‘¼/A‘AA`â:á'“separates“the“ev˜en˜tŽ¡‘GspMÞecication–m6from“the“wš²!ord“designator.‘2MIt“ma˜y“bMÞe“omitted“if“the“w˜ord“designator“bMÞeginsŽ¡‘Gwith›•<a‘•=`â^á',–˜«`â$á',“`â*á',“`â-á',“or˜`â%á'.‘Ø$W‘ÿeords‘•=are˜n•²!um“b•MÞered˜from‘•=the˜b“eginning˜of˜the‘•=line,‘˜«with˜theŽ¡‘Grst–…Awš²!ord“bMÞeing‘…@denoted“b˜y“0“(zero).‘ÒÑW‘ÿeords‘…@are“inserted“in˜to“the“curren˜t‘…@line“separated“b˜yŽ¡‘Gsingle‘¦fspaces.ŽŸèz‘!GF‘ÿeor‘¦fexample,ŽŸÀ‘Gâ!!‘.QŸádesignates–P;the“preceding“command.‘Û]When“yš²!ou“t˜ypMÞe“this,‘z±the“preceding“com-Ž¡‘Kâ:mand–¦fis“repMÞeated“in“toto.Ž¦‘Gâ!!:$‘"ÒKádesignates–¯_the“last“argumenš²!t‘¯^of“the“preceding“command.‘‹…This“ma˜y“bMÞe“shortenedŽ¡‘Kâ:to‘¦fâ!$á.ŽŸÀ‘Gâ!fi:2‘¡ádesignates–„Œthe›„second“argumen²!t“of“the˜most“recen²!t“command“starting˜with“theŽ¡‘Kâ:letters‘¦fâfiá.Ž¦‘!GHere–¦fare“the“w²!ord“designators:Ž¤À‘Gâ0–¦f(zero)‘
ìçáThe“â0áth“wš²!ord.‘ÝÝF‘ÿeor“man˜y“applications,“this“is“the“command“w˜ord.Ž¦‘Gèn‘4IáThe–¦fånáth“w²!ord.Ž¡‘Gâ^‘4IáThe–¦frst“argumenš²!t;“that“is,“w˜ord“1.Ž¦‘Gâ$‘4IáThe–¦flast“argumen²!t.Ž¡‘Gâ%‘4IáThe–êµrst“wš²!ord“matc˜hed“b˜y“the“most“recen˜t“`â?èstringâ?á'“searc˜h,‘;Èif“the“searc˜hŽŸ
33‘Kâ:string–¦fbMÞegins“with“a“cš²!haracter“that“is“part“of“a“w˜ord.Ž¦‘Gèxâ-èy‘(‘õáA–¦frange“of“w²!ords;“`â-èyá'“abbreviates“`â0-èyá'.Ž¡‘Gâ*‘4IáAll–Rìof“the“w²!ords,‘cžexcept“the›Ríâ0áth.‘ This“is˜a“synon²!ym“for“`â1-$á'.‘Â
It“is“not“an“errorŽ¤
33‘Kâ:to–˜use›—`â*á'“if˜there“is˜just“one˜w²!ord“in˜the“ev•²!en“t;‘—1the‘˜empt“y˜string–˜is˜returned“inŽ¡‘Kâ:that‘¦fcase.Ž¦‘Gèxâ*‘.QŸáAbbreviates‘¦f`èxâ-$á'ŽŸÀ‘Gèxâ-‘.QŸáAbbreviates–=(`èxâ-$á'›='lik²!e“`èxâ*á',‘R4but˜omits“the“last˜w²!ord.‘ºÉIf˜`âxá'“is˜missing,‘R4it“defaultsŽ¡‘Kâ:to‘¦f0.Ž¦‘!GIf–[a›Zw²!ord“designator˜is“supplied“without˜an“ev•²!en“t˜spMÞecication,‘-Xthe˜previous‘[commandŽ¡‘Gis–¦fused“as“the“ev•²!en“t.ŽŸj‘Gëg1.1.3‘d(MoidiersŽŽŸ³3‘GáAfter–n´the“optional“wš²!ord“designator,‘y×y˜ou“can“add“a“sequence“of“one“or“more“of“the“follo˜wingŽ¡‘GmoMÞdiers,‘)eac•²!h‘ÿpreceded›ÿb“y˜a–ÿ`â:á'.‘ç²These˜moMÞdify‘ÿe,‘*or˜edit,‘)the“w•²!ord˜or˜w“ords‘ÿselected˜fromŽ¡‘Gthe–¦fhistory“ev•²!en“t.Ž¦‘Gâh‘4IáRemo•²!v“e–¦fa“trailing“pathname“compMÞonenš²!t,“lea˜ving“only“the“head.ŽŽŒ‹ GŸò ‘GáChapter–¦f1:‘ÝÝUsing“History“In•²!teractiv“ely’ òcä3ŽŽŽ ƒ33 ý ÌÍ‘Gât‘4IáRemo•²!v“e–¦fall“leading“pathname“compMÞonenš²!ts,“lea˜ving“the“tail.Ž¤33‘Gâr‘4IáRemo•²!v“e–¦fa“trailing“sux“of“the“form“`â.èsuffixá',“lea²!ving“the“basename.Ž¡‘Gâe‘4IáRemo•²!v“e–¦fall“but“the“trailing“sux.Ž¡‘Gâp‘4IáPrin²!t–¦fthe“new“command“but“do“not“execute“it.Ž¡‘Gâs/èoldâ/ènewâ/Ž¤
33‘Kâ:áSubstitute–Ðånew‘Àáfor“the“rst›ÐoMÞccurrence“of“åold‘>Xáin“the“ev•²!en“t˜line.‘Z»An“y‘Ðc“haracterŽ¡‘Kâ:ma²!y–“bMÞe“used›’as“the“delimiter“in˜place“of“`â/á'.‘CcThe“delimiter“ma²!y˜bMÞe“quoted“inŽ¡‘Kâ:åold‘Ñðáand–cŸånew‘S¶áwith›cža“single˜bac²!kslash.‘†If“`â&á'˜appMÞears˜in“ånewá,‘’ìit˜is“replaced˜b²!yŽ¡‘Kâ:åoldá.‘ìhA–«>single›«?bac²!kslash“will˜quote˜the˜`â&á'.‘ìhIf˜åold‘‘áis˜n²!ull,‘¬uit˜is˜set˜to˜the˜last˜åoldŽ¡‘Kâ:ásubstituted,–or,“if–þno“previous“history“substitutions“toMÞok“place,‘the“last“åstringŽ¡‘Kâ:áin–wža“!?åstring‘ ðâ[?]“ásearcš²!h.‘Q…If“ånew‘g¶áis“is“n˜ull,‘«ìeac˜h“matc˜hing“åold‘åðáis“deleted.‘Q…TheŽ¡‘Kâ:nal–¦fdelimiter“is“optional“if“it“is“the“last“c²!haracter“on“the“input“line.Ž¤33‘Gâ&‘4IáRepMÞeat–¦fthe“previous“substitution.Ž¡‘GâgŽ¤
33‘Ga‘4IáCause–¤®cš²!hanges“to“bMÞe“applied“o˜v˜er“the‘¤¯en˜tire“ev˜en˜t“line.‘صUsed“in“conjunctionŽ¡‘Kâ:with–¦f`âsá',“as“in“âgs/èoldâ/ènewâ/á,“or“with“`â&á'.ŽŸ33‘GâG‘4IáApply–¦fthe“folloš²!wing“`âsá'“or“`â&á'“moMÞdier“once“to“eac˜h“w˜ord“in“the“ev˜en˜t.ŽŽŒ‹ ²Ÿò ’¾6eá4ŽŽŽ ƒ33 ý ÌÍ‘GëT2‘ ¸QProgramming–z³with“GNU“HistoryŽŽŸ]‘GáThis–¾cš²!hapter‘½describMÞes“ho˜w“to‘½in˜terface“programs“that“y˜ou›½write“with“the˜çgnu“áHistoryŽ¤
33‘GLibrary›ÿe.‘¿3It–ñƒshould“bMÞe“considered“a“tec²!hnical‘ñ‚guide.‘¿4F˜or“information“on‘ñ‚the“in•²!teractiv“e‘ñƒuseŽ¡‘Gof–¦fçgnu“áHistory‘ÿe,“see“Chapter“1“[Using“History“In•²!teractiv“ely],–¦fpage“1.ŽŸ®‘Gë]2.1‘™InŒÌtros3duction–f@to“HistoryŽŽŸ33‘GáMan²!y–¥@programs“read›¥?input“from“the“user˜a“line“at“a˜time.‘Ý{The“çgnu“áHistory˜library“is“ableŽ¡‘Gto–t”kš²!eep“trac˜k“of“those“lines,‘~‹assoMÞciate‘t“arbitrary“data“with“eac˜h“line,‘~‹and“utilize“informationŽ¡‘Gfrom–¦fprevious“lines“in“compMÞosing“new“ones.Ž©§A‘!GA‘ó programmer–ó6using“the›ó7History“library“has˜aš²!v‘ÿdDailable“functions“for“remem˜bMÞering‘ó7lines“onŽ¡‘Ga–†nhistory“list,‘ŒÒassoMÞciating“arbitrary“data“with“a›†mline,‘ŒÓremo²!ving“lines“from“the˜list,‘ŒÓsearc²!hingŽ¡‘Gthrough–<‚the“list›<for“a“line“con²!taining“an“arbitrary˜text“string,‘b and“referencing˜an²!y“line“inŽ¡‘Gthe–°ïlist“directly‘ÿe.‘ýxIn“addition,‘³‘a“history“åexpansion‘°îáfunction“is“aš²!v‘ÿdDailable“whic˜h“pro˜vides“for“aŽ¡‘Gconsistenš²!t–¦fuser“in˜terface“across“dieren˜t“programs.Ž¦‘!GThe–Yuser›YŽusing“programs“written“with˜the“History“library˜has“the“bMÞenet“of˜a“consisten²!tŽ¡‘Guser–°Vin²!terface›°Uwith“a˜set“of“w•²!ell-kno“wn˜commands–°Vfor“manipulating˜the“text˜of“previousŽ¡‘Glines–OCand“using“that“text“in“new“commands.‘ÀÑThe“basic“history“manipulation“commands“areŽ¡‘Gsimilar–¦fto“the“history“substitution“proš²!vided“b˜y“âcshá.Ž¦‘!GThe–§‘programmer“can›§also“use“the“Readline˜library‘ÿe,‘§Üwhic²!h“includes˜some“history“manip-Ž¡‘Gulation–¦fbš²!y“default,“and“has“the“added“adv‘ÿdDan˜tage“of“command“line“editing.Ž¦‘!GBefore–’¶declaring“anš²!y‘’·functions“using“an˜y“functionalit˜y“the“History‘’·library“pro˜vides“inŽ¡‘Gother–rJcoMÞde,‘|µan“application›rIwriter“should“include˜the“le˜â<readline/history.h>“áin˜an²!y“leŽ¡‘Gthat–ß?uses›ß>the“History˜library's“features.‘›{It˜supplies“extern˜declarations“for˜all“of˜the“library'sŽ¡‘Gpublic–¦ffunctions“and“v‘ÿdDariables,“and“declares“all“of“the“public“data“structures.ŽŸ®‘Gë]2.2‘™History‘f@StorageŽŽŸ33‘GáThe–¦fhistory“list“is“an“arraš²!y“of“history“en˜tries.‘ÝÝA“history“en˜try“is“declared“as“follo˜ws:Ž¦‘.ùœâtypedef–¿ªvoid“*histdata_t;ŽŸff‘.ùœtypedef–¿ªstruct“_hist_entry“{Ž¡‘:xðchar‘¿ª*line;Ž¡‘:xðchar‘¿ª*timestamp;Ž¡‘:xðhistdata_t‘¿ªdata;Ž¡‘.ùœ}‘¿ªHIST_ENTRY;ŽŸ§B‘!GáThe–¦fhistory“list“itself“migh²!t“therefore“bMÞe“declared“asŽ¦‘.ùœâHIST_ENTRY‘¿ª**the_history_list;Ž¦‘!GáThe–¦fstate“of“the“History“library“is“encapsulated“in²!to“a“single“structure:Ž¦‘.ùœâ/*Ž¡‘4¹F*–¿ªA“structure“used“to“pass“around“the“current“state“of“the“history.Ž¡‘4¹F*/Ž¡‘.ùœtypedef–¿ªstruct“_hist_state“{Ž¡‘:xðHIST_ENTRY–¿ª**entries;“/*“Pointer“to“the“entries“themselves.“*/ŽŽŒ‹ &ÏŸò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ Ö5ˆ5ŽŽŽ ƒ33 ý ÌÍ‘:xðâint–¿ªoffset;‘?<N/*“The“location“pointer“within“this“array.“*/Ž¤
33‘:xðint–¿ªlength;‘?<N/*“Number“of“elements“within“this“array.“*/Ž¡‘:xðint–¿ªsize;‘J»¢/*“Number“of“slots“allocated“to“this“array.“*/Ž¡‘:xðint‘¿ªflags;Ž¡‘.ùœ}‘¿ªHISTORY_STATE;ŽŸ\·‘!GáIf–¦fthe“
ags“mem²!bšMÞer“includes“âHS_STIFLEDá,“the“history“has“b˜een“sti
ed.ŽŸ >E‘Gë]2.3‘™History‘f@F‘þ¦functionsŽŽŸ33‘GáThis–section“describMÞes›Žthe“calling“sequence“for˜the“v‘ÿdDarious“functions“expMÞorted˜b²!y“the“çgnuŽ¡‘GáHistory‘¦flibrary‘ÿe.ŽŸ)„‘Gëg2.3.1‘d(Initializing–íMHistory“and“State“Managemen–átŽŽŸ³3‘GáThis–¤Qsection“describMÞes“functions›¤Rused“to“initialize“and“manage“the“state˜of“the“History“libraryŽ¡‘Gwhen–¦fyš²!ou“w˜an˜t“to“use“the“history“functions“in“y˜our“program.Ž©†;’“z[F‘ÿeunction]ŽŽ‘Gó@ßê<x
cmtt10ë@void‘LÉusing_history‘yšó;m#½R
ó3
cmss10æ(óAp®0J
cmsl10ëAvªªoidæ)Ž¡‘.ùœáBegin–Êùa›Êøsession“in˜whic²!h“the˜history“functions˜migh²!t“bMÞe˜used.‘K•This˜initializes“theŽ¡‘.ùœin•²!teractiv“e‘¦fv‘ÿdDariables.ŽŸ†:’“z[F‘ÿeunction]ŽŽ‘Gë@HISTORY_STATE–LÉ*“history_get_history_state‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáReturn–¦fa“structure“describing“the“curren²!t“state“of“the“input“history‘ÿe.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@void‘LÉhistory_set_history_state‘yšæ(ëAHISTOR–þÿÿY‘ ׉ „F ™œŽ‘G¼ST“A“TE‘ *stateæ)Ž¡‘.ùœáSet–¦fthe“state“of“the“history“list“according“to“åstateá.ŽŸ)„‘Gëg2.3.2‘d(History–íMList“Managemen–átŽŽŸ³3‘GáThese–×Ufunctions›×Vmanage“individual“en²!tries“on˜the“history“list,‘ã‘or“set˜parameters“managingŽ¡‘Gthe–¦flist“itself.ŽŸ†:’“z[F‘ÿeunction]ŽŽ‘Gë@void‘LÉadd_history‘yšæ(ëAconst– cªªhar“*stringæ)Ž¡‘.ùœáPlace–Ydåstring‘I|áat›Yethe“end“of“the˜history“list.‘ö×The˜assoMÞciated“data“eld“(if˜an²!y)“is“setŽ¡‘.ùœto–=0âNULLá.‘ ¢<If‘=1the“maximš²!um“n˜um˜bMÞer‘=1of“history“en˜tries›=1has“bMÞeen“set˜using“âstifle_Ž¡‘.ùœhistory()á,‘šband–—`the›—anew“n•²!um“bMÞer˜of–—`history“en•²!tries˜w“ould–—`exceed˜that“maxim²!um,‘šbtheŽ¡‘.ùœoldest–¦fhistory“enš²!try“is“remo˜v˜ed.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@void‘LÉadd_history_time‘yšæ(ëAconst– cªªhar“*stringæ)Ž¡‘.ùœáChange–¦fthe“time“stamp“assoMÞciated“with“the“most“recenš²!t“history“en˜try“to“åstringá.ŽŸ†:’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ*“remove_history‘yšæ(ëAin•ªªt‘ whic“hæ)Ž¡‘.ùœáRemo•²!v“e–xDhistory“enš²!try“at“oset“åwhic˜h“áfrom‘xEthe“history‘ÿe.‘
SwThe“remo˜v˜ed“elemen˜t“isŽ¡‘.ùœreturned–¦fso“yš²!ou“can“free“the“line,“data,“and“con˜taining“structure.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@histdata_t‘LÉfree_history_entry‘yšæ(ëAHIST‘ ׉ „F ™œŽ‘G¼ENTR‘þÿÿY‘ *histenªªtæ)Ž¡‘.ùœáF‘ÿeree–[üthe“history“enš²!try“åhisten˜t‘˜üáand“an˜y‘[ýhistory“library“priv‘ÿdDate“data“assoMÞciated“with“it.Ž¡‘.ùœReturns–¦fthe“application-spšMÞecic“data“so“the“caller“can“disp˜ose“of“it.ŽŽŒ‹ 2çŸò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ Ö5ˆ6ŽŽŽ ƒ33 ý ÌÍ’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ*“replace_history_entry‘yšæ(ëAin•ªªt› whic“h,˜const˜c“har˜*line,Ž¤
33‘DGhistdata‘ ׉ „F ™œŽ‘G¼t‘ dataæ)Ž¡‘.ùœáMakš²!e–PÍthe“history“en˜try“at“oset“åwhic˜h“áha˜v˜e“åline‘íÔáand‘PÌådataá.‘ÁUThis“returns“the“old“en˜tryŽ¡‘.ùœso–u
the“caller“can“dispšMÞose“of“an²!y“application-sp˜ecic“data.‘IÉIn“the“case“of“an“in²!v‘ÿdDalidŽ¡‘.ùœåwhicš²!há,–¦fa“âNULL“ápMÞoin˜ter“is“returned.Ž©ŠC’“z[F‘ÿeunction]ŽŽ‘Gë@void‘LÉclear_history‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáClear–¦fthe“history“list“bš²!y“deleting“all“the“en˜tries.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@void‘LÉstifle_history‘yšæ(ëAinªªt‘ maxæ)Ž¡‘.ùœáSti
e–e>the›e?history“list,‘”õremem²!bMÞering“only˜the“last˜åmax‘&áen²!tries.‘gThe“history˜list“willŽ¡‘.ùœconš²!tain–¦fonly“åmax‘gÅáen˜tries“at“a“time.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉunstifle_history‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáStop–H¨sti
ing“the“history‘ÿe.‘¾žThis“returns“the“previously-set“maximš²!um“n˜um˜bMÞer“of“historyŽ¡‘.ùœenš²!tries–7
(as‘7set“b˜y“âstifle_history()á).‘¸ÀThe“v‘ÿdDalue‘7is“pMÞositiv˜e›7if“the“history˜w²!as“sti
ed,Ž¡‘.ùœnegativš²!e–¦fif“it“w˜asn't.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_is_stifled‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáReturns–¦fnon-zero“if“the“history“is“sti
ed,“zero“if“it“is“not.ŽŸ+ˆ‘Gëg2.3.3‘d(Information–íMAbiout“the“History“ListŽŽŸ³3‘GáThese–¦ffunctions“return“information“abMÞout“the“enš²!tire“history“list“or“individual“list“en˜tries.ŽŸŠD’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ**“history_list‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáReturn–©ha“âNULL“áterminated“arraš²!y“of‘©iâHIST_ENTRY‘¦f*“áwhic˜h“is“the“curren˜t“input“history‘ÿe.Ž¡‘.ùœElemen²!t–¦f0“of“this“list“is“the“bMÞeginning“of“time.‘ÝÝIf“there“is“no“history‘ÿe,“return“âNULLá.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉwhere_history‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáReturns–¦fthe“oset“of“the“currenš²!t“history“elemen˜t.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ*“current_history‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáReturn–ûûthe“history“enš²!try‘ûüat“the“curren˜t“pMÞosition,‘as“determined“b˜y“âwhere_history()á.Ž¡‘.ùœIf–¦fthere“is“no“enš²!try“there,“return“a“âNULL“ápMÞoin˜ter.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ*“history_get‘yšæ(ëAinªªt‘ osetæ)Ž¡‘.ùœáReturn–ÊLthe›ÊMhistory“en²!try“at“pMÞosition˜åosetá.‘IThe˜range“of“v›ÿdDalid“v˜alues‘ÊMof“åoset‘LástartsŽ¡‘.ùœat–½çâhistory_base“áand›½èends“at“åhistory‘ Ä>‰ x³ HøŽ‘Ñtlength“á-“1“(see˜Section“2.4“[History“V‘ÿeariables],Ž¡‘.ùœpage–$)9).‘²tIf“there“is“no“en²!try“there,›>6or“if“åoset‘a)áis“outside“the“v‘ÿdDalid“range,˜return“a“âNULLŽ¡‘.ùœápMÞoin²!ter.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@time_t‘LÉhistory_get_time‘yšæ(ëAHIST‘ ׉ „F ™œŽ‘G¼ENTR‘þÿÿY‘ *enªªtryæ)Ž¡‘.ùœáReturn–ûØthe“time“stamp“assoMÞciated“with“the“history‘ûÙenš²!try“åen˜tryá.‘Þ3If“the“timestamp“isŽ¡‘.ùœmissing–¦for“in²!v‘ÿdDalid,“return“0.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_total_bytes‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáReturn›PHthe‘PIn•²!um“bMÞer˜of˜b“ytes˜that–PIthe˜primary˜history“en²!tries˜are˜using.‘Á)This˜functionŽ¡‘.ùœreturns–¦fthe“sum“of“the“lengths“of“all“the“lines“in“the“history‘ÿe.ŽŽŒ‹ >ÑŸò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ Ö5ˆ7ŽŽŽ ƒ33 ý ÌÍ‘Gëg2.3.4‘d(Mo–áving–íMAround“the“History“ListŽŽŸ³3‘GáThese–¦ffunctions“alloš²!w“the“curren˜t“index“in˜to“the“history“list“to“bMÞe“set“or“c˜hanged.Ž©„’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_set_pos‘yšæ(ëAinªªt‘ pUVosæ)Ž¤
33‘.ùœáSet–fthe›fcurren²!t“history˜oset“to“åpMÞosá,‘•ûan“absolute˜index“in²!to˜the“list.‘ÜReturns˜1“onŽ¡‘.ùœsuccess,–¦f0“if“åpšMÞos‘èáis“less“than“zero“or“greater“than“the“n•²!um“b˜er–¦fof“history“en²!tries.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ*“previous_history‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáBacš²!k–u¦up‘u¥the“curren˜t“history›u¥oset“to˜the“previous“history˜en²!try‘ÿe,‘fand“return˜a“pMÞoin²!terŽ¡‘.ùœto–¦fthat“enš²!try‘ÿe.‘ÝÝIf“there“is“no“previous“en˜try‘ÿe,“return“a“âNULL“ápMÞoin˜ter.ŽŸ„’“z[F‘ÿeunction]ŽŽ‘Gë@HIST_ENTRY–LÉ*“next_history‘yšæ(ëAvªªoidæ)Ž¡‘.ùœáIf–xLthe›xMcurren²!t“history˜oset“refers“to˜a“v‘ÿdDalid˜history“en•²!try‘ÿe,‘´¸incremen“t‘xLthe˜curren“t‘xLhistoryŽ¡‘.ùœoset.‘¾If–G the“pMÞossibly-incremenš²!ted“history“oset‘Grefers“to“a“v‘ÿdDalid“history“en˜try‘ÿe,‘ZreturnŽ¡‘.ùœa–¦fpMÞoinš²!ter“to“that“en˜try;“otherwise,“return“a“âBNULL“ápMÞoin˜ter.ŽŸ‹D‘Gëg2.3.5‘d(Searc–áhing–íMthe“History“ListŽŽŸ³3‘GáThese–]functions“alloš²!w“searc˜hing“of“the“history“list“for“en˜tries“con˜taining“a“spMÞecic“string.Ž¡‘GSearc•²!hing›LØma“y‘L×b•MÞe˜p“erformed‘L×b“oth˜forw•²!ard‘L×and˜bac“kw“ard˜from‘L×the˜curren“t‘L×history˜pMÞosition.Ž¡‘GThe–Ãsearcš²!h“ma˜y“bMÞe“åanc˜horedá,‘ÊÅmeaning“that“the“string“m˜ust“matc˜h“at“the“bMÞeginning“of“theŽ¡‘Ghistory‘¦fen²!try‘ÿe.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_search‘yšæ(ëAconst– cšªªhar“*string,“in˜t“directionæ)Ž¡‘.ùœáSearc²!h–wSthe“history›wRfor“åstringá,‘€½starting“at“the˜curren²!t“history“oset.‘Î,If˜ådirection“áis“lessŽ¡‘.ùœthan–ÍY0,‘then“the›ÍXsearc²!h“is˜through“previous˜en²!tries,‘otherwise˜through“subsequen²!tŽ¡‘.ùœenš²!tries.‘â÷If–¨åstring‘˜2áis“found,‘¨†then“the‘¨curren˜t“history“index“is›¨set“to“that˜history“en²!try‘ÿe,Ž¡‘.ùœand–ºthe“v‘ÿdDalue›¹returned“is“the“oset˜in“the“line“of˜the“enš²!try“where“åstring‘óÑáw˜as“found.Ž¡‘.ùœOtherwise,–¦fnothing“is“c²!hanged,“and“a“-1“is“returned.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_search_prefix‘yšæ(ëAconst– cšªªhar“*string,“in˜t“directionæ)Ž¡‘.ùœáSearc²!h–ß2the›ß1history“for“åstringá,‘-dstarting˜at“the“curren²!t˜history“oset.‘ˆ@The˜searc²!h“isŽ¡‘.ùœanc•²!hored:‘Τmatc“hing›‡ôlines‘‡óm“ust˜bMÞegin˜with˜åstringá.‘Ó·If˜ådirection‘‡óáis˜less˜than˜0,‘Ž
then˜theŽ¡‘.ùœsearcš²!h–Áâis“through‘Áãprevious“en˜tries,‘ÈÁotherwise“through‘Áãsubsequen˜t“en˜tries.‘0RIf“åstring‘±úáisŽ¡‘.ùœfound,‘ then–÷athe›÷bcurren²!t“history“index“is˜set“to“that˜en²!try‘ÿe,‘ and“the“return“v‘ÿdDalue˜is“0.Ž¡‘.ùœOtherwise,–¦fnothing“is“c²!hanged,“and“a“-1“is“returned.ŽŸ„’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_search_pos‘yšæ(ëAconst– cšªªhar“*string,“in˜t“direction,“in˜t“pUVosæ)Ž¡‘.ùœáSearc²!h–×for“åstring‘ïáin“the“history“list,›:sstarting‘Öat“åpMÞosá,˜an“absolute“index“in²!to“the“list.Ž¡‘.ùœIf–TÓådirection‘TÒáis“negativš²!e,‘€mthe“searc˜h‘TÒproMÞceeds“bac˜kw˜ard‘TÒfrom“åpMÞosá,‘€motherwise“forw˜ard.Ž¡‘.ùœReturns–Jsthe“absolute“index“of‘Jrthe“history“elemenš²!t“where“åstring‘:‹áw˜as“found,‘³uor“-1Ž¡‘.ùœotherwise.ŽŸ‹D‘Gëg2.3.6‘d(Managing–íMthe“History“FileŽŽŸ³3‘GáThe–1History“library›1can“read“the“history“from“and˜write“it“to“a“le.‘¶ÃThis“section“doMÞcumen²!tsŽ¡‘Gthe–¦ffunctions“for“managing“a“history“le.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉread_history‘yšæ(ëAconst– cªªhar“*lenameæ)Ž¡‘.ùœáAdd›Žgthe‘Žfcon•²!ten“ts˜of˜ålename–+máto˜the˜history˜list,‘“3a˜line‘Žfat˜a˜time.‘ÕÝIf˜ålename“áis˜âNULLá,Ž¡‘.ùœthen–¦fread“from“â~/.historyá.‘ÝÝReturns“0“if“successful,“or“âerrno“áif“not.ŽŽŒ‹ KÉŸò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ Ö5ˆ8ŽŽŽ ƒ33 ý ÌÍ’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉread_history_range‘yšæ(ëAconst– cšªªhar“*lename,“in˜t“from,“in˜t“toæ)Ž¤
33‘.ùœáRead–Ya“range›Yof“lines“from“ålenameá,‘h„adding“them“to˜the“history“list.‘ÄStart“reading“atŽ¡‘.ùœline–&=åfrom“áand“end‘&>at“åtoá.›³%If“åfrom“áis“zero,‘?ßstart“at“the“bMÞeginning.˜If“åto‘³áis“less“than“åfromá,Ž¡‘.ùœthen–ù«read“un²!til“the“end“of“the“le.‘׫If“ålename‘–²áis“âNULLá,‘|then“read“from“â~/.historyá.Ž¡‘.ùœReturns–¦f0“if“successful,“or“âerrno“áif“not.Ž©UV’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉwrite_history‘yšæ(ëAconst– cªªhar“*lenameæ)Ž¡‘.ùœáW‘ÿerite–#%the“currenš²!t“history“to‘#$ålenameá,‘BUo˜v˜erwriting“ålename‘À,áif‘#$necessary‘ÿe.‘TIf“ålenameŽ¡‘.ùœáis–B¹âNULLá,‘V©then›Bºwrite“the˜history“list˜to“â~/.historyá.‘¼¤Returns“0˜on“success,‘V©or˜âerrno“áonŽ¡‘.ùœa–¦fread“or“write“error.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉappend_history‘yšæ(ëAin•ªªt› nelemen“ts,˜const˜c“har˜*lenameæ)Ž¡‘.ùœáAppMÞend–)‚the“last›)ånelemen²!ts‘áof“the“history“list“to˜ålenameá.‘g1If“ålename‘Ɖáis˜âNULLá,‘JIthenŽ¡‘.ùœappMÞend–¦fto“â~/.historyá.‘ÝÝReturns“0“on“success,“or“âerrno“áon“a“read“or“write“error.ŽŸUU’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_truncate_file‘yšæ(ëAconst– cšªªhar“*lename,“in˜t“nlinesæ)Ž¡‘.ùœáT‘ÿeruncate–Ÿáthe“history“le“ålenameá,‘Þ@lea²!ving“only“the“last“ånlines‘cálines.‘ÊOIf“ålename‘<èáisŽ¡‘.ùœâNULLá,–¦fthen“â~/.history“áis“truncated.‘ÝÝReturns“0“on“success,“or“âerrno“áon“failure.ŽŸÂ‘Gëg2.3.7‘d(History‘íMExpansionŽŽŸ³3‘GáThese–¦ffunctions“implemen²!t“history“expansion.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@int‘LÉhistory_expand‘yšæ(ëAcšªªhar– *string,“c˜har“**outputæ)Ž¡‘.ùœáExpand–!)åstringá,‘?Ùplacing“the“result“inš²!to“åoutputá,‘?Úa‘!(pMÞoin˜ter“to“a“string“(see“Section“1.1Ž¡‘.ùœ[History–¦fIn²!teraction],“page“1).‘ÝÝReturns:Ž©Iõ‘.ùœâ0‘4IáIf–Åno›Äexpansions“toMÞok˜place“(or,‘¶if˜the“only˜c²!hange“in˜the“text˜w²!as“theŽ¡‘hÊremoš²!v‘ÿdDal‘œwof–œxescapMÞe“c˜haracters–œwpreceding“the›œxhistory“expansion˜c²!haracter);Ž¦‘.ùœâ1‘4Iáif–¦fexpansions“did“tak²!e“place;Ž¦‘.ùœâ-1‘.QŸáif–¦fthere“w²!as“an“error“in“expansion;Ž¦‘.ùœâ2‘4Iáif–O$the›O#returned“line˜should“bMÞe˜displa•²!y“ed,–`—but‘O$not˜executed,“as–O$with˜the“â:pŽ¡‘hÊámošMÞdier–¦f(see“Section“1.1.3“[Mo˜diers],“page“2).Ž¦‘.ùœIf–¦fan“error“oMÞccurred“in“expansion,“then“åoutput‘ãfáconš²!tains“a“descriptiv˜e“error“message.ŽŸUU’“z[F‘ÿeunction]ŽŽ‘Gë@char–LÉ*“get_history_event‘yšæ(ëAconst– cšªªhar“*string,“in˜t“*cindex,“in˜tŽ¡‘DGqcªªharæ)Ž¡‘.ùœáReturns–vøthe“text“of‘vùthe“history“ev•²!en“t–vøbMÞeginning“at“åstring‘gâ+“å*cindexá.‘
O”å*cindex‘8WáisŽ¡‘.ùœmošMÞdied–…to“p˜oinš²!t“to‘…after“the“ev˜en˜t“spMÞecier.‘ÒÀA˜t“function“en˜try‘ÿe,‘‹»åcindex‘FnápMÞoin˜ts“to“theŽ¡‘.ùœindex›Nãin²!to–Näåstring‘>ûáwhere“the˜history“ev•²!en“t˜sp•MÞecication˜b“egins.‘×Våqc•²!har‘áis‘Näa˜c“haracterŽ¡‘.ùœthat–:Xis“allo•²!w“ed–:Xto“end“the“ev•²!en“t‘:YspMÞecication–:Xin“addition“to“the“\normal"“terminatingŽ¡‘.ùœc²!haracters.Ž©UV’“z[F‘ÿeunction]ŽŽ‘Gë@char–LÉ**“history_tokenize‘yšæ(ëAconst– cªªhar“*stringæ)Ž¡‘.ùœáReturn–µ‘an“arraš²!y‘µ’of“tok˜ens“parsed“out“of–µ’åstringá,‘¹[m˜uc˜h“as–µ‘the“shell“migh˜t.‘_The“tok˜ensŽ¡‘.ùœare–«6split›«7on“the˜c²!haracters“in˜the“åhistory‘ Ä>‰ x³ HøŽ–Ñtw²!ord‘ Ä>‰ x³ HøŽ“delimiters‘¹áv‘ÿdDariable,‘¬jand˜shell‘«6quotingŽ¡‘.ùœcon•²!v“en“tions–¦fare“obšMÞey²!ed“as“describ˜ed“b˜elo²!w.Ž¦’“z[F‘ÿeunction]ŽŽ‘Gë@char–LÉ*“history_arg_extract‘yšæ(ëAinšªªt– rst,“in˜t“last,“const“c˜har“*stringæ)Ž¡‘.ùœáExtract–ÙHa›ÙGstring“segmen²!t“consisting˜of“the“årst‘Gáthrough“ålast‘Háargumen•²!ts˜presen“t‘ÙHinŽ¡‘.ùœåstringá.‘ÝÝArgumen²!ts–¦fare“split“using“âhistory_tokenizeá.ŽŽŒ‹ [”Ÿò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ Ö5ˆ9ŽŽŽ ƒ33 ý ÌÍ‘Gë]2.4‘™History‘f@V‘þ¦fariablesŽŽŸ33‘GáThis–:‚section“describšMÞes“the“externally-visible“v‘ÿdDariables“exp˜orted“b²!y“the“çgnu“áHistory“Library‘ÿe.Ž©üý’–3[V‘ÿeariable]ŽŽ‘Gë@int‘LÉhistory_baseŽ¤
33‘.ùœáThe–¦flogical“oset“of“the“rst“en²!try“in“the“history“list.ŽŸüþ’–3[V‘ÿeariable]ŽŽ‘Gë@int‘LÉhistory_lengthŽ¡‘.ùœáThe›¦fn•²!um“bMÞer˜of˜en“tries˜curren“tly˜stored˜in˜the˜history˜list.Ž¦’–3[V‘ÿeariable]ŽŽ‘Gë@int‘LÉhistory_max_entriesŽ¡‘.ùœáThe›…Zmaxim•²!um‘…Yn“um“bMÞer˜of˜history›…Yen“tries.‘
z¹This˜m“ust–…ZbMÞe“c²!hanged˜using“âstifle_Ž¡‘.ùœhistory()á.ŽŸüþ’–3[V‘ÿeariable]ŽŽ‘Gë@int‘LÉhistory_write_timestampsŽ¡‘.ùœáIf–\ˆnon-zero,‘Êtimestamps›\‡are“written“to˜the“history˜le,‘Êso˜they“can˜bMÞe“preserv²!edŽ¡‘.ùœbMÞet•²!w“een–¦fsessions.‘ÝÝThe“default“v‘ÿdDalue“is“0,“meaning“that“timestamps“are“not“sa•²!v“ed.ŽŸ!!‘.ùœThe–üúcurrenš²!t“timestamp“format“uses‘üûthe“v‘ÿdDalue“of“åhistory‘ Ä>‰ x³ HøŽ–Ñtcommen˜t‘ Ä>‰ x³ HøŽ“c˜har‘Æ#áto‘üúdelimitŽ¡‘.ùœtimestamp–£en²!tries›¤in“the“history˜le.‘ +•If“that“v‘ÿdDariable“doMÞes˜not“ha•²!v“e–£a˜v‘ÿdDalue“(theŽ¡‘.ùœdefault),–¦ftimestamps“will“not“bMÞe“written.Ž¦’–3[V‘ÿeariable]ŽŽ‘Gë@char‘LÉhistory_expansion_charŽ¡‘.ùœáThe–;ycš²!haracter“that“in˜troMÞduces‘;xa“history“ev˜en˜t.›The‘;xdefault“is“`â!á'.˜Setting‘;xthis“to“0Ž¡‘.ùœinhibits–¦fhistory“expansion.ŽŸüþ’–3[V‘ÿeariable]ŽŽ‘Gë@char‘LÉhistory_subst_charŽ¡‘.ùœáThe–ä|cš²!haracter‘ä}that“in˜v˜ok˜es“w˜ord“substitution›ä}if“found“at“the˜start“of“a“line.‘˜ TheŽ¡‘.ùœdefault–¦fis“`â^á'.Ž¦’–3[V‘ÿeariable]ŽŽ‘Gë@char‘LÉhistory_comment_charŽ¡‘.ùœáDuring–‰átokš²!enization,‘¿if“this“c˜haracter“is“seen“as“the“rst“c˜haracter“of“a“w˜ord,‘¿thenŽ¡‘.ùœit–4and›4all“subsequen•²!t˜c“haracters–4up“to˜a“newline˜are“ignored,‘—ysuppressing“historyŽ¡‘.ùœexpansion–¦ffor“the“remainder“of“the“line.‘ÝÝThis“is“disabled“b²!y“default.ŽŸüþ’–3[V‘ÿeariable]ŽŽ‘Gë@char–LÉ*“history_word_delimitersŽ¡‘.ùœáThe–M÷cš²!haracters“that‘Møseparate“tok˜ens“for“âhistory_tokenize()á.‘ÀcThe“default‘Møv‘ÿdDalue“is“â"Ž¡‘.ùœ\t\n()<>;&|"á.Ž¦’–3[V‘ÿeariable]ŽŽ‘Gë@char–LÉ*“history_search_delimiter_charsŽ¡‘.ùœáThe– îlist› ïof“additional“c•²!haracters˜whic“h– îcan“delimit˜a“history“searc²!h˜string,‘; in“additionŽ¡‘.ùœto–¦fspace,“T‘ÿeAB,“`â:á'“and“`â?á'“in“the“case“of“a“substring“searcš²!h.‘ÝÝThe“default“is“empt˜y‘ÿe.ŽŸüþ’–3[V‘ÿeariable]ŽŽ‘Gë@char–LÉ*“history_no_expand_charsŽ¡‘.ùœáThe–”klist“of“cš²!haracters“whic˜h“inhibit‘”lhistory“expansion“if“found“immediately“follo˜wingŽ¡‘.ùœåhistory‘ Ä>‰ x³ HøŽ–Ñtexpansion‘ Ä>‰ x³ HøŽ“c²!hará.‘ÝÝThe–¦fdefault“is“space,“tab,“newline,“carriage“return,“and“`â=á'.Ž¦’–3[V‘ÿeariable]ŽŽ‘Gë@int‘LÉhistory_quotes_inhibit_expansionŽ¡‘.ùœáIf–ånon-zero,‘%Dthe›ähistory“expansion˜coMÞde“implemen•²!ts˜shell-lik“e‘åquoting:‘¨Úsingle-quotedŽ¡‘.ùœwš²!ords–ware“not“scanned‘vfor“the“history“expansion“c˜haracter“or‘vthe“history“commen˜tŽ¡‘.ùœc•²!haracter,‘‰•and›(ódouble-quoted‘(òw“ords˜ma“y‘(òha“v“e˜history‘(òexpansion˜pMÞerformed,‘‰•sinceŽ¡‘.ùœsingle–¦fquotes“are“not“spMÞecial“within“double“quotes.‘ÝÝThe“default“v‘ÿdDalue“is“0.ŽŽŒ‹
k1Ÿò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ лî10ŽŽŽ ƒ33 ý ÌÍ’–3[V‘ÿeariable]ŽŽ‘Gë@int‘LÉhistory_quoting_stateŽ¤
33‘.ùœáAn–W±application›W²ma²!y“set˜this“v‘ÿdDariable“to˜indicate“that“the˜curren²!t“line˜bMÞeing“expandedŽ¡‘.ùœis–#ºsub‘ ›»ject“to“existing“quoting.‘²NIf“set“to“`â'á',‘=Üthe“history“expansion“function“will“assumeŽ¡‘.ùœthat–CTthe“line“is›CUsingle-quoted“and“inhibit“expansion“un²!til“it˜reads“an“unquoted“closingŽ¡‘.ùœsingle–Ô'quote;‘kif›Ô(set“to˜`â"á',‘—history˜expansion“will˜assume“the˜line“is˜double“quotedŽ¡‘.ùœun²!til–~it“reads“an›}unquoted“closing“double“quote.‘ªIf“set“to˜zero,›+Fthe“default,˜the“historyŽ¡‘.ùœexpansion–ˆsfunction“will“assume›ˆrthe“line“is“not“quoted“and˜treat“quote“c²!haracters“withinŽ¡‘.ùœthe–x line›wÿas“describ•MÞed˜ab“o•²!v“e.‘ÎfThis–x is˜only“eectiv²!e˜if“åhistory‘ Ä>‰ x³ HøŽ–Ñtquotes‘ Ä>‰ x³ HøŽ“inhibit‘ Ä>‰ x³ HøŽ“expansionŽ¡‘.ùœáis‘¦fset.ŽŸ‚Ù’–3[V‘ÿeariable]ŽŽ‘Gë@rl_linebuf_func_t–LÉ*“history_inhibit_expansion_functionŽ¡‘.ùœáThis– ?should› >bMÞe“set“to˜the“address˜of“a“function˜that“takš²!es“t˜w˜o‘ >argumen˜ts:‘‘Ža“âchar‘¦f*Ž¡‘.ùœá(åstring‘ ðá)–0nand“an›0oâint“áindex“in²!to“that˜string“(åi‘ ”ƒá).‘¶ŠIt˜should“return“a“non-zero˜v‘ÿdDalue“if“theŽ¡‘.ùœhistory–õexpansion›ôstarting“at˜åstring[i]‘àöáshould˜not“b•MÞe˜p“erformed;‘Žzero–õif˜the“expansionŽ¡‘.ùœshould–ÖObMÞe›ÖPdone.‘m™It“is˜in²!tended“for˜use“b²!y˜applications“lik²!e“Bash˜that“use˜the“historyŽ¡‘.ùœexpansion–¦fc²!haracter“for“additional“purpMÞoses.‘ÝÝBy“default,“this“v‘ÿdDariable“is“set“to“âNULLá.ŽŸ»½‘Gë]2.5‘™History–f@Programming“ExampleŽŽŸ33‘GáThe–¦ffollo²!wing“program“demonstrates“simple“use“of“the“çgnu“áHistory“Library‘ÿe.ŽŸ§Ó‘.ùœóߤN cmtt9É#include‘¹–<stdio.h>Ž¤
€ ‘.ùœ#include‘¹–<readline/history.h>Ž© ‘.ùœmain–¹–(argc,“argv)Ž¡‘F™Šint‘¹–argc;Ž¡‘F™Šchar‘¹–**argv;Ž¡‘.ùœ{Ž¡‘8lÈchar–¹–line[1024],“*t;Ž¡‘8lÈint–¹–len,“done“=“0;Ž¦‘8lÈline[0]–¹–=“0;Ž¦‘8lÈusing_history‘¹–();Ž¡‘8lÈwhile‘¹–(!done)Ž¡‘Aßô{Ž¡‘KS printf–¹–("history$“");Ž¡‘KS fflush‘¹–(stdout);Ž¡‘KS t–¹–=“fgets“(line,“sizeof“(line)“-“1,“stdin);Ž¡‘KS if–¹–(t“&&“*t)Ž¡‘TÆL{Ž¡‘^9xlen–¹–=“strlen“(t);Ž¡‘^9xif–¹–(t[len“-“1]“==“'\n')Ž¡‘g¬¤t[len–¹–-“1]“=“'\0';Ž¡‘TÆL}Ž¦‘KS if‘¹–(!t)Ž¡‘TÆLstrcpy–¹–(line,“"quit");Ž¦‘KS if‘¹–(line[0])Ž¡‘TÆL{Ž¡‘^9xchar‘¹–*expansion;Ž¡‘^9xint‘¹–result;Ž¦‘^9xresult–¹–=“history_expand“(line,“&expansion);ŽŽŒ‹ x‚Ÿò ‘GáChapter–¦f2:‘ÝÝProgramming“with“GNU“History’ лî11ŽŽŽ ƒ33 ý ÌÍ‘^9xÉif‘¹–(result)Ž¤
€ ‘g¬¤fprintf–¹–(stderr,“"%s\n",“expansion);Ž© ‘^9xif–¹–(result“<“0“||“result“==“2)Ž¡‘g¬¤{Ž¡‘qÐfree‘¹–(expansion);Ž¡‘qÐcontinue;Ž¡‘g¬¤}Ž¦‘^9xadd_history‘¹–(expansion);Ž¡‘^9xstrncpy–¹–(line,“expansion,“sizeof“(line)“-“1);Ž¡‘^9xfree‘¹–(expansion);Ž¡‘TÆL}Ž¦‘KS if–¹–(strcmp“(line,“"quit")“==“0)Ž¡‘TÆLdone–¹–=“1;Ž¡‘KS else–¹–if“(strcmp“(line,“"save")“==“0)Ž¡‘TÆLwrite_history‘¹–("history_file");Ž¡‘KS else–¹–if“(strcmp“(line,“"read")“==“0)Ž¡‘TÆLread_history‘¹–("history_file");Ž¡‘KS else–¹–if“(strcmp“(line,“"list")“==“0)Ž¡‘TÆL{Ž¡‘^9xregister–¹–HIST_ENTRY“**the_list;Ž¡‘^9xregister–¹–int“i;Ž¦‘^9xthe_list–¹–=“history_list“();Ž¡‘^9xif‘¹–(the_list)Ž¡‘g¬¤for–¹–(i“=“0;“the_list[i];“i++)Ž¡‘qÐprintf–¹–("%d:“%s\n",“i“+“history_base,“the_list[i]->line);Ž¡‘TÆL}Ž¡‘KS else–¹–if“(strncmp“(line,“"delete",“6)“==“0)Ž¡‘TÆL{Ž¡‘^9xint‘¹–which;Ž¡‘^9xif–¹–((sscanf“(line“+“6,“"%d",“&which))“==“1)Ž¡‘g¬¤{Ž¡‘qÐHIST_ENTRY–¹–*entry“=“remove_history“(which);Ž¡‘qÐif‘¹–(!entry)Ž¡‘z’üfprintf–¹–(stderr,“"No“such“entry“%d\n",“which);Ž¡‘qÐelseŽ¡‘z’ü{Ž¡’ „(free‘¹–(entry->line);Ž¡’ „(free‘¹–(entry);Ž¡‘z’ü}Ž¡‘g¬¤}Ž¡‘^9xelseŽ¡‘g¬¤{Ž¡‘qÐfprintf–¹–(stderr,“"non-numeric“arg“given“to“`delete'\n");Ž¡‘g¬¤}Ž¡‘TÆL}Ž¡‘Aßô}Ž¡‘.ùœ}ŽŽŒ‹ ‚‚Ÿò ’¸¼Ëá12ŽŽŽ ƒ33 ý ÌÍ‘GëTApp› Š=endix‘záA‘ ¸QGNU–z³F‘þaGree“Do˜cumen‘ÿuÂtation“LicenseŽŽŸƒª’ £¤AáV‘ÿeersion–¦f1.3,“3“No•²!v“em“bMÞer‘¦f2008Ž©Q‘.ùœCop•²!yrigh“t‘±ž«‚cŽŽŽ‘¦fê
ŽŽŽŽ‘@á2000,–¦f2001,“2002,“2007,“2008“F›ÿeree“Soft•²!w“are–¦fF˜oundation,“Inc.Ž¤
33‘.ùœâhttp://fsf.org/ŽŸff‘.ùœáEv•²!ery“one–¦fis“pMÞermitted“to“copš²!y“and“distribute“v˜erbatim“copiesŽ¡‘.ùœof–¦fthis“license“doMÞcumenš²!t,“but“c˜hanging“it“is“not“allo˜w˜ed.Ž¦‘-0.Ž‘'¿«PREAMBLEŽ¦‘'¿«The–vQpurpMÞose›vRof“this˜License“is˜to“mak²!e“a˜man²!ual,›ªLtextb•MÞo“ok,˜or–vQother‘vRfunctional“andŽ¡‘'¿«useful–žïdoMÞcumen²!t›žîåfree‘;öáin“the“sense˜of“freedom:‘Ú!to“assure“ev•²!ery“one‘žïthe˜eectiv“e‘žïfreedomŽ¡‘'¿«to–Æ9cop²!y›Æ:and“redistribute“it,‘Î.with“or˜without“moMÞdifying“it,‘Î.either“commercially˜or“non-Ž¡‘'¿«commercially–ÿe.‘cÏSecondarily“,‘Hàthis–(aLicense›(bpreserv²!es“for“the˜author“and“publisher˜a“w•²!a“yŽ¡‘'¿«to–W9get“credit›W8for“their“w²!ork,‘ƒmwhile“not“bMÞeing“considered˜respšMÞonsible“for“mo˜dicationsŽ¡‘'¿«made–¦fb²!y“others.Ž¦‘'¿«This–È/License›È0is“a“kind“of˜\cop•²!yleft",‘ô whic“h–È/means˜that“deriv‘ÿdDativš²!e“w˜orks“of‘È0the“doMÞcumen˜tŽ¡‘'¿«m•²!ust›õthemselv“es–ôbMÞe˜free˜in˜the“same˜sense.‘ ‰It˜complemen²!ts˜the“GNU‘ÙGeneral˜PublicŽ¡‘'¿«License,–¦fwhicš²!h“is“a“cop˜yleft“license“designed“for“free“soft˜w˜are.Ž¦‘'¿«W‘ÿee›‹#ha•²!v“e˜designed˜this˜License˜in˜order˜to˜use˜it‘‹"for˜man“uals˜for˜free˜soft“w“are,‘—bMÞecauseŽ¡‘'¿«free›?soft•²!w“are˜needs˜free‘>doMÞcumen“tation:‘³a˜free˜program˜should‘>come˜with˜man“ualsŽ¡‘'¿«pro²!viding–urthe›ussame“freedoms˜that“the˜soft•²!w“are–urdoMÞes.‘ÍŒBut˜this“License˜is“not˜limited“toŽ¡‘'¿«soft•²!w“are›âman“uals;‘±¡it–ãcan˜bMÞe“used˜for“an²!y˜textual“w²!ork,‘¯Áregardless“of˜sub‘ ›»ject“matter˜orŽ¡‘'¿«whether–Ç2it“is“published“as“a“prin²!ted“b•MÞo“ok.‘@BW‘ÿee–Ç2recommend“this“License“principally“forŽ¡‘'¿«w²!orks–¦fwhose“purpMÞose“is“instruction“or“reference.Ž¦‘-1.Ž‘'¿«APPLICABILITY–¦fAND“DEFINITIONSŽŸP‘'¿«This–Ì>License‘Ì=applies“to“anš²!y“man˜ual‘Ì=or“other“w˜ork,‘³in“an˜y–Ì=medium,‘´that“con˜tains‘Ì>aŽ¡‘'¿«notice–ýplaced›ýb²!y“the˜cop•²!yrigh“t‘ýholder˜sa“ying–ýit˜can“bMÞe˜distributed“under˜the“termsŽ¡‘'¿«of–€†this“License.‘l=Sucš²!h“a“notice“gran˜ts“a“w˜orld-wide,‘·
ro˜y˜alt˜y-free“license,‘·unlimited“inŽ¡‘'¿«duration,‘â
to–o·use›o¶that“w²!ork“under˜the“conditions“stated˜herein.‘
9ÏThe“\DoMÞcumen²!t",Ž¡‘'¿«bMÞeloš²!w,‘tkrefers–gìto“an˜y“suc˜h‘gíman˜ual“or“w˜ork.‘É
An˜y“mem˜bMÞer“of“the‘gípublic“is“a“licensee,‘tkandŽ¡‘'¿«is–ÿaddressed“as“\yš²!ou".‘¦@Y‘ÿeou“accept“the“license“if“y˜ou“cop˜y‘ÿe,‘ îmoMÞdify“or“distribute“the“w˜orkŽ¡‘'¿«in–¦fa“w•²!a“y–¦frequiring“pMÞermission“under“cop•²!yrigh“t‘¦fla“w.Ž¦‘'¿«A‘¦\MošMÞdied–ÀV‘ÿeersion"‘Áof“the“Do˜cumenš²!t“means‘Áan˜y“w˜ork“con˜taining“the‘ÁDoMÞcumen˜t“orŽ¡‘'¿«a–‚hpMÞortion›‚gof“it,‘¹heither˜copied“v²!erbatim,‘¹hor˜with“moMÞdications“and/or˜translated“in²!toŽ¡‘'¿«another‘¦flanguage.Ž¦‘'¿«A‘ž\Secondary–ÀSection"“is›Áa“named˜appMÞendix“or˜a“fron²!t-matter˜section“of˜the“DoMÞcumen²!tŽ¡‘'¿«that–Ž/deals“exclusiv²!ely›Ž0with“the“relationship“of˜the“publishers“or“authors˜of“the“DoMÞcumen²!tŽ¡‘'¿«to–z
the‘zDoMÞcumenš²!t's“o˜v˜erall›zsub‘ ›»ject“(or˜to“related“matters)˜and“con²!tains˜nothing“thatŽ¡‘'¿«could–Ø®fall›Ø¯directly“within“that“o•²!v“erall˜sub‘ ›»ject.‘tµ(Th“us,‘%@if˜the›Ø®DoMÞcumen“t˜is˜in‘دpart˜aŽ¡‘'¿«textb•MÞo“ok›Õ†of–Õ…mathematics,‘ÿMa“Secondary˜Section˜ma²!y˜not“explain˜an²!y˜mathematics.)‘˜=TheŽ¡‘'¿«relationship–GÞcould“bMÞe“a“matter“of“historical“connection“with“the“sub‘ ›»ject“or“with“relatedŽ¡‘'¿«matters,–jor‘Bøof›B÷legal,“commercial,‘jphilosophical,“ethical˜or˜p•MÞolitical‘Bøp“osition˜regardingŽ¡‘'¿«them.Ž¦‘'¿«The›r\In•²!v‘ÿdDarian“t–sSections"˜are˜certain˜Secondary“Sections˜whose˜titles˜are“designated,‘0ÖasŽ¡‘'¿«bMÞeing–2Dthose›2Cof“In•²!v‘ÿdDarian“t–2DSections,‘I}in“the“notice˜that“sa²!ys˜that“the“DoMÞcumen²!t˜is“releasedŽŽŒ‹
ˆŸò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:13ŽŽŽ ƒ33 ý ÌÍ‘'¿«under–S5this“License.‘Â"If›S4a“section“doMÞes“not“t˜the“abMÞo•²!v“e–S5denition“of“Secondary˜then“it“isŽ¤
33‘'¿«not›Óallo•²!w“ed˜to‘ÓŽbMÞe˜designated˜as˜In“v‘ÿdDarian“t.‘eSThe˜DoMÞcumen“t˜ma“y‘ÓŽcon“tain˜zero˜In“v‘ÿdDarian“tŽ¡‘'¿«Sections.‘¢ÄIf–õthe“DošMÞcumen²!t“do˜es‘õnot“idenš²!tify“an˜y“In˜v‘ÿdDarian˜t“Sections“then‘õthere“are“none.Ž©&g‘'¿«The›f\Co•²!v“er–f¬T‘ÿeexts"˜are˜certain˜short“passages˜of˜text˜that“are˜listed,‘–¾as˜F‘ÿeron•²!t-Co“v“erŽ¡‘'¿«T›ÿeexts–-or“Bac•²!k-Co“v“er‘,T˜exts,‘"8in–-the“notice“that‘,saš²!ys“that“the“DoMÞcumen˜t‘,is“released“underŽ¡‘'¿«this›’License.‘¯AA‘nF‘ÿeron•²!t-Co“v“er˜T‘ÿeext˜ma“y˜bMÞe˜at˜most˜5›‘w“ords,‘6Šand˜a›’Bac“k-Co“v“er˜T‘ÿeext˜ma“yŽ¡‘'¿«bMÞe–¦fat“most“25“w²!ords.ŽŸ&h‘'¿«A‘C¦\T‘ÿeransparen•²!t"›CÎcop“y˜of‘CÏthe˜DoMÞcumen“t˜means˜a‘CÏmac“hine-readable˜cop“y‘ÿe,‘k(represen“tedŽ¡‘'¿«in–Jma“format›Jnwhose“spMÞecication“is“a²!v‘ÿdDailable“to“the˜general“public,‘snthat˜is“suitable“forŽ¡‘'¿«revising–Îàthe‘ÎßdoMÞcumenš²!t“straigh˜tforw˜ardly“with›Îßgeneric“text˜editors“or“(for˜images“com-Ž¡‘'¿«pMÞosed–ÚÃof›ÚÄpixels)“generic˜pain²!t“programs˜or“(for˜dra²!wings)“some˜widely“a•²!v‘ÿdDailable˜dra“wingŽ¡‘'¿«editor,‘…úand–}ßthat“is“suitable“for“input“to‘}àtext“formatters“or“for“automatic“translation“toŽ¡‘'¿«a–9Ov‘ÿdDariet²!y“of›9Nformats“suitable“for“input“to“text˜formatters.‘¹A‘93cop²!y“made˜in“an“otherwiseŽ¡‘'¿«T‘ÿeransparen²!t–„æle“format›„åwhose“markup,‘¼†or“absence˜of“markup,‘¼†has˜bMÞeen“arranged“toŽ¡‘'¿«th•²!w“art–0ûor›0üdiscourage“subsequen²!t“moMÞdication˜b²!y“readers“is˜not“T‘ÿeransparen²!t.‘¶ºAn“imageŽ¡‘'¿«format– Éis“not“T‘ÿeransparenš²!t“if“used‘ Èfor“an˜y“substan˜tial“amoun˜t“of“text.‘MA‘ ©cop˜y“that“isŽ¡‘'¿«not–¦f\T‘ÿeransparen²!t"“is“called“\Opaque".Ž¦‘'¿«Examples–cXof“suitable›cWformats“for“T‘ÿeransparen²!t“copies“include˜plain“çasci>Ki“áwithoutŽ¡‘'¿«markup,‘„ÂT‘ÿeexinfo–XIinput“format,›„ÁLaT‘þ,³Ÿ[wEŽ‘B X‘XJinput“format,˜ó Kñ`y
cmr10«SGML“áor‘XJ«XML“áusing“a“publiclyŽ¡‘'¿«a²!v‘ÿdDailable–«DTDá,‘üand›Âstandard-conforming“simple˜«HTMLá,‘üP²!ostScript“or˜«PDF“ádesignedŽ¡‘'¿«for–˜.hš²!uman“moMÞdication.‘³4Examples“of“transparen˜t“image“formats“include“«PNGá,‘ÔŸ«X¸ãCFŽ¡‘'¿«áand–¢«JPGá.‘ÐáOpaque“formats“include“proprietary‘¢formats“that“can“bMÞe“read“and“editedŽ¡‘'¿«only–sbš²!y‘sproprietary“w˜ord›sproMÞcessors,‘&J«SGML“áor˜«XML“áfor˜whic²!h“the˜«DTD“áand/orŽ¡‘'¿«pro•MÞcessing›W*to“ols˜are˜not‘W)generally˜a•²!v‘ÿdDailable,‘CYand˜the˜mac“hine-generated˜«HTMLá,Ž¡‘'¿«Pš²!ostScript–¦for“«PDF“áproMÞduced“b˜y“some“w˜ord“prošMÞcessors“for“output“purp˜oses“only‘ÿe.Ž¦‘'¿«The–Ü\Title›ÛP²!age"“means,‘<ùfor˜a“prin²!ted˜b•MÞo“ok,‘<ùthe–Ütitle˜page“itself,‘<ùplus˜sucš²!h“follo˜wingŽ¡‘'¿«pages–RÃas“are“needed“to“hold,–c}legibly‘ÿe,“the–RÃmaterial“this‘RÂLicense“requires“to“appMÞear“in“theŽ¡‘'¿«title–1.page.‘¶ÊF‘ÿeor“w²!orks›1-in“formats˜whic²!h“do“not˜ha•²!v“e‘1.an“y˜title–1.page“as˜sucš²!h,‘HŸ\Title“P˜age"Ž¡‘'¿«means–Žthe“text“near›the“most“prominen²!t“appMÞearance“of“the˜w²!ork's“title,‘¯Xpreceding“theŽ¡‘'¿«bšMÞeginning–¦fof“the“b˜o˜dy“of“the“text.Ž¦‘'¿«The–)—\publisher"“means‘)˜anš²!y“pMÞerson“or“en˜tit˜y“that“distributes‘)˜copies“of“the“DoMÞcumen˜tŽ¡‘'¿«to–¦fthe“public.ŽŸ&h‘'¿«A›ísection–ò\En²!titled“XYZ"˜means“a“named›ósubunit“of“the“DoMÞcumen²!t˜whose“title“eitherŽ¡‘'¿«is–Uªprecisely‘U©XYZ›U•or“con²!tains“XYZ˜in“paren•²!theses›U©follo“wing–Uªtext“that˜translates“XYZ‘U•inŽ¡‘'¿«another–þ¯language.‘¥ö(Here“XYZ‘þ„stands“for“a“spšMÞecic“section“name“men²!tioned“b˜elo•²!w,‘ :suc“hŽ¡‘'¿«as›aa\Ac•²!kno“wledgemen“ts",–o/\Dedications",“\Endorsemen²!ts",“or˜\History".)‘ÆÛT‘ÿeo˜\Preserv²!eŽ¡‘'¿«the–›Title"›šof“suc²!h˜a“section“when˜y²!ou“moMÞdify˜the“DoMÞcumen²!t“means˜that“it˜remains“aŽ¡‘'¿«section–¦f\En²!titled“XYZ"“according“to“this“denition.Ž¦‘'¿«The–SuDoMÞcumenš²!t“ma˜y“include“W‘ÿearran˜t˜y“Disclaimers“next‘Svto“the“notice“whic˜h“states“thatŽ¡‘'¿«this–¹License“applies‘ºto“the“DoMÞcumenš²!t.‘×These“W‘ÿearran˜t˜y“Disclaimers‘ºare“considered“toŽ¡‘'¿«bMÞe–„ýincluded›„þb²!y“reference“in“this˜License,‘¼£but“only“as“regards˜disclaiming“w•²!arran“ties:Ž¡‘'¿«an²!y–nother›n‘implication“that˜these“W‘ÿearran•²!t“y˜Disclaimers‘nma“y˜ha“v“e‘nis˜v“oid–nand˜has“noŽ¡‘'¿«eect–¦fon“the“meaning“of“this“License.Ž¦‘-2.Ž‘'¿«VERBA‘ÿeTIM‘¦fCOPYINGŽŽŒ‹ ˜Ÿò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:14ŽŽŽ ƒ33 ý ÌÍ‘'¿«Y‘ÿeou–’ùmaš²!y“cop˜y“and“distribute“the“DoMÞcumen˜t“in“an˜y“medium,‘Îeither“commercially“orŽ¤
33‘'¿«noncommercially‘ÿe,›zªpro²!vided–that‘this“License,˜the‘cop•²!yrigh“t–notices,˜and‘the“licenseŽ¡‘'¿«notice–Ksa²!ying›K
this“License˜applies“to˜the“DoMÞcumen²!t“are˜reproMÞduced“in˜all“copies,‘t7andŽ¡‘'¿«that–1'yš²!ou“add“no‘1(other“conditions“whatsoMÞev˜er“to“those“of“this“License.‘¶ÉY‘ÿeou“ma˜y“not“useŽ¡‘'¿«tec²!hnical–ò“measures›ò”to“obstruct˜or“con²!trol˜the“reading˜or“further˜cop²!ying“of˜the“copiesŽ¡‘'¿«y•²!ou›òÇmak“e‘òÈor˜distribute.‘¡þHo“w“ev“er,‘´y“ou˜ma“y˜accept‘òÈcompMÞensation˜in˜exc“hange‘òÈfor˜copies.Ž¡‘'¿«If–Þy²!ou›Þdistribute“a“large˜enough“n•²!um“bMÞer˜of–Þcopies“y•²!ou˜m“ust–Þalso“follo²!w˜the“conditionsŽ¡‘'¿«in–¦fsection“3.Ž©"#‘'¿«Y‘ÿeou–}ìma²!y“also›}ëlend“copies,‘¹7under“the“same“conditions“stated˜abMÞo•²!v“e,‘¹8and˜y“ou›}ìma“y˜publiclyŽ¡‘'¿«displa²!y‘¦fcopies.Ž¦‘-3.Ž‘'¿«COPYING–¦fIN“QUANTITYŽ¦‘'¿«If–Ãyš²!ou‘Âpublish“prin˜ted›Âcopies“(or˜copies˜in“media“that˜commonly“ha•²!v“e˜prin“ted˜co“v“ers)‘ÃofŽ¡‘'¿«the‘Ñ.DošMÞcumen•²!t,‘Ûßn“um“b˜ering–Ñ.more“than–Ñ-100,‘Ûàand“the–Ñ.Do˜cumen²!t's“license‘Ñ-notice“requiresŽ¡‘'¿«Co•²!v“er›ÜT‘ÿeexts,‘<ùy“ou‘Ûm“ust˜enclose˜the˜copies‘Ûin˜co“v“ers˜that˜carry–ÿe,‘<ùclearly‘Ûand˜legibly“,‘<ùallŽ¡‘'¿«these›´@Co•²!v“er˜T–ÿeexts:‘ùF“ron•²!t-Co“v“er˜T‘ÿeexts˜on˜the˜fron“t˜co“v“er,‘÷µand˜Bac“k-Co“v“er˜T‘ÿeexts˜onŽ¡‘'¿«the›öbac•²!k‘õco“v“er.‘Ñ
Both˜co“v“ers˜m“ust–õalso˜clearly˜and˜legibly“iden•²!tify˜y“ou˜as‘õthe˜publisherŽ¡‘'¿«of›,these–+copies.‘H/The“fron•²!t˜co“v“er˜m“ust˜presen“t–+the˜full˜title“with˜all˜w²!ords˜of“the˜titleŽ¡‘'¿«equally–³xprominenš²!t“and‘³yvisible.‘Y‘ÿeou“ma˜y›³yadd“other“material“on“the˜co•²!v“ers–³xin“addition.Ž¡‘'¿«Cop•²!ying›Y4with‘Y3c“hanges˜limited–Y3to˜the“co•²!v“ers,‘…ças–Y3long˜as“they˜preserv²!e“the˜title“of˜theŽ¡‘'¿«DošMÞcumen²!t–uand“satisfy“these“conditions,‘¨Åcan“b˜e“treated‘uas“vš²!erbatim“cop˜ying“in“otherŽ¡‘'¿«respMÞects.Ž¦‘'¿«If–î|the“required›î}texts“for“either“co•²!v“er–î|are“toMÞo˜vš²!oluminous“to“t“legibly‘ÿe,‘ ‚y˜ou“should“putŽ¡‘'¿«the–òrst›òones“listed“(as“man²!y˜as“t“reasonably)“on˜the“actual“co•²!v“er,‘ùand˜con“tin“ue‘òtheŽ¡‘'¿«rest–¦fonš²!to“adjacen˜t“pages.ŽŸ""‘'¿«If–?|y²!ou›?{publish“or˜distribute“Opaque˜copies“of˜the“DoMÞcumen•²!t˜n“um“bMÞering–?|more˜than“100,Ž¡‘'¿«y•²!ou›\3m“ust˜either‘\4include˜a˜mac“hine-readable˜T‘ÿeransparen“t˜cop“y˜along‘\4with˜eac“h˜OpaqueŽ¡‘'¿«cop²!y‘ÿe,‘[>or›7state–7in“or˜with“eacš²!h“Opaque“cop˜y‘7a“computer-net˜w˜ork“loMÞcation‘7from“whic˜hŽ¡‘'¿«the›éSgeneral‘éRnet•²!w“ork-using˜public˜has‘éRaccess˜to˜do“wnload˜using‘éRpublic-standard˜net“w“orkŽ¡‘'¿«protoMÞcols–¬=a“complete‘¬>T‘ÿeransparenš²!t“cop˜y“of“the“DoMÞcumen˜t,‘í³free“of“added“material.‘ïcIfŽ¡‘'¿«yš²!ou–ªuse“the‘ªlatter“option,‘êùy˜ou“m˜ust‘ªtak˜e“reasonably“pruden˜t“steps,‘êøwhen“y˜ou“bMÞeginŽ¡‘'¿«distribution–—lof›—mOpaque“copies˜in“quan•²!tit“y‘ÿe,‘Ó®to–—lensure“that˜this“T‘ÿeransparen•²!t˜cop“y‘—lwillŽ¡‘'¿«remain– Cthš²!us“accessible‘ Dat“the“stated“loMÞcation“un˜til‘ Dat“least“one“y˜ear“after‘ Dthe“last“timeŽ¡‘'¿«yš²!ou–k‘distribute‘k’an“Opaque“cop˜y‘k’(directly“or“through“y˜our‘k’agen˜ts“or“retailers)‘k’of“thatŽ¡‘'¿«edition–¦fto“the“public.Ž¦‘'¿«It–&Nis“requested,‘FHbut“not“required,‘FGthat“yš²!ou“con˜tact“the“authors“of“the“DoMÞcumen˜t“w˜ellŽ¡‘'¿«bMÞefore–oÅredistributing‘oÄanš²!y“large“n˜um˜bMÞer›oÄof“copies,‘z²to˜giv²!e“them˜a“c²!hance“to˜proš²!vide“y˜ouŽ¡‘'¿«with–¦fan“upšMÞdated“v²!ersion“of“the“Do˜cumen²!t.Ž¦‘-4.Ž‘'¿«MODIFICA‘ÿeTIONSŽ¦‘'¿«Y‘ÿeou–*maš²!y“cop˜y“and›)distribute“a“MoMÞdied“V‘ÿeersion“of“the˜DoMÞcumen²!t“under“the“conditionsŽ¡‘'¿«of–…šsections›…›2“and˜3“abMÞo•²!v“e,‘¿]pro“vided˜that‘…šy“ou˜release–…šthe˜MoMÞdied“V‘ÿeersion˜under“preciselyŽ¡‘'¿«this–{ÞLicense,‘„`with“the›{ßMoMÞdied“V‘ÿeersion“lling˜the“role“of˜the“DoMÞcumen•²!t,‘„`th“us‘{ÞlicensingŽ¡‘'¿«distribution–¸and“mošMÞdication‘¹of“the“Mo˜died“V‘ÿeersion“to“who˜ev²!er‘¹p˜ossesses“a“cop²!y“ofŽ¡‘'¿«it.‘ÝÝIn–¦faddition,“yš²!ou“m˜ust“do“these“things“in“the“MoMÞdied“V‘ÿeersion:Ž¦‘*òÄA.Ž‘=nUse–ípin“the“Title“Pš²!age“(and“on“the“co˜v˜ers,‘ÿ2if“an˜y)“a“title“distinct“from“that“of“theŽ¡‘=nDoMÞcumenš²!t,‘+and–ˆfrom“those“of“previous“v˜ersions‘‡(whic˜h“should,‘+if“there“w˜ere“an˜y‘ÿe,ŽŽŒ‹ ªóŸò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:15ŽŽŽ ƒ33 ý ÌÍ‘=nbšMÞe–Âølisted“in“the“History‘Â÷section“of“the“Do˜cumenš²!t).‘3“Y‘ÿeou“ma˜y‘Â÷use“the“same“title“asŽ¤
33‘=na–¦fprevious“vš²!ersion“if“the“original“publisher“of“that“v˜ersion“giv˜es“pMÞermission.Ž©€ ‘+gB.Ž‘=nList–ª\on“the“Title›ª[P²!age,‘«Zas“authors,‘«Yone“or“more“pMÞersons˜or“en²!tities“respMÞonsible“forŽ¡‘=nauthorship–"of›"the“moMÞdications“in˜the“MoMÞdied˜V‘ÿeersion,‘<|together“with“at˜least“v²!eŽ¡‘=nof–߸the“principal“authors“of“the“DoMÞcumenš²!t“(all“of“its“principal“authors,‘uif“it“has“few˜erŽ¡‘=nthan–¦fvš²!e),“unless“they“release“y˜ou“from“this“requiremen˜t.ŽŸ€‘+@¢C.Ž‘=nState–±Óon›±Òthe“Title˜page“the˜name“of˜the“publisher˜of“the˜MoMÞdied“V‘ÿeersion,‘´as“theŽ¡‘=npublisher.Ž¦‘*ËÕD.Ž‘=nPreservš²!e–¦fall“the“cop˜yrigh˜t“notices“of“the“DoMÞcumen˜t.Ž¦‘+µoE.Ž‘=nAdd–Äean›Ädappropriate“cop•²!yrigh“t˜notice‘Äefor˜y“our‘ÄemoMÞdications˜adjacen“t–Äeto˜the“otherŽ¡‘=ncop•²!yrigh“t‘¦fnotices.ŽŸ€‘,LF.Ž‘=nInclude,›hSimmediately–XÎafter“the“cop•²!yrigh“t–XÎnotices,˜a“license“notice“giving“the“publicŽ¡‘=npMÞermission–ïËto›ïÊuse“the˜MoMÞdied“V‘ÿeersion“under˜the“terms˜of“this“License,‘Pin˜the“formŽ¡‘=nshoš²!wn–¦fin“the“Addendum“bMÞelo˜w.Ž¦‘*‘nG.Ž‘=nPreserv²!e–¼min›¼lthat“license˜notice“the˜full“lists˜of“In•²!v‘ÿdDarian“t˜Sections–¼mand˜required“Co•²!v“erŽ¡‘=nT‘ÿeexts–¦fgivš²!en“in“the“DoMÞcumen˜t's“license“notice.Ž¦‘*òÄH.Ž‘=nInclude–¦fan“unaltered“cop²!y“of“this“License.ŽŸ€‘/4çI.Ž‘=nPreservš²!e–Ú†the‘Ú‡section“En˜titled‘Ú‡\History",‘çŽPreserv˜e“its›Ú‡Title,‘çŽand“add˜to“it˜an“itemŽ¡‘=nstating–_at›_least“the˜title,–mQy²!ear,“new˜authors,“and–_publisher˜of“the˜MoMÞdied“V‘ÿeersionŽ¡‘=nas–ÄXgivš²!en“on‘ÄWthe“Title“P˜age.‘7³If‘ÄWthere“is“no“section“En˜titled“\History"‘ÄWin“the“DoMÞcu-Ž¡‘=nmenš²!t,‘O#create‘-eone–-dstating“the“title,‘O$y˜ear,–O#authors,“and‘-epublisher–-dof“the“DoMÞcumen˜tŽ¡‘=nas–Wgivš²!en“on“its“Title“P˜age,‘ƒFthen“add“an“item“describing“the“MoMÞdied“V‘ÿeersion“asŽ¡‘=nstated–¦fin“the“previous“sen²!tence.Ž¦‘-ˆ¢J.Ž‘=nPreservš²!e–æthe“net˜w˜ork“loMÞcation,‘õúif“an˜y‘ÿe,‘õúgiv˜en“in“the“DoMÞcumen˜t‘æfor“public“access“toŽ¡‘=na–½…T‘ÿeransparenš²!t“cop˜y‘½†of“the“DoMÞcumen˜t,‘ÃMand“lik˜ewise“the“net˜w˜ork‘½†loMÞcations“giv˜en“inŽ¡‘=nthe–Í„DoMÞcumenš²!t‘̓for“previous“v˜ersions‘̓it“w˜as“based“on.‘S6These‘̓ma˜y“bMÞe“placed‘̓in“theŽ¡‘=n\History"–8section.‘¦ÎY‘ÿeou›9ma²!y“omit˜a“net•²!w“ork–8loMÞcation˜for“a˜w²!ork“that˜w²!as“publishedŽ¡‘=nat–Kleast“four‘Ky²!ears“bšMÞefore“the“Do˜cumen²!t“itself,‘t@or“if“the“original‘Kpublisher“of“theŽ¡‘=nvš²!ersion–¦fit“refers“to“giv˜es“pMÞermission.Ž¦‘*¤åK.Ž‘=nF‘ÿeor–Ùranš²!y“section“En˜titled“\Ac˜kno˜wledgemen˜ts"“or“\Dedications",‘oPreserv˜e“the“TitleŽ¡‘=nof›/Rthe–/Qsection,‘G#and“preserv²!e˜in˜the“section˜all˜the“substance˜and“tone˜of˜eac²!h“of˜theŽ¡‘=ncon•²!tributor›¦fac“kno“wledgemen“ts˜and/or˜dedications˜giv“en˜therein.Ž¦‘,Q*L.Ž‘=nPreservš²!e–?Ôall‘?Óthe“In˜v‘ÿdDarian˜t›?ÓSections“of˜the“DoMÞcumen²!t,‘f/unaltered˜in“their˜text“andŽ¡‘=nin›PÜtheir–PÝtitles.‘Ý@Section“n•²!um“bMÞers˜or‘PÝthe˜equiv‘ÿdDalen“t–PÝare˜not“considered˜part“of˜theŽ¡‘=nsection‘¦ftitles.ŽŸ€‘)M.Ž‘=nDelete–°5anš²!y“section“En˜titled‘°4\Endorsemen˜ts".‘ûJSuc˜h“a“section‘°4ma˜y“not“bMÞe“includedŽ¡‘=nin–¦fthe“MoMÞdied“V‘ÿeersion.Ž¦‘*òÄN.Ž‘=nDo–g!not›g"retitle“an²!y˜existing“section“to˜bMÞe“Enš²!titled“\Endorsemen˜ts"›g"or“to˜con
ict“inŽ¡‘=ntitle–¦fwith“anš²!y“In˜v‘ÿdDarian˜t“Section.Ž¦‘*¤åO.Ž‘=nPreserv•²!e›¦fan“y˜W‘ÿearran“t“y˜Disclaimers.ŽŸÌΑ'¿«If–Øthe›×MoMÞdied“V‘ÿeersion˜includes“new˜fron²!t-matter“sections˜or“appMÞendices˜that“qualifyŽ¡‘'¿«as–XSecondary›X Sections“and“con²!tain“no˜material“copied“from˜the“DoMÞcumen•²!t,‘g´y“ou˜ma“y‘XatŽ¡‘'¿«y²!our–ãkoption›ãldesignate“some˜or“all“of˜these“sections˜as“in•²!v‘ÿdDarian“t.‘”íT‘ÿeo˜do–ãkthis,‘òadd“theirŽŽŒ‹ ½UŸò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:16ŽŽŽ ƒ33 ý ÌÍ‘'¿«titles–@«to“the“list›@¬of“In•²!v‘ÿdDarian“t–@«Sections“in“the“MoMÞdied“V‘ÿeersion's“license˜notice.‘¬¬TheseŽ¤
33‘'¿«titles–¦fmš²!ust“bMÞe“distinct“from“an˜y“other“section“titles.Ž©(ö‘'¿«Y‘ÿeou–pmaš²!y‘qadd“a“section“En˜titled‘q\Endorsemen˜ts",‘s²pro˜vided“it“con˜tains‘qnothing“butŽ¡‘'¿«endorsemen•²!ts›‘of‘‘y“our˜MoMÞdied˜V‘ÿeersion˜b“y‘‘v‘ÿdDarious˜parties|for˜example,‘•Zstatemen“ts˜ofŽ¡‘'¿«pšMÞeer–D
review“or‘Dthat“the“text“has“b˜een‘Dappro•²!v“ed›D
b“y˜an˜organization‘Das˜the˜authoritativ“eŽ¡‘'¿«denition–¦fof“a“standard.ŽŸ(÷‘'¿«Y‘ÿeou–f,ma²!y›f-add“a˜passage“of˜up“to˜vš²!e“w˜ords›f-as“a˜F›ÿeron•²!t-Co“v“er–f,T˜ext,‘sand›f-a“passage˜of“upŽ¡‘'¿«to–@25“wš²!ords‘@Žas“a“Bac˜k-Co˜v˜er“T‘ÿeext,‘Tìto›@Žthe“end“of“the˜list“of“Co•²!v“er–@T‘ÿeexts˜in“the“MoMÞdiedŽ¡‘'¿«V›ÿeersion.‘Õ+Only–N+one‘N*passage“of“F˜ron•²!t-Co“v“er‘N*T˜ext–N+and“one‘N*of“Bac•²!k-Co“v“er‘N+T˜ext‘N*ma“y‘N+bMÞeŽ¡‘'¿«added–NÁbš²!y“(or“through“arrangemen˜ts“made“b˜y)‘NÂan˜y“one“en˜tit˜y‘ÿe.‘À¦If“the“DoMÞcumen˜t“alreadyŽ¡‘'¿«includes›Éa‘Èco•²!v“er˜text–Èfor˜the˜same“co•²!v“er,‘/!previously˜added˜b“y‘Èy“ou˜or‘Èb“y˜arrangemen“tŽ¡‘'¿«made–:Çbš²!y“the“same“en˜tit˜y“y˜ou“are“acting“on“bMÞehalf“of,‘_ßy˜ou“ma˜y‘:Ènot“add“another;‘„÷butŽ¡‘'¿«y•²!ou›)ma“y˜replace–*the˜old˜one,‘2on˜explicit˜pMÞermission˜from˜the“previous˜publisher˜thatŽ¡‘'¿«added–¦fthe“old“one.Ž¦‘'¿«The–^author(s)›]and“publisher(s)˜of“the“DoMÞcumen²!t˜do“not“b²!y˜this“License˜giv²!e“pMÞermissionŽ¡‘'¿«to–¤juse“their›¤knames“for“publicit²!y“for“or˜to“assert“or“imply“endorsemen²!t˜of“an²!y“MoMÞdiedŽ¡‘'¿«V‘ÿeersion.ŽŸ(÷‘-5.Ž‘'¿«COMBINING‘¦fDOCUMENTSŽ¦‘'¿«Y‘ÿeou›¦Çma•²!y‘¦Ècom“bine˜the˜DoMÞcumen“t–¦Èwith˜other“doMÞcumen²!ts˜released˜under“this˜License,Ž¡‘'¿«under–—sthe“terms›—tdened“in“section“4˜abšMÞo•²!v“e–—sfor“mo˜died“v•²!ersions,‘Ó·pro“vided–—sthat“y²!ouŽ¡‘'¿«include– in› the“com²!bination“all“of˜the“In•²!v‘ÿdDarian“t– Sections˜of“all“of“the˜original“doMÞcumen²!ts,Ž¡‘'¿«unmoMÞdied,‘L3and–5¦list›5§them“all˜as“In•²!v‘ÿdDarian“t–5¦Sections˜of“yš²!our“com˜bined‘5§w˜ork“in‘5§its“licenseŽ¡‘'¿«notice,–¦fand“that“yš²!ou“preserv˜e“all“their“W‘ÿearran˜t˜y“Disclaimers.Ž¦‘'¿«The–¢@comš²!bined“w˜ork“need“only“con˜tain“one“cop˜y“of“this“License,‘£and“m˜ultiple“iden˜ticalŽ¡‘'¿«In•²!v‘ÿdDarian“t–æÝSections“maš²!y“bMÞe“replaced“with“a“single‘æÜcop˜y‘ÿe.‘ŸBIf“there“are“m˜ultiple“In˜v‘ÿdDarian˜tŽ¡‘'¿«Sections–6Çwith›6Èthe“same˜name“but˜dierenš²!t“con˜ten˜ts,‘Mmak˜e›6Èthe“title˜of“eac•²!h˜suc“h‘6ÇsectionŽ¡‘'¿«unique–bb²!y›cadding“at˜the“end˜of“it,‘1"in“paren²!theses,‘1!the˜name“of˜the“original˜author“orŽ¡‘'¿«publisher– of“that› ~section“if“kno²!wn,‘!or“else“a“unique˜n•²!um“bMÞer.‘¦‘Mak“e˜the– same“adjustmen²!tŽ¡‘'¿«to–î‡the›î†section“titles“in˜the“list“of˜In•²!v‘ÿdDarian“t–î‡Sections“in“the˜license“notice“of˜the“com²!binedŽ¡‘'¿«w²!ork.ŽŸ(÷‘'¿«In›ö"the‘ö#com•²!bination,‘Jy“ou˜m“ust‘ö#com“bine˜an“y‘ö#sections˜En“titled–ö#\History"˜in“the˜v‘ÿdDari-Ž¡‘'¿«ous–ÜÛoriginal›ÜÚdoMÞcumen²!ts,‘êxforming“one˜section“Enš²!titled“\History";‘ølik˜ewise‘ÜÚcom˜bine“an˜yŽ¡‘'¿«sections–ÑEnš²!titled“\Ac˜kno˜wledgemen˜ts",‘Û¿and“an˜y“sections“En˜titled“\Dedications".‘]çY‘ÿeouŽ¡‘'¿«mš²!ust–¦fdelete“all“sections“En˜titled“\Endorsemen˜ts."Ž¦‘-6.Ž‘'¿«COLLECTIONS–¦fOF“DOCUMENTSŽŸ(÷‘'¿«Y‘ÿeou–Ò¤maš²!y“mak˜e“a“collection“consisting“of‘Ò£the“DoMÞcumen˜t“and“other“doMÞcumen˜ts“releasedŽ¡‘'¿«under–this“License,‘sÚand“replace“the“individual“copies“of“this“License“in“the“v‘ÿdDariousŽ¡‘'¿«doMÞcumenš²!ts–Dwith‘Ca“single“cop˜y›Cthat“is˜included“in“the˜collection,‘y»pro²!vided˜that“y²!ouŽ¡‘'¿«follo²!w–t”the›t•rules“of˜this“License˜for“v•²!erbatim˜cop“ying‘t”of˜eac“h–t”of˜the“doMÞcumen²!ts˜in“allŽ¡‘'¿«other‘¦frespMÞects.Ž¦‘'¿«Y‘ÿeou–Æ=maš²!y“extract“a“single“doMÞcumen˜t“from“suc˜h“a“collection,‘Î2and“distribute“it“individu-Ž¡‘'¿«ally–4under›4this“License,‘Wnpro•²!vided˜y“ou–4insert“a“cop²!y˜of“this“License“in²!to˜the“extractedŽ¡‘'¿«doMÞcumen•²!t,‘ùøand›éBfollo“w–éAthis˜License“in“all˜other“respMÞects˜regarding“v•²!erbatim˜cop“ying‘éAofŽ¡‘'¿«that‘¦fdoMÞcumen²!t.ŽŽŒ‹ ͶŸò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:17ŽŽŽ ƒ33 ý ÌÍ‘-7.Ž‘'¿«Aš²!GGREGA‘ÿeTION–¦fWITH“INDEPENDENT“W˜ORKSŽ©(ö‘'¿«A‘]Æcompilation–]Øof“the“DoMÞcumenš²!t‘]Ùor“its“deriv‘ÿdDativ˜es“with“other‘]Ùseparate“and“indepMÞenden˜tŽ¤
33‘'¿«doMÞcumen•²!ts›ÿhor‘ÿiw“orks,‘©in˜or˜on‘ÿia˜v“olume–ÿiof˜a“storage˜or˜distribution“medium,‘©is˜calledŽ¡‘'¿«an–\aggregate"“if“the›
cop•²!yrigh“t–resulting“from“the“compilation“is“not˜used“to“limit“theŽ¡‘'¿«legal–1 righ²!ts›1of“the“compilation's˜users“bMÞey²!ond˜what“the“individual˜w²!orks“pMÞermit.‘¶¾WhenŽ¡‘'¿«the–žDošMÞcumen²!t“is“included‘žin“an“aggregate,‘Ûðthis“License“do˜es“not‘žapply“to“the“otherŽ¡‘'¿«wš²!orks–¦fin“the“aggregate“whic˜h“are“not“themselv˜es“deriv‘ÿdDativ˜e“w˜orks“of“the“DoMÞcumen˜t.ŽŸ(÷‘'¿«If–»Vthe“Co•²!v“er–»VT‘ÿeext“requiremenš²!t“of“section“3‘»Uis“applicable“to“these“copies“of“the“DoMÞcumen˜t,Ž¡‘'¿«then–°Dif›°Ethe“DoMÞcumen²!t“is“less˜than“one“half“of˜the“en²!tire“aggregate,‘á~the˜DoMÞcumenš²!t's“Co˜v˜erŽ¡‘'¿«T‘ÿeexts–0maš²!y“bMÞe“placed“on“co˜v˜ers“that“brac˜k˜et“the“DoMÞcumen˜t“within“the‘0aggregate,‘G°or“theŽ¡‘'¿«electronic–5qequiv‘ÿdDalenš²!t‘5pof“co˜v˜ers›5pif“the˜DoMÞcumen²!t“is“in˜electronic“form.‘ŠüOtherwise“theyŽ¡‘'¿«mš²!ust–¦fappMÞear“on“prin˜ted“co˜v˜ers“that“brac˜k˜et“the“whole“aggregate.Ž¦‘-8.Ž‘'¿«TRANSLA‘ÿeTIONŽŸ(÷‘'¿«T‘ÿeranslation–̯is›Ì°considered“a˜kind“of“moMÞdication,‘Aso˜yš²!ou“ma˜y‘Ì°distribute“translationsŽ¡‘'¿«of–Tþthe›TýDoMÞcumen²!t“under˜the“terms˜of“section“4.‘ é£Replacing“In•²!v‘ÿdDarian“t˜Sections‘TþwithŽ¡‘'¿«translations–v²requires‘v³spšMÞecial“p˜ermission“from“their›v³cop•²!yrigh“t‘v²holders,‘êÄbut˜y“ou‘v²ma“yŽ¡‘'¿«include–ðktranslations“of“some›ðjor“all“In•²!v‘ÿdDarian“t–ðkSections“in“addition˜to“the“original“v²!ersionsŽ¡‘'¿«of›Æthese‘ÆIn•²!v‘ÿdDarian“t˜Sections.‘= Y‘ÿeou‘Æma“y˜include–Æa˜translation˜of“this˜License,‘Î
and“all˜theŽ¡‘'¿«license–òúnotices›òûin“the“DoMÞcumen•²!t,‘Fand˜an“y›òúW‘ÿearran“t“y˜Disclaimers,‘Fpro“vided‘òûthat˜y“ouŽ¡‘'¿«also–Ï include›Îÿthe“original“English˜v²!ersion“of“this“License˜and“the“original˜v²!ersions“ofŽ¡‘'¿«those–notices“and“disclaimers.‘5åIn“case“of“a“disagreemen•²!t‘bMÞet“w“een–the“translation“andŽ¡‘'¿«the–:•original›:”v²!ersion“of˜this“License˜or“a˜notice“or˜disclaimer,‘_ the“original˜v²!ersion“willŽ¡‘'¿«prev‘ÿdDail.Ž¦‘'¿«If–pèa“section“in‘péthe“DoMÞcumenš²!t“is“En˜titled“\Ac˜kno˜wledgemen˜ts",–{›\Dedications",“or‘pè\His-Ž¡‘'¿«tory",‘A¿the–(•requiremenš²!t“(section“4)“to“Preserv˜e“its“Title“(section“1)“will“t˜ypically“requireŽ¡‘'¿«c²!hanging–¦fthe“actual“title.Ž¦‘-9.Ž‘'¿«TERMINA‘ÿeTIONŽŸ(÷‘'¿«Y‘ÿeou–”maš²!y“not‘”cop˜y–ÿe,›—¾moMÞdify“,˜sublicense,˜or–”distribute“the“DoMÞcumen²!t‘”except“as“expresslyŽ¡‘'¿«proš²!vided–¡ðunder‘¡ñthis“License.‘Ð|An˜y›¡ñattempt“otherwise˜to“cop²!y–ÿe,›àÓmoMÞdify“,‘àÒsublicense,˜orŽ¡‘'¿«distribute–¦fit“is“vš²!oid,“and“will“automatically“terminate“y˜our“righ˜ts“under“this“License.Ž¦‘'¿«Ho•²!w“ev“er,‘ó·if›äAy“ou–ä@cease˜all“violation˜of“this“License,‘ó¸then“y²!our˜license“from˜a“particularŽ¡‘'¿«cop•²!yrigh“t–Jholder“is‘Jreinstated“(a)“proš²!visionally‘ÿe,‘sšunless“and“un˜til‘Jthe“cop˜yrigh˜t“holderŽ¡‘'¿«explicitly–á_and“nally“terminates“yš²!our“license,‘0and“(b)“pMÞermanen˜tly‘ÿe,‘0if“the“cop˜yrigh˜tŽ¡‘'¿«holder–"fails“to“notify“yš²!ou“of“the“violation‘"b˜y“some“reasonable“means“prior“to“60“da˜ysŽ¡‘'¿«after–¦fthe“cessation.ŽŸ(÷‘'¿«Moreo•²!v“er,‘Ï8y“our–Ç
license›Çfrom“a˜particular˜cop•²!yrigh“t–Ç
holder˜is˜reinstated“pMÞermanen²!tly˜ifŽ¡‘'¿«the›V`cop•²!yrigh“t˜holder‘Vanoties˜y“ou˜of˜the˜violation‘Vab“y˜some˜reasonable˜means,‘fbthis˜is˜theŽ¡‘'¿«rst–Wtime“y•²!ou‘Wha“v“e›Wreceiv“ed˜notice˜of˜violation‘Wof˜this˜License˜(for˜an“y‘Ww“ork)˜from˜thatŽ¡‘'¿«cop•²!yrigh“t–Õúholder,‘áÞand“yš²!ou“cure“the“violation“prior‘Õùto“30“da˜ys“after“y˜our‘Õùreceipt“of“theŽ¡‘'¿«notice.Ž¦‘'¿«T‘ÿeermination–Nuof“yš²!our“righ˜ts“under“this“section‘NtdoMÞes“not“terminate“the“licenses“of“partiesŽ¡‘'¿«who›•qha•²!v“e˜receiv“ed˜copies˜or˜righ“ts˜from˜y“ou‘•punder˜this˜License.‘ªþIf˜y“our˜righ“ts˜ha“v“eŽ¡‘'¿«bšMÞeen–Îterminated“and“not‘Íp˜ermanenš²!tly“reinstated,‘:¹receipt“of“a“cop˜y“of“some‘Íor“all“of“theŽ¡‘'¿«same–¦fmaterial“doMÞes“not“givš²!e“y˜ou“an˜y“righ˜ts“to“use“it.ŽŽŒ‹ ߟò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:18ŽŽŽ ƒ33 ý ÌÍ‘‡“10.Ž‘'¿«FUTURE–¦fREVISIONS“OF“THIS“LICENSEŽ©33‘'¿«The›ÿaF‘ÿeree‘ÿbSoft•²!w“are˜F‘ÿeoundation‘ÿbma“y˜publish–ÿbnew,‘UŸrevised“v²!ersions˜of“the˜GNU‘ÿ F‘ÿereeŽ¤
33‘'¿«DoMÞcumenš²!tation–ÙâLicense‘Ùãfrom“time“to“time.‘xRSuc˜h“new‘Ùãv˜ersions“will“bMÞe“similar‘Ùãin“spiritŽ¡‘'¿«to– æthe“presenš²!t“v˜ersion,‘?…but“ma˜y“dier“in“detail“to“address‘ ånew“problems“or“concerns.Ž¡‘'¿«See‘¦fâhttp://www.gnu.org/copyleft/á.Ž¦‘'¿«Eac•²!h›ˆ×v“ersion˜of˜the˜License˜is˜giv“en˜a˜distinguishing˜v“ersion˜n“um“b•MÞer.‘ÔIf˜the˜Do“cumen²!tŽ¡‘'¿«spšMÞecies–r”that“a“particular“n•²!um“b˜ered›r”v“ersion˜of˜this˜License˜\or˜an“y˜later˜v“ersion"Ž¡‘'¿«applies‘æQto–æPit,‘öLyš²!ou“ha˜v˜e–æQthe“option‘æPof“follo˜wing“the“terms›æPand“conditions“either˜of“thatŽ¡‘'¿«spMÞecied–Žvš²!ersion“or“of“an˜y“later“v˜ersion“that‘Žhas“bMÞeen“published“(not“as“a“draft)“b˜yŽ¡‘'¿«the›î!F‘ÿeree‘î"Soft•²!w“are˜F‘ÿeoundation.‘µIf‘î"the˜DošMÞcumen“t‘î"do˜es–î!not“sp˜ecify›î"a“v•²!ersion˜n“um“bMÞer‘î!ofŽ¡‘'¿«this–$œLicense,‘D)yš²!ou“ma˜y“c˜hoMÞose‘$an˜y“v˜ersion“ev˜er“published“(not“as“a“draft)“b˜y“the“F‘ÿereeŽ¡‘'¿«Soft•²!w“are–ÖUF‘ÿeoundation.‘m©If“the“DošMÞcumen²!t“sp˜ecies“that“a“proš²!xy‘ÖTcan“decide“whic˜h“futureŽ¡‘'¿«v²!ersions–é)of›é*this“License˜can“bMÞe“used,‘ùÚthat˜proš²!xy's“public“statemen˜t›é*of“acceptance˜of“aŽ¡‘'¿«v•²!ersion›¦fpMÞermanen“tly˜authorizes˜y“ou˜to˜c“hoMÞose˜that˜v“ersion˜for˜the˜DoMÞcumen“t.Ž¦‘‡“11.Ž‘'¿«RELICENSINGŽ¦‘'¿«\Massivš²!e–{"Multiauthor‘{#CollabMÞoration“Site"“(or“\MMC‘zìSite")“means“an˜y‘{#W‘ÿeorld“WideŽ¡‘'¿«W‘ÿeeb–Leservš²!er“that“publishes“cop˜yrigh˜table‘Lfw˜orks“and“also“pro˜vides“prominen˜t“facilitiesŽ¡‘'¿«for›M an²!yb•MÞo“dy˜to˜edit˜those˜w•²!orks.‘ÀEA‘MŠpublic˜wiki˜that‘MŸan“yb•MÞo“dy˜can˜edit˜is˜an˜example˜ofŽ¡‘'¿«sucš²!h–Ya“serv˜er.‘µA‘?\Massiv˜e‘XMultiauthor“CollabMÞoration"“(or“\MMC")‘>con˜tained“in“theŽ¡‘'¿«site–¦fmeans“anš²!y“set“of“cop˜yrigh˜table“w˜orks“th˜us“published“on“the“MMC“site.Ž¦‘'¿«\CC-BY-SA"‘8¤means–8Éthe‘8ÊCreativš²!e“Commons“A˜ttribution-Share‘8ÊAlik˜e“3.0‘8Êlicense“pub-Ž¡‘'¿«lished›8b•²!y‘8Creativ“e˜Commons–8CorpMÞoration,‘N(a˜not-for-prot“corpMÞoration˜with“a˜principalŽ¡‘'¿«place–òof“business“in“San“F‘ÿerancisco,‘7£California,‘7¢as“wš²!ell“as“future“cop˜yleft“v˜ersions“of“thatŽ¡‘'¿«license–¦fpublished“b²!y“that“same“organization.Ž¦‘'¿«\IncorpšMÞorate"–zmeans“to“publish‘yor“republish“a“Do˜cumen²!t,›¯?in“whole“or‘yin“part,˜as“partŽ¡‘'¿«of–¦fanother“DoMÞcumen²!t.Ž¦‘'¿«An–&\MMC‘&<is“\eligible›&]for“relicensing"“if“it“is˜licensed“under“this“License,‘?øand˜if“all“w²!orksŽ¡‘'¿«that–
w²!ere›rst“published˜under“this˜License“somewhere“other˜than“this˜MMC,“andŽ¡‘'¿«subsequen²!tly–-incorpMÞorated›-in“whole“or˜in“part“in²!to˜the“MMC,˜(1)“had“no˜co•²!v“er‘-textsŽ¡‘'¿«or›¦fin•²!v‘ÿdDarian“t˜sections,˜and˜(2)˜w“ere˜th“us˜incorpMÞorated˜prior˜to˜No“v“em“bMÞer˜1,˜2008.Ž¦‘'¿«The–àÊopMÞerator›àËof“an˜MMC‘àzSite“ma²!y˜republish“an“MMC‘àzcon²!tained˜in“the˜site“underŽ¡‘'¿«CC-BY-SA‘ on– the› same“site“at˜an²!y“time“bMÞefore˜August“1,–¡[2009,“pro²!vided˜the‘ MMC‘ isŽ¡‘'¿«eligible–¦ffor“relicensing.ŽŽŒ‹ ðןò ‘GáAppšMÞendix–¦fA:“GNU“F‘ÿeree“Do˜cumen²!tation“License’ Á:19ŽŽŽ ƒ33 ý ÌÍ‘Gë]ADDENDUM:–f@HošŒÌw“to“use“this“License“for“y˜our“dos3cumen˜tsŽŽŸ33‘GáT‘ÿeo–'òuse“this“License“in“a“doMÞcumenš²!t“y˜ou‘'óha˜v˜e“written,‘HUinclude“a“cop˜y“of“the“License“in“theŽ¤
33‘GdoMÞcumenš²!t–¦fand“put“the“follo˜wing“cop˜yrigh˜t“and“license“notices“just“after“the“title“page:Ž©
€ ‘8lÈÉCopyright‘¹–(C)– s,óFßê<x
cmsltt10ëFyear“your‘¹—nameÉ.Ž¤
€ ‘8lÈPermission–¹–is“granted“to“copy,“distribute“and/or“modify“this“documentŽ¡‘8lÈunder–¹–the“terms“of“the“GNU“Free“Documentation“License,“Version“1.3Ž¡‘8lÈor–¹–any“later“version“published“by“the“Free“Software“Foundation;Ž¡‘8lÈwith–¹–no“Invariant“Sections,“no“Front-Cover“Texts,“and“no“Back-CoverŽ¡‘8lÈTexts.‘ s,A–¹–copy“of“the“license“is“included“in“the“section“entitled“``GNUŽ¡‘8lÈFree–¹–Documentation“License''.ŽŽŸO33‘!GáIf›ÊÌy•²!ou‘ÊÍha“v“e˜In“v‘ÿdDarian“t›ÊÍSections,‘åF‘ÿeron“t-Co“v“er˜T‘ÿeexts‘ÊÌand˜Bac“k-Co“v“er–ÊÌT‘ÿeexts,‘æreplace“theŽ¡‘G\with‘ ©ä.–§‘.“.Ž‘lÏT‘ÿeexts."‘ÝÝline–¦fwith“this:Ž¦‘AßôÉwith–¹–the“Invariant“Sections“being“ëFlist–¹—their“titlesÉ,‘¹–withŽ¤
€ ‘Aßôthe–¹–Front-Cover“Texts“being“ëFlistÉ,“and“with“the“Back-Cover“TextsŽ¡‘Aßôbeing‘¹–ëFlistÉ.ŽŽŸ%33‘!GáIf–:üyš²!ou“ha˜v˜e“In˜v‘ÿdDarian˜t“Sections“without“Co˜v˜er“T‘ÿeexts,‘`"or“some“other“com˜bination“of“theŽ¡‘Gthree,–¦fmerge“those“t•²!w“o›¦falternativ“es˜to˜suit˜the˜situation.ŽŸ33‘!GIf–Ý yš²!our“doMÞcumen˜t“con˜tains“non˜trivial‘Ýexamples“of“program“coMÞde,‘aw˜e“recommend“releasingŽ¡‘Gthese–-éexamples›-êin“parallel˜under“y•²!our˜c“hoice–-éof˜free“soft•²!w“are˜license,‘Êsuc“h–-éas˜the“GNUŽ¡‘GGeneral–¦fPublic“License,“to“pMÞermit“their“use“in“free“soft•²!w“are.ŽŽŒ‹ þŸò ‘GáAppMÞendix–¦fB:“Concept“Index’ x20ŽŽŽ ƒ33 ýˆÌÌ‘GëTApp‘ Š=endix‘záB‘ ¸QConcept‘z³IndexŽŽ U¿Ÿ‡ç°‘šßë]AŽ¤
÷‘Góo´‹Ç cmr9¬anc•¾9hored‘Tsearc“h‘ Ä£‘ ÅUó5ùž"