12 lines
426 B
Text
12 lines
426 B
Text
#define ATS_PACKNAME "Rosetta_Code.bitmap_read_ppm_task"
|
|
|
|
staload "bitmap_task.sats"
|
|
|
|
fn {a : t@ype}
|
|
pixmap_read_ppm :
|
|
(* On failure to read, the return is None_vt(). I do not currently
|
|
provide any indication of why the attempt failed, although in
|
|
practice you probably would wish to add that. *)
|
|
FILEref ->
|
|
Option_vt ([w, h : pos] [p : addr | null < p]
|
|
@(mfree_gc_v p | pixmap (a, w, h, p)))
|