DEVELOP > C > [1/2OT] a buggy TCP client program
| Topic: |
DEVELOP > C |
| User: |
"RoS" |
| Date: |
18 Dec 2007 02:20:53 AM |
| Object: |
[1/2OT] a buggy TCP client program |
in windows xp
the problem is that if i have a tcp sever istalled in the port 1000 in
my computer, and "cli.exe" is the C program "client program" below and
type
cli 127.1.1.1 1000
connect of client fail with "WSAECONNREFUSED 10061"
don't understand why
there is someone expert in this there?
what is the answer?
then there is someone can point out some C program for the use api
"ReadFile" with an handle return by api "socket"?
thank you
----------------------------------------------------
#include <WINSOCK2.H>
#include <stdio.h>
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
int sockSta=0;
int openSock_m(void)
{
WORD wVersionRequested;
WSADATA wsaData;
int err;
if(sockSta==1) R 1;
wVersionRequested = MAKEWORD( 1, 1 );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 )
{P("Tell the user that we couldn't find a usable"
"WinSock DLL.");
return 0;
}
/* Confirm that the WinSock DLL supports 1.1 */
/* Note that if the DLL supports versions greater */
/* than 1.1 in addition to 1.1, it will still return */
/* 1.1 in wVersion since that is the version we */
/* requested. */
if ( LOBYTE( wsaData.wVersion ) != 1 ||
HIBYTE( wsaData.wVersion ) != 1 )
{
P( "Tell the user that we couldn't find a usable"
"WinSock DLL., LB=%u HB=%u\n", (unsigned)LOBYTE(
wsaData.wVersion ) ,
(unsigned) HIBYTE( wsaData.wVersion ) );
WSACleanup( );
return 0;
}
sockSta=1;
return 1;
}
/* a[0] c=1, a[1] c=2, a[2] c=3*/
int main(int c, char** a)
{int i, clilen, m;
char *v;
uns porta;
SOCKET r, sc;
HANDLE hf;
char buf[4048];
uns long nu;
struct sockaddr_in cli_addr, srv_addr;
if(c!=3||a[1]==0||a[2]==0)
{l0:;
P("Questo programma si connette a un server\n");
P("Uso: > thisprogram indirizzo NumeroPorta\n");
P("Con numero porta <=%u\n", 0xFFFF);
R 0;
}
if( sscanf(a[1], "%u", &porta)!=1 ) G l0;
if(porta>0xFFFF) G l0;
if(openSock_m()==0)
{P("Errore di apertura socket\n"); R 0;}
if( (r=socket(AF_INET, SOCK_STREAM, 0))!=INVALID_SOCKET)
{F(i=0, v=(char*)&srv_addr; i<sizeof(struct sockaddr_in); ++i)
v[i]=0;
srv_addr.sin_family = AF_INET;
if( (nu=inet_addr(a[1]))==INADDR_NONE)
{P("Errore di inet_addr\n"); G l12;}
srv_addr.sin_addr.s_addr = nu;
srv_addr.sin_port=htons(porta);
m=0;
c0:;
if(connect(r, (sockaddr*) &srv_addr, sizeof(srv_addr)))
{P("Errore di connect\n");
P("Numero errore=%d [WSAECONNREFUSED 10061]\n",
WSAGetLastError());
if(m==0){++m; G c0;}
G l12;
}
if( fgets(buf, 2048, stdin) == 0)
{P("Errore di fgets\n"); G l1;}
nu=strlen(buf);
nu=sendto(sc, buf, nu+1, 0, 0, 0);
P("Bytes mandati %u bytes\n", nu);
P("Mandato: [%s]\n", buf);
}
else {P("Errore di apertura socket\n"); G l2;}
l1:;
if( shutdown (r,SD_BOTH)) P("Errore di shutdown\n");
l12:;
if( closesocket ( r ) )
P("Errore di closesocket\n");
l2:;
if(WSACleanup( )==0) P("Tutto ok socket chiuso\n");
else P("Socket non chiuso\n");
R 0;
}
.
|
|
| User: "RoS" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 02:59:39 AM |
|
|
In data Tue, 18 Dec 2007 09:20:53 +0100, RoS scrisse:
in windows xp
then there is someone can point out some C program for the use api
"ReadFile" with an handle return by api "socket"?
thank you
i find some error it seems run well now
----------------------------------------------------
#include <WINSOCK2.H>
#include <stdio.h>
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
int sockSta=0;
int openSock_m(void)
{
WORD wVersionRequested;
WSADATA wsaData;
int err;
if(sockSta==1) R 1;
wVersionRequested = MAKEWORD( 1, 1 );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 )
{P("Tell the user that we couldn't find a usable"
"WinSock DLL.");
return 0;
}
/* Confirm that the WinSock DLL supports 1.1 */
/* Note that if the DLL supports versions greater */
/* than 1.1 in addition to 1.1, it will still return */
/* 1.1 in wVersion since that is the version we */
/* requested. */
if ( LOBYTE( wsaData.wVersion ) != 1 ||
HIBYTE( wsaData.wVersion ) != 1 )
{
P( "Tell the user that we couldn't find a usable"
"WinSock DLL., LB=%u HB=%u\n", (unsigned)LOBYTE(
wsaData.wVersion ) ,
(unsigned) HIBYTE( wsaData.wVersion ) );
WSACleanup( );
return 0;
}
sockSta=1;
return 1;
}
/* a[0] c=1, a[1] c=2, a[2] c=3*/
int main(int c, char** a)
{int i, clilen, m;
char *v;
uns porta;
SOCKET r, sc;
HANDLE hf;
char buf[4048];
uns long nu;
struct sockaddr_in cli_addr, srv_addr;
if(c!=3||a[1]==0||a[2]==0)
{l0:;
P("Questo programma si connette a un server\n");
P("Uso: > thisprogram indirizzo NumeroPorta\n");
P("Con numero porta <=%u\n", 0xFFFF);
R 0;
}
if( sscanf(a[1], "%u", &porta)!=1 ) G l0;
^^^^^
this should be a[2]
if(porta>0xFFFF) G l0;
if(openSock_m()==0)
{P("Errore di apertura socket\n"); R 0;}
if( (r=socket(AF_INET, SOCK_STREAM, 0))!=INVALID_SOCKET)
{F(i=0, v=(char*)&srv_addr; i<sizeof(struct sockaddr_in); ++i)
v[i]=0;
srv_addr.sin_family = AF_INET;
if( (nu=inet_addr(a[1]))==INADDR_NONE)
{P("Errore di inet_addr\n"); G l12;}
srv_addr.sin_addr.s_addr = nu;
srv_addr.sin_port=htons(porta);
m=0;
c0:;
if(connect(r, (sockaddr*) &srv_addr, sizeof(srv_addr)))
{P("Errore di connect\n");
P("Numero errore=%d [WSAECONNREFUSED 10061]\n",
WSAGetLastError());
if(m==0){++m; G c0;}
G l12;
}
if( fgets(buf, 2048, stdin) == 0)
{P("Errore di fgets\n"); G l1;}
nu=strlen(buf);
nu=sendto(sc, buf, nu+1, 0, 0, 0);
^^^
this should be "r"
P("Bytes mandati %u bytes\n", nu);
P("Mandato: [%s]\n", buf);
}
else {P("Errore di apertura socket\n"); G l2;}
l1:;
if( shutdown (r,SD_BOTH)) P("Errore di shutdown\n");
l12:;
if( closesocket ( r ) )
P("Errore di closesocket\n");
l2:;
if(WSACleanup( )==0) P("Tutto ok socket chiuso\n");
else P("Socket non chiuso\n");
R 0;
}
.
|
|
|
| User: "RoS" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 03:29:35 AM |
|
|
In data Tue, 18 Dec 2007 09:59:39 +0100, RoS scrisse:
In data Tue, 18 Dec 2007 09:20:53 +0100, RoS scrisse:
in windows xp
then there is someone can point out some C program for the use api
"ReadFile" with an handle return by api "socket"?
or "WriteFile" and socket like below;
why the client WriteFile write it, but the server not read it?
thank you
#include <WINSOCK2.H>
#include <stdio.h>
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
int sockSta=0;
int openSock_m(void)
{
WORD wVersionRequested;
WSADATA wsaData;
int err;
if(sockSta==1) R 1;
wVersionRequested = MAKEWORD( 1, 1 );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 )
{P("Tell the user that we couldn't find a usable"
"WinSock DLL.");
return 0;
}
/* Confirm that the WinSock DLL supports 1.1 */
/* Note that if the DLL supports versions greater */
/* than 1.1 in addition to 1.1, it will still return */
/* 1.1 in wVersion since that is the version we */
/* requested. */
if ( LOBYTE( wsaData.wVersion ) != 1 ||
HIBYTE( wsaData.wVersion ) != 1 )
{
P( "Tell the user that we couldn't find a usable"
"WinSock DLL., LB=%u HB=%u\n", (unsigned)LOBYTE(
wsaData.wVersion ) ,
(unsigned) HIBYTE( wsaData.wVersion ) );
WSACleanup( );
return 0;
}
sockSta=1;
return 1;
}
/* a[0] c=1, a[1] c=2, a[2] c=3*/
int main(int c, char** a)
{int i, clilen, m;
char *v;
uns porta;
SOCKET r, sc;
HANDLE hf;
char buf[4048];
uns long bs, nu;
struct sockaddr_in cli_addr, srv_addr;
if(c!=3||a[1]==0||a[2]==0)
{l0:;
P("Questo programma si connette a un server\n");
P("Uso: > thisprogram indirizzo NumeroPorta\n");
P("Con numero porta <=%u\n", 0xFFFF);
R 0;
}
if( sscanf(a[2], "%u", &porta)!=1 ) G l0;
if(porta>0xFFFF) G l0;
if(openSock_m()==0)
{P("Errore di apertura socket\n"); R 0;}
if( (r=socket(AF_INET, SOCK_STREAM, 0))!=INVALID_SOCKET)
{F(i=0, v=(char*)&srv_addr; i<sizeof(struct sockaddr_in); ++i)
v[i]=0;
srv_addr.sin_family = AF_INET;
if( (nu=inet_addr(a[1]))==INADDR_NONE)
{P("Errore di inet_addr\n"); G l12;}
srv_addr.sin_addr.s_addr = nu;
srv_addr.sin_port=htons(porta);
m=0;
c0:;
if(connect(r, (sockaddr*) &srv_addr, sizeof(srv_addr)))
{P("Errore di connect\n");
P("Numero errore=%d [WSAECONNREFUSED 10061]\n",
WSAGetLastError());
if(m==0){++m; G c0;}
G l12;
}
if( fgets(buf, 2048, stdin) == 0)
{P("Errore di fgets\n"); G l1;}
nu=strlen(buf); bs=0;
// nu=sendto(r, buf, nu+1, 0, 0, 0);
if(WriteFile( (void*)r, buf, nu+1, &bs, 0)==0)
P("Errore di write\n");
else P("Ok send %u\n", (uns) bs);
P("Bytes mandati %u bytes\n", (uns) nu);
P("Mandato: [%s]\n", buf);
}
else {P("Errore di apertura socket\n"); G l2;}
l1:;
if( shutdown (r,SD_BOTH)) P("Errore di shutdown\n");
l12:;
if( closesocket ( r ) )
P("Errore di closesocket\n");
l2:;
if(WSACleanup( )==0) P("Tutto ok socket chiuso\n");
else P("Socket non chiuso\n");
R 0;
}
.
|
|
|
| User: "RoS" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 03:56:30 AM |
|
|
In data Tue, 18 Dec 2007 10:29:35 +0100, RoS scrisse:
In data Tue, 18 Dec 2007 09:59:39 +0100, RoS scrisse:
In data Tue, 18 Dec 2007 09:20:53 +0100, RoS scrisse:
in windows xp
then there is someone can point out some C program for the use api
"ReadFile" with an handle return by api "socket"?
or "WriteFile" and socket like below;
why the client WriteFile write it, but the server not read it?
error
why the client do not write with WriteFile() to the handle returned by
socket()?
(and return error code?)
.
|
|
|
|
|
|
| User: "jaysome" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 02:05:37 AM |
|
|
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
in windows xp
the problem is that if i have a tcp sever istalled in the port 1000 in
my computer, and "cli.exe" is the C program "client program" below and
type
cli 127.1.1.1 1000
connect of client fail with "WSAECONNREFUSED 10061"
don't understand why
there is someone expert in this there?
what is the answer?
then there is someone can point out some C program for the use api
"ReadFile" with an handle return by api "socket"?
thank you
----------------------------------------------------
#include <WINSOCK2.H>
#include <stdio.h>
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
Only 1 out of 5 of these headers are standard C headers. The rest are
specific to Microsoft Windows. This newsgroup is about discussing
topics related to Standard C, and has nothing to do with
Windows-specific or any other OS-specific matters.
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
These #defines are absolutely horrendous, to an exponential degree.
Think about it--anyone who reads your code and sees a use of these
#defines will immediately have to go back to these #defines to see
what they mean.
You, in your own mind, may have memorized that "P" means "printf" and
"F" means "for", but can you really expect that the readers of your
code can be trained to memorize these like you? I know I can't--and
won't.
And what was it that you think you really accomplished with these
#defines? These types of things belong in an obfuscation code contest,
not in real-world code.
[rest snipped because off-topicality]
--
jay
.
|
|
|
| User: "Keith Thompson" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 02:36:26 AM |
|
|
jaysome <jaysome@hotmail.com> writes:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
[...]
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
These #defines are absolutely horrendous, to an exponential degree.
Indeed.
RoS has been posting for *years*, under various names, using these
horrendous macros. All attempts to get him to stop have been futile.
I recommend killfiling him, or at least not bothering to respond.
(Expect to have to update your killfile next time he changes the name
under which he posts; he's also posted as "RoSsIaCrIiLoIA" and
"av <av@ala.a>", among other aliases.)
--
Keith Thompson (The_Other_Keith) <kst-u@mib.org>
Looking for software development work in the San Diego area.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
|
|
|
| User: "Johannes Bauer" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 03:54:00 AM |
|
|
Keith Thompson schrieb:
RoS has been posting for *years*, under various names, using these
horrendous macros. All attempts to get him to stop have been futile.
I recommend killfiling him, or at least not bothering to respond.
(Expect to have to update your killfile next time he changes the name
under which he posts; he's also posted as "RoSsIaCrIiLoIA" and
"av <av@ala.a>", among other aliases.)
His style reminds me *so* much of Jeff Relf from c.o.l.a. He used to
post the source code of his self-written "newsreder" called X.EXE. It
was written in C++, but only because his compiler didn't understand C99
back then (// comments, variable declarations inside scope).
Still makes me feel a little sick in the stomach, thinking about that
code. It was *way* more horrible than the above one, as he also
introduced some "loop" (L) defines which would open half a scope
(another define would then close that scope back again). Terrible.
Greetings,
Johannes
--
"Viele der Theorien der Mathematiker sind falsch und klar
Gotteslästerlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden." -- Prophet und Visionär Hans Joss aka
HJP in de.sci.mathematik <4740ad67$0$3811$5402220f@news.sunrise.ch>
.
|
|
|
|
|
| User: "santosh" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 02:26:51 AM |
|
|
jaysome wrote:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
<snip>
It's futile correcting this guy. He does what he wants, when he wants.
He is a troll.
.
|
|
|
| User: "Richard Heathfield" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 02:32:01 AM |
|
|
santosh said:
jaysome wrote:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
<snip>
It's futile correcting this guy. He does what he wants, when he wants.
He is a troll.
What he is learning from these corrections is that his obfuscatory
strategem is counter-productive - he is not getting the help he seeks
because people can't be bothered to decode his source.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
|
|
|
| User: "Flash Gordon" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 03:00:13 PM |
|
|
Richard Heathfield wrote, On 19/12/07 08:32:
santosh said:
jaysome wrote:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
<snip>
It's futile correcting this guy. He does what he wants, when he wants.
He is a troll.
What he is learning from these corrections is that his obfuscatory
strategem is counter-productive - he is not getting the help he seeks
because people can't be bothered to decode his source.
He would learn it just as well if no one responded to him.
--
Flash Gordon
.
|
|
|
|
| User: "pete" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 08:40:48 AM |
|
|
Richard Heathfield wrote:
santosh said:
jaysome wrote:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
<snip>
It's futile correcting this guy.
He does what he wants, when he wants.
He is a troll.
What he is learning from these corrections is that his obfuscatory
strategem is counter-productive - he is not getting the help he seeks
because people can't be bothered to decode his source.
I don't think that someone who has learned nothing
after four years of exposure to correction on one single point,
can be accurately described as "learning".
--
pete
.
|
|
|
| User: "RoS" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 11:15:25 AM |
|
|
In data Wed, 19 Dec 2007 09:40:48 -0500, pete scrisse:
Richard Heathfield wrote:
santosh said:
jaysome wrote:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <Ros@not.exist> wrote:
<snip>
It's futile correcting this guy.
He does what he wants, when he wants.
He is a troll.
What he is learning from these corrections is that his obfuscatory
strategem is counter-productive - he is not getting the help he seeks
because people can't be bothered to decode his source.
I don't think that someone who has learned nothing
after four years of exposure to correction on one single point,
can be accurately described as "learning".
i have lerned enought all you seems not
.
|
|
|
| User: "Ed Prochak" |
|
| Title: Re: a buggy TCP client program |
19 Dec 2007 11:59:50 AM |
|
|
On Dec 19, 12:15 pm, RoS <R...@not.exist> wrote:
In data Wed, 19 Dec 2007 09:40:48 -0500, pete scrisse:
Richard Heathfield wrote:
santosh said:
jaysome wrote:
On Tue, 18 Dec 2007 09:20:53 +0100, RoS <R...@not.exist> wrote:
<snip>
It's futile correcting this guy.
He does what he wants, when he wants.
He is a troll.
What he is learning from these corrections is that his obfuscatory
strategem is counter-productive - he is not getting the help he seeks
because people can't be bothered to decode his source.
I don't think that someone who has learned nothing
after four years of exposure to correction on one single point,
can be accurately described as "learning".
i have lerned enought all you seems not
Funny that if you learned so much, why are you the one asking for
help?
Ed
.
|
|
|
|
|
|
| User: "Tor Rustad" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 04:43:36 PM |
|
|
Richard Heathfield wrote:
santosh said:
jaysome wrote:
It's futile correcting this guy. He does what he wants, when he wants.
He is a troll.
What he is learning from these corrections is that his obfuscatory
strategem is counter-productive
If x is time, and y axis measure C knowledge of OP, my approximation of
f(x), is a linear function where
f'(x) = 0
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z>
.
|
|
|
|
|
|
|
| User: "Boudewijn Dijkstra" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 02:41:33 AM |
|
|
Op Tue, 18 Dec 2007 09:20:53 +0100 schreef RoS <Ros@not.exist>:
in windows xp
the problem is that if i have a tcp sever istalled in the port 1000 in
my computer, and "cli.exe" is the C program "client program" below and
type
cli 127.1.1.1 1000
connect of client fail with "WSAECONNREFUSED 10061"
don't understand why
This problem has nothing to do with C, but I'll give you a hint: where is
host 127.1.1.1?
--
Gemaakt met Opera's revolutionaire e-mailprogramma:
http://www.opera.com/mail/
.
|
|
|
|
| User: "Richard Heathfield" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 03:10:11 AM |
|
|
RoS said:
<snip>
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code, take a few classes on how to
write code legibly. When you deliberately make the code harder to read
than it should be, you deter many people from wasting their time reading
it.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
|
|
|
| User: "Kenny McCormack" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 08:22:12 PM |
|
|
In article <vJ-dnemfScM2EPranZ2dnUVZ8sbinZ2d@bt.com>,
Richard Heathfield <rjh@see.sig.invalid> wrote:
RoS said:
<snip>
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code, take a few classes on how to
write code legibly. When you deliberately make the code harder to read
than it should be, you deter many people from wasting their time reading
it.
I believe there is a flaw in your logic. If it is indeed a waste of
time to read his code (and I think you are right that it is), then he is
doing you a service by using these silly defines, since it makes it
easier for you to ignore the post. I.e., it deters you from wasting
your time, which is doing you a favor.
.
|
|
|
|
| User: "pete" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 07:24:31 AM |
|
|
Richard Heathfield wrote:
RoS said:
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code,
take a few classes on how to write code legibly.
When you deliberately make the code harder to read than it should be,
you deter many people from wasting their time reading it.
It's been over four years of these horrible macros here.
--
pete
"I have to tell you just how bad your style is.
I was going to respond to one of Joona's posts
and say that I thought that he was going a little overboard,
because I don't like to read posters complaining about
other posters, but that would just be me complaining
about him complaining about you, and that's even worse.
The fact is that your post literally made me grimace and cringe.
When I see your name on a post, I know that those macros are
going to be there. I hope that they're not, but then when I open
the post and there they are, time after time, it crushes all hope,
and then Joona gets upset ;) " - pete 4 June 2003
.
|
|
|
| User: "RoS" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 12:05:20 PM |
|
|
In data Tue, 18 Dec 2007 08:24:31 -0500, pete scrisse:
Richard Heathfield wrote:
RoS said:
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code,
take a few classes on how to write code legibly.
When you deliberately make the code harder to read than it should be,
you deter many people from wasting their time reading it.
It's been over four years of these horrible macros here.
i'm not the kind of person that someone say "Buttati a mare"
and him "si butta"
it is better make errors with my own mind than with other ones
.
|
|
|
|
| User: "santosh" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 07:39:16 AM |
|
|
pete wrote:
Richard Heathfield wrote:
RoS said:
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code,
take a few classes on how to write code legibly.
When you deliberately make the code harder to read than it should be,
you deter many people from wasting their time reading it.
It's been over four years of these horrible macros here.
You should consider c.l.c to have been spared from his worst
productions. Take a look at his "homemade" x86 assembler syntax that he
posts to alt.lang.asm occasionally. It makes his "code contributions"
to c.l.c look positively literate. :-)
.
|
|
|
| User: "CBFalconer" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 06:12:13 PM |
|
|
santosh wrote:
pete wrote:
Richard Heathfield wrote:
RoS said:
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code, take a few classes
on how to write code legibly. When you deliberately make the
code harder to read than it should be, you deter many people
from wasting their time reading it.
It's been over four years of these horrible macros here.
You should consider c.l.c to have been spared from his worst
productions. Take a look at his "homemade" x86 assembler syntax
that he posts to alt.lang.asm occasionally. It makes his "code
contributions" to c.l.c look positively literate. :-)
I have only seen his abortions a couple of times in about five
years (barring quoters). This may be connected with the immediate
inclusion of his revised names in my PLONK file on first detection.
--
Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com
.
|
|
|
|
|
| User: "Tor Rustad" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
18 Dec 2007 05:11:25 PM |
|
|
pete wrote:
Richard Heathfield wrote:
RoS said:
#define P printf
#define R return
#define F for
#define G goto
#define uns unsigned
Before you go anywhere near networking code,
take a few classes on how to write code legibly.
When you deliberately make the code harder to read than it should be,
you deter many people from wasting their time reading it.
It's been over four years of these horrible macros here.
Hmm.. it's time to add another entry in the kill-file then, unlike some
others that use GC, I don't.
Once in, it's no way out...
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z>
.
|
|
|
| User: "" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 01:22:54 PM |
|
|
In article <Ys-dncbmkrIAzvXaRVnzvQA@telenor.com>,
Tor Rustad <tor_rustad@hotmail.com> wrote:
pete wrote:
Richard Heathfield wrote:
When you deliberately make the code harder to read than it should be,
you deter many people from wasting their time reading it.
It's been over four years of these horrible macros here.
Hmm.. it's time to add another entry in the kill-file then, unlike some
others that use GC, I don't.
Once in, it's no way out...
I have a whole section for the OP in my killfile; it looks like it's
time to add another line to it.
dave
(I do occasionally clean out my killfile, but known repeat offenders stay in)
.
|
|
|
| User: "Richard" |
|
| Title: Re: [1/2OT] a buggy TCP client program |
19 Dec 2007 04:28:21 PM |
|
|
dj3vande@csclub.uwaterloo.ca.invalid writes:
In article <Ys-dncbmkrIAzvXaRVnzvQA@telenor.com>,
Tor Rustad <tor_rustad@hotmail.com> wrote:
pete wrote:
Richard Heathfield wrote:
When you deliberately make the code harder to read than it should be,
you deter many people from wasting their time reading it.
It's been over four years of these horrible macros here.
Hmm.. it's time to add another entry in the kill-file then, unlike some
others that use GC, I don't.
Once in, it's no way out...
I have a whole section for the OP in my killfile; it looks like it's
time to add another line to it.
dave
(I do occasionally clean out my killfile, but known repeat offenders
stay in)
Nobody gives a damn who or what you killfile or for how long. Your
killfile usage is OT.
.
|
|
|
|
|
|
|
|

|
Related Articles |
|
|