malcConsistencybfa56ed5 years agoHistory
141 lines · 3.4 KB · Shell
RawDownload
#!/bin/shset -eu cat<<EOFtype rgb = (float * float * float)and rgba = (float * float * float * float)and fitmodel = | FitWidth | FitProportional | FitPageand irect = (int * int * int * int)and colorspace = | Rgb | Grayand keymap =  | KMinsrt of key | KMinsrl of key list | KMmulti of (key list * key list)and key = (int * int)and keyhash = (key, keymap) Hashtbl.tand keystate = | KSnone | KSinto of (key list * key list)and css = string and dcf = string and hcs = stringand columns =  | Csingle of singlecolumn  | Cmulti of multicolumns  | Csplit of splitcolumnsand mark =  | MarkPage  | MarkBlock  | MarkLine  | MarkWordand multicolumns = (multicol * pagegeom)and singlecolumn = pagegeomand splitcolumns = (columncount * pagegeom)and pagegeom = (pdimno * x * y * (pageno * w * h * leftx)) arrayand multicol = (columncount * covercount * covercount)and columncount = intand pdimno = int and pageno = intand x = int and y = int and leftx = int and w = int and  h = intand covercount = intand memsize = int and texcount = intand sliceheight = intand zoom = floatlet scrollbvv = 1 and scrollbhv = 2EOF init=assi=g() {    printf "mutable $1:$2;"    init="$init $1=$3;"    assi="$assi dst.$1 <- src.$1;"}i() { g "$1" int "$2"; }b() { g "$1" bool "$2"; }f() { g "$1" float "$2"; }s() { g "$1" string "$2"; }K() {    printf "mutable $1:$2;\n"    init="$init $1=$3;"    assi="$assi dst.keyhashes <- copykeyhashes src;"}P() {    printf "mutable $1 : float option;\n"    init="$init $1=None;"    assi="$assi dst.pax <- if src.pax = None then None else Some 0.0;"}echo "type conf = {"i scrollbw 7i scrollh 12i scrollb "scrollbhv lor scrollbvv"b icase trueb preload truei pagebias 0b verbose falseb debug falsei scrollstep 24i hscrollstep 24b maxhfit truei autoscrollstep 2b hlinks falseb underinfo falsei interpagespace 2f zoom 1.0b presentation falsei angle 0i cwinw 1800i cwinh 1500g fitmodel fitmodel FitProportionalb trimmargins falseg trimfuzz irect "(0,0,0,0)"g memlimit memsize "128 lsl 20"g texcount texcount 256g sliceheight sliceheight 24g thumbw w 76g bgcolor rgb "(0.5, 0.5, 0.5)"g papercolor rgba "(1.0, 1.0, 1.0, 0.0)"g sbarcolor rgba "(0.64, 0.64, 0.64, 0.7)"g sbarhndlcolor rgba "(0.0, 0.0, 0.0, 0.7)"g texturecolor rgba "(0.0, 0.0, 0.0, 0.0)"i tilew 2048i tileh 2048g mustoresize memsize "256 lsl 20"i aalevel 8s urilauncher "{|$uopen|}"s pathlauncher "{|$print|}"g colorspace colorspace Rgbb invert falsef colorscale 1.g columns columns "Csingle [||]"g beyecolumns "columncount option" Nones selcmd "{|$clip|}"s pastecmd "{|$paste|}"s paxcmd '{|echo PAX "%s">&2|}'s passcmd Utils.E.ss savecmd Utils.E.sb updatecurs trueK keyhashes '(string * keyhash) list' \'(let mk n = (n, Hashtbl.create 1) in      [ mk "global"; mk "info" ; mk "help"; mk "outline"; mk "listview"      ; mk "birdseye"; mk "textentry"; mk "links"; mk "view" ])'i hfsize 'Wsi.fontsizescale 12'f pgscale 1.b wheelbypage falses stcmd "{|echo SyncTex|}"b riani falseg paxmark mark MarkWordb leftscroll falses title Utils.E.sf lastvisit 0.0b annotinline trueb coarseprespos falseg css css Utils.E.sb usedoccss trues key Utils.E.sP paxg dcf dcf Utils.E.ss hcs "{|aoeuidhtns|}"i rlw 420i rlh 595i rlem 11 cat <<EOF}let copykeyhashes c = List.map (fun (k, v) -> k, Hashtbl.copy v) c.keyhasheslet defconf = {$init}let setconf dst src = $assi;EOF

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t