delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/06/09:50:01

Newsgroups: comp.os.msdos.djgpp
From: manfred DOT heumann AT uni-bielefeld DOT de (Manni Heumann)
Subject: Re: Annoying: const char * in Allegro
References: <7qrsqb$s9e$1 AT solomon DOT cs DOT rose-hulman DOT edu> <37D3883C DOT 7B53440D AT restoel DOT net_AND_THIS>
X-Newsreader: News Xpress 2.01
Date: Mon, 06 Sep 1999 09:45:26 GMT
NNTP-Posting-Host: dhcp33-114.uni-bielefeld.de
Message-ID: <37d38d41.0@news.uni-bielefeld.de>
X-Trace: 6 Sep 1999 11:45:37 +0200, dhcp33-114.uni-bielefeld.de
Lines: 23
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <37D3883C DOT 7B53440D AT restoel DOT net_AND_THIS>, REMOVE_THIS_mimo AT restoel DOT net_AND_THIS wrote:
>Damian Yerrick schrieb:
>
>> All of Allegro's string-handling (textout(), textprintf(), files, etc.)
>> functions take a char * instead of a const char *. Anyone know why? Do they
>> change the strings in some subtle way? As it stands now, I have to do
>> dangerous casts to get my const char * parameters to work without errors or
>> warnings.
>
>const char * is c++ while allegro is written in c as far as i can see - so you
>should maybe write your own function wrappers:
>
..

The C library was also written in C. Nevertheless functions like printf take a 
const char* as their first argument. I guess it would be a good idea to add 
the little const to Allegro's functions in future versions.
Or are the strings changed?


--

Manni

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019