[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: field buffer vs visible field size

From: Thomas Dickey
Subject: Re: field buffer vs visible field size
Date: Mon, 15 Jul 2013 04:29:27 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Jul 07, 2013 at 11:22:11AM -0300, tjareson wrote:
> Hello,
> I'm using the ncurses forms a lot and have sometimes the situation
> that the string I'm assigning by pointer  to a field with
> set_field_buffer is bigger than the field size (including off screen
> rows), which leads to the result that characters are cut off at the
> end when the field is displayed.
> (which is the required behavior - I don't want to show the seconds
> of a time stamp, so I made the field 3 characters short than the
> content)
> I'm only not sure if that cause any potential problem of memory
> corruption within the forms library?

no - the form library makes a copy of the given value.

If the field is "growable", the library also assumes the value is null-
terminated (so it could be shorter).

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]