Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37841733
en ru br
ALT Linux repositórios
S:1.3.5-alt1.1.qa2
5.0: 1.3.5-alt1.1
4.1: 1.3.5-alt1
4.0: 1.3.5-alt1
3.0: 1.3.3-alt1

Group :: Desenvolvimento/Outros
RPM: tla

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: tla-1.3.5-neon.patch
Download


diff -urNp tla-1.3.5.orig/src/tla/libarch/pfs-dav.c tla-1.3.5/src/tla/libarch/pfs-dav.c
--- tla-1.3.5.orig/src/tla/libarch/pfs-dav.c	2006-07-20 12:04:40.000000000 +0530
+++ tla-1.3.5/src/tla/libarch/pfs-dav.c	2007-12-13 22:51:47.000000000 +0530
@@ -21,14 +21,14 @@
 #include "tla/libfsutils/file-contents.h"
 #include "tla/libarch/archives.h"
 #include "tla/libarch/pfs-dav.h"
-#include "libneon/src/ne_session.h"
-#include "libneon/src/ne_basic.h"
-#include "libneon/src/ne_request.h"
-#include "libneon/src/ne_auth.h"
-#include "libneon/src/ne_props.h"
-#include "libneon/src/ne_uri.h"
-#include "libneon/src/ne_redirect.h"
-#include "libneon/src/ne_socket.h"
+#include <neon/ne_session.h>
+#include <neon/ne_basic.h>
+#include <neon/ne_request.h>
+#include <neon/ne_auth.h>
+#include <neon/ne_props.h>
+#include <neon/ne_uri.h>
+#include <neon/ne_redirect.h>
+#include <neon/ne_socket.h>
 
 
 
@@ -856,6 +856,74 @@ dav_client_auth (void * userdata,
   return 0;
 }
 
+/* neon24 path escape */
+/* RFC2396 spake:
+ * "Data must be escaped if it does not have a representation
+ * using an unreserved character".
+ */
+
+/* Lookup table: character classes from 2396. (This is overkill) */
+
+#define SP 0   /* space    = <US-ASCII coded character 20 hexadecimal> */
+#define CO 0   /* control  = <US-ASCII coded characters 00-1F and 7F hexadecimal>  */
+#define DE 0   /* delims   = "<" | ">" | "#" | "%" | <">       */
+#define UW 0   /* unwise   = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"       */
+#define MA 1   /* mark     = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"   */
+#define AN 2   /* alphanum = alpha | digit                                        */
+#define RE 2   /* reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," */
+
+static const char uri_chars[128] = {
+/*                +2      +4      +6      +8     +10     +12     +14     */
+/*   0 */ CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO,
+/*  16 */ CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO,
+/*  32 */ SP, MA, DE, DE, RE, DE, RE, MA, MA, MA, MA, RE, RE, MA, MA, RE,
+/*  48 */ AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, RE, RE, DE, RE, DE, RE,
+/*  64 */ RE, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
+/*  80 */ AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, UW, UW, UW, UW, MA,
+/*  96 */ UW, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
+/* 112 */ AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, UW, UW, UW, MA, CO
+};
+
+#define ESCAPE(ch) (((const signed char)(ch) < 0 || \
+               uri_chars[(unsigned int)(ch)] == 0))
+
+#undef SP
+#undef CO
+#undef DE
+#undef UW
+#undef MA
+#undef AN
+#undef RE
+
+static char *ne24_path_escape(const char *abs_path)
+{
+    const char *pnt;
+    char *ret, *retpos;
+    int count = 0;
+    for (pnt = abs_path; *pnt != '\0'; pnt++) {
+       if (ESCAPE(*pnt)) {
+           count++;
+       }
+    }
+    if (count == 0) {
+       return strdup(abs_path);
+    }
+    /* An escaped character is "%xx", i.e., two MORE
+     * characters than the original string */
+    retpos = ret = malloc(strlen(abs_path) + 2*count + 1);
+    for (pnt = abs_path; *pnt != '\0'; pnt++) {
+       if (ESCAPE(*pnt)) {
+           /* Escape it - %<hex><hex> */
+           sprintf(retpos, "%%%02x", (unsigned char) *pnt);
+           retpos += 3;
+       } else {
+           /* It's cool */
+           *retpos++ = *pnt;
+       }
+    }
+    *retpos = '\0';
+    return ret;
+}
 
 static t_uchar *
 abs_path (const t_uchar * cwd,
@@ -874,7 +942,7 @@ abs_path (const t_uchar * cwd,
 
   dirfold (file);
 
-  tmp = ne_path_escape (file);
+  tmp = ne24_path_escape (file);
   lim_free (0, file);
   file = str_save (0, tmp);
   free (tmp);
diff -urNp tla-1.3.5.orig/src/tla/PLUGIN/REQ tla-1.3.5/src/tla/PLUGIN/REQ
--- tla-1.3.5.orig/src/tla/PLUGIN/REQ	2006-07-20 12:04:40.000000000 +0530
+++ tla-1.3.5/src/tla/PLUGIN/REQ	2007-12-13 22:51:41.000000000 +0530
@@ -1,2 +1 @@
 hackerlab	tla
-libneon		tla
diff -urNp tla-1.3.5.orig/src/tla/tla/Makefile.in tla-1.3.5/src/tla/tla/Makefile.in
--- tla-1.3.5.orig/src/tla/tla/Makefile.in	2006-07-20 12:04:40.000000000 +0530
+++ tla-1.3.5/src/tla/tla/Makefile.in	2007-12-13 22:51:41.000000000 +0530
@@ -3,7 +3,7 @@ libs			:=	../libarch/libarch.a \
 				../libawk/libawk.a \
 				../libdate/libdate.a \
 				$(objroot)/hackerlab/libhackerlab/libhackerlab.a \
-				../../libneon/src/libneon.la \
+				-lneon \
 				-lm 
 
 mains			:=	tla.c
@@ -21,7 +21,7 @@ Programs: $(programs)
 endif
 
 $(programs):%$(cfg__exec_suffix):%.o $(thelib) $(filter-out -L%, $(filter-out -l%, $(libs)))
-	$(SHELL) $(objroot)/libneon/libtool --mode=link $(CC) $(CFLAGS) -L../../expat -o $@ $< $(thelib) $(libs)
+	$(CC) $(CFLAGS) -o $@ $< $(thelib) $(libs)
 
 clean: clean-prog
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009