List Info

Thread: error handling functions again...




error handling functions again...
user name
2006-08-26 00:16:48
Elad Efrat <eladNetBSD.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 ()

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )