<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/feedsky2.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/B612" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/B612" type="application/rss+xml"></fs:self_link><lastBuildDate>Mon, 07 Nov 2011 14:41:59 GMT</lastBuildDate><title>小行星B612</title><description>伦的小小生活</description><link atom:type="text/html">http://lun-b612.blogspot.com/</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671</id><link xmlns="http://www.w3.org/2005/Atom" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://lun-b612.blogspot.com/feeds/posts/default"></link><link xmlns="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8622701543160892671/posts/default"></link><link xmlns="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/"></link><link xmlns="http://www.w3.org/2005/Atom" rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8622701543160892671/posts/default?start-index=26&amp;max-results=25"></link><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><generator xmlns="http://www.w3.org/2005/Atom" version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>238</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><pubDate>Mon, 07 Nov 2011 14:41:59 GMT</pubDate><managingEditor>lun</managingEditor><item><title>mmap映射超过文件大小的内存区域</title><link atom:title="mmap映射超过文件大小的内存区域" atom:type="text/html">http://lun-b612.blogspot.com/2011/11/mmap.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-3832083925220214166</id><content xmlns="http://www.w3.org/2005/Atom" type="html">man mmap    得到&lt;br /&gt;&lt;br /&gt;&lt;code&gt;The mmap() function can be used to map a region of memory that is larger than the current size of the object. Memory access within the mapping but beyond the current end  of  the underlying objects may result in SIGBUS signals being sent to the process. The reason for this is that the size of the object can be manipulated by other processes and can change at any moment. The implementation should tell the application that a memory reference is outside the object where this can be detected;  otherwise, written data may be lost and read data may not reflect actual data in the object.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;今天遇到个BUG，读取了超过文件实际大小的数据。 因为PC端使用了mmap，而板子上直接使用的read，所以，在PC上调试时，没有报错，但到板子上就一直出错。当然，在PC端偶尔遇到BUS ERROR，当时不清楚是什么原因。&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-3832083925220214166?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>man mmap    得到&lt;br /&gt;&lt;br /&gt;&lt;code&gt;The mmap() function can be used to map a region of memory that is larger than the current size of the object. Memory access within the mapping but beyond the current end  of  the underlying objects may result in SIGBUS signals being sent to the process. The reason for this is that the size of the object can be manipulated by other processes and can change at any moment. The implementation should tell the application that a memory reference is outside the object where this can be detected;  otherwise, written data may be lost and read data may not reflect actual data in the object.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;今天遇到个BUG，读取了超过文件实际大小的数据。 因为PC端使用了mmap，而板子上直接使用的read，所以，在PC上调试时，没有报错，但到板子上就一直出错。当然，在PC端偶尔遇到BUS ERROR，当时不清楚是什么原因。&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-3832083925220214166?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303064/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/11/mmap.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><category domain="http://www.blogger.com/atom/ns#">mmap</category><category domain="http://www.blogger.com/atom/ns#">SIGBUS</category><pubDate>Mon, 07 Nov 2011 22:41:59 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-3832083925220214166</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/11/mmap.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303064/5280888</fs:itemid></item><item><title>char literals</title><link atom:title="char literals" atom:type="text/html">http://lun-b612.blogspot.com/2011/11/char-literals.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-9140250183433030980</id><content xmlns="http://www.w3.org/2005/Atom" type="html">&lt;ul&gt;&lt;li&gt;char literal         &lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;'a'&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;wide char literal &lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;   L'a'&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;multichar literal    &lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;'ab' 'a\''&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;在C中，char literal 的类型是&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;int&lt;/span&gt;，而C++中，是&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;char&lt;/span&gt;&lt;br /&gt;wide char literal 及 multichar literal在C及C++中，均为&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;int&lt;/span&gt;&lt;br /&gt;&lt;iostream&gt;&lt;iostream&gt;&lt;iostream&gt;&lt;stdio.h&gt;&lt;br /&gt;ps: blogspot对代码格式的支持太烂了！&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/stdio.h&gt;&lt;/iostream&gt;&lt;/iostream&gt;&lt;/iostream&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-9140250183433030980?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>&lt;ul&gt;&lt;li&gt;char literal         &lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;'a'&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;wide char literal &lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;   L'a'&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;multichar literal    &lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;'ab' 'a\''&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;在C中，char literal 的类型是&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;int&lt;/span&gt;，而C++中，是&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;char&lt;/span&gt;&lt;br /&gt;wide char literal 及 multichar literal在C及C++中，均为&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;int&lt;/span&gt;&lt;br /&gt;&lt;iostream&gt;&lt;iostream&gt;&lt;iostream&gt;&lt;stdio.h&gt;&lt;br /&gt;ps: blogspot对代码格式的支持太烂了！&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/stdio.h&gt;&lt;/iostream&gt;&lt;/iostream&gt;&lt;/iostream&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-9140250183433030980?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303065/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/11/char-literals.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Sat, 05 Nov 2011 10:43:28 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-9140250183433030980</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/11/char-literals.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303065/5280888</fs:itemid></item><item><title>节奏太快</title><link atom:title="节奏太快" atom:type="text/html">http://lun-b612.blogspot.com/2011/11/blog-post.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-5651244047907987399</id><content xmlns="http://www.w3.org/2005/Atom" type="html">事情发生的太快，还没来得及想明白，就已经结束了。&lt;br /&gt;静下心来想，我们确实只适合做朋友。&lt;br /&gt;bless us&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-5651244047907987399?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>事情发生的太快，还没来得及想明白，就已经结束了。&lt;br /&gt;静下心来想，我们确实只适合做朋友。&lt;br /&gt;bless us&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-5651244047907987399?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303066/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/11/blog-post.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Wed, 02 Nov 2011 22:57:02 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-5651244047907987399</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/11/blog-post.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303066/5280888</fs:itemid></item><item><title>冷血</title><link atom:title="冷血" atom:type="text/html">http://lun-b612.blogspot.com/2011/10/blog-post_30.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-5860540066284726374</id><content xmlns="http://www.w3.org/2005/Atom" type="html">偶就是个冷血的人。&lt;br /&gt;对人不热情，与人交往时，又习惯性地给自己加个壳。&lt;br /&gt;对自己的感觉又缺乏清晰的判断，时不时还像个小孩子一样。&lt;br /&gt;想过改变，但安于现状不是更轻松么。&lt;br /&gt;偶还是适合一个人，就不用去伤害别人了。&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-5860540066284726374?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>偶就是个冷血的人。&lt;br /&gt;对人不热情，与人交往时，又习惯性地给自己加个壳。&lt;br /&gt;对自己的感觉又缺乏清晰的判断，时不时还像个小孩子一样。&lt;br /&gt;想过改变，但安于现状不是更轻松么。&lt;br /&gt;偶还是适合一个人，就不用去伤害别人了。&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-5860540066284726374?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303067/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/10/blog-post_30.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Sun, 30 Oct 2011 09:50:48 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-5860540066284726374</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/10/blog-post_30.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303067/5280888</fs:itemid></item><item><title>。。</title><link atom:title="。。" atom:type="text/html">http://lun-b612.blogspot.com/2011/10/blog-post_18.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-3880403332624195515</id><content xmlns="http://www.w3.org/2005/Atom" type="html">难道不能多一些关心么？ 伤感&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-3880403332624195515?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>难道不能多一些关心么？ 伤感&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-3880403332624195515?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303068/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/10/blog-post_18.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Tue, 18 Oct 2011 22:48:48 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-3880403332624195515</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/10/blog-post_18.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303068/5280888</fs:itemid></item><item><title>纪念一下，今天！</title><link atom:title="纪念一下，今天！" atom:type="text/html">http://lun-b612.blogspot.com/2011/10/blog-post_9226.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-6696994155022179707</id><content xmlns="http://www.w3.org/2005/Atom" type="html">开始了，要用心，要懂得珍惜。&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-6696994155022179707?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>开始了，要用心，要懂得珍惜。&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-6696994155022179707?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303069/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/10/blog-post_9226.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Sun, 09 Oct 2011 23:59:56 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-6696994155022179707</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/10/blog-post_9226.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303069/5280888</fs:itemid></item><item><title>偶让你烦了</title><link atom:title="偶让你烦了" atom:type="text/html">http://lun-b612.blogspot.com/2011/10/blog-post_09.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-371594967031749917</id><content xmlns="http://www.w3.org/2005/Atom" type="html">T_T 干活去了&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-371594967031749917?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>T_T 干活去了&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-371594967031749917?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303070/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/10/blog-post_09.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Sun, 09 Oct 2011 18:49:32 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-371594967031749917</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/10/blog-post_09.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303070/5280888</fs:itemid></item><item><title>小修下mupdf</title><link atom:title="小修下mupdf" atom:type="text/html">http://lun-b612.blogspot.com/2011/10/mupdf.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-8064071607455929672</id><content xmlns="http://www.w3.org/2005/Atom" type="html">&lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;!-- pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffdab9; } body { font-family: monospace; color: #000000; background-color: #ffdab9; } .Identifier { color: #008b8b; } .Special { color: #6a5acd; } .PreProc { color: #cd00cd; } .Statement { color: #a52a2a; font-weight: bold; } .Type { color: #2e8b57; font-weight: bold; } --&gt;&lt;br /&gt;&lt;/style&gt;之前就用过mupdf，但操作实在不方便，各个快捷键很诡异，所以一直用的evince。今天，看一个文档，发现用evince效果很不好，好多字母重叠到了一块。于是，就试了试mupdf，效果灰常好。
&lt;br /&gt;修改了mupdf的几处快捷键，将单页阅读修改为了连续阅读，调快了滚动速度。
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;Type&quot;&gt;diff --git a/apps/pdfapp.c b/apps/pdfapp.c&lt;/span&gt;
&lt;br /&gt;index 6292b03..81aba96 100644
&lt;br /&gt;&lt;span class=&quot;Type&quot;&gt;--- a/apps/pdfapp.c&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Type&quot;&gt;+++ b/apps/pdfapp.c&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -803,13 +803,23 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onkey(pdfapp_t *app, int c)&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case 'j':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		app-&amp;gt;pany -= app-&amp;gt;image-&amp;gt;h / 10;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		if (app-&amp;gt;pany + app-&amp;gt;image-&amp;gt;h &amp;lt;= app-&amp;gt;winh) {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    panto = PAN_TO_TOP;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pageno++;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		} else {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pany -= app-&amp;gt;image-&amp;gt;h / 20;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		}&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case 'k':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		app-&amp;gt;pany += app-&amp;gt;image-&amp;gt;h / 10;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		if (app-&amp;gt;pany &amp;gt;= 0) {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    panto = PAN_TO_BOTTOM;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pageno--;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		} else {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pany += app-&amp;gt;image-&amp;gt;h / 20;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		}&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case 'l':
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -871,7 +881,7 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onkey(pdfapp_t *app, int c)&lt;/span&gt;
&lt;br /&gt;	 */
&lt;br /&gt;
&lt;br /&gt;	case ',':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		panto = PAN_TO_BOTTOM;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		panto = PAN_TO_TOP;&lt;/span&gt;
&lt;br /&gt;		if (app-&amp;gt;numberlen &amp;gt; 0)
&lt;br /&gt;			app-&amp;gt;pageno -= atoi(app-&amp;gt;number);
&lt;br /&gt;		else
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -895,7 +905,7 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onkey(pdfapp_t *app, int c)&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case ' ':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		panto = DONT_PAN;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		panto = PAN_TO_TOP;&lt;/span&gt;
&lt;br /&gt;		if (app-&amp;gt;numberlen &amp;gt; 0)
&lt;br /&gt;			app-&amp;gt;pageno += atoi(app-&amp;gt;number);
&lt;br /&gt;		else
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -1049,8 +1059,8 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta&lt;/span&gt;
&lt;br /&gt;				/* scroll up/down, or left/right if
&lt;br /&gt;				shift is pressed */
&lt;br /&gt;				int isx = (modifiers &amp;amp; (1&amp;lt;&amp;lt;0));
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-				int xstep = isx ? 20 * dir : 0;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-				int ystep = !isx ? 20 * dir : 0;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+				int xstep = isx ? 50 * dir : 0;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+				int ystep = !isx ? 50 * dir : 0;&lt;/span&gt;
&lt;br /&gt;				pdfapp_panview(app, app-&amp;gt;panx + xstep, app-&amp;gt;pany + ystep);
&lt;br /&gt;			}
&lt;br /&gt;		}
&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-8064071607455929672?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>&lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;!-- pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffdab9; } body { font-family: monospace; color: #000000; background-color: #ffdab9; } .Identifier { color: #008b8b; } .Special { color: #6a5acd; } .PreProc { color: #cd00cd; } .Statement { color: #a52a2a; font-weight: bold; } .Type { color: #2e8b57; font-weight: bold; } --&gt;&lt;br /&gt;&lt;/style&gt;之前就用过mupdf，但操作实在不方便，各个快捷键很诡异，所以一直用的evince。今天，看一个文档，发现用evince效果很不好，好多字母重叠到了一块。于是，就试了试mupdf，效果灰常好。
&lt;br /&gt;修改了mupdf的几处快捷键，将单页阅读修改为了连续阅读，调快了滚动速度。
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;Type&quot;&gt;diff --git a/apps/pdfapp.c b/apps/pdfapp.c&lt;/span&gt;
&lt;br /&gt;index 6292b03..81aba96 100644
&lt;br /&gt;&lt;span class=&quot;Type&quot;&gt;--- a/apps/pdfapp.c&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Type&quot;&gt;+++ b/apps/pdfapp.c&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -803,13 +803,23 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onkey(pdfapp_t *app, int c)&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case 'j':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		app-&amp;gt;pany -= app-&amp;gt;image-&amp;gt;h / 10;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		if (app-&amp;gt;pany + app-&amp;gt;image-&amp;gt;h &amp;lt;= app-&amp;gt;winh) {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    panto = PAN_TO_TOP;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pageno++;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		} else {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pany -= app-&amp;gt;image-&amp;gt;h / 20;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		}&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case 'k':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		app-&amp;gt;pany += app-&amp;gt;image-&amp;gt;h / 10;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		if (app-&amp;gt;pany &amp;gt;= 0) {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    panto = PAN_TO_BOTTOM;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pageno--;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		} else {&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    app-&amp;gt;pany += app-&amp;gt;image-&amp;gt;h / 20;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		    pdfapp_showpage(app, 0, 0, 1);&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		}&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case 'l':
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -871,7 +881,7 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onkey(pdfapp_t *app, int c)&lt;/span&gt;
&lt;br /&gt;	 */
&lt;br /&gt;
&lt;br /&gt;	case ',':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		panto = PAN_TO_BOTTOM;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		panto = PAN_TO_TOP;&lt;/span&gt;
&lt;br /&gt;		if (app-&amp;gt;numberlen &amp;gt; 0)
&lt;br /&gt;			app-&amp;gt;pageno -= atoi(app-&amp;gt;number);
&lt;br /&gt;		else
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -895,7 +905,7 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onkey(pdfapp_t *app, int c)&lt;/span&gt;
&lt;br /&gt;		break;
&lt;br /&gt;
&lt;br /&gt;	case ' ':
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-		panto = DONT_PAN;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+		panto = PAN_TO_TOP;&lt;/span&gt;
&lt;br /&gt;		if (app-&amp;gt;numberlen &amp;gt; 0)
&lt;br /&gt;			app-&amp;gt;pageno += atoi(app-&amp;gt;number);
&lt;br /&gt;		else
&lt;br /&gt;&lt;span class=&quot;Statement&quot;&gt;@@ -1049,8 +1059,8 @@&lt;/span&gt;&lt;span class=&quot;PreProc&quot;&gt; void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta&lt;/span&gt;
&lt;br /&gt;				/* scroll up/down, or left/right if
&lt;br /&gt;				shift is pressed */
&lt;br /&gt;				int isx = (modifiers &amp;amp; (1&amp;lt;&amp;lt;0));
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-				int xstep = isx ? 20 * dir : 0;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Special&quot;&gt;-				int ystep = !isx ? 20 * dir : 0;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+				int xstep = isx ? 50 * dir : 0;&lt;/span&gt;
&lt;br /&gt;&lt;span class=&quot;Identifier&quot;&gt;+				int ystep = !isx ? 50 * dir : 0;&lt;/span&gt;
&lt;br /&gt;				pdfapp_panview(app, app-&amp;gt;panx + xstep, app-&amp;gt;pany + ystep);
&lt;br /&gt;			}
&lt;br /&gt;		}
&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-8064071607455929672?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303071/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/10/mupdf.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Sun, 02 Oct 2011 23:01:31 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-8064071607455929672</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/10/mupdf.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303071/5280888</fs:itemid></item><item><title>回学校住了</title><link atom:title="回学校住了" atom:type="text/html">http://lun-b612.blogspot.com/2011/10/blog-post.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-5933205362471759239</id><content xmlns="http://www.w3.org/2005/Atom" type="html">哈哈 第一晚睡的很不错。 出差时太冷了，每晚都会被冻醒。昨晚睡的真舒服，不过，还是7点多就醒了。&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-5933205362471759239?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>哈哈 第一晚睡的很不错。 出差时太冷了，每晚都会被冻醒。昨晚睡的真舒服，不过，还是7点多就醒了。&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-5933205362471759239?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303072/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/10/blog-post.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Sat, 01 Oct 2011 08:23:47 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-5933205362471759239</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/10/blog-post.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303072/5280888</fs:itemid></item><item><title>听说文昌天桥要没了</title><link atom:title="听说文昌天桥要没了" atom:type="text/html">http://lun-b612.blogspot.com/2011/09/blog-post_29.html</link><id xmlns="http://www.w3.org/2005/Atom">tag:blogger.com,1999:blog-8622701543160892671.post-8677319773300703209</id><content xmlns="http://www.w3.org/2005/Atom" type="html">不在南京 还想去走一下 拍张照啥的 遗憾&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-8677319773300703209?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><author xmlns="http://www.w3.org/2005/Atom"><name>lun</name><uri>http://www.blogger.com/profile/00937901766956354816</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total><content:encoded>不在南京 还想去走一下 拍张照啥的 遗憾&lt;p&gt;-- &lt;br&gt;Sent from my mobile device&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622701543160892671-8677319773300703209?l=lun-b612.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/576303073/B612/feedsky/s.gif?r=http://lun-b612.blogspot.com/2011/09/blog-post_29.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><pubDate>Thu, 29 Sep 2011 12:19:38 +0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-8622701543160892671.post-8677319773300703209</guid><dc:creator>lun</dc:creator><fs:srclink>http://lun-b612.blogspot.com/2011/09/blog-post_29.html</fs:srclink><fs:srcfeed>http://lun-b612.blogspot.com/feeds/posts/default</fs:srcfeed><fs:itemid>feedsky/B612/~7171943/576303073/5280888</fs:itemid></item></channel></rss>
