Index: pobyso.c
===================================================================
--- pobyso.c	(revision 131)
+++ pobyso.c	(revision 132)
@@ -42,92 +42,7 @@
   va_end(va);
 } /* End pobyso_autoprint. */
 
-/* @see pobyso.h#pobyso_parse*/
-pobyso_func_exp_t
-pobyso_parse(const char* expression)
-{
-  int expressionLength, i;
-  char *expressionWithSemiCo;
-  sollya_obj_t expressionStringSa;
-  sollya_obj_t expressionSa;
 
-  /* Arguments check. */
-  if (expression == NULL)
-  {
-    pobyso_error_message("pobyso_parse",
-                        "NULL_POINTER_ARGUMENT",
-                        "The expression is a NULL pointer");
-    return(sollya_lib_error());
-  }
-  expressionLength = strlen(expression);
-  if (expressionLength == 0)
-  {
-    pobyso_error_message("pobyso_parse",
-                        "EMPTY_STRING_ARGUMENT",
-                        "The expression is an empty string");
-    return(sollya_lib_error());
-  }
-  /* Search from the last char of the expression until, whichever happens
-   * first:
-   * a ";" is found;
-   * a char  != ';' is found the the ";" is appended.
-   * If the head of the string is reached before any of these two events happens
-   * return an error.
-   */
-  for (i = expressionLength - 1 ; i >= 0 ; i--)
-  {
-    if (expression[i] == ';') /* Nothing special to do:
-                                 try to parse the string*/
-    {
-      /* This ugly cast comes from a deficient definition in Sollya:
-         sollya_lib_string does not take a const char * argument. */
-      expressionStringSa = sollya_lib_string((char*)expression);
-      expressionSa = sollya_lib_parse(expressionStringSa);
-      sollya_lib_free(expressionStringSa);
-      return(expressionSa);
-    }
-    else
-    {
-      if (expression[i] == ' ' || expression[i] == '\t') /* A blank,
-                                                           just continue. */
-      {
-        continue;
-      }
-      else /* a character != ';' and from a blank: create the ';'ed string. */
-      {
-        /* Create a new string for the expression, add the ";" and
-         * and call sollya_lib_parse_string. */
-        expressionWithSemiCo = calloc(i + 3, sizeof(char));
-        if (expressionWithSemiCo == NULL)
-        {
-          pobyso_error_message("pobyso_parse",
-                                "MEMORY_ALLOCATION_ERROR",
-                                "Could not allocate the expression string");
-          return(sollya_lib_error());
-        }
-        strncpy(expressionWithSemiCo, expression, i + 1);
-        expressionWithSemiCo[i + 1] = ';';
-        expressionWithSemiCo[i + 2] = '\0';
-        expressionStringSa = sollya_lib_string(expressionWithSemiCo);
-        expressionSa = sollya_lib_parse(expressionStringSa);
-        free(expressionWithSemiCo);
-        sollya_lib_free(expressionStringSa);
-        return(expressionSa);
-      } /* End character != ';' and from a blank. */
-    /* Create a new string for the expression, add the ";" and
-     * and call sollya_lib_parse_string. */
-    } /* End else. */
-  } /* End for. */
-  /* We get here, it is because we did not find any char == anything different
-   * from ' ' or '\t': the string is empty.
-   */
-  pobyso_error_message("pobyso_parse_string",
-                       "ONLY_BLANK_ARGUMENT",
-                        "The expression is only made of blanks");
-  return(sollya_lib_error());
-
-} /* pobyso_parse_string */
-
 /* @see pobyso.h#pobyso_parse_string*/
 pobyso_func_exp_t
 pobyso_parse_string(const char* expression)
@@ -150,7 +65,7 @@
     pobyso_error_message("pobyso_parse_string",
                         "EMPTY_STRING_ARGUMENT",
                         "The expression is an empty string");
-    return(sollya_lib_error());
+    return sollya_lib_error();
   }
   /* Search from the last char of the expression until, whichever happens
    * first:
@@ -165,7 +80,7 @@
                                  try to parse the string*/
     {
       expressionSa = sollya_lib_parse_string(expression);
-      return(expressionSa);
+      return expressionSa;
     }
     else
     {
@@ -184,14 +99,14 @@
           pobyso_error_message("pobyso_parse_string",
                                 "MEMORY_ALLOCATION_ERROR",
                                 "Could not allocate the expression string");
-          return(sollya_lib_error());
+          return sollya_lib_error();
         }
-        strncpy(expressionWithSemiCo, expression, i + 1);
+        strncpy(expressionWithSemiCo, expression, i+1);
         expressionWithSemiCo[i + 1] = ';';
         expressionWithSemiCo[i + 2] = '\0';
         expressionSa = sollya_lib_parse_string(expressionWithSemiCo);
         free(expressionWithSemiCo);
-        return(expressionSa);
+        return expressionSa;
       } /* End character != ';' and from a blank. */
     /* Create a new string for the expression, add the ";" and
      * and call sollya_lib_parse_string. */
@@ -207,7 +122,47 @@
 
 } /* pobyso_parse_string */
 
-sollya_verbosity_t
+pobyso_func_exp_t
+pobyso_remez_canonical_monomials_base(pobyso_func_exp_t function,
+                                      long int degree,
+                                      pobyso_range_t interval,
+                                      pobyso_func_exp_t weight,
+                                      double quality,
+                                      pobyso_range_t bounds)
+{
+  sollya_obj_t  degreeSa = NULL;
+  sollya_obj_t qualitySa = NULL;
+
+  degreeSa = sollya_lib_constant_from_int(degree);
+  qualitySa = sollya_lib_constant_from_double(quality);
+
+  return NULL;
+} /* End pobyso_remez_canonical_monomials_base. */
+
+int
+pobyso_set_canonical_on()
+{
+  pobyso_on_off_t currentCanonicalModeSo;
+  int currentCanonicalMode;
+  pobyso_on_off_t on;
+
+  on = sollya_lib_on();
+  currentCanonicalModeSo = sollya_lib_get_canonical();
+  if (sollya_lib_is_on(currentCanonicalModeSo))
+  {
+    currentCanonicalMode = POBYSO_ON;
+  }
+  else
+  {
+    currentCanonicalMode = POBYSO_OFF;
+  }
+  sollya_lib_set_canonical(on);
+  sollya_lib_clear_obj(on);
+  sollya_lib_clear_obj(currentCanonicalModeSo);
+  return currentCanonicalMode;
+} /* End pobyso_set_canonical_on. */
+
+pobyso_sollya_verbosity_t
 pobyso_set_verbosity_off()
 {
   sollya_obj_t verbosityLevelZero;
@@ -220,15 +175,15 @@
   return(currentVerbosityLevel);
 } /* End of pobyso_set_verbosity_off. */
 
-sollya_verbosity_t
-pobyso_set_verbosity_to(sollya_obj_t newVerbosityLevel)
+pobyso_sollya_verbosity_t
+pobyso_set_verbosity_to(pobyso_sollya_verbosity_t newVerbosityLevel)
 {
   sollya_obj_t currentVerbosityLevel = NULL;
   if (newVerbosityLevel == NULL)
   {
     pobyso_error_message("pobyso_set_verbosity_to",
                         "NULL_POINTER_ARGUMENT",
-                        "The new verbosity level is a NULL pointer");
+                        "The new verbosity level is a null pointer");
     return(sollya_lib_error());
   }
   currentVerbosityLevel = sollya_lib_get_verbosity();
@@ -236,6 +191,24 @@
   return(currentVerbosityLevel);
 } /* End of pobyso_set_verbosity_to. */
 
+pobyso_sollya_verbosity_t
+pobyso_set_verbosity_to_int(int intVerbosityLevel)
+{
+  sollya_obj_t currentVerbosityLevel = NULL;
+  sollya_obj_t newVerbosityLevel     = NULL;
+  if (intVerbosityLevel < 0)
+  {
+    pobyso_error_message("pobyso_set_verbosity_to",
+                        "INVALID_VALUE",
+                        "The new verbosity level is a negative number");
+    return(sollya_lib_error());
+  }
+  newVerbosityLevel = sollya_lib_constant_from_int(intVerbosityLevel);
+  currentVerbosityLevel = sollya_lib_get_verbosity();
+  sollya_lib_set_verbosity(newVerbosityLevel);
+  return(currentVerbosityLevel);
+} /* End of pobyso_set_verbosity_to_int. */
+
 /* Attic from the sollya_lib < 4. */
 #if 0
 chain*
