comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: differences between Ada and C in gnat forcing me to use C instead of Ada
Date: Mon, 25 Mar 2019 19:01:30 +0100
Date: 2019-03-25T19:01:30+01:00	[thread overview]
Message-ID: <q7b51p$1gp3$1@gioia.aioe.org> (raw)
In-Reply-To: q7b0l8$vm1$1@dont-email.me

On 2019-03-25 17:46, Jeffrey R. Carter wrote:
> On 3/25/19 3:20 PM, Dmitry A. Kazakov wrote:
>> On 2019-03-25 15:09, matthewbrentmccarty@gmail.com wrote:
>>
>>>        devices :  aliased  Device_Array (1..5);
>>>        Status := sane_sane_h.sane_get_devices (devices(1)'Address, 
>>> sane_sane_h.SANE_Bool(SANE_TRUE));
>>
>> How the callee should know the length of the output array?
> 
> The same strcpy does.

strcpy knows nothing about the output. That is why strncpy to be used 
instead.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2019-03-25 18:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25  5:46 differences between Ada and C in gnat forcing me to use C instead of Ada matthewbrentmccarty
2019-03-25  5:58 ` Jere
2019-03-25  8:25 ` Dmitry A. Kazakov
2019-03-25 14:06   ` Florian Weimer
2019-03-25 10:56 ` Philip Munts
2019-03-25 11:54 ` Lucretia
2019-03-25 14:09 ` matthewbrentmccarty
2019-03-25 14:20   ` Dmitry A. Kazakov
2019-03-25 16:46     ` Jeffrey R. Carter
2019-03-25 18:01       ` Dmitry A. Kazakov [this message]
2019-03-25 17:38   ` Niklas Holsti
2019-03-25 16:42 ` matthewbrentmccarty
2019-03-25 18:18   ` Dmitry A. Kazakov
2019-04-04  0:51     ` matthewbrentmccarty
replies disabled

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