From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: comcom.com Date: Sun, 12 Jan 2003 20:15:39 +0300 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3E21A2BB.2030207@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040806080604070401080006" Return-path: List-Id: To: linux-msdos@vger.kernel.org Cc: Clarence Dang This is a multi-part message in MIME format. --------------040806080604070401080006 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello. Clarence Dang wrote: > 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. Hmm, how about updating the doc/DPR then? > BTW, Stas, I'm looking into the comcom problem at sourceforge. OK, I just wanted to finally give a comcom a try, but it appeared to be completely useless for me:( At first, it simply crashes my dosemu without the attached hack: for some reasons the duplicate_env() is called when ctcb->envir_frame==0, hence the crash. Do you know why is this happens? Then, with the hack applied, it started to complain on using "lh" in autoexec. That was enough of trying it for now:) --------------040806080604070401080006 Content-Type: text/plain; name="comcom.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="comcom.diff" --- comcom.c.old Sat Jan 11 05:44:58 2003 +++ comcom.c Sun Jan 12 20:07:03 2003 @@ -3514,15 +3514,20 @@ static int duplicate_env(int size) { struct com_starter_seg *ctcb = CTCB; - struct com_MCB *mcb = (void *)((ctcb->envir_frame-1) << 4); char *newenv; - int oldsize = mcb->size << 4; + struct com_MCB *mcb = NULL; + int oldsize = 0; + if (ctcb->envir_frame) { + mcb = (void *)((ctcb->envir_frame-1) << 4); + oldsize = mcb->size << 4; + } size = (size+15) & -16; if (size <= oldsize) size = oldsize; newenv = (char *)com_dosallocmem(size); if ((int)newenv < 0) return oldsize; /* giving up */ - memcpy(newenv, ((char *)mcb)+16, oldsize); + if (oldsize) + memcpy(newenv, ((char *)mcb)+16, oldsize); ctcb->envir_frame = ((unsigned int)newenv) >> 4; return size; } --------------040806080604070401080006--