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


Groups > comp.lang.c > #43758

Re: cpy functions

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!mit.eternal-september.org!.POSTED!not-for-mail
From Richard <rgrdev_@gmail.com>
Newsgroups comp.lang.c
Subject Re: cpy functions
Date Tue, 29 Apr 2014 00:20:02 +0200
Organization http://www.ieee.org/
Lines 32
Message-ID <87fvkx3xm5.fsf@gmail.com> (permalink)
References <ljmdfj$su4$1@dont-email.me> <p4ftl9p41bj9nktk2b71lqfgbeuq2jseg0@4ax.com> <ljmfuf$fkm$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mit.eternal-september.org; posting-host="07eb11d006e4bc5020972c87fef4388d"; logging-data="14278"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Qg0egljjZbsMX63wSquWRxF3lVLPQ6ys="
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:TEqS9Z+BkYJJTSeO+n+7bJ+wk4Y= sha1:KvtdRe0jdCOjKlyr2EGeObr939w=
Xref csiph.com comp.lang.c:43758

Show key headers only | View raw


"Bill Cunningham" <nospam@nspam.invalid> writes:

> "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.
>

LOL!

11/10


-- 
"Avoid hyperbole at all costs, its the most destructive argument on
the planet" - Mark McIntyre in comp.lang.c

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