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


Groups > comp.lang.c > #9973

Re: My latest magnum opus!

Message-ID <4E66A076.3575@mindspring.com> (permalink)
Date 2011-09-06 18:36 -0400
From pete <pfiland@mindspring.com>
Organization PF
Newsgroups comp.lang.c
Subject Re: My latest magnum opus!
References <4E60142A.575D@mindspring.com> <0b156eba-fe6d-4e08-984a-be93ce4a7fc0@n12g2000yqh.googlegroups.com>

Show all headers | View raw


ImpalerCore wrote:
> 
> On Sep 1, 7:24 pm, pete <pfil...@mindspring.com> wrote:
> > /* BEGIN block_swap_test.c */
> > /*
> > ** block_swap swaps two contiguous subobjects.
> > ** (base) is the address of the lower addressed subobject.
> > ** (lo_size) is the size of the lower addressed subobject.
> > ** (hi_size) is the size of the higher addressed subobject.
> > ** If either (lo_size) or (hi_size) or both
> > ** compare equal to zero, then no swapping takes place.
> > */
> > #include <stdio.h>
> >
> > #define STRING  "0123456789A"
> >
> > void block_swap(void *base, size_t lo_size, size_t hi_size);
> 
> Can someone explain in what context one would use this function?  I
> can't quite figure out where I would use such a function in a
> practical setting.  Maybe some kind of bit blit operation?
> 
> I haven't read Programming Pearls, so maybe Jon Bentley gave some
> background.

I was thinking of using it in a 
stable, in place, version of mergesort.

-- 
pete

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


Thread

My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-01 19:24 -0400
  Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-01 21:13 -0400
    Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-01 22:29 -0400
      Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-01 22:58 -0400
        Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-02 00:41 -0400
    Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-02 00:53 -0400
    Re: My latest magnum opus! cri@tiac.net (Richard Harter) - 2011-09-02 05:39 +0000
      Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-02 02:59 -0400
      Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-02 08:21 -0400
        Re: My latest magnum opus! cri@tiac.net (Richard Harter) - 2011-09-02 13:39 +0000
          Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-02 20:53 -0400
            Re: My latest magnum opus! James Dow Allen <jdallen2000@yahoo.com> - 2011-09-03 03:18 -0700
            Re: My latest magnum opus! cri@tiac.net (Richard Harter) - 2011-09-03 17:16 +0000
    Re: My latest magnum opus! Andrey Tarasevich <andreytarasevich@hotmail.com> - 2011-09-02 09:21 -0700
  Re: My latest magnum opus! ImpalerCore <jadill33@gmail.com> - 2011-09-06 06:51 -0700
    Re: My latest magnum opus! pete <pfiland@mindspring.com> - 2011-09-06 18:36 -0400
    Re: My latest magnum opus! Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-06 21:04 -0400

csiph-web