From 2396e90056706ef897acab3aaa081289c7336483 Mon Sep 17 00:00:00 2001 From: LEPILLER Julien Date: Fri, 19 Apr 2019 11:48:39 +0200 Subject: [PATCH] Allow variable parameters --- mecab/src/param.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mecab/src/param.cpp b/mecab/src/param.cpp index 65328a2..006b1b5 100644 --- a/mecab/src/param.cpp +++ b/mecab/src/param.cpp @@ -79,8 +79,12 @@ bool Param::load(const char *filename) { size_t s1, s2; for (s1 = pos+1; s1 < line.size() && isspace(line[s1]); s1++); for (s2 = pos-1; static_cast(s2) >= 0 && isspace(line[s2]); s2--); - const std::string value = line.substr(s1, line.size() - s1); + std::string value = line.substr(s1, line.size() - s1); const std::string key = line.substr(0, s2 + 1); + + if(value.find('$') == 0) { + value = std::getenv(value.substr(1).c_str()); + } set(key.c_str(), value, false); } -- 2.20.1 e>
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2023-10-01gnu: xfig: Update to 3.2.9....* gnu/packages/patches/xfig-Enable-error-message-for-missing-libraries.patch: New file. * gnu/packages/patches/xfig-Fix-double-free-when-requesting-MediaBox.patch: Likewise. * gnu/packages/patches/xfig-Use-pkg-config-to-set-fontconfig-CFLAGS-and-LIBS.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register new patches. * gnu/packages/xfig.scm (xfig): Update to 3.2.9. [source]: Use new patches. [arguments]<#:phases>: Add ‘wrap-program’. [native-inputs]: Add pkg-config, autoconf, automake and libtool. Move ghostscript to … [inputs]: … here. Add fig2dev, libxaw3d and libxft. [license]: Update URL. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Bruno Victal
2023-10-01gnu: Add fig2dev....The source used by the transfig package is outdated and its development was moved into the repository used by fig2dev though the utility `transfig' is considered obsolete and not built by default in the fig2dev package. In practice, this is not a problem since the user is generally after the `fig2dev' utility which was also provided in the (now obsolete) transfig package. Descriptions and comments pointing to the now obsolete packages are adjusted accordingly. For texlive-latex-make, this follow upstream at <https://gitlab.inria.fr/latex-utils/latex-make/-/commit/1dcc04aaa860b123924ae83fc30a47d6f7179f7a>. * gnu/packages/xfig.scm: Import all of (guix licenses). (xfig)[license]: Adjust accordingly. (fig2dev): New variable. (transfig): Deprecate in favor of fig2dev. * gnu/packages/patches/transfig-gcc10-fno-common.patch: Removed file. * gnu/local.mk (dist_patch_DATA): Unregister it. * gnu/packages/docbook.scm (dblatex): Update comment. * gnu/packages/tex.scm (texlive-latex-make)[description]: Update description. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Bruno Victal
2023-10-01gnu: xfig: Use G-Expressions....* gnu/packages/xfig.scm (xfig)[arguments]<#:phases>: Relocate 'strip-bogus-exec-prefix into … [sources]: … here, as a snippet instead. [inputs]: Restyle. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Bruno Victal