1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Move latin1 into a separarte file

This commit is contained in:
unknown
2003-01-29 17:31:20 +04:00
parent 6a188877d4
commit 307ed01440
36 changed files with 445 additions and 245 deletions

View File

@ -124,14 +124,14 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
if (decimals >= NOT_FIXED_DEC)
{
sprintf(buff,"%.14g",num); // Enough for a DATETIME
return copy(buff, (uint32) strlen(buff), my_charset_latin1, cs);
return copy(buff, (uint32) strlen(buff), &my_charset_latin1, cs);
}
#ifdef HAVE_FCONVERT
int decpt,sign;
char *pos,*to;
VOID(fconvert(num,(int) decimals,&decpt,&sign,buff+1));
if (!my_isdigit(my_charset_latin1, buff[1]))
if (!my_isdigit(&my_charset_latin1, buff[1]))
{ // Nan or Inf
pos=buff+1;
if (sign)
@ -139,7 +139,7 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
buff[0]='-';
pos=buff;
}
return copy(pos,(uint32) strlen(pos), my_charset_latin1, cs);
return copy(pos,(uint32) strlen(pos), &my_charset_latin1, cs);
}
if (alloc((uint32) ((uint32) decpt+3+decimals)))
return TRUE;
@ -189,7 +189,7 @@ end:
#else
sprintf(buff,"%.*f",(int) decimals,num);
#endif
return copy(buff,(uint32) strlen(buff), my_charset_latin1, cs);
return copy(buff,(uint32) strlen(buff), &my_charset_latin1, cs);
#endif
}
@ -267,7 +267,7 @@ bool String::set_latin1(const char *str, uint32 arg_length)
set(str, arg_length, str_charset);
return 0;
}
return copy(str, arg_length, my_charset_latin1, str_charset);
return copy(str, arg_length, &my_charset_latin1, str_charset);
}
@ -322,7 +322,7 @@ bool String::append(const char *s,uint32 arg_length)
if (realloc(str_length+ add_length))
return TRUE;
str_length+= copy_and_convert(Ptr+str_length, add_length, str_charset,
s, arg_length, my_charset_latin1);
s, arg_length, &my_charset_latin1);
return FALSE;
}
if (realloc(str_length+arg_length))