FLTK logo

[fltk.coredev] Fl_Preferences path oddity (needs check)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Fl_Preferences path oddity (needs check) Albrecht Schlosser Feb 26, 2021  
 
[Opening a new thread with a new subject]

On 2/26/21 10:16 AM Manolo wrote in thread "Doxygen oddity under Msys\mingw (possibly others!)"

On Thursday, February 25, 2021 at 7:43:10 PM UTC+1 Albrecht Schlosser wrote:

   Hmm, but looking at the docs, this seems to be strange:

   Fl_Preferences::Fl_Preferences(
   const char * path,
   const char * vendor,
   const char * application
   )
   ...

   "The file name is generated in the form
   $(path)/$(application).prefs." [...]

   The argument 'vendor' is not mentioned in the docs (file name).

   This looks wrong but I can't check this now.

That is strange indeed but not wrong, in the sense that it matches what is in the source code.

The path of the file reached by this Fl_Preferences constructor is defined
at line #938 of src/Fl_Preferences.cxx :
     snprintf(filename, sizeof(filename), "%s/%s.prefs", path, application);
This statement is in a member function which receives path, vendor and application
parameters, but the "vendor" parameter is not used to build the filename.

Okay, thanks for your research.

This should be checked then:

- is it "correct" (*intended* to be) w/o vendor?
- backwards compatibility with 1.3 ?
- other constructors and paths ?

If it turns out to be wrong and someone has a quick fix, I'd be glad to read about it here and/or see a commit.

Otherwise we could open a GitHub issue so this will not be forgotten.

Sorry, I'm too busy with other stuff to pursue this myself but didn't want it to get lost in the noise...

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/45921460-18c2-8106-bfe5-17c2177f9a7f%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.