summaryrefslogtreecommitdiff
path: root/russian/rux/files/patch-rux.c
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/rux/files/patch-rux.c
parentFix build. (diff)
- Fix build on FreeBSD 4.11
Reported by: pointihat(kris) Approved by: maintainer
Diffstat (limited to '')
-rw-r--r--russian/rux/files/patch-rux.c36
1 files changed, 36 insertions, 0 deletions
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);