237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
#elif defined(OF_HAVE_RANDOM)
static BOOL initialized = NO;
if (!initialized) {
struct timeval t;
gettimeofday(&t, NULL);
srandom(t.tv_sec ^ t.tv_usec);
initialized = YES;
}
return (random() << 16) | (random() & 0xFFFF);
#else
static BOOL initialized = NO;
if (!initialized) {
struct timeval t;
gettimeofday(&t, NULL);
srand(t.tv_sec ^ t.tv_usec);
initialized = YES;
}
return (random() << 16) | (random() & 0xFFFF);
#endif
}
const char*
_NSPrintForDebugger(id object)
{
return [[object description]
|
|
|
|
|
|
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
#elif defined(OF_HAVE_RANDOM)
static BOOL initialized = NO;
if (!initialized) {
struct timeval t;
gettimeofday(&t, NULL);
srandom((unsigned)(t.tv_sec ^ t.tv_usec));
initialized = YES;
}
return (uint32_t)((random() << 16) | (random() & 0xFFFF));
#else
static BOOL initialized = NO;
if (!initialized) {
struct timeval t;
gettimeofday(&t, NULL);
srand((unsigned)(t.tv_sec ^ t.tv_usec));
initialized = YES;
}
return (rand() << 16) | (rand() & 0xFFFF);
#endif
}
const char*
_NSPrintForDebugger(id object)
{
return [[object description]
|