A comparison function used by sort ( ) to compare two suffixes . Compares two pairs , returns 1 if first pair is smaller
int cmp ( struct suffix a , struct suffix b ) { return ( a . rank [ 0 ] == b . rank [ 0 ] ) ? ( a . rank [ 1 ] < b . rank [ 1 ] ? 1 : 0 ) : ( a . rank [ 0 ] < b . rank [ 0 ] ? 1 : 0 ) ; }