summaryrefslogtreecommitdiff
path: root/www/tidy/files/patch-af
diff options
context:
space:
mode:
authorAlexey Zelkin <phantom@FreeBSD.org>2001-11-22 15:26:43 +0000
committerAlexey Zelkin <phantom@FreeBSD.org>2001-11-22 15:26:43 +0000
commit29ff18f4bd95463fe6b2fe2fc22470499aa5e710 (patch)
tree596622673e2a261cc0eb06cb32c1a7b307035bf3 /www/tidy/files/patch-af
parentAdd new option '-preserve' to preserve characters entities from source file (diff)
Add new option '-preserve' to preserve characters entities from source file
(i.e. leave them undecoded into plain characters). This feature will be utilized by translation teams and was successfuly tested against Russian and Japanese Translation Projects. Also add simple hack to not to display annoying "Can't open ~/.tidyrc" warning message in case if ~/.tidyrc file missing. Bump PORTREVISION. Approved by: Scott Kenney <saken@hotel.rmta.org> (maintainer) Tested by: myself, hrs
Notes
Notes: svn path=/head/; revision=50378
Diffstat (limited to 'www/tidy/files/patch-af')
-rw-r--r--www/tidy/files/patch-af37
1 files changed, 37 insertions, 0 deletions
diff --git a/www/tidy/files/patch-af b/www/tidy/files/patch-af
new file mode 100644
index 000000000000..4c9587322849
--- /dev/null
+++ b/www/tidy/files/patch-af
@@ -0,0 +1,37 @@
+--- localize.c.orig Fri Aug 4 19:21:05 2000
++++ localize.c Mon Nov 19 14:39:38 2001
+@@ -8,6 +8,9 @@
+ to localize HTML tidy.
+ */
+
++#include <sys/types.h>
++#include <sys/stat.h>
++
+ #include "platform.h"
+ #include "html.h"
+
+@@ -50,6 +53,16 @@
+ tidy_out(fp, "Can't open \"%s\"\n", file);
+ }
+
++int FileExists(const char *file)
++{
++ struct stat st;
++
++ if (stat(file, &st) < 0)
++ return (0);
++ else
++ return (1);
++}
++
+ static void ReportTag(Lexer *lexer, Node *tag)
+ {
+ if (tag)
+@@ -736,6 +749,7 @@
+ tidy_out(out, " -xml use this when input is wellformed xml\n");
+ tidy_out(out, " -asxml to convert html to wellformed xml\n");
+ tidy_out(out, " -slides to burst into slides on h2 elements\n");
++ tidy_out(out, " -preserve to preserve entities from source file\n");
+ tidy_out(out, "\n");
+
+ tidy_out(out, "Character encodings\n");