aboutsummaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-11-20 13:33:48 +0000
committerJack Jansen <jack.jansen@cwi.nl>2003-11-20 13:33:48 +0000
commit6402357d40b4d8086e459ac0e31205f9d6d30543 (patch)
treefe180ad1cd04d51602e76762c0565f884d00e367 /Parser
parentGot rid of macglue.h, replacing it by pymactoolbox.h where relevant. (diff)
downloadcpython-6402357d40b4d8086e459ac0e31205f9d6d30543.tar.gz
cpython-6402357d40b4d8086e459ac0e31205f9d6d30543.tar.bz2
cpython-6402357d40b4d8086e459ac0e31205f9d6d30543.zip
Talk about old code: removed a reference to THINK_C.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pgenmain.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 0f68940a680..f217053f0a6 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -26,10 +26,6 @@ int Py_IgnoreEnvironmentFlag;
/* Forward */
grammar *getgrammar(char *filename);
-#ifdef THINK_C
-int main(int, char **);
-char *askfile(void);
-#endif
void
Py_Exit(int sts)
@@ -44,11 +40,6 @@ main(int argc, char **argv)
FILE *fp;
char *filename, *graminit_h, *graminit_c;
-#ifdef THINK_C
- filename = askfile();
- graminit_h = askfile();
- graminit_c = askfile();
-#else
if (argc != 4) {
fprintf(stderr,
"usage: %s grammar graminit.h graminit.c\n", argv[0]);
@@ -57,7 +48,6 @@ main(int argc, char **argv)
filename = argv[1];
graminit_h = argv[2];
graminit_c = argv[3];
-#endif
g = getgrammar(filename);
fp = fopen(graminit_c, "w");
if (fp == NULL) {
@@ -126,26 +116,6 @@ getgrammar(char *filename)
return g;
}
-#ifdef THINK_C
-char *
-askfile(void)
-{
- char buf[256];
- static char name[256];
- printf("Input file name: ");
- if (fgets(buf, sizeof buf, stdin) == NULL) {
- printf("EOF\n");
- Py_Exit(1);
- }
- /* XXX The (unsigned char *) case is needed by THINK C 3.0 */
- if (sscanf(/*(unsigned char *)*/buf, " %s ", name) != 1) {
- printf("No file\n");
- Py_Exit(1);
- }
- return name;
-}
-#endif
-
void
Py_FatalError(const char *msg)
{