From 57a8a16052d834e58242d92453dbcdb650deb6b4 Mon Sep 17 00:00:00 2001 From: toshok Date: Mon, 18 May 1998 21:58:00 +0000 Subject: [PATCH] apparently digital unix's c compiler has a problem with the work 'readonly' (it appears to be a reserved word, as far as that compiler goes). So, I'm changing all occurences of the readonly form element attribute to read_only. Thanks to berkley@cs.wustl.edu (Berkley Shands) for the report and suggested fix. git-svn-id: svn://10.0.0.236/trunk@1855 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/include/lo_ele.h | 4 ++-- mozilla/lib/layout/layform.c | 8 ++++---- mozilla/lib/libmocha/lm_input.c | 4 ++-- mozilla/lib/mariner/src/xpform.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mozilla/include/lo_ele.h b/mozilla/include/lo_ele.h index 60cf35179ef..a53c2e79250 100644 --- a/mozilla/include/lo_ele.h +++ b/mozilla/include/lo_ele.h @@ -645,7 +645,7 @@ struct lo_FormElementTextData_struct { PA_Block name; PA_Block default_text; Bool disabled; - Bool readonly; + Bool read_only; PA_Block current_text; int32 size; int32 max_size; @@ -663,7 +663,7 @@ struct lo_FormElementTextareaData_struct { PA_Block name; PA_Block default_text; Bool disabled; - Bool readonly; + Bool read_only; PA_Block current_text; int32 rows; int32 cols; diff --git a/mozilla/lib/layout/layform.c b/mozilla/lib/layout/layform.c index 8401665e0cb..04998becb82 100644 --- a/mozilla/lib/layout/layform.c +++ b/mozilla/lib/layout/layform.c @@ -986,14 +986,14 @@ lo_form_input_text(MWContext *context, lo_DocState *state, } #endif /* OLD_FILE_UPLOAD */ - form_data->readonly = FALSE; + form_data->read_only = FALSE; if (type != FORM_TYPE_FILE) { buff = lo_FetchParamValue(context, tag, PARAM_READONLY); if (buff != NULL) { PA_FREE(buff); - form_data->readonly = TRUE; + form_data->read_only = TRUE; } } @@ -1146,12 +1146,12 @@ lo_form_textarea(MWContext *context, lo_DocState *state, form_data->disabled = TRUE; } - form_data->readonly = FALSE; + form_data->read_only = FALSE; buff = lo_FetchParamValue(context, tag, PARAM_READONLY); if (buff != NULL) { PA_FREE(buff); - form_data->readonly = TRUE; + form_data->read_only = TRUE; } form_data->auto_wrap = TEXTAREA_WRAP_OFF; diff --git a/mozilla/lib/libmocha/lm_input.c b/mozilla/lib/libmocha/lm_input.c index e1d26a2a901..7be504e0513 100644 --- a/mozilla/lib/libmocha/lm_input.c +++ b/mozilla/lib/libmocha/lm_input.c @@ -531,7 +531,7 @@ input_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) *vp = BOOLEAN_TO_JSVAL(text->disabled); goto good; case INPUT_READONLY: - *vp = BOOLEAN_TO_JSVAL(text->readonly); + *vp = BOOLEAN_TO_JSVAL(text->read_only); goto good; #endif default: @@ -897,7 +897,7 @@ input_setProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) case INPUT_READONLY: if (form_element->element_data->type == FORM_TYPE_FILE) break; - text->readonly = JSVAL_TO_BOOLEAN(*vp); + text->read_only = JSVAL_TO_BOOLEAN(*vp); if (context) { ET_PostManipulateForm(context, (LO_Element *)form_element, EVENT_CHANGE); diff --git a/mozilla/lib/mariner/src/xpform.c b/mozilla/lib/mariner/src/xpform.c index b2402f60b83..f0064fbd7f2 100644 --- a/mozilla/lib/mariner/src/xpform.c +++ b/mozilla/lib/mariner/src/xpform.c @@ -189,9 +189,9 @@ XP_FormGetReadonly(LO_FormElementData *form) case FORM_TYPE_TEXT: case FORM_TYPE_PASSWORD: case FORM_TYPE_READONLY: - return form->ele_text.readonly; + return form->ele_text.read_only; case FORM_TYPE_TEXTAREA: - return form->ele_textarea.readonly; + return form->ele_textarea.read_only; default: return FALSE; }