2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include <exec/memory.h>
10 #include <exec/tasks.h>
11 #include <exec/execbase.h>
12 #include <proto/exec.h>
13 #include <dos/dosextens.h>
14 #include <proto/dos.h>
16 static const char version
[] = "$VER: reslist 41.2 (20.07.2001)\n";
24 static int addres(struct Node
*r
, struct res
**l
, STRPTR
*e
)
53 static int fillbuffer(struct res
**buffer
, IPTR size
)
55 STRPTR end
=(STRPTR
)*buffer
+size
;
58 for(r
=(struct Node
*)SysBase
->ResourceList
.lh_Head
;
60 r
=(struct Node
*)r
->ln_Succ
)
61 if(!addres(r
,buffer
,&end
))
75 struct res
*buffer
,*ress
,*ress2
;
76 for(size
=2048;;size
+=2048)
78 buffer
=AllocVec(size
,MEMF_ANY
);
81 FPuts(Output(),"Not Enough memory for library buffer\n");
85 if(fillbuffer(&ress
,size
))
87 FPuts(Output(),"address\t\tname\n"
88 "------------------------------------------------------------\n");
89 for(ress2
=buffer
;ress2
<ress
;ress2
++)
92 args
[0] = (IPTR
)ress2
->address
;
93 args
[1] = (IPTR
)ress2
->name
;
95 VPrintf("0x%08.lx\t%s\n", args
);