Hi,
flexible storage using linked list of buffers- from memory.. atleast one library that does that... GMP. It uses linked lists to store and access large numbers. the problem we face in optimization is one size does not fit all.. more on the lines of large buffers-small data: memory unnecessarily allotted, small buffers and a deep linked list hence increasing latency. so may be 'horses for courses' its a good idea you have and is known to be implemented elsewhere too. At the same time, acknowledge the issues involved.
flexible storage v/s buffer overflow: buffer overflow is something you have to manage with in your programming logic aka design (now adding). It has nothing to do with whethere you use arrays, malloc's or above method. In other words use of either of above methods does not ensure my code to be free of buffer overflow problems. you r right in saying buffer overflow stems up from predicted size of input.. but ur programming logic should take care of reading only as much as you can and rejecting the rest.
In windoz CRT 'passing': quasi, scanf is a core libc function which interfaces with user thru I/O funcs (keyboard in this case) and users program in the other end. so passing here implies taking data from input and passing it in to user passed pointer!
hope that clarifies, Shailesh
--- q u a s i quasar@vsnl.net wrote:
consider me a dummy
ok.
__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com