Chameleon

Chameleon Commit Details

Date:2010-10-30 13:20:45 (8 years 9 months ago)
Author:Azimutz
Commit:623
Parents: 622
Message:Fixing MIN/MAX mess; i just assumed... and went to rest. Also didn't noticed before that these macros are already defined on <sys/param.h> and a min was escaping my search pattern. Thanks to Smith@@ for early warning :)
Changes:
M/branches/azimutz/Chazi/i386/libsaio/saio_types.h
M/branches/azimutz/Chazi/i386/libsaio/ext2fs.c

File differences

branches/azimutz/Chazi/i386/libsaio/ext2fs.c
3737
3838
3939
40
40
4141
4242
return;
}
str[strMaxLen]=0;
strncpy (str, buf+0x478, min (strMaxLen, 16));
strncpy (str, buf+0x478, MIN(strMaxLen, 16));
free (buf);
}
branches/azimutz/Chazi/i386/libsaio/saio_types.h
231231
232232
233233
234
235
236
234
235
236
237
238
239
240
241
242
243
244
237245
238
246
247
239248
240249
241
250
242251
243252
244253
DEV_EN = 3
};
//Azi: change this stuff back to upercase??
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
/*
* Macros for min/max.
*
* Azi: defined on <sys/param.h>; includes, check later...
*/
#ifndef MIN
#defineMIN(a,b) ( ((a) < (b)) ? (a) : (b) )
#endif
#ifndef MAX
#defineMAX(a,b) ( ((a) > (b)) ? (a) : (b) )
#endif
#defineround2(x, m)(((x) + (m / 2)) & ~(m - 1))
//Azi: not in use
/*#defineround2(x, m)(((x) + (m / 2)) & ~(m - 1))
#define roundup2(x, m) (((x) + m - 1) & ~(m - 1))
#define MAKEKERNDEV(t, u, p) MAKEBOOTDEV(t, 0, 0, u, p)
#define MAKEKERNDEV(t, u, p) MAKEBOOTDEV(t, 0, 0, u, p)*/
enum {
kNetworkDeviceType = kBIOSDevTypeNetwork,

Archive Download the corresponding diff file

Revision: 623