Subject: Re: error handling functions again...
To: None <tech-userlevel@netbsd.org>
From: Jed Davis <jdev@panix.com>
List: tech-userlevel
Date: 08/25/2006 20:16:48
Elad Efrat <elad@NetBSD.org> writes:
> void *
> ecalloc(size_t n, size_t s)
> {
> void *p = calloc(n, s);
> if (p == NULL)
> (*efunc)(1, "Cannot allocate %zu bytes", n);
> return p;
> }
Except it's n*s bytes that won't have been allocated.
--
let p = List.map (fun c k _-> k (print_char c))
in List.fold_right (fun f a _ -> f a) (List.map2
(fun f g k -> f (g k) ()) (p ['J';'d';'D';'v';'s'])
(p ['e';' ';'a';'i';'\n'])) ignore ()