2016-03-07 11:00:47 +01:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "../text.h"
|
|
|
|
#include "../util.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
linecmp(struct line *a, struct line *b)
|
|
|
|
{
|
|
|
|
int res = 0;
|
|
|
|
|
2016-05-14 18:56:55 -07:00
|
|
|
if (!(res = memcmp(a->data, b->data, MIN(a->len, b->len))))
|
|
|
|
res = a->len - b->len;
|
2016-03-07 11:00:47 +01:00
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|