mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
ebf88ffc8a
NFBTRANS is a very accurate Grade Two braille translator. It can also back translate a Grade Two file into normal text. The program has many options which allow the user to customize its operation. Formatting commands can be used to generate Tables of Contents, ink print page numbers, running headers and much more. Translation rules are in a text file and can easily be modified by the user. The program can be configured to hyphenate words to save space. Because the copyright status is unclear, I'm marking this as RESTRICTED until I can find out from the author.
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
--- nfbtrans.c.orig Wed Aug 19 16:30:14 1998
|
|
+++ nfbtrans.c Sun Aug 30 08:34:55 1998
|
|
@@ -2,7 +2,9 @@
|
|
#define LINT_ARGS
|
|
#define DOS
|
|
#else
|
|
-#define UNIX_PATH "/usr/local/lib/"
|
|
+#ifndef UNIX_PATH
|
|
+#define UNIX_PATH "/usr/local/lib/nfbtrans/"
|
|
+#endif
|
|
#endif /* unix */
|
|
#ifndef lint
|
|
#endif /* lint */
|
|
@@ -24,7 +26,7 @@
|
|
#include <fcntl.h>
|
|
#include <stdarg.h>
|
|
#define MAXARGS 7
|
|
-#if defined(sunos) || defined(linux)
|
|
+#if defined(sunos) || defined(linux) || defined(freebsd)
|
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
#endif
|
|
@@ -4731,7 +4733,12 @@
|
|
for (;;)
|
|
{
|
|
fprintf(stderr, "Enter dictionary word <RETURN> to skip: ");
|
|
+#ifdef freebsd
|
|
+ fgets(temp, sizeof(temp), stdin);
|
|
+ temp[strlen(temp)-1] = '\0';
|
|
+#else
|
|
gets(temp);
|
|
+#endif
|
|
if (!temp[0])
|
|
break; /* skip, don't store as rejected */
|
|
strupr(temp);
|
|
@@ -5242,7 +5249,12 @@
|
|
for (;;)
|
|
{
|
|
fprintf(stderr, "enter word <RETURN> to exit: ");
|
|
+#ifdef freebsd
|
|
+ fgets(field, (sizeof(field_) - (field - field_)), stdin);
|
|
+ field[strlen(field-1)] = '\0';
|
|
+#else
|
|
gets(field);
|
|
+#endif
|
|
if (strlen(field) < 2)
|
|
break;
|
|
strupr(field);
|