[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-664-g4560116

ontologiae ontologiae at gmail.com
Mon Nov 22 13:50:10 UTC 2010


The following commit has been merged in the master branch:
commit 4560116107e0dd5f7e35afe3e1a517df9175f5a7
Author: ontologiae <ontologiae at gmail.com>
Date:   Mon Nov 22 14:49:08 2010 +0100

    std_file for isaacos

diff --git a/lib/standard/file_system/file.li b/lib/standard/file_system/std_file.li
similarity index 91%
copy from lib/standard/file_system/file.li
copy to lib/standard/file_system/std_file.li
index 356ccf4..d06c917 100644
--- a/lib/standard/file_system/file.li
+++ b/lib/standard/file_system/std_file.li
@@ -19,55 +19,55 @@
 //                     http://isaacproject.u-strasbg.fr/                     //
 ///////////////////////////////////////////////////////////////////////////////
 Section Header
-
-  + name    := FILE;
+  
+  + name    := STD_FILE;
 
   - copyright   := "2003-2007 Benoit Sonntag, Jerome Hilbert";
-
+  
   - comment := "Abstract File Management";
-
+  
 Section Inherit
-
-  - parent_entry:ENTRY := ENTRY;
-
+  
+  - parent_entry:ENTRY := ENTRY;   
+  
 Section Public
-
+  
   - cursor:UINTEGER_32 <-
   [
     -? {is_open};
   ]
-  (
+  ( 
     deferred;
     0
   );
-
+  
   - size:UINTEGER_32 <-
-  (
+  ( 
     deferred;
     0
   );
-
+  
   - set_cursor n:UINTEGER_32 <-
   [
     -? {is_open};
     -? {n <= size};
   ]
   (
-    deferred;
+    deferred;    
   );
-
+  
   //
   // Update.
   //
-
+      
   - is_empty:BOOLEAN <- size = 0;
   // Is collection empty ?
-
+    
   //
   // Read.
   //
-
-  - read dest:OBJECT :INTEGER <-
+  
+  - read dest:OBJECT :INTEGER <- 
   // WARNING: It's good for Mapping objects, else serializable is necessary.
   [
     -? {is_open};
@@ -75,8 +75,8 @@ Section Public
   ( + buf:NATIVE_ARRAY(UINTEGER_8);
     buf := CONVERT(OBJECT,NATIVE_ARRAY(UINTEGER_8)).on dest;
     physical_read buf size (dest.object_size)
-  );
-
+  ); 
+  
   - read dest:ARRAYED size nb_elt:INTEGER :INTEGER <-
   [
     -? {is_open};
@@ -85,22 +85,22 @@ Section Public
     + index,s:INTEGER;
     + result:INTEGER;
     + new_count:INTEGER;
-
+    
     new_count := dest.count + nb_elt;
     dest.set_capacity new_count;
     buf := dest.to_native_array_uinteger_8;
     index := dest.count * dest.element_sizeof;
-    s := nb_elt * dest.element_sizeof;
+    s := nb_elt * dest.element_sizeof;    
     result := physical_read (buf+index) size s;
     dest.set_count new_count;
     ? {result % dest.element_sizeof = 0};
     result / dest.element_sizeof
   );
-
+  
   //
   // Write.
   //
-
+  
   - write src:ARRAYED from start:INTEGER size nb_elt:INTEGER :INTEGER <-
   [
     -? {is_open};
@@ -108,7 +108,7 @@ Section Public
   ( + buf:NATIVE_ARRAY(UINTEGER_8);
     + index,s:INTEGER;
     + result:INTEGER;
-
+       
     buf := src.to_native_array_uinteger_8;
     index := (start-src.lower) * src.element_sizeof;
     s := nb_elt * src.element_sizeof;
@@ -116,36 +116,36 @@ Section Public
     ? {result % src.element_sizeof = 0};
     result / src.element_sizeof
   );
-
+  
   - write src:ARRAYED size nb_elt:INTEGER :INTEGER <-
   (
     write src from (src.lower) size nb_elt
   );
-
+  
   - write src:ARRAYED :INTEGER <-
   (
     write src size (src.count)
   );
-
+  
   //
   // Close.
   //
-
+  
   - close <-
-  (
+  ( 
     deferred;
   )
   [
     +? {! is_open};
   ];
-
+  
   - open_read_only:BOOLEAN <-
   (
     deferred;
   );
-
-Section FILE
-
+    
+Section STD_FILE
+  
   - physical_read buf:NATIVE_ARRAY(UINTEGER_8) size s:INTEGER :INTEGER <-
   [
     -? {is_open};
@@ -155,21 +155,21 @@ Section FILE
     0
   )
   [
-    +? { (cursor = Old cursor + s ) || {cursor = size} };
+    +? {cursor = Old cursor + s};
   ];
-
+    
   - physical_write buf:NATIVE_ARRAY(UINTEGER_8) size s:INTEGER :INTEGER <-
   [
     -? {is_open};
   ]
-  (
+  (     
     deferred;
     0
   )
   [
     +? {cursor = Old cursor + s};
   ];
-
-
-
-
+            
+  
+    
+  
\ No newline at end of file

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list