Mailing List
Home
Forum Home
MUD Dev - Discussion of MUD system design, development, and implementation
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Flash Racing
MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Qsort

Qsort

2004-01-28       - By Dale Kingston

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Ok question/problem, I had qsort sort my helpfiles. And I ran into an
issue..... See before the CO that incorperated qsort hit I had 625
helpfiles, after the CO I had 168. Rather large decrease. I belive the
problem might have come from the head pointer not being in order? Or maybe
I'm wrong? Maybe you guys can see what I did wrong:

int srt_helps(const void *p1, const void *p2)
{
 HELP_DATA help1 = *(HELP_DATA *)p1;
 HELP_DATA help2 = *(HELP_DATA *)p2;

 if (help1.keyword == NULL) return 2;
   else
 if (help2.keyword == NULL) return 1;

 return ( strcmp( help1.keyword, help2.keyword ) );
}

void sort_helps(void)
{
HELP_DATA *help;
int i;

for (i = 0, help = help_first; help != NULL; help = help->next, i++);

qsort((void *)help_first, i, sizeof(help_first[0]), srt_helps);

return;
}


--
ROM mailing list
ROM@(protected)
http://www.rom.org/cgi-bin/mailman/listinfo/rom



Earn $52 per hosting referral at Lunarpages.