From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jasonr@btinternet.com Newsgroups: gmane.emacs.devel Subject: RE: Need help with Windows implementation of play-sound Date: Mon, 23 Sep 2002 09:31:25 +0100 (BST) Sender: emacs-devel-admin@gnu.org Message-ID: <664979.1032769885981.JavaMail.root@127.0.0.1> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1032769992 5116 127.0.0.1 (23 Sep 2002 08:33:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2002 08:33:12 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17tOeV-0001KM-00 for ; Mon, 23 Sep 2002 10:33:11 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17tPKh-0001R1-00 for ; Mon, 23 Sep 2002 11:16:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tOeW-0004GJ-00; Mon, 23 Sep 2002 04:33:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17tOcs-0004Bf-00 for emacs-devel@gnu.org; Mon, 23 Sep 2002 04:31:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17tOcq-0004BT-00 for emacs-devel@gnu.org; Mon, 23 Sep 2002 04:31:30 -0400 Original-Received: from actinium.btinternet.com ([194.73.73.66]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tOcq-0004BM-00 for emacs-devel@gnu.org; Mon, 23 Sep 2002 04:31:28 -0400 Original-Received: from hafnium ([194.75.226.99]) by actinium.btinternet.com with esmtp (Exim 3.22 #8) id 17tOco-0003t4-00; Mon, 23 Sep 2002 09:31:26 +0100 Original-Received: from 193.192.75.200 by hafnium ([194.75.226.99]); Mon, 23 Sep 02 09:31:25 BST Original-To: BenK@FreedomScientific.com X-Mailer: talk21.com WAS v2 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8114 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8114 Please check the GNU coding standards (available as an info file from ftp.gnu.org) and where necessary change your layout and function/variable naming to match them. This will make less work if we decide to use your code. > from: Ben Key > date: Sun, 22 Sep 2002 06:01:04 > to: Harald.Maier.BW@t-online.de > cc: emacs-devel@gnu.org > subject: RE: Need help with Windows implementation of play-sound > > Thanks. I will try the change you suggested Monday. If it works, I will > attempt to gernerate a patch for Emacs that includes this and the changes to > the make files, and send it to this list. > > -----Original Message----- > From: Harald.Maier.BW@t-online.de > To: Ben Key > Cc: emacs-devel@gnu.org > Sent: 9/21/02 5:34 AM > Subject: Re: Need help with Windows implementation of play-sound > > > Ben Key writes: > > > Can someone take a look at what I have done so far and give me a few > > pointers? > > > { > > len=XSTRING(attrs[SOUND_FILE])->size; > > lpszFile=(char *)alloca(len 1); > ... > > free(lpszFile); > !!! remove that line !!! > > > unbind_to (count, Qnil); > > return Qnil; > > } > > You are using alloca so you don't have to call free. free is necessary > by using malloc. The memory allocated by alloca will be automatically > be freed by leaving the funciton. > > I am very interested in testing this. > > Harald > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/emacs-devel