Which way is better in C ?
Ben Duncan
bns
Tue Jan 18 11:01:22 PST 2005
Ok, I am well on my way on the SLAG Menu system.
It will have a limit of 64 Menu Set's, each set
with a limit of 20 items. Each item can be a
"SLAG" program, another Menu Set, or a "line".
These are done using structure's and arrays.
There is a 64 "user" menu array that is the list of the
menu transversal as you go thru the system. It has the
row, column, active menu item, and index to which
Menu Set on this index.
Now, the 64 limit's are on Application Set, not total
menu set's. SO AR can have 64 menu sets, AP,Gl and so on.
These definitions are stored in a SDEF Menu file.
S-Lang has the ability to "read" the screen and return a malloc'd
buffer of what the screen currently looks like (warts and all ;-> ).
I though about adding a pointer to the buffer on the "user" structure
to store what the screen looked like BEFORE a selection was made that
A) opened a sub-sub-menu
OR
B) Called a SLAG program.
Then when the task was done, simply push the screen image back
out to the display. However, one then must keep up with freeing
and or allocating the buffers.
A alternate way, since I have the user transversal list, would be after each
completed selection, simply run down the list and repaint the screen
from the information in the list till I got to the last active one.
So the questions becomes, from a C stand point, do I make and keep up with
screen image buffers and push them out when a selection is completed, or
is it/would it be just a good to simply re-build the screen from the
transversal list I have?
Thanks ..
--
Ben Duncan - VersAccounting Software LLC 336 Elton Road Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
- Hanlon's Razor
More information about the Linux-users
mailing list