Hi Pino<br><br>            I am sorry to say about my previous patch. Thank you for your patience suggestions. This time I sent a new patch with all those changes. instead of filename i gave fsName (filespecName). Some how I miss that delete(filename) which included in the patch, yes you are correct we don&#39;t have to delete this otherwise it won&#39;t set it.<br>
<br>Thanks<br>--<br>A Srinivas<br><br><div class="gmail_quote">On Thu, Apr 7, 2011 at 12:30 AM,  <span dir="ltr">&lt;<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Send poppler mailing list submissions to<br>
        <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:poppler-owner@lists.freedesktop.org">poppler-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of poppler digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Patch: New additions in FileSpec (Pino Toscano)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 6 Apr 2011 12:28:26 +0200<br>
From: Pino Toscano &lt;<a href="mailto:pino@kde.org">pino@kde.org</a>&gt;<br>
Subject: Re: [poppler] Patch: New additions in FileSpec<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201104061228.26995.pino@kde.org">201104061228.26995.pino@kde.org</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi,<br>
<br>
Alle mercoled? 6 aprile 2011, srinivas adicherla ha scritto:<br>
&gt; For i/o checks for fseek() and ftell(),<br>
&gt; here we don&#39;t have to check for 10 bytes.<br>
<br>
The point is: I/O can fail, and you have to check for it.<br>
<br>
&gt; +static GBool getFileSpecObject(XRef *xref, Stream *stream, const<br>
&gt; char* fileName, Object *obj)<br>
&gt; +{<br>
&gt; +  Object fileSpec, obj1, obj2;<br>
&gt; +  int length;<br>
&gt; +<br>
&gt; +  GooString *filename = new GooString(fileName);<br>
<br>
Please give it a slightly different name, otherwise it is easy to<br>
misread filename and fileName.<br>
<br>
&gt; +  char *fileNameUTF16 = pdfDocEncodingToUTF16(filename, &amp;length);<br>
&gt; +<br>
&gt; +  fileSpec.initDict(xref);<br>
&gt; +  fileSpec.dictSet(&quot;Type&quot;, obj1.initName(&quot;Filespec&quot;));<br>
&gt; +  fileSpec.dictSet(&quot;F&quot;, obj1.initString(filename));<br>
&gt; +  fileSpec.dictSet(&quot;UF&quot;, obj1.initString(new<br>
&gt; GooString(fileNameUTF16, length)));<br>
&gt; +<br>
&gt; +  delete []fileNameUTF16;<br>
&gt; +  delete(filename);<br>
<br>
no, obj1.initString(filename) already takes ownership of filename, so<br>
you don&#39;t delete it.<br>
<br>
&gt; +GBool createFilespec (XRef *xref, GooString *filePathA, Object *obj)<br>
<br>
&quot;FileSpec&quot;, not &quot;Filespec&quot;<br>
<br>
&gt; +{<br>
&gt; [...]<br>
&gt; +  if (!(size = ftell(fs)))<br>
&gt; +    return gFalse;<br>
<br>
no, any return value &gt;= 0 means success, while -1 means error.<br>
also, you miss the error() call for ftell() failure<br>
<br>
&gt; +  // Extract the video name from the file uri<br>
<br>
again video name?!<br>
<br>
srinivas, let&#39;s be frank now: do you ever *read* your patches, or you<br>
just do some partially untested changes, rediff and send?<br>
<br>
--<br>
Pino Toscano<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 190 bytes<br>
Desc: This is a digitally signed message part.<br>
URL: &lt;<a href="http://lists.freedesktop.org/archives/poppler/attachments/20110406/fb1a817d/attachment-0001.pgp" target="_blank">http://lists.freedesktop.org/archives/poppler/attachments/20110406/fb1a817d/attachment-0001.pgp</a>&gt;<br>

<br>
------------------------------<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
<br>
<br>
End of poppler Digest, Vol 74, Issue 11<br>
***************************************<br>
</blockquote></div><br>