Sockets programming -- Connection refused
Giorgos Keramidas
keramida at ceid.upatras.gr
Mon Aug 7 18:26:45 EEST 2000
On Mon, Aug 07, 2000 at 12:13:20AM +0300, Alexandros Andreou wrote:
> > An thes na xrisimopoiiseis ena stream descriptor gia to stdin, xrisimopoiise aplws to
> > stdin.
>
> Nai, apla nomiza pws to stdin einai define gia to file descriptor ths stdin,
> oxi ena FILE * .
Den einai to idio mallon sto linux sou, afou ego tora pou grafo eimai
se freebsd, alla sinithos gia na lunontai tetoies apories, arkei na
koitakseis ta headers sou, kai tha deis pragmata opws:
hades.charon:/usr/include# grep stdin stdio.h
#define stdin (&__sF[0])
#define getchar() getc(stdin)
#define getchar_unlocked() getc_unlocked(stdin)
kai meta psaxneis na breis ti einai to __sF[0], kai blepeis kati san:
hades.root:/usr/include# grep __sF stdio.h
extern FILE __sF[];
#define stdin (&__sF[0])
#define stdout (&__sF[1])
#define stderr (&__sF[2])
opote fainetai kathara oti to __sF[] einai enas pinakas apo (FILE)
antikeimena, kai to stdin einai ena define pou einai ena (FILE *) to
opoio exei san timh tin dieu8unsi tou __sF[0]. Ara to `stdin' einai
apla enas (FILE *) pointer se ena (FILE), pou tuxainei na deixnei sto
FILE antikeimeno tou file descriptor [0].
Telika to na exeis to source gia olo to susthma, fainetai na einai
arketa kalo, etsi?
--
Giorgos Keramidas, <keramida at ceid.upatras.gr>
For my public pgp2 key: finger -r keramida at diogenis.ceid.upatras.gr
--
linux-greek-users mailing list -- http://lists.hellug.gr
More information about the Linux-greek-users
mailing list