Commit 8c62be88 authored by Victor Stinner's avatar Victor Stinner

Recorded merge of revisions 80844-80845 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80844 | victor.stinner | 2010-05-06 01:33:33 +0200 (jeu., 06 mai 2010) | 5 lines

  Untabify Modules/posixmodule.c

  Run Antoine Pitrou "untabify" script + manual editions (OS/2 and some
  continuation lines).
........
  r80845 | victor.stinner | 2010-05-06 02:03:44 +0200 (jeu., 06 mai 2010) | 4 lines

  Untabify Modules/posixmodule.c (2)

  Fix some more functions by hand
........

I rewrote the patch for py3k from scratch using untabify + manual editions
parent 6869f0e8
...@@ -445,6 +445,11 @@ convertenviron(void) ...@@ -445,6 +445,11 @@ convertenviron(void)
#else #else
char **e; char **e;
#endif #endif
#if defined(PYOS_OS2)
APIRET rc;
char buffer[1024]; /* OS/2 Provides a Documented Max of 1024 Chars */
#endif
d = PyDict_New(); d = PyDict_New();
if (d == NULL) if (d == NULL)
return NULL; return NULL;
...@@ -515,10 +520,6 @@ convertenviron(void) ...@@ -515,10 +520,6 @@ convertenviron(void)
} }
#endif #endif
#if defined(PYOS_OS2) #if defined(PYOS_OS2)
{
APIRET rc;
char buffer[1024]; /* OS/2 Provides a Documented Max of 1024 Chars */
rc = DosQueryExtLIBPATH(buffer, BEGIN_LIBPATH); rc = DosQueryExtLIBPATH(buffer, BEGIN_LIBPATH);
if (rc == NO_ERROR) { /* (not a type, envname is NOT 'BEGIN_LIBPATH') */ if (rc == NO_ERROR) { /* (not a type, envname is NOT 'BEGIN_LIBPATH') */
PyObject *v = PyBytes_FromString(buffer); PyObject *v = PyBytes_FromString(buffer);
...@@ -531,7 +532,6 @@ convertenviron(void) ...@@ -531,7 +532,6 @@ convertenviron(void)
PyDict_SetItemString(d, "ENDLIBPATH", v); PyDict_SetItemString(d, "ENDLIBPATH", v);
Py_DECREF(v); Py_DECREF(v);
} }
}
#endif #endif
return d; return d;
} }
...@@ -617,7 +617,7 @@ convert_to_unicode(PyObject **param) ...@@ -617,7 +617,7 @@ convert_to_unicode(PyObject **param)
/********************************************************************** /**********************************************************************
* Helper Function to Trim and Format OS/2 Messages * Helper Function to Trim and Format OS/2 Messages
**********************************************************************/ **********************************************************************/
static void static void
os2_formatmsg(char *msgbuf, int msglen, char *reason) os2_formatmsg(char *msgbuf, int msglen, char *reason)
{ {
msgbuf[msglen] = '\0'; /* OS/2 Doesn't Guarantee a Terminator */ msgbuf[msglen] = '\0'; /* OS/2 Doesn't Guarantee a Terminator */
...@@ -647,7 +647,7 @@ os2_formatmsg(char *msgbuf, int msglen, char *reason) ...@@ -647,7 +647,7 @@ os2_formatmsg(char *msgbuf, int msglen, char *reason)
* the file OSO001.MSG in the \OS2 directory hierarchy. * the file OSO001.MSG in the \OS2 directory hierarchy.
* *
**********************************************************************/ **********************************************************************/
static char * static char *
os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason) os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
{ {
APIRET rc; APIRET rc;
...@@ -672,7 +672,8 @@ os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason) ...@@ -672,7 +672,8 @@ os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
errors are not in a global variable e.g. 'errno' nor are errors are not in a global variable e.g. 'errno' nor are
they congruent with posix error numbers. */ they congruent with posix error numbers. */
static PyObject * os2_error(int code) static PyObject *
os2_error(int code)
{ {
char text[1024]; char text[1024];
PyObject *v; PyObject *v;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment