decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
getenv | 314 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
getenv
Authored by: celtic_hackr on Sunday, May 06 2012 @ 03:21 PM EDT
Well that didn't take long.

C++ Standard Library API
* char getenv( const * char name)

Java System.out API
static string getenv (string name)

Looks like Java took the getenv straight from the C++ API, without attribution
or permission or anything.

The non-programmers amongst us may be confused by the "* char" versus
"string".

The first one being a "pointer to an address of a character array"
whereas a string does all that low level handling of things to make using and
accessing the "* char" easier and simpler. But they both do the same
thing, namely, save a string of characters to a certain location for reading and
writing.

While the "* char" and the "string" are not generally
interchangeable. Only one of these is interchangable in this case. and that one
is the "name" pointer/string. I could be wrong here, but I think Java
passes the address of variables to procedures by default. If so then they are
equivalent. Java, however, returns a "static string", which I'm not
sure but I'd wager a static string is actually an address and that fact is
hidden to make it appear to be a actual string [explanation below], and C++
returns an address which tells where to find the string.

This is something that most programmers, I think could agree, is
"substantially similar". The changing from address to content was a
trivial and insignificant change.

If I were of the bent to say APIs are copyrightable, I'd call this infringing as
a blatant attempt to hide plagarism.

Explanation note on "static string". A static string sounds to me to
be a persistent value variable. Meaning, it retains it's value in a
"permanant to the program" location. That means that if you create a
variable in a particular scope, and then leave that scope and come back the
value you last assigned it is retained. Not being a Java guy, Java may mean
something very different here.

One way to think about this is a room, with a deaf guy sitting in it. You open
the door and enter the room (enter the context of the room). In one case you say
5 and leave, in the other you give the man a flashcard with the number 5 on it.
Later you come back into the room. In one case you can't remember the number you
shouted out and the guy can't help you, as he didn't hear the number, in the
other he gives you the flashcard with the 5 on it. The flashcard case is the
static, or persistent case.

So if I'm correct on Java's meaning of static here. The two getenv APIs are
functionally equivalent: a function called getenv passing the address of a sting
called name and saving the result to the memory location of a character array.
Virtually identical functions in two different APIs. I don't think Oracle can
claim to have created this particular API, and they certainly have no right to
claim copyright on it. Clearly the C++ version predates it. Not invented here.

I'll now dig for a while before posting anymore.

Feel free to offer corrections to anything I said.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )