*** /home/trentm/main/contrib/python/dist/src/PC/getpathp.c Thu Jun 1 00:13:40 2000 --- /home/trentm/main/Apps/Perlium/Python/dist/src/PC/getpathp.c Fri Jun 2 15:53:43 2000 *************** *** 134,140 **** reduce(dir) char *dir; { ! int i = strlen(dir); while (i > 0 && !is_sep(dir[i])) --i; dir[i] = '\0'; --- 134,140 ---- reduce(dir) char *dir; { ! size_t i = strlen(dir); while (i > 0 && !is_sep(dir[i])) --i; dir[i] = '\0'; *************** *** 172,178 **** char *buffer; char *stuff; { ! int n, k; if (is_sep(stuff[0])) n = 0; else { --- 172,178 ---- char *buffer; char *stuff; { ! size_t n, k; if (is_sep(stuff[0])) n = 0; else { *************** *** 207,213 **** char *argv0_path; char *landmark; { - /* Search from argv0_path, until landmark is found */ strcpy(prefix, argv0_path); do { --- 207,212 ---- *************** *** 244,250 **** TCHAR *dataBuf = NULL; static const TCHAR keyPrefix[] = _T("Software\\Python\\PythonCore\\"); static const TCHAR keySuffix[] = _T("\\PythonPath"); ! int versionLen; DWORD index; TCHAR *keyBuf = NULL; TCHAR *keyBufPtr; --- 243,249 ---- TCHAR *dataBuf = NULL; static const TCHAR keyPrefix[] = _T("Software\\Python\\PythonCore\\"); static const TCHAR keySuffix[] = _T("\\PythonPath"); ! size_t versionLen; DWORD index; TCHAR *keyBuf = NULL; TCHAR *keyBufPtr; *************** *** 402,408 **** char *delim = strchr(path, DELIM); if (delim) { ! int len = delim - path; strncpy(progpath, path, len); *(progpath + len) = '\0'; } --- 401,407 ---- char *delim = strchr(path, DELIM); if (delim) { ! size_t len = delim - path; strncpy(progpath, path, len); *(progpath + len) = '\0'; } *************** *** 429,435 **** { char argv0_path[MAXPATHLEN+1]; char *buf; ! int bufsz; char *pythonhome = Py_GetPythonHome(); char *envpath = getenv("PYTHONPATH"); --- 428,434 ---- { char argv0_path[MAXPATHLEN+1]; char *buf; ! size_t bufsz; char *pythonhome = Py_GetPythonHome(); char *envpath = getenv("PYTHONPATH"); *************** *** 554,560 **** else { char *p = PYTHONPATH; char *q; ! int n; for (;;) { q = strchr(p, DELIM); if (q == NULL) --- 553,559 ---- else { char *p = PYTHONPATH; char *q; ! size_t n; for (;;) { q = strchr(p, DELIM); if (q == NULL) *** /home/trentm/main/contrib/python/dist/src/PC/import_nt.c Thu Jun 1 00:13:40 2000 --- /home/trentm/main/Apps/Perlium/Python/dist/src/PC/import_nt.c Fri Jun 2 15:53:43 2000 *************** *** 33,39 **** // Calculate the size for the sprintf buffer. // Get the size of the chars only, plus 1 NULL. ! int bufSize = sizeof(keyPrefix)-1 + strlen(PyWin_DLLVersionString) + sizeof(keySuffix) + strlen(moduleName) + sizeof(debugString) - 1; // alloca == no free required, but memory only local to fn, also no heap fragmentation! moduleKey = alloca(bufSize); sprintf(moduleKey, "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", PyWin_DLLVersionString, moduleName, debugString); --- 33,39 ---- // Calculate the size for the sprintf buffer. // Get the size of the chars only, plus 1 NULL. ! size_t bufSize = sizeof(keyPrefix)-1 + strlen(PyWin_DLLVersionString) + sizeof(keySuffix) + strlen(moduleName) + sizeof(debugString) - 1; // alloca == no free required, but memory only local to fn, also no heap fragmentation! moduleKey = alloca(bufSize); sprintf(moduleKey, "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", PyWin_DLLVersionString, moduleName, debugString); *************** *** 44,50 **** return NULL; // use the file extension to locate the type entry. for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { ! int extLen=strlen(fdp->suffix); if (modNameSize>extLen && strnicmp(pathBuf+(modNameSize-extLen-1),fdp->suffix,extLen)==0) break; } --- 44,50 ---- return NULL; // use the file extension to locate the type entry. for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { ! size_t extLen = strlen(fdp->suffix); if (modNameSize>extLen && strnicmp(pathBuf+(modNameSize-extLen-1),fdp->suffix,extLen)==0) break; }