From 83bf67f554578fc2f3e040a40c1ba10a584eaedd Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 15 Sep 2023 12:26:39 +0800 Subject: [PATCH] Fix errors for ocaml --- chsrc.c | 10 +++++----- chsrc.h | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/chsrc.c b/chsrc.c index bd19a7a..dba342b 100644 --- a/chsrc.c +++ b/chsrc.c @@ -884,14 +884,14 @@ pl_ocaml_setsrc(char* option) source_info source = pl_ocaml_sources[index]; chsrc_say_selection (&source); - char* cmd = xy_strjoin("opam repo set-url default ", - source.url - " --all --set-default"; + char* cmd = xy_strjoin(3, "opam repo set-url default ", + source.url, + " --all --set-default"); chsrc_runcmd(cmd); - xy_info("chsrc: 如果是首次使用 opam ,请使用以下命令进行初始化") - puts(xy_2strjoin("opam init default ", source.url);) + xy_info("chsrc: 如果是首次使用 opam ,请使用以下命令进行初始化"); + puts(xy_2strjoin("opam init default ", source.url)); chsrc_say_thanks (&source); } diff --git a/chsrc.h b/chsrc.h index e818b2b..1340810 100644 --- a/chsrc.h +++ b/chsrc.h @@ -304,7 +304,7 @@ pl_haskell_sources[] = { */ pl_ocaml_sources[] = { {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git"} -} +}, @@ -666,6 +666,7 @@ def_target_sources_n(pl_ruby); def_target_sources_n(pl_python); def_target_sourc def_target_sources_n(pl_perl); def_target_sources_n(pl_php); def_target_sources_n(pl_go); def_target_sources_n(pl_rust); def_target_sources_n(pl_java); def_target_sources_n(pl_clojure); def_target_sources_n(pl_dotnet); def_target_sources_n(pl_dart); def_target_sources_n(pl_haskell); +def_target_sources_n(pl_ocaml); def_target_sources_n(pl_r); def_target_sources_n(pl_julia); def_target_sources_n(os_ubuntu); def_target_sources_n(os_debian); def_target_sources_n(os_fedora);