iadded the $HOME variable in the AFMPATH - enscript - GNU Enscript Err thinkerwim.openbsd.amsterdam 70 hgit clone git://thinkerwim.org/enscript.git URL:git://thinkerwim.org/enscript.git thinkerwim.org 70 1Log /git/enscript/log.gph thinkerwim.org 70 1Files /git/enscript/files.gph thinkerwim.org 70 1Refs /git/enscript/refs.gph thinkerwim.org 70 1README /git/enscript/file/README.gph thinkerwim.org 70 1LICENSE /git/enscript/file/COPYING.gph thinkerwim.org 70 i--- Err thinkerwim.openbsd.amsterdam 70 1commit 8dd15a323fa471f3ec726fd9a274c37123cb90f5 /git/enscript/commit/8dd15a323fa471f3ec726fd9a274c37123cb90f5.gph thinkerwim.org 70 1parent 4828bae2f661b7b29b6db6d53bb8ebe17c5c1b94 /git/enscript/commit/4828bae2f661b7b29b6db6d53bb8ebe17c5c1b94.gph thinkerwim.org 70 hAuthor: Wim Stockman URL:mailto:wim@yasendfile.org thinkerwim.org 70 iDate: Fri, 10 Mar 2023 14:39:18 +0100 Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iadded the $HOME variable in the AFMPATH Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iso now you can use the $HOME variable in the AFMPATH Err thinkerwim.openbsd.amsterdam 70 iif you want your user to use there own fonts Err thinkerwim.openbsd.amsterdam 70 iI advice the put the userfonts in $HOME/.config/enscript/afm Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iDiffstat: Err thinkerwim.openbsd.amsterdam 70 i A .gitignore | 1 + Err thinkerwim.openbsd.amsterdam 70 i M src/util.c | 14 ++++++++++++++ Err thinkerwim.openbsd.amsterdam 70 i R convertfontto.sh -> tools/convertf… | 0 Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i3 files changed, 15 insertions(+), 0 deletions(-) Err thinkerwim.openbsd.amsterdam 70 i--- Err thinkerwim.openbsd.amsterdam 70 1diff --git a/.gitignore b/.gitignore /git/enscript/file/.gitignore.gph thinkerwim.org 70 i@@ -0,0 +1 @@ Err thinkerwim.openbsd.amsterdam 70 i+afmlib/.deps Err thinkerwim.openbsd.amsterdam 70 1diff --git a/src/util.c b/src/util.c /git/enscript/file/src/util.c.gph thinkerwim.org 70 i@@ -93,6 +93,19 @@ static struct Err thinkerwim.openbsd.amsterdam 70 i if (token2 == NULL) \ Err thinkerwim.openbsd.amsterdam 70 i CFG_FATAL ((stderr, _("missing argument: %s"), token)); Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i+void search_and_replace(char *str, char *search, char *replace) { Err thinkerwim.openbsd.amsterdam 70 i+ char *pos; Err thinkerwim.openbsd.amsterdam 70 i+ int search_len = strlen(search); Err thinkerwim.openbsd.amsterdam 70 i+ int replace_len = strlen(replace); Err thinkerwim.openbsd.amsterdam 70 i+ Err thinkerwim.openbsd.amsterdam 70 i+ while ((pos = strstr(str, search)) != NULL) { Err thinkerwim.openbsd.amsterdam 70 i+ char tmp[strlen(str) + 1]; Err thinkerwim.openbsd.amsterdam 70 i+ strcpy(tmp, pos + search_len); Err thinkerwim.openbsd.amsterdam 70 i+ strcpy(pos, replace); Err thinkerwim.openbsd.amsterdam 70 i+ strcpy(pos + replace_len, tmp); Err thinkerwim.openbsd.amsterdam 70 i+ str = pos + replace_len; Err thinkerwim.openbsd.amsterdam 70 i+ } Err thinkerwim.openbsd.amsterdam 70 i+} Err thinkerwim.openbsd.amsterdam 70 i int Err thinkerwim.openbsd.amsterdam 70 i read_config (char *path, char *file) Err thinkerwim.openbsd.amsterdam 70 i { Err thinkerwim.openbsd.amsterdam 70 i@@ -139,6 +152,7 @@ read_config (char *path, char *file) Err thinkerwim.openbsd.amsterdam 70 i { Err thinkerwim.openbsd.amsterdam 70 i token2 = GET_TOKEN (NULL); Err thinkerwim.openbsd.amsterdam 70 i CHECK_TOKEN (); Err thinkerwim.openbsd.amsterdam 70 i+ search_and_replace(token2,"$HOME",getenv("HOME")); Err thinkerwim.openbsd.amsterdam 70 i xfree (afm_path); Err thinkerwim.openbsd.amsterdam 70 i afm_path = xstrdup (token2); Err thinkerwim.openbsd.amsterdam 70 i } Err thinkerwim.openbsd.amsterdam 70 1diff --git a/convertfontto.sh b/tools/convertfontto.sh /git/enscript/file/tools/convertfontto.sh.gph thinkerwim.org 70 .