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 8ad1afdf authored by rswindell's avatar rswindell

Fix MSVC10 warnings and new bug in Com.send().

parent dfe76d34
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -1074,7 +1074,6 @@ js_exec_xtrn(JSContext *cx, uintN argc, jsval *arglist)
int32 i=0;
char* code;
sbbs_t* sbbs;
JSString* str;
jsrefcount rc;
JS_SET_RVAL(cx, arglist, JSVAL_VOID);
......@@ -1206,7 +1205,6 @@ js_replace_text(JSContext *cx, uintN argc, jsval *arglist)
char* p;
int32 i=0;
int len;
JSString* js_str;
sbbs_t* sbbs;
JS_SET_RVAL(cx, arglist, JSVAL_FALSE);
......@@ -3263,7 +3261,6 @@ js_chk_ar(JSContext *cx, uintN argc, jsval *arglist)
JSObject *obj=JS_THIS_OBJECT(cx, arglist);
jsval *argv=JS_ARGV(cx, arglist);
uchar* ar;
JSString* js_str;
sbbs_t* sbbs;
jsrefcount rc;
char *p;
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -65,7 +65,6 @@ enum {
static JSBool js_client_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
{
jsval idval;
return(JS_FALSE);
}
......
......@@ -174,7 +174,6 @@ js_send(JSContext *cx, uintN argc, jsval *arglist)
jsval *argv=JS_ARGV(cx, arglist);
char* cp;
int len;
JSString* str;
private_t* p;
jsrefcount rc;
......@@ -187,8 +186,7 @@ js_send(JSContext *cx, uintN argc, jsval *arglist)
JS_SET_RVAL(cx, arglist, JSVAL_FALSE);
JSVALUE_TO_STRING(cx, argv[0], cp, NULL);
len = JS_GetStringLength(str);
JSVALUE_TO_STRING(cx, argv[0], cp, &len);
rc=JS_SUSPENDREQUEST(cx);
if(comWriteBuf(p->com,cp,len)==len) {
......@@ -616,8 +614,7 @@ static JSBool js_com_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
*vp = BOOLEAN_TO_JSVAL(p->debug);
break;
case COM_PROP_DESCRIPTOR:
*vp = INT_TO_JSVAL(p->com);
//p->is_open = TRUE;
*vp = INT_TO_JSVAL((int)p->com);
break;
case COM_PROP_NETWORK_ORDER:
*vp = BOOLEAN_TO_JSVAL(p->network_byte_order);
......@@ -764,7 +761,6 @@ js_com_constructor(JSContext *cx, uintN argc, jsval *arglist)
private_t* p;
char* protocol=NULL;
char* fname;
JSString* str;
obj=JS_NewObject(cx, &js_com_class, NULL, NULL);
JS_SET_RVAL(cx, arglist, OBJECT_TO_JSVAL(obj));
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -457,7 +457,6 @@ js_handle_ctrlkey(JSContext *cx, uintN argc, jsval *arglist)
char key;
int32 mode=0;
sbbs_t* sbbs;
JSString* js_str;
jsrefcount rc;
char *keystr;
......
......@@ -1518,7 +1518,6 @@ js_save_msg(JSContext *cx, uintN argc, jsval *arglist)
smbmsg_t rcpt_msg;
smbmsg_t msg;
client_t* client=NULL;
jsval open_rval;
private_t* p;
JS_SET_RVAL(cx, arglist, JSVAL_FALSE);
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -42,7 +42,6 @@ char* DLLCALL
js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
{
char* p,*p2;
JSString* str;
JSVALUE_TO_STRING(cx, argv[argn++], p, NULL);
if(p==NULL)
......
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