Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #43747

Re: cpy functions

From Ike Naar <ike@iceland.freeshell.org>
Newsgroups comp.lang.c
Subject Re: cpy functions
Date 2014-04-28 21:48 +0000
Organization A noiseless patient Spider
Message-ID <slrn3vfslltj59.nuv.ike@iceland.freeshell.org> (permalink)
References <ljmdfj$su4$1@dont-email.me> <p4ftl9p41bj9nktk2b71lqfgbeuq2jseg0@4ax.com> <ljmfuf$fkm$1@dont-email.me>

Show all headers | View raw


On 2014-04-28, Bill Cunningham <nospam@nspam.invalid> wrote:
>
> "Geoff" <geoff@invalid.invalid> wrote in message 
> news:p4ftl9p41bj9nktk2b71lqfgbeuq2jseg0@4ax.com...
>
> [...]
>
>> memcpy is somewhat more safe. Memcpy doesn't manipulate C strings,
>> only bytes, it knows nothing of zero termination it copies without
>> judgement of the content it's copying. It takes three arguments, a
>> destination, a source and a length. As long as length is <= the size
>> of destination the copy will only copy the number of bytes that
>> destination is expected to hold. Of course, you can still create
>> problems for yourself if the source and destinations overlap or if you
>> use a length greater than the destination.
>
> char *a="String one";
> char *b="String two";
>
> memcpy(a,b,sizeof(a+b));
>
> Is that a "strcpy" like representation? Atleast to an extent.

* Bill Cunningham: An important member (holding the rank of inspector) of an unspecified, quite
  possibly fictional secret service force (possibly based upon the British Secret Intelligence
  Service). His most prominent bodily feature is his half-bald head. He meets the children upon
  their very first adventure and makes regular appearances in the series from that point on. Mostly
  the children get tangled up in adventures which are connected with Bill's work at the time and end
  up solving them for him.
  Following the events in The Ship of Adventure, Bill marries Mrs Mannering and adopts all the
  children as his own. Upon first encountering the children, he used the alias "Bill Smugs" - a name
  which appeared again in The Mountain of Adventure.

https://en.wikipedia.org/wiki/Adventure_Series

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 16:25 -0400
  Re: cpy functions John Gordon <gordon@panix.com> - 2014-04-28 20:42 +0000
    Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 16:54 -0400
      Re: cpy functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-28 22:22 +0100
        Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 17:26 -0400
      Re: cpy functions Richard <rgrdev_@gmail.com> - 2014-04-29 00:19 +0200
  Re: cpy functions Andrew Smallshaw <andrews@sdf.lonestar.org> - 2014-04-28 20:44 +0000
    Re: cpy functions Keith Thompson <kst-u@mib.org> - 2014-04-28 14:44 -0700
  Re: cpy functions Geoff <geoff@invalid.invalid> - 2014-04-28 13:55 -0700
    Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 17:07 -0400
      Re: cpy functions Geoff <geoff@invalid.invalid> - 2014-04-28 14:13 -0700
        Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 17:22 -0400
          Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 17:32 -0400
          Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 18:17 -0400
            Re: cpy functions jacob navia <jacob@spamsink.net> - 2014-04-29 00:43 +0200
              Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 19:31 -0400
                Re: cpy functions Ian Collins <ian-news@hotmail.com> - 2014-04-29 11:33 +1200
            Re: cpy functions Richard <rgrdev_@gmail.com> - 2014-04-29 02:27 +0200
          Re: cpy functions Barry Schwarz <schwarzb@dqel.com> - 2014-04-28 15:53 -0700
            Re: cpy functions "Bill Cunningham" <nosapm@nspam.invalid> - 2014-04-29 17:27 -0400
        Re: cpy functions Kaz Kylheku <kaz@kylheku.com> - 2014-04-28 21:55 +0000
          Re: cpy functions jacob navia <jacob@spamsink.net> - 2014-04-29 00:40 +0200
        Re: cpy functions Richard <rgrdev_@gmail.com> - 2014-04-29 00:20 +0200
      Re: cpy functions Ike Naar <ike@iceland.freeshell.org> - 2014-04-28 21:48 +0000
      Re: cpy functions Richard <rgrdev_@gmail.com> - 2014-04-29 00:20 +0200
      Re: cpy functions Barry Schwarz <schwarzb@dqel.com> - 2014-04-28 15:49 -0700
        Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 19:33 -0400
    Re: cpy functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-28 22:13 +0100
  Re: cpy functions Keith Thompson <kst-u@mib.org> - 2014-04-28 14:19 -0700
    Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 17:34 -0400
    Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 17:44 -0400
      Re: cpy functions Barry Schwarz <schwarzb@dqel.com> - 2014-04-28 15:55 -0700
        Re: cpy functions Kaz Kylheku <kaz@kylheku.com> - 2014-04-28 23:19 +0000
          Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 19:24 -0400
            Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 19:26 -0400
              Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 20:07 -0400
          Re: cpy functions "Bill Cunningham" <nosapm@nspam.invalid> - 2014-04-29 17:30 -0400
  Re: cpy functions Barry Schwarz <schwarzb@dqel.com> - 2014-04-28 15:43 -0700
    Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 19:17 -0400
      Re: cpy functions "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-28 19:35 -0400
  Re: cpy functions Michael Angelo Ravera <maravera@prodigy.net> - 2014-04-29 03:07 -0700
    Re: cpy functions Richard <rgrdev_@gmail.com> - 2014-04-29 12:59 +0200
      Re: cpy functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-29 13:58 +0100

csiph-web