Actually, I just realized I misspoke. This is a POSIX standard, NOT an
ANSI/ISO C standard. ANSI/ISO C actually says nothing about path
separators. The POSIX standard separator is a forward slash though.
Windows, and DOS, have actually supported the forward slash as file
path separators since the very early days of DOS (as well as the
backslash. Many DOS shell utilities required a backslash, but the
forward slash could be used in programming).

So basically, the way you are doing it should work on any unix type
system (including OS X), as well as Windows since Windows and DOS have
supported forward slashes as path separators since very early days.

Sorry for the earlier misstatement.


On Wed, 22 Apr 2009 19:35:03 -0400
Nordwolf <[email protected]> wrote:

> A quick look through the FLTK source code suggests that this
> is just passed to the RootNode constructor as is, and that the
> RootNode constructor just calls fopen to create or read the file. The
> ANSI/ISO C standard allows forward slashes for the path delimiter in
> file names no matter what the underlying platform uses. So the way
> you are doing it will work on any ANSI/ISO compliant C/C++ compiler.
> 
> Hope that answers your question.
> 
> 
> On Wed, 22 Apr 2009 15:52:09 -0700
> Nicholas Shea <[email protected]> wrote:
> 
> > My application uses a Data folder that resides in the same directory
> > as the app. The paths to my pref files are like this:
> > 
> > Data                   <-- Directory
> >   Preferences          <-- Directory
> >      App.pref          <-- Pref file
> >      Colors.pref       <-- Pref file
> >      ...                   etc
> > 
> > 
> > I then get the App prefs like this:
> > 
> > Fl_Preferences app( "./Data/Preferences/", "nsheaATtiscali.co.uk",
> > "App" );
> > 
> > 
> > This is the third version of the Fl_Preferences constructor as
> > listed in the documentation. Previously, I used a custom vendor
> > folder and instructed users to install this in the same location as
> > Fltk prefs. That of course works fine; but I would like to make
> > things easy so that users can just double-click the program and
> > run. If I use a custom Root for my prefs as I have done, will it
> > work on Windows also? I use Linux and cross-compile for Win32 but
> > can only test under Wine; and Wine _seems_ to be ignoring the
> > difference between an Unix path and a Win32 path.
> > 
> > Thanks
> > 
> > Nicholas Shea
> > _______________________________________________
> > fltk mailing list
> > [email protected]
> > http://lists.easysw.com/mailman/listinfo/fltk
> > 
> 
> _______________________________________________
> fltk mailing list
> [email protected]
> http://lists.easysw.com/mailman/listinfo/fltk
> 

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

Reply via email to