Skip to content

Commit

Permalink
[57_7] Cleaning code of use_which
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Nov 29, 2023
1 parent 53c1f76 commit dd5858a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion src/System/Boot/boot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

extern tree texmacs_settings;
extern int install_status;
extern bool use_which;
extern bool headless_mode;

void init_texmacs_path (int& argc, char** argv);
Expand Down
28 changes: 0 additions & 28 deletions src/System/Boot/init_texmacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#endif

int install_status = 0;
bool use_which = false;

extern void setup_tex (); // from Plugins/Metafont/tex_init.cpp
extern void init_tex (); // from Plugins/Metafont/tex_init.cpp
Expand Down Expand Up @@ -446,13 +445,6 @@ init_env_vars () {

static void
init_misc () {
// Test whether 'which' works
#if defined(OS_MINGW) || defined(OS_WASM) || defined(OS_WIN)
use_which = false;
#else
use_which = (var_eval_system ("which texmacs 2> /dev/null") != "");
#endif

// Set extra environment variables for Cygwin
#ifdef OS_CYGWIN
set_env ("CYGWIN", "check_case:strict");
Expand All @@ -462,24 +454,6 @@ init_misc () {

}

/******************************************************************************
* Deprecated initializations
******************************************************************************/

static void
init_deprecated () {
#ifndef OS_WIN
// Check for Macaulay 2
if (get_env ("M2HOME") == "")
if (exists_in_path ("M2")) {
string where= concretize (resolve_in_path ("M2"));
string s = var_eval_system ("grep 'M2HOME=' " * where);
string dir = s (search_forwards ("=", s) + 1, N(s));
if (dir != "") set_env ("M2HOME", dir);
}
#endif
}

/******************************************************************************
* First installation
******************************************************************************/
Expand Down Expand Up @@ -536,8 +510,6 @@ init_texmacs () {
init_env_vars ();
//cout << "Initialize -- Miscellaneous\n";
init_misc ();
//cout << "Initialize -- Deprecated\n";
init_deprecated ();
}

/******************************************************************************
Expand Down

0 comments on commit dd5858a

Please sign in to comment.