File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change 22#define GCFINALDEFS_H 1
33#include "lispemul.h" /* for LispPTR, DLword */
44void printarrayblock (LispPTR base );
5- int integerlength (unsigned int n );
65LispPTR findptrsbuffer (LispPTR ptr );
76LispPTR releasingvmempage (LispPTR ptr );
87LispPTR checkarrayblock (LispPTR base , LispPTR free , LispPTR onfreelist );
Original file line number Diff line number Diff line change 4343/*************************************************************************/
4444
4545#include <stdio.h> // for printf
46+ #include <strings.h> // for fls
4647#include "address.h" // for HILOC
4748#include "adr68k.h" // for NativeAligned4FromLAddr, LAddrFromNative
4849#include "array.h" // for arrayblock, ARRAYBLOCKTRAILERCELLS, MAXBUCK...
@@ -123,24 +124,10 @@ struct buf {
123124#endif /* BIGVM */
124125#endif /* BYTESWAP */
125126
126- /************* The following procedure is common !! **************************/
127-
128- int integerlength (unsigned int n ) {
129- int cnt ;
130- if (n <= 2 )
131- return (n );
132- else {
133- cnt = 1 ;
134- do {
135- cnt ++ ;
136- n = (n >> 1 );
137- } while (n != 1 );
138- return (cnt );
139- }
127+ static int integerlength (unsigned int n ) {
128+ return (fls (n ));
140129}
141130
142- /************* The above procedure is common !! **************************/
143-
144131/************************************************************************/
145132/* */
146133/* f i n d p t r s b u f f e r */
You can’t perform that action at this time.
0 commit comments