tularis         Tue Sep  7 17:36:23 2004 EDT

  Modified files:              
    /phpdoc/en/reference/dio/functions  dio-close.xml dio-fcntl.xml 
                                        dio-open.xml dio-seek.xml 
                                        dio-tcsetattr.xml 
                                        dio-truncate.xml 
  Log:
  added notes about unavailable functions on windows, and added examples
  
http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-close.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/dio/functions/dio-close.xml
diff -u phpdoc/en/reference/dio/functions/dio-close.xml:1.4 
phpdoc/en/reference/dio/functions/dio-close.xml:1.5
--- phpdoc/en/reference/dio/functions/dio-close.xml:1.4 Thu Mar  4 12:49:47 2004
+++ phpdoc/en/reference/dio/functions/dio-close.xml     Tue Sep  7 17:36:21 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
   <refentry id="function.dio-close">
    <refnamediv>
@@ -18,6 +18,22 @@
     </para>
     <para>
      See also <function>dio_open</function>.
+    </para>
+    <para>
+     <example>
+     <title>
+      Closing an open file descriptor
+     </title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$fd = dio_open('/dev/ttyS0', O_RDWR);
+
+dio_close($fd);
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
    </refsect1>
   </refentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-fcntl.xml?r1=1.6&r2=1.7&ty=u
Index: phpdoc/en/reference/dio/functions/dio-fcntl.xml
diff -u phpdoc/en/reference/dio/functions/dio-fcntl.xml:1.6 
phpdoc/en/reference/dio/functions/dio-fcntl.xml:1.7
--- phpdoc/en/reference/dio/functions/dio-fcntl.xml:1.6 Thu Mar  4 12:49:47 2004
+++ phpdoc/en/reference/dio/functions/dio-fcntl.xml     Tue Sep  7 17:36:22 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
 <!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
   <refentry id="function.dio-fcntl">
    <refnamediv>
@@ -78,7 +78,7 @@
       <listitem>
        <para>
         F_DUPFD - finds the lowest numbered available file descriptor
-        greater or equal than <parameter>args</parameter> and returns
+        greater than or equal to <parameter>args</parameter> and returns
         them.
        </para>
       </listitem>
@@ -91,7 +91,30 @@
        </para>
       </listitem>
      </itemizedlist>
+      <example>
+      <title>
+       Setting and clearing a lock
+      </title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+
+$fd = dio_open('/dev/ttyS0', O_RDWR);
+
+if (dio_fcntl($fd, F_SETLK) == -1) {
+   // the file descriptor appears locked
+   echo "The lock can not be cleared. It is held by someone else.";
+} else {
+   echo "Lock succesfully set/cleared";
+}
+
+dio_close($fd);
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
+    &note.no-windows;
    </refsect1>
   </refentry>
 
http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-open.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/dio/functions/dio-open.xml
diff -u phpdoc/en/reference/dio/functions/dio-open.xml:1.5 
phpdoc/en/reference/dio/functions/dio-open.xml:1.6
--- phpdoc/en/reference/dio/functions/dio-open.xml:1.5  Thu Mar  4 12:49:47 2004
+++ phpdoc/en/reference/dio/functions/dio-open.xml      Tue Sep  7 17:36:22 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
   <refentry id="function.dio-open">
    <refnamediv>
@@ -73,6 +73,21 @@
     <para>
      See also: <function>dio_close</function>.
     </para>
+    <example>
+     <title>
+      Setting the baud rate on a serial port
+     </title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+
+$fd = dio_open('/dev/ttyS0', O_RDWR | O_NOCTTY | O_NONBLOCK);
+
+dio_close($fd);
+?>
+]]>
+     </programlisting>
+    </example>    
    </refsect1>
   </refentry>
 
http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-seek.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/dio/functions/dio-seek.xml
diff -u phpdoc/en/reference/dio/functions/dio-seek.xml:1.4 
phpdoc/en/reference/dio/functions/dio-seek.xml:1.5
--- phpdoc/en/reference/dio/functions/dio-seek.xml:1.4  Thu Aug 12 14:11:57 2004
+++ phpdoc/en/reference/dio/functions/dio-seek.xml      Tue Sep  7 17:36:22 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
   <refentry id="function.dio-seek">
    <refnamediv>
@@ -46,6 +46,35 @@
        </para>
       </listitem>
      </itemizedlist>
+      <example>
+      <title>
+       Setting the baud rate on a serial port
+      </title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+
+$fd = dio_open('/dev/ttyS0', O_RDWR);
+
+dio_seek($fd, SEEK_SET, 10);
+// position is now at 10 characters from the start of the file
+
+dio_seek($fd, SEEK_CUR, -2);
+// position is now at 8 characters from the start of the file
+
+dio_seek($fd, SEEK_END, 5);
+// position is now at 5 characters from the end of the file
+
+dio_seek($fd, SEEK_END, -10);
+// position if now at 10 characters past the end of the file. 
+// The 10 characters between the end of the file and the current
+// position are filled with zeros.
+
+dio_close($fd);
+?>
+]]>
+      </programlisting>
+     </example>     
     </para>
    </refsect1>
   </refentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-tcsetattr.xml?r1=1.7&r2=1.8&ty=u
Index: phpdoc/en/reference/dio/functions/dio-tcsetattr.xml
diff -u phpdoc/en/reference/dio/functions/dio-tcsetattr.xml:1.7 
phpdoc/en/reference/dio/functions/dio-tcsetattr.xml:1.8
--- phpdoc/en/reference/dio/functions/dio-tcsetattr.xml:1.7     Thu Mar  4 12:49:47 
2004
+++ phpdoc/en/reference/dio/functions/dio-tcsetattr.xml Tue Sep  7 17:36:22 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
 <!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
   <refentry id="function.dio-tcsetattr">
    <refnamediv>
@@ -75,6 +75,7 @@
       </programlisting>
      </example>
     </para>
+    &note.no-windows;
    </refsect1>
   </refentry>
 
http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-truncate.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/dio/functions/dio-truncate.xml
diff -u phpdoc/en/reference/dio/functions/dio-truncate.xml:1.3 
phpdoc/en/reference/dio/functions/dio-truncate.xml:1.4
--- phpdoc/en/reference/dio/functions/dio-truncate.xml:1.3      Sun Jun 29 12:59:53 
2003
+++ phpdoc/en/reference/dio/functions/dio-truncate.xml  Tue Sep  7 17:36:22 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -->
   <refentry id="function.dio-truncate">
    <refnamediv>
@@ -24,6 +24,7 @@
      file is left unchanged or is extended. In the latter case the
      extended part reads as zero bytes. &return.success;.
     </para>
+    &note.no-windows;
    </refsect1>
   </refentry>
 

Reply via email to