<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Ilkka Ollakka wrote:
<blockquote cite="mid:20100510155253.GA8763@linux-3azp" type="cite">
  <pre wrap="">On Tue, Mar 30, 2010 at 11:00:32PM -0400, Keary Griffin wrote:

Hi,

few small marks, as I didn't spot anyone else yet mentioning them.

  </pre>
  <blockquote type="cite">
    <pre wrap="">+static ssize_t Read ( sout_access_out_t *, block_t * );
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
  <blockquote type="cite">
    <pre wrap="">+    p_access->pf_read  = Read;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
No need to define Read at all, as core checks if it's defined before
using.

  </pre>
</blockquote>
OK<br>
<blockquote cite="mid:20100510155253.GA8763@linux-3azp" type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <pre wrap="">+#ifdef WIN32
+static int convert_path ( const char *restrict path, wchar_t *restrict wpath )
+static int win32_replace_rename ( const char *oldpath, const char *newpath )
+static int win32_retry_rename( const char *oldpath, const char *newpath )
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Maybe these should be in core instead access_output ? seems kinda
generic functions. Didn't check if courmisch allready merged them in.

  </pre>
</blockquote>
I'll let other people chime in on these, as I'm not sure what is
recommended for core vs modules, but here are my thoughts:<br>
 <br>
I think the way to do this would be to just merge the
win32_replace_rename into vlc_rename (this is how I had it originally,
albeit it within a private function in the livehttp module itself.  I
was asked to split it so I could use core vlc_rename for non-win32). 
The main reason I didn't want to change vlc_rename in core was:<br>
1)  I'm not familiar enough with windows to know whether or not the
change would always be the right thing to do.<br>
2)  With the change errno is not set correctly for renames under
win32.  (Although this could probably be fixed by writing some function
to examine the win32 error codes and setting errno appropriately)<br>
<br>
Is there an equivalent to _wrename under win32 that allows replacing
existing files and sets errno correctly?<br>
<br>
As for win32_retry_rename, it seems like such a hack I'm not sure if it
should be moved to core or not...<br>
<blockquote cite="mid:20100510155253.GA8763@linux-3azp" type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <pre wrap="">+    if ( p_sys->i_numsegs == 0 )
+        i_firstseg = 1;
+    else
+        i_firstseg = ( p_sys->i_segment >= p_sys->i_numsegs ) ? ( ( p_sys->i_segment - p_sys->i_numsegs ) + 1 ) : 1;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Wouldn't this be simpler if you just extend first if to check if
i_segments < i_umsegs too?

  </pre>
</blockquote>
Yes it would ;-)<br>
<blockquote cite="mid:20100510155253.GA8763@linux-3azp" type="cite">
  <pre wrap=""></pre>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a class="moz-txt-link-freetext" href="http://mailman.videolan.org/listinfo/vlc-devel">http://mailman.videolan.org/listinfo/vlc-devel</a>
  </pre>
</blockquote>
</body>
</html>