-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: uritools
action: commit
revision:
path_from:
revision_from: af0cad5c4553bfbb1ffdcaef5fba2c639028f2ac:
path_to:
revision_to:

git.thebackupbox.net

uritools

git://git.thebackupbox.net/uritools

commit af0cad5c4553bfbb1ffdcaef5fba2c639028f2ac
Author: epoch <epoch@enzo.thebackupbox.net>
Date:   Tue Dec 15 16:27:46 2020 -0600

    switched from strcmp to fnmatch in urimatch

diff --git a/urimatch.c b/urimatch.c

index 42ee0aa98ae002253a8bdff3695c72249e44c19b..

index ..a90fb689369308b57e2f752d8c507a94710f3e6c 100644

--- a/urimatch.c
+++ b/urimatch.c
@@ -2,6 +2,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <fnmatch.h>

 #define LINE_LENGTH 1024

@@ -10,7 +11,7 @@ int match(char negate,char *part,char *arg) {
   if(part == 0) return 1;//we found that the part isn't here!
  } else {
   if(part) {
-   if(!strcmp(part,arg)) return 1;
+   if(!fnmatch(arg,part,FNM_NOESCAPE)) return 1;
   }
  }
  return 0;

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 15:56:21 2024