diff options
author | naddy <naddy@FreeBSD.org> | 2001-12-02 13:09:47 +0000 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2001-12-02 13:09:47 +0000 |
commit | 48878aa9097e09515665708ac92adfc809385e87 (patch) | |
tree | d3ec304a7d49e5de7b7cc39176927a38d331d4e8 /biology/babel/files | |
parent | b4e77a2bdc553c95143fbd9d68dfcb83b4c933f7 (diff) | |
download | FreeBSD-ports-48878aa9097e09515665708ac92adfc809385e87.zip FreeBSD-ports-48878aa9097e09515665708ac92adfc809385e87.tar.gz |
* Replace pkg-message about setting BABEL_DIR with a wrapper script
that does.
* Remove misleading full path name from usage message.
* Improve fgets() usage.
* Add converters category.
* Improve pkg-comment and pkg-descr.
Diffstat (limited to 'biology/babel/files')
-rw-r--r-- | biology/babel/files/babel.sh | 6 | ||||
-rw-r--r-- | biology/babel/files/patch-ab | 23 | ||||
-rw-r--r-- | biology/babel/files/patch-convert.c | 22 |
3 files changed, 40 insertions, 11 deletions
diff --git a/biology/babel/files/babel.sh b/biology/babel/files/babel.sh new file mode 100644 index 0000000..6a97d7d --- /dev/null +++ b/biology/babel/files/babel.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# $FreeBSD$ + +export BABEL_DIR=${BABEL_DIR-@PREFIX@/share/babel} + +exec @PREFIX@/libexec/babel "$@" diff --git a/biology/babel/files/patch-ab b/biology/babel/files/patch-ab index a8017dc..5859fc0 100644 --- a/biology/babel/files/patch-ab +++ b/biology/babel/files/patch-ab @@ -1,14 +1,17 @@ ---- menus.c.orig Tue Jan 21 23:52:36 1997 -+++ menus.c Mon Dec 22 14:29:37 1997 + +$FreeBSD$ + +--- menus.c.orig Tue Jan 21 16:52:36 1997 ++++ menus.c Sun Nov 18 16:43:32 2001 @@ -63,9 +63,9 @@ } } printf("Input file name : "); - gets(InfileName); -+ fgets(InfileName, BUFF_SIZE - 1, stdin); ++ fgets(InfileName, BUFF_SIZE, stdin); printf("Keywords : "); - gets(InputKeywords); -+ fgets(InputKeywords, BUFF_SIZE - 1, stdin); ++ fgets(InputKeywords, BUFF_SIZE, stdin); if (strlen(InputKeywords) < 1) strcpy(InputKeywords,"KEYWORDS GO HERE"); @@ -17,23 +20,21 @@ } printf("Output file name : "); - gets(OutfileName); -+ fgets(OutfileName, BUFF_SIZE - 1, stdin); ++ fgets(OutfileName, BUFF_SIZE, stdin); if (has_keywords) { printf("Keywords : "); - gets(OutputKeywords); -+ fgets(OutputKeywords, BUFF_SIZE - 1, stdin); ++ fgets(OutputKeywords, BUFF_SIZE, stdin); if (strlen(OutputKeywords) < 1) strcpy(OutputKeywords,"KEYWORDS GO HERE"); } -@@ -167,8 +167,8 @@ +@@ -167,7 +167,7 @@ while (done == FALSE) { printf("Choice : "); - gets(choice_string); -- for (i = 0; i < (int) strlen(choice_string); i++) -+ fgets(choice_string, 99, stdin); -+ for (i = 0; i < ((int) strlen(choice_string) - 1) ; i++) ++ fgets(choice_string, sizeof(choice_string), stdin); + for (i = 0; i < (int) strlen(choice_string); i++) { if (!isdigit(choice_string[i])) - choice = 0; diff --git a/biology/babel/files/patch-convert.c b/biology/babel/files/patch-convert.c new file mode 100644 index 0000000..229da42 --- /dev/null +++ b/biology/babel/files/patch-convert.c @@ -0,0 +1,22 @@ + +$FreeBSD$ + +--- convert.c.orig Sun Nov 18 16:44:25 2001 ++++ convert.c Sun Nov 18 16:44:54 2001 +@@ -28,6 +28,7 @@ + static warning wstr; + + static char *program_name; ++extern char *__progname; + int use_title = FALSE; + + #ifdef MSDOS +@@ -47,7 +48,7 @@ + #endif + + babel_init(); +- program_name = argv[0]; ++ program_name = __progname; + if (argc == 1) + { + usage(); |