am i right in thinking if i want sprintf support, i should use chsnprintf ?
if so ive added memstreams.c to makefile and this is how im calling it
struct tm t;
static char msgstr1[100];
static const char LOGFILE_ENTRY_FORMAT[] = {"[%.2d/%.2d/%.2d - %.2d:%.2d:%.2d.%.3d] - [%.4d] %s\r\n"};
rtcGetTimeTm( &RTCD1, &t );
chsnprintf( msgstr1,
sizeof(msgstr1),
LOGFILE_ENTRY_FORMAT,
t.tm_mday, t.tm_mon - 1, t.tm_year - 100,
t.tm_hour, t.tm_min, t.tm_sec, (int)0,
(const char *)"This is a debug test message");
but just get unhandled exception and dbg_panic_msg is NULL ??
sprintf
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: sprintf
Unhandled exceptions do not return messages being unexpected.
I think it is because you have 9 %x but you give only 8 arguments.
Giovanni
I think it is because you have 9 %x but you give only 8 arguments.
Giovanni