[Coco] OS-9 environment variables?

Tim Fadden t.fadden at cox.net
Wed Apr 15 19:25:15 EDT 2009


Allen Huffman wrote:
> On Apr 15, 2009, at 11:39 AM, Roger Taylor wrote:
>> Is the data guaranteed to be there after hitting Reset?
>
> No. It would be like environment variables on DOS, etc. where they are 
> just named values you can set and read between programs.
>
> However, due to implementing it in a DATA MODULE on OS-9, there would 
> be the capability to write them to disk, and restore on the next boot.
>
> RESET causes the system to reload, yes?
>
> GENE:
>> Tell me, is this going to be easier that having a file on disk (or in 
>> myram,
>> copied there by the startup script) along with a cron job to check & 
>> see if
>
> I was not planning any such thing. The user would be responsible for 
> saving data if it was important to them. What operating systems 
> provide environment variables that are maintained between reboots? I 
> have not worked with any that did that, so I didn't even know that was 
> an option.
>
> TIM:
>> Don't most OS's keep the environment variables in a file?  like 
>> .profoile, .csh, .login .logout etc?
>
> Not that I know of. THose are read-only configuration files, read at 
> startup (like autoexec.bat) or shell start or login. Different creatures.
>
Ya, configuration file that define the ENVIRONMENT VARIABLES. ALL 
variables are initially read from a file on any os, and then either 
used, or become part of the shell environment. Once the initial read 
takes place, they can be manipulated in memory, and apply for that shell 
only.  What variables are you talking about? Just what I described is 
exactly what Willard explained below.


> WILLARD:
>> getenv() and setenv() in the cgfx library read/write "environment
>> variables" from /dd/sys/env.file
>
> Willard shoots and scores! I did not know CGFX had those calls, though 
> during my CoCO days, I have never heard of getenv() and setenv().  
> INTERESTING!
>
> Is that the stock Tandy version of CGFX, or the third party one?
>
I went through the Tandy one, and setenv() and getenv() are not there, 
but they have to be written into the multivue program to some extent.  
It does read the /dd/sys/env.file when it starts. I'm not sure whether 
the changes made are written back to the env.file.  Will have to test that.


>             -- Allen
>
>
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>




More information about the Coco mailing list