equal
deleted
inserted
replaced
243 struct pos *pos; |
243 struct pos *pos; |
244 int t; |
244 int t; |
245 |
245 |
246 /* allocate and fill arrays */ |
246 /* allocate and fill arrays */ |
247 t = equatelines(a, an, b, bn); |
247 t = equatelines(a, an, b, bn); |
248 pos = (struct pos *)calloc(bn, sizeof(struct pos)); |
248 pos = (struct pos *)calloc(bn ? bn : 1, sizeof(struct pos)); |
249 /* we can't have more matches than lines in the shorter file */ |
249 /* we can't have more matches than lines in the shorter file */ |
250 l.head = l.base = (struct hunk *)malloc(sizeof(struct hunk) * |
250 l.head = l.base = (struct hunk *)malloc(sizeof(struct hunk) * |
251 ((an<bn ? an:bn) + 1)); |
251 ((an<bn ? an:bn) + 1)); |
252 |
252 |
253 if (pos && l.base && t) { |
253 if (pos && l.base && t) { |