On Sunday 13 July 2008, Kenneth Lerman wrote: > In file: emc_nml.hh, line 1449 the structure element file is declared as > "char file[LINELEN];". If my understanding is correct, this > variable may contain the full path name of a file.
Just the file name if it is in the current working directory, else including a path (relative, or absolute). > The maximum length of a file name is PATH_MAX characters (which is > defined as 4096 characters in /usr/include/linux/limits.h). Of course, > in the usual linux style, we also have MAXPATHLEN which is defined as > PATH_MAX in sys/param.h. Please don't include <linux/limits.h> or <sys.limits.h> - Use <limits.h> instead. > I'm not sure which of these to use in the interp (right now, I'm using > PATH_MAX). While you're at it, use LINE_MAX in place of LINELEN and BUFFLEN just in case someone might enter an absurdly long line. Read: http://www.opengroup.org/onlinepubs/000095399/ and http://www.gnu.org/software/libc/manual/html_node > The issue come up regarding a change I'd like in Axis. Axis doesn't know > when the interpreter starts to interpret a new file. I added that > ability as part of the subroutine stuff. If the sub isn't defined in the > current file, the interp looks for a file of that name and starts > interpreting there. It works just fine -- but none of the gui's know > about it. I discovered that problem when I successfully ran my first > program containing wizard generated code. > > [This is an issue for all of the gui's; not just Axis.] Yes - It has been known about for a very long time. > I can fix the file size problem. It's just changing LINELEN to PATH_MAX. > I'm concerned though, that doing that might break other stuff. I can > probably also make it so that the structure containing "file" is updated > when the file is changed. It probably will break "stuff" and/or impact on performance, but.... > I'd be (very) hesitant, though, to dig into Axis and change it. Due to the duplicity of common code, you'll have to make the same (or similar) changes to all the GUIs. > Thoughts on the subject would be appreciated. Why do you need to increase the size of the array ? Are you aware of the wider implications of doing so ? How many users use path/file names larger than 255 char ? --- Paul. ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
