comp.lang.ada
 help / color / mirror / Atom feed
* C->Ada: Converting char* to unsigned long
@ 1996-05-16  0:00 Chris Jones
  1996-05-16  0:00 ` Pascal Ledru
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Jones @ 1996-05-16  0:00 UTC (permalink / raw)
  Cc: cbj1329


How can I convert the following to ada:

  bcopy( (char*)pHost_Info->h_addr, 
	 (char*)&Serv_Addr.sin_addr, 
	 pHost_Info->h_length );
  
where:

-- pHost_Info->h_addr is a char* to a string with length h_length,
-- Serv_Addr.sin_addr is an unsigned long

I have tried Unchecked_Conversion, but it does not work for the 
unconstrained type Interfaces.C.Char_Array.

A function which does a straight byte copy without regard to type
would be helpful, I guess...

thanks in advance.
chris jones.

cbj1329@is2.nyu.edu




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-05-16  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-16  0:00 C->Ada: Converting char* to unsigned long Chris Jones
1996-05-16  0:00 ` Pascal Ledru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox