From e741932d581cd32ed86f8995249299bbf78278ff Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 15 Apr 2007 16:53:14 +0200 Subject: [PATCH] SEE: Renamed ELinks functions with the "SEE" prefix to distinguish them from SEE functions. [ Backported from commit c5b102ba08e71047a37533206cc65c3e8e76216d on the witekfl branch. --KON ] --- src/ecmascript/see.c | 8 ++++---- src/ecmascript/see/document.c | 10 +++++----- src/ecmascript/see/form.c | 28 ++++++++++++++-------------- src/ecmascript/see/input.c | 10 +++++----- src/ecmascript/see/input.h | 8 ++++---- src/ecmascript/see/location.c | 4 ++-- src/ecmascript/see/window.c | 14 +++++++------- 7 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/ecmascript/see.c b/src/ecmascript/see.c index 863ed683..84bb61fb 100644 --- a/src/ecmascript/see.c +++ b/src/ecmascript/see.c @@ -104,7 +104,7 @@ see_eval(struct ecmascript_interpreter *interpreter, struct SEE_interpreter *interp = interpreter->backend_data; struct global_object *g = (struct global_object *)interp; - struct SEE_input *input = SEE_input_elinks(interp, code->source); + struct SEE_input *input = see_input_elinks(interp, code->source); SEE_try_context_t try_ctxt; struct SEE_value result; @@ -125,7 +125,7 @@ see_eval_stringback(struct ecmascript_interpreter *interpreter, { struct SEE_interpreter *interp = interpreter->backend_data; struct global_object *g = (struct global_object *)interp; - struct SEE_input *input = SEE_input_elinks(interp, code->source); + struct SEE_input *input = see_input_elinks(interp, code->source); SEE_try_context_t try_ctxt; struct SEE_value result; /* 'volatile' qualifier prevents register allocation which fixes: @@ -138,7 +138,7 @@ see_eval_stringback(struct ecmascript_interpreter *interpreter, SEE_TRY(interp, try_ctxt) { SEE_Global_eval(interp, input, &result); if (SEE_VALUE_GET_TYPE(&result) == SEE_STRING) - string = SEE_value_to_unsigned_char(interp, &result); + string = see_value_to_unsigned_char(interp, &result); } SEE_INPUT_CLOSE(input); @@ -154,7 +154,7 @@ see_eval_boolback(struct ecmascript_interpreter *interpreter, { struct SEE_interpreter *interp = interpreter->backend_data; struct global_object *g = (struct global_object *)interp; - struct SEE_input *input = SEE_input_elinks(interp, code->source); + struct SEE_input *input = see_input_elinks(interp, code->source); SEE_try_context_t try_ctxt; struct SEE_value result; /* 'volatile' qualifier prevents register allocation which fixes: diff --git a/src/ecmascript/see/document.c b/src/ecmascript/see/document.c index 12d3c66e..0abcbbe3 100644 --- a/src/ecmascript/see/document.c +++ b/src/ecmascript/see/document.c @@ -145,7 +145,7 @@ document_get(struct SEE_interpreter *interp, struct SEE_object *o, SEE_SET_OBJECT(res, doc->writeln); } else { struct form *form; - unsigned char *string = SEE_string_to_unsigned_char(p); + unsigned char *string = see_string_to_unsigned_char(p); struct form_view *form_view; struct js_form *form_object; @@ -179,7 +179,7 @@ document_put(struct SEE_interpreter *interp, struct SEE_object *o, SEE_ToObject(interp, val, &res); doc->forms = res.u.object; } else if (p == s_title) { - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); mem_free_set(&document->title, string); print_screen_status(doc_view->session); } else if (p == s_location || p == s_url) { @@ -187,12 +187,12 @@ document_put(struct SEE_interpreter *interp, struct SEE_object *o, * broken sites still assign to it (i.e. * http://www.e-handelsfonden.dk/validering.asp?URL=www.polyteknisk.dk). * So emulate window.location. */ - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); location_goto(doc_view, string); mem_free_if(string); } else if (p == s_cookie) { #ifdef CONFIG_COOKIES - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); set_cookie(vs->uri, string); mem_free_if(string); #endif @@ -218,7 +218,7 @@ js_document_write_do(struct SEE_interpreter *interp, struct SEE_object *self, for (; i < argc; ++i) { unsigned char *code; - code = SEE_value_to_unsigned_char(interp, argv[i]); + code = see_value_to_unsigned_char(interp, argv[i]); if (code) { add_to_string(ret, code); diff --git a/src/ecmascript/see/form.c b/src/ecmascript/see/form.c index df95f71a..1397a677 100644 --- a/src/ecmascript/see/form.c +++ b/src/ecmascript/see/form.c @@ -299,14 +299,14 @@ input_put(struct SEE_interpreter *interp, struct SEE_object *o, SEE_ToString(interp, val, &conv); if (conv.u.string->length) - accesskey = SEE_string_to_unicode(interp, conv.u.string); + accesskey = see_string_to_unicode(interp, conv.u.string); else accesskey = 0; if (link) link->accesskey = accesskey; } else if (p == s_alt) { - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); mem_free_set(&fc->alt, string); } else if (p == s_checked) { if (fc->type != FC_CHECKBOX && fc->type != FC_RADIO) @@ -319,13 +319,13 @@ input_put(struct SEE_interpreter *interp, struct SEE_object *o, : (fc->mode == FORM_MODE_READONLY ? FORM_MODE_READONLY : FORM_MODE_NORMAL)); } else if (p == s_maxLength) { - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); if (!string) return; fc->maxlength = atol(string); mem_free(string); } else if (p == s_name) { - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); mem_free_set(&fc->name, string); } else if (p == s_readonly) { SEE_uint32_t boo = SEE_ToUint32(interp, val); @@ -334,13 +334,13 @@ input_put(struct SEE_interpreter *interp, struct SEE_object *o, : FORM_MODE_NORMAL); } else if (p == s_src) { if (link) { - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); mem_free_set(&link->where_img, string); } } else if (p == s_value) { if (fc->type == FC_FILE) return; - string = SEE_value_to_unsigned_char(interp, val); + string = see_value_to_unsigned_char(interp, val); mem_free_set(&fs->value, string); if (fc->type == FC_TEXT || fc->type == FC_PASSWORD) fs->state = strlen(fs->value); @@ -541,7 +541,7 @@ js_form_elems_item(struct SEE_interpreter *interp, struct SEE_object *self, SEE_SET_UNDEFINED(res); if (argc < 1) return; - string = SEE_value_to_unsigned_char(interp, argv[0]); + string = see_value_to_unsigned_char(interp, argv[0]); if (!string) return; index = atol(string); @@ -585,7 +585,7 @@ js_form_elems_namedItem(struct SEE_interpreter *interp, struct SEE_object *self, SEE_SET_UNDEFINED(res); if (argc < 1) return; - string = SEE_value_to_unsigned_char(interp, argv[0]); + string = see_value_to_unsigned_char(interp, argv[0]); if (!string) return; @@ -626,7 +626,7 @@ form_elems_get(struct SEE_interpreter *interp, struct SEE_object *o, } else if (p == s_namedItem) { SEE_SET_OBJECT(res, jsfe->namedItem); } else { - unsigned char *string = SEE_string_to_unsigned_char(p); + unsigned char *string = see_string_to_unsigned_char(p); struct SEE_value arg0; struct SEE_value *argv[1] = { &arg0 }; @@ -675,7 +675,7 @@ js_forms_item(struct SEE_interpreter *interp, struct SEE_object *self, if (argc < 1) return; - string = SEE_value_to_unsigned_char(interp, argv[0]); + string = see_value_to_unsigned_char(interp, argv[0]); if (!string) return; index = atol(string); @@ -712,7 +712,7 @@ js_forms_namedItem(struct SEE_interpreter *interp, struct SEE_object *self, if (argc < 1) return; - string = SEE_value_to_unsigned_char(interp, argv[0]); + string = see_value_to_unsigned_char(interp, argv[0]); if (!string) return; foreach (form, document->forms) { @@ -747,7 +747,7 @@ forms_get(struct SEE_interpreter *interp, struct SEE_object *o, } else if (p == s_namedItem) { SEE_SET_OBJECT(res, fo->namedItem); } else { - unsigned char *string = SEE_string_to_unsigned_char(p); + unsigned char *string = see_string_to_unsigned_char(p); struct SEE_value arg0; struct SEE_value *argv[1] = { &arg0 }; @@ -843,7 +843,7 @@ form_get(struct SEE_interpreter *interp, struct SEE_object *o, } else if (p == s_reset) { SEE_SET_OBJECT(res, js_form->reset); } else { - unsigned char *string = SEE_string_to_unsigned_char(p); + unsigned char *string = see_string_to_unsigned_char(p); struct form_control *fc; if (!string) @@ -878,7 +878,7 @@ form_put(struct SEE_interpreter *interp, struct SEE_object *o, struct js_form *js_form = (struct js_form *)o; struct form_view *fv = js_form->fv; struct form *form = find_form_by_form_view(doc_view->document, fv); - unsigned char *string = SEE_value_to_unsigned_char(interp, val); + unsigned char *string = see_value_to_unsigned_char(interp, val); if (!string) return; diff --git a/src/ecmascript/see/input.c b/src/ecmascript/see/input.c index 59c6d909..1fcc3265 100644 --- a/src/ecmascript/see/input.c +++ b/src/ecmascript/see/input.c @@ -49,7 +49,7 @@ input_elinks_close(struct SEE_input *inp) } struct SEE_input * -SEE_input_elinks(struct SEE_interpreter *interp, unsigned char *s) +see_input_elinks(struct SEE_interpreter *interp, unsigned char *s) { struct input_elinks *input; @@ -64,7 +64,7 @@ SEE_input_elinks(struct SEE_interpreter *interp, unsigned char *s) } unsigned char * -SEE_string_to_unsigned_char(struct SEE_string *S) +see_string_to_unsigned_char(struct SEE_string *S) { int i; unsigned char *str = mem_alloc(S->length + 1); @@ -79,12 +79,12 @@ SEE_string_to_unsigned_char(struct SEE_string *S) } unsigned char * -SEE_value_to_unsigned_char(struct SEE_interpreter *interp, struct SEE_value *val) +see_value_to_unsigned_char(struct SEE_interpreter *interp, struct SEE_value *val) { struct SEE_value result; SEE_ToString(interp, val, &result); - return SEE_string_to_unsigned_char(result.u.string); + return see_string_to_unsigned_char(result.u.string); } struct SEE_string * @@ -127,7 +127,7 @@ append_unicode_to_SEE_string(struct SEE_interpreter *interp, } unicode_val_T -SEE_string_to_unicode(struct SEE_interpreter *interp, struct SEE_string *S) +see_string_to_unicode(struct SEE_interpreter *interp, struct SEE_string *S) { /* This implementation ignores extra characters in the string. */ if (S->length < 1) { diff --git a/src/ecmascript/see/input.h b/src/ecmascript/see/input.h index 6813bcd5..c8a2d82b 100644 --- a/src/ecmascript/see/input.h +++ b/src/ecmascript/see/input.h @@ -7,12 +7,12 @@ struct SEE_interpreter; struct SEE_string; struct SEE_value; -struct SEE_input *SEE_input_elinks(struct SEE_interpreter *, unsigned char *); -unsigned char *SEE_string_to_unsigned_char(struct SEE_string *); -unsigned char *SEE_value_to_unsigned_char(struct SEE_interpreter *, struct SEE_value *); +struct SEE_input *see_input_elinks(struct SEE_interpreter *, unsigned char *); +unsigned char *see_string_to_unsigned_char(struct SEE_string *); +unsigned char *see_value_to_unsigned_char(struct SEE_interpreter *, struct SEE_value *); struct SEE_string *string_to_SEE_string(struct SEE_interpreter *, unsigned char *); void append_unicode_to_SEE_string(struct SEE_interpreter *, struct SEE_string *, unicode_val_T); -unicode_val_T SEE_string_to_unicode(struct SEE_interpreter *, struct SEE_string *); +unicode_val_T see_string_to_unicode(struct SEE_interpreter *, struct SEE_string *); #endif diff --git a/src/ecmascript/see/location.c b/src/ecmascript/see/location.c index cf43a155..d1de913d 100644 --- a/src/ecmascript/see/location.c +++ b/src/ecmascript/see/location.c @@ -232,7 +232,7 @@ js_history_go(struct SEE_interpreter *interp, struct SEE_object *self, if (argc < 1) return; - str = SEE_value_to_unsigned_char(interp, argv[0]); + str = see_value_to_unsigned_char(interp, argv[0]); if (!str) return; @@ -297,7 +297,7 @@ location_put(struct SEE_interpreter *interp, struct SEE_object *o, struct global_object *g = (struct global_object *)interp; struct view_state *vs = g->win->vs; struct document_view *doc_view = vs->doc_view; - unsigned char *url = SEE_value_to_unsigned_char(interp, val); + unsigned char *url = see_value_to_unsigned_char(interp, val); location_goto(doc_view, url); mem_free(url); diff --git a/src/ecmascript/see/window.c b/src/ecmascript/see/window.c index 36587d77..0a3e79f0 100644 --- a/src/ecmascript/see/window.c +++ b/src/ecmascript/see/window.c @@ -143,7 +143,7 @@ window_get(struct SEE_interpreter *interp, struct SEE_object *o, } else if (p == s_navigator) { SEE_OBJECT_GET(interp, interp->Global, s_navigator, res); } else { - unsigned char *frame = SEE_string_to_unsigned_char(p); + unsigned char *frame = see_string_to_unsigned_char(p); struct document_view *doc_view = vs->doc_view; struct js_window_object *obj; @@ -164,7 +164,7 @@ window_put(struct SEE_interpreter *interp, struct SEE_object *o, struct js_window_object *win = (struct js_window_object *)o; struct view_state *vs = win->vs; struct document_view *doc_view = vs->doc_view; - unsigned char *str = SEE_value_to_unsigned_char(interp, val); + unsigned char *str = see_value_to_unsigned_char(interp, val); if (str) { location_goto(doc_view, str); @@ -176,7 +176,7 @@ window_put(struct SEE_interpreter *interp, struct SEE_object *o, struct view_state *vs = win->vs; struct document_view *doc_view = vs->doc_view; struct session *ses = doc_view->session; - unsigned char *stat = SEE_value_to_unsigned_char(interp, val); + unsigned char *stat = see_value_to_unsigned_char(interp, val); mem_free_set(&ses->status.window_status, stat); print_screen_status(ses); @@ -217,7 +217,7 @@ js_window_alert(struct SEE_interpreter *interp, struct SEE_object *self, if (argc < 1) return; - string = SEE_value_to_unsigned_char(interp, argv[0]); + string = see_value_to_unsigned_char(interp, argv[0]); if (!string || !*string) { mem_free_if(string); return; @@ -274,14 +274,14 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self, } #endif SEE_ToString(interp, argv[0], &url_value); - url = SEE_string_to_unsigned_char(url_value.u.string); + url = see_string_to_unsigned_char(url_value.u.string); if (!url) return; trim_chars(url, ' ', 0); if (argc > 1) { struct SEE_value target_value; SEE_ToString(interp, argv[1], &target_value); - frame = SEE_string_to_unsigned_char(target_value.u.string); + frame = see_string_to_unsigned_char(target_value.u.string); if (!frame) { mem_free(url); return; @@ -345,7 +345,7 @@ js_setTimeout(struct SEE_interpreter *interp, struct SEE_object *self, if (argc != 2) return; ei = ((struct global_object *)interp)->interpreter; - code = SEE_value_to_unsigned_char(interp, argv[0]); + code = see_value_to_unsigned_char(interp, argv[0]); timeout = SEE_ToInt32(interp, argv[1]); ecmascript_set_timeout(ei, code, timeout); }