M = quo*X;
M += fl_quo * X / 10000;
/* round step */
- M += (fl_quo*X % 10000)>5000?1:0;
+ M += (fl_quo*X % 10000) > 5000?1:0;
if (M < 256 && M > 0) {
unsigned int diff;
tmpClock = pll->inputFreq * M / N / X;
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state));
} else {
value = PEEK32(SYSTEM_CTRL);
- value= FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
+ value = FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
POKE32(SYSTEM_CTRL, value);
}
}
static inline unsigned long ps_to_hz(unsigned int psvalue)
{
- unsigned long long numerator=1000*1000*1000*1000ULL;
+ unsigned long long numerator = 1000*1000*1000*1000ULL;
/* 10^12 / picosecond period gives frequency in Hz */
do_div(numerator, psvalue);
return (unsigned long)numerator;
write_dpr(accel, DE_CONTROL, de_ctrl | deGetTransparency(accel));
/* Write MONO data (line by line) to 2D Engine data port */
- for (i=0; i<height; i++)
+ for (i = 0; i < height; i++)
{
/* For each line, send the data in chunks of 4 bytes */
- for (j=0; j<(ul4BytesPerScan/4); j++)
+ for (j = 0; j < (ul4BytesPerScan/4); j++)
{
write_dpPort(accel, *(unsigned int *)(pSrcbuf + (j * 4)));
}
odd=0;
*/
- for (i=0;i<count;i++)
+ for (i = 0;i < count;i++)
{
color = *pcol++;
mask = *pmsk++;
else
opr = mask & color;
- for (j=0;j<8;j++)
+ for (j = 0;j < 8;j++)
{
if (opr & (0x80 >> j))
}
}
#else
- for (j=0;j<8;j++) {
+ for (j = 0;j < 8;j++) {
if (mask & (0x80>>j)) {
if (rop == ROP_XOR)
opr = mask ^ color;
pstart = cursor->vstart;
pbuffer = pstart;
- for (i=0;i<count;i++)
+ for (i = 0;i < count;i++)
{
color = *pcol++;
mask = *pmsk++;
else
opr = mask & color;
- for (j=0;j<8;j++)
+ for (j = 0;j < 8;j++)
{
if (opr & (0x80 >> j))
}
}
#else
- for (j=0;j<8;j++) {
+ for (j = 0;j < 8;j++) {
if (mask & (1<<j))
data |= ((color & (1<<j))?1:2)<<(j*2);
}
static inline unsigned int absDiff(unsigned int a, unsigned int b)
{
- if (a<b)
+ if (a < b)
return b-a;
else
return a-b;