public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stssppnn@yahoo.com>
To: linux-msdos@vger.kernel.org
Cc: Clarence Dang <dang@kde.org>
Subject: Re: comcom.com
Date: Sun, 12 Jan 2003 20:15:39 +0300	[thread overview]
Message-ID: <3E21A2BB.2030207@yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

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:)

[-- Attachment #2: comcom.diff --]
[-- Type: text/plain, Size: 797 bytes --]

--- 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;
 }

             reply	other threads:[~2003-01-12 17:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-12 17:15 Stas Sergeev [this message]
2003-01-15 12:50 ` comcom.com Clarence Dang
2003-01-17 15:56   ` comcom.com Jochen Reinwand
  -- strict thread matches above, loose matches on Subject: below --
2003-01-17 18:47 comcom.com Stas Sergeev
2003-01-17 23:03 ` comcom.com Jochen Reinwand
     [not found] <3E2576E0.6050605@yahoo.com>
2003-01-17 14:38 ` comcom.com Clarence Dang
2003-01-15  3:04 comcom.com Stas Sergeev
2003-01-12 17:16 comcom.com Clarence Dang
2003-01-12 10:26 ` comcom.com Jan Willem Stumpel
2003-01-15 12:55   ` comcom.com Clarence Dang
2003-01-03 13:15 comcom.com Jan Willem Stumpel
2003-01-03 18:24 ` comcom.com Bart Oldeman
2003-01-03 19:18   ` comcom.com Jan Willem Stumpel
2003-01-03 22:36     ` comcom.com Bart Oldeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E21A2BB.2030207@yahoo.com \
    --to=stssppnn@yahoo.com \
    --cc=dang@kde.org \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox