implemented read/write/read_line/write_line/flush in h2-io-file.adb
This commit is contained in:
		@ -47,15 +47,23 @@ package body File is
 | 
			
		||||
			V := V or Sysdef.O_RDONLY;
 | 
			
		||||
		end if;
 | 
			
		||||
 | 
			
		||||
		if ((Bits and FLAG_CREATE) /= 0) then
 | 
			
		||||
		if (Bits and FLAG_CREATE) /= 0 then
 | 
			
		||||
			V := V or Sysdef.O_CREAT;
 | 
			
		||||
		end if;
 | 
			
		||||
 | 
			
		||||
		if ((Bits and FLAG_TRUNCATE) /= 0) then
 | 
			
		||||
		if (Bits and FLAG_TRUNCATE) /= 0 then
 | 
			
		||||
			V := V or Sysdef.O_TRUNC;
 | 
			
		||||
		end if;
 | 
			
		||||
 | 
			
		||||
		if ((Bits and FLAG_SYNC) /= 0) then
 | 
			
		||||
		if (Bits and FLAG_APPEND) /= 0 then
 | 
			
		||||
			V := V or Sysdef.O_APPEND;
 | 
			
		||||
		end if;
 | 
			
		||||
 | 
			
		||||
		if (Bits and FLAG_NONBLOCK) /= 0 then
 | 
			
		||||
			V := V or Sysdef.O_NONBLOCK;
 | 
			
		||||
		end if;
 | 
			
		||||
 | 
			
		||||
		if (Bits and FLAG_SYNC) /= 0 then
 | 
			
		||||
			V := V or Sysdef.O_SYNC;
 | 
			
		||||
		end if;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,12 @@ int main (int argc, char* argv[])
 | 
			
		||||
	printf ("\tO_CREAT:  constant := %d;\n", O_CREAT);
 | 
			
		||||
	printf ("\tO_EXCL:   constant := %d;\n", O_EXCL);
 | 
			
		||||
	printf ("\tO_TRUNC:  constant := %d;\n", O_TRUNC);
 | 
			
		||||
	printf ("\tO_APPEND:  constant := %d;\n", O_APPEND);
 | 
			
		||||
 | 
			
		||||
#if !defined(O_NONBLOCK)
 | 
			
		||||
#	define O_NONBLOCK 0
 | 
			
		||||
#endif
 | 
			
		||||
	printf ("\tO_NONBLOCK:  constant := %d;\n", O_NONBLOCK);
 | 
			
		||||
 | 
			
		||||
#if !defined(O_SYNC)
 | 
			
		||||
#	define O_SYNC 0
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user