V4RB2, CHG, ValentinaInit()

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Mar 1 20:57:36 CST 2004


on 3/1/04 8:53 PM, Charles Yeomans at yeomans at desuetude.com wrote:

>> ValentinaIit() now returns the actual size of cache that Valentina have
>> allocate.
>> 
>> 
>> NOTE: for modern OS that have virtual file system, even if you ask
>> 100MB for
>> cache, OS can satisfy your request. But Valentina self can decide that
>> you
>> ask too big cache size and allocate smaller cache.
>> 
>> In case of any problems, ValentinaInit() will return ZERO.
>> 
> 
> Again, why return this value?  This is old C-style design.  Instead,
> why not have a separate function ValentinaCacheSize() as Integer?

1) ValentinaInit() can fail.

    if return nothing, then you need ask ValentinaError
    and we need add one more error code.

2) it can allocate less than you ask.

    one more function...


One return value solve 2 tasks at once.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list