HDTenEightyP/NetNews huggingface dataset:
From: daves@vtucs.cc.vt.edu (Dave Sisson)
Newsgroups: comp.lang.c
Subject: Here's some pointers for TV and TMenuItems
Keywords: TV, TMenuItem
Date: 30 Jul 92 22:45:08 GMT
Organization: Virginia Tech, Blacksburg, VA


    I (and later a co-worker) spent most of the afternoon trying to 
figure out why my menu code wouldn't compile.  After some heavy duty
looking into TMenuItem and TSubMenu (both which aren't in the help files)
we discovered that Borland forgot to include an operator to concatenate
TMenuItems.  Here's the short 4 lines of code that I hope they included
in 3.1:

menu.h
    TMenuItem& operator +(TMenuItem &i1, TMenuItem &i2);

menu.cpp
    TMenuItem& operator +(TMenuItem &i1, TMenuItem &i2)
    {
	i1.next = &i2;

	return i1;
    }

    Note:  you probably want to create your own menu.h and menu.cpp files
instead of modifying their code.

--
    Dave
Organization: Penn State University
Date: Wed, 22 Jul 1992 16:00:15 EDT
From: <GNR100@psuvm.psu.edu>
Newsgroups: comp.lang.c
Subject: While problem

   I'm having trouble with a whil loop in function I am writing to
read a line from a fileby puttingeach character into an array, accesed by
pionters, until the '\n' character is reached of EOF is reached.
  Trouble is, I keep getting an error message that the function needs an
Lvalue (address) inside the while loop.  Any ideas as to the problem?
The filename is a global variable, and that's why it isn't declared.

                gnr100@psuvm.psu.edu
------------------------Begin Code-------------------------------------------
char readline(char *string[])
{
  int i=0;

  while(((*string+i++=(char)getc(fname))!=EOF)
      &&((*string+i++=(char)getc(fname))!='\n'));
  return (*string+(i-1));
}
From: scotth@felix.filenet.com (Scott Hopson)
Newsgroups: comp.lang.c
Subject: Re: Finding date/time
Date: 25 Jul 92 01:00:45 GMT
Reply-To: scotth@fritz.filenet.com (Scott Hopson)
Organization: FileNet Corp., Costa Mesa, CA

In article <1992Jul22.150108.19427@news.uakron.edu> r3kls@vax1.cc.uakron.edu (Kevin L Sheller) writes:
>I'm using ANSI C on a UNIX Sun Station. I need to know how to access the
>current date and time in my program.
> 
> If you've gotta good idea, please e-mail me at: kevins@file02.ecgf.uakron.edu
> 

You might try reading the manual. Try "man -k time"

here's an example, hope it's what you want.


#include <time.h>

long t;	    
char *time_date;

 t = time(NULL);	/* gets time in seconds since 00:00:00 GMT 1970 */
 time_date = ctime(&t); /* converts time to a string with time & date */

 printf("%s",time_date);


Good Luck.....
-- 
Scott Hopson   (scotth@filenet.com)
Newsgroups: comp.lang.c
From: schectr@ucunix.san.uc.edu (ROBB SCHECTER)
Subject: URGENT HELP NEEDED:  crash upon redirection...
Organization: University of Cincinnati
Date: Mon, 27 Jul 92 04:11:34 GMT

Hello everyone; this homework is do Monday at Midnight, so if anyone
can offer an idea.

-The symptoms-
   * Program runs fine on PC (Quick-C in ANSI compatible mode).
   * Core dumps on UNIX gcc.
   * Program reads in from a 3-line file using scanf(), then getchar().
   * I NOTICED: If I just type in the file instead of redirecting input,
     -> it runs fine <-

-> I am too inexperienced with C on UNIX (and gcc) to know if I'm doing
   something obvious, or even where to look for errors.

   Thanks in advance for timely advice!!!   - Robb
-- 
---------------------------------------------------------------------------
Robb Shecter        University of Cincinnati      schectr@ucunix.san.uc.edu
                                                  ^^^^^^^
                 My university cannot spell my name...
Newsgroups: comp.lang.c
From: mjd@hal.gnu.ai.mit.edu (Sievan Janacziewski)
Subject: Re: Pointers outside of array boundary
Originator: mjd@hal.gnu.ai.mit.edu
Organization: MIT Laboratory for Computer Science
Date: Wed, 29 Jul 1992 14:10:17 GMT

mjs@hubcap.clemson.edu (M. J. Saltzman) writes:

>	float *x = malloc(10*sizeof(float));
>	--x;

>which is supposed to give an array whose elements are addressed
>as x[1]..x[10].
>My question is: Can anyone name an existing machine on which this code
>could fail, or give a really convincing hypothetical argument why it
>is a bad idea?  My interlocutor claims the criticism of this form is
>legalistic, and not based on practical considerations.

I was going to make up some thing about how maybe the array gets
allocated at the top of memory, but there's a much better reason not to
do this: C arrays always start at 0, never at 1, and by resorting to
cute compiler hacks to fudge up the appearance of a 1-based array, one
will only confuse oneself and other people who have to read,
understand, maintain, and modify the code.

If 0-based arrays are unclear to your correspondent, then he or she
should practice more, so that they become more familiar, rather than
resorting to obfuscation to cover his or her inadequacies as a programmer.

This has nothing to do with legalism. 
It is the most practical of all possible considerations.

Sievan Janacziewski
mjd@gnu.ai.mit.edu
Newsgroups: comp.lang.c
From: rolfb@blotto (Rolf Biesenbach)
Subject: Mixed Language Programming
Organization: Argonne National Laboratory, Argonne, Illinois
Date: Tue, 28 Jul 1992 21:18:10 GMT

	I'm trying to link up a user-interface module written in MS QBasic 4.5 with
	12 stepper motor control modules written in MS C 6.0.

	I'm having trouble linking these modules becuase of duplicate definition
	errors in mlibce.lib, brun45.lib, and cm.lib. (Yes, I did use some TC++3.1
	functions.) 

	If anyone has any suggestions on how to solve this problem, please reply.

	Thank you.


Newsgroups: comp.lang.c
From: s892856@kultarr.co.rmit.oz.AU (Michael Garry)
Subject: Urgent! C grammer for YACC needed
Summary: Urgent! C grammer for YACC needed!!
Organization: RMIT Computer Centre
Date: 30 Jul 92 03:58:55 GMT


eywords: YACC
    Hello, 
	We need an ANSI/K&R C grammer for the YACC parser generator.
	Could someone please send a file with the grammer to us.
	We are writing our own lexer, so we can define any tokens used in
	the grammer. 
	Note: we also have a message in comp.compilers

	See the autom joke in that message!!


	Thankyou
	Garry David
	Mont Park
	:w
From: halk@xkelco.UUCP (hal kellerman)
Newsgroups: comp.lang.c
Subject: Re: unsigned long to long without lossage (Help)
Date: Tue, 21 Jul 92 21:18:15 EDT
Organization: X-Kelco Enterprises, Inc., Forest Hills NY

torek@horse.ee.lbl.gov (Chris Torek) writes:

> In article <brself.711346221@hal> brself@hal.gnu.ai.mit.edu (Ben Self)
> asked how to convert an unsigned long to a long and back without changing
> the value.  He posted the same question separately (a Usenet no-no :-) )
> to comp.std.c, where Mark Brader has answered it quite thoroughly (in
> an article whose ID I forgot to note).
> 
> The short answer is that, absolutely strictly speaking, you cannot do
> it, because, e.g., in a 1's complement or sign-and-magnitude system the
> bit pattern that represents -0 can be transformed to the one that
> represents +0 any time during either of the two conversions.
> 
> In most cases, however, simple assignment will suffice.  In most of the
> remaining cases, a trick will prevent overflow or `-0 reduction'.
> Instead of:
> 
> 	msg.long_var = unsigned_long_value;
> and	unsigned_long_value = msg.long_var;
> 
> one can write
> 
> 	*(unsigned long *)&msg.long_var = unsigned_long_value;
> and	unsigned_long_value = *(unsigned long *)&msg.long_var;
> 
> The best `simple' fix is to alter the message structure so that it
> has a union of long and unsigned long, and then to use the proper
> member; this is strictly conformant.
> -- 
> In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
> Berkeley, CA		Domain:	torek@ee.lbl.gov

But most machines in use today are neither sign-magnitude nor 1's complemnet
but rather are 2's complement in which the representation of zero is unique
(i.e. there is no representation of -0). The much simpler explanation is 
that in a fixed size integer representation the ranges of allowable values
for signed and unsigned numbers are DIFFERENT. In typical 16 bit integer
omplementatios, for example, the maximum signed small int is 32,767 but
unssigned ints can have values exceeding that and therefore there is no
guaranteed way to convert back and forth between signed and unsigned
ints (small or long) without limiting the range of the unsigned ints.

halk@xkelco.UUCP
                                      -------
Newsgroups: comp.lang.c,comp.sys.ibm.pc.soundcard
From: wade@nb.rockwell.com (Wade Guthrie)
Subject: Re: SoundBlaster code, Developer's Kit
Organization: Rockwell International
Date: Mon, 27 Jul 1992 01:55:21 GMT


What ever happened to that group of guys that were going to develop Soundblaster code
and development stuff as a consortium?  I said "I'm interested", and that's the last I
heard?

Wade Guthrie
wade@nb.rockwell.com
From: jos@and.nl (Jos Horsmeier)
Newsgroups: comp.lang.c
Subject: Re: Concatenation of two macros?
Date: 23 Jul 92 15:58:11 GMT
Organization: AND Software BV Rotterdam

In article <1FE7B81211DF800725@ursula.lucas.lu.se> KOSU_MATSB@ROUTH.KOSUFY.LU.SE writes:
|
|	Concatenation of two macros. Is it possible?
|
|	If i have the following two definitions:
|		#define A pre
|		#define B post
|	And want to "#define C" to be  "prepost" BUT as an 
|	expression of A and B! How do i do it?
|	#define C (expression of A and B to yield prepost)

Most pre-ANSI C preprocessors allow you to do the following trick:

#define C(A, B) A/**/B

A conformant ANSI-C preprocessor inserts at least one white space
character when replacing the empty comment in the replacement list,
but they came up with the following (what I call `ugly') construct:

#define C(A, B) A ## B

The `##' operator `glues' the two operands together and the resulting
preprocessing token is available for replacement in the rescan phase
of the macro expansion.

kind regards,

Jos aka jos@and.nl

ps. I just call this thingy `ugly', because it doesnt' `look good'
    to me. The same counts for the trigraph characters. Yuck!
    Maybe I'm just too old ... dunno ... ;-)
From: am@Materna.DE (Achim Millinghaus)
Newsgroups: comp.lang.c
Subject: Source-Code for libm.a library
Date: 22 Jul 92 14:41:09 GMT

Hello !
I try to get the source-files for building a libm.a on my
computer. I'm using an Atari-Mega ST 2 and Minix.
But the C-Compiler has no libm.a...
Please send me your help.  

Achim Millinghaus
e-mail : am@materna.de
Tel.:    +49-231-5599244
or  :    +49-231-101031 
Newsgroups: comp.lang.c
From: alanm@cognos.com (Alan Myrvold)
Subject: Re: HELP
Organization: Cognos Incorporated, Ottawa CANADA
Date: Fri, 31 Jul 1992 16:35:58 GMT

In article <1992Jul30.154323.12491@cc.umontreal.ca> mikhail@ERE.UMontreal.CA (Mikhail Ossama) writes:
>Bonjour
>SVP le programme suivant ne marche pas ..
>je sais que vous etes occuper mais SVP essayer de m'aider ..
>Merci.

Comme ca, peut-etre?

#include <stdio.h>
#include <stdlib.h>

main(int argc, char *argv[])
{
   char *cmd_buffer;

   if (argc!=4) { 
      printf("Usage : ./link prog.f -o prog.exe \n");
      exit(0); 
   }

   /* allocate a large enough buffer */
   cmd_buffer = (char *) malloc(strlen(argv[1])+strlen(argv[3])+100);
   if (!cmd_buffer) {
      printf("Out of memory!\n");
      exit(0); 
   }
   
   /* construct the command */
   sprintf(cmd_buffer,
      "f77 %s -o %s -L/usagers/garcia/gqopt/lib -lgq5 -lthomas -p",
      argv[1],argv[3]);

   /* execute it */
   system(cmd_buffer);

   /* not necessary to free, since program terminates here, but a good habit */
   free(cmd_buffer);
}

---
Alan Myrvold          3755 Riverside Dr.    
Cognos Incorporated   P.O. Box 9707          alanm@cognos.com
(613) 738-1440 x3317  Ottawa, Ontario       
                      CANADA  K1G 3Z4       
Newsgroups: comp.lang.c
From: aaronk@county.lmt.mn.org (Aaron Kurland)
Subject: automatic prototyping?
Organization: LaserMaster R&D, Minneapolis, MN  USA
Date: Thu, 23 Jul 1992 21:13:59 GMT


Does anyone have a utility (C source is best) that scans a C file and outputs
a list of prototypes?

Thanks in advance and please respond to:

   toddl@county.lmt.mn.org

(not the address below or at the top of this post)
=============================================================================

-----------------------------------------------------------------------------
"Treasures to satiate desires both subtle and gross."
                                        - Spalding Gray

  My company has not yet accepted my application for Corporate Spokesmodel.

        Mail: aaronk@county.lmt.mn.org       Flames: alt.dev.nul
-----------------------------------------------------------------------------
Xref: sparky comp.lang.c:11626 comp.windows.ms:18008 comp.org.acm:663 comp.org.eff.talk:4851
From: karthik@cs.columbia.edu (Karthik P. Sheka)
Subject: linking gcc with CC
Organization: Columbia University Department of Computer Science
Date: Thu, 30 Jul 1992 18:17:38 GMT


Is it possible to link gcc created object files with CC created object
files?  I've tried doing so but it seems that the c functions cannot call
the c++ functions, even though the c++ functions are not in any class.
Sample code follows... (The error returned is Undefined symbol: routine2)

/*****C++ code*****/
#include <iostream.h>
extern "C"{
int routine1(void);
};

int main(void)
{
  cout << routine1();
}
static int routine2(void)
{
  return 2;
}


/*****C code*****/
extern int routine2();

int routine1(void)
{
  return(routine2());
}
Newsgroups: comp.lang.c
From: time@cix.compulink.co.uk (Tim Evans)
Subject: Spelling Checkers..                     
Cc: time@cix.compulink.co.uk
Reply-To: time@cix.compulink.co.uk
Date: Mon, 27 Jul 1992 23:37:42 +0000

Hi. 
 
I have been asked to write a spelling checker, I have get a list of word but 
i am looking for a fast/efficient/small method of codeing the word list, any 
suggestions or pointers to books/code samples would be most wellcome. 
 
time@cix.compulink.co.uk 

>>>MATRIX version  1.20d
From: sjs@gnv.ifas.ufl.edu (BORCO)
Newsgroups: comp.lang.c
Subject: Re: About the 'F' in RTFM
Date: 23 Jul 92 16:01:59 GMT

By the way, a nice RTFM "puzzle" appears in the June issue of Dr. Dobb's,
in the Swaine's Flames column.


----
Bitnet:     sjs@ifasgnv              "Precious and fish are the moments we
Internet:   sjs@gnv.ifas.ufl.edu      two can share."          -- Gollum
Newsgroups: comp.lang.c
From: steve@taumet.com (Steve Clamage)
Subject: Re: MUMPS programming language (history) 
Keywords: MUMPS M 
Organization: TauMetric Corporation
Date: Tue, 28 Jul 1992 15:21:24 GMT

gwh@elric.cs.mcgill.ca (Gene W. Homicki) writes:

>	MUMPS was first developed at the Laboratory of Computer Science at 
>the Massachusetts General Hospital in 1967.  MUMPS (_M_assachusettes  
>_G_eneral _H_ospital _U_tility _M_ulti-_P_rogramming _S_ystem) ...

Hmmm.  That would make it MGHUMPS.  One could (sort-of) pronounce it
"mugwumps", in memory of some 19th-century politicos, or "mughumps",
which is pretty undignified.  Of course, "mumps" isn't so dignified,
either.


>Not surprisingly, the MUMPS community voted to allow for the use of "M" 
>instead of MUMPS.

If future revisions of C are called D, E, etc, we will have to watch
out for a name collision.


Seriously, Gene, thanks for an interesting article about MUMPS.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Newsgroups: comp.lang.c
From: larrie@beaufort.sfu.ca (Larrie Simon Carr)
Subject: Turbo C Overlays and getchar problems.
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Thu, 23 Jul 1992 05:27:20 GMT


First problem was using getchar, getc, etc to read an ASCII 13.
Why does this character get ignored?  I can transfer the file
and the code to a Unix box and everything works fine.

The other question is which version of Turbo C did overlays
become possible.  The Turbo C 2.0 doesnt seem to handle it.

I am writing an application that I would like to have unload most
of its self (all but main() and the overlay handler) before 
spawning to another application.

-- 
Larrie Carr                 
Engineering Science               (604) 291-4451  
Simon Fraser University           (604) 298-1050
British Columbia, Canada          larrie@sfu.ca
Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.pascal
From: aa761@cleveland.Freenet.Edu (Patrick Murowsky)
Subject: The Programming SIG
Reply-To: aa761@cleveland.Freenet.Edu (Patrick Murowsky)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Fri, 31 Jul 92 15:43:57 GMT


Announcing the arrival of new programming language newsgroups.

freenet.sci.comp.prog.basic
freenet.sci.comp.prog.c
freenet.sci.comp.prog.pascal
freenet.sci.comp.prog.questions
freenet.sci.comp.prog.syntax
freenet.sci.comp.prog.var

The second newgroup covers all C langauges.
The latter group will expand to support more languages in the future.

Those who use the Cleveland FreeNet can access this SIG by typing "go pro"

Thanks!
-- 
% Patrick Murowsky `94 %%%%%%%%% "I don't like to lose."  -- James T. Kirk 
%% aa761@cleveland.Freenet.Edu % "Everything is impossible until it isn't." 
%%% SysOp of Programming SIG %%%                          -- Jean-Luc Picard
%%%% SysOp of Movies SIG %%%%%%% "A genetic weakness of the species..."  -- Q
Newsgroups: comp.lang.c
From: r3mjb@vax1.cc.uakron.edu (Michael J Brumbelow)
Subject: LRESULT & CALLBACK
Summary: Fustration to The MAX!
Organization: The University of Akron, Akron, Ohio
Date: Tue, 28 Jul 1992 04:34:19 GMT

For those Win_Guru's,

I am Making a normal windows application. All of a sudden I get this little
remark from the compiler:

Microsoft (R) Program Maintenance Utility   Version 1.11    
Copyright (c) Microsoft Corp 1988-90. All rights reserved.
	cl -AM -c -DWINVER=0x0300 -Gsw -I\WINDEV\INCLUDE -Ow -W3 -Zp Bog.c
Bog.c
Bog.c(9) : error C2054: expected '(' to follow 'LRESULT'
Bog.c(9) : error C2061: syntax error : identifier 'CALLBACK'
 
Here's what line nine looks like:

LRESULT CALLBACK MinWndProc (HWND, UINT, WPARAM, LPARAM);

I need help and I need it fast, like yesterday!

Sincerely,

Mike.




-- 
=+=+=+=+=++=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Michael J. Brumbelow    | r3mjb@vax1.cc.uakron.edu    | Ritchie & Thompson
     -->*<--            + gekko@joy.cs.uakron.edu     + got it right the first
The University of Akron | bs0519@ws03.ecgf.uakron.edu | time!
Newsgroups: comp.lang.c
From: wallmann@backus.pu.informatik.th-darmstadt.de (Natuerlich!)
Subject: Re: Summary: Macro with variable number of arguments
Date: Mon, 27 Jul 1992 19:36:01 GMT
Organization: MSD software vault #9 @THD
Keywords: macro arguments variable number summary

Here is a third solution, I -think- although I have never looked at it
that this method is used in WEB (some Knuth-product):

#include <stdio.h>

#define _ ,
#define OUT( x)  fprintf( stderr, x) 

main()
{
  OUT( "%c%c%c%c%c " _ 'H' _ 'a' _ 'l' _ 'l' _ 'o');
  OUT( "%c%c%c%c\n" _ 'W' _ 'e' _ 'l' _ 't');
}


Nat!
-- 
Email: wallmann@backus.pu.informatik.th-darmstadt.de
         "Bang that bit that doesn't bang"
Waiting for the time when chips are measured in color.
From: brian@brazil.psych.purdue.edu (Brian Berndt)
Newsgroups: comp.lang.c
Subject: popper - UC Berkeley Post Office Protocol Server, __res
Date: 22 Jul 92 19:24:54 GMT
Organization: Purdue University

I am trying to install popper (the UC Berkeley Post Office Protocol Server)
on our Sun 3/160 workstation running SunOS 4.1.1.  The make of the source 
files proceeded well until the script tried to combine all of the object 
files into the final executable.   At this point the system outputed the error:

ld: Undefined symbol 
   __res 

Does anyone know what this sysmbol might be, it is not defined in any of
the c source files.  An external structure, _res, is defined in one of the
files, but I can't find a reference to that either.  Has anyone set up
popper on their system?  Anyone seen this problem?

Brian Berndt
Psych System Admin, Purdue University
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: Hungarian notation
Date: Fri, 24 Jul 1992 12:14:58 GMT
Organization: D'Arcy Cain Consulting

aduncan@rhea.trl.OZ.AU (Allan Duncan) writes:
>From article <1992Jul20.084316.15691@druid.uucp>, by darcy@druid.uucp (D'Arcy J.M. Cain):
>> On the other hand, a properly prototyped program using a modern compiler
>> will tell you when you are using a variable incorrectly and in the above
>> example will simply do the promotion silently.  This means that you don't
>> even have to know what filepos is other than that it is a variable holding
>> the position in a file.  You can deal with the abstract concept without
>> getting involved in the details of the bits that are used to implement it.
>
>This reliance on a compiler is no better than a journalist relying on a
>spelling and grammar checker.  It is getting very common now to see

There is nothing wrong with relying on your tools to help you.  Of course
you can't rely *solely* on your tools but where is that not true?  If a
journalist or other writer were to put their work through a checker before
or after manually checking that would be better than manually checking
alone.  One may as well say that reliance on your own ability as a sole
means of catching coding errors is irresponsible.  Use the tools.

-- 
D'Arcy J.M. Cain (darcy@druid.com)  |
D'Arcy Cain Consulting              |   There's no government
Toronto, Ontario, Canada            |   like no government!
+1 416 424 2871          DoD#0082   |
Newsgroups: comp.lang.c
From: bdickens@el_padre.mitre.org (Brian Dickens)
Subject: Variable argument question
Organization: The MITRE Corporation, Bedford, MA 01730
Date: Wed, 22 Jul 1992 13:56:09 GMT

I am trying to write code that calls a function whose parameters it knows, but are different every time.
The data type and size information is stored in an array.  To put it perhaps more clearly:

#define INT 0
#define FLOAT 1
#define CHAR 2

char *dataptr;
int parameters[10] = { INT, 1, FLOAT, 2, FLOAT, 1, CHAR, 10, INT, 1 };

From this, I want to generate:

functioncall( (int*)(dataptr), (float*)(dataptr+=sizeof(int)), 
                         (float*)(dataptr+=sizeof(float[2])), (char*)(dataptr+=sizeof(float), 
                         (int*)(dataptr+=sizeof(char[10]));

The array changes, though.  With frequency.  And the function being called changes as well...

Is there any way to do this with argument lists/etc?  I am using standard C.  Thanks in advance for any help.

<<<?>>> bdickens@elara.mitre.org <<<!>>>

Hope this makes sense...

Newsgroups: comp.lang.c
From: amorgan@Xenon.Stanford.EDU (Crunchy Frog)
Subject: Re: array element swap help
Organization: Computer Science Department, Stanford University.
Date: Thu, 30 Jul 1992 18:55:40 GMT

In article <1992Jul30.161648.26055@news.iastate.edu> 
  raeker@tc4.fi.ameslab.gov (Todd J. Raeker) writes:
>I need to swap values in an array while sorting it, currently I am doing
>the swap as follows
>
>
>            temp = ztmp[j];
>            ztmp[j] = ztmp[k];
>            ztmp[k] = temp;
>
>
>This is currently a bottleneck in my program and I need to figure a 
>better way to do due this.  Since I am not an advanced c programmer, this
>is the best I could come up with, is there a more efficient way?

*This* is the bottleneck in your code?  Are you sure about that (okay,
if you are sorting on disk or the array is of huge structures
then I can believe it, and there are ways to speed that up)?  If
this is just a simple array of int/float/double/etc then I am very
surprised.  What makes you think that this is the bottleneck?

>Dr. Todd J. Raeker           |      307B Wilhelm Hall

Oh, there is no real way to speed this up (and if anyone starts the XOR
thread again they are going to be in big trouble), what you are doing
is correct.

C Frog
Newsgroups: comp.lang.c