summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-08 13:47:12 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-08 13:47:12 (GMT)
commitbb71ab68f9c376a5cda676fa35713cea34783fc0 (patch)
tree0f7165cd0f9f44b7f2dc790ba2956ed9ead16874
parent7ba30431ec821ba00c833d451abe047a9ae60aba (diff)
downloadcpython-bb71ab68f9c376a5cda676fa35713cea34783fc0.zip
cpython-bb71ab68f9c376a5cda676fa35713cea34783fc0.tar.gz
cpython-bb71ab68f9c376a5cda676fa35713cea34783fc0.tar.bz2
Reindented some OS/2 and hpux code that looked ugly or at least
inconsistent.
-rw-r--r--Python/importdl.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/Python/importdl.c b/Python/importdl.c
index 5d78bab..93282a3 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -509,24 +509,25 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
{
APIRET rc;
HMODULE hDLL;
- char failreason[256];
+ char failreason[256];
rc = DosLoadModule(failreason,
- sizeof(failreason),
- pathname,
- &hDLL);
+ sizeof(failreason),
+ pathname,
+ &hDLL);
if (rc != NO_ERROR) {
char errBuf[256];
sprintf(errBuf,
- "DLL load failed, rc = %d, problem '%s': %s", rc, failreason);
+ "DLL load failed, rc = %d, problem '%s': %s",
+ rc, failreason);
PyErr_SetString(PyExc_ImportError, errBuf);
return NULL;
}
- rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);
- if (rc != NO_ERROR)
- p = NULL; /* Signify Failure to Acquire Entrypoint */
+ rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);
+ if (rc != NO_ERROR)
+ p = NULL; /* Signify Failure to Acquire Entrypoint */
}
#endif /* PYOS_OS2 */
@@ -574,28 +575,26 @@ _PyImport_LoadDynamicModule(name, pathname, fp)
int flags;
flags = BIND_FIRST | BIND_DEFERRED;
- if (Py_VerboseFlag)
- {
- flags = DYNAMIC_PATH | BIND_FIRST | BIND_IMMEDIATE |
+ if (Py_VerboseFlag) {
+ flags = DYNAMIC_PATH | BIND_FIRST | BIND_IMMEDIATE |
BIND_NONFATAL | BIND_VERBOSE;
- printf("shl_load %s\n",pathname);
- }
- lib = shl_load(pathname, flags, 0);
- /* XXX Chuck Blake once wrote that 0 should be BIND_NOSTART? */
- if (lib == NULL)
- {
- char buf[256];
- if (Py_VerboseFlag)
- perror(pathname);
- sprintf(buf, "Failed to load %.200s", pathname);
- PyErr_SetString(PyExc_ImportError, buf);
- return NULL;
- }
- if (Py_VerboseFlag)
- printf("shl_findsym %s\n", funcname);
- shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p);
- if (p == NULL && Py_VerboseFlag)
- perror(funcname);
+ printf("shl_load %s\n",pathname);
+ }
+ lib = shl_load(pathname, flags, 0);
+ /* XXX Chuck Blake once wrote that 0 should be BIND_NOSTART? */
+ if (lib == NULL) {
+ char buf[256];
+ if (Py_VerboseFlag)
+ perror(pathname);
+ sprintf(buf, "Failed to load %.200s", pathname);
+ PyErr_SetString(PyExc_ImportError, buf);
+ return NULL;
+ }
+ if (Py_VerboseFlag)
+ printf("shl_findsym %s\n", funcname);
+ shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p);
+ if (p == NULL && Py_VerboseFlag)
+ perror(funcname);
}
#endif /* hpux */
#ifdef USE_SHLIB