aboutsummaryrefslogtreecommitdiff
path: root/russian
diff options
context:
space:
mode:
authorAndrey Slusar <anray@FreeBSD.org>2006-01-03 20:18:03 +0000
committerAndrey Slusar <anray@FreeBSD.org>2006-01-03 20:18:03 +0000
commit734fca235a72b1c0060d45252d80bad43157b21f (patch)
tree8bbc5cf7c536df1c1e3c77fb005e34ba80080877 /russian
parent5019835482349907a92b8cef00ee656ed6a42324 (diff)
downloadports-734fca235a72b1c0060d45252d80bad43157b21f.tar.gz
ports-734fca235a72b1c0060d45252d80bad43157b21f.zip
Notes
Diffstat (limited to 'russian')
-rw-r--r--russian/rux/files/patch-cpdetect.c26
-rw-r--r--russian/rux/files/patch-rux.c36
2 files changed, 62 insertions, 0 deletions
diff --git a/russian/rux/files/patch-cpdetect.c b/russian/rux/files/patch-cpdetect.c
new file mode 100644
index 000000000000..d9e487ca5952
--- /dev/null
+++ b/russian/rux/files/patch-cpdetect.c
@@ -0,0 +1,26 @@
+--- cpdetect.c.orig Sat Dec 24 18:32:27 2005
++++ cpdetect.c Sun Jan 1 15:57:17 2006
+@@ -64,6 +64,8 @@
+ struct cpinfo *in_cp = def_cp;
+
+ for (cur_cp = cp; cur_cp->cp_name; cur_cp++) {
++ u_char *p;
++ float cur_exp = .0; /* an expectancy of current code page */
+ memset(tab, 255, sizeof(tab));
+ memset(freq, 0, sizeof(freq));
+
+@@ -71,13 +73,11 @@
+ tab[cur_cp->cp_data[i]] = i;
+ }
+
+- u_char *p = buf + len - 1;
++ p = buf + len - 1;
+
+ while ((p - buf) >= 0) {
+ ++freq[tab[*p--]]; /* freq[0xff] is a heap :) */
+ }
+-
+- float cur_exp = .0; /* an expectancy of current code page */
+
+ for (i = 0; i < cp_size; i++) {
+ float freq_factor = freq[i] / (float)len;
diff --git a/russian/rux/files/patch-rux.c b/russian/rux/files/patch-rux.c
new file mode 100644
index 000000000000..5f8f70615749
--- /dev/null
+++ b/russian/rux/files/patch-rux.c
@@ -0,0 +1,36 @@
+--- rux.c.orig Sun Dec 25 00:22:01 2005
++++ rux.c Sun Jan 1 15:46:52 2006
+@@ -70,9 +70,10 @@
+ extern int optind;
+
+ char *buf = NULL; /* analizing buffer */
++ int flag;
++ int readstdin = 0; /* read from stdin */
+
+ o_cp = &codepage[2]; /* sets koi8-r as default outcp */
+- int flag;
+
+ while ((flag = getopt(argc, argv, "i:o:thegTs:")) != -1) {
+ switch (flag) {
+@@ -133,19 +134,18 @@
+ }
+ }
+
+- int readstdin = 0; /* read from stdin */
+-
+ if (argc == 0)
+ readstdin = 1;
+
+ while (1) {
++ int buflen = 0;
++
+ if (readstdin) {
+ in = stdin;
+ } else if ((in = fopen(*argv, "r")) == NULL) {
+ perror(*argv);
+ return errno;
+ }
+- int buflen = 0;
+
+ if (fdetect) {
+ buflen = fread(buf, 1, ansize, in);