mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
More Pstring() stuff and some cosmetics
This commit is contained in:
parent
48d071d302
commit
d50e4e1c54
4 changed files with 20 additions and 4 deletions
|
@ -17,14 +17,12 @@ guesstabsize(path)
|
|||
s[0] = strlen(path);
|
||||
memcpy(s+1, path, s[0]);
|
||||
refnum = OpenResFile(s);
|
||||
/* printf("%s --> refnum=%d\n", path, refnum); */
|
||||
if (refnum == -1)
|
||||
return 0;
|
||||
UseResFile(refnum);
|
||||
h = GetIndResource('ETAB', 1);
|
||||
if (h != 0) {
|
||||
tabsize = (*(short**)h)[1];
|
||||
/* printf("tabsize=%d\n", tabsize); */
|
||||
}
|
||||
CloseResFile(refnum);
|
||||
return tabsize;
|
||||
|
|
|
@ -14,7 +14,7 @@ long creator, type;
|
|||
FInfo info;
|
||||
unsigned char *pname;
|
||||
|
||||
pname = (StringPtr) c2pstr(name);
|
||||
pname = (StringPtr) Pstring(name);
|
||||
if ( GetFInfo(pname, 0, &info) < 0 )
|
||||
return -1;
|
||||
info.fdType = type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue