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


Groups > comp.lang.c > #17459

Re: copying files

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: copying files
Date 2012-02-16 09:56 -0800
Organization None to speak of
Message-ID <lnzkcifyrj.fsf@nuthaus.mib.org> (permalink)
References <f62ccd5a-1cf4-4585-b8ca-c515a53d8a73@w9g2000vbv.googlegroups.com> <a256ce89-862b-42a8-8fe5-f6c1c2c83941@k1g2000yqk.googlegroups.com> <82b51791-f8ad-47a1-a4fc-cdc73fc7e2f4@t30g2000vbx.googlegroups.com>

Show all headers | View raw


Hans Vlems <hvlems@freenet.de> writes:
[...]
> Malcolm,
> thanks for the example. Copying the input file one byte per read
> (getch) operation may not be the fastest way,

(getc, fgetc, or getchar, not getch)

Don't assume that copying a byte at a time will be slow.  stdio does its
own buffering internally; most calls to getc will just read a byte from
a memory buffer.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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


Thread

copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 01:03 -0800
  Re: copying files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-16 01:23 -0800
    Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 01:31 -0800
      Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 03:14 -0800
        Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 09:43 -0800
          Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 14:59 -0800
            Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 15:06 -0800
    Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 03:13 -0800
      Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 09:56 -0800
        Re: copying files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-16 10:11 -0800
          Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 15:11 -0800
            Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 15:21 -0800
              Re: copying files Philip Lantz <prl@canterey.us> - 2012-02-17 09:53 -0800
                Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-18 07:22 -0800
            Re: copying files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-17 03:36 -0800
              Re: copying files Willem <willem@toad.stack.nl> - 2012-02-17 22:04 +0000
                Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-18 07:28 -0800
                Re: copying files Willem <willem@toad.stack.nl> - 2012-02-18 21:28 +0000
              Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-18 07:19 -0800
        Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 15:02 -0800
  Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 01:34 -0800
    Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 03:27 -0800
      Re: copying files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-02-16 17:11 +0000
        Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 14:57 -0800
      Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 09:54 -0800
    Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 06:41 -0800
  Re: copying files JohnF <john@please.see.sig.for.email.com> - 2012-02-16 09:49 +0000
    Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 03:10 -0800
      Re: copying files JohnF <john@please.see.sig.for.email.com> - 2012-02-16 11:52 +0000
        Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 06:56 -0800
          Re: copying files David Thompson <dave.thompson2@verizon.net> - 2012-02-24 04:43 -0500
        Re: copying files Ike Naar <ike@iceland.freeshell.org> - 2012-02-16 16:19 +0000
          Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 14:50 -0800
        Re: copying files David Thompson <dave.thompson2@verizon.net> - 2012-02-24 04:43 -0500
  Re: copying files Nobody <nobody@nowhere.com> - 2012-02-16 10:58 +0000
    Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 09:41 -0800
      Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 14:59 -0800
      Re: copying files Nobody <nobody@nowhere.com> - 2012-02-17 06:25 +0000
  Re: copying files Kleuske <kleuske@nowhere.net> - 2012-02-16 11:15 +0000
    Re: copying files Hans Vlems <hvlems@freenet.de> - 2012-02-16 06:45 -0800
    Re: copying files Keith Thompson <kst-u@mib.org> - 2012-02-16 09:49 -0800

csiph-web