Commits

camlspotter committed be11a5f

simplify

Comments (0)

Files changed (42)

examples/liv-furuse/.cvsignore

-liv
-liv.byt
-.xvpics
-
-Makefile
-Makefile.in

examples/liv-furuse/.depend

-deficon.cmo: 
-deficon.cmx: 
-mylazy.cmo: mylazy.cmi 
-mylazy.cmx: mylazy.cmi 
-cache.cmo: cache.cmi 
-cache.cmx: cache.cmi 
-livmisc.cmo: 
-livmisc.cmx: 
-gui.cmo: 
-gui.cmx: 
-jWidget.cmo: gui.cmo 
-jWidget.cmx: gui.cmx 
-seq.cmo: 
-seq.cmx: 
-tout.cmo: livmisc.cmo 
-tout.cmx: livmisc.cmx 
-enhance.cmo: 
-enhance.cmx: 
-viewer.cmo: gui.cmo 
-viewer.cmx: gui.cmx 
-edge.cmo: 
-edge.cmx: 
-pathfind.cmo: 
-pathfind.cmx: 
-iconcap.cmo: pathfind.cmo livmisc.cmo 
-iconcap.cmx: pathfind.cmx livmisc.cmx 
-livshtype.cmo: livmisc.cmo livshtype.cmi 
-livshtype.cmx: livmisc.cmx livshtype.cmi 
-icon.cmo: pathfind.cmo livshtype.cmi iconcap.cmo gui.cmo 
-icon.cmx: pathfind.cmx livshtype.cmx iconcap.cmx gui.cmx 
-livsh.cmo: seq.cmo pathfind.cmo mylazy.cmi livshtype.cmi livmisc.cmo \
-    jWidget.cmo icon.cmo gui.cmo deficon.cmo 
-livsh.cmx: seq.cmx pathfind.cmx mylazy.cmx livshtype.cmx livmisc.cmx \
-    jWidget.cmx icon.cmx gui.cmx deficon.cmx 
-scandir.cmo: 
-scandir.cmx: 
-jpf.cmo: 
-jpf.cmx: 

examples/liv-furuse/BulletHole.xpm

Removed
Old image
-/* XPM */
-static char * BulletHole_xpm[] = {
-"48 48 63 1",
-" 	c None",
-".	c #CF3CCB2BCF3C",
-"X	c #EFBEEBADEFBE",
-"o	c #D75CD34CD75C",
-"O	c #514451445144",
-"+	c #9E799A699E79",
-"@	c #FFFFFBEEFFFF",
-"#	c #E79DE38DE79D",
-"$	c #082008200820",
-"%	c #965892489658",
-"&	c #A699A289A699",
-"*	c #BEFBBAEABEFB",
-"=	c #410341034103",
-"-	c #861782078617",
-";	c #8E388A288E38",
-":	c #DF7DDB6CDF7D",
-">	c #F7DEF3CEF7DE",
-",	c #208120812081",
-"<	c #000000000000",
-"1	c #28A228A228A2",
-"2	c #B6DAB2CAB6DA",
-"3	c #30C230C230C2",
-"4	c #596559655965",
-"5	c #96589A699E79",
-"6	c #71C671C671C6",
-"7	c #69A669A669A6",
-"8	c #618561856185",
-"9	c #30C228A228A2",
-"0	c #DF7DD34CDF7D",
-"q	c #BEFBB2CABEFB",
-"w	c #492449244924",
-"e	c #104010401040",
-"r	c #104010400820",
-"t	c #8E3892489658",
-"y	c #AEBAB2CAAEBA",
-"u	c #9E7992489E79",
-"i	c #186118611861",
-"p	c #86178A288617",
-"a	c #79E779E779E7",
-"s	c #596559655144",
-"d	c #C71BC30BC71B",
-"f	c #F7DEFBEEFFFF",
-"g	c #AEBAA289A699",
-"h	c #208128A22081",
-"j	c #E79DEBADE79D",
-"k	c #28A230C230C2",
-"l	c #38E338E338E3",
-"z	c #FFFFF3CEF7DE",
-"x	c #9E7992489658",
-"c	c #79E771C671C6",
-"v	c #EFBEE38DE79D",
-"b	c #BEFBC30BC71B",
-"n	c #A699A2899E79",
-"m	c #C71BCB2BCF3C",
-"M	c #492451445144",
-"N	c #861779E78617",
-"B	c #CF3CD34CCF3C",
-"V	c #AEBAAAAAB6DA",
-"C	c #A699A289AEBA",
-"Z	c #D75CCB2BCF3C",
-"A	c #F7DEF3CEEFBE",
-"S	c #79E782078617",
-"D	c #596551445144",
-"                                                ",
-"                .X                              ",
-"                XoO+                            ",
-"                @#O$%              &X %         ",
-"               *@#%=$-            o@o$;         ",
-"               :>:o%,<O          X@X%1          ",
-"               XX: 2-3$,O4- +  5:@>>&=          ",
-"               >:;-67-88=9,11 @@@#.0-=          ",
-"               @qO4w1,13er$$,7ty u&.O3          ",
-"              &@4e,,ie<<<<<<<<e4;p% =1          ",
-"              o2=,r<<<<<<<<<<<<<=Oa%ew          ",
-"        +5   o*,<<<<<<<<<<<<<<<<<,=7i8          ",
-"        >+ws-21<<<<<<<<<<<<<<<<<<<e933+     do& ",
-"       :@d%;8e<<<<<<<<<<<<<<<<<<<<<eO&#XXX@@@d; ",
-"  X>:oo@* +8$<<<<<<<<<<<<<<<<<<<<<<<w5o>>f>Xg=  ",
-"  o@@@@@2&6e<<<<<<<<<<<<<<<<<<<<<<<<h6dX#0Xjkw  ",
-"  .@.#:d&-1<<<<<<<<<<<<<<<<<<<<<<<<<$Od>#.:%<%  ",
-"   @..2&-l$<<<<<<<<<<<<<<<<<<<<<<<<<<l.z#.*l3   ",
-"   ##2%6wi<<<<<<<<<<<<<<<<<<<<<<<<<<<hd>X*x$6   ",
-"   .@+;63r<<<<<<<<<<<<<<<<<<<<<<<<<<<<6>Xd6i    ",
-"    X*uck$<<<<<<<<<<<<<<<<<<<<<<<<<<<<3v#:lO    ",
-"    b>n6l$<<<<<<<<<<<<<<<<<<<<<<<<<<<<,0:%<     ",
-"     X*al$<<<<<<<<<<<<<<<<<<<<<<<<<<<<<m#13     ",
-"     d>aM$<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*;$%     ",
-"     2@26<<<<<<<<<<<<<<<<<<<<<<<<<<<<<eN$8      ",
-"     X>&4$<<<<<<<<<<<<<<<<<<<<<<<<<<<<elO       ",
-"    :@.;=e<<<<<<<<<<<<<<<<<<<<<<<<<<<<,ww       ",
-"   *@X*73,<<<<<<<<<<<<<<<<<<<<<<<<<<<<11$       ",
-"   :fo%7=i<<<<<<<<<<<<<<<<<<<<<<<<<<<<=a<7      ",
-"   X>*uaw,<<<<<<<<<<<<<<<<<<<<<<<<<<<r :e=      ",
-"   @>2awl,,<<<<<<<<<<<<<<<<<<<<<<<<<<8:Ba1      ",
-"  .XV3e$ekw$<<<<<<<<<<<<<<<<<<<<<<<<1+>b11      ",
-"  #d1eO;  6-r<<<<<<<<<<<<<<<<<<<<<<$7X>&l1      ",
-"  X4,tC   ;>2$<<<<<<<<<<<<<<<<<<<<<=#@#&3=      ",
-"  d,+      d@7h<<<<<<<<<<<<<<<<<<$wd@zoq41      ",
-"  6-       o@&81e$<<<<<<<<<<<<<145:@>#.Zae6     ",
-"           d>#x=1e<<<<<<<<<<<ia2#0A>#:ZZ2,=     ",
-"           *XA*-==,i$<<<<<$l6*X@X0X#o.m..4<+    ",
-"            X>d%784886M8-a% C.@@XX@>voZ:2ae8    ",
-"           &#@dt;-SNux-&&6=3O2X@ --dXvZ %Oi=    ",
-"           &d@0&+%;NDi<<<11$$6o*<<3    &x=$1    ",
-"            q@v* &g8<lO-    8O:r<6              ",
-"             j@o*2;kO        %6<8               ",
-"             +X>Bd8i%          ;                ",
-"              yXz.8i                            ",
-"               gb@nr                            ",
-"                ;a8<%                           ",
-"                  &7-                           "};

examples/liv-furuse/File.xpm

Removed
Old image
-/* XPM */
-static char * File_xpm[] = {
-"48 48 20 1",
-" 	c None",
-".	c #514451445144",
-"X	c #EFBEEFBEEFBE",
-"o	c #000000000000",
-"O	c #5144104071C6",
-"+	c #861710409E79",
-"@	c #71C610408617",
-"#	c #514410406185",
-"$	c #5144000071C6",
-"%	c #410310406185",
-"&	c #514400006185",
-"*	c #410310405144",
-"=	c #410300006185",
-"-	c #514400005144",
-";	c #30C210404103",
-":	c #30C2104030C2",
-">	c #30C200004103",
-",	c #2081000030C2",
-"<	c #208100002081",
-"1	c #104000001040",
-"                                                ",
-"                                                ",
-"   ..........................................   ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo  ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOXOOOOXXOOOOOXOOOOOXOOOOOXOOOOXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOOOOOXOOXOOOOOOOOOOXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOOOXOOOOOOOOOOOXOOOOOOOOOOOOOOOOOXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXOOOOOOOOOOXOOOOOOOOOXOOOOXXOXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOOOOOOOOOOOOOOXOOOOOOOOOOOXOOOOXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOXOOOXOOOOOOOOOO+XOOOOXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOOOO@XOXXXOOXXOOOOOOOOOOOXOOOOOXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOXOOOOOXOOOOOXOOOOOOOOOOOOOOOXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOOOOOOOOOOOOOOOOOXOOOOOXOOOXOOOOOXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX#$%&#$%&#$XX#$XXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXX*=X-*=*-*=*-X=*-*=XXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOOOOOOOOXOOOOOOOOOOOOOOO;XXOOOXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX:>:>X>:>:>:>XXXOOOXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXOOOXOOOOOXOOOOOOX,<XXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXOOOOXOOOOOOXOOOOOOXOOOOOO<XXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX1XOOOOOOOOOOOOOOOOOX11X111XOOOOOOOXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .ooooooooooooooooooooooooooooooooooooooooooo ",
-"    ooooooooooooooooooooooooooooooooooooooooooo ",
-"     oooooooooooooooooooooooooooooooooooooooooo ",
-"                                                ",
-"                                                "};

examples/liv-furuse/FileUnknown.xpm

Removed
Old image
-/* XPM */
-static char * FileUnknown_xpm[] = {
-"48 48 5 1",
-" 	c None",
-".	c #514451445144",
-"X	c #EFBEEFBEEFBE",
-"o	c #000000000000",
-"O	c #9E79A2899E79",
-"                                                ",
-"                                                ",
-"   ..........................................   ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo  ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX.oXo...XX.XXXOooooo.XXXX..X....XXXXXXooo ",
-"   .XXXXXXXXXXXXXXOoo.OO.oooOXXXXXXXXXXXXXXXooo ",
-"   .XXX....o..XXXOo.XXXXXOoooOXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXX.oXXXXXXX.oooXXXXXXXXXXXXXXooo ",
-"   .XXX.....X..XXoo.XX..XXOooo.XX..o......XXooo ",
-"   .XXXXXXXXXXXXXoooXXXXXXXooooXXXXXXXXXXXXXooo ",
-"   .XXXXXX..o..XXoooXX...XXooooXX..XX.XXXXXXooo ",
-"   .XXXXXXXXXXXXX.o.XXXXXXXooooXXXXXXXXXXXXXooo ",
-"   .XXX.o..o...oXXXXXX.X.XXooo.XX..X....XXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXOoooXXXXXXXXXXXXXXooo ",
-"   .XXX..X...X......o...XX.oo.XXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXooo ",
-"   .XXXo......X.XXX..XXXXOooOXX...X.....XXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXoo.XXXXXXXXXXXXXXXXooo ",
-"   .XXXo.X...o.Xo.....XXOooXX........XXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXooOXXXXXXXXXXXXXXXXXooo ",
-"   .XXX...o..........XXXooXX.o..X..oX..o..XXooo ",
-"   .XXXXXXXXXXXXXXXXXXXOoOXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX...o......XX..XXooXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXoOXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXX..X..o..XXoXXX..o.XXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX..o....o..X..XXXXXXX..o....XX...XXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXoo..X......oXXOoooOXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXoooooXXXXXXXXXXXXXXXXXXooo ",
-"   .XXX...X.o...X..XXoooooXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXoooooXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXX..o.X.XXOoooOXX...X.o.....XXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXoX..o...o....XXXXXXX..X...X...o...XXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
-"   .ooooooooooooooooooooooooooooooooooooooooooo ",
-"    ooooooooooooooooooooooooooooooooooooooooooo ",
-"     oooooooooooooooooooooooooooooooooooooooooo ",
-"                                                ",
-"                                                "};

examples/liv-furuse/FilesLink.xpm

Removed
Old image
-/* XPM */
-static char * FilesLink_xpm[] = {
-"48 48 36 1",
-" 	c None",
-".	c #FFFFFBEEFFFF",
-"X	c #000000000000",
-"o	c #F7DEEFBEEFBE",
-"O	c #514451445144",
-"+	c #A6999E799E79",
-"@	c #38E341034103",
-"#	c #965892489658",
-"$	c #69A66DB669A6",
-"%	c #71C679E779E7",
-"&	c #79E782078E38",
-"*	c #79E7820779E7",
-"=	c #61855D755144",
-"-	c #71C67DF771C6",
-";	c #79E78A288617",
-":	c #CF3C82075144",
-">	c #208120812081",
-",	c #86178A288E38",
-"<	c #28A22CB228A2",
-"1	c #DF7D618538E3",
-"2	c #79E779E78617",
-"3	c #965896589658",
-"4	c #FFFFFBEEEFBE",
-"5	c #8E388A289658",
-"6	c #08200C300820",
-"7	c #F7DE49241040",
-"8	c #965892488E38",
-"9	c #8E3892489658",
-"0	c #492449244924",
-"q	c #49244D344924",
-"w	c #861782078617",
-"e	c #8E3886178617",
-"r	c #8E3882078617",
-"t	c #861775D671C6",
-"y	c #410345144924",
-"u	c #861779E78617",
-"                                                ",
-"                                                ",
-"                                                ",
-"   .........................X                   ",
-"   .........................X                   ",
-"   .........................X                   ",
-"   .o.XXOOXXO+OOXX++XO......X@..............X   ",
-"   .........................X@..............XO  ",
-"   ...X+XOXXOXOOXXOXXXOO....X#.           ..XO  ",
-"   .........................X$..........X...XO  ",
-"   ...XOOXXXOXXOX+XOOXXO....X$..........X%..XO  ",
-"   .........................X$..........X%..XO  ",
-"   ...XXXX+XOOXXOX+XOXO+....XX++XO......X&..XO  ",
-"   .........................X$..........X%..XO  ",
-"   ...XXOXXXXOXXX+XXOXOX....XXOXXXOO....X&..XO  ",
-"   .........................X%..........X*..XO  ",
-"   ...XXXOOXO==X+XXXXOO+....X=XOOXXO....X&..XO  ",
-"   ............=$...........X-..........X;..XO  ",
-"   ...X+XOX=::::>X+XOXXX....XX+XOXO+....X,..X=  ",
-"   .........:::::<*.........X&..........X;..X=  ",
-"   ...XOX=::::::11XXXOX+....X=XXOXOX....X,..XO  ",
-"   ......2::::::111X>.......X%..........X,..XO  ",
-"   ...XOX+>:::11:111XX3.OX.4XXXXXOO+....X5..XO  ",
-"   .......$>:::111111X>56X..X%..........X,..XO  ",
-"   ...XXXOXX<1111111776X7X..XX+XOXXX....X5..X=  ",
-"   ........5<X11177777777X..X%..........X8.4XO  ",
-"   ...XOXXXOX>X1177777777X..XXOXXOX+....X#..XO  ",
-"   ..........$>X777777777X..X-..........X#..XO  ",
-"   ...XXOOX+X+X<X777777776..X<OX+XO..4.4X#..XO  ",
-"   ............=$X7777777X..X%..........X#..XO  ",
-"   ...XXXXOX+XO+XX7777777X..X=XOXX+O....X#..XO  ",
-"   ............<X77777777X..X,..........X#..XO  ",
-"   ...........9X6XXXXXXXX6..X=X+XXX4....X#..XO  ",
-"   ..........4.40qqqqqqqq,..X$..........X#..XO  ",
-"   ............werwrewrewr..XXXXOXO.....X#..X=  ",
-"  OXXXXXXXXXXXXXXXXXXXXXXXXXX-..........X#..Xq  ",
-"   <<<<<<<<<>#$%t%XXXX<X=X<=XX+X+XX.....X#..XO  ",
-"   y00y0@0000...........................X#..XO  ",
-"            w...........................XXXXXO  ",
-"            u............4.4............XOOOOO  ",
-"             ...........................XO      ",
-"              OXXXXXXXXXXXXXXXXXXXXXXXXXXO      ",
-"                000qq00q0q0qqOqOqqqOqOOqOO      ",
-"                                                ",
-"                                                ",
-"                                                ",
-"                                                ",
-"                                                "};

examples/liv-furuse/Folder.xpm

Removed
Old image
-/* XPM */
-static char * Folder_xpm[] = {
-"40 47 57 1",
-" 	c None",
-".	c #BEFBAAAAAEBA",
-"X	c #EFBEDF7D9E79",
-"o	c #FFFFCF3CAEBA",
-"O	c #BEFB9A698E38",
-"+	c #AEBA9A699E79",
-"@	c #BEFBBAEAAEBA",
-"#	c #DF7DDF7DCF3C",
-"$	c #BEFBAAAA8E38",
-"%	c #AEBA8A2871C6",
-"&	c #71C665955144",
-"*	c #AEBA8A286185",
-"=	c #8E3865956185",
-"-	c #71C645144103",
-";	c #514430C230C2",
-":	c #30C220812081",
-">	c #EFBEEFBECF3C",
-",	c #5144451430C2",
-"<	c #9E7975D65144",
-"1	c #9E798A288E38",
-"2	c #30C230C230C2",
-"3	c #514455555144",
-"4	c #CF3CCF3CBEFB",
-"5	c #8E3865955144",
-"6	c #6185451430C2",
-"7	c #AEBA9A696185",
-"8	c #71C6659571C6",
-"9	c #CF3CBAEAAEBA",
-"0	c #514445144103",
-"q	c #618565956185",
-"w	c #9E798A289E79",
-"e	c #9E7965955144",
-"r	c #AEBABAEAAEBA",
-"t	c #514455554103",
-"y	c #EFBEDF7DDF7D",
-"u	c #AEBAAAAA9E79",
-"i	c #000000000000",
-"p	c #410330C22081",
-"a	c #71C675D671C6",
-"s	c #410320812081",
-"d	c #208120812081",
-"f	c #104010400000",
-"g	c #104010401040",
-"h	c #104010402081",
-"j	c #208110401040",
-"k	c #8E3845144103",
-"l	c #4103451430C2",
-"z	c #9E79659571C6",
-"x	c #30C220811040",
-"c	c #30C210401040",
-"v	c #71C6451430C2",
-"b	c #410345144103",
-"n	c #9E799A698E38",
-"m	c #8E388A288E38",
-"M	c #DF7DBAEABEFB",
-"N	c #30C230C21040",
-"B	c #104000001040",
-"                               .XoO+    ",
-"                             @#X.$%&O   ",
-"                           .Xo$O*%O=-   ",
-"                         @oX.$%*%%$%;   ",
-"                       .Xo$.*%*%%%$$:   ",
-"                     @#X.$%*=*%%O$.$:   ",
-"                >#$&,=$O*%<=*%%OOO$$:   ",
-"               >=1o>.23*=&=*O%O$O$OO:   ",
-"               4Xo$.>5655**%O%OOO%7O:   ",
-"             @#X.$%*=$:&<<%%%%%%%*%O:   ",
-"           .Xo$O*%555.:<*%*%*%***%*%;8  ",
-"         @oX.$%*=&=5<9:*%*%*******%70q  ",
-"       .Xo$.*%55555=*9:*<*<*<******O50  ",
-"     @#X9$%*=&5&5&<=<4:<<<<<<****7O$12w ",
-"   .Xo9O*%55---5555=<9:e<=<*<****%OO$-& ",
-" roX9$%*=&&t&t5&5&5<54:<e<<<****%O$$$%0=",
-"@4>#$*<5&----5&5&5555o:e<e<*<**%7O$$$%50",
-"yui:y=&t&t&t&&&&&&5&5#:<=<****%*%O$O<-0t",
-"#0iit9t-t-t--&---5&55#:e<<<******%<0pqa ",
-">,iis>0t-t-t-t&-&&5&5>:%<<<***%*<t2dq   ",
-">6f0d#606-6-t----555,#i#<*<***5-ps6:    ",
-"y,g&h>0,000t-t&-&&55:i<X<<**=-;20&5d    ",
-">0f5j#,0606-t--5&55e,#:=<<5-:s6-55*s    ",
-">,j&j>0,0,0t-t&&5&5<<#:<5,s20t5&***:    ",
-">6j=j#;;,6606--5&55e5o:0::,-&k<****s    ",
-"y,h=j>;l;,0,0t--5&5&&4::;t-&<<*<*<*:    ",
-">0dzj#;;;;,6606----0:9d6--<e<=<e<**s    ",
-">,h1j9-,;l;,0,0t&2:d24:te<=<<<<<***:    ",
-">6x1dO<;,;;;,6,;xcp669:e5eee<e<***vsbq  ",
-"y,:n:*%,;l;,;2:d2,0659:5e<e<<<*<50idbqq ",
-">0:O:5%;;;p;xhp;60&55.:e5e<e<*50iidbbqmm",
-">,:us2O,;2:dsl0t5&5&5$:5e<=<5,iidbbbqqm ",
-">6s+xs50j:p;,6-k-k-55O:e5e-0iidbbbqqqmm ",
-"y,:@sdhds2;,----&&5&5$:<52iidbbbqqqmm   ",
-">0x.;;p;;;6------5&55%:6iidbbbqqqmm     ",
-">,:40,;l0t0t-t--&&5&&7iidbbbqqqmm       ",
-">6dM60606-6-6-----6sNkibbbqqqmm         ",
-"y,h40,0,000t---t0:ii2i2bqqqmm           ",
-">0j466,06-6---6siidbbbqqqmm             ",
-">,g#;,060t-60:iidbbbqqqmm               ",
-">6f#,66-606siidbbbqqqmm                 ",
-"y,B>000,0:iidbbbqqqmm                   ",
-"+0i#6-,siidbbbqqqmm                     ",
-";diu;:iidbbbqqqmm                       ",
-" ;;iiidbbbqqqmm                         ",
-" qbbbqbqqqqmm                           ",
-"   qqqmqmmm                             "};

examples/liv-furuse/FolderLink.xpm

Removed
Old image
-/* XPM */
-static char * FolderLink_xpm[] = {
-"40 47 64 1",
-" 	c None",
-".	c #BEFBAAAAAEBA",
-"X	c #EFBEDB6C9E79",
-"o	c #FFFFCB2BAEBA",
-"O	c #BEFB9A698E38",
-"+	c #AEBA9A699E79",
-"@	c #BEFBBAEAAEBA",
-"#	c #DF7DDB6CCF3C",
-"$	c #BEFBAAAA8E38",
-"%	c #AEBA8A2871C6",
-"&	c #71C661855144",
-"*	c #AEBA8A286185",
-"=	c #8E3861856185",
-"-	c #71C641034103",
-";	c #514430C230C2",
-":	c #30C220812081",
-">	c #EFBEEBADCF3C",
-",	c #5144410330C2",
-"<	c #9E7971C65144",
-"1	c #9E798A288E38",
-"2	c #30C230C230C2",
-"3	c #514451445144",
-"4	c #CF3CCB2BBEFB",
-"5	c #8E3861855144",
-"6	c #6185410330C2",
-"7	c #AEBA9A696185",
-"8	c #71C6618571C6",
-"9	c #CF3CBAEAAEBA",
-"0	c #514441034103",
-"q	c #618561856185",
-"w	c #96588A289658",
-"e	c #9E7961855144",
-"r	c #AEBABAEAAEBA",
-"t	c #514451444103",
-"y	c #CF3C82075144",
-"u	c #208120812081",
-"i	c #000000000000",
-"p	c #EFBEDB6CDF7D",
-"a	c #AEBAAAAA9E79",
-"s	c #28A228A228A2",
-"d	c #DF7D618538E3",
-"f	c #410330C22081",
-"g	c #69A66DB669A6",
-"h	c #410320812081",
-"j	c #104010400000",
-"k	c #104010401040",
-"l	c #104010402081",
-"z	c #082008200820",
-"x	c #208110401040",
-"c	c #F7DE49241040",
-"v	c #4103410330C2",
-"b	c #9E79618571C6",
-"n	c #618559655144",
-"m	c #30C220811040",
-"M	c #30C210401040",
-"N	c #71C6410330C2",
-"B	c #410341034103",
-"V	c #9E799A698E38",
-"C	c #8E388A288E38",
-"Z	c #492449244924",
-"A	c #8E3841034103",
-"S	c #DF7DBAEABEFB",
-"D	c #30C230C21040",
-"F	c #104000001040",
-"                               .XoO+    ",
-"                             @#X.$%&O   ",
-"                           .Xo$O*%O=-   ",
-"                         @oX.$%*%%$%;   ",
-"                       .Xo$.*%*%%%$$:   ",
-"                     @#X.$%*=*%%O$.$:   ",
-"                >#$&,=$O*%<=*%%OOO$$:   ",
-"               >=1o>.23*=&=*O%O$O$OO:   ",
-"               4Xo$.>5655**%O%OOO%7O:   ",
-"             @#X.$%*=$:&<<%%%%%%%*%O:   ",
-"           .Xo$O*%555.:<*%*%*%***%*%;8  ",
-"         @oX.$%*=&=5<9:*%*%*******%70q  ",
-"       .Xo$.*%55555=*9:*<*<*<******O50  ",
-"     @#X9$%*=&5&5&<=<4:<<<<<<****7O$12w ",
-"   .Xo9O*%55---5555=<9:e<=<*<****%OO$-& ",
-" roX9$%*=&&t&t5&5&5<54:<e<<<****%O$$$%0=",
-"@4>#$*<5&----5&5&yyyui:e<e<*<**%7O$$$%50",
-"pai:p=&t&t&t&&&&yyyyys:<=<****%*%O$O<-0t",
-"#0iit9t-t-t--&yyyyyyddie<<<******%<0fqg ",
-">,iih>0t-t-t-tyyyyyydddi<<<***%*<t2uq   ",
-">6j0u#606-6-t-uyyyddydddii<***5-fh6:    ",
-"p,k&l>0,000t-t&uyyyddddddiuwz-;20&5u    ",
-">0j5x#,0606-t--isdddddddcczici6-55*h    ",
-">,x&x>0,0,0t-t&&sidddcccccccci5&***:    ",
-">6x=x#;;,6606--5&uiddcccccccci<****h    ",
-"p,l=x>;v;,0,0t--5&uiccccccccci*<*<*:    ",
-">0ubx#;;;;,6606----siccccccccz<e<**h    ",
-">,l1x9-,;v;,0,0t&2:ngiccccccci<<***:    ",
-">6m1uO<;,;;;,6,;mMf6iiccccccci<***NhBq  ",
-"p,:V:*%,;v;,;2:u2,06icccccccci*<50iuBqq ",
-">0:O:5%;;;f;mlf;60&5ziiiiiiiiz50iiuBBqCC",
-">,:ah2O,;2:uhv0t5&5&5$:5e<ZZZ,iiuBBBqqC ",
-">6h+mh50x:f;,6-A-A-55O:e5e-0iiuBBBqqqCC ",
-"p,:@huluh2;,----&&5&5$:<52iiuBBBqqqCC   ",
-">0m.;;f;;;6------5&55%:6iiuBBBqqqCC     ",
-">,:40,;v0t0t-t--&&5&&7iiuBBBqqqCC       ",
-">6uS60606-6-6-----6hDAiBBBqqqCC         ",
-"p,l40,0,000t---t0:ii2i2BqqqCC           ",
-">0x466,06-6---6hiiuBBBqqqCC             ",
-">,k#;,060t-60:iiuBBBqqqCC               ",
-">6j#,66-606hiiuBBBqqqCC                 ",
-"p,F>000,0:iiuBBBqqqCC                   ",
-"+0i#6-,hiiuBBBqqqCC                     ",
-";uia;:iiuBBBqqqCC                       ",
-" ;;iiiuBBBqqqCC                         ",
-" qBBBqBqqqqCC                           ",
-"   qqqCqCCC                             "};

examples/liv-furuse/Monalisa.xpm

Removed
Old image
-/* XPM */
-static char *Monalisa[] = {
-/* width height num_colors chars_per_pixel */
-"    48    48       27            1",
-/* colors */
-". c #000000",
-"# c #281808",
-"a c #38240c",
-"b c #492c10",
-"c c #553414",
-"d c #593818",
-"e c #5a5a5a",
-"f c #65411c",
-"g c #794d24",
-"h c #7d5124",
-"i c #86592c",
-"j c #966534",
-"k c #9a6938",
-"l c #aa7545",
-"m c #ae7949",
-"n c #b68251",
-"o c #be8a59",
-"p c #c79665",
-"q c #cf9e6d",
-"r c #d3a275",
-"s c #d7aa7d",
-"t c #dfb28a",
-"u c #e3ba92",
-"v c #ebc7a6",
-"w c #ebcbae",
-"x c #ffffff",
-"y c None",
-/* pixels */
-"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
-"e..............................................x",
-"e.oppqnnoononoonnoonpppooqpooonopppqppoonnpoopox",
-"e.oloonpnoonpooooopnpolljjllnpnqoopooopnnnnpoopx",
-"e.looooopnoonpoppoplifbbbbccdgloppppoqpoooopoqqx",
-"e.ooopqppqpoopopppibbdcababbddcdloppqoolpnppppqx",
-"e.pporpppppqppqoogbcdgabbbbbaccdckppqqpoopoqrrrx",
-"e.rpqqqooppoprrrgbccgdbcbbaababccbjppqqppopoqrrx",
-"e.pqppqsqpppqrrkbbdilkigcbabbabbdcclpqpqopppqqqx",
-"e.oqqqppqpqqrtpcgnrstrrnmifbbbbccccdnpqrqqqoqqqx",
-"e.qpqpqpqpqstrjdnruwwwusrnigcbabccdchrrsrqrqqprx",
-"e.oqqpqqpqrttoajrvwwwwwwrrlhdbbaacdcborqrrrrqrrx",
-"e.qqqrrtrstwtfdntwvvwvwwuqmjgcbbbacbbirqpqrrrrsx",
-"e.qrrrrrrrtvofdntwvwwvwutpmkidcbaaababpnopppprrx",
-"e.srprrrprspidhouwwvvwvtsrpnkjfbbaaaabjknnmnpprx",
-"e.rrsrrssssoddiruvvvvwvwttrrokgccbbabagjkkkmpnpx",
-"e.stwrwrwrvkddipuuvvvvtssrrpnkfdcbbaaafiijkllmnx",
-"e.lnrsrwrvpjddfppoqutslllmmkjifcddbbbbffhiklknmx",
-"e.kjjrsrwrmfddffkkjpslfilifdbhgcccbbbbcfgghjkkkx",
-"e.ijjrwrrrofdddblafmtiimmahfklhbccbabacfffgjjjhx",
-"e.hjjppklonddakoonlrtilrrnkornicccbbaacgfggfihfx",
-"e.fhfkiidjkdbakttrsrtmosstttrmhddddcbcbdffhkfghx",
-"e.dffafhfffhaairuutusqmwuwurplhdfddcdccggggghffx",
-"e.dddddfdddaddhruututnrswutrlkfcdfdfdcchjjkkmmkx",
-"e.daffdadaddaadrstrutomustsokffddddcdccddfhihjkx",
-"e.fgddddabadddalrsotpiktutpmkidcddfddcdddddghfgx",
-"e.fcddddbabbdbainrsnfairspnkigdcdfccdcccdddddfdx",
-"e.ddddbbddbbbadfmlsrkmmmmomkjgddfdfgdccdfffffffx",
-"e.ddcdadbbabddahlnlnmiiioonlffdbfdccddddfffffffx",
-"e.cdbbdbdcbcdbdakorrmmkmopniifdcddddcddddffgfgfx",
-"e.cddcbdddcabddadkrqmlmmnlkfhdbccccddcccdfdfgfgx",
-"e.dgffffhhcfadbddalsvtonkjffddcdccddcdccdggfgggx",
-"e.dcdddffgdadddbadaoqomkffffdbbbcbdddcbccfffgfgx",
-"e.cdddgilkfbcdbdaaaaiffffdfdbddbccddccbbcffdfgfx",
-"e.fhggghkkhddbdbaaaaadfafddbfbddccccbcbbcfddfgdx",
-"e.hkhmllkkidabdbbaaaafdfadbddffdcbabbbbabdffdfgx",
-"e.imlllhliifddbbb#baakjffddfhhhfcbdbbbbbbfdfiffx",
-"e.hljhllhjhfbdbbaaadafmlkihhhiihdbbbbabbbdfgghgx",
-"e.dhlggiiigdccdbaa#abgmlmkkjkklkhdbdbbdaabbccccx",
-"e.hbadfdcbcbaabaaabdfimnnmllmnmkiddbdddbbbabddcx",
-"e.gbbabbbabbbcbbbbbinrppoonppppojfdffddcbbabcbcx",
-"e.dba#abcbabcbcbdhknrtrtrrrrrrroliffidccccbdcghx",
-"e.fbab#acbbcbbccinsrtttssttwssrpkfigifcbbcbbbcfx",
-"e.daacbbdcbbbbdborpwttwwttwswsrpmigfgdbbdbbbbcdx",
-"e.dcccbcddcbddfirtuwwwswswswrwprlfigfdcddccbacdx",
-"e.fdcdcddbbcddgmrswwwuwtswwtwsrpjiiffccbcfddcbcx",
-"e.fdfhccbbbbfhiowwswwwtwutwttwrpjfiggbcdhgdfcbbx",
-"exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-};
-SIMPLE  =                    T                                                  
-BITPIX  =                    8                                                  
-NAXIS   =                    2                                                  
-NAXIS1  =                   48                                                  
-NAXIS2  =                   48                                                  
-HISTORY Written by XV 3.10                                                      
-COMMENT the GIMP was here                                                       
-END                                                                             
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-Z�����������������������������������������������Z�G>GY::1111GYa��Ѳ��ѻ���ѻ�ѫ�
-nGaUU1:>YU>G:11�Z�G>:>:>>11:>>U�������ѻ��ѻѲ��naaGG::1:G>>:1:�Z�>:::1:>>:1>>Ga
-�����ѲѲѲѫџ�GaUG>:>>::1':>�Z�>'':11>:1111>1���ѻ��ѻ�ѲѲ���aUGU>11>1111:>�
-Z�G1'1':11:11::a����������Ѳ���rGaUaG:11:111:G�Z�>1''1:1'1:1:1>Yr�������������
-aGGa>::::1>:UY�Z�U11'111'111:11111a������������nG>GG>>:11'1:1:�Z�Y1'>G>:1:1''1'
-''1>Ga�������ra>>1>>>111'1>>:�Z�>YUUaaaU>::>1'''1U��rrnrrrY>1>11>''11::::�
-Z�YnYYnYG1>11'''>'G�raYYYaaY>1111'111>GUUYU�Z�a�YaaG>>1111''rnGG>>GYYYG
-:1>111111G>GaGG�Z�YrY�rra>'1>11''''G>G'>1>>GG>:1'1111'1>GG>GU�Z�GYUUUYrrY>>1>1
-'''''>G'G>>1G1>>::::1:11:G>>GU>�Z�:>>>UarG1:>1>''''aGGGG>G>1>>1::>>::11:GG>GUG�
-Z�>:>>>GGU>'>>>1'>'����rGGGG>111:1>>>:1::GGGUGU�Z�>UGGGGYY:G'>1>>'��rnGG>>:>
-::>>:>::>UUGUUU�Z�:>>:1>>>:'1>>'>r������rGY>1::::>>:::>G>GUGU�Z�:>11>1>:1:>1>'
-r�����r����aaG>:>>>>:>>>>GGUGUG�Z�>>:>'>11'1>>'Y���aaa���GG>1G>::>>>>GGGGGGG�Z�>>>>11>>111'>G���r������rnU>>G>GU>::>GGGGGGG�Z�G:>>>>1'11>1'a����G'a����raU>:>G::>:::>>>>>G>�Z�GU>>>>'1'>>>'�����ar�����ra>:>>G>>:>>>>>UYGU�Z�>'GG>'>'>>''>�������������rGG>>>>:>::>>GYaYnr�Z�>>>>>G>>>'>>Y�������������rG:>G>G>::Ynnrr��r�Z�>GG'GYGGGY''a��������������Y>G>>:>::UUUUUYGG�Z�GYGraa>nr>1'r���������������Y>>>>:1:1>GGYrGUY�Z�Ynn��r��>>'r�����a���r���a:::11'':UGUUGaYG�Z�ann�ѫ���G>>>1'G��aa��'YGrY1::1'1':GGGUnnnY�Z�rnn���ѫ�G>>GGrrn��GaaG>1YU:::1111:GUUYnrrr�Z�����ѫΟn>>G���������rnaG:>>1111GGYarr���Z���ѫѫѫ�r>>a������λ������rG>:11'''Gaanr���Z�����������>>a��������ѻ����rU::11'1'Unrrr�����Z�����������a>Y�������λ����rnG11''''1nr��������Z����������ΔG>������������ra>:1'''1'1����������Z����������ѻG>������������nU:111':11a����������Z�������������'n�������ѫ�Y>11'':>:1�����������Z�������������n>����������aU:1'1::>:Y�����������Z��������������:U��������aG1111::::>������������Z��������������r11>araU:1'11'11>::������������Z���������������U1::U>1:11''1'1::1n�������������Z����������������U1:>U'11111'::>:r��������������Z�����������������a11>:'1'11>>:>��������������Z�����������������aG1111::>U�����������������Z��������������������nn��������������������Z�����������������������������������������������Z�����������������������������������������������ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

examples/liv-furuse/OMakefile

-#*********************************************************************#
-#                                                                     #
-#                          Caml Images                                #
-#                                                                     #
-#            Fran輟is Pessaux, projet Cristal, INRIA Rocquencourt     #
-#            Pierre Weis, projet Cristal, INRIA Rocquencourt          #
-#            Jun Furuse, projet Cristal, INRIA Rocquencourt           #
-#                                                                     #
-#  Copyright 1999-2004,                                               #
-#  Institut National de Recherche en Informatique et en Automatique.  #
-#  Distributed only by permission.                                    #
-#                                                                     #
-#*********************************************************************#
-
-#(* $Id: OMakefile,v 1.1.2.1 2010/05/13 13:14:47 furuse Exp $ *)
-
-OCAMLPACKS[] = lablgtk2 unix
-
-MODULES[] =
-  cache
-  deficon
-  display
-  edge
-  enhance
-  gui
-  icon
-  iconcap
-  jWidget
-  jpf
-  liv
-  livmisc
-  livsh
-  livshtype
-  mylazy
-  pathfind
-  scandir
-  seq
-  tout
-  viewer
-
-BuildExample(liv, $(MODULES), $(SUPPORTED_FORMATS) lablgtk2)
-

examples/liv-furuse/README

-This is an LablGtk2 application.
-You need to install the library with lablgtk2 support.
-
-LV -- Labl image Viewer
-
-	This is camlimages+lablgtk2 image viewer, like `xv', but much
-	limited. It works just with True or Direct colormodels.
-	No PseudoColor support. And more, it is UNDER CONSTRUCTION.
-
-Usage:
-
-	lv imagefiles
-
-Options:
-
-	-random
-		Images are displayed randomly. Use with -wait.
-
-	-wait sec
-		Automatically display next image after waiting [sec] seconds.
-		Useful for image slideshow. 
-
-	-root [center|random]
-		Display images on root. [center] puts the images in 
-		the center of the screen. [random] puts them at random 
-		position.
-
-	-transition [myst|transparent]	
-		Use with -root. You can see some funny transition 
-		animations.		
-
-	-size [w]x[h]
-		Set the maximum size of images upto [w]x[h].
-
-LV shell (like Visual schnauzer of xv)
-
-	Copy iconcap and the xpm files in this directory in 
-	$HOME/.lv and type 'v' key in the image window of lv...
-	You will have something fancy, but still under development.

examples/liv-furuse/cache.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: cache.ml,v 1.5 2008/06/16 22:35:42 furuse Exp $ *)
-
-type ('a, 'b) elt = {
-    key : 'a;
-    data : 'b;
-    at_remove : 'b -> unit;
-    time : float;
-  };;
-
-type ('a, 'b) t = ('a, 'b) elt option array;;
-
-let create size = Array.create size None;;
-
-let find_pos t key =
-  let found = ref 0 in
-  try
-    for i = 0 to (Array.length t - 1) do
-      match t.(i) with
-      | None -> ()
-      | Some {key = key'} when key = key' -> found := i; raise Exit
-      | _ -> ()
-    done;
-    raise Not_found
-  with
-  | Exit -> !found;;
-
-let find t key =
-  match t.(find_pos t key) with
-  | Some elt -> elt.data
-  | _ -> assert false;;
-
-let rename t key newkey =
-  try
-    let pos = find_pos t key in
-    let data = match t.(pos) with Some d -> d | _ -> assert false in
-    t.(pos) <- Some {data with key = newkey}
-  with
-  | Not_found -> ();;
-
-let find_empty_or_eldest t =
-  let found = ref None in
-  begin try
-    for i = 0 to (Array.length t - 1) do
-      match t.(i) with
-      | None -> found := Some (i, None); raise Exit
-      | Some elt ->
-          match !found with
-          | None -> found := Some (i, Some elt)
-          | Some (j, Some elt') when elt.time < elt'.time ->
-            found := Some (i, Some elt)
-          | _ -> ()
-    done
-  with Exit -> () end;
-  match !found with
-  | Some (i, _) -> i
-  | None -> raise Not_found;;
-
-let add t key data at_remove =
-  let slot =
-    try find_pos t key with Not_found ->
-      try find_empty_or_eldest t with Not_found -> 0 
-  in
-  begin match t.(slot) with
-  | Some elt -> elt.at_remove elt.data
-  | None -> ()
-  end;
-  t.(slot) <- Some {key = key; data = data; at_remove= at_remove; time = Unix.time ()};;

examples/liv-furuse/cache.mli

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: cache.mli,v 1.4 2008/06/16 22:35:42 furuse Exp $ *)
-
-type ('a, 'b) elt = { key : 'a; data : 'b; at_remove: 'b -> unit; time : float; };;
-type ('a, 'b) t = ('a, 'b) elt option array;;
-
-val create : int -> ('a, 'b) t;;
-val find_pos : ('a, 'b) t -> 'a -> int;;
-val find : ('a, 'b) t -> 'a -> 'b;;
-val rename : ('a, 'b) t -> 'a -> 'a -> unit;;
-val find_empty_or_eldest : ('a, 'b) t -> int;;
-val add : ('a, 'b) t -> 'a -> 'b -> ('b -> unit) -> unit;;

examples/liv-furuse/deficon.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: deficon.ml,v 1.2 2004/09/21 18:15:43 weis Exp $ *)
-
-let data = [|
-  "48 48 5 1";
-  " 	c None";
-  ".	c #514451445144";
-  "X	c #EFBEEFBEEFBE";
-  "o	c #000000000000";
-  "O	c #9E79A2899E79";
-  "                                                ";
-  "                                                ";
-  "   ..........................................   ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo  ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXX.oXo...XX.XXXOooooo.XXXX..X....XXXXXXooo ";
-  "   .XXXXXXXXXXXXXXOoo.OO.oooOXXXXXXXXXXXXXXXooo ";
-  "   .XXX....o..XXXOo.XXXXXOoooOXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXX.oXXXXXXX.oooXXXXXXXXXXXXXXooo ";
-  "   .XXX.....X..XXoo.XX..XXOooo.XX..o......XXooo ";
-  "   .XXXXXXXXXXXXXoooXXXXXXXooooXXXXXXXXXXXXXooo ";
-  "   .XXXXXX..o..XXoooXX...XXooooXX..XX.XXXXXXooo ";
-  "   .XXXXXXXXXXXXX.o.XXXXXXXooooXXXXXXXXXXXXXooo ";
-  "   .XXX.o..o...oXXXXXX.X.XXooo.XX..X....XXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXOoooXXXXXXXXXXXXXXooo ";
-  "   .XXX..X...X......o...XX.oo.XXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXooo ";
-  "   .XXXo......X.XXX..XXXXOooOXX...X.....XXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXoo.XXXXXXXXXXXXXXXXooo ";
-  "   .XXXo.X...o.Xo.....XXOooXX........XXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXooOXXXXXXXXXXXXXXXXXooo ";
-  "   .XXX...o..........XXXooXX.o..X..oX..o..XXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXOoOXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXX...o......XX..XXooXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXoOXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXX..X..o..XXoXXX..o.XXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXX..o....o..X..XXXXXXX..o....XX...XXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXoo..X......oXXOoooOXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXoooooXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXX...X.o...X..XXoooooXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXoooooXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXX..o.X.XXOoooOXX...X.o.....XXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXoX..o...o....XXXXXXX..X...X...o...XXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ";
-  "   .ooooooooooooooooooooooooooooooooooooooooooo ";
-  "    ooooooooooooooooooooooooooooooooooooooooooo ";
-  "     oooooooooooooooooooooooooooooooooooooooooo ";
-  "                                                ";
-  "                                                ";
-|];;

examples/liv-furuse/display.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: display.ml,v 1.36 2008/06/16 22:35:42 furuse Exp $ *)
-
-open Livmisc;;
-open Color;;
-open Gui;;
-open Tout;;
-
-open Gdk;;
-open GDraw;;
-open GMain;;
-
-type filter = [ `SIZE of int * int * [ `ATMOST | `ATLEAST | `NOASPECT ] ];;
-
-let current_filters = (ref [] : filter list ref);;
-
-let add_size w h =
-  List.fold_right
-    (fun x st ->
-       match x with
-       | `SIZE _ -> st
-       | _ -> x :: st)
-    !current_filters [`SIZE (w,h,`NOASPECT)];;
-
-let forward_redisplay = ref (fun _ -> ());;
-
-module WINDOW = struct
-
-  let prev = ref (-1,-1)
-
-  let pixmap = ref None
-
-  let set_pixmap pix =
-    begin match !pixmap with
-    | None -> ()
-    | Some pix -> Gdk.Pixmap.destroy pix
-    end;
-    pixmap := Some pix
-
-  let display pixbuf =
-    let width = GdkPixbuf.get_width pixbuf in
-    let height = GdkPixbuf.get_height pixbuf in
-    let pixmap = Gdk.Pixmap.create ~window:window#misc#window ~width ~height () in
-    GdkPixbuf.render_to_drawable pixmap pixbuf;
-    prev := (width, height);
-    prog#set_format_string "done";
-<<<<<<< display.ml
-    sync ();
-    prog#unmap ();
-
-=======
-    sync ();
-    prog#unmap ();
->>>>>>> 1.36
-    (* Resizing window *)
-    (* Changes from gtk1.2 to 2.0:
-       It is no longer permissable to draw directly on an arbitrary
-       widget, or to set an arbitrary widget's background pixmap. If
-       you need to do that, use a GtkDrawingArea or (for a toplevel) a
-       GtkWindow where gtk_widget_set_app_paintable() has been called. *)
-<<<<<<< display.ml
-
-    (* Format.eprintf "resizing %d %d@." ximage#width ximage#height; *)
-    drawing#resize ~width: ximage#width ~height: ximage#height;
-
-
-=======
-    (* Format.eprintf "resizing %d %d@." ximage#width ximage#height; *)
-    drawing#resize ~width ~height;
->>>>>>> 1.36
-    Gdk.Window.set_back_pixmap drawing#misc#window (`PIXMAP pixmap);
-    set_pixmap pixmap;
-    Gdk.Window.clear drawing#misc#window;
-    set_pixmap pixmap;
-    sync ();
-<<<<<<< display.ml
-
-=======
->>>>>>> 1.36
-    set_timeout ()
-
-<<<<<<< display.ml
-  initializer
-    ignore (drawing#event#connect#configure ~callback:
-      (fun ev ->
-        let w = GdkEvent.Configure.width ev
-        and h = GdkEvent.Configure.height ev in
-        let rec f w h =
-          if (w, h) <> prev then begin
-            !forward_redisplay (add_size w h);
-          end;
-          let w', h' = Drawable.get_size drawing#misc#window in
-          if (w', h') <> (w, h) then f w' h' 
-	in
-        f w h;
-        false))
-end;;
-=======
-  let init () = 
-    ignore (drawing#event#connect#configure ~callback:
-	      (fun ev ->
-		let w = GdkEvent.Configure.width ev
-		and h = GdkEvent.Configure.height ev in
-		let rec f w h =
-		  if (w, h) <> !prev then begin
-		    !forward_redisplay (add_size w h);
-		  end;
-		  let w', h' = Drawable.get_size drawing#misc#window in
-		  if (w', h') <> (w, h) then f w' h' 
-		in
-		f w h;
-		false))
-end
-
-module ROOT = struct
-
-  type root_geom = {
-      width : int;
-      height : int;
-      xdest : int;
-      xsrc : int;
-      ydest : int;
-      ysrc : int;
-      put_width : int;
-      put_height : int;
-    };;
-
-  let root_geom width height x y =
-    let width0 = width in
-    let height0 = height in
-    let xdest0 = if x < 0 then 0 else x in
-    let xsrc0 = if x < 0 then -x else 0 in
-    let put_width0 =
-      if x + width0 > screen_width then screen_width - xdest0
-      else x + width0 - xdest0 in
-    let ydest0 = if y < 0 then 0 else y in
-    let ysrc0 = if y < 0 then -y else 0 in
-    let put_height0 =
-      if y + height0 > screen_height then screen_height - ydest0
-      else y + height0 - ydest0 in
-    { width= width0;
-      height= height0;
-      xdest= xdest0;
-      ydest= ydest0;
-      xsrc= xsrc0;
-      ysrc= ysrc0;
-      put_width= put_width0;
-      put_height= put_height0;
-    }
->>>>>>> 1.36
-
-  let root_pixmap = lazy (
-    let pix =
-      GDraw.pixmap ~window
-        ~width: screen_width
-        ~height: screen_height () 
-    in
-    pix#set_foreground `BLACK;
-    pix#rectangle
-      ~x:0 ~y:0 ~width: screen_width ~height: screen_height ~filled: true ();
-    pix#pixmap )
-
-  let display_at pixbuf x y =
-    let geom = root_geom (GdkPixbuf.get_width pixbuf) (GdkPixbuf.get_height pixbuf) x y in
-    GdkPixbuf.render_to_drawable !!root_pixmap ~dest_x: geom.xdest ~dest_y: geom.ydest pixbuf;
-    Window.set_back_pixmap root_win (`PIXMAP(!!root_pixmap));
-    Window.clear root_win;
-    set_timeout ()
-
-end;;
-
-let working = ref (None : (int * OImages.rgb24 * filter list) option);;
-let waiting = ref None;;
-let check_waiting () = if !waiting <> None then raise Exit;;
-
-type root_mode = [ `NONE | `CENTER | `RANDOM ];;
-type transition = [ `NONE | `MYST | `TRANSPARENT ];;
-let root_mode = ref (`NONE : root_mode);;
-let transition = ref (`NONE : transition);;
-
-let root_prev_pos = ref None;;
-
-let display_pixbuf pixbuf =
-  match !root_mode with
-  | `CENTER | `RANDOM ->
-      let width = GdkPixbuf.get_width pixbuf 
-      and height = GdkPixbuf.get_height pixbuf in
-      let x, y =
-        let w = screen_width - width
-        and h = screen_height - height in
-        match !root_mode with
-        | `RANDOM ->
-          let w = screen_width - width
-          and h = screen_height - height in
-
-          let overwrap x y =
-            match !root_prev_pos with
-            | None -> 0
-            | Some (pw, ph, px, py) ->
-              let w = min (x + w - 1) (px + pw - 1) - max x px in
-              let h = min (y + h - 1) (py + ph - 1) - max y py in
-              if w < 0 || h < 0 then 0 else w * h in
-
-          let random_x_y () =
-            let x = if w <= 0 then w / 2 else Random.int w
-            and y = if h <= 0 then h / 2 else Random.int h in
-            (x, y), overwrap x y in
-
-          let min = ref (random_x_y ()) in
-          for i = 0 to 5 do
-            let (x, y), over = random_x_y () in
-              if snd !min > over then min := (x, y), over
-          done;
-          let x, y = fst !min in
-          root_prev_pos := Some (w, h, x, y);
-          x, y
-        | _ -> w/2, h/2 in
-      ROOT.display_at pixbuf x y
-  | _ -> WINDOW.display pixbuf;;
-
-let sort_filters (filters : filter list) =
-  let rec get_size = function
-    | [] -> []
-    | `SIZE x :: _ -> [`SIZE x]
-    | _ :: xs -> get_size xs in
-(*
-  let rec get_normalize = function
-    | [] -> []
-    | `NORMALIZE :: _ -> [`NORMALIZE]
-    | _ :: xs -> get_normalize xs in
-  let rec get_enhance = function
-    | [] -> []
-    | `ENHANCE :: _ -> [`ENHANCE]
-    | _ :: xs -> get_enhance xs in
-*)
-  List.flatten [(*get_enhance filters; get_normalize filters; *)get_size filters];;
-
-let resize w h cond old =
-  let old_width = GdkPixbuf.get_width old in
-  let old_height = GdkPixbuf.get_height old in
-  let xmag,ymag =
-    let xmag = float w /. float old_width
-    and ymag = float h /. float old_height in
-
-    let xmag,ymag =
-      match cond with
-      | `ATMOST ->
-        let mag = if xmag > ymag then ymag else xmag in
-        if mag > 1.0 then 1.0, 1.0 else mag, mag
-      | `ATLEAST ->
-        let mag = if xmag > ymag then xmag else ymag in
-        if mag < 1.0 then 1.0, 1.0 else mag, mag
-      | `NOASPECT -> xmag, ymag in
-
-    let nw = truncate (float old_width *. xmag)
-    and nh = truncate (float old_height *. ymag) in
-
-    if nw > fst root_size || nh > snd root_size then
-      let xmag = float (fst root_size) /. float old_width
-      and ymag = float (snd root_size) /. float old_height in
-      match cond with
-      | `NOASPECT -> xmag, ymag
-      | _ -> if xmag > ymag then ymag, ymag else xmag, xmag
-    else xmag, ymag in
-
-  if xmag = 1.0 && ymag = 1.0 then old else
-
-<<<<<<< display.ml
-  let nw = truncate (float old#width *. xmag)
-  and nh = truncate (float old#height *. ymag) in
-  prog#map ();
-=======
-  let nw = truncate (float old_width *. xmag)
-  and nh = truncate (float old_height *. ymag) in
-  prog#map ();
->>>>>>> 1.36
-
-  let fmts =
-    if xmag > 1.0 && ymag > 1.0 then
-      Printf.sprintf "enlarging to %dx%d" nw nh else
-    if xmag < 1.0 && ymag < 1.0 then
-      Printf.sprintf "reducing to %dx%d" nw nh
-    else
-      Printf.sprintf "resizing to %dx%d" nw nh in
-
-  prog#set_format_string fmts;
-<<<<<<< display.ml
-  old#resize
-    (Some (fun f -> prog#set_fraction f; check_waiting ()))
-    nw nh;;
-
-let get_hist img =
-  prog#map ();
-  prog#set_format_string "histgram";
-
-  let hist = Colorhist.create () in
-
-  let width = img#width in
-  let height = img#height in
-  let f_height = float height in
-
-  for y = 0 to height - 1 do
-    check_waiting ();
-    for x = 0 to width - 1 do
-      Colorhist.store_sample hist (img#unsafe_get x y)
-    done;
-    prog#set_fraction (float (y + 1) /. f_height)
-  done;
-  hist;;
-
-let normalize img =
-  let hist = get_hist img in
-  let normalizer = Colorhist.normalize 0.95 hist in
-
-  prog#map ();
-  prog#set_format_string "normalizing...";
-
-  let width = img#width
-  and height = img#height in
-  let f_height = float height in
-  let img' = new OImages.rgb24 width height in
-
-  for y = 0 to height - 1 do
-    check_waiting ();
-    for x = 0 to width - 1 do
-      let rgb = img#unsafe_get x y in
-      let new_rgb = normalizer rgb in
-      img'#unsafe_set x y new_rgb;
-    done;
-    prog#set_fraction (float (y+1) /. f_height)
-  done;
-  img';;
-
-let enhance img =
-  let hist = get_hist img in
-  let log, enhancer = Enhance.enhance 0.90 hist in
-
-  prog#map ();
-  prog#set_format_string "enhancing...";
-
-  let width = img#width
-  and height = img#height in
-  let f_height = float height in
-  let img' = new OImages.rgb24 width height in
-
-  for y = 0 to height - 1 do
-    check_waiting ();
-    for x = 0 to width - 1 do
-      let rgb = img#unsafe_get x y in
-      let new_rgb = enhancer rgb in
-      img'#unsafe_set x y new_rgb;
-    done;
-    prog#set_fraction (float (y+1) /. f_height)
-  done;
-  img';;
-=======
->>>>>>> 1.36
-
-  if nw <> old_width || nh <> old_height then begin
-    (* original pixbuf will be GC'ed automatically *)
-    let pixbuf' = GdkPixbuf.create ~width: nw ~height: nh () in
-    GdkPixbuf.scale 
-      ~dest: pixbuf' ~dest_x: 0 ~dest_y: 0 ~width: nw ~height: nh
-      ~ofs_x: 0. ~ofs_y: 0. ~scale_x: (float nw /. float old_width) ~scale_y: (float nh /. float old_height) 
-      ~interp: `HYPER old;
-    pixbuf'
-  end else old
-
-let create_pixbuf (id : int) image filters =
-  let pixbuf = Imagegdk.to_pixbuf image in
-  let filters = sort_filters filters in
-<<<<<<< display.ml
-  let ximage =
-    try
-      let ximage = Cache.find xcache (id, filters) in
-      Cache.add cache (id, filters) image;
-      ximage
-    with
-    | Not_found ->
-      let rec get_image filters =
-        try Cache.find cache (id, filters) with
-        | Not_found ->
-          match filters with
-          | [] -> image
-          | `SIZE (w, h, cond) :: fs -> resize w h cond (get_image fs)
-          | `NORMALIZE :: fs -> normalize (get_image fs)
-          | `ENHANCE :: fs -> enhance (get_image fs) in
-      let image = get_image filters in
-      Cache.add cache (id, filters) image;
-      prog#map ();
-      prog#set_format_string "mapping";
-      OXimage2.of_image visual (Some prog#set_fraction) image#coerce in
-
-  Cache.add xcache (id, filters) ximage;
-  ximage;;
-=======
-  let rec filter_pixbuf pixbuf = function
-    | [] -> pixbuf
-    | `SIZE (w, h, cond) :: fs -> 
-	(* original pixbuf will be GC'ed automatically *)
-	resize w h cond pixbuf
-  in
-  filter_pixbuf pixbuf filters
-;;
->>>>>>> 1.36
-
-let current = ref None;;
-
-let rec display id image filters =
-  let start_waiting () =
-    match !waiting with
-    | Some (id, image, filters) ->
-	prerr_endline "aborted!";
-	waiting := None;
-	display id image filters
-    | None -> () 
-  in
-
-  if !working <> None then begin
-    (* we store it at waiting *)
-    (* hoping working process may find it and move to it *)
-    prerr_endline "try to abort";
-    waiting := Some (id, image, filters);
-  end else begin
-    try
-      working := Some (id, image, filters);
-      (* XIMAGE let ximage = ximage_of_image id image filters in *)
-      let pixbuf = create_pixbuf id image#coerce filters in
-      current := Some (id, image);
-      current_filters := filters;
-      display_pixbuf pixbuf;
-      working := None;
-      start_waiting ()
-    with
-    | Exit -> (* abort! *)
-        working := None;
-        start_waiting ()
-  end;;
-
-let redisplay new_filters =
-  match !current with
-  | Some (id, image) -> display id image new_filters
-  | None -> ();;
-
-forward_redisplay := redisplay;;

examples/liv-furuse/edge.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: edge.ml,v 1.12 2006/01/13 14:18:16 rousse Exp $ *)
-
-open Images;;
-open OImages;;
-
-let edge (bmp : index8) =
-  let width = bmp#width in
-  let height = bmp#height in
-
-  let rgb24 = new rgb24 width height in
-
-  let cmap = bmp#colormap.map in
-
-  let cc x y =
-    let center = cmap.(bmp#get x y) in
-    let points =
-      Array.init 3
-       (fun dx ->
-          Array.init 3
-            (fun dy ->
-               try cmap.(bmp#get (x + dx - 1) (y + dy - 1)) with
-               | Out_of_image -> center)) in
-
-    let r = ref 0
-    and g = ref 0
-    and b = ref 0 in
-
-    let diff = ref 0 in
-
-    let add dx dy w =
-      let rgb = points.(dx + 1).(dy + 1) in
-      r := !r + rgb.r * w;
-      g := !g + rgb.g * w;
-      b := !b + rgb.b * w;
-      let dr = center.r - rgb.r
-      and dg = center.g - rgb.g
-      and db = center.b - rgb.b in
-      diff := !diff + truncate (sqrt (float (dr * dr + dg * dg + db * db))) in
-    add (-1)   0  1;
-    add   1    0  1;
-    add   0  (-1) 1;
-    add   0    1  1;
-    add (-1) (-1) 1;
-    add   1  (-1) 1;
-    add (-1)   1  1;
-    add   1    1  1;
-
-    let cw =
-      (* diff = 0 ----- 3
-         diff = 3528 ----- 10 *)
-      !diff / 300 + 3 in
-    add   0    0  cw;
-    let sw = cw + 8 in
-    {r = !r / sw; g = !g / sw; b = !b / sw} in
-
-  for x = 0 to width -1 do
-    for y = 0 to height -1 do rgb24#unsafe_set x y (cc x y) done
-  done;
-  rgb24;;
-

examples/liv-furuse/enhance.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: enhance.ml,v 1.5 2004/09/24 10:55:06 weis Exp $ *)
-
-open Images;;
-open Colorhist;;
-
-let make_id_rgb rgb = rgb;;
-
-let enhance keep t =
-  let total = total_samples t in
-  if total = 0 then raise (Failure "histgram is empty");
-  let cut_samples = truncate ((float total) *. (1.0 -. keep) /. 2.0) in
-
-  let rec find_limit update sum b =
-    let sum = sum + t.(b) in
-    if sum > cut_samples then b
-    else find_limit update sum (update b) in
-
-  let min = find_limit ((+) 1) 0 0
-  and max = find_limit ((+) (-1)) 0 255 in
-
-  if max <= min then 1.0, make_id_rgb else begin
-    let average =
-      let samples = ref 0 in
-      let sum = ref 0 in
-      for i = min to max do
-        sum := !sum + t.(i) * (i - min);
-        samples := !samples + t.(i)
-      done;
-      float !sum /. float !samples /. (float (max - min)) in
-
-    let logmax = 1.0 /. 0.5 in
-    let logmin = 1.0 /. 2.0 in
-
-    (* average will go near 0.65 *)
-    let log = log 0.65 /. log average in
-    let log =
-      if logmax < log then logmax else
-      if logmin > log then logmin else log in
-
-    prerr_endline
-      (Printf.sprintf
-         "average=%f gamma=%f min=%d max=%d"
-         (average *. 255.0) (1.0 /. log) min max);
-
-    let div = 2 in
-
-    let make_elem x =
-      if x < min then x / div else
-      if x > max then 255 - (255 - x) / div else
-      let x' =
-        if x - min < (max - min) / 2
-        then x / div
-        else 255 - (255 - x) / div in
-      let pow =
-        float (abs (x - min - (max - min) / 2)) /. float ((max - min) / 2) in
-      let pow = pow *. pow in
-      let len = float (max - min) in
-      let newlen = float (255 - min / div - (255 - max) / div) in
-      let x'' =
-        truncate (((float (x - min) /. len) ** log) *. newlen) + min / div in
-      int_of_float (float x' *. pow +. float x'' *. (1.0 -. pow) ) in
-    let table = Array.init 256 make_elem in
-
-    let make_table_rgb rgb = {
-        r = table.(rgb.r);
-        g = table.(rgb.g);
-        b = table.(rgb.b);
-    } in
-
-    log, make_table_rgb
-  end;;
-

examples/liv-furuse/faceanm.gif

Removed
Old image

examples/liv-furuse/gui.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: gui.ml,v 1.27 2008/02/19 12:44:04 furuse Exp $ *)
-
-open Gdk;;
-open GDraw;;
-open GMain;;
-
-GMain.Main.init ();;
-
-let active = ref true;;
-
-let sync () = while Glib.Main.iteration false do () done;;
-
-(* let window = GWindow.window ~title: "liv" ~allow_shrink: true ~allow_grow: true ();; *)
-let window = GWindow.window ~title: "liv" ();;
-(* We should not set allow_shrink and allow_grow here. *)
-
-window#connect#destroy ~callback:Main.quit;;
-window#misc#set_size_request ~width: 1 ~height: 1 ();;
-window#resize ~width: 1 ~height: 1;;
-window#misc#set_app_paintable true;;
-
-let drawing = window
-
-let fixed = GPack.fixed ~packing: window#add ~show: true ();;
-
-(*
-let drawing = 
-  GMisc.drawing_area 
-    ~width:150 ~height:150
-    ~packing: window#add ~show:true ();;
-*)
-
-(* let fixed = GPack.fixed ~packing: box#add ();; *)
-
-(*
-window#event#connect#configure (fun ev ->
-  prerr_endline (Printf.sprintf "Configure %dx%d+%d+%d"
-                   (GdkEvent.Configure.width ev)
-                   (GdkEvent.Configure.height ev)
-                   (GdkEvent.Configure.x ev)
-                   (GdkEvent.Configure.y ev));
-  false (* continue configure event handling *))
-*)
-
-class new_progress_bar obj = object
-  inherit GRange.progress_bar obj as super
-  val mutable previous = 0.0
-  method set_fraction x =
-    let x = floor (x *. 10.0) /. 10.0 in
-    if x <> previous then begin 
-      super#set_fraction x; sync (); previous <- x 
-    end
-end;;
-
-let new_progress_bar =
-  GtkRange.ProgressBar.make_params []
-    ~cont:(fun pl ?packing ?show () ->
-             GObj.pack_return
-               (new new_progress_bar (GtkRange.ProgressBar.create pl))
-               ~packing ~show);;
-
-let prog_on_image = true
- 
-class prog_nop = object
-  method map () = ()
-  method unmap () = ()
-  method set_text (s : string) = ()
-  method set_fraction (s : float) = ()
-end
-
-class prog (p : GRange.progress_bar) = object
-  method map () = fixed#misc#map ()
-  method unmap () = fixed#misc#unmap () 
-  method set_text = p#set_text
-  method set_fraction = p#set_fraction
-end
-
-let prog1 = 
-  if prog_on_image then 
-    let p = 
-      new_progress_bar ~packing: (fixed#put ~x:0 ~y:0) ()
-    in
-    new prog p
-  else (new prog_nop :> prog)
-;;
-
-let visual = window#misc#visual;;
-let screen_width = Screen.width ();;
-let screen_height = Screen.height ();;
-let colormap = Gdk.Color.get_system_colormap ();;
-
-let quick_color_create = Truecolor.color_creator visual;;
-let quick_color_parser = Truecolor.color_parser visual;;
-
-let root_win = Window.root_parent ();;
-
-let root_size = Drawable.get_size root_win;;
-
-let drawing_root = new drawable root_win;;
-
-let infowindow = GWindow.window ~title:"liv info" ~width:300 ~height:150 ();;
-
-infowindow#misc#set_size_request ~width: 300 ~height: 150;;
-infowindow#resize ~width: 300 ~height: 150;;
-infowindow#connect#destroy ~callback:Main.quit;;
-
-let imglbox0 = GPack.vbox ~packing:infowindow#add ();;
-
-let imglbox = GPack.hbox ~packing:imglbox0#add ();;
-
-let sb = GRange.scrollbar `VERTICAL
-    ~packing:(imglbox#pack ~from:`END ~expand:false) ();;
-
-let imglist =
-  ((GList.clist ~shadow_type:`OUT
-     ~columns: 1 ~packing: imglbox#add ~vadjustment:sb#adjustment ())
-   : string GList.clist);;
-
-imglist#misc#set_size_request ~width:300 ~height: 150;;
-
-let prog2 = GRange.progress_bar ~packing: (imglbox0#pack ~expand: false) ();;
-
-class progs = object
-  method map = prog1#map
-  method unmap = prog1#unmap
-  method set_format_string s =
-    prog1#set_text s;
-    prog2#set_text s
-  method set_fraction s =
-    prog1#set_fraction s;
-    prog2#set_fraction s
-end;;
-
-let prog = new progs;;
-
-sync();;

examples/liv-furuse/icon.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: icon.ml,v 1.22 2004/09/24 10:55:07 weis Exp $ *)
-
-open Images;;
-open OImages;;
-open Livshtype;;
-open Geometry;;
-open Ximage2;;
-open OXimage2;;
-
-let xvmode = ref false;;
-
-let mime_icons = Hashtbl.create 107;;
-
-let string_of_format = function
-  | Gif -> "GIF8x"
-  | Bmp -> "BMP"
-  | Tiff -> "TIFF"
-  | Jpeg -> "JPEG"
-  | Png -> "PNG"
-  | Xpm -> "XPM"
-  | Ppm -> "PPM"
-  | _ -> "???";;
-
-let thumb_path name =
-  Filename.concat
-    (Filename.concat
-       (Filename.dirname name)
-       (if !xvmode then ".xvpics" else ".livpics"))
-    (Filename.basename name);;
-
-let create_xvthumb name =
-  let thumbpath = thumb_path name in
-  let thumbdir = Filename.dirname thumbpath in
-  (* prerr_endline ("thumbdir: " ^ thumbdir); *)
-  if not (Sys.file_exists thumbdir) then Unix.mkdir thumbdir 0o755;
-
-  let format, hdrs = Images.file_format name in
-  let w, h, img =
-    match format with
-    | Jpeg ->
-      OJpeg.load_thumbnail name []
-        { spec_width = Pixel 80; spec_height = Pixel 60;
-          spec_aspect = Keep_at_most; spec_switch = Smaller_only;
-          spec_x = 0; spec_y = 0 }
-    | _ ->
-      let img = OImages.load name [] in
-      let w, h = img#width, img#height in
-      w, h, img in
-
-  let thumb = OXvthumb.create img in
-  OXvthumb.save thumbpath
-    (Printf.sprintf
-       "%dx%d %s file  (%d bytes)" w h (string_of_format format)
-       (Unix.lstat name).Unix.st_size)
-    thumb;
-  img#destroy;
-  thumb#destroy;;
-
-let create_livthumb name =
-  let thumbpath = thumb_path name in
-  let thumbdir = Filename.dirname thumbpath in
-  (* prerr_endline ("thumbdir: " ^ thumbdir); *)
-  if not (Sys.file_exists thumbdir) then Unix.mkdir thumbdir 0o755;
-
-  let format, hdrs = Images.file_format name in
-  let w, h, img =
-    match format with
-    | Jpeg ->
-      OJpeg.load_thumbnail name []
-        { spec_width = Pixel 80; spec_height = Pixel 60;
-          spec_aspect = Keep_at_most; spec_switch = Smaller_only;
-          spec_x = 0; spec_y = 0 }
-    | _ ->
-      let img = OImages.load name [] in
-      let w, h = img#width, img#height in
-      w, h, img in
-
-  let ratiow = 80.0 /. float w in
-  let ratioh = 60.0 /. float h in
-  let ratio = if ratiow  < ratioh then ratiow else ratioh in
-  let img =
-    let img =
-      match OImages.tag img with
-      | Index8 i -> i#to_rgb24
-      | Index16 i -> i#to_rgb24
-      | Rgb24 i -> i
-      | _ -> assert false in
-    img#resize None
-      (Pervasives.truncate (float w *. ratio))
-      (Pervasives.truncate (float h *. ratio)) in
-  img#save thumbpath (Some Jpeg) [Save_Quality 75];
-  img#destroy;;
-
-let load_icon name typ =
-  let thumb = thumb_path name in
-  let inf, pixmap =
-    (* XVTHUMB *)
-    try
-      let inf, img =
-        if !xvmode then
-          let inf, img = OXvthumb.load thumb in
-          inf, img#coerce
-        else "", OImages.load thumb [] in
-      inf, pixmap_of_image Gui.root_win None img
-    with
-    | _ ->
-      let mj, mn = typ in
-      try
-        if mj <> "image" then raise Exit;
-        let inf, img =
-          if !xvmode then begin
-            create_xvthumb name;
-            let inf, img = OXvthumb.load thumb in
-            inf, img#coerce
-          end else begin
-            create_livthumb name;
-            "", OImages.load thumb []
-          end in
-        inf, pixmap_of_image Gui.root_win None img
-      with
-      | _ ->
-        let iconpath =
-          try Hashtbl.find Iconcap.table (mj, mn) with
-          | Not_found -> Hashtbl.find Iconcap.table (mj,"*") in
-        let iconpath =
-          Pathfind.find
-            [ "."; "~/.liv"; "/usr/share/icons/"; "/usr/share/pixmaps"; ]
-            iconpath in
-
-        (* prerr_endline ("loading "^iconpath); *)
-        (mj ^ "/" ^ mn),
-        begin
-          try Hashtbl.find mime_icons iconpath with
-          | Not_found ->
-              let pixmap =
-                pixmap_of_image Gui.root_win None (OImages.load iconpath []) in
-              Hashtbl.add mime_icons iconpath pixmap;
-              pixmap
-        end in
-  inf, pixmap;;

examples/liv-furuse/iconcap

-# This is a sample "iconcap" file for lv.
-# place this file in your $HOME/.lv directory
-
-#audio/mod; /usr/bin/mikmod %s
-# audio/*; /usr/bin/play %s
-
-text/*; 	File.xpm
-audio/*; 	sound.xpm
-image/*; 	Monalisa.xpm
-video/*;
-
-special/dir; 	Folder.xpm
-special/lnkdir; FolderLink.xpm
-special/lnk; 	FilesLink.xpm
-special/*; 	BulletHole.xpm
-
-application/postscript; /usr/share/WindowMaker/Icons/ps.tiff
-application/pdf; /usr/share/WindowMaker/Icons/pdf.tiff
-application/x-dvi;	/usr/share/WindowMaker/Icons/xdvi.xpm
-
-encoding/gzip; /usr/share/icons/filez.tif
-encoding/compress; /usr/share/icons/filez.tif

examples/liv-furuse/iconcap.ml

-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Jun Furuse, projet Cristal, INRIA Rocquencourt           *)
-(*                                                                     *)
-(*  Copyright 1999-2004,                                               *)
-(*  Institut National de Recherche en Informatique et en Automatique.  *)
-(*  Distributed only by permission.                                    *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id: iconcap.ml,v 1.16 2005/02/27 05:48:26 furuse Exp $ *)
-
-open Livmisc;;
-
-(* iconcap file parser *)
-
-let table = Hashtbl.create 107;;
-
-let load f =
-  let ic = open_in f in
-  try
-    while true do
-      let str = input_line ic in
-      if str <> "" && str.[0] <> '#' then
-      try
-        let pos = String.index str ';' in
-        let typ = remove_space (String.sub str 0 pos) in
-        let icon =
-          remove_space
-            (String.sub str (pos + 1) (String.length str - pos - 1)) in
-        let tokens =
-          Mstring.split_str (function '/' -> true | _ -> false) typ in
-        match tokens with
-        | [maj; min] ->
-            (* prerr_endline (Printf.sprintf "%s/%s => (%s)" maj min icon); *)
-            Hashtbl.add table (maj, min) icon
-        | _ -> assert false
-      with
-      | _ -> failwith (str ^ ": parse error")
-    done;
-    raise Exit
-  with
-  | End_of_file -> close_in ic;;
-