Re: [evolution-patches] Re: 43485: strftime usage in e-cell-date



committed

On Wed, 2003-05-28 at 16:23, Ettore Perazzoli wrote:
> Looks good.
> 
> On Tue, 2003-05-27 at 12:30, Mike Kestner wrote:
> > On Fri, 2003-05-23 at 16:25, Jeffrey Stedfast wrote:
> > > probably better to use memcpy, especially since s and buf do not
> > > overlap.
> > > 
> > > also:
> > > 
> > > sz = MIN (sz, max - 1);
> > > memcpy (s, buf, sz);
> > > s[sz] = '\0';
> > 
> > I know we went off on a tangent looking for the beautiful solution
> > returning dynamically allocated strings, but in the interest of thinking
> > small in RC mode I've updated the previous patch to address Jeff's
> > feedback.  This patch uses memcpy and also uses g_utf8_find_prev_char to
> > truncate to a string that will fit in the buffer provided.
> > 
> > Maybe this is still wrong though, since the strftime behavior would be
> > to return 0 and an undefined buffer if the utf8 converted text doesn't
> > fit in the buffer.  So, I can either commit this patch or one altered to
> > just return 0 in the sz >= max case.
> > 
> > Mike
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]