]> git.pld-linux.org Git - packages/abook.git/commitdiff
- with this pathc abook's query check can also nick field (depending on config
authorpawelk <pawelk@pld-linux.org>
Fri, 8 Jun 2001 21:14:03 +0000 (21:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  file (option mutt_query_nick)
- release = 2

Changed files:
    abook-nickquery.patch -> 1.1
    abook.spec -> 1.7

abook-nickquery.patch [new file with mode: 0644]
abook.spec

diff --git a/abook-nickquery.patch b/abook-nickquery.patch
new file mode 100644 (file)
index 0000000..c80ea60
--- /dev/null
@@ -0,0 +1,78 @@
+--- ./abook.c.org      Fri Jun  8 22:39:00 2001
++++ ./abook.c  Fri Jun  8 22:41:54 2001
+@@ -584,8 +584,30 @@
+                                       database[item][NOTES]
+                               );
+ }
+-
+ static int
++mutt_query_field(char *str, int field)
++{
++      int i, j;
++      char *tmp;
++
++      for(i = 0, j = 0 ; i < items; i++) {
++              if(database[i][field])
++                      tmp = strdup(database[i][field]);
++              else
++                      tmp =strdup("");
++              if( strstr( strupper(tmp), strupper(str) ) != NULL ) {
++                      if( !j )
++                              putchar('\n');
++                      muttq_print_item(i);
++                      j++;
++              }
++              free(tmp);
++      }
++
++      return j;
++}
++
++      static int
+ mutt_query_name(char *str)
+ {
+       int i, j;
+@@ -648,7 +670,9 @@
+               for(i = 0; i < items; i++)
+                       muttq_print_item(i);
+       } else {
+-              if( !mutt_query_name(str) && !mutt_query_email(str) ) {
++              if( !mutt_query_name(str) && !mutt_query_email(str) &&
++                      !(options_get_int("mutt_query_nick")&&
++                              mutt_query_field(str,NICK))) {
+                       printf("Not found\n");
+                       quit_mutt_query(1);
+               }
+--- ./options.c.org    Fri Jun  8 22:39:00 2001
++++ ./options.c        Fri Jun  8 22:42:48 2001
+@@ -153,6 +153,7 @@
+       options_add_key("mutt_command", "mutt");
+       options_add_key("mutt_return_all_emails", "true");
++      options_add_key("mutt_query_nick", "false");
+       options_add_key("print_command", "lpr");
+--- ./abookrc.5.org    Fri Jun  8 22:44:42 2001
++++ ./abookrc.5        Fri Jun  8 22:47:27 2001
+@@ -79,6 +79,10 @@
+ Defines whether to return all email addresses matching the search criteria to a mutt query. Default is true.
+ .TP
++\fBmutt_query_nick\fP=[true|false]
++Define whether to query also in nicks or not. Default is false
++
++.TP
+ \fBprint_command\fP=command
+ Defines the command to used when printing the addressbook. Default is "lpr".
+@@ -131,6 +135,9 @@
+ # Return all email addresses to a mutt query
+ mutt_return_all_emails=true
++
++# Qery also in nick
++mutt_query_nick = true
+ # Command used to print
+ print_command=lpr
index e087e6f11aaed5907d35ea06981d2d65445602bf..4499c056a3c9663a9192d0e65cdd7fdef964669c 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Text-based addressbook program for mutt
 Summary(pl):   Tekstowa ksi±¿ka adresowa dla klienta pocztowego mutt
 Name:          abook
 Version:       0.4.12
-Release:       1
+Release:       2
 License:       GPL
 Group:         Applications/Mail
 Group(de):     Applikationen/Post
@@ -10,6 +10,7 @@ Group(pl):    Aplikacje/Poczta
 Group(pt):     Aplicações/Correio Eletrônico
 Source0:       ftp://abook.sourceforge.net/pub/abook/%{name}-%{version}.tar.gz
 URL:           http://abook.sourceforge.net/
+Patch0:                %{name}-nickquery.patch
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: ncurses-devel >= 5.0
@@ -25,6 +26,7 @@ u
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 autoheader
This page took 0.08948 seconds and 4 git commands to generate.