Kaydet (Commit) fac3008e authored tarafından Jack Jansen's avatar Jack Jansen

Optimization: don't try to get a tabsize resource if we know the file

doesn't have one (stdin and such), OpenRF appears to be an expensive call.
üst 4cc95627
......@@ -45,6 +45,9 @@ guesstabsize(path)
int refnum;
Handle h;
int tabsize = 0;
/* Very simple case: stdin (pathname empty) */
if ( path[0] == '\0' || strcmp(path, "<stdin>") == 0 ) return 0;
s[0] = strlen(path);
memcpy(s+1, path, s[0]);
refnum = OpenResFile(s);
......
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