mldonkey-commits
[Top][All Lists]
Advanced

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

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Mon, 13 Nov 2006 13:14:49 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/11/13 13:14:49

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonComplexOptions.ml commonSearch.ml 

Log message:
        patch #5548

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1087&r2=1.1088
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonComplexOptions.ml?cvsroot=mldonkey&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonSearch.ml?cvsroot=mldonkey&r1=1.17&r2=1.18

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1087
retrieving revision 1.1088
diff -u -b -r1.1087 -r1.1088
--- distrib/ChangeLog   13 Nov 2006 13:10:17 -0000      1.1087
+++ distrib/ChangeLog   13 Nov 2006 13:14:49 -0000      1.1088
@@ -15,6 +15,8 @@
 =========
 
 2006/11/13
+5548: New search parameters: "-and", "-or", "-not", removed "-without"
+      (Schlumpf)
 5546: Some sharing updates
 - solved bug 10957, updating the prio of an already shared dir is now possible
 - fix bug where missing shared dirs with strategy incoming_* where not 
recreated

Index: src/daemon/common/commonComplexOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.ml,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- src/daemon/common/commonComplexOptions.ml   13 Nov 2006 13:10:17 -0000      
1.67
+++ src/daemon/common/commonComplexOptions.ml   13 Nov 2006 13:14:49 -0000      
1.68
@@ -571,7 +571,7 @@
     "-movies", "avi -minsize 650000000 -1cd";
     "-mp3s", "mp3 -minsize 3000000 -maxsize 10000000";
     "-albums", "album -minsize 30000000 -maxsize 150000000";
-    "-nosex", "-without xxx";
+    "-nosex", "-not xxx";
   ]
   
 let customized_queries =

Index: src/daemon/common/commonSearch.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonSearch.ml,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- src/daemon/common/commonSearch.ml   19 Jan 2006 00:44:47 -0000      1.17
+++ src/daemon/common/commonSearch.ml   13 Nov 2006 13:14:49 -0000      1.18
@@ -117,8 +117,12 @@
     | "-network" :: name :: args ->
         net := (network_find_by_name name).network_num;
         iter args q
-    | "-without" :: name :: args ->
+    | "-not" :: name :: args ->
         iter args ((QAndNot (QHasWord name, QHasWord name)) :: q)
+    | "-and" :: name :: args ->
+        iter args ((QAnd (QHasWord name, QHasWord name)) :: q)
+    | "-or" :: name :: args ->
+        iter args ((QOr (QHasWord name, QHasWord name)) :: q)
     | s :: args ->
         if s.[0] = '-' then
           let args = 
@@ -134,14 +138,17 @@
           iter args ((QHasWord(s)) :: q)
   in
   let q = iter args [] in
-  (match q with 
+  (match (List.rev q) with 
       [] -> failwith "Void query"
-    | [QAndNot _] -> failwith "Bad without query"
     | q1 :: tail ->
         List.fold_left (fun q1 q2 ->
             match q2 with
-              QAndNot (QHasWord x,_) ->
+              QAndNot (QHasWord x, _) ->
                 QAndNot (q1, QHasWord x)
+            | QAnd (QHasWord x, _) ->
+                QAnd (q1, QHasWord x)
+            | QOr (QHasWord x, _) ->
+                QOr (q1, QHasWord x)
             | _ ->
                 QAnd (q1,q2)
         ) q1 tail), !net




reply via email to

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