Compare commits
2 Commits
main
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3872c10c76 | ||
|
|
f96fddcbf8 |
@@ -11,12 +11,23 @@ splits: 'config/43U/splits.txt'
|
||||
ldscript_template: 'config/ldscript_ipl2.lcf'
|
||||
|
||||
force_active:
|
||||
- fprintf
|
||||
- leap_days
|
||||
- __msl_time2tm
|
||||
- __tm2time
|
||||
- clock
|
||||
- mktime
|
||||
- localtime
|
||||
- emit
|
||||
- __MSL_ISO8601NewYear
|
||||
- __MSL_ISO8601Week
|
||||
- strftime
|
||||
- labs
|
||||
- atol
|
||||
- itoa
|
||||
- strpbrk
|
||||
- strspn
|
||||
- strcspn
|
||||
- atol
|
||||
- padding__Q23ipl5scene
|
||||
- lbl_81695063
|
||||
- lbl_81695067
|
||||
|
||||
14
configure.py
14
configure.py
@@ -1944,30 +1944,30 @@ config.libs = [
|
||||
Object(Matching, "MSL_Common/alloc.c"),
|
||||
Object(Matching, "MSL_Common/errno.c"),
|
||||
Object(Matching, "MSL_Common/ansi_files.c"),
|
||||
Object(NonMatching, "MSL_Common_Embedded/ansi_fp.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common_Embedded/ansi_fp.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/ctype.c"),
|
||||
Object(NonMatching, "MSL_Common/locale.c"),
|
||||
Object(Matching, "MSL_Common/locale.c"),
|
||||
Object(Matching, "MSL_Common/arith.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/bsearch.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/buffer_io.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/direct_io.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(NonMatching, "MSL_Common/file_io.c"),
|
||||
Object(Matching, "MSL_Common/file_io.c"),
|
||||
Object(Matching, "MSL_Common/FILE_POS.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/mbstring.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/mem.c"),
|
||||
Object(Matching, "MSL_Common/mem_funcs.c"),
|
||||
Object(Matching, "MSL_Common/math_api.c"),
|
||||
Object(Matching, "MSL_Common/misc_io.c"),
|
||||
Object(NonMatching, "MSL_Common/printf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/printf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/qsort.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/rand.c"),
|
||||
Object(NonMatching, "MSL_Common/scanf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/scanf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/signal.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/string.c"),
|
||||
Object(Matching, "MSL_Common/float.c"),
|
||||
Object(NonMatching, "MSL_Common/strtold.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/strtold.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/strtoul.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(NonMatching, "MSL_Common/time.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/time.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/wctype.c"),
|
||||
Object(Matching, "MSL_Common/wmem.c"),
|
||||
Object(NonMatching, "MSL_Common/wprintf.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
|
||||
@@ -528,6 +528,7 @@ static char* double2hex(long double num, char* buff, print_format format) {
|
||||
unsigned snum;
|
||||
long exp;
|
||||
print_format exp_format;
|
||||
print_format* exp_fmt_ptr = &exp_format;
|
||||
int hex_precision;
|
||||
int mantissa_bit;
|
||||
decform form;
|
||||
@@ -602,7 +603,7 @@ static char* double2hex(long double num, char* buff, print_format format) {
|
||||
|
||||
exp = snum - 0x3FF;
|
||||
|
||||
p = long2str(exp, buff, exp_format);
|
||||
p = long2str(exp, buff, *exp_fmt_ptr);
|
||||
if (format.conversion_char == 'a')
|
||||
*--p = 'p';
|
||||
else
|
||||
@@ -624,7 +625,7 @@ static char* double2hex(long double num, char* buff, print_format format) {
|
||||
working_byte = (*(q + mantissa_byte)) >> (7 - (mantissa_bit & 7));
|
||||
|
||||
if ((mantissa_bit & ~7) != ((mantissa_bit - 4) & ~7)) {
|
||||
working_byte |= (unsigned char)(((*(q + (mantissa_byte - 1))) << 8) >> (7 - ((mantissa_bit) & 7)));
|
||||
working_byte |= (((*(q + (mantissa_byte - 1))) << 8) >> (7 - ((mantissa_bit) & 7)));
|
||||
}
|
||||
|
||||
if (!TARGET_FLOAT_IMPLICIT_J_BIT) {
|
||||
@@ -635,14 +636,14 @@ static char* double2hex(long double num, char* buff, print_format format) {
|
||||
}
|
||||
|
||||
if ((working_byte &= 0xF) < 10) {
|
||||
working_byte = (unsigned char)(working_byte + '0');
|
||||
working_byte += '0';
|
||||
}
|
||||
else
|
||||
if (format.conversion_char == 'a') {
|
||||
working_byte = (unsigned char)(working_byte + 'a' - 10);
|
||||
working_byte += 'a' - 10;
|
||||
}
|
||||
else {
|
||||
working_byte = (unsigned char)(working_byte + 'A' - 10);
|
||||
working_byte += 'A' - 10;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -967,6 +968,7 @@ int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* WriteProc
|
||||
const char* format_ptr;
|
||||
const char* curr_format;
|
||||
print_format format;
|
||||
print_format* fmt_ptr = &format;
|
||||
signed long long_num;
|
||||
signed long long long_long_num;
|
||||
long double long_double_num;
|
||||
@@ -1033,11 +1035,11 @@ int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* WriteProc
|
||||
|| format.argument_options == intmax_argument
|
||||
)
|
||||
{
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
} else {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
}
|
||||
@@ -1079,11 +1081,11 @@ int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* WriteProc
|
||||
|| format.argument_options == intmax_argument
|
||||
)
|
||||
{
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
} else {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
}
|
||||
@@ -1103,7 +1105,7 @@ int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* WriteProc
|
||||
long_double_num = va_arg(arg, double);
|
||||
}
|
||||
|
||||
if (!(buff_ptr = float2str(long_double_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = float2str(long_double_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
|
||||
@@ -1118,7 +1120,7 @@ int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* WriteProc
|
||||
long_double_num = va_arg(arg, double);
|
||||
}
|
||||
|
||||
if (!(buff_ptr = double2hex(long_double_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = double2hex(long_double_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
|
||||
|
||||
@@ -248,6 +248,8 @@ static char* find_name(const char* names, int index) {
|
||||
return extracted_name;
|
||||
}
|
||||
|
||||
#pragma exceptions off
|
||||
|
||||
char* asctime(const struct tm* timeptr) {
|
||||
static char asctime_result[26];
|
||||
char* result = asctime_result;
|
||||
@@ -283,6 +285,8 @@ char* ctime(const time_t* timer) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma exceptions on
|
||||
|
||||
static time_t time(time_t* timer) {
|
||||
time_t result = __get_time();
|
||||
|
||||
@@ -312,6 +316,8 @@ static struct tm* gmtime(const time_t* timer) {
|
||||
return &gmtime_tm;
|
||||
}
|
||||
|
||||
#pragma exceptions on
|
||||
|
||||
struct tm* localtime(const time_t* timer) {
|
||||
static struct tm localtime_tm;
|
||||
|
||||
|
||||
@@ -521,6 +521,7 @@ static wchar_t* double2hex(long double num, wchar_t* buff, print_format format)
|
||||
unsigned snum;
|
||||
long exp;
|
||||
print_format exp_format;
|
||||
print_format* exp_fmt_ptr = &exp_format;
|
||||
int hex_precision;
|
||||
int mantissa_bit;
|
||||
decform form;
|
||||
@@ -595,7 +596,7 @@ static wchar_t* double2hex(long double num, wchar_t* buff, print_format format)
|
||||
|
||||
exp = snum - 0x3FF;
|
||||
|
||||
p = long2str(exp, buff, exp_format);
|
||||
p = long2str(exp, buff, *exp_fmt_ptr);
|
||||
if (format.conversion_char == 'a')
|
||||
*--p = 'p';
|
||||
else
|
||||
@@ -617,7 +618,7 @@ static wchar_t* double2hex(long double num, wchar_t* buff, print_format format)
|
||||
working_byte = (*(q + mantissa_byte)) >> (7 - (mantissa_bit & 7));
|
||||
|
||||
if ((mantissa_bit & ~7) != ((mantissa_bit - 4) & ~7)) {
|
||||
working_byte |= (unsigned char)(((*(q + (mantissa_byte - 1))) << 8) >> (7 - ((mantissa_bit) & 7)));
|
||||
working_byte |= (((*(q + (mantissa_byte - 1))) << 8) >> (7 - ((mantissa_bit) & 7)));
|
||||
}
|
||||
|
||||
if (!TARGET_FLOAT_IMPLICIT_J_BIT) {
|
||||
@@ -628,14 +629,14 @@ static wchar_t* double2hex(long double num, wchar_t* buff, print_format format)
|
||||
}
|
||||
|
||||
if ((working_byte &= 0xF) < 10) {
|
||||
working_byte = (unsigned char)(working_byte + '0');
|
||||
working_byte += '0';
|
||||
}
|
||||
else
|
||||
if (format.conversion_char == 'a') {
|
||||
working_byte = (unsigned char)(working_byte + 'a' - 10);
|
||||
working_byte += 'a' - 10;
|
||||
}
|
||||
else {
|
||||
working_byte = (unsigned char)(working_byte + 'A' - 10);
|
||||
working_byte += 'A' - 10;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -970,6 +971,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
const wchar_t* format_ptr;
|
||||
const wchar_t* curr_format;
|
||||
print_format format;
|
||||
print_format* fmt_ptr = &format;
|
||||
signed long long_num;
|
||||
signed long long long_long_num;
|
||||
long double long_double_num;
|
||||
@@ -1027,11 +1029,11 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
if (format.argument_options == long_long_argument ||
|
||||
format.argument_options == intmax_argument)
|
||||
{
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
} else {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
}
|
||||
@@ -1069,11 +1071,11 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
|| format.argument_options == intmax_argument
|
||||
)
|
||||
{
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = longlong2str(long_long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
} else {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = long2str(long_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
}
|
||||
@@ -1093,7 +1095,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
long_double_num = va_arg(args, double);
|
||||
}
|
||||
|
||||
if (!(buff_ptr = float2str(long_double_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = float2str(long_double_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
|
||||
@@ -1108,7 +1110,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
long_double_num = va_arg(args, double);
|
||||
}
|
||||
|
||||
if (!(buff_ptr = double2hex(long_double_num, buff + 512, format))) {
|
||||
if (!(buff_ptr = double2hex(long_double_num, buff + 512, *fmt_ptr))) {
|
||||
goto conversion_error;
|
||||
}
|
||||
|
||||
@@ -1124,7 +1126,8 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
}
|
||||
|
||||
if (format.alternate_form) {
|
||||
num_chars = (unsigned char)*wcs_ptr++;
|
||||
wchar_t first = *wcs_ptr++;
|
||||
num_chars = (unsigned char)first;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
@@ -1150,7 +1153,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
}
|
||||
|
||||
if (format.alternate_form) {
|
||||
num_chars = (unsigned char)*wcs_ptr++;
|
||||
num_chars = (unsigned char)*(const wchar_t*)wcs_ptr;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
@@ -1222,7 +1225,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
num_chars = 1;
|
||||
break;
|
||||
|
||||
case 0xFF:
|
||||
case 0xFFFF:
|
||||
default:
|
||||
conversion_error:
|
||||
num_chars = wcslen(curr_format);
|
||||
|
||||
Reference in New Issue
Block a user