"Use"d settings: application behaviour

This forum is for general developer support questions.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: "Use"d settings: application behaviour

Post by broadblues »

xenic wrote: That's another reason why programs shouldn't be saving their prefs in the ENVARC: directory. You can't use GetENV to retrieve multi-line prefs (try getenv ContextMenus.cfg) because you only get the top line. Programs that are saving multi-line prefs in ENVARC: and reading those prefs upon program startup are doing so by direct manipulation. I only directly manipulated variables to prove that most of the ENVARC: data is being copied to ENV: when the system boots (Somewhat confirmed by Colin).
From the autodoc of IDOS->GetVar()
This function stops putting characters into the destination buffer
when a '\n' or '\r' is encountered, unless GVF_BINARY_VAR is specified.
(The '\n' or '\r' is not stored in the buffer.)
Thus is you specify GVF_BINARY_VAR | GVF_GLOBAL_ONLY when accessing your prefs file it will be read in completely

Programs *do not* call GetENV a command line tool, but GetVar() a DOS function.
Post Reply