Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

  Untabify C files. Will watch buildbots.
........
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index bf5d58d..7e475da 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -165,7 +165,7 @@
     PyObject *result_object;
 
     if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale))
-        return NULL;
+    return NULL;
 
     if (locale) {
         /* set locale */
@@ -272,7 +272,7 @@
 {
 #if !defined(HAVE_WCSCOLL) || !defined(Py_USING_UNICODE)
     char *s1,*s2;
-    
+
     if (!PyArg_ParseTuple(args, "ss:strcoll", &s1, &s2))
         return NULL;
     return PyInt_FromLong(strcoll(s1, s2));
@@ -280,7 +280,7 @@
     PyObject *os1, *os2, *result = NULL;
     wchar_t *ws1 = NULL, *ws2 = NULL;
     int rel1 = 0, rel2 = 0, len1, len2;
-    
+
     if (!PyArg_UnpackTuple(args, "strcoll", 2, 2, &os1, &os2))
         return NULL;
     /* If both arguments are byte strings, use strcoll.  */
@@ -305,7 +305,7 @@
                 Py_DECREF(os1);
             }
             return NULL;
-        } 
+        }
         rel2 = 1;
     }
     /* Convert the unicode strings to wchar[]. */
@@ -434,7 +434,7 @@
         /* This leaks an object. */
         name = CFStringConvertEncodingToIANACharSetName(enc);
     }
-    return (char *)CFStringGetCStringPtr(name, 0); 
+    return (char *)CFStringGetCStringPtr(name, 0);
 }
 
 static PyObject*
@@ -447,9 +447,9 @@
 #ifdef HAVE_LANGINFO_H
 #define LANGINFO(X) {#X, X}
 static struct langinfo_constant{
-	char* name;
-	int value;
-} langinfo_constants[] = 
+    char* name;
+    int value;
+} langinfo_constants[] =
 {
     /* These constants should exist on any langinfo implementation */
     LANGINFO(DAY_1),
@@ -567,12 +567,12 @@
        returns numeric values in the char* return value, which would
        crash PyString_FromString.  */
     for (i = 0; langinfo_constants[i].name; i++)
-        if (langinfo_constants[i].value == item) {
-            /* Check NULL as a workaround for GNU libc's returning NULL
-               instead of an empty string for nl_langinfo(ERA).  */
-            const char *result = nl_langinfo(item);
-            return PyString_FromString(result != NULL ? result : "");
-        }
+    if (langinfo_constants[i].value == item) {
+        /* Check NULL as a workaround for GNU libc's returning NULL
+           instead of an empty string for nl_langinfo(ERA).  */
+        const char *result = nl_langinfo(item);
+        return PyString_FromString(result != NULL ? result : "");
+    }
     PyErr_SetString(PyExc_ValueError, "unsupported langinfo constant");
     return NULL;
 }
@@ -587,10 +587,10 @@
 static PyObject*
 PyIntl_gettext(PyObject* self, PyObject *args)
 {
-	char *in;
-	if (!PyArg_ParseTuple(args, "s", &in))
-		return 0;
-	return PyString_FromString(gettext(in));
+    char *in;
+    if (!PyArg_ParseTuple(args, "s", &in))
+        return 0;
+    return PyString_FromString(gettext(in));
 }
 
 PyDoc_STRVAR(dgettext__doc__,
@@ -600,10 +600,10 @@
 static PyObject*
 PyIntl_dgettext(PyObject* self, PyObject *args)
 {
-	char *domain, *in;
-	if (!PyArg_ParseTuple(args, "zs", &domain, &in))
-		return 0;
-	return PyString_FromString(dgettext(domain, in));
+    char *domain, *in;
+    if (!PyArg_ParseTuple(args, "zs", &domain, &in))
+        return 0;
+    return PyString_FromString(dgettext(domain, in));
 }
 
 PyDoc_STRVAR(dcgettext__doc__,
@@ -613,11 +613,11 @@
 static PyObject*
 PyIntl_dcgettext(PyObject *self, PyObject *args)
 {
-	char *domain, *msgid;
-	int category;
-	if (!PyArg_ParseTuple(args, "zsi", &domain, &msgid, &category))
-		return 0;
-	return PyString_FromString(dcgettext(domain,msgid,category));
+    char *domain, *msgid;
+    int category;
+    if (!PyArg_ParseTuple(args, "zsi", &domain, &msgid, &category))
+        return 0;
+    return PyString_FromString(dcgettext(domain,msgid,category));
 }
 
 PyDoc_STRVAR(textdomain__doc__,
@@ -627,15 +627,15 @@
 static PyObject*
 PyIntl_textdomain(PyObject* self, PyObject* args)
 {
-	char *domain;
-	if (!PyArg_ParseTuple(args, "z", &domain))
-		return 0;
-	domain = textdomain(domain);
-	if (!domain) {
-		PyErr_SetFromErrno(PyExc_OSError);
-		return NULL;
-	}
-	return PyString_FromString(domain);
+    char *domain;
+    if (!PyArg_ParseTuple(args, "z", &domain))
+        return 0;
+    domain = textdomain(domain);
+    if (!domain) {
+        PyErr_SetFromErrno(PyExc_OSError);
+        return NULL;
+    }
+    return PyString_FromString(domain);
 }
 
 PyDoc_STRVAR(bindtextdomain__doc__,
@@ -645,19 +645,19 @@
 static PyObject*
 PyIntl_bindtextdomain(PyObject* self,PyObject*args)
 {
-	char *domain, *dirname;
-	if (!PyArg_ParseTuple(args, "sz", &domain, &dirname))
-		return 0;
-	if (!strlen(domain)) {
-		PyErr_SetString(Error, "domain must be a non-empty string");
-		return 0;
-	}
-	dirname = bindtextdomain(domain, dirname);
-	if (!dirname) {
-		PyErr_SetFromErrno(PyExc_OSError);
-		return NULL;
-	}
-	return PyString_FromString(dirname);
+    char *domain, *dirname;
+    if (!PyArg_ParseTuple(args, "sz", &domain, &dirname))
+        return 0;
+    if (!strlen(domain)) {
+        PyErr_SetString(Error, "domain must be a non-empty string");
+        return 0;
+    }
+    dirname = bindtextdomain(domain, dirname);
+    if (!dirname) {
+        PyErr_SetFromErrno(PyExc_OSError);
+        return NULL;
+    }
+    return PyString_FromString(dirname);
 }
 
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
@@ -668,26 +668,26 @@
 static PyObject*
 PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args)
 {
-	char *domain,*codeset;
-	if (!PyArg_ParseTuple(args, "sz", &domain, &codeset))
-		return NULL;
-	codeset = bind_textdomain_codeset(domain, codeset);
-	if (codeset)
-		return PyString_FromString(codeset);
-	Py_RETURN_NONE;
+    char *domain,*codeset;
+    if (!PyArg_ParseTuple(args, "sz", &domain, &codeset))
+        return NULL;
+    codeset = bind_textdomain_codeset(domain, codeset);
+    if (codeset)
+        return PyString_FromString(codeset);
+    Py_RETURN_NONE;
 }
 #endif
 
 #endif
 
 static struct PyMethodDef PyLocale_Methods[] = {
-  {"setlocale", (PyCFunction) PyLocale_setlocale, 
+  {"setlocale", (PyCFunction) PyLocale_setlocale,
    METH_VARARGS, setlocale__doc__},
-  {"localeconv", (PyCFunction) PyLocale_localeconv, 
+  {"localeconv", (PyCFunction) PyLocale_localeconv,
    METH_NOARGS, localeconv__doc__},
-  {"strcoll", (PyCFunction) PyLocale_strcoll, 
+  {"strcoll", (PyCFunction) PyLocale_strcoll,
    METH_VARARGS, strcoll__doc__},
-  {"strxfrm", (PyCFunction) PyLocale_strxfrm, 
+  {"strxfrm", (PyCFunction) PyLocale_strxfrm,
    METH_VARARGS, strxfrm__doc__},
 #if defined(MS_WINDOWS) || defined(__APPLE__)
   {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, METH_NOARGS},
@@ -711,7 +711,7 @@
   {"bind_textdomain_codeset",(PyCFunction)PyIntl_bind_textdomain_codeset,
    METH_VARARGS, bind_textdomain_codeset__doc__},
 #endif
-#endif  
+#endif
   {NULL, NULL}
 };
 
@@ -725,7 +725,7 @@
 
     m = Py_InitModule("_locale", PyLocale_Methods);
     if (m == NULL)
-    	return;
+    return;
 
     d = PyModule_GetDict(m);
 
@@ -772,13 +772,13 @@
 
 #ifdef HAVE_LANGINFO_H
     for (i = 0; langinfo_constants[i].name; i++) {
-	    PyModule_AddIntConstant(m, langinfo_constants[i].name,
-				    langinfo_constants[i].value);
+        PyModule_AddIntConstant(m, langinfo_constants[i].name,
+                                langinfo_constants[i].value);
     }
 #endif
 }
 
-/* 
+/*
 Local variables:
 c-basic-offset: 4
 indent-tabs-mode: nil