327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
|
child->dataSeg += DATA_OFFSET;
return &child->library;
}
static void *
expunge(struct ObjFWRTBase *base)
{
void *segList;
if (base->parent != NULL) {
base->parent->library.lib_Flags |= LIBF_DELEXP;
return 0;
}
if (base->library.lib_OpenCnt > 0) {
base->library.lib_Flags |= LIBF_DELEXP;
return 0;
}
segList = base->segList;
Remove(&base->library.lib_Node);
FreeMem((char *)base - base->library.lib_NegSize,
base->library.lib_NegSize + base->library.lib_PosSize);
return segList;
}
static void *__saveds
lib_expunge(void)
{
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
return expunge(base);
}
static void *__saveds
lib_close(void)
{
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
if (base->parent != NULL) {
struct ObjFWRTBase *parent;
#ifdef OF_AMIGAOS_M68K
if (base->initialized)
|
|
>
>
|
>
>
>
>
>
>
>
|
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
child->dataSeg += DATA_OFFSET;
return &child->library;
}
static void *
expunge(struct ObjFWRTBase *base, struct ExecBase *sysBase)
{
#define SysBase sysBase
void *segList;
if (base->parent != NULL) {
base->parent->library.lib_Flags |= LIBF_DELEXP;
return 0;
}
if (base->library.lib_OpenCnt > 0) {
base->library.lib_Flags |= LIBF_DELEXP;
return 0;
}
segList = base->segList;
Remove(&base->library.lib_Node);
FreeMem((char *)base - base->library.lib_NegSize,
base->library.lib_NegSize + base->library.lib_PosSize);
return segList;
#undef SysBase
}
static void *__saveds
lib_expunge(void)
{
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
return expunge(base, SysBase);
}
static void *__saveds
lib_close(void)
{
/*
* SysBase becomes invalid during this function, so we store it in
* sysBase and add a define to make the inlines use the right one.
*/
struct ExecBase *sysBase = SysBase;
#define SysBase sysBase
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
if (base->parent != NULL) {
struct ObjFWRTBase *parent;
#ifdef OF_AMIGAOS_M68K
if (base->initialized)
|
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
|
base->library.lib_NegSize + base->library.lib_PosSize);
base = parent;
}
if (--base->library.lib_OpenCnt == 0 &&
(base->library.lib_Flags & LIBF_DELEXP))
return expunge(base);
return NULL;
}
static void *
lib_null(void)
{
return NULL;
}
|
|
>
|
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
|
base->library.lib_NegSize + base->library.lib_PosSize);
base = parent;
}
if (--base->library.lib_OpenCnt == 0 &&
(base->library.lib_Flags & LIBF_DELEXP))
return expunge(base, sysBase);
return NULL;
#undef SysBase
}
static void *
lib_null(void)
{
return NULL;
}
|