Commit 1008ab14 authored by Victor Stinner's avatar Victor Stinner

Recorded merge of revisions 80846 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r80846 | victor.stinner | 2010-05-06 02:08:46 +0200 (jeu., 06 mai 2010) | 20 lines

  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 c47f24d0
......@@ -462,6 +462,11 @@ convertenviron(void)
#else
char **e;
#endif
#if defined(PYOS_OS2)
APIRET rc;
char buffer[1024]; /* OS/2 Provides a Documented Max of 1024 Chars */
#endif
d = PyDict_New();
if (d == NULL)
return NULL;
......@@ -532,10 +537,6 @@ convertenviron(void)
}
#endif
#if defined(PYOS_OS2)
{
APIRET rc;
char buffer[1024]; /* OS/2 Provides a Documented Max of 1024 Chars */
rc = DosQueryExtLIBPATH(buffer, BEGIN_LIBPATH);
if (rc == NO_ERROR) { /* (not a type, envname is NOT 'BEGIN_LIBPATH') */
PyObject *v = PyBytes_FromString(buffer);
......@@ -548,7 +549,6 @@ convertenviron(void)
PyDict_SetItemString(d, "ENDLIBPATH", v);
Py_DECREF(v);
}
}
#endif
return d;
}
......@@ -666,7 +666,7 @@ convert_to_unicode(PyObject **param)
/**********************************************************************
* Helper Function to Trim and Format OS/2 Messages
**********************************************************************/
static void
static void
os2_formatmsg(char *msgbuf, int msglen, char *reason)
{
msgbuf[msglen] = '\0'; /* OS/2 Doesn't Guarantee a Terminator */
......@@ -696,7 +696,7 @@ os2_formatmsg(char *msgbuf, int msglen, char *reason)
* the file OSO001.MSG in the \OS2 directory hierarchy.
*
**********************************************************************/
static char *
static char *
os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
{
APIRET rc;
......@@ -721,7 +721,8 @@ os2_strerror(char *msgbuf, int msgbuflen, int errorcode, char *reason)
errors are not in a global variable e.g. 'errno' nor are
they congruent with posix error numbers. */
static PyObject * os2_error(int code)
static PyObject *
os2_error(int code)
{
char text[1024];
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