Menu

#586 Environment variable set by VALUE BIF not seen by syssearchpath() - Windows

v3.9.5
closed-fixed
5
2024-05-13
2023-05-25
fpefpe
No

Under Windows Regina sets the environment variable by calling the Win32 function SetEnvironmentVariable() and reads the environment variable using GetEnvironmentVariable().

regutil uses getenv() which doesn't see a change to an environment variable using SetEnvironmentVariable().

Discussion

  • Mark Hessling

    Mark Hessling - 2023-05-25
    • summary: environment variable --> Environment variable set by VALUE BIF not seen by syssearchpath() - Windows
    • status: open --> pending
    • assigned_to: Mark Hessling
     
  • fpefpe

    fpefpe - 2023-05-25

    grep search of the .c files for "getenv(" shows

    regfilesys.c: rpath = getenv(pathname);
    regini.c: strcpy(result->strptr, getenv("USERPROFILE") );
    regini.c: strcpy(result->strptr, getenv("HOME"));
    regscreenux.c: tgetent(tcent, getenv("TERM"));
    regscreenux.c: char * mycolumns = getenv("COLUMNS"), * mylines = getenv("LINES");

     
  • Mark Hessling

    Mark Hessling - 2023-05-25

    Good point. They probably all need to be changed in case any of those are set by VALUE BIF.

     
  • Mark Hessling

    Mark Hessling - 2023-05-25

    Changes made to other functions that call getenv() as noted above; except regscreenux.c, which is Unix only.

     
  • Mark Hessling

    Mark Hessling - 2024-05-13
    • Status: pending --> closed-fixed
     

Log in to post a comment.