The conflict to standard function pow() in Visual Studio 2010 is eliminated. Patch from Max Vasilyev 2:5057/77

This commit is contained in:
Stas Degteff 2011-04-10 06:26:02 +00:00
parent 21b684d1b2
commit fdf4a3bea1
3 changed files with 10 additions and 5 deletions

View File

@ -13,6 +13,8 @@ _____________________________________________________________________________
Ž¡®§­ ç¥­¨ï: "-" - ¨á¯à ¢«¥­¨¥, "+" - ­®¢®¥, "!" - áãé¥á⢥­­®¥ ¨§¬¥­¥­¨¥. Ž¡®§­ ç¥­¨ï: "-" - ¨á¯à ¢«¥­¨¥, "+" - ­®¢®¥, "!" - áãé¥á⢥­­®¥ ¨§¬¥­¥­¨¥.
_____________________________________________________________________________ _____________________________________________________________________________
- “áâà ­ñ­ ª®­ä«¨ªâ á® áâ ­¤ àâ­®© ä㭪樥© pow() ¢ Visual Studio 2010.
+ „«ï ¯à®¢¥àª¨ ®à䮣à ä¨¨ ¬®¦­® ®¤­®¢à¥¬¥­­® ¨á¯®«ì§®¢ âì ­¥áª®«ìª® á«®¢ à¥©. + „«ï ¯à®¢¥àª¨ ®à䮣à ä¨¨ ¬®¦­® ®¤­®¢à¥¬¥­­® ¨á¯®«ì§®¢ âì ­¥áª®«ìª® á«®¢ à¥©.
¤¨à¥ªâ¨¢¥ SCheckerDefLang ¬®¦­® ¯¥à¥ç¨á«¨âì ­¥áª®«ìª® á«®¢ à¥© ç¥à¥§ ¤¨à¥ªâ¨¢¥ SCheckerDefLang ¬®¦­® ¯¥à¥ç¨á«¨âì ­¥áª®«ìª® á«®¢ à¥© ç¥à¥§
¯à®¡¥«. (<28> âç ®â ‘¥¬ñ­  <20> ­¥¢¨­  2:5025/121.) ¯à®¡¥«. (<28> âç ®â ‘¥¬ñ­  <20> ­¥¢¨­  2:5025/121.)

View File

@ -13,6 +13,9 @@ ______________________________________________________________________
Legend: "-" - bugfix, "+" - new feature, "!" - important modification. Legend: "-" - bugfix, "+" - new feature, "!" - important modification.
______________________________________________________________________ ______________________________________________________________________
- The conflict to standard function pow() in Visual Studio 2010 is
eliminated.
+ In the Spell Checking feature simultaneous may use a several + In the Spell Checking feature simultaneous may use a several
dictionnaries. The token SCheckerDefLang accepts a list of dictionnaries. The token SCheckerDefLang accepts a list of
dictionaries delimited with space. Patch from Semen Panevin, dictionaries delimited with space. Patch from Semen Panevin,

View File

@ -122,7 +122,7 @@ char* glmonth[12] = {
static char buf[26]; static char buf[26];
static char format[] = "%?"; static char format[] = "%?";
static int pow[5] = { 1, 10, 100, 1000, 10000 }; static int gpow[5] = { 1, 10, 100, 1000, 10000 };
// ------------------------------------------------------------------ // ------------------------------------------------------------------
@ -155,8 +155,8 @@ static void strfmt(char *str, const char *fmt, ...) {
ival = va_arg(vp, int); ival = va_arg(vp, int);
bool padding = true; bool padding = true;
while(ilen) { while(ilen) {
ival %= pow[ilen]; ival %= gpow[ilen];
int cval = ival / pow[ilen-1]; int cval = ival / gpow[ilen-1];
if(cval) if(cval)
padding = false; padding = false;
if(--ilen and padding) if(--ilen and padding)
@ -167,8 +167,8 @@ static void strfmt(char *str, const char *fmt, ...) {
else { else {
ival = va_arg(vp, int); ival = va_arg(vp, int);
while(ilen) { while(ilen) {
ival %= pow[ilen--]; ival %= gpow[ilen--];
*str++ = (char)('0' + ival / pow[ilen]); *str++ = (char)('0' + ival / gpow[ilen]);
} }
} }
} }