/* Generate code to copy XINIT to XISEG */ static void _mcs51_genXINIT (FILE * of) { tfprintf (of, "\t!global\n", "__mcs51_genXINIT"); if (!getenv("SDCC_NOGENRAMCLEAR")) tfprintf (of, "\t!global\n", "__mcs51_genXRAMCLEAR"); }
static void _mcs51_genExtraAreas(FILE *of, bool hasMain) { tfprintf (of, "\t!area\n", HOME_NAME); tfprintf (of, "\t!area\n", "GSINIT0 (CODE)"); tfprintf (of, "\t!area\n", "GSINIT1 (CODE)"); tfprintf (of, "\t!area\n", "GSINIT2 (CODE)"); tfprintf (of, "\t!area\n", "GSINIT3 (CODE)"); tfprintf (of, "\t!area\n", "GSINIT4 (CODE)"); tfprintf (of, "\t!area\n", "GSINIT5 (CODE)"); tfprintf (of, "\t!area\n", STATIC_NAME); tfprintf (of, "\t!area\n", port->mem.post_static_name); tfprintf (of, "\t!area\n", CODE_NAME); }
static void wimlib_vmsg(const tchar *tag, const tchar *format, va_list va, bool perror) { #if !defined(ENABLE_DEBUG) if (wimlib_print_errors) #endif { int errno_save = errno; fflush(stdout); tfputs(tag, wimlib_error_file); tvfprintf(wimlib_error_file, format, va); if (perror && errno_save != 0) { tchar buf[64]; int res; res = tstrerror_r(errno_save, buf, ARRAY_LEN(buf)); if (res) { tsprintf(buf, T("unknown error (errno=%d)"), errno_save); } #ifdef WIN32 if (errno_save == EBUSY) tstrcpy(buf, T("Resource busy")); #endif tfprintf(wimlib_error_file, T(": %"TS), buf); } tputc(T('\n'), wimlib_error_file); fflush(wimlib_error_file); errno = errno_save; } }
void GTLogTextFile::LogOutout(const tchar* szMes, const tchar* szType) { if(szMes && szType) { FILE* fp = tfopen(GTLogTextFile::g_szLogFileName, CTEXT("a+")); if(fp) { tfprintf(fp, CTEXT("[%s]: %s\n"), szType, szMes); tfclose(fp); fp = NULL; } } }
static void _mcs51_genInitStartup (FILE *of) { tfprintf (of, "\t!global\n", "__sdcc_gsinit_startup"); tfprintf (of, "\t!global\n", "__sdcc_program_startup"); tfprintf (of, "\t!global\n", "__start__stack"); if (options.useXstack) { tfprintf (of, "\t!global\n", "__sdcc_init_xstack"); tfprintf (of, "\t!global\n", "__start__xstack"); } // if the port can copy the XINIT segment to XISEG if (port->genXINIT) { port->genXINIT(of); } if (!getenv("SDCC_NOGENRAMCLEAR")) tfprintf (of, "\t!global\n", "__mcs51_genRAMCLEAR"); }
void print_byte_field(const u8 field[], size_t len, FILE *out) { while (len--) tfprintf(out, T("%02hhx"), *field++); }