From 5a6a1e52ec0b103fd16f942ed5ead609153aff25 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 6 Jan 2010 23:28:47 +0100 Subject: [PATCH] Delete old indirection settings-file code --- xboard.c | 36 ------------------------------------ 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/xboard.c b/xboard.c index 4b7e033..3c4d8d7 100644 --- a/xboard.c +++ b/xboard.c @@ -1658,45 +1658,9 @@ main(argc, argv) char *p; XrmDatabase xdb; int forceMono = False; -//define INDIRECTION -#ifdef INDIRECTION - // [HGM] before anything else, expand any indirection files amongst options - char *argvCopy[1000]; // 1000 seems enough - char newArgs[10000]; // holds actual characters - int k = 0; srandom(time(0)); // [HGM] book: make random truly random - j = 0; - for(i=0; i= 1000-2) { printf(_("too many arguments\n")); exit(-1); } -//fprintf(stderr, "arg %s\n", argv[i]); - if(argv[i][0] != '@') argvCopy[j++] = argv[i]; else { - char c; - FILE *f = fopen(argv[i]+1, "rb"); - if(f == NULL) { fprintf(stderr, _("ignore %s\n"), argv[i]); continue; } // do not expand non-existing - argvCopy[j++] = newArgs + k; // get ready for first argument from file - while((c = fgetc(f)) != EOF) { // each line of file inserts 1 argument in the list - if(c == '\n') { - if(j >= 1000-2) { printf(_("too many arguments\n")); exit(-1); } - newArgs[k++] = 0; // terminate current arg - if(k >= 10000-1) { printf(_("too long arguments\n")); exit(-1); } - argvCopy[j++] = newArgs + k; // get ready for next - } else { - if(k >= 10000-1) { printf(_("too long arguments\n")); exit(-1); } - newArgs[k++] = c; - } - } - newArgs[k] = 0; - j--; - fclose(f); - } - } - argvCopy[j] = NULL; - argv = argvCopy; - argc = j; -#endif - setbuf(stdout, NULL); setbuf(stderr, NULL); debugFP = stderr; -- 1.7.0.4