HP3000-L Archives

October 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bob Walker <[log in to unmask]>
Reply To:
Date:
Thu, 2 Oct 1997 15:33:56 PST8PDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
Thanks to:   Ross Scroggs <[log in to unmask]> and
          Jeff Woods <[log in to unmask]>
for setting me straight about getenv on 5.5.

I'll call this a non-obvious example of RTFM.

> From:          Ross Scroggs <[log in to unmask]>
> This is exactly the behavior that you should expect. getenv(3C) states
> that the pointer returned points to a static area that can be
> overwritten by subsequent calls. After each call, copy the string to another array.

Well, it's not quite the behaviour I expect.  I expect getenv to work
the way I've been using it in DOS, unix and MPE for years.   You're
right, though,  this is what the 'Posix.1 Standard Programmer's
Guide' says and the fault of missing this is in the communicator is
all mine.

I don't want to get into a rant about standards, but I liked the old
(pre 5.5) standard for getenv better.  We've got a bit a work to do
to fix this.

BTW. I have a modified version of JTMAIL if anyone needs it.
Bob.




--=--=--
Bob Walker, Computer Centre  --  [log in to unmask]
Capilano College, North Vancouver, BC, CANADA.
------

ATOM RSS1 RSS2