From owner-freebsd-questions@FreeBSD.ORG Tue Oct 28 21:08:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A5A3106575C for ; Tue, 28 Oct 2008 21:08:31 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 99F9590489 for ; Tue, 28 Oct 2008 19:49:53 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KuuZY-0002nu-G2 for freebsd-questions@freebsd.org; Tue, 28 Oct 2008 19:49:48 +0000 Received: from 77.22.123.51 ([77.22.123.51]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2008 19:49:48 +0000 Received: from ino-news by 77.22.123.51 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2008 19:49:48 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: clemens fischer Date: Tue, 28 Oct 2008 20:24:35 +0100 Lines: 30 Message-ID: References: <20081027200749.GB29814@icarus.home.lan> <20081027202219.GE2435@spotteswoode.de.eu.org> <20081028105715.GA33501@stack.nl> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 77.22.123.51 X-Archive: encrypt=none User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/8.0-CURRENT (i386)) Sender: news Subject: Re: reviving games/freebsd-games X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 21:08:31 -0000 On Tue, 28 Oct 2008 13:03:32 +0100 clemens fischer wrote: > On Tue, 28 Oct 2008 11:57:15 +0100 Jurjen Middendorp wrote: > >> If you do char *p = "something", you can't write to that string >> (it's a pointer into some stringtable: easy way to look at it >> :). You have to use char p[] = "something", then it's an array >> with enough storage to write to :) maybe try something like char >> scrollname[NUMSCROLLS][]; ? this type of declaration evokes "array type has incomplete element type", which is seen as compliant behaviour by gcc experts. so this is a no go. > I thought I'd clean up that code declaring a real struct like: > > struct scrollname_s { > int active; > char name[] = "..."; > }; this is what i actually did. it makes the code way more easier to read and keep. > then name could stay read-only. OTOH I found numerous larn versions, > so keeping ours "compatible" might keep maintenance costs down. I'd still be interested in what others did. -c