Mail Archives: djgpp-workers/2000/06/13/07:59:38
On Tue, 13 Jun 2000, Prashant TR wrote:
> Ok, here goes...
>
> --- djgpp/src/debug/fsdb/ed.c~0 Tue Jun 13 09:14:45 2000
> +++ djgpp/src/debug/fsdb/ed.c Tue Jun 13 09:10:31 2000
Thanks!
> + /* Try adding the .exe extension to it and try again. */
> + fname = alloca(strlen(argv[argno] + 5));
> + strcpy(fname,argv[argno]);
> +
> + if (!__file_exists(fname))
> + {
> + dotptr = rindex(fname,'.');
> + if (_USE_LFN || dotptr == NULL)
> + strcat(fname,".exe");
> + else
> + if (dotptr < rindex(fname,'/') || dotptr < rindex(fname,'\\'))
> + strcat(fname,".exe");
> + }
> + syms_init(fname);
This is IMHO not robust enough: the file could exist, but be a
directory, or something that is not a DJGPP program. I suggest using
_check_v2_prog instead of __file_exists.
Please also provide a short entry for wc204.txi.
- Raw text -