tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xentools41 LDFLAGS Re: broken packages for 2012Q3
On Fri, Mar 08, 2013 at 02:27:42PM +0100, Ignatios Souvatzis wrote:
> On Sat, Nov 24, 2012 at 10:40:54PM -0800, Aaron J. Grier wrote:
>
> > see attached. I can only vaguely follow ML, and did some cut-and-paste
> > from rosetta code to do the necessary trailing newline trimming of
> > /kern/xen/xsd_port. I'm unclear of the license there, so this may need
> > rewriting by someone more clued before being committed.
>
> I'd write rtrim thusly:
Gna. of course:
let rtrim s =
let rec aux s l =
if l < 0 then ""
else match s.[l] with
| '\t' | '\r' | '\n' | ' ' -> aux s (l-1)
| _ -> String.sub s 0 (l+1)
in
aux s ((String.length s) - 1)
(* assuming you don't need right_pos anywhere *)
-is
--
seal your e-mail: http://www.gnupg.org/
Home |
Main Index |
Thread Index |
Old Index