Re: [AD] Proposal for small change in d_edit_proc() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Eric Botcazou wrote:
> This proc obviously lacks a third parameter, which would allow to
> specify both contraints. What about the following semantics :
> - if d1>=0, d1 specifies the maximum number of characters,
> - if d1<0, -d1 specifies the maximum number of characters and dp2
> points to one byte past the end of the buffer pointed to by dp ?
Or what about:
- if d1>0, d1 specifies the maximum number of characters
- if d1<0, -d1 specifies the maximum number of characters and dp2
points to dp+sizeof(buf)
- if d1=0, no character limit and dp2 points to dp+sizeof(buf)
While we're at it, maybe dp2 can point to two ints, the first specifying
the max number of bytes and the second the max number of pixels? This
can be useful if the text that is later going to be displayed somewhere.
--
Sven Sandberg svsa1977@xxxxxxxxxx home.student.uu.se/svsa1977