Use new scr_* functions
authorMyhailo Danylenko <isbear@ukrpost.net>
Thu, 25 Mar 2010 21:03:23 +0200
changeset 10 14987412be3b
parent 9 70bb1e988a4a
child 11 5bbf342f450a
Use new scr_* functions
yaubil.c
--- a/yaubil.c	Sun Mar 14 23:14:37 2010 +0200
+++ b/yaubil.c	Thu Mar 25 21:03:23 2010 +0200
@@ -37,7 +37,7 @@
 
 static module_info_t info_yaubil_experimental = {
 	.branch      = "experimental",
-	.api         = 5,
+	.api         = 10,
 	.version     = PROJECT_VERSION,
 	.description = DESCRIPTION,
 	.requires    = NULL,
@@ -48,7 +48,7 @@
 
 module_info_t info_yaubil = {
 	.branch      = "dev",
-	.api         = 4,
+	.api         = 11,
 	.version     = PROJECT_VERSION,
 	.description = DESCRIPTION,
 	.requires    = NULL,
@@ -354,7 +354,7 @@
 
 	if (l->type == TYPE_INT && r->type == TYPE_INT) {
 		if (r->int_value == 0) {
-			scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "/: Error: division by zero.");
+			scr_log_print (LPRINT_NORMAL, MSGPREFIX "/: Error: division by zero.");
 			return FALSE;
 		}
 		l->int_value /= r->int_value;
@@ -390,7 +390,7 @@
 
 	if (l->type == TYPE_INT && r->type == TYPE_INT) {
 		if (r->int_value == 0) {
-			scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "%%: Error: division by zero.");
+			scr_log_print (LPRINT_NORMAL, MSGPREFIX "%%: Error: division by zero.");
 			return FALSE;
 		}
 		l->int_value %= r->int_value;
@@ -663,7 +663,7 @@
 						};
 
 						if (!finished) {
-							scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "Error: Unmatched quote.");
+							scr_log_print (LPRINT_NORMAL, MSGPREFIX "Error: Unmatched quote.");
 							g_string_free (v, TRUE);
 							g_free (val.str_value);
 							return NULL;
@@ -698,7 +698,7 @@
 					value_t *n   = process_expression (p + 1, &len);
 					
 					if (!n) {
-						scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "Error: Error in subexpression.");
+						scr_log_print (LPRINT_NORMAL, MSGPREFIX "Error: Error in subexpression.");
 						g_free (val.str_value);
 						return NULL;
 					}
@@ -711,7 +711,7 @@
 					p += len + 1;
 
 				} else {
-					scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "Error: unrecognized symbols.");
+					scr_log_print (LPRINT_NORMAL, MSGPREFIX "Error: unrecognized symbols.");
 					g_free (val.str_value);
 					return NULL;
 				}
@@ -719,7 +719,7 @@
 				if (state == STATE_RVALUE) {
 					if (op->handler) {
 						if (!op->handler (&val, &rval)) {
-							scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "Error: operand argument types mismatch.");
+							scr_log_print (LPRINT_NORMAL, MSGPREFIX "Error: operand argument types mismatch.");
 							g_free (val.str_value);
 							g_free (rval.str_value);
 							return NULL;
@@ -755,7 +755,7 @@
 				}
 
 				if (!found) {
-					scr_LogPrint (LPRINT_NORMAL, MSGPREFIX "Error: unknown operator.");
+					scr_log_print (LPRINT_NORMAL, MSGPREFIX "Error: unknown operator.");
 					g_free (val.str_value);
 				}
 			}
@@ -786,14 +786,14 @@
 	value_t *val = process_expression (arg, &len);
 
 	if (!val) {
-		scr_LogPrint (LPRINT_NORMAL, "eval: Evaluation error.");
+		scr_log_print (LPRINT_NORMAL, "eval: Evaluation error.");
 		return;
 	}
 
 	if (val->type == TYPE_STR)
 		process_command (val->str_value, TRUE);
 	else
-		scr_LogPrint (LPRINT_NORMAL, "eval: Expression does not result in string.");
+		scr_log_print (LPRINT_NORMAL, "eval: Expression does not result in string.");
 
 	destroy_value (val);
 }
@@ -806,7 +806,7 @@
 	char     *val     = strchr (arg, '=');
 
 	if (!val) {
-		scr_LogPrint (LPRINT_NORMAL, "let: Syntax error: no equal sign in line.");
+		scr_log_print (LPRINT_NORMAL, "let: Syntax error: no equal sign in line.");
 		return;
 	}
 	
@@ -815,7 +815,7 @@
 
 		for (p = val - 1; p >= arg && *p == ' '; --p);
 		if (p < arg) {
-			scr_LogPrint (LPRINT_NORMAL, "let: Syntax error: no destination variable name specified.");
+			scr_log_print (LPRINT_NORMAL, "let: Syntax error: no destination variable name specified.");
 			return;
 		}
 
@@ -829,7 +829,7 @@
 	}
 
 	if (!value) {
-		scr_LogPrint (LPRINT_NORMAL, "let: Evaluation error.");
+		scr_log_print (LPRINT_NORMAL, "let: Evaluation error.");
 		return;
 	}
 
@@ -858,7 +858,7 @@
 	value_t *val = process_expression (arg, &len);
 
 	if (!val) {
-		scr_LogPrint (LPRINT_NORMAL, "if: Evaluation error.");
+		scr_log_print (LPRINT_NORMAL, "if: Evaluation error.");
 		return;
 	}