Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit ad9e2a9b authored by deuce's avatar deuce

Remove *_TO_STRING() usage.

parent c59960a2
......@@ -41,9 +41,13 @@
char* DLLCALL
js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
{
char* p,*p2;
char* p;
char *p2=NULL;
size_t p2_sz;
JSVALUE_TO_STRING(cx, argv[argn++], p, NULL);
JSVALUE_TO_MSTRING(cx, argv[argn++], p, NULL);
if(JS_IsExceptionPending(cx))
JS_ClearPendingException(cx);
if(p==NULL)
return(NULL);
......@@ -56,15 +60,22 @@ js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
else if(JSVAL_IS_BOOLEAN(argv[argn]) && xp_printf_get_type(p)!=XP_PRINTF_TYPE_CHARP)
p=xp_asprintf_next(p,XP_PRINTF_CONVERT|XP_PRINTF_TYPE_INT,JSVAL_TO_BOOLEAN(argv[argn]));
else {
JSVALUE_TO_STRING(cx, argv[argn], p2, NULL);
if(p2==NULL)
JSVALUE_TO_RASTRING(cx, argv[argn], p2, &p2_sz, NULL);
if(JS_IsExceptionPending(cx))
JS_ClearPendingException(cx);
if(p2==NULL) {
free(p);
return NULL;
}
p=xp_asprintf_next(p,XP_PRINTF_CONVERT|XP_PRINTF_TYPE_CHARP,p2);
}
}
return xp_asprintf_end(p, NULL);
if(p2)
free(p2);
p2=xp_asprintf_end(p, NULL);
free(p);
return p2;
}
void DLLCALL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment