1994-06-27 15:25:12 +00:00
|
|
|
#include <Types.h>
|
|
|
|
#include <Files.h>
|
|
|
|
#include <OSUtils.h>
|
|
|
|
#include <Resources.h>
|
|
|
|
|
1994-01-05 16:17:15 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
1995-01-22 18:42:33 +00:00
|
|
|
/* Interface used by parsetok.c */
|
1994-01-05 16:17:15 +00:00
|
|
|
|
|
|
|
guesstabsize(path)
|
|
|
|
char *path;
|
|
|
|
{
|
1994-08-19 10:51:31 +00:00
|
|
|
Str255 s;
|
1994-01-05 16:17:15 +00:00
|
|
|
int refnum;
|
|
|
|
Handle h;
|
|
|
|
int tabsize = 0;
|
|
|
|
s[0] = strlen(path);
|
1994-08-19 10:51:31 +00:00
|
|
|
memcpy(s+1, path, s[0]);
|
1994-01-05 16:17:15 +00:00
|
|
|
refnum = OpenResFile(s);
|
|
|
|
if (refnum == -1)
|
|
|
|
return 0;
|
|
|
|
UseResFile(refnum);
|
|
|
|
h = GetIndResource('ETAB', 1);
|
|
|
|
if (h != 0) {
|
|
|
|
tabsize = (*(short**)h)[1];
|
|
|
|
}
|
|
|
|
CloseResFile(refnum);
|
|
|
|
return tabsize;
|
|
|
|
}
|