gnokii-users
[Top][All Lists]
Advanced

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

--writephonebook options


From: Reiner Steib
Subject: --writephonebook options
Date: Fri, 06 Aug 2004 17:35:11 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Hi,

(1) interactive mode (the default) should skip busy locations 

I don't understand how the interactive "Overwrite?  (yes/no)" is
supposed to work, because the phonebook already is read from stdin.
All I get (without using "-f") is an infloop:

$ gnokii --writephonebook < file
...
Overwrite? (yes/no) 
Incorrect answer []
...

AFAICS, writephonebook() should just skip the entry unless
"--overwrite" is given.  The code following "if (!confirm)" in
gnokii.c should definitely be changed.

Searching the archives [1], I found that this is know and doesn't have
a high priority for you.  But everything else but the current behavior 

How about this patch (sorry for the long lines)?  If you accept it,
I'll provide an addition to the man page, too.

--8<---------------cut here---------------start------------->8---
--- gnokii.c.~1.401.~   Tue Jul 13 12:55:18 2004
+++ gnokii.c    Fri Aug  6 17:31:38 2004
@@ -3492,7 +3492,9 @@
                                                gn_line_get(stdin, ans, 7);
                                                if (!strcmp(ans, _("yes"))) 
confirm = 1;
                                                else if (!strcmp(ans, _("no"))) 
confirm = 0;
-                                               else fprintf(stdout, 
"\nIncorrect answer [%s]\n", ans);
+                                               else {
+                                                 fprintf(stdout, "\nIncorrect 
answer [%s], skipping this location.\n", ans);
+                                                 confirm = 0; }
                                        }
                                        /* User chose not to overwrite */
                                        if (!confirm) continue;
--8<---------------cut here---------------end--------------->8---

(2) How is "--writephonebook --find-free" supposed to work?  

If I don't specify the location, I get:

echo 'Foo Bar;12345678;SM;;0;'|gnokii --writephonebook --find-free
GNOKII Version 0.6.4-CVS-20040709
Error (The given memory location is invalid.)

If I specify the location, I'm caught in the interactive mode infloop.

If someone can explain how it works, I'll provide an addition to the
man page.

Bye, Reiner.

[1] http://article.gmane.org/gmane.linux.drivers.gnokii/3479
-- 
       ,,,
      (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]