src/util.c
static void splitnamevalue(const char *line, int linelen, char **name,
                           char **value)
{
    char *equal; // position of first = sign in line

    equal = strchr(line, '=');
    if(equal && equal != line) {
        /* 1. name */
        // from first char to before =
        *name = remove_whitespace((char *)line, equal - 1);
        /* 2. value */
        // from after = to the last character of line
        *value = remove_whitespace(equal + 1, (char *)line + linelen - 1);

    } else if(equal != line) {
        /* check if it as name without = value statement */
        *name = remove_whitespace((char *)line, (char *)line + linelen - 1);
        *value = NULL;
    } else {
        // funny text starting with =. E.g. "=value"
        *name = NULL;
        *value = NULL;
    }
}
/* Split a line at = sign into name and value pair
   Remove " ", TAB and Newline from around names and values
   Return NULL for name and value if there is no = sign in line
   Return newly allocated strings otherwise
   Used by: esimmon_internal_text_to_name_value_pairs
 */
Split a line at = sign into name and value pair
Remove " ", TAB and Newline from around names and values
Return NULL for name and value if there is no = sign in line
Return newly allocated strings otherwise
Used by: esimmon_internal_text_to_name_value_pairs
Split a line at = sign into name and value pair Remove " " TAB and Newline from around names and values Return NULL for name and value if there is no = sign in line Return newly allocated strings otherwise Used by : esimmon_internal_text_to_name_value_pairs
static void splitnamevalue(const char *line, int linelen, char **name,
                           char **value)
{
    char *equal; 
    equal = strchr(line, '=');
    if(equal && equal != line) {
        *name = remove_whitespace((char *)line, equal - 1);
        *value = remove_whitespace(equal + 1, (char *)line + linelen - 1);
    } else if(equal != line) {
        *name = remove_whitespace((char *)line, (char *)line + linelen - 1);
        *value = NULL;
    } else {
        *name = NULL;
        *value = NULL;
    }
}
static void splitnamevalue ( const char * line , int linelen , char * * name , char * * value ) { char * equal ; equal = strchr ( line , ' ' ) ; if ( equal && equal != line ) { * name = remove_whitespace ( ( char * ) line , equal - 1 ) ; * value = remove_whitespace ( equal + 1 , ( char * ) line + linelen - 1 ) ; } else if ( equal != line ) { * name = remove_whitespace ( ( char * ) line , ( char * ) line + linelen - 1 ) ; * value = NULL ; } else { * name = NULL ; * value = NULL ; } }
Split a line at = sign into name and value pair
Remove " ", TAB and Newline from around names and values
Return NULL for name and value if there is no = sign in line
Return newly allocated strings otherwise
Used by: esimmon_internal_text_to_name_value_pairs
Split a line at = sign into name and value pair Remove " " TAB and Newline from around names and values Return NULL for name and value if there is no = sign in line Return newly allocated strings otherwise Used by : esimmon_internal_text_to_name_value_pairs
// position of first = sign in line /* 1. name */ // from first char to before = /* 2. value */ // from after = to the last character of line /* check if it as name without = value statement */ // funny text starting with =. E.g. "=value"