From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id B50F4BC57 for ; Sat, 12 Jun 2010 22:49:55 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcCAF+PE0zRVaE0mGdsb2JhbACSbowMCBUBAQEBAQgJDAcRIq4PggOESi6ITwEBAwWFFQSDSA X-IronPort-AV: E=Sophos;i="4.53,408,1272837600"; d="scan'208";a="52986299" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail2-smtp-roc.national.inria.fr with ESMTP; 12 Jun 2010 22:49:55 +0200 Received: by fxm4 with SMTP id 4so1845252fxm.39 for ; Sat, 12 Jun 2010 13:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=bpOVNI5UY/xdjS7pNV2pWQtaj30NfEwEpwoIIBEqaiU=; b=LHliHNV+sV4AHAtdzOo1C4cp5e9TXhDYZcg6n6UOJrPXI6fMmMmg0+WosSByGfxJ/4 qkzLSIK52QQ/PbWlTDlTr/5jWvN6xo3nWJq4KCPfmK6Y2SvvnHQPKigJ+vsw5iALY4Rm KKFmG9aFau22XW8Us2ISsZzwmGVAVAB2wF7fo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=lwWUDzEsig3NJ2aMIDeyCWgtPNFX7N3d2Ja366q/A6BUqFSa/G4rvkkpXz9MpfH+Jz /AXdUJyTy2ic0Mcsr3liszM1jONNS+0rQTRigmNrNC2GFC680ao9eARDftU5X+8xp38E WCEN+T6B+8f7IMDnZCDPjNIe1sU5g/MnB76c8= Received: by 10.103.78.31 with SMTP id f31mr1048760mul.79.1276375795285; Sat, 12 Jun 2010 13:49:55 -0700 (PDT) Received: from debian ([79.114.98.135]) by mx.google.com with ESMTPS id w5sm3858529mue.59.2010.06.12.13.49.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 12 Jun 2010 13:49:54 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by debian (Postfix) with ESMTP id 816DF26D60 for ; Sat, 12 Jun 2010 23:49:53 +0300 (EEST) Message-ID: <4C13F2F1.9070508@gmail.com> Date: Sat, 12 Jun 2010 23:49:53 +0300 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4 MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] [ANNOUNCE] llpp References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=5379965D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; malc:01 usr:01 segfaults:01 printf:01 edwin:98 git:98 git:98 wrote:01 compile:01 caml-list:01 minor:01 short:01 diff:02 static:03 static:03 On 06/12/2010 09:36 PM, malc wrote: > Hello, > > Long story cut short: the PDF viewers that are available for my machine > leave a lot to be desired for my usage pattern, so i had to write yet > another, the code is at: > > http://repo.or.cz/w/llpp.git > > http://repo.or.cz/w/llpp.git/blob_plain/master:/BUILDING explains how to > build it. > Appears to be working fine so far, and much faster than okular. Two minor issues: 1. The mupdf from sumatrapdf installs fitz.h and mupdf.h directly into /usr/local/include, and not under fitz/, or mupdf/, so llpp failed to compile. I fixed by copying the headers to where llpp expected them to be. 2. It segfaults if the file is not found, fix below: diff --git a/link.c b/link.c index 7ca7684..7dab233 100644 --- a/link.c +++ b/link.c @@ -177,7 +177,8 @@ static void __attribute__ ((format (printf, 2, 3))) static void die (fz_error error) { fz_catch (error, "aborting"); - pdf_closexref (state.xref); + if (state.xref) + pdf_closexref (state.xref); exit (1); } Best regards, --Edwin