]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Guess tab size on the Mac from tab resource.
authorGuido van Rossum <guido@python.org>
Wed, 25 Mar 1992 22:32:00 +0000 (22:32 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 25 Mar 1992 22:32:00 +0000 (22:32 +0000)
Parser/parsetok.c

index ba9841841e1bb91aa6ef716c29cb8b8b9ea4ca35..95fb12325762ceb5ed5f83f5af08e72b21e240de 100644 (file)
@@ -84,6 +84,13 @@ parsefile(fp, filename, g, start, ps1, ps2, n_ret)
                fprintf(stderr, "no mem for tok_setupf\n");
                return E_NOMEM;
        }
+#ifdef macintosh
+       {
+               int tabsize = guesstabsize(filename);
+               if (tabsize > 0)
+                       tok->tabsize = tabsize;
+       }
+#endif
        ret = parsetok(tok, g, start, n_ret);
        if (ret == E_TOKEN || ret == E_SYNTAX) {
                char *p;