bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] TERM env var not getting set


From: Peter Teeson
Subject: Re: [Bug-apl] TERM env var not getting set
Date: Thu, 22 May 2014 15:18:32 -0400

Hi Jürgen:
Thanks - didn't know about Q or Q1.. they are defined in Common.hh right?

(const void *)(getenv("TERM")): '0' at main.cc:269
getenv("TERM"):      '(lldb)

(const void *)(getenv("TERM")): '0x100309215' at main.cc:278
getenv("TERM"):      'dumb' at main.cc:279

So you are correct - it's working but the debugger is not my friend.

respect

Peter
On 2014-05-22, at 9:55 AM, Juergen Sauermann <address@hidden> wrote:
Hi Peter,

interesting. Try

Q((const void *)(getenv("TERM")))
Q(getenv("TERM"))

(needs recompile) before:

bool log_startup = false;

I guess your debugger is fooling you.

/// Jürgen


On 05/21/2014 09:59 PM, Peter Teeson wrote:
Using Mac OS X 10.8 and the Apple Xcode 5.1.1 development IDE

The first few lines in main are:
int
main(int argc, const char * _argv[])
{
   {
     // make curses happy
     //
     const char * term = getenv("TERM");
     if (term == 0 || *term == 0)   setenv("TERM""dumb", 1);
   }

bool log_startup = false;

Normally I pass the environment variable TERM=xterm-256color when launching APL.
As a test I did not pass anything for TERM. (part of an anomaly I'm trying to debug)

So I set a breakpoint on the first statement.
The debugger, lldb, shows that the term var had been initialized to NULL.
After the call to getenv() the PC was positioned at the log_startup line.

IOW the if statement was skipped and so the setenv() never happened.

I remain confused.

respect…..

Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]