summaryrefslogtreecommitdiff
path: root/body/fltk-images-rgb-pnm.adb
diff options
context:
space:
mode:
Diffstat (limited to 'body/fltk-images-rgb-pnm.adb')
-rw-r--r--body/fltk-images-rgb-pnm.adb18
1 files changed, 11 insertions, 7 deletions
diff --git a/body/fltk-images-rgb-pnm.adb b/body/fltk-images-rgb-pnm.adb
index 362b8d6..be4ed29 100644
--- a/body/fltk-images-rgb-pnm.adb
+++ b/body/fltk-images-rgb-pnm.adb
@@ -12,6 +12,10 @@ with
package body FLTK.Images.RGB.PNM is
+ ------------------------
+ -- Functions From C --
+ ------------------------
+
function new_fl_pnm_image
(F : in Interfaces.C.char_array)
return Storage.Integer_Address;
@@ -26,6 +30,10 @@ package body FLTK.Images.RGB.PNM is
+ -------------------
+ -- Destructors --
+ -------------------
+
overriding procedure Finalize
(This : in out PNM_Image) is
begin
@@ -39,7 +47,7 @@ package body FLTK.Images.RGB.PNM is
--------------------
- -- Construction --
+ -- Constructors --
--------------------
package body Forge is
@@ -51,12 +59,7 @@ package body FLTK.Images.RGB.PNM is
return This : PNM_Image do
This.Void_Ptr := new_fl_pnm_image
(Interfaces.C.To_C (Filename));
- case fl_image_fail (This.Void_Ptr) is
- when 1 => raise No_Image_Error;
- when 2 => raise File_Access_Error;
- when 3 => raise Format_Error;
- when others => null;
- end case;
+ Raise_Fail_Errors (This);
end return;
end Create;
@@ -65,3 +68,4 @@ package body FLTK.Images.RGB.PNM is
end FLTK.Images.RGB.PNM;
+