On 7.6.2012 5:05, Joe Ferraro wrote:
On Wed, Jun 6, 2012 at 7:13 PM, Sampsa Laine <sampsa at mac.com
<mailto:sampsa at mac.com>> wrote:
I've got a Windows NT 4.0 VM up occasionally too..
Sampsa
boy that gives me bad memories of long days ... perhaps you should've
gone for NT 3.50 while you were at it... I do have a Win 3.11 box
running... perhaps there's a decnet stack for it?!!?
There is a DECnet stack for DOS and Windows in the Pathworks V5 or V6 client kit. Those versions were meant to be used on Windows'es before Windows NT4. Then the Pathworks32 kit was released and that could be used on WNT4.0 and Windows 2000. Maybe on XP as well. Don't remember for sure.
On 2012-06-07 17:53, Marc Chametzky wrote:
Marc, are you sure ? It means that the assignment gets evaluated as a
boolean expression??
Yes... you've got "port == DPORT" with two equal signs. That's not an
assignment. That is going to evaluate to see whether it's true or false.
Since DPORT = 0 by default, then it's evaluating "port == 0" which is
true, thus its value is 1.
So, you've got a statement which is:
1;
Essentially, it's a no-op.
With DPORT = 0, it doesn't make any difference, save for a compiler
warning. If you were to set DPORT to some other number, though, the
assignment wouldn't take place as would otherwise be expected.
The assignment never took place, as it should have, since there was no assignment.
If you changed DPORT to something else, you'd just get a
if (port == 0) 0;
which is just as meaningless as the result of DPORT was set to 0, which gave
if (port == 0) 1;
Johnny
On 2012-06-07 17:50, hvlems at zonnet.nl wrote:
Marc, are you sure ? It means that the assignment gets evaluated as a boolean expression??
No, he's right.
The *original* code (not what I wrote further down), is (was):
if (port == 0) port == DPORT;
Johnny
-----Original Message-----
From: Marc Chametzky<marc at bluevine.net>
Sender: owner-hecnet at Update.UU.SE
Date: Thu, 07 Jun 2012 11:44:31
To:<hecnet at Update.UU.SE>
Reply-To: hecnet at Update.UU.SESubject: Re: [HECnet] New bridge.c feedback
1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able
to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
No, that's not what the compiler is seeing. Instead, it's seeing this:
if (port == 0) 1;
That's because you have "port == DPORT" (a conditional, not an
assignment statement).
which is pretty meaningless, and thus something to warn about. But how
should I change the code to avoid that? I could (of course) add a
check to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is
a pretty reasonable solution I think.
--Marc
On 2012-06-07 17:44, Marc Chametzky wrote:
1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able
to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
No, that's not what the compiler is seeing. Instead, it's seeing this:
if (port == 0) 1;
That's because you have "port == DPORT" (a conditional, not an
assignment statement).
Jeeeez. When the f* did that sneak in there??? I'm way too tired today (obviously). That was totally meaningless. (Maybe just my brain, knowing what it should say just managed to ignore that extra equal sign.)
Thanks for pointing out the obvious. Fixed now.
Johnny
Marc, are you sure ? It means that the assignment gets evaluated as a boolean expression??
Yes... you've got "port == DPORT" with two equal signs. That's not an assignment. That is going to evaluate to see whether it's true or false. Since DPORT = 0 by default, then it's evaluating "port == 0" which is true, thus its value is 1.
So, you've got a statement which is:
1;
Essentially, it's a no-op.
With DPORT = 0, it doesn't make any difference, save for a compiler warning. If you were to set DPORT to some other number, though, the assignment wouldn't take place as would otherwise be expected.
--Marc
Marc, are you sure ? It means that the assignment gets evaluated as a boolean expression??
-----Original Message-----
From: Marc Chametzky <marc at bluevine.net>
Sender: owner-hecnet at Update.UU.SE
Date: Thu, 07 Jun 2012 11:44:31
To: <hecnet at Update.UU.SE>
Reply-To: hecnet at Update.UU.SESubject: Re: [HECnet] New bridge.c feedback
1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able
to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
No, that's not what the compiler is seeing. Instead, it's seeing this:
if (port == 0) 1;
That's because you have "port == DPORT" (a conditional, not an
assignment statement).
which is pretty meaningless, and thus something to warn about. But how
should I change the code to avoid that? I could (of course) add a
check to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is
a pretty reasonable solution I think.
--Marc
Wouldn't an #ifndef DPORT statement solve that?
Hans
(And I'm an algol programmer, not very well versed in C magic ;-)
------Origineel bericht------
Van: Johnny Billquist
Afzender: owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden: hecnet at Update.UU.SE
Onderwerp: Re: [HECnet] New bridge.c feedback
Verzonden: 7 juni 2012 17:18
On 2012-06-07 16:32, Marc Chametzky wrote:
cc-1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Blech! Well, DPORT is by default set to 0. See the documentation of
the define in the sources... This one will stay.
I saw your second message about putting this in a conditional, but out
of curiosity, why wouldn't you want to fix it? You don't have an
assignment statement here, so if you do define DPORT, it won't take
effect the way you want with the code like this.
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able to
change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
which is pretty meaningless, and thus something to warn about. But how
should I change the code to avoid that? I could (of course) add a check
to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is a
pretty reasonable solution I think.
Johnny
1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
No, that's not what the compiler is seeing. Instead, it's seeing this:
if (port == 0) 1;
That's because you have "port == DPORT" (a conditional, not an assignment statement).
which is pretty meaningless, and thus something to warn about. But how should I change the code to avoid that? I could (of course) add a check to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is a pretty reasonable solution I think.
--Marc
On 2012-06-07 16:32, Marc Chametzky wrote:
cc-1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Blech! Well, DPORT is by default set to 0. See the documentation of
the define in the sources... This one will stay.
I saw your second message about putting this in a conditional, but out
of curiosity, why wouldn't you want to fix it? You don't have an
assignment statement here, so if you do define DPORT, it won't take
effect the way you want with the code like this.
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
which is pretty meaningless, and thus something to warn about. But how should I change the code to avoid that? I could (of course) add a check to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is a pretty reasonable solution I think.
Johnny
On 2012-06-07 16:15, Bob Armstrong wrote:
Johnny Billquist wrote:
Are you actually talking now about implementing a DECnet stack on a machine
in user mode?
That is definitely not doable.
Is that really true? I don't believe it. How about an Einstein style
"gedanken experiment" - put simh on a machine (which is an entirely user
mode program), load VMS on it. Bingo - a user mode implementation of a
DECnet stack.
I was meaning as in non-root. Sigh. I don't know how I managed to screw up terminology that way...
I don't mean this as a practical solution to DECnet on Linux, but it's
clearly possible to get all the Ethernet access you need to implement DECnet
in a user mode program.
N.B. "user mode" is not the same as "run as root". Promiscuous mode
requires root privilege, but that's still a user mode program.
Correct. For some reason I screwed up at that point.
Johnny