Tom Schneider wrote:
However, any file names in the header are demanded by the program interactively, which makes it useless for me. I posted on this some days ago on this group with no responses. I would like to see a switch to turn off the file name requests and have the names default to the ones given in the header.
If that's so crucial to you, you can help yourself with a patch like the following -- after all, GPC is free software. The reason why we don't do this in the official source is becuase most GPC users do not prefer this behaviour, and implementing a switch is more work...
If you install the modified GPC in a public place, just make sure to let other users know of the change, to avoid confusion...
The upper/lower case issue is not solved. The patch will just convert everything to lower case.
--- p/rts/rts.h.orig Mon Aug 2 10:55:22 1999 +++ p/rts/rts.h Mon Sep 13 21:26:37 1999 @@ -435,6 +435,7 @@ extern char *_p_strlcpy PROTO ((char *, const char *, size_t)); extern char *_p_strscan PROTO ((const char *, char)); extern char *_p_strrscan PROTO ((const char *, char)); +extern char *_p_strlower PROTO ((char *)); extern Boolean _p_str_eq PROTO((char *, int, char *, int)); extern Boolean _p_str_lt PROTO((char *, int, char *, int)); extern Boolean _p_eq PROTO((char *, int, char *, int)); --- p/rts/file.c.orig Mon Aug 2 10:44:13 1999 +++ p/rts/file.c Mon Sep 13 21:26:37 1999 @@ -245,6 +245,12 @@ if (isStdFile (File)) return NULL;
- /* Derive the external file name from the internal one without
asking the user. This is currently non-standard GPC behaviour! */
- m_EXTNAM (File) = _p_strlower (_p_strdup (m_NAM(File)));
- _p_osdirseparator2slash_cstring (m_EXTNAM (File));
- return m_EXTNAM (File);
- /* Try to write filename prompts to /dev/tty and try to read responces from there also, to avoid mungling with stdin & stdout.
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
Thanks Frank. Would the following modification just leave the names alone properly?
Also, since I haven't gotten around to applying patches like this, what would the command line be?
Tom
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu http://www.lecb.ncifcrf.gov/~toms/
--- p/rts/rts.h.orig Mon Aug 2 10:55:22 1999 +++ p/rts/rts.h Mon Sep 13 21:26:37 1999 @@ -435,6 +435,7 @@ extern char *_p_strlcpy PROTO ((char *, const char *, size_t)); extern char *_p_strscan PROTO ((const char *, char)); extern char *_p_strrscan PROTO ((const char *, char)); +extern char *_p_strlower PROTO ((char *)); extern Boolean _p_str_eq PROTO((char *, int, char *, int)); extern Boolean _p_str_lt PROTO((char *, int, char *, int)); extern Boolean _p_eq PROTO((char *, int, char *, int)); --- p/rts/file.c.orig Mon Aug 2 10:44:13 1999 +++ p/rts/file.c Mon Sep 13 21:26:37 1999 @@ -245,6 +245,12 @@ if (isStdFile (File)) return NULL;
+ /* Derive the external file name from the internal one without + asking the user. This is currently non-standard GPC behaviour! */ + m_EXTNAM (File) = _p_strdup (m_NAM(File)); + _p_osdirseparator2slash_cstring (m_EXTNAM (File)); + return m_EXTNAM (File); + /* Try to write filename prompts to /dev/tty and try to read responces from there also, to avoid mungling with stdin & stdout.