13 modified files
reactos/lib/kjs/include
diff -u -r1.1 -r1.2
--- js.h 10 Jan 2004 20:38:17 -0000 1.1
+++ js.h 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/include/js.h,v $
- * $Id: js.h,v 1.1 2004/01/10 20:38:17 arty Exp $
+ * $Id: js.h,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
#ifndef JS_H
@@ -261,7 +261,7 @@
* number. The returned string is in format "MAJOR.MINOR.PATCH",
* where MAJOR, MINOR, and PATCH are integer numbers.
*/
-const JSCharPtr JS_DLLEXPORT js_version ();
+JSCharPtr JS_DLLEXPORT js_version ();
/* Initialize interpreter options to system's default values. */
void JS_DLLEXPORT js_init_default_options (JSInterpOptions *options);
@@ -275,7 +275,7 @@
void JS_DLLEXPORT js_destroy_interp (JSInterpPtr interp);
/* Return error message from the latest error. */
-const JSCharPtr JS_DLLEXPORT js_error_message (JSInterpPtr interp);
+JSCharPtr JS_DLLEXPORT js_error_message (JSInterpPtr interp);
/*
* Get the result of the latest evaluation or execution in interpreter
@@ -456,8 +456,8 @@
void *ictx, JSFreeProc ictx_destructor,
JSType *result_return);
-const JSClassPtr JS_DLLEXPORT js_lookup_class (JSInterpPtr interp,
- char *name);
+JSClassPtr JS_DLLEXPORT js_lookup_class (JSInterpPtr interp,
+ char *name);
/*
* Check if object <object> is an instance of class <cls>. The
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- b_core.c 10 Jan 2004 20:38:17 -0000 1.1
+++ b_core.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/ksrc/b_core.c,v $
- * $Id: b_core.c,v 1.1 2004/01/10 20:38:17 arty Exp $
+ * $Id: b_core.c,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
/*
@@ -185,7 +185,7 @@
EMIT_TO_RESULT (c);
else if (c > 0xFF)
{
- unsigned char buf[6];
+ char buf[6];
sprintf (buf, "%04x", c);
EMIT_TO_RESULT ('%');
@@ -197,7 +197,7 @@
}
else
{
- unsigned char buf[4];
+ char buf[4];
sprintf (buf, "%02x", c);
EMIT_TO_RESULT ('%');
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- b_regexp.c 10 Jan 2004 20:38:17 -0000 1.1
+++ b_regexp.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/ksrc/b_regexp.c,v $
- * $Id: b_regexp.c,v 1.1 2004/01/10 20:38:17 arty Exp $
+ * $Id: b_regexp.c,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
#include "jsint.h"
@@ -275,7 +275,7 @@
input_str = &cvt;
}
- input = input_str->u.vstring->data;
+ input = (char*)input_str->u.vstring->data;
input_len = input_str->u.vstring->len;
}
else if (args->u.vinteger == 1)
@@ -288,7 +288,7 @@
input_str = &cvt;
}
- input = input_str->u.vstring->data;
+ input = (char*)input_str->u.vstring->data;
input_len = input_str->u.vstring->len;
/* Set the input property to the class context. */
@@ -317,7 +317,7 @@
input_str = &cvt;
}
- input = input_str->u.vstring->data;
+ input = (char*)input_str->u.vstring->data;
input_len = input_str->u.vstring->len;
}
else if (args->u.vinteger == 1)
@@ -330,7 +330,7 @@
input_str = &cvt;
}
- input = input_str->u.vstring->data;
+ input = (char*)input_str->u.vstring->data;
input_len = input_str->u.vstring->len;
/* Set the input property to the class context. */
@@ -370,11 +370,6 @@
js_vm_symname (vm, method));
js_vm_error (vm);
- /* argument_type_error: */
- sprintf (vm->error, "RegExp.%s(): illegal argument",
- js_vm_symname (vm, method));
- js_vm_error (vm);
-
immutable:
sprintf (vm->error, "RegExp.%s(): immutable object",
js_vm_symname (vm, method));
@@ -406,7 +401,7 @@
sprintf (vm->error, "RegExp(): RegExp.input is not a string");
js_vm_error (vm);
}
- input = ctx->input.u.vstring->data;
+ input = (char*)ctx->input.u.vstring->data;
input_len = ctx->input.u.vstring->len;
}
else if (args->u.vinteger == 1)
@@ -417,7 +412,7 @@
js_vm_error (vm);
}
- input = args[1].u.vstring->data;
+ input = (char*)args[1].u.vstring->data;
input_len = args[1].u.vstring->len;
/* Set the input property to the class context. */
@@ -466,7 +461,7 @@
node->type = JS_UNDEFINED;
else
js_vm_make_string (vm, node,
- ctx->input.u.vstring->data
+ (char*)ctx->input.u.vstring->data
+ ctx->regs.start[index],
ctx->regs.end[index] - ctx->regs.start[index]);
}
@@ -542,7 +537,8 @@
node->type = JS_UNDEFINED;
else
js_vm_make_string (vm, node,
- ctx->input.u.vstring->data + ctx->regs.start[0],
+ (char*)ctx->input.u.vstring->data +
+ ctx->regs.start[0],
ctx->regs.end[0] - ctx->regs.start[0]);
}
/* ********************************************************************** */
@@ -565,7 +561,7 @@
node->type = JS_UNDEFINED;
else
js_vm_make_string (vm, node,
- ctx->input.u.vstring->data
+ (char*)ctx->input.u.vstring->data
+ ctx->regs.start[i],
ctx->regs.end[i] - ctx->regs.start[i]);
}
@@ -580,7 +576,7 @@
|| ctx->regs.end[0] > ctx->input.u.vstring->len)
node->type = JS_UNDEFINED;
else
- js_vm_make_string (vm, node, ctx->input.u.vstring->data,
+ js_vm_make_string (vm, node, (char*)ctx->input.u.vstring->data,
ctx->regs.start[0]);
}
/* ********************************************************************** */
@@ -598,7 +594,7 @@
node->type = JS_UNDEFINED;
else
js_vm_make_string (vm, node,
- ctx->input.u.vstring->data + ctx->regs.end[0],
+ (char*)ctx->input.u.vstring->data + ctx->regs.end[0],
ctx->input.u.vstring->len - ctx->regs.end[0]);
}
/* ********************************************************************** */
@@ -726,7 +722,7 @@
js_vm_error (vm);
}
- source = args[1].u.vstring->data;
+ source = (char*)args[1].u.vstring->data;
source_len = args[1].u.vstring->len;
}
@@ -769,7 +765,7 @@
js_free (ictx->source);
if (ictx->compiled.buffer)
- js_free (ictx->compiled.buffer);
+ free (ictx->compiled.buffer);
if (ictx->compiled.fastmap)
js_free (ictx->compiled.fastmap);
@@ -1047,9 +1043,9 @@
EMIT_TO_RESULT (data + pos, datalen - pos);
if (regs.start)
- js_free (regs.start);
+ free (regs.start);
if (regs.end)
- js_free (regs.end);
+ free (regs.end);
}
@@ -1130,7 +1126,7 @@
}
if (regs.start)
- js_free (regs.start);
+ free (regs.start);
if (regs.end)
- js_free (regs.end);
+ free (regs.end);
}
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- ejumps.h 10 Jan 2004 20:38:17 -0000 1.1
+++ ejumps.h 24 Dec 2004 23:01:35 -0000 1.2
@@ -576,7 +576,7 @@
else if (JS_SP1->type == JS_STRING)
{
/* Intern the string. */
- j = js_vm_intern_with_len (vm, JS_SP1->u.vstring->data,
+ j = js_vm_intern_with_len (vm, (char*)JS_SP1->u.vstring->data,
JS_SP1->u.vstring->len);
/* The code below must be in sync with operand `load_property'. */
@@ -697,7 +697,7 @@
else if (JS_SP1->type == JS_STRING)
{
/* Intern the string. */
- j = js_vm_intern_with_len (vm, JS_SP1->u.vstring->data,
+ j = js_vm_intern_with_len (vm, (char*)JS_SP1->u.vstring->data,
JS_SP1->u.vstring->len);
/* The code below msut be in sync with operand `store_property'. */
@@ -1005,7 +1005,7 @@
memcpy (ndata, d2, d2_len);
memcpy (ndata + d2_len, d1, d1_len);
- js_vm_make_static_string (vm, JS_SP2, ndata, nlen);
+ js_vm_make_static_string (vm, JS_SP2, (char*)ndata, nlen);
JS_SP2->u.vstring->staticp = 0;
JS_POP ();
JS_MAYBE_GC ();
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- eswitch.h 10 Jan 2004 20:38:17 -0000 1.1
+++ eswitch.h 24 Dec 2004 23:01:35 -0000 1.2
@@ -550,7 +550,7 @@
else if (JS_SP1->type == JS_STRING)
{
/* Intern the string. */
- j = js_vm_intern_with_len (vm, JS_SP1->u.vstring->data,
+ j = js_vm_intern_with_len (vm, (char*)JS_SP1->u.vstring->data,
JS_SP1->u.vstring->len);
/* The code below must be in sync with operand `load_property'. */
@@ -670,7 +670,7 @@
else if (JS_SP1->type == JS_STRING)
{
/* Intern the string. */
- j = js_vm_intern_with_len (vm, JS_SP1->u.vstring->data,
+ j = js_vm_intern_with_len (vm, (char*)JS_SP1->u.vstring->data,
JS_SP1->u.vstring->len);
/* The code below msut be in sync with operand `store_property'. */
@@ -967,7 +967,7 @@
memcpy (ndata, d2, d2_len);
memcpy (ndata + d2_len, d1, d1_len);
- js_vm_make_static_string (vm, JS_SP2, ndata, nlen);
+ js_vm_make_static_string (vm, JS_SP2, (char*)ndata, nlen);
JS_SP2->u.vstring->staticp = 0;
JS_POP ();
JS_MAYBE_GC ();
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- eswt0.h 10 Jan 2004 20:38:17 -0000 1.1
+++ eswt0.h 24 Dec 2004 23:01:35 -0000 1.2
@@ -548,7 +548,7 @@
else if (JS_SP1->type == JS_STRING)
{
/* Intern the string. */
- j = js_vm_intern_with_len (vm, JS_SP1->u.vstring->data,
+ j = js_vm_intern_with_len (vm, (char*)JS_SP1->u.vstring->data,
JS_SP1->u.vstring->len);
/* The code below must be in sync with operand `load_property'. */
@@ -668,7 +668,7 @@
else if (JS_SP1->type == JS_STRING)
{
/* Intern the string. */
- j = js_vm_intern_with_len (vm, JS_SP1->u.vstring->data,
+ j = js_vm_intern_with_len (vm, (char*)JS_SP1->u.vstring->data,
JS_SP1->u.vstring->len);
/* The code below msut be in sync with operand `store_property'. */
@@ -965,7 +965,7 @@
memcpy (ndata, d2, d2_len);
memcpy (ndata + d2_len, d1, d1_len);
- js_vm_make_static_string (vm, JS_SP2, ndata, nlen);
+ js_vm_make_static_string (vm, JS_SP2, (char*)ndata, nlen);
JS_SP2->u.vstring->staticp = 0;
JS_POP ();
JS_MAYBE_GC ();
reactos/lib/kjs/ksrc
diff -u -r1.2 -r1.3
--- js.c 7 May 2004 05:12:10 -0000 1.2
+++ js.c 24 Dec 2004 23:01:35 -0000 1.3
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/ksrc/js.c,v $
- * $Id: js.c,v 1.2 2004/05/07 05:12:10 royce Exp $
+ * $Id: js.c,v 1.3 2004/12/24 23:01:35 navaraf Exp $
*/
#include "js.h"
@@ -160,7 +160,7 @@
* Global functions.
*/
-const JSCharPtr
+JSCharPtr
js_version ()
{
return VERSION;
@@ -278,7 +278,7 @@
}
-const JSCharPtr
+JSCharPtr
js_error_message (JSInterpPtr interp)
{
return interp->vm->error;
@@ -792,7 +792,7 @@
}
-const JSClassPtr
+JSClassPtr
js_lookup_class (JSInterpPtr interp, char *name)
{
JSNode *n;
@@ -840,7 +840,7 @@
{
JSNode *n = (JSNode *) type;
- js_vm_make_string (interp->vm, n, data, length);
+ js_vm_make_string (interp->vm, n, (char*)data, length);
}
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- object.c 10 Jan 2004 20:38:17 -0000 1.1
+++ object.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/ksrc/object.c,v $
- * $Id: object.c,v 1.1 2004/01/10 20:38:17 arty Exp $
+ * $Id: object.c,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
#include "ddk/ntddk.h"
@@ -431,7 +431,7 @@
abort ();
}
- js_vm_make_string (vm, value_return, b->data, b->len);
+ js_vm_make_string (vm, value_return, (char*)b->data, b->len);
return 1;
}
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- regex.c 10 Jan 2004 20:38:17 -0000 1.1
+++ regex.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -1564,7 +1564,7 @@
reg_syntax_t syntax));
static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
const char *pend,
- char *translate,
+ RE_TRANSLATE_TYPE translate,
reg_syntax_t syntax,
unsigned char *b));
@@ -3807,7 +3807,7 @@
unsigned char *end,
register_info_type *reg_info));
static int bcmp_translate _RE_ARGS ((const char *s1, const char *s2,
- int len, char *translate));
+ int len, RE_TRANSLATE_TYPE translate));
/* re_match_2 matches the compiled pattern in BUFP against the
the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
reactos/lib/kjs/ksrc
diff -u -r1.1 -r1.2
--- vm.c 10 Jan 2004 20:38:17 -0000 1.1
+++ vm.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/ksrc/vm.c,v $
- * $Id: vm.c,v 1.1 2004/01/10 20:38:17 arty Exp $
+ * $Id: vm.c,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
#include "jsint.h"
@@ -296,7 +296,7 @@
{
int i, sect;
unsigned int ui;
- unsigned char *cp;
+ char *cp;
unsigned int consts_offset;
char buf[256];
JSSymtabEntry *symtab = NULL;
reactos/lib/kjs/src
diff -u -r1.1 -r1.2
--- b_string.c 10 Jan 2004 20:38:18 -0000 1.1
+++ b_string.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/src/b_string.c,v $
- * $Id: b_string.c,v 1.1 2004/01/10 20:38:18 arty Exp $
+ * $Id: b_string.c,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
/* TODO: global method: String (obj) => string */
@@ -141,7 +141,7 @@
unsigned int arg = 2;
JSUInt32 ui;
double dval;
- unsigned char *buffer = NULL;
+ char *buffer = NULL;
unsigned int bufpos = 0;
if (args->u.vinteger < 1)
@@ -442,8 +442,8 @@
|| args[1].u.vbuiltin->info != ctx->regexp_info)
goto argument_type_error;
- js_builtin_RegExp_match (vm, n->u.vstring->data, n->u.vstring->len,
- &args[1], result_return);
+ js_builtin_RegExp_match (vm, (char*)n->u.vstring->data,
+ n->u.vstring->len, &args[1], result_return);
}
/* ***************************************************************** */
else if (method == ctx->s_replace)
@@ -456,8 +456,9 @@
|| args[2].type != JS_STRING)
goto argument_type_error;
- js_builtin_RegExp_replace (vm, n->u.vstring->data, n->u.vstring->len,
- &args[1], args[2].u.vstring->data,
+ js_builtin_RegExp_replace (vm, (char*)n->u.vstring->data,
+ n->u.vstring->len, &args[1],
+ (char*)args[2].u.vstring->data,
args[2].u.vstring->len, result_return);
}
/* ***************************************************************** */
@@ -470,8 +471,8 @@
|| args[1].u.vbuiltin->info != ctx->regexp_info)
goto argument_type_error;
- js_builtin_RegExp_search (vm, n->u.vstring->data, n->u.vstring->len,
- &args[1], result_return);
+ js_builtin_RegExp_search (vm, (char*)n->u.vstring->data,
+ n->u.vstring->len, &args[1], result_return);
}
/* ***************************************************************** */
else if (method == ctx->s_slice)
@@ -511,8 +512,8 @@
if (start > end)
end = start;
- js_vm_make_string (vm, result_return, n->u.vstring->data + start,
- end - start);
+ js_vm_make_string (vm, result_return, (char*)n->u.vstring->data +
+ start, end - start);
}
/* ***************************************************************** */
else if (method == ctx->s_split)
@@ -521,7 +522,7 @@
{
js_vm_make_array (vm, result_return, 1);
js_vm_make_string (vm, &result_return->u.varray->data[0],
- n->u.vstring->data, n->u.vstring->len);
+ (char*)n->u.vstring->data, n->u.vstring->len);
}
else
{
@@ -560,7 +561,7 @@
js_vm_make_string (vm,
&(result_return
->u.varray->data[alen]),
- n->u.vstring->data + start,
+ (char*)n->u.vstring->data + start,
pos - start);
alen++;
@@ -585,14 +586,14 @@
js_vm_expand_array (vm, result_return, alen + 1);
js_vm_make_string (vm,
&result_return->u.varray->data[alen],
- n->u.vstring->data + start,
+ (char*)n->u.vstring->data + start,
n->u.vstring->len - start);
}
}
else if (args[1].type == JS_BUILTIN
&& args[1].u.vbuiltin->info == ctx->regexp_info)
{
- js_builtin_RegExp_split (vm, n->u.vstring->data,
+ js_builtin_RegExp_split (vm, (char*)n->u.vstring->data,
n->u.vstring->len, &args[1],
limit, result_return);
}
@@ -635,8 +636,8 @@
if (start + length > n->u.vstring->len)
length = n->u.vstring->len - start;
- js_vm_make_string (vm, result_return, n->u.vstring->data + start,
- length);
+ js_vm_make_string (vm, result_return, (char*)n->u.vstring->data +
+ start, length);
}
/* ***************************************************************** */
else if (method == ctx->s_substring)
@@ -675,8 +676,8 @@
js_vm_error (vm);
}
- js_vm_make_string (vm, result_return, n->u.vstring->data + start,
- end - start);
+ js_vm_make_string (vm, result_return, (char*)n->u.vstring->data +
+ start, end - start);
}
/* ***************************************************************** */
else if (method == ctx->s_toLowerCase)
@@ -684,7 +685,7 @@
if (args->u.vinteger != 0)
goto argument_type_error;
- js_vm_make_string (vm, result_return, n->u.vstring->data,
+ js_vm_make_string (vm, result_return, (char*)n->u.vstring->data,
n->u.vstring->len);
for (i = 0; i < result_return->u.vstring->len; i++)
@@ -697,7 +698,7 @@
if (args->u.vinteger != 0)
goto argument_type_error;
- js_vm_make_string (vm, result_return, n->u.vstring->data,
+ js_vm_make_string (vm, result_return, (char*)n->u.vstring->data,
n->u.vstring->len);
for (i = 0; i < result_return->u.vstring->len; i++)
@@ -869,7 +870,7 @@
source = &source_n;
}
- js_vm_make_string (vm, result_return, source->u.vstring->data,
+ js_vm_make_string (vm, result_return, (char*)source->u.vstring->data,
source->u.vstring->len);
}
else
reactos/lib/kjs/src
diff -u -r1.1 -r1.2
--- regex.h 10 Jan 2004 20:38:18 -0000 1.1
+++ regex.h 24 Dec 2004 23:01:35 -0000 1.2
@@ -317,7 +317,7 @@
private to the regex routines. */
#ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE char *
+# define RE_TRANSLATE_TYPE unsigned char *
#endif
struct re_pattern_buffer
reactos/lib/kjs/src
diff -u -r1.1 -r1.2
--- utils.c 10 Jan 2004 20:38:18 -0000 1.1
+++ utils.c 24 Dec 2004 23:01:35 -0000 1.2
@@ -24,7 +24,7 @@
/*
* $Source: /CVS/ReactOS/reactos/lib/kjs/src/utils.c,v $
- * $Id: utils.c,v 1.1 2004/01/10 20:38:18 arty Exp $
+ * $Id: utils.c,v 1.2 2004/12/24 23:01:35 navaraf Exp $
*/
#include "jsint.h"
@@ -354,7 +354,7 @@
break;
case JS_STRING:
- js_vm_make_string (vm, result_return, n->u.vstring->data,
+ js_vm_make_string (vm, result_return, (char*)n->u.vstring->data,
n->u.vstring->len);
break;
CVSspam 0.2.8