All pastes #638299 Raw Edit

Something

public text v1 · immutable
#638299 ·published 2007-07-29 18:46 UTC
rendered paste body
int c = 0;
    char str1[256], str2[256];
    memset(str1, '\0', 256);
    memset(str2, '\0', 256);

    etk_tree_row_fields_get(row1, col, &str1, NULL);
    printf("Val1: '%s'\n", str1);
    etk_tree_row_fields_get(row2, col, &str2, NULL);
    printf("Comparing '%s' and '%s'\n", str1, str2);
    c = strncmp(str1, str2, 255);
    if( c < 0 )
        return -1;
    else if( c > 0 )
        return 1;
    else
        return 0;