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

Talk about old code: removed a reference to THINK_C.

üst 7107c1af
...@@ -26,10 +26,6 @@ int Py_IgnoreEnvironmentFlag; ...@@ -26,10 +26,6 @@ int Py_IgnoreEnvironmentFlag;
/* Forward */ /* Forward */
grammar *getgrammar(char *filename); grammar *getgrammar(char *filename);
#ifdef THINK_C
int main(int, char **);
char *askfile(void);
#endif
void void
Py_Exit(int sts) Py_Exit(int sts)
...@@ -44,11 +40,6 @@ main(int argc, char **argv) ...@@ -44,11 +40,6 @@ main(int argc, char **argv)
FILE *fp; FILE *fp;
char *filename, *graminit_h, *graminit_c; char *filename, *graminit_h, *graminit_c;
#ifdef THINK_C
filename = askfile();
graminit_h = askfile();
graminit_c = askfile();
#else
if (argc != 4) { if (argc != 4) {
fprintf(stderr, fprintf(stderr,
"usage: %s grammar graminit.h graminit.c\n", argv[0]); "usage: %s grammar graminit.h graminit.c\n", argv[0]);
...@@ -57,7 +48,6 @@ main(int argc, char **argv) ...@@ -57,7 +48,6 @@ main(int argc, char **argv)
filename = argv[1]; filename = argv[1];
graminit_h = argv[2]; graminit_h = argv[2];
graminit_c = argv[3]; graminit_c = argv[3];
#endif
g = getgrammar(filename); g = getgrammar(filename);
fp = fopen(graminit_c, "w"); fp = fopen(graminit_c, "w");
if (fp == NULL) { if (fp == NULL) {
...@@ -126,26 +116,6 @@ getgrammar(char *filename) ...@@ -126,26 +116,6 @@ getgrammar(char *filename)
return g; 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 void
Py_FatalError(const char *msg) Py_FatalError(const char *msg)
{ {
......
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