Skip to content

Commit

Permalink
[53_13] Fix for the tmfs_url removal from url_system
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Oct 7, 2023
1 parent d8465d2 commit 34c20ce
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion TeXmacs/progs/doc/tmdoc.scm
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
(when (string-starts? name "tmfs/help/")
(set! name (string-drop name 10))
(set! name (tmfs-cdr name)))
(load-document (string-append "tmfs://help/" type "/" name))))
(load-document (string->url (string-append "tmfs://help/" type "/" name)))))

(tm-define (delayed-update nr cont)
(system-wait "Generating automatic content" nr)
Expand Down
2 changes: 1 addition & 1 deletion src/Scheme/L3/glue_lolly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function main()
},
{
scm_name = "string->url",
cpp_name = "url",
cpp_name = "tm_url",
ret_type = "url",
arg_list = {
"string"
Expand Down
1 change: 1 addition & 0 deletions src/Scheme/L3/init_glue_l3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "patch.hpp"
#include "path.hpp"
#include "sys_utils.hpp"
#include "tm_url.hpp"
#include "tmfs_url.hpp"
#include "tree.hpp"
#include "tree_cursor.hpp"
Expand Down
4 changes: 4 additions & 0 deletions src/System/Classes/tm_url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
#include "analyze.hpp"
#include "scheme.hpp"

url tm_url (string name) {
if (starts (name, "tmfs://")) return tmfs_url (name (7, N (name)));
else return url_general (name, URL_UNIX);
}

bool url_test (url name, string filter) {
if (filter == "") return true;
Expand Down
1 change: 1 addition & 0 deletions src/System/Classes/tm_url.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "tree.hpp"
#include "tm_debug.hpp"

url tm_url (string name);
bool is_secure (url u); // is u secure?

/******************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions src/Texmacs/Data/new_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "dictionary.hpp"
#include "new_document.hpp"
#include "drd_std.hpp"
#include "tmfs_url.hpp"
#include "tm_url.hpp"

#if defined(OS_MINGW) || defined(OS_WIN)
#define WINPATHS
Expand Down Expand Up @@ -72,7 +72,7 @@ abstract_view (tm_view vw) {
string name= encode_url (vw->buf->buf->name);
//cout << vw->buf->buf->name << " -> " << name << "\n";
string nr = as_string (vw->nr);
return tmfs_url ("/view/" * nr * "/" * name);
return tm_url ("tmfs://view/" * nr * "/" * name);
}

tm_view
Expand Down
4 changes: 2 additions & 2 deletions src/Texmacs/Window/tm_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "iterator.hpp"
#include "preferences.hpp"
#include "drd_std.hpp"
#include "tmfs_url.hpp"
#include "tm_url.hpp"


int geometry_w= 800, geometry_h= 600;
Expand Down Expand Up @@ -268,7 +268,7 @@ embedded_name (url name) {
static int nr= 0;
if (!is_none (name)) return name;
nr++;
return tmfs_url (string ("tmfs://aux/TeXmacs-input-" * as_string (nr)));
return tm_url (string ("tmfs://aux/TeXmacs-input-" * as_string (nr)));
}

tree
Expand Down

0 comments on commit 34c20ce

Please sign in to comment.