##// END OF EJS Templates
made C src formatting more consistent
twaldmann@thinkmo.de -
r1542:8e80eefb default
parent child Browse files
Show More
@@ -147,7 +147,7 b' static int equatelines(struct line *a, i'
147 break;
147 break;
148
148
149 a[i].e = j; /* use equivalence class for quick compare */
149 a[i].e = j; /* use equivalence class for quick compare */
150 if(h[j].len <= t)
150 if (h[j].len <= t)
151 a[i].n = h[j].pos; /* point to head of match list */
151 a[i].n = h[j].pos; /* point to head of match list */
152 else
152 else
153 a[i].n = -1; /* too popular */
153 a[i].n = -1; /* too popular */
@@ -270,7 +270,7 b' static PyObject *blocks(PyObject *self, '
270 if (!l.head || !rl)
270 if (!l.head || !rl)
271 goto nomem;
271 goto nomem;
272
272
273 for(h = l.base; h != l.head; h++) {
273 for (h = l.base; h != l.head; h++) {
274 m = Py_BuildValue("iiii", h->a1, h->a2, h->b1, h->b2);
274 m = Py_BuildValue("iiii", h->a1, h->a2, h->b1, h->b2);
275 PyList_SetItem(rl, pos, m);
275 PyList_SetItem(rl, pos, m);
276 pos++;
276 pos++;
@@ -305,7 +305,7 b' static PyObject *bdiff(PyObject *self, P'
305 goto nomem;
305 goto nomem;
306
306
307 /* calculate length of output */
307 /* calculate length of output */
308 for(h = l.base; h != l.head; h++) {
308 for (h = l.base; h != l.head; h++) {
309 if (h->a1 != la || h->b1 != lb)
309 if (h->a1 != la || h->b1 != lb)
310 len += 12 + bl[h->b1].l - bl[lb].l;
310 len += 12 + bl[h->b1].l - bl[lb].l;
311 la = h->a2;
311 la = h->a2;
@@ -320,7 +320,7 b' static PyObject *bdiff(PyObject *self, P'
320 rb = PyString_AsString(result);
320 rb = PyString_AsString(result);
321 la = lb = 0;
321 la = lb = 0;
322
322
323 for(h = l.base; h != l.head; h++) {
323 for (h = l.base; h != l.head; h++) {
324 if (h->a1 != la || h->b1 != lb) {
324 if (h->a1 != la || h->b1 != lb) {
325 len = bl[h->b1].l - bl[lb].l;
325 len = bl[h->b1].l - bl[lb].l;
326 *(uint32_t *)(encode) = htonl(al[la].l - al->l);
326 *(uint32_t *)(encode) = htonl(al[la].l - al->l);
@@ -353,3 +353,4 b' PyMODINIT_FUNC initbdiff(void)'
353 {
353 {
354 Py_InitModule3("bdiff", methods, mdiff_doc);
354 Py_InitModule3("bdiff", methods, mdiff_doc);
355 }
355 }
356
General Comments 0
You need to be logged in to leave comments. Login now