- return NULL;
-}
-
-/* This function checks if a string <s> of the format "string1, string2, ..."
- exactly contains a string <s_contained>. */
-
-static boolean string_has_parameter(char *s, char *s_contained)
-{
- char *substring;
-
- if (s == NULL || s_contained == NULL)
- return FALSE;
-
- if (strlen(s_contained) > strlen(s))
- return FALSE;
-
- if (strncmp(s, s_contained, strlen(s_contained)) == 0)
- {
- char next_char = s[strlen(s_contained)];
-
- /* check if next character is delimiter or whitespace */
- return (next_char == ',' || next_char == '\0' ||
- next_char == ' ' || next_char == '\t' ? TRUE : FALSE);
- }
-
- /* check if string contains another parameter string after a comma */
- substring = strchr(s, ',');
- if (substring == NULL) /* string does not contain a comma */
- return FALSE;
-
- /* advance string pointer to next character after the comma */
- substring++;
-
- /* skip potential whitespaces after the comma */
- while (*substring == ' ' || *substring == '\t')
- substring++;
-
- return string_has_parameter(substring, s_contained);
-}
-
-int get_parameter_value(char *value_raw, char *suffix, int type)
-{
- char *value = getStringToLower(value_raw);
- int result = 0; /* probably a save default value */
-
- if (strEqual(suffix, ".direction"))
- {
- result = (strEqual(value, "left") ? MV_LEFT :
- strEqual(value, "right") ? MV_RIGHT :
- strEqual(value, "up") ? MV_UP :
- strEqual(value, "down") ? MV_DOWN : MV_NONE);
- }
- else if (strEqual(suffix, ".position"))
- {
- result = (strEqual(value, "left") ? POS_LEFT :
- strEqual(value, "right") ? POS_RIGHT :
- strEqual(value, "top") ? POS_TOP :
- strEqual(value, "upper") ? POS_UPPER :
- strEqual(value, "middle") ? POS_MIDDLE :
- strEqual(value, "lower") ? POS_LOWER :
- strEqual(value, "bottom") ? POS_BOTTOM :
- strEqual(value, "any") ? POS_ANY : POS_UNDEFINED);
- }
- else if (strEqual(suffix, ".align"))