gnokii-users
[Top][All Lists]
Advanced

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

Re: xgnokii import from file is broken


From: Reiner Steib
Subject: Re: xgnokii import from file is broken
Date: Tue, 10 Aug 2004 15:01:23 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

On Sun, Aug 08 2004, Pawel Kot wrote:

> That's just uninitialized memory. I'll commit the fix in few
> minutes. Or just memset to 0 entry variable in
> common/gsm-filetypes.c::gn_file_phonebook_raw_parse() at the
> beginning.

Thanks.  It seems you didn't commit it yet or the public repository
hasn't been updated yet.  The following patch does it for me.  Note
that you need to set name and number.

--8<---------------cut here---------------start------------->8---
--- gsm-filetypes.c     13 Jul 2004 12:55:13 +0200      1.56
+++ gsm-filetypes.c     10 Aug 2004 14:41:22 +0200      
@@ -1467,6 +1467,9 @@
        entry->empty = true;
        memory_type_char[2] = 0;
 
+       memset(entry->name, 0, sizeof(entry->name));
+       memset(entry->number, 0, sizeof(entry->name));
+
        o = get_token(entry->name, line, ';', sizeof(entry->name) - 1);
        switch (o) {
        case 0:
--8<---------------cut here---------------end--------------->8---

>> In the meantime, I found out that I can write my phonebook (generated
>> from BBDB with `bbdb-gnokii.el') with "gnokii --writephonebook -o <
>> file", i.e. using the "-o" (--overwrite) option.
>>
>> This option is not documented in the manual: gnokii(1) still mentions
>> "-i".
>
> gnokii --help should be up to date. Manual page is updated only when
> someone volunteers...

Could you please add an appropriate comment (e.g. /* Not documented in
the manual yet */) in the (C-) code in the usage() function?  This
would make it easier for volunteers.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/





reply via email to

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