comcom.com
Quoted 1 line · Clarence Dang
Does it still happen after the attached patches have been applied?
The 3 bugs have now disappeared. Thanks!
For some reason the fourth bug which I mentioned to Bart Oldeman ("Sidekick refuses to install") has now also disappeared. I cannot explain this. It is not due to your patches because I cannot even reproduce the bug now with earlier versions. It must have been some of my messing about with dosemu.conf, maybe config.sys which did this.
I still have some problems with Sidekick which suggest that the freedos algorithms for finding files are not yet 100 %. Part of Sidekick is a program SKINST.COM. This aborts with a message:
*** FATAL ERROR: Message file SKINST.MSG not found
although SKINST.MSG is in the Sidekick directory. Similarly, though SK now installs, one of its functions ("Help") does not work; it complains of the file SK.HLP not being present (but it is). Finally, Sidekick's "Notepad" function. The existing NOTES file is not found, and trying to save a (new) notepad, Sidekick gives an error message:
*** Directory full. Press <ESC>
These things do not happen with dosemu-dos6 or dosemu-dos98.
Regards, Jan
Quoted 8 lines · Bart Oldeman
Quoted 3 lines · Jan Willem Stumpel
When I use freedos, the command interpreter (in my system
/usr/lib/dosemu/commands/comcom.com) has several bugs. Should they
be reported to the freedos people or to the dosemu people?dosemu, preferrably in the SF bug tracker.
it is built into dosemu.bin indeed.
If you CC me comcom or joystick bug reports they will get fixed faster (as opposed to probably not at all :)) since I don't read every single email that comes up on MLs. Just don't deliberately stress-test comcom because it's known to be buggy.
Quoted 7 lines
Quoted 4 lines
1) changing directory:
C:\>cd\ws\text
cd\ws\text: file not foundyes, this is a known bug.
Bart, I've recycled your 1.1.3.8 comcom patch and moved it to com_argparse in coopthreads to make comcom-space.patch which should solve the problem once and for all (argument parsing in comcom is still far from perfect but good enough for the time being). I checked for the possibility of an introduced buffer overrun but it shouldn't happen since 256 is much larger than the maximum command line length of about 128.
Quoted 9 lines
Quoted 6 lines
2) running a program in a directory above the present one:
C:\>cd \ws\text
C:\WS\TEXT>..\ws
..\ws: file not foundThe file extension is needed: the command ..\ws.exe succeeds.
this one I haven't observed before. Thanks.
comcom-exist-exec.patch
Quoted 7 lines
Quoted 4 lines
C:\WS\TEXT>\oldc\tsr\minimon
MiniMon Version 1.0 installed. Activate with <Ctrl-Alt-M> C:\WS\TEXT>cd\
cd\: insufficient memorywell, first fix bug 1 and then look again :)
Does it still happen after the attached patches have been applied?
Clarence
BTW, Stas, I'm looking into the comcom problem at sourceforge.
src/plugin/coopthreads/coopthreads.c +14 -0
@@ -1734,6 +1734,20 @@ }else s[1 +(unsigned char )s[0 ]] =0 ; s++; + +/* transform: +* dir/p to dir /p +* cd\ to cd \ +* cd.. to cd .. +*/ + p = s; +while (isalnum (*p)) p++; +if (*p =='\\' || *p =='/' || (*p =='.' && p[1 ] =='.' )) { +memmove (p+1 , p, s [-1 ] - (p - s) +1 /*NUL*/ ); + *p =' ' ; + s[-1 ]++;/* update length */ + } + maxarg --;for ( ; *s; s++) {if (!mode) {
src/plugin/commands/comcom.c +2 -0
@@ -1324,6 +1324,7 @@ i = replen - (s - replbuf);memcpy (p, s, i+1 ); callbuf[0 ] = p - (callbuf+1 ) + i; +/* WARNING! callbuf may be modified by com_argparse */ j =com_argparse (callbuf, argv+arg0_new,MAXARGS - (argc-arg0_new) -1 ); saved_dta =PSP_DTA ;SET_CHILD_ARGS (arg0_new);
@@ -3276,6 +3277,7 @@if (!bdta.mode)com_doswrite (2 ,"\r\n" ,2 );memcpy (argbuf, &LEN0A ,LEN0A +2 );/* save contents */ +/* WARNING! argbuf may be modified by com_argparse */ argc =com_argparse (argbuf, argv,MAXARGS -1 ); bdta.argcsub = bdta.argc = argc;/* save positional variables */ bdta.argvsub = bdta.argv = argv;
src/plugin/commands/comcom.c +15 -5
@@ -1016,10 +1016,20 @@int i;if ((len >4 ) && (file[len-4 ] =='.' )) { -for (i=0 ; i<3 ; i++) -if (!strncasecmp (file+len-3 , extlist[i],3 )) -if (com_exist_file (file))return i+1 ; -return 0 ; +/* '..\ws' does _not_ mean a file with extension '\ws' */ +boolean isext = TRUE; +for (i = len -3 ; i < len; i++) { +if (!isalnum (file[i])) { + isext = FALSE; +break ; + } + } +if (isext) { +for (i=0 ; i<3 ; i++) +if (!strncasecmp (file+len-3 , extlist[i],3 )) +if (com_exist_file (file))return i+1 ; +return 0 ; + } } *p++ ='.' ;for (i=0 ; i<3 ; i++) {
@@ -1164,7 +1175,7 @@char *p;if (!expand || (expand &&com_doscanonicalize (buf, path))) -strcpy (buf, path); +strcpy (buf, path); p =basename_of (buf,0 ); *p =0 ;return p - buf;
On Sun, 12 Jan 2003 10:26 am, Jan Willem Stumpel wrote:
(...)
Quoted 2 lines
I still have some problems with Sidekick which suggest that the freedos algorithms for finding files are not yet 100 %.
It might not be FreeDOS...
It could be COMCOM or DOSEMU (MFS among other things).
Quoted 5 lines
Part of
Sidekick is a program SKINST.COM. This aborts with a message:*** FATAL ERROR: Message file SKINST.MSG not found
Quoted 9 lines
although SKINST.MSG is in the Sidekick directory. Similarly, though SK now installs, one of its functions ("Help") does not work; it complains of the file SK.HLP not being present (but it is). Finally, Sidekick's "Notepad" function. The existing NOTES file is not found, and trying to save a (new) notepad, Sidekick gives an error message:
*** Directory full. Press <ESC>
Where can I get Sidekick (legally)?
Quoted 2 lines
These things do not happen with dosemu-dos6 or dosemu-dos98.
Ok, try running FreeDOS with dos 7.1's command.com (replace the command.com link to comcom.com with a link to MS' command.com). Then try running real dos 7.1 with comcom.com instead of MS' command.com (of course, you'll have to rename comcom.com to command.com, but you get the idea).
Clarence