1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-23 03:28:58 +00:00

Some renaming

git-svn-id: svn://svn.cc65.org/cc65/trunk@3136 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2004-06-29 20:35:39 +00:00
parent daf8e0d1e6
commit e8afc897cf
2 changed files with 17 additions and 27 deletions

View File

@ -6,10 +6,10 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 1998 Ullrich von Bassewitz */ /* (C) 1998-2004 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Römerstraße 52 */
/* D-70597 Stuttgart */ /* D-70794 Filderstadt */
/* EMail: uz@musoftware.de */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
/* This software is provided 'as-is', without any expressed or implied */ /* This software is provided 'as-is', without any expressed or implied */
@ -38,34 +38,24 @@
/*****************************************************************************/ /*****************************************************************************/
/* data */ /* Code */
/*****************************************************************************/ /*****************************************************************************/
int PowerOf2 (unsigned long Val)
/*****************************************************************************/
/* code */
/*****************************************************************************/
int powerof2 (unsigned long val)
/* Return the exponent if val is a power of two. Return -1 if val is not a /* Return the exponent if val is a power of two. Return -1 if val is not a
* power of two. * power of two.
*/ */
{ {
int i; int I;
unsigned long mask; unsigned long Mask = 0x0001;
mask = 0x0001;
for (i = 0; i < 32; ++i) { for (I = 0; I < 32; ++I) {
if (val == mask) { if (Val == Mask) {
return i; return I;
} }
mask <<= 1; Mask <<= 1;
} }
return -1; return -1;
} }

View File

@ -6,10 +6,10 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 1998 Ullrich von Bassewitz */ /* (C) 1998-2004 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Römerstraße 52 */
/* D-70597 Stuttgart */ /* D-70794 Filderstadt */
/* EMail: uz@musoftware.de */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
/* This software is provided 'as-is', without any expressed or implied */ /* This software is provided 'as-is', without any expressed or implied */
@ -44,7 +44,7 @@
int powerof2 (unsigned long val); int PowerOf2 (unsigned long Val);
/* Return the exponent if val is a power of two. Return -1 if val is not a /* Return the exponent if val is a power of two. Return -1 if val is not a
* power of two. * power of two.
*/ */