home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
308_01
/
chgcomps.inc
< prev
next >
Wrap
Text File
|
1990-06-17
|
975b
|
53 lines
/*
* chgcomps.inc -- include file for LIST.C
*/
static int chgcomp0(int (*newcompare)());
static int chgcomp1(int (*newcompare)());
static int chgcomp2(int (*newcompare)());
static int chgcomp3(int (*newcompare)());
static int (*chgcomps[MAXLISTS])(int (*newcompare)()) = {
chgcomp0, chgcomp1, chgcomp2, chgcomp3 };
static int chgcomp0(int (*newcompare)())
{
if(! newcompare) {
lerror = NULL_PTR;
return 0;
}
compare[0] = newcompare;
return 1;
}
static int chgcomp1(int (*newcompare)())
{
if(! newcompare) {
lerror = NULL_PTR;
return 0;
}
compare[1] = newcompare;
return 1;
}
static int chgcomp2(int (*newcompare)())
{
if(! newcompare) {
lerror = NULL_PTR;
return 0;
}
compare[2] = newcompare;
return 1;
}
static int chgcomp3(int (*newcompare)())
{
if(! newcompare) {
lerror = NULL_PTR;
return 0;
}
compare[3] = newcompare;
return 1;
}