static void log_wargv(int argc, const wchar_t ** argv) { bson_append_start_array( g_bson, g_istr ); for (int i=0; i<argc; i++) { snprintf(g_istr, 4, "%u", i); log_wstring(argv[i], -1); } bson_append_finish_array( g_bson ); }
static void log_wargv(bson *b, const char *idx, int argc, const wchar_t **argv) { bson_append_start_array(b, idx); char index[5]; for (int i = 0; i < argc; i++) { ultostr(i, index, 10); log_wstring(b, index, argv[i], -1); } bson_append_finish_array(b); }
static void log_wargv(bson *b, const char *idx, int argc, const wchar_t **argv) { bson_append_start_array(b, idx); char index[5]; for (int i = 0; i < argc; i++) { wchar_t *value = copy_ptr(&argv[i]); if(value != NULL) { ultostr(i, index, 10); log_wstring(b, index, value, copy_strlenW(value)); } } bson_append_finish_array(b); }