- Fixed some spelling/typo errors. (tid:83095)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17345 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
brianluau 2013-06-04 03:45:04 +00:00
parent 5000b3d5f9
commit 7db16d51e9

View File

@ -921,7 +921,7 @@ const char* skip_space(const char* p)
} }
/// Skips a word. /// Skips a word.
/// A word consists of undercores and/or alfanumeric characters, /// A word consists of undercores and/or alphanumeric characters,
/// and valid variable prefixes/postfixes. /// and valid variable prefixes/postfixes.
static static
const char* skip_word(const char* p) const char* skip_word(const char* p)
@ -964,7 +964,7 @@ int add_word(const char* p)
// Check for a word // Check for a word
len = skip_word(p) - p; len = skip_word(p) - p;
if( len == 0 ) if( len == 0 )
disp_error_message("script:add_word: invalid word. A word consists of undercores and/or alfanumeric characters, and valid variable prefixes/postfixes.", p); disp_error_message("script:add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes.", p);
// Duplicate the word // Duplicate the word
word = (char*)aMalloc(len+1); word = (char*)aMalloc(len+1);
@ -1000,7 +1000,7 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
add_scriptl(func); add_scriptl(func);
arg = buildin_func[str_data[buildin_callsub_ref].val].arg; arg = buildin_func[str_data[buildin_callsub_ref].val].arg;
if( *arg == 0 ) if( *arg == 0 )
disp_error_message("parse_callfunc: callsub has no arguments, please review it's definition",p); disp_error_message("parse_callfunc: callsub has no arguments, please review its definition",p);
if( *arg != '*' ) if( *arg != '*' )
++arg; // count func as argument ++arg; // count func as argument
} else { } else {
@ -1241,7 +1241,7 @@ const char* parse_simpleexpr(const char *p)
p=skip_space(p); p=skip_space(p);
if(*p==';' || *p==',') if(*p==';' || *p==',')
disp_error_message("parse_simpleexpr: unexpected expr end",p); disp_error_message("parse_simpleexpr: unexpected end of expression",p);
if(*p=='('){ if(*p=='('){
if( (i=syntax.curly_count-1) >= 0 && syntax.curly[i].type == TYPE_ARGLIST ) if( (i=syntax.curly_count-1) >= 0 && syntax.curly[i].type == TYPE_ARGLIST )
++syntax.curly[i].count; ++syntax.curly[i].count;
@ -1257,7 +1257,7 @@ const char* parse_simpleexpr(const char *p)
syntax.curly[i].flag = ARGLIST_NO_PAREN; syntax.curly[i].flag = ARGLIST_NO_PAREN;
} }
if( *p != ')' ) if( *p != ')' )
disp_error_message("parse_simpleexpr: unmatch ')'",p); disp_error_message("parse_simpleexpr: unmatched ')'",p);
++p; ++p;
} else if(ISDIGIT(*p) || ((*p=='-' || *p=='+') && ISDIGIT(p[1]))){ } else if(ISDIGIT(*p) || ((*p=='-' || *p=='+') && ISDIGIT(p[1]))){
char *np; char *np;
@ -1323,7 +1323,7 @@ const char* parse_simpleexpr(const char *p)
p=parse_subexpr(p+1,-1); p=parse_subexpr(p+1,-1);
p=skip_space(p); p=skip_space(p);
if( *p != ']' ) if( *p != ']' )
disp_error_message("parse_simpleexpr: unmatch ']'",p); disp_error_message("parse_simpleexpr: unmatched ']'",p);
++p; ++p;
add_scriptc(C_FUNC); add_scriptc(C_FUNC);
}else }else
@ -1384,7 +1384,7 @@ const char* parse_subexpr(const char* p,int limit)
p=parse_subexpr(p,-1); p=parse_subexpr(p,-1);
p=skip_space(p); p=skip_space(p);
if( *(p++) != ':') if( *(p++) != ':')
disp_error_message("parse_subexpr: need ':'", p-1); disp_error_message("parse_subexpr: expected ':'", p-1);
p=parse_subexpr(p,-1); p=parse_subexpr(p,-1);
} else { } else {
p=parse_subexpr(p,opl); p=parse_subexpr(p,opl);
@ -1404,7 +1404,7 @@ const char* parse_expr(const char *p)
switch(*p){ switch(*p){
case ')': case ';': case ':': case '[': case ']': case ')': case ';': case ':': case '[': case ']':
case '}': case '}':
disp_error_message("parse_expr: unexpected char",p); disp_error_message("parse_expr: unexpected character",p);
} }
p=parse_subexpr(p,-1); p=parse_subexpr(p,-1);
return p; return p;
@ -1455,10 +1455,10 @@ const char* parse_line(const char* p)
if(parse_syntax_for_flag) { if(parse_syntax_for_flag) {
if( *p != ')' ) if( *p != ')' )
disp_error_message("parse_line: need ')'",p); disp_error_message("parse_line: expected ')'",p);
} else { } else {
if( *p != ';' ) if( *p != ';' )
disp_error_message("parse_line: need ';'",p); disp_error_message("parse_line: expected ';'",p);
} }
//Binding decision for if(), for(), while() //Binding decision for if(), for(), while()
@ -1562,7 +1562,7 @@ const char* parse_syntax(const char* p)
} }
p = skip_space(p2); p = skip_space(p2);
if(*p != ';') if(*p != ';')
disp_error_message("parse_syntax: need ';'",p); disp_error_message("parse_syntax: expected ';'",p);
// Closing decision if, for , while // Closing decision if, for , while
p = parse_syntax_close(p + 1); p = parse_syntax_close(p + 1);
return p; return p;
@ -1595,7 +1595,7 @@ const char* parse_syntax(const char* p)
//Decision statement switch //Decision statement switch
p = skip_space(p2); p = skip_space(p2);
if(p == p2) { if(p == p2) {
disp_error_message("parse_syntax: expect space ' '",p); disp_error_message("parse_syntax: expected a space ' '",p);
} }
// check whether case label is integer or not // check whether case label is integer or not
v = strtol(p,&np,0); v = strtol(p,&np,0);
@ -1605,14 +1605,14 @@ const char* parse_syntax(const char* p)
memcpy(label,p,v); memcpy(label,p,v);
label[v]='\0'; label[v]='\0';
if( !script_get_constant(label, &v) ) if( !script_get_constant(label, &v) )
disp_error_message("parse_syntax: 'case' label not integer",p); disp_error_message("parse_syntax: 'case' label is not an integer",p);
p = skip_word(p); p = skip_word(p);
} else { //Numeric value } else { //Numeric value
if((*p == '-' || *p == '+') && ISDIGIT(p[1])) // pre-skip because '-' can not skip_word if((*p == '-' || *p == '+') && ISDIGIT(p[1])) // pre-skip because '-' can not skip_word
p++; p++;
p = skip_word(p); p = skip_word(p);
if(np != p) if(np != p)
disp_error_message("parse_syntax: 'case' label not integer",np); disp_error_message("parse_syntax: 'case' label is not an integer",np);
} }
p = skip_space(p); p = skip_space(p);
if(*p != ':') if(*p != ':')
@ -1670,7 +1670,7 @@ const char* parse_syntax(const char* p)
} }
p = skip_space(p2); p = skip_space(p2);
if(*p != ';') if(*p != ';')
disp_error_message("parse_syntax: need ';'",p); disp_error_message("parse_syntax: expected ';'",p);
//Closing decision if, for , while //Closing decision if, for , while
p = parse_syntax_close(p + 1); p = parse_syntax_close(p + 1);
return p; return p;
@ -1691,7 +1691,7 @@ const char* parse_syntax(const char* p)
// Put the label location // Put the label location
p = skip_space(p2); p = skip_space(p2);
if(*p != ':') { if(*p != ':') {
disp_error_message("parse_syntax: need ':'",p); disp_error_message("parse_syntax: expected ':'",p);
} }
sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count); sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label); l=add_str(label);
@ -1744,7 +1744,7 @@ const char* parse_syntax(const char* p)
p=skip_space(p2); p=skip_space(p2);
if(*p != '(') if(*p != '(')
disp_error_message("parse_syntax: need '('",p); disp_error_message("parse_syntax: expected '('",p);
p++; p++;
// Execute the initialization statement // Execute the initialization statement
@ -1772,7 +1772,7 @@ const char* parse_syntax(const char* p)
add_scriptc(C_FUNC); add_scriptc(C_FUNC);
} }
if(*p != ';') if(*p != ';')
disp_error_message("parse_syntax: need ';'",p); disp_error_message("parse_syntax: expected ';'",p);
p++; p++;
// Skip to the beginning of the loop // Skip to the beginning of the loop
@ -1914,7 +1914,7 @@ const char* parse_syntax(const char* p)
p=parse_expr(p); p=parse_expr(p);
p=skip_space(p); p=skip_space(p);
if(*p != '{') { if(*p != '{') {
disp_error_message("parse_syntax: need '{'",p); disp_error_message("parse_syntax: expected '{'",p);
} }
add_scriptc(C_FUNC); add_scriptc(C_FUNC);
return p + 1; return p + 1;
@ -2053,7 +2053,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
p = skip_space(p); p = skip_space(p);
p2 = skip_word(p); p2 = skip_word(p);
if(p2 - p != 5 || strncasecmp(p,"while",5)) if(p2 - p != 5 || strncasecmp(p,"while",5))
disp_error_message("parse_syntax: need 'while'",p); disp_error_message("parse_syntax: expected 'while'",p);
p = skip_space(p2); p = skip_space(p2);
if(*p != '(') { if(*p != '(') {
@ -2083,7 +2083,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
set_label(l,script_pos,p); set_label(l,script_pos,p);
p = skip_space(p); p = skip_space(p);
if(*p != ';') { if(*p != ';') {
disp_error_message("parse_syntax: need ';'",p); disp_error_message("parse_syntax: expected ';'",p);
return p+1; return p+1;
} }
p++; p++;
@ -14500,7 +14500,7 @@ BUILDIN_FUNC(setnpcdisplay)
class_ = conv_num(st,data); class_ = conv_num(st,data);
else else
{ {
ShowError("script:setnpcdisplay: expected a string or number\n"); ShowError("script:setnpcdisplay: expected string or number\n");
script_reportdata(data); script_reportdata(data);
return 1; return 1;
} }