summaryrefslogtreecommitdiff
path: root/language/tibetan/original/src/tfilt.c
diff options
context:
space:
mode:
Diffstat (limited to 'language/tibetan/original/src/tfilt.c')
-rw-r--r--language/tibetan/original/src/tfilt.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/language/tibetan/original/src/tfilt.c b/language/tibetan/original/src/tfilt.c
new file mode 100644
index 0000000000..58cc447229
--- /dev/null
+++ b/language/tibetan/original/src/tfilt.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright 1987 Jeff Sparkes
+ * Department of Computer Science
+ * Memorial University of Newfoundland
+ * St. John's, Nfld.
+ * garfield!jeff1, jeff1@garfield.mun.cdn
+ *
+ * Permission is granted to distribute and/or modify this code, provided
+ * this copyright notice remains intact.
+ * If you use it, let me know. If change it let me know. If you
+ * make money from it, send me a share.
+ */
+
+#include <stdio.h>
+#include "table.h"
+#include "token.h"
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ char c;
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s input_file\n", argv[0]);
+ exit(11);
+ }
+ if ((input = fopen(argv[1], "r")) == NULL) {
+ perror(argv[1]);
+ exit(12);
+ }
+ /*
+ * Now the hard part begins.
+ */
+
+ printf("\\font\\tibetan=tib\\font\\tibsp=tibsp ");
+ while ((c = getc(input)) != EOF) {
+ if (c == '%') {
+ if ((c = getc(input)) == '%')
+ tparse();
+ else if (c == EOF)
+ exit(0);
+ else
+ putchar('%');
+ } else
+ putchar(c);
+ }
+ exit(0);
+}