Some additional space/tab cleanups
authorThomas Arendsen Hein <thomas@intevation.de>
Mon, 20 Oct 2008 15:19:05 +0200
changeset 7190 aecea6934fdd
parent 7189 8bbbba2a1a9c
child 7194 040e325e4f69
Some additional space/tab cleanups
mercurial/base85.c
mercurial/osutil.c
mercurial/parsers.c
mercurial/strutil.py
--- a/mercurial/base85.c	Mon Oct 20 14:58:49 2008 +0200
+++ b/mercurial/base85.c	Mon Oct 20 15:19:05 2008 +0200
@@ -33,19 +33,19 @@
 	char *dst;
 	int len, olen, i;
 	unsigned int acc, val, ch;
-        int pad = 0;
+	int pad = 0;
 
 	if (!PyArg_ParseTuple(args, "s#|i", &text, &len, &pad))
 		return NULL;
 
-        if (pad)
-                olen = ((len + 3) / 4 * 5) - 3;
-        else {
-                olen = len % 4;
-                if (olen)
-                        olen++;
-                olen += len / 4 * 5;
-        }
+	if (pad)
+		olen = ((len + 3) / 4 * 5) - 3;
+	else {
+		olen = len % 4;
+		if (olen)
+			olen++;
+		olen += len / 4 * 5;
+	}
 	if (!(out = PyString_FromStringAndSize(NULL, olen + 3)))
 		return NULL;
 
@@ -67,8 +67,8 @@
 		dst += 5;
 	}
 
-        if (!pad)
-                _PyString_Resize(&out, olen);
+	if (!pad)
+		_PyString_Resize(&out, olen);
 
 	return out;
 }
@@ -140,9 +140,9 @@
 
 static PyMethodDef methods[] = {
 	{"b85encode", b85encode, METH_VARARGS,
-         "Encode text in base85.\n\n"
-         "If the second parameter is true, pad the result to a multiple of "
-         "five characters.\n"},
+	 "Encode text in base85.\n\n"
+	 "If the second parameter is true, pad the result to a multiple of "
+	 "five characters.\n"},
 	{"b85decode", b85decode, METH_VARARGS, "Decode base85 text.\n"},
 	{NULL, NULL}
 };
--- a/mercurial/osutil.c	Mon Oct 20 14:58:49 2008 +0200
+++ b/mercurial/osutil.c	Mon Oct 20 15:19:05 2008 +0200
@@ -46,10 +46,10 @@
 #endif
 
 #define listdir_slot(name) \
-    static PyObject *listdir_stat_##name(PyObject *self, void *x) \
-    { \
-        return PyInt_FromLong(((struct listdir_stat *)self)->st.name); \
-    }
+	static PyObject *listdir_stat_##name(PyObject *self, void *x) \
+	{ \
+		return PyInt_FromLong(((struct listdir_stat *)self)->st.name); \
+	}
 
 listdir_slot(st_dev)
 listdir_slot(st_mode)
--- a/mercurial/parsers.c	Mon Oct 20 14:58:49 2008 +0200
+++ b/mercurial/parsers.c	Mon Oct 20 15:19:05 2008 +0200
@@ -144,9 +144,9 @@
 static uint32_t ntohl(uint32_t x)
 {
 	return ((x & 0x000000ffUL) << 24) |
-		((x & 0x0000ff00UL) <<  8) |
-		((x & 0x00ff0000UL) >>  8) |
-		((x & 0xff000000UL) >> 24);
+	       ((x & 0x0000ff00UL) <<  8) |
+	       ((x & 0x00ff0000UL) >>  8) |
+	       ((x & 0xff000000UL) >> 24);
 }
 #else
 /* not windows */
@@ -299,7 +299,7 @@
 
 	while (data < end) {
 		unsigned int step;
-		
+
 		memcpy(decode, data, 64);
 		offset_flags = ntohl(*((uint32_t *) (decode + 4)));
 		if (n == 0) /* mask out version number for the first entry */
@@ -344,9 +344,9 @@
 		return 0;
 	}
 
-	/* create the nullid/nullrev entry in the nodemap and the 
+	/* create the nullid/nullrev entry in the nodemap and the
 	 * magic nullid entry in the index at [-1] */
-	entry = _build_idx_entry(nodemap, 
+	entry = _build_idx_entry(nodemap,
 			nullrev, 0, 0, 0, -1, -1, -1, -1, nullid);
 	if (!entry)
 		return 0;
@@ -372,16 +372,16 @@
 {
 	const char *data;
 	int size, inlined;
-	PyObject *rval = NULL, *index = NULL, *nodemap = NULL, *cache = NULL; 
+	PyObject *rval = NULL, *index = NULL, *nodemap = NULL, *cache = NULL;
 	PyObject *data_obj = NULL, *inlined_obj;
 
 	if (!PyArg_ParseTuple(args, "s#O", &data, &size, &inlined_obj))
 		return NULL;
 	inlined = inlined_obj && PyObject_IsTrue(inlined_obj);
 
-	/* If no data is inlined, we know the size of the index list in 
-	 * advance: size divided by size of one one revlog record (64 bytes) 
-	 * plus one for the nullid */  
+	/* If no data is inlined, we know the size of the index list in
+	 * advance: size divided by size of one one revlog record (64 bytes)
+	 * plus one for the nullid */
 	index = inlined ? PyList_New(0) : PyList_New(size / 64 + 1);
 	if (!index)
 		goto quit;
--- a/mercurial/strutil.py	Mon Oct 20 14:58:49 2008 +0200
+++ b/mercurial/strutil.py	Mon Oct 20 15:19:05 2008 +0200
@@ -37,5 +37,5 @@
     try:
         return s.rsplit(sep, maxsplit)
     except AttributeError:
-        return  [chunk[::-1] for chunk in
-                 s[::-1].split(sep, maxsplit)[::-1]]
+        return [chunk[::-1] for chunk in
+                s[::-1].split(sep, maxsplit)[::-1]]