On Mon, Feb 16, 2009 at 3:06 PM, Rocco Carbone <[email protected]> wrote:
> Patch:
> ======
> while evaluating Eet for a "hash-table(s) on disk" project,
> I made two trivial fixes to eet_lib.c source file in eet-1.0.0 release
> in order to allow my small test program to work in EET_FILE_MODE_WRITE
> too.
>
> I also checked the svn code and I am quite confident the patch should
> be applied to the svn version.
>
> Here is the patch:
>
> [email protected] 4261> diff -u eet_lib.c eet_lib.c.ORG
> --- eet_lib.c Mon Feb 16 11:45:00 2009
> +++ eet_lib.c.ORG Mon Feb 16 10:28:39 2009
> @@ -1686,8 +1686,7 @@
> if (eet_check_pointer(ef) || eet_check_header(ef) ||
> (!glob) ||
> ((ef->mode != EET_FILE_MODE_READ) &&
> - (ef->mode != EET_FILE_MODE_WRITE) &&
> - (ef->mode != EET_FILE_MODE_READ_WRITE)))
> + (ef->mode != EET_FILE_MODE_READ_WRITE)))
> {
> if (count_ret)
> *count_ret = 0;
> @@ -1751,8 +1750,7 @@
> /* check to see its' an eet file pointer */
> if (eet_check_pointer(ef) || eet_check_header(ef) ||
> ((ef->mode != EET_FILE_MODE_READ) &&
> - (ef->mode != EET_FILE_MODE_WRITE) &&
> - (ef->mode != EET_FILE_MODE_READ_WRITE)))
> + (ef->mode != EET_FILE_MODE_READ_WRITE)))
> return -1;
>
> /* loop through all entries */
Sounds like it already made it's way in svn.
> Doubt:
> ======
> Is the 'list' argument returned by eet_list() always NULL terminated?
>
> That is how to say: is the following function usable on eet_list() return?
>
> static void printkeys (char ** list)
> {
> char ** l = list;
> while (l && * l)
> printf ("%s\n", * l ++);
> }
Nop, you should always use count_ret.
Regards,
--
Cedric BAIL
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel