"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libsysinfo-0.2.2/all/fix_mhz.c" between
linux_logo-5.11.tar.gz and linux_logo-6.0.tar.gz

About: Linux_Logo - an ANSI Color Penguin Logo that can be run at bootup. Also shows some system info.

fix_mhz.c  (linux_logo-5.11):fix_mhz.c  (linux_logo-6.0)
float fix_megahertz(int factor,float megahertz) { float fix_megahertz(int factor,float megahertz) {
int temp_MHz,temp_mod,temp_div;
float new_megahertz;
new_megahertz=megahertz; int temp_MHz,temp_mod,temp_div;
temp_MHz=(int)megahertz; float new_megahertz;
temp_mod=temp_MHz%factor; new_megahertz=megahertz;
temp_div=temp_MHz/factor; temp_MHz=(int)megahertz;
if (temp_mod<=2) { temp_mod=temp_MHz%factor;
new_megahertz=(float) (temp_div*factor); temp_div=temp_MHz/factor;
}
else if (temp_mod>=(factor-2)) {
new_megahertz=(float) (temp_div+1)*factor;
}
else new_megahertz=temp_MHz; if (temp_mod<=2) {
new_megahertz=(float) (temp_div*factor);
}
else if (temp_mod>=(factor-2)) {
new_megahertz=(float) (temp_div+1)*factor;
}
else {
new_megahertz=temp_MHz;
}
return new_megahertz; return new_megahertz;
} }
 End of changes. 6 change blocks. 
14 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)