Author: manolo
Date: 2012-10-19 04:40:56 -0700 (Fri, 19 Oct 2012)
New Revision: 9705
Log:
Documented the fltk3::open() utility function.

Modified:
   branches/branch-3.0/documentation/src/osissues.dox
   branches/branch-3.0/include/fltk3/NativeFileChooser.h
   branches/branch-3.0/include/fltk3/filename.h
   branches/branch-3.0/src/fltk3/FileChooser2.cxx
   branches/branch-3.0/src/fltk3/utf8.cxx

Modified: branches/branch-3.0/documentation/src/osissues.dox
===================================================================
--- branches/branch-3.0/documentation/src/osissues.dox  2012-10-19 11:23:51 UTC 
(rev 9704)
+++ branches/branch-3.0/documentation/src/osissues.dox  2012-10-19 11:40:56 UTC 
(rev 9705)
@@ -475,9 +475,9 @@
 
 \subsection non_ascii_filenames Using filenames with non-ASCII characters
 
-In FLTK, all strings, including filenames, are UTF-8 encoded. The utility 
function
-fltk3::fopen() allows to open files potentially having non-ASCII names in a 
-cross-platform fashion, whereas the standard fopen function fails to do so.
+In FLTK, all strings, including filenames, are UTF-8 encoded. The utility 
functions
+fltk3::fopen() and fltk3::open() allow to open files potentially having 
non-ASCII names in a 
+cross-platform fashion, whereas the standard fopen/open functions fail to do 
so.
 
 \subsection osissues_win32_messages Handling Other WIN32 Messages
 

Modified: branches/branch-3.0/include/fltk3/NativeFileChooser.h
===================================================================
--- branches/branch-3.0/include/fltk3/NativeFileChooser.h       2012-10-19 
11:23:51 UTC (rev 9704)
+++ branches/branch-3.0/include/fltk3/NativeFileChooser.h       2012-10-19 
11:40:56 UTC (rev 9705)
@@ -94,9 +94,9 @@
    \endcode
    
    The fltk3::NativeFileChooser widget transmits UTF-8 encoded filenames to 
its user. It is
-   recommended to open files that may have non-ASCII names with the 
fltk3::fopen() utility 
-   function that handles these names in a cross-platform way (whereas the 
standard 
-   fopen function fails on the MSWindows platform to open files with a 
non-ASCII name).
+   recommended to open files that may have non-ASCII names with the 
fltk3::fopen() or fltk3::open()  
+   utility functions that handle these names in a cross-platform way (whereas 
the standard 
+   fopen/open functions fail on the MSWindows platform to open files with a 
non-ASCII name).
    
    <B>Platform Specific Caveats</B>
    

Modified: branches/branch-3.0/include/fltk3/filename.h
===================================================================
--- branches/branch-3.0/include/fltk3/filename.h        2012-10-19 11:23:51 UTC 
(rev 9704)
+++ branches/branch-3.0/include/fltk3/filename.h        2012-10-19 11:40:56 UTC 
(rev 9705)
@@ -24,6 +24,9 @@
  *
  *     http://www.fltk.org/str.php
  */
+/** \file
+ File names and URI utility functions.
+ */
 
 /* Xcode on OS X includes files by recursing down into directories.
  * This code catches the cycle and directly includes the required file.

Modified: branches/branch-3.0/src/fltk3/FileChooser2.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/FileChooser2.cxx      2012-10-19 11:23:51 UTC 
(rev 9704)
+++ branches/branch-3.0/src/fltk3/FileChooser2.cxx      2012-10-19 11:40:56 UTC 
(rev 9705)
@@ -37,9 +37,9 @@
   \image latex  fltk3::FileChooser.jpg "fltk3::FileChooser" width=12cm
 
  The fltk3::FileChooser widget transmits UTF-8 encoded filenames to its user. 
It is
- recommended to open files that may have non-ASCII names with the 
fltk3::fopen() utility 
- function that handles these names in a cross-platform way (whereas the 
standard 
- fopen function fails on the MSWindows platform to open files with a non-ASCII 
name).
+ recommended to open files that may have non-ASCII names with the 
fltk3::fopen() or fltk3::open()
+ utility functions that handle these names in a cross-platform way (whereas 
the standard 
+ fopen/open functions fail on the MSWindows platform to open files with a 
non-ASCII name).
  
   The fltk3::FileChooser class also exports several static values
   that may be used to localize or customize the appearance of all file chooser

Modified: branches/branch-3.0/src/fltk3/utf8.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/utf8.cxx      2012-10-19 11:23:51 UTC (rev 
9704)
+++ branches/branch-3.0/src/fltk3/utf8.cxx      2012-10-19 11:40:56 UTC (rev 
9705)
@@ -569,6 +569,15 @@
 #endif
 }
 
+/** Cross-platform function to open files with a UTF-8 encoded name.
+ 
+ This function is especially useful under the MSWindows platform where the 
+ standard open() function fails with UTF-8 encoded non-ASCII filenames.
+ \param f  the UTF-8 encoded filename
+ \param oflags  other arguments are as in the standard open() function
+ \return  a file descriptor upon successful completion, or -1 in case of error.
+ \sa fltk3::fopen().
+ */
 int fltk3::open(const char* f, int oflags, ...)
 {
   va_list ap;
@@ -604,6 +613,7 @@
  \param f  the UTF-8 encoded filename
  \param mode  same as the second argument of the standard fopen function
  \return  a FILE pointer upon successful completion, or NULL in case of error.
+ \sa fltk3::open().
  */
 FILE *fltk3::fopen(const char* f, const char *mode)
 {

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to