Re: [AD] Documentation update

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote:

> > I'm still tempted to list absolute limits on parameters where they
> > exist, even if it is a can of worms.
> 
> If someone wants to manually maintain cross-references between the code and
> the docs at a lower level than the API, fine. But I won't be this guy.

Oh don't get me wrong, I didn't mean it had to be manual. I was
thinking along the lines of Evert's idea: have preprocessor constants
defined and use those in the code. Then you can just name the constant
in the docs, and mention (somewhere) the place where the actual define
can be found, or include one documentation page that lists the actual
numbers for all constants in this allegro version.

A mud I used to program for had all kinds of these defines like

MAX_STRING_LENGTH
MAX_INPUT_LENGTH
LARGE_BUFFER_LENGTH

Etc. Worked pretty well, as long as you use them consistently. How do
you feel about something like that?

> All strings that exceed the internal limitations are truncated with null
> termination, so there is no risk of memory overwrite. But I guess one could
> imagine some corner cases for which truncating can have hazardous effects.

Fair enough, as long as it doesn't immediately give buffer overruns
I'm not too worried.

> > I still stick to the opinion that the limit should be documented though, I
> > think. Which in no way means you have to agree,
> > as you're probably aware :-)
> 
> Probably. But if ... (say a number) other peoples have the same opinion as
> you, this will be a different problem :-)

Neh, in this case just be the dictator after you've heard all
opinions, and make your choice :-) But you should definitely not have
to be the one to change the code, if it gets changed at all.

Hein Zelle

>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-< 
 Unix is user friendly. It's just very particular about who 
 it's friends are.

 Hein Zelle                     hein@xxxxxxxxxx
	                        http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/