qsort man page

B

Barry Schwarz

Scalar or aggregate object? Huh? I'm not touching this one. This post isn't addressed to me anyway it might be best just to abandon this thread.

Thios is a Usenet discussion group. Posts are not addressed to individuals at all.

If you are willing to abandon the thread without ever demonstrating that you have understood the answers to your original question, in fact just the opposite, one has to wonder why you bothered to ask in the first place.
 
B

Bill Cunningham

Thios is a Usenet discussion group. Posts are not addressed to individuals at all.

If you are willing to abandon the thread without ever demonstrating that you have understood the answers to your original question, in fact just the opposite, one has to wonder why you bothered to ask in the first place.

I doubt that I could ever demonstrate to clc that I have the answers to the question even if I did. clc isn't exactly a learning group. Not enough patience. This is getting too technical. Doomed to failure. Thanks anyway.
 
B

Barry Schwarz

I doubt that I could ever demonstrate to clc that I have the answers to the question even if I did. clc isn't exactly a learning group. Not enough patience. This is getting too technical. Doomed to failure. Thanks anyway.

If you didn't want a technical answer, why are you posting to a newsgroup that deals with the technical aspects of the language?
 
T

Tim Rentsch

Ben Bacarisse said:
pete said:
I think that the way that the const keyword
is used in the return statement,
shows some confusion on the part of the author.

It causes the result of the dereference
in the strcmp function call, to be const qualified,
which is neither required nor consistent
with the parameters of strcmp
being pointers to const qualified types.

I am not so sure. The const that is there is a Good Const. Omitting it
might cause a warning (gcc will oblige) about "casting away" const. The
question as to whether there should be another:

*(const char *const *)p1

is not clear cut to me. The cast, as written, is a correct reflection
of the object being sorted, and there is some documentary merit in doing
that -- cast only to the type of the thing being sorted. [snip]

It is a correct reflection of the object being _compared_.
It is not a correct reflection of the object being _sorted_,
which must be writable so it can be moved within the larger
array.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,077
Messages
2,570,569
Members
47,206
Latest member
MalorieSte

Latest Threads

Top