1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
-- Programmed by Jedidiah Barber
-- Released into the public domain
with
Interfaces.C.Strings;
package body FLTK.Errors is
procedure fl_error_default_warning
(M : in Interfaces.C.char_array);
pragma Import (C, fl_error_default_warning, "fl_error_default_warning");
pragma Inline (fl_error_default_warning);
procedure fl_error_default_error
(M : in Interfaces.C.char_array);
pragma Import (C, fl_error_default_error, "fl_error_default_error");
pragma Inline (fl_error_default_error);
procedure fl_error_default_fatal
(M : in Interfaces.C.char_array);
pragma Import (C, fl_error_default_fatal, "fl_error_default_fatal");
pragma Inline (fl_error_default_fatal);
procedure fl_error_set_hooks;
pragma Import (C, fl_error_set_hooks, "fl_error_set_hooks");
pragma Inline (fl_error_set_hooks);
procedure Warning_Hook
(C_Mess : in Interfaces.C.Strings.chars_ptr);
pragma Export (C, Warning_Hook, "error_warning_hook");
procedure Warning_Hook
(C_Mess : in Interfaces.C.Strings.chars_ptr) is
begin
Current_Warning (Interfaces.C.Strings.Value (C_Mess));
end Warning_Hook;
procedure Error_Hook
(C_Mess : in Interfaces.C.Strings.chars_ptr);
pragma Export (C, Error_Hook, "error_error_hook");
procedure Error_Hook
(C_Mess : in Interfaces.C.Strings.chars_ptr) is
begin
Current_Error (Interfaces.C.Strings.Value (C_Mess));
end Error_Hook;
procedure Fatal_Hook
(C_Mess : in Interfaces.C.Strings.chars_ptr);
pragma Export (C, Fatal_Hook, "error_fatal_hook");
procedure Fatal_Hook
(C_Mess : in Interfaces.C.Strings.chars_ptr) is
begin
Current_Fatal (Interfaces.C.Strings.Value (C_Mess));
end Fatal_Hook;
procedure Default_Warning
(Message : in String) is
begin
fl_error_default_warning (Interfaces.C.To_C (Message));
end Default_Warning;
procedure Default_Error
(Message : in String) is
begin
fl_error_default_error (Interfaces.C.To_C (Message));
end Default_Error;
procedure Default_Fatal
(Message : in String) is
begin
fl_error_default_fatal (Interfaces.C.To_C (Message));
end Default_Fatal;
begin
fl_error_set_hooks;
end FLTK.Errors;
|