links patch

Fryderyk 'Fritz' Dziarmagowski fritz w phreaker.net
Pią, 5 Kwi 2002, 10:26:44 CEST


Ponieważ droga do cvs rw jest długa i kręta to chciałbym prosić jakiegoś 
dobrego człowieka ;) coby dodał patcha dla links'a umożliwiającego dump 
strony kodowej iso-8859-2 na stdout. Dzięki temu po podmianie w 
/usr/lib/mc/mc.ext lynxa na linksa (links -dump -dump_codepage iso-8859-2 
%f) otrzymujemy na wyjściu polskie literki. 
Oto patch:
# links-0.96-dump_codepage.patch by Anton Voloshin (vav_at_isv.ru)
diff -urN /tmp/links-0.96/default.c links-0.96/default.c
--- /tmp/links-0.96/default.c   Sun Apr  8 22:46:18 2001
+++ links-0.96/default.c        Wed Mar  6 18:56:09 2002
@@ -898,6 +898,7 @@
        1, gen_cmd, num_rd, num_wr, 0, 1, 
&http_bugs.bug_post_no_keepalive, "http_bugs.bug_post_no_keepalive", 
"http-bugs.bug_post-no-keepalive",
        1, gen_cmd, str_rd, str_wr, 0, MAX_STR_LEN, default_anon_pass, 
"ftp.anonymous_password", "ftp.anonymous-password",
        1, gen_cmd, cp_rd, NULL, 0, 0, &dds.assume_cp, "assume_codepage", 
"assume-codepage",
+       1, gen_cmd, cp_rd, NULL, 0, 0, &dump_codepage, "dump_codepage", 
"dump-codepage",
        1, NULL, term_rd, term_wr, 0, 0, NULL, "terminal", NULL,
        1, NULL, term2_rd, NULL, 0, 0, NULL, "terminal2", NULL,
        1, NULL, type_rd, type_wr, 0, 0, NULL, "association", NULL,
diff -urN /tmp/links-0.96/links.h links-0.96/links.h
--- /tmp/links-0.96/links.h     Mon Jun 11 12:14:25 2001
+++ links-0.96/links.h          Wed Mar  6 18:56:09 2002
@@ -1081,6 +1081,8 @@

 extern int retval;

+extern int dump_codepage;
+
 extern unsigned char *path_to_exe;

 void unhandle_terminal_signals(struct terminal *term);
diff -urN /tmp/links-0.96/main.c links-0.96/main.c
--- /tmp/links-0.96/main.c      Sun Apr  8 22:46:06 2001
+++ links-0.96/main.c           Wed Mar  6 18:39:33 2002
@@ -2,6 +2,8 @@

 int retval = RET_OK;

+int dump_codepage = 0;
+
 void unhandle_basic_signals(struct terminal *);

 void sig_terminate(struct terminal *t)
@@ -201,7 +203,7 @@
                o.xw = 80;
                o.yw = 25;
                o.col = 0;
-               o.cp = 0;
+               o.cp = dump_codepage;
                ds2do(&dds, &o);
                o.plain = 0;
                o.frames = 0;
-------------------------------------------------end

Linksa z tym patchem używam odkąd tylko pojawił się na linksowej mailing 
liście. Nigdy nie maiłem z nim problemów, działa tak jak powinien.

pozdr.

-- 
[ Fryderyk Dziarmagowski <fritz w phreaker.net> ]
[               Linux Registered User #164489 ]
[ ------------------------------------------- ]
-------------- następna część ---------
diff -urN /tmp/links-0.96/default.c links-0.96/default.c
--- /tmp/links-0.96/default.c	Sun Apr  8 22:46:18 2001
+++ links-0.96/default.c	Wed Mar  6 18:56:09 2002
@@ -898,6 +898,7 @@
 	1, gen_cmd, num_rd, num_wr, 0, 1, &http_bugs.bug_post_no_keepalive, "http_bugs.bug_post_no_keepalive", "http-bugs.bug_post-no-keepalive",
 	1, gen_cmd, str_rd, str_wr, 0, MAX_STR_LEN, default_anon_pass, "ftp.anonymous_password", "ftp.anonymous-password",
 	1, gen_cmd, cp_rd, NULL, 0, 0, &dds.assume_cp, "assume_codepage", "assume-codepage",
+	1, gen_cmd, cp_rd, NULL, 0, 0, &dump_codepage, "dump_codepage", "dump-codepage",
 	1, NULL, term_rd, term_wr, 0, 0, NULL, "terminal", NULL,
 	1, NULL, term2_rd, NULL, 0, 0, NULL, "terminal2", NULL,
 	1, NULL, type_rd, type_wr, 0, 0, NULL, "association", NULL,
diff -urN /tmp/links-0.96/links.h links-0.96/links.h
--- /tmp/links-0.96/links.h	Mon Jun 11 12:14:25 2001
+++ links-0.96/links.h		Wed Mar  6 18:56:09 2002
@@ -1081,6 +1081,8 @@
 
 extern int retval;
 
+extern int dump_codepage;
+
 extern unsigned char *path_to_exe;
 
 void unhandle_terminal_signals(struct terminal *term);
diff -urN /tmp/links-0.96/main.c links-0.96/main.c
--- /tmp/links-0.96/main.c	Sun Apr  8 22:46:06 2001
+++ links-0.96/main.c		Wed Mar  6 18:39:33 2002
@@ -2,6 +2,8 @@
 
 int retval = RET_OK;
 
+int dump_codepage = 0;
+
 void unhandle_basic_signals(struct terminal *);
 
 void sig_terminate(struct terminal *t)
@@ -201,7 +203,7 @@
 		o.xw = 80;
 		o.yw = 25;
 		o.col = 0;
-		o.cp = 0;
+		o.cp = dump_codepage;
 		ds2do(&dds, &o);
 		o.plain = 0;
 		o.frames = 0;


Więcej informacji o liście dyskusyjnej pld-users-pl