[fpc-pascal]winsock telnet proxy question #1

Marco van de Voort marcov at stack.nl
Wed Mar 13 07:34:56 CET 2002


> after that, i had to figure out what the C bcopy() command did and reverse
> engineer it.  i don't think freepascal has one of those.  or maybe it
> does... can anybody tranlsate this line into freepascal for me?  all the
> type-casting got me lost in fp.
> 
>   bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr,
> server->h_length);

bcopy is afaik simply move, just with pointers as arguments, since C has
no open arrays as params.
 
> note: server->h_addr is ^pchar and serv_addr.sin_addr.s_addr is u_long.

Afaik it is simply:

move (server.h_addr,serv_addr.sin_addr.s_addr,server.length);





More information about the fpc-pascal mailing list