Skip to content

Commit

Permalink
Fixed flat Degree 3 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezault committed Apr 9, 2013
1 parent 169ab55 commit d8a6db3
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
3 changes: 2 additions & 1 deletion library/kernel/io/kl_binary_input_file.ge
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ note
%characters (8-bit code between 0 and 255)"

library: "Gobo Eiffel Kernel Library"
copyright: "Copyright (c) 2001-2008, Eric Bezault and others"
copyright: "Copyright (c) 2001-2013, Eric Bezault and others"
license: "MIT License"
date: "$Date$"
revision: "$Revision$"
Expand Down Expand Up @@ -51,6 +51,7 @@ inherit
read_line as old_read_line,
read_to_string as old_read_to_string,
change_name as old_change_name,
change_mode as old_change_mode,
flush as old_flush,
close as old_close,
delete as old_delete,
Expand Down
3 changes: 2 additions & 1 deletion library/kernel/io/kl_binary_output_file.ge
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ note
%characters (8-bit code between 0 and 255)"

library: "Gobo Eiffel Kernel Library"
copyright: "Copyright (c) 2001-2008, Eric Bezault and others"
copyright: "Copyright (c) 2001-2013, Eric Bezault and others"
license: "MIT License"
date: "$Date$"
revision: "$Revision$"
Expand Down Expand Up @@ -50,6 +50,7 @@ inherit
read_stream as old_read_stream,
read_line as old_read_line,
change_name as old_change_name,
change_mode as old_change_mode,
flush as old_flush,
close as old_close,
delete as old_delete,
Expand Down
27 changes: 27 additions & 0 deletions library/kernel/io/kl_file.e
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,26 @@ feature -- Basic operations
end
end

change_mode (a_mask: INTEGER)
-- Replace mode by `a_mask'.
local
rescued: BOOLEAN
do
if not rescued then
if string_name /= Empty_name then
if old_exists then
old_change_mode (a_mask)
end
end
end
rescue
if not rescued then
rescued := True
retry
end
end


feature {NONE} -- Implementation

Empty_name: STRING = "empty_name"
Expand Down Expand Up @@ -483,6 +503,13 @@ feature {NONE} -- Implementation
name_changed: string_name.is_equal (new_name)
end

old_change_mode (a_mask: INTEGER)
-- Replace mode by `a_mask'.
require
file_exists: old_exists
deferred
end

old_close
-- Close file.
require
Expand Down
3 changes: 2 additions & 1 deletion library/kernel/io/kl_text_input_file.ge
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ note
%are able to recognize '%%N', '%%R%%N' and '%%R' as line separators."

library: "Gobo Eiffel Kernel Library"
copyright: "Copyright (c) 2001-2008, Eric Bezault and others"
copyright: "Copyright (c) 2001-2013, Eric Bezault and others"
license: "MIT License"
date: "$Date$"
revision: "$Revision$"
Expand Down Expand Up @@ -54,6 +54,7 @@ inherit
read_line as old_read_line,
read_to_string as old_read_to_string,
change_name as old_change_name,
change_mode as old_change_mode,
flush as old_flush,
close as old_close,
delete as old_delete,
Expand Down
3 changes: 2 additions & 1 deletion library/kernel/io/kl_text_output_file.ge
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ note
%the underlying file system when written to the file."

library: "Gobo Eiffel Kernel Library"
copyright: "Copyright (c) 2001-2008, Eric Bezault and others"
copyright: "Copyright (c) 2001-2013, Eric Bezault and others"
license: "MIT License"
date: "$Date$"
revision: "$Revision$"
Expand Down Expand Up @@ -52,6 +52,7 @@ inherit
read_stream as old_read_stream,
read_line as old_read_line,
change_name as old_change_name,
change_mode as old_change_mode,
flush as old_flush,
close as old_close,
delete as old_delete,
Expand Down

0 comments on commit d8a6db3

Please sign in to comment.