Skip to content

Commit

Permalink
[13_6] Upgrade to lolly 1.2.13/1.2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Oct 24, 2023
1 parent 768236d commit 59052ec
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 32 deletions.
3 changes: 2 additions & 1 deletion src/Plugins/Bibtex/bibtex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "converter.hpp"
#include "wencoding.hpp"
#include "tree_helper.hpp"
#include "lolly/system/subprocess.hpp"


static string bibtex_command= "bibtex";
Expand Down Expand Up @@ -200,7 +201,7 @@ bibtex_run (string bib, string style, url bib_file, tree bib_t) {
debug_shell << cmdln << "\n";
}
string log;
if (lolly::system (cmdln, log))
if (lolly::system::check_output (cmdln, log))
bibtex_error << log << "\n";
else {
int pos=0;
Expand Down
11 changes: 6 additions & 5 deletions src/Plugins/Ghostscript/gs_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "file.hpp"
#include "gs_utilities.hpp"
#include "image_files.hpp"
#include "lolly/system/subprocess.hpp"
#include "scheme.hpp"
#include "sys_utils.hpp"
#include "tm_file.hpp"
Expand Down Expand Up @@ -355,7 +356,7 @@ gs_to_png (url image, url png, int w, int h) { // Achtung! w,h in pixels
<< " -c \" grestore \"";
}
if (os_win () || os_mingw ()) {
lolly::system (cmd);
lolly::system::call (cmd);
}
else {
std::system (as_charp (cmd));
Expand Down Expand Up @@ -431,7 +432,7 @@ gs_to_pdf (url image, url pdf, int w, int h) {
cmd << " -f " << sys_concretize (image);
cmd << " -c \" grestore \" ";
// debug_convert << cmd << LF;
lolly::system (cmd);
lolly::system::call (cmd);
if (DEBUG_CONVERT)
debug_convert << cmd << LF << "pdf generated? " << exists (pdf) << LF;
}
Expand Down Expand Up @@ -462,7 +463,7 @@ gs_to_pdf (url doc, url pdf, bool landscape, double paper_h, double paper_w) {
// so we add some PS code to override the PDF document title with
// the name of the PDF file.

lolly::system (cmd);
lolly::system::call (cmd);
if (DEBUG_CONVERT)
debug_convert << cmd << LF << "pdf generated? " << exists (pdf) << LF;
}
Expand Down Expand Up @@ -490,7 +491,7 @@ gs_to_ps (url doc, url ps, bool landscape, double paper_h, double paper_w) {
// so we add some PS code to override the PS document title with
// the name of the PS file.

lolly::system (cmd);
lolly::system::call (cmd);
if (DEBUG_CONVERT)
debug_convert << cmd << LF << "ps generated? " << exists (ps) << LF;
}
Expand All @@ -500,7 +501,7 @@ tm_gs (url image) {
string cmd= gs_prefix ();
cmd << "-q -sDEVICE=x11alpha -dBATCH -dNOPAUSE -dSAFER -dNOEPS ";
cmd << sys_concretize (image);
lolly::system (cmd);
lolly::system::call (cmd);
}

bool
Expand Down
7 changes: 4 additions & 3 deletions src/Plugins/LaTeX_Preview/latex_preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "tm_file.hpp"
#include "sys_utils.hpp"
#include "tree_helper.hpp"
#include "lolly/system/subprocess.hpp"

static inline void
dbg (string s) {
Expand Down Expand Up @@ -168,7 +169,7 @@ latex_load_preview (url wdir, bool dvips= false) {
<< "-dLanguageLevel=3 -sOutputFile=temp%d.eps temp.pdf";
}
dbg ("GS command: " * cmdln);
if (lolly::system (cmdln)) {
if (lolly::system::call (cmdln)) {
dbg ("Could not extract pictures from LaTeX document");
return array<tree> ();
}
Expand Down Expand Up @@ -213,7 +214,7 @@ latex_preview (string s, tree t) {
<< " -output-directory \"" << as_string (wdir)
<< "\" \"" << as_string (wdir) << "/temp.tex\"";
dbg ("LaTeX command: " * cmdln);
if (lolly::system (cmdln)) {
if (lolly::system::call (cmdln)) {
dbg ("Could not compile LaTeX document using " * latex_command);
dbg ("Try to fallback on LaTeX");
dvips= true;
Expand All @@ -224,7 +225,7 @@ latex_preview (string s, tree t) {
<< " -output-directory \"" << as_string (wdir)
<< "\" \"" << as_string (wdir) << "/temp.tex\"";
dbg ("LaTeX command: " * cmdln);
if (lolly::system (cmdln)) {
if (lolly::system::call (cmdln)) {
dbg ("Could not compile LaTeX document");
latex_clean_tmp_directory (wdir);
return array<tree> ();
Expand Down
13 changes: 7 additions & 6 deletions src/Plugins/Metafont/tex_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "analyze.hpp"
#include "tm_timer.hpp"
#include "data_cache.hpp"
#include "lolly/system/subprocess.hpp"

static url the_tfm_path= url_none ();
static url the_pk_path = url_none ();
Expand Down Expand Up @@ -129,15 +130,15 @@ make_tex_tfm (string name) {
if (get_setting ("MAKETFM") == "MakeTeXTFM") {
s= "MakeTeXTFM " * name;
if (DEBUG_VERBOSE) debug_fonts << "Executing " << s << "\n";
r= lolly::system (s);
r= lolly::system::call (s);
}
if (get_setting ("MAKETFM") == "mktextfm") {
url tfm_dir ("$TEXMACS_HOME_PATH/fonts/tfm");
s= "mktextfm " *
string ("--destdir ") * as_string (tfm_dir) * " " *
name;
if (DEBUG_VERBOSE) debug_fonts << "Executing " << s << "\n";
r= lolly::system (s);
r= lolly::system::call (s);
string superfluous= name * ".600pk";
if (ends (name, ".tfm")) superfluous= name (0, N(name)-4) * ".600pk";
remove (tfm_dir * superfluous);
Expand All @@ -148,7 +149,7 @@ make_tex_tfm (string name) {
s = "maketfm --dest-dir \"" * get_env("$TEXMACS_HOME_PATH")
* "\\fonts\\tfm\" " * name;
if (DEBUG_VERBOSE) debug_fonts << "Executing " << s << "\n";
r= lolly::system (s);
r= lolly::system::call (s);
}
if (r) cout << "TeXmacs] system command failed: " << s << "\n";
}
Expand All @@ -162,7 +163,7 @@ make_tex_pk (string name, int dpi, int design_dpi) {
as_string (dpi) * " " * as_string (design_dpi) * " " *
as_string (dpi) * "/" * as_string (design_dpi) * " localfont";
if (DEBUG_VERBOSE) debug_fonts << "Executing " << s << "\n";
r= lolly::system (s);
r= lolly::system::call (s);
}
if (get_setting ("MAKEPK") == "mktexpk") {
url pk_dir ("$TEXMACS_HOME_PATH/fonts/pk");
Expand All @@ -173,7 +174,7 @@ make_tex_pk (string name, int dpi, int design_dpi) {
string ("--destdir ") * as_string (pk_dir) * " " *
name;
if (DEBUG_VERBOSE) debug_fonts << "Executing " << s << "\n";
r= lolly::system (s);
r= lolly::system::call (s);
}
if (get_setting ("MAKEPK") == "makepk") {
#ifdef OS_WIN
Expand All @@ -188,7 +189,7 @@ make_tex_pk (string name, int dpi, int design_dpi) {
* " " * as_string(dpi) * "/" * as_string(design_dpi);
#endif
if (DEBUG_VERBOSE) debug_fonts << "Executing " << s << "\n";
r= lolly::system (s);
r= lolly::system::call (s);
}
if (r) cout << "TeXmacs] system command failed: " << s << "\n";
}
Expand Down
3 changes: 2 additions & 1 deletion src/Plugins/Qt/qt_printer_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "qt_printer_widget.hpp"
#include "qt_utilities.hpp" // check_type<T>
#include "message.hpp" // slot definitions
#include "lolly/system/subprocess.hpp"
#include "QTMPrintDialog.hpp"
#include "QTMPrinterSettings.hpp"

Expand Down Expand Up @@ -92,7 +93,7 @@ qt_printer_widget_rep::showDialog () {
// Send the document to the printer
if (DEBUG_QT_WIDGETS)
debug_widgets << "Running print command: " << from_qstring(_cmd) << "\n";
lolly::system(from_qstring(_cmd)); // FIXME? qt_system is synchronous (blocking!)
lolly::system::call (from_qstring (_cmd)); // FIXME? qt_system is synchronous (blocking!)

// execute the scheme closure
if (!is_nil (commandAfterExecution))
Expand Down
3 changes: 2 additions & 1 deletion src/Plugins/Tex/latex_recover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "sys_utils.hpp"
#include "scheme.hpp"
#include "tree_label.hpp"
#include "lolly/system/subprocess.hpp"

tree latex_expand (tree doc, url name);
bool tracked_tree_to_latex_document (tree, object, string&, string&);
Expand Down Expand Up @@ -278,7 +279,7 @@ try_latex_export (tree doc, object opts, url src, url dest) {
"cd " * sys_concretize (head (dest)) *
"; pdflatex -interaction=batchmode " * as_system_string (tail (dest));
//cout << cmd << LF;
lolly::system (cmd);
lolly::system::call (cmd);
url log= glue (unglue (dest, N (suffix (dest))), "log");
tree errs= get_latex_errors (log);
tree r (TUPLE);
Expand Down
2 changes: 1 addition & 1 deletion src/Scheme/L2/glue_lolly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ function main()
},
{
scm_name = "system",
cpp_name = "lolly::system",
cpp_name = "lolly::system::call",
ret_type = "void",
arg_list = {
"string",
Expand Down
1 change: 1 addition & 0 deletions src/Scheme/L2/init_glue_l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "base64.hpp"
#include "file.hpp"
#include "locale.hpp"
#include "lolly/system/subprocess.hpp"
#include "sys_utils.hpp"
#include "tree.hpp"

Expand Down
9 changes: 5 additions & 4 deletions src/System/Files/tm_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "tree_label.hpp"
#include "tree_helper.hpp"
#include "sys_utils.hpp"
#include "lolly/system/subprocess.hpp"

#include <stddef.h>
#include <stdio.h>
Expand All @@ -48,13 +49,13 @@
#include "data_cache.hpp"

void system (string which, url u1) {
lolly::system (which * " " * sys_concretize (u1)); }
lolly::system::call (which * " " * sys_concretize (u1)); }
void system (string which, url u1, url u2) {
lolly::system (which * " " * sys_concretize (u1) * " " * sys_concretize (u2)); }
lolly::system::call (which * " " * sys_concretize (u1) * " " * sys_concretize (u2)); }
void system (string which, url u1, const char* post) {
lolly::system (which * " " * sys_concretize (u1) * " " * post); }
lolly::system::call (which * " " * sys_concretize (u1) * " " * post); }
void system (string which, url u1, const char* sep, url u2) {
lolly::system (which * " " * sys_concretize (u1) * " " * sep *
lolly::system::call (which * " " * sys_concretize (u1) * " " * sep *
" " * sys_concretize (u2)); }

/******************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion src/System/Misc/tm_sys_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "url.hpp"
#include "file.hpp"
#include "tm_file.hpp"
#include "lolly/system/subprocess.hpp"

#if defined(OS_MINGW) || defined(OS_WIN)
#include "Windows/win_sys_utils.hpp"
Expand Down Expand Up @@ -55,7 +56,7 @@ eval_system (string s) {
return "";
#else
string result;
(void) lolly::system (s, result);
(void) lolly::system::check_output (s, result);
return result;
#endif
}
Expand Down
3 changes: 2 additions & 1 deletion src/Texmacs/Server/tm_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "sys_utils.hpp"
#include "tm_link.hpp"
#include "tm_sys_utils.hpp"
#include "lolly/system/subprocess.hpp"

server* the_server = NULL;
bool texmacs_started= false;
Expand Down Expand Up @@ -296,5 +297,5 @@ tm_server_rep::quit () {

void
tm_server_rep::shell (string s) {
lolly::system (s);
lolly::system::call (s);
}
11 changes: 3 additions & 8 deletions xmake/packages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
-- [ ] portage powered
-- ...

local LOLLY_VERSION = "1.2.12"
local TBOX_VERSION = "1.7.4"
local LOLLY_VERSION = "main"
local TBOX_VERSION = "dev"
local CPR_VERSION = "1.10.5"
local CURL_VERSION = "8.4.0"

Expand Down Expand Up @@ -80,12 +80,7 @@ function add_requires_of_mogan()
set_configvar("LOLLY_VERSION", LOLLY_VERSION)
add_requires("lolly", {system=false})
tbox_configs = {hash=true, ["force-utf8"]=true}
if is_plat("wasm") then
tbox_version = "dev"
else
tbox_version = "v" .. TBOX_VERSION
end
add_requireconfs("lolly.tbox", {version = tbox_version, configs=tbox_configs, system = false, override=true})
add_requireconfs("lolly.tbox", {version = TBOX_VERSION, configs=tbox_configs, system = false, override=true})
add_requireconfs("lolly.cpr", {version = CPR_VERSION, system = false, override=true})
add_requireconfs("lolly.cpr.libcurl", {version = CURL_VERSION, system = false, override=true})

Expand Down

0 comments on commit 59052ec

Please sign in to comment.