From a200f41ccd5fac2b03ce584128ffc5fe6dd5c556 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Thu, 5 Oct 2023 23:59:54 +0800 Subject: [PATCH] [39_2] Remove GNU TeXmacs example plugins --- TeXmacs/examples/plugins/complete/Makefile | 27 ---- .../plugins/complete/progs/init-complete.scm | 17 -- .../plugins/complete/src/complete.cpp | 53 ------- TeXmacs/examples/plugins/dynlink/Makefile.in | 24 --- .../plugins/dynlink/progs/init-dynlink.scm | 17 -- .../examples/plugins/dynlink/src/dynlink.cpp | 45 ------ TeXmacs/examples/plugins/formula/Makefile | 25 --- .../plugins/formula/progs/init-formula.scm | 17 -- .../examples/plugins/formula/src/formula.cpp | 38 ----- TeXmacs/examples/plugins/handler/Makefile | 25 --- .../plugins/handler/progs/init-handler.scm | 21 --- .../examples/plugins/handler/src/handler.cpp | 41 ----- TeXmacs/examples/plugins/input/Makefile | 25 --- .../plugins/input/packages/session/input.ts | 26 ---- .../plugins/input/progs/init-input.scm | 20 --- .../plugins/input/progs/input-input.scm | 41 ----- TeXmacs/examples/plugins/input/src/input.cpp | 37 ----- TeXmacs/examples/plugins/markup/Makefile | 25 --- .../plugins/markup/packages/session/markup.ts | 30 ---- .../plugins/markup/progs/init-markup.scm | 17 -- .../examples/plugins/markup/src/markup.cpp | 38 ----- TeXmacs/examples/plugins/menus/Makefile | 25 --- .../plugins/menus/progs/init-menus.scm | 31 ---- TeXmacs/examples/plugins/menus/src/menus.cpp | 38 ----- TeXmacs/examples/plugins/minimal/Makefile | 25 --- .../plugins/minimal/progs/init-minimal.scm | 17 -- .../examples/plugins/minimal/src/minimal.cpp | 35 ----- TeXmacs/examples/plugins/multiline/Makefile | 25 --- .../multiline/progs/init-multiline.scm | 18 --- .../plugins/multiline/src/multiline.cpp | 48 ------ TeXmacs/examples/plugins/nested/Makefile | 25 --- .../plugins/nested/progs/init-nested.scm | 17 -- .../examples/plugins/nested/src/nested.cpp | 60 ------- TeXmacs/examples/plugins/pnambic/Makefile | 18 --- .../plugins/pnambic/progs/init-pnambic.scm | 17 -- TeXmacs/examples/plugins/pnambic/readme.tm | 147 ------------------ TeXmacs/examples/plugins/pnambic/src/p_in.c | 53 ------- TeXmacs/examples/plugins/pnambic/src/p_out.c | 29 ---- .../examples/plugins/pnambic/src/pnambic.c | 29 ---- TeXmacs/examples/plugins/prompt/Makefile | 27 ---- .../plugins/prompt/progs/init-prompt.scm | 17 -- .../examples/plugins/prompt/src/prompt.cpp | 49 ------ TeXmacs/examples/plugins/secure/Makefile | 25 --- .../plugins/secure/packages/secure.ts | 24 --- .../plugins/secure/progs/init-secure.scm | 19 --- .../plugins/secure/progs/secure-secure.scm | 21 --- .../examples/plugins/secure/src/secure.cpp | 37 ----- TeXmacs/examples/plugins/substitute/Makefile | 25 --- .../substitute/progs/init-substitute.scm | 29 ---- .../plugins/substitute/src/substitute.cpp | 38 ----- .../plugins/world/progs/init-world.scm | 18 --- 51 files changed, 1595 deletions(-) delete mode 100644 TeXmacs/examples/plugins/complete/Makefile delete mode 100644 TeXmacs/examples/plugins/complete/progs/init-complete.scm delete mode 100644 TeXmacs/examples/plugins/complete/src/complete.cpp delete mode 100644 TeXmacs/examples/plugins/dynlink/Makefile.in delete mode 100644 TeXmacs/examples/plugins/dynlink/progs/init-dynlink.scm delete mode 100644 TeXmacs/examples/plugins/dynlink/src/dynlink.cpp delete mode 100644 TeXmacs/examples/plugins/formula/Makefile delete mode 100644 TeXmacs/examples/plugins/formula/progs/init-formula.scm delete mode 100644 TeXmacs/examples/plugins/formula/src/formula.cpp delete mode 100644 TeXmacs/examples/plugins/handler/Makefile delete mode 100644 TeXmacs/examples/plugins/handler/progs/init-handler.scm delete mode 100644 TeXmacs/examples/plugins/handler/src/handler.cpp delete mode 100644 TeXmacs/examples/plugins/input/Makefile delete mode 100644 TeXmacs/examples/plugins/input/packages/session/input.ts delete mode 100644 TeXmacs/examples/plugins/input/progs/init-input.scm delete mode 100644 TeXmacs/examples/plugins/input/progs/input-input.scm delete mode 100644 TeXmacs/examples/plugins/input/src/input.cpp delete mode 100644 TeXmacs/examples/plugins/markup/Makefile delete mode 100644 TeXmacs/examples/plugins/markup/packages/session/markup.ts delete mode 100644 TeXmacs/examples/plugins/markup/progs/init-markup.scm delete mode 100644 TeXmacs/examples/plugins/markup/src/markup.cpp delete mode 100644 TeXmacs/examples/plugins/menus/Makefile delete mode 100644 TeXmacs/examples/plugins/menus/progs/init-menus.scm delete mode 100644 TeXmacs/examples/plugins/menus/src/menus.cpp delete mode 100644 TeXmacs/examples/plugins/minimal/Makefile delete mode 100644 TeXmacs/examples/plugins/minimal/progs/init-minimal.scm delete mode 100644 TeXmacs/examples/plugins/minimal/src/minimal.cpp delete mode 100644 TeXmacs/examples/plugins/multiline/Makefile delete mode 100644 TeXmacs/examples/plugins/multiline/progs/init-multiline.scm delete mode 100644 TeXmacs/examples/plugins/multiline/src/multiline.cpp delete mode 100644 TeXmacs/examples/plugins/nested/Makefile delete mode 100644 TeXmacs/examples/plugins/nested/progs/init-nested.scm delete mode 100644 TeXmacs/examples/plugins/nested/src/nested.cpp delete mode 100644 TeXmacs/examples/plugins/pnambic/Makefile delete mode 100644 TeXmacs/examples/plugins/pnambic/progs/init-pnambic.scm delete mode 100644 TeXmacs/examples/plugins/pnambic/readme.tm delete mode 100644 TeXmacs/examples/plugins/pnambic/src/p_in.c delete mode 100644 TeXmacs/examples/plugins/pnambic/src/p_out.c delete mode 100644 TeXmacs/examples/plugins/pnambic/src/pnambic.c delete mode 100644 TeXmacs/examples/plugins/prompt/Makefile delete mode 100644 TeXmacs/examples/plugins/prompt/progs/init-prompt.scm delete mode 100644 TeXmacs/examples/plugins/prompt/src/prompt.cpp delete mode 100644 TeXmacs/examples/plugins/secure/Makefile delete mode 100644 TeXmacs/examples/plugins/secure/packages/secure.ts delete mode 100644 TeXmacs/examples/plugins/secure/progs/init-secure.scm delete mode 100644 TeXmacs/examples/plugins/secure/progs/secure-secure.scm delete mode 100644 TeXmacs/examples/plugins/secure/src/secure.cpp delete mode 100644 TeXmacs/examples/plugins/substitute/Makefile delete mode 100644 TeXmacs/examples/plugins/substitute/progs/init-substitute.scm delete mode 100644 TeXmacs/examples/plugins/substitute/src/substitute.cpp delete mode 100644 TeXmacs/examples/plugins/world/progs/init-world.scm diff --git a/TeXmacs/examples/plugins/complete/Makefile b/TeXmacs/examples/plugins/complete/Makefile deleted file mode 100644 index fdeb69b54d..0000000000 --- a/TeXmacs/examples/plugins/complete/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* - -$(shell [ -d bin ] || mkdir -p bin) diff --git a/TeXmacs/examples/plugins/complete/progs/init-complete.scm b/TeXmacs/examples/plugins/complete/progs/init-complete.scm deleted file mode 100644 index 4862d9007c..0000000000 --- a/TeXmacs/examples/plugins/complete/progs/init-complete.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-complete.scm -;; DESCRIPTION : Initialize the 'complete' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure complete - (:require (url-exists-in-path? "complete.bin")) - (:launch "complete.bin") - (:session "Complete")) diff --git a/TeXmacs/examples/plugins/complete/src/complete.cpp b/TeXmacs/examples/plugins/complete/src/complete.cpp deleted file mode 100644 index 811296f9c9..0000000000 --- a/TeXmacs/examples/plugins/complete/src/complete.cpp +++ /dev/null @@ -1,53 +0,0 @@ - -/****************************************************************************** -* MODULE : complete.cpp -* DESCRIPTION: Shows how to program tab-completion -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_COMMAND ((char) 16) -#define DATA_ESCAPE ((char) 27) - -void -format_plugin () { - // The configuration of a plugin can be completed at startup time. - // This is for instance interesting if you add tab-completion a posteriori. - cout << DATA_BEGIN << "command:"; - cout << "(plugin-configure complete (:tab-completion #t))"; - cout << DATA_END; -} - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - format_plugin (); - cout << "We know how to complete 'h'"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - if (buffer[0] != DATA_COMMAND) { - cout << DATA_BEGIN << "verbatim:"; - cout << "You typed " << buffer; - cout << DATA_END; - } - else { - cout << DATA_BEGIN << "scheme:"; - cout << "(tuple \"h\" \"ello\" \"i there\" \"ola\" \"opsakee\")"; - cout << DATA_END; - } - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/dynlink/Makefile.in b/TeXmacs/examples/plugins/dynlink/Makefile.in deleted file mode 100644 index a3de3be83b..0000000000 --- a/TeXmacs/examples/plugins/dynlink/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example with dynamic links -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -tmsrc = @tmsrc@ -CXX = g++ -LD = g++ -RM = rm -f - -lib/libtmdynlink.so: src/dynlink.cpp - $(CXX) -I$(tmsrc)/include -c src/dynlink.cpp -o src/dynlink.o - $(LD) -shared -o lib/libtmdynlink.so src/dynlink.o - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) */*.o - $(RM) lib/* diff --git a/TeXmacs/examples/plugins/dynlink/progs/init-dynlink.scm b/TeXmacs/examples/plugins/dynlink/progs/init-dynlink.scm deleted file mode 100644 index 3e041218f4..0000000000 --- a/TeXmacs/examples/plugins/dynlink/progs/init-dynlink.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-dynlink.scm -;; DESCRIPTION : Initialize the 'dynlink' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure dynlink - (:require (url-exists? (url-unix "$LD_LIBRARY_PATH" "libtmdynlink.so"))) - (:link "libtmdynlink.so" "dynlink_exports" "") - (:session "Dynlink")) diff --git a/TeXmacs/examples/plugins/dynlink/src/dynlink.cpp b/TeXmacs/examples/plugins/dynlink/src/dynlink.cpp deleted file mode 100644 index cb6ed69bdc..0000000000 --- a/TeXmacs/examples/plugins/dynlink/src/dynlink.cpp +++ /dev/null @@ -1,45 +0,0 @@ - -/****************************************************************************** -* MODULE : dynlink.cpp -* DESCRIPTION: Example of a plugin which is dynamically linked to TeXmacs -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -#include -#include - -//#include -//using namespace std; - -static char* output= NULL; - -char* -dynlink_install (TeXmacs_exports_1* TM, char* options, char** errors) { - // cout << ">>> Install: " << options << "\n"; - output= (char*) malloc (50); - strcpy (output, "\2verbatim:Started dynamic link\5"); - return output; -} - -char* -dynlink_eval (char* what, char* session, char** errors) { - // cout << ">>> Evaluate: " << what << ", " << session << "\n"; - free (output); - output= (char*) malloc (50 + strlen (what)); - strcpy (output, "\2verbatim:You typed "); - strcat (output, what); - strcat (output, "\5"); - return output; -} - -package_exports_1 dynlink_exports= { - (char*) "TeXmacs communication protocol 1", - (char*) "Dynlink 1", - dynlink_install, - dynlink_eval -}; diff --git a/TeXmacs/examples/plugins/formula/Makefile b/TeXmacs/examples/plugins/formula/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/formula/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/formula/progs/init-formula.scm b/TeXmacs/examples/plugins/formula/progs/init-formula.scm deleted file mode 100644 index decb9789dd..0000000000 --- a/TeXmacs/examples/plugins/formula/progs/init-formula.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-formula.scm -;; DESCRIPTION : Initialize the 'formula' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure formula - (:require (url-exists-in-path? "formula.bin")) - (:launch "formula.bin") - (:session "Formula")) diff --git a/TeXmacs/examples/plugins/formula/src/formula.cpp b/TeXmacs/examples/plugins/formula/src/formula.cpp deleted file mode 100644 index 2e3dde8ca6..0000000000 --- a/TeXmacs/examples/plugins/formula/src/formula.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -/****************************************************************************** -* MODULE : formula.cpp -* DESCRIPTION: A plugin capable of displaying mathematical formulas -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Please enter a positive integer at each input"; - cout << DATA_END; - cout.flush (); - - while (true) { - int i, nr; - cin >> nr; - cout << DATA_BEGIN << "latex:"; - cout << "$"; - for (i=1; i. -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/handler/progs/init-handler.scm b/TeXmacs/examples/plugins/handler/progs/init-handler.scm deleted file mode 100644 index 84c4b7b9ec..0000000000 --- a/TeXmacs/examples/plugins/handler/progs/init-handler.scm +++ /dev/null @@ -1,21 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-handler.scm -;; DESCRIPTION : Initialize the 'handler' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define (handler-error-handler t) - (display* (tree->verbatim t) "\n")) - -(plugin-configure handler - (:require (url-exists-in-path? "handler.bin")) - (:launch "handler.bin") - (:handler "error" handler-error-handler) - (:session "Handler")) diff --git a/TeXmacs/examples/plugins/handler/src/handler.cpp b/TeXmacs/examples/plugins/handler/src/handler.cpp deleted file mode 100644 index f51f2b0925..0000000000 --- a/TeXmacs/examples/plugins/handler/src/handler.cpp +++ /dev/null @@ -1,41 +0,0 @@ - -/****************************************************************************** -* MODULE : handler.cpp -* DESCRIPTION: Shows how to deal with cerr -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Type commands ending with ';'"; - cout << DATA_END; - cout.flush (); - - while (1) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN << "verbatim:"; - if (buffer[strlen(buffer)-1] == ';') - cout << "You typed " << buffer; - else { - cerr << DATA_BEGIN << "verbatim:"; - cerr << "Commands have to end with ';'"; - cerr << DATA_END; - } - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/input/Makefile b/TeXmacs/examples/plugins/input/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/input/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/input/packages/session/input.ts b/TeXmacs/examples/plugins/input/packages/session/input.ts deleted file mode 100644 index 703b1c1ac6..0000000000 --- a/TeXmacs/examples/plugins/input/packages/session/input.ts +++ /dev/null @@ -1,26 +0,0 @@ - - -<\body> - |>>>>>>> - - \; - - -<\initial> - <\collection> - - - - - - - - - - - - - - - diff --git a/TeXmacs/examples/plugins/input/progs/init-input.scm b/TeXmacs/examples/plugins/input/progs/init-input.scm deleted file mode 100644 index 926fa44b24..0000000000 --- a/TeXmacs/examples/plugins/input/progs/init-input.scm +++ /dev/null @@ -1,20 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-input.scm -;; DESCRIPTION : Initialize the 'input' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure input - (:require (url-exists-in-path? "input.bin")) - (:launch "input.bin") - (:session "Input")) - -(when (supports-input?) - (lazy-input-converter (input-input) input)) diff --git a/TeXmacs/examples/plugins/input/progs/input-input.scm b/TeXmacs/examples/plugins/input/progs/input-input.scm deleted file mode 100644 index d5afa3055e..0000000000 --- a/TeXmacs/examples/plugins/input/progs/input-input.scm +++ /dev/null @@ -1,41 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : input-input.scm -;; DESCRIPTION : Input converter rules for the 'input' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(texmacs-module (input-input) - (:use (utils plugins plugin-convert))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Specific conversion routines -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define (input-input-frac t) - (display "((") - (plugin-input (car t)) - (display "):(") - (plugin-input (cadr t)) - (display "))")) - -(define (input-input-special t) - (display "[[[SPECIAL:") - (plugin-input (car t)) - (display "]]]")) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Initialization -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-input-converters input - (frac input-input-frac) - (special input-input-special) - ("" "||") - ("" "&&")) diff --git a/TeXmacs/examples/plugins/input/src/input.cpp b/TeXmacs/examples/plugins/input/src/input.cpp deleted file mode 100644 index 86e7ff86d2..0000000000 --- a/TeXmacs/examples/plugins/input/src/input.cpp +++ /dev/null @@ -1,37 +0,0 @@ - -/****************************************************************************** -* MODULE : menus.cpp -* DESCRIPTION: A plugin which changes the menus dynamically -* The routine menus-add is defined in ../progs/init-menus.scm -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << DATA_BEGIN << "command:(session-use-math-input #t)" << DATA_END; - cout << "Convert mathematical input into plain text"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN << "verbatim:"; - cout << buffer; - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/markup/Makefile b/TeXmacs/examples/plugins/markup/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/markup/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/markup/packages/session/markup.ts b/TeXmacs/examples/plugins/markup/packages/session/markup.ts deleted file mode 100644 index 58d02d0f18..0000000000 --- a/TeXmacs/examples/plugins/markup/packages/session/markup.ts +++ /dev/null @@ -1,30 +0,0 @@ - - -<\body> - >>>> - - \; - - >>>> - - \; - - -<\initial> - <\collection> - - - - - - - - - - - - - - - diff --git a/TeXmacs/examples/plugins/markup/progs/init-markup.scm b/TeXmacs/examples/plugins/markup/progs/init-markup.scm deleted file mode 100644 index cbe9a74c95..0000000000 --- a/TeXmacs/examples/plugins/markup/progs/init-markup.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-markup.scm -;; DESCRIPTION : Initialize the 'markup' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure markup - (:require (url-exists-in-path? "markup.bin")) - (:launch "markup.bin") - (:session "Markup")) diff --git a/TeXmacs/examples/plugins/markup/src/markup.cpp b/TeXmacs/examples/plugins/markup/src/markup.cpp deleted file mode 100644 index 31ff4587d0..0000000000 --- a/TeXmacs/examples/plugins/markup/src/markup.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -/****************************************************************************** -* MODULE : markup.cpp -* DESCRIPTION: This plugin demonstrates the interaction between -* a plugin and a style file (../packages/session/markup.ts). -* The style file both contains customizations of the input -* and output environments and an additional tag 'foo'. -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Enter a LaTeX expression at each prompt"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN << "latex:"; - cout << "$\\foo{" << buffer << "}$"; - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/menus/Makefile b/TeXmacs/examples/plugins/menus/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/menus/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/menus/progs/init-menus.scm b/TeXmacs/examples/plugins/menus/progs/init-menus.scm deleted file mode 100644 index 3d1edb255c..0000000000 --- a/TeXmacs/examples/plugins/menus/progs/init-menus.scm +++ /dev/null @@ -1,31 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-menus.scm -;; DESCRIPTION : Initialize the 'menus' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure menus - (:require (url-exists-in-path? "menus.bin")) - (:launch "menus.bin") - (:session "Menus")) - -(when (supports-menus?) - (define menu-items '("Hi")) - - (tm-menu (menus-menu) - (for (entry menu-items) - ((eval entry) (insert entry)))) - - (tm-define (menus-add entry) - (set! menu-items (cons entry menu-items))) - - (menu-bind plugin-menu - (:require (in-menus?)) - (=> "Menus" (link menus-menu)))) diff --git a/TeXmacs/examples/plugins/menus/src/menus.cpp b/TeXmacs/examples/plugins/menus/src/menus.cpp deleted file mode 100644 index 59dbdcacc1..0000000000 --- a/TeXmacs/examples/plugins/menus/src/menus.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -/****************************************************************************** -* MODULE : menus.cpp -* DESCRIPTION: A plugin which changes the menus dynamically -* The routine menus-add is defined in ../progs/init-menus.scm -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Enter the name of a menu to add at each prompt"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN << "verbatim:"; - cout << DATA_BEGIN << "command:(menus-add \"" - << buffer << "\")" << DATA_END; - cout << "Added " << buffer << " to menu"; - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/minimal/Makefile b/TeXmacs/examples/plugins/minimal/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/minimal/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/minimal/progs/init-minimal.scm b/TeXmacs/examples/plugins/minimal/progs/init-minimal.scm deleted file mode 100644 index 548236ea47..0000000000 --- a/TeXmacs/examples/plugins/minimal/progs/init-minimal.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-minimal.scm -;; DESCRIPTION : Initialize the 'minimal' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure minimal - (:require (url-exists-in-path? "minimal.bin")) - (:launch "minimal.bin") - (:session "Minimal")) diff --git a/TeXmacs/examples/plugins/minimal/src/minimal.cpp b/TeXmacs/examples/plugins/minimal/src/minimal.cpp deleted file mode 100644 index f53081527c..0000000000 --- a/TeXmacs/examples/plugins/minimal/src/minimal.cpp +++ /dev/null @@ -1,35 +0,0 @@ - -/****************************************************************************** -* MODULE : minimal.cpp -* DESCRIPTION: Minimal example of a plugin -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Hi there!"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN << "verbatim:"; - cout << "You typed " << buffer; - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/multiline/Makefile b/TeXmacs/examples/plugins/multiline/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/multiline/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/multiline/progs/init-multiline.scm b/TeXmacs/examples/plugins/multiline/progs/init-multiline.scm deleted file mode 100644 index e1afc326a3..0000000000 --- a/TeXmacs/examples/plugins/multiline/progs/init-multiline.scm +++ /dev/null @@ -1,18 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-multiline.scm -;; DESCRIPTION : Initialize the 'multiline' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure multiline - (:require (url-exists-in-path? "multiline.bin")) - (:launch "multiline.bin") - (:session "Multiline") - (:test-input-done #t)) diff --git a/TeXmacs/examples/plugins/multiline/src/multiline.cpp b/TeXmacs/examples/plugins/multiline/src/multiline.cpp deleted file mode 100644 index bfd58e9d8a..0000000000 --- a/TeXmacs/examples/plugins/multiline/src/multiline.cpp +++ /dev/null @@ -1,48 +0,0 @@ - -/****************************************************************************** -* MODULE : multiline.cpp -* DESCRIPTION: A plugin which uses multiline input as long as -* the input is not terminated by ';' -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_COMMAND ((char) 16) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Terminate your input by ';'"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - if (buffer[0] != DATA_COMMAND) { - cout << DATA_BEGIN << "verbatim:"; - cout << buffer; - cout << DATA_END; - } - else { - int n = strlen (buffer); - cout << DATA_BEGIN << "scheme:"; - if (n>0 && buffer[n-1] == ')') n--; - if (n>0 && buffer[n-1] == '\"') n--; - if (n>0 && buffer[n-1] == ';') cout << "#t"; - else cout << "#f"; - cout << DATA_END; - } - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/nested/Makefile b/TeXmacs/examples/plugins/nested/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/nested/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/nested/progs/init-nested.scm b/TeXmacs/examples/plugins/nested/progs/init-nested.scm deleted file mode 100644 index 246603eed2..0000000000 --- a/TeXmacs/examples/plugins/nested/progs/init-nested.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-nested.scm -;; DESCRIPTION : Initialize the 'nested' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure nested - (:require (url-exists-in-path? "nested.bin")) - (:launch "nested.bin") - (:session "Nested")) diff --git a/TeXmacs/examples/plugins/nested/src/nested.cpp b/TeXmacs/examples/plugins/nested/src/nested.cpp deleted file mode 100644 index c790e69cfe..0000000000 --- a/TeXmacs/examples/plugins/nested/src/nested.cpp +++ /dev/null @@ -1,60 +0,0 @@ - -/****************************************************************************** -* MODULE : nested.cpp -* DESCRIPTION: A plugin which demonstrates nested DATA_BEGIN/DATA_END blocks -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -void -f (int i, int nr) { - if (i >= nr) cout << nr; - else { - cout << "\\frac{1}{" << i << "+"; - f (i+1, nr); - cout << "}\n"; - } -} - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "Please enter a positive integer at each input"; - cout << DATA_END; - cout.flush (); - - while (true) { - int i, nr; - cin >> nr; - cout << DATA_BEGIN << "verbatim:"; - - cout << "A first formula\n"; - cout << DATA_BEGIN << "latex:"; - cout << "$"; - for (i=1; i. -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure pnambic - (:require (url-exists-in-path? "pnambic")) - (:launch "pnambic ~/.TeXmacs/plugins/pnambic/in ~/.TeXmacs/plugins/pnambic/out") - (:session "Pnambic")) diff --git a/TeXmacs/examples/plugins/pnambic/readme.tm b/TeXmacs/examples/plugins/pnambic/readme.tm deleted file mode 100644 index 1a674271f4..0000000000 --- a/TeXmacs/examples/plugins/pnambic/readme.tm +++ /dev/null @@ -1,147 +0,0 @@ - - - - -<\body> - > - - - - Recursively copy the directory to - and do - - <\shell-fragment> - make - - - \; - - See The Jargon File for the explanation of the name. - - plugins> - - Suppose there is an external program which is called from as - - <\shell-fragment> - extprog --texmacs - - - We want to see all bytes flowing from to and from - to in real time. We write a shell script - : - - <\shell-fragment> - #!/bin/sh - - tee /tmp/in \| extprog --texmacs \| tee /tmp/out - - - We change to call this shell wrapper. In fact, - things are often simpler, and calls not directly, - but some shell script . It contains a line with - somewhere. In such a case, we only need to change this - single line. - - Then we go to and do - - <\shell-fragment> - mkfifo in - - mkfifo out - - - Then we do - - <\shell-fragment> - cat out \| ~/.TeXmacs/plugins/pnambic/bin/p_out - - - This window will show us all bytes which - outputs to . Some of these bytes are not printatle characters; - they are shown as hex codes in square brackets, like or - (these characters indicate the beginning and the end of a data - chunk in the protocole). The characters and - are shown as and , so that the output is unambiguous. - - Then go to another window, go to and say - - <\shell-fragment> - cat in - - - This window will show all bytes which inputs from - . Then start and start an session. You - will see all data exchanges, and will be able to find out what goes wrong. - - plugin without > - - You can simplify this process. Just run - - <\shell-fragment> - extprog --texmacs \| ~/.TeXmacs/plugins/pnambic/bin/p_out - - - You see all characters you send to ; you also see all bytes - (including non-printable characters) which sends back. - - plugin without the plugin> - - Enters : will be the plugin. Do the following (the - order is important!) - - <\enumerate-numeric> - In an window, go to - and say - - <\shell-fragment> - cat out - - - Start a session in - - In another window, go to - and say - - <\shell-fragment> - bin/p_in in - - - - Now you can type in this second window all bytes which the plugin sends to - . Use the same syntax: any byte can be written as two hex digits - in brackets; if you want to send or , type or - . Note that when you press it does - send a newline to ; to do this, use . Follow the - communication protocol: say something like - - <\shell-fragment> - [02]verbatim:Hi, this is me, the plugin - - [02]prompt#what? [05][05] - - - In the window, you will see the greeting and the prompt. Now you - can write something after this prompt in the window and press - . This input will appear in the first - window (remember? it's where you said ). Now you pretend - that you are a CAS, think about this user input, go to the second - window and write the result of your thinking in a form - suitable for the protocol. The user will see it in the - window, will input something new, and so on. When you get tired of this - game, say something like - - <\shell-fragment> - [02]verbatim:The end[05] - - - and press . - - This is a great way to experiment with the communication protocal - and to see how reacts when it gets some bytes from a plugin. - - -<\initial> - <\collection> - - - \ No newline at end of file diff --git a/TeXmacs/examples/plugins/pnambic/src/p_in.c b/TeXmacs/examples/plugins/pnambic/src/p_in.c deleted file mode 100644 index 67b8b8e905..0000000000 --- a/TeXmacs/examples/plugins/pnambic/src/p_in.c +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include - -int hex(int c, int *n) -{ if ((c>='0')&&(c<='9')) { *n=c-'0'; return 1; } - else if ((c>='a')&&(c<='f')) { *n=c-'a'+10; return 1; } - else if ((c>='A')&&(c<='F')) { *n=c-'A'+10; return 1; } - else return 0; -} - -int main(int argc, char **argv) -{ FILE *in,*out; int c,c2,c3,n,n2,ok=1; - if (argc>2) - { in=fopen(argv[2],"r"); - if (!in) - { fprintf(stderr,"cannot read from %s\n",argv[2]); exit(1); } - } - else - { in=stdin; - if (argc>1) - { out=fopen(argv[1],"w"); - if (!out) - {fprintf(stderr,"cannot write to %s\n",argv[1]); exit(1); } - } - else out=stdout; - } - while (1) - { c=fgetc(in); - if (c==EOF) break; - else if (c=='[') - { c=fgetc(in); - if (c=='[') fputc('[',out); - else if (hex(c,&n)) - { c2=fgetc(in); - if (hex(c2,&n2)) - { n=16*n+n2; c3=fgetc(in); - if (c3==']') fputc(n,out); - else { fprintf(stderr,"error: [%c%c%c\n",c,c2,c3); ok=0; } - } - else { fprintf(stderr,"error: [%c%c\n",c,c2); ok=0; } - } - else { fprintf(stderr,"error: [%c\n",c); ok=0; } - } - else if (c==']') - { c=fgetc(in); - if (c==']') fputc(']',out); - else { fprintf(stderr,"error: ]%c\n",c); ok=0; } - } - else if (c=='\n') - if (ok) fflush(out); else { __fpurge(out); ok=1; } - else if ((c>=' ')&&(c<=0x7e)) fputc(c,out); - } -} diff --git a/TeXmacs/examples/plugins/pnambic/src/p_out.c b/TeXmacs/examples/plugins/pnambic/src/p_out.c deleted file mode 100644 index 738dd2238c..0000000000 --- a/TeXmacs/examples/plugins/pnambic/src/p_out.c +++ /dev/null @@ -1,29 +0,0 @@ -#include - -int main(int argc,char **argv) -{ FILE *in,*out; int c; - if (argc>2) - { out=fopen(argv[2],"w"); - if (!out) - { fprintf(stderr,"cannot write to %s\n",argv[2]); exit(1); } - } - else - { out=stdout; - if (argc>1) - { in=fopen(argv[1],"r"); - if (!in) - { fprintf(stderr,"cannot read from %s\n",argv[1]); exit(1); } - } - else in=stdin; - } - while (1) - { c=fgetc(in); - if (c==EOF) break; - else if (c=='[') fputs("[[",out); - else if (c==']') fputs("]]",out); - else if (c=='\n') fprintf(out,"[%02x]\n",c); - else if ((c>=' ')&&(c<=0x7e)) fputc(c,out); - else fprintf(out,"[%02x]",c); - fflush(out); - } -} diff --git a/TeXmacs/examples/plugins/pnambic/src/pnambic.c b/TeXmacs/examples/plugins/pnambic/src/pnambic.c deleted file mode 100644 index eaf22d08fc..0000000000 --- a/TeXmacs/examples/plugins/pnambic/src/pnambic.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ FILE *in,*out; int c1,c2; - if (argc!=3) { fprintf(stderr,"usage: pnambic infile outfile\n"); exit(1); } - in=fopen(argv[1],"r"); - if (!in) { fprintf(stderr,"cannot read from %s\n",argv[1]); exit(1); } - out=fopen(argv[2],"w"); - if (!out) { fprintf(stderr,"cannot write to %s\n",argv[2]); exit(1); } - if (fork()) - { fclose(out); fclose(stdin); - while (1) - { c1=fgetc(in); - if (c1==EOF) break; - fputc(c1,stdout); fflush(stdout); - } - fclose(in); fclose(stdout); exit(0); - } - else - { fclose(in); fclose(stdout); - while (1) - { c2=fgetc(stdin); - if (c2==EOF) break; - fputc(c2,out); fflush(out); - } - fclose(out); fclose(stdin); exit(0); - } -} diff --git a/TeXmacs/examples/plugins/prompt/Makefile b/TeXmacs/examples/plugins/prompt/Makefile deleted file mode 100644 index fdeb69b54d..0000000000 --- a/TeXmacs/examples/plugins/prompt/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* - -$(shell [ -d bin ] || mkdir -p bin) diff --git a/TeXmacs/examples/plugins/prompt/progs/init-prompt.scm b/TeXmacs/examples/plugins/prompt/progs/init-prompt.scm deleted file mode 100644 index 013e07de05..0000000000 --- a/TeXmacs/examples/plugins/prompt/progs/init-prompt.scm +++ /dev/null @@ -1,17 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-prompt.scm -;; DESCRIPTION : Initialize the 'prompt' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure prompt - (:require (url-exists-in-path? "prompt.bin")) - (:launch "prompt.bin") - (:session "Prompt")) diff --git a/TeXmacs/examples/plugins/prompt/src/prompt.cpp b/TeXmacs/examples/plugins/prompt/src/prompt.cpp deleted file mode 100644 index 0959a4f69c..0000000000 --- a/TeXmacs/examples/plugins/prompt/src/prompt.cpp +++ /dev/null @@ -1,49 +0,0 @@ - -/****************************************************************************** -* MODULE : prompt.cpp -* DESCRIPTION: Shows how to produce prompts -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -static int counter= 0; - -void -next_input () { - counter++; - cout << DATA_BEGIN << "prompt#"; - cout << "Input " << counter << "] "; - cout << DATA_END; -} - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "A LaTeX -> TeXmacs converter"; - next_input (); - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN << "verbatim:"; - cout << DATA_BEGIN; - cout << "latex:$" << buffer << "$"; - cout << DATA_END; - next_input (); - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/secure/Makefile b/TeXmacs/examples/plugins/secure/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/secure/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/secure/packages/secure.ts b/TeXmacs/examples/plugins/secure/packages/secure.ts deleted file mode 100644 index 3f7ba09afb..0000000000 --- a/TeXmacs/examples/plugins/secure/packages/secure.ts +++ /dev/null @@ -1,24 +0,0 @@ - - - - -<\body> - See a LaTeX math command as a TeXmacs expression via plugin - - >>> - - \; - - Example of macro which calls a secure scheme command - - >>> - - \; - - -<\initial> - <\collection> - - - - \ No newline at end of file diff --git a/TeXmacs/examples/plugins/secure/progs/init-secure.scm b/TeXmacs/examples/plugins/secure/progs/init-secure.scm deleted file mode 100644 index d388c4cd47..0000000000 --- a/TeXmacs/examples/plugins/secure/progs/init-secure.scm +++ /dev/null @@ -1,19 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-secure.scm -;; DESCRIPTION : Initialize the 'secure' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure secure - (:require (url-exists-in-path? "secure.bin")) - (:launch "secure.bin")) - -(when (supports-secure?) - (import-from (secure-secure))) diff --git a/TeXmacs/examples/plugins/secure/progs/secure-secure.scm b/TeXmacs/examples/plugins/secure/progs/secure-secure.scm deleted file mode 100644 index 1f971beca2..0000000000 --- a/TeXmacs/examples/plugins/secure/progs/secure-secure.scm +++ /dev/null @@ -1,21 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : secure-secure.scm -;; DESCRIPTION : Secure routines for 'secure' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(texmacs-module (secure-secure) - (:use (utils plugins plugin-eval))) - -(tm-define (latexer s) - (:type (-> tree object)) - (:synopsis "convert LaTeX string to TeXmacs tree using plugin") - (:secure #t) - (plugin-eval "secure" "default" (tree->string s))) diff --git a/TeXmacs/examples/plugins/secure/src/secure.cpp b/TeXmacs/examples/plugins/secure/src/secure.cpp deleted file mode 100644 index 25033f3836..0000000000 --- a/TeXmacs/examples/plugins/secure/src/secure.cpp +++ /dev/null @@ -1,37 +0,0 @@ - -/****************************************************************************** -* MODULE : substitute.cpp -* DESCRIPTION: Converts LaTeX to TeXmacs -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "An interactive LaTeX -> TeXmacs translator\n"; - cout << "Can also be used outside sessions: select a LaTeX expression\n"; - cout << "and press C-F12\n"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN; - cout << "latex:$" << buffer << "$"; - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/substitute/Makefile b/TeXmacs/examples/plugins/substitute/Makefile deleted file mode 100644 index 318b4a6d08..0000000000 --- a/TeXmacs/examples/plugins/substitute/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -############################################################################### -# MODULE : Make file for plugin example -# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven -############################################################################### -# This software falls under the GNU general public license version 3 or later. -# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -# in the root directory or . -############################################################################### - -CXX = g++ -RM = rm -f - -FILES_CPP := $(wildcard src/*.cpp) -FILES_BIN := $(patsubst src/%.cpp,bin/%.bin,$(FILES_CPP)) - -all: $(FILES_BIN) - -bin/%.bin : src/%.cpp - $(CXX) $< -o $@ - -clean: - $(RM) *~ - $(RM) */*~ - $(RM) bin/* diff --git a/TeXmacs/examples/plugins/substitute/progs/init-substitute.scm b/TeXmacs/examples/plugins/substitute/progs/init-substitute.scm deleted file mode 100644 index 0df228e932..0000000000 --- a/TeXmacs/examples/plugins/substitute/progs/init-substitute.scm +++ /dev/null @@ -1,29 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-substitute.scm -;; DESCRIPTION : Initialize the 'substitute' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure substitute - (:require (url-exists-in-path? "substitute.bin")) - (:launch "substitute.bin") - (:session "Substitute")) - -(when (supports-substitute?) - (define (substitute-substitute) - (import-from (utils plugins plugin-eval)) - (if (selection-active-any?) - (let* ((t (tree->stree (selection-tree))) - (u (plugin-eval "substitute" "default" t))) - (clipboard-cut "primary") - (insert (stree->tree u))))) - - (kbd-map - ("C-F12" (substitute-substitute)))) diff --git a/TeXmacs/examples/plugins/substitute/src/substitute.cpp b/TeXmacs/examples/plugins/substitute/src/substitute.cpp deleted file mode 100644 index a7455bc11b..0000000000 --- a/TeXmacs/examples/plugins/substitute/src/substitute.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -/****************************************************************************** -* MODULE : substitute.cpp -* DESCRIPTION: Use plugins in an invisible way: substitute selections -* by their evaluations (see ../progs/init-substitute.scm) -* COPYRIGHT : (C) 2003 Joris van der Hoeven -******************************************************************************* -* This software falls under the GNU general public license version 3 or later. -* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -* in the root directory or . -******************************************************************************/ - -#include -using namespace std; - -#define DATA_BEGIN ((char) 2) -#define DATA_END ((char) 5) -#define DATA_ESCAPE ((char) 27) - -int -main () { - cout << DATA_BEGIN << "verbatim:"; - cout << "An interactive LaTeX -> TeXmacs translator\n"; - cout << "Can also be used outside sessions: select a LaTeX expression\n"; - cout << "and press C-F12\n"; - cout << DATA_END; - cout.flush (); - - while (true) { - char buffer[100]; - cin.getline (buffer, 100, '\n'); - cout << DATA_BEGIN; - cout << "latex:$" << buffer << "$"; - cout << DATA_END; - cout.flush (); - } - return 0; -} diff --git a/TeXmacs/examples/plugins/world/progs/init-world.scm b/TeXmacs/examples/plugins/world/progs/init-world.scm deleted file mode 100644 index ad4ffef343..0000000000 --- a/TeXmacs/examples/plugins/world/progs/init-world.scm +++ /dev/null @@ -1,18 +0,0 @@ - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; MODULE : init-world.scm -;; DESCRIPTION : Initialize the 'world' plugin -;; COPYRIGHT : (C) 1999 Joris van der Hoeven -;; -;; This software falls under the GNU general public license version 3 or later. -;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE -;; in the root directory or . -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(plugin-configure world - (:require #t)) - -(when (supports-world?) - (display* "Using world plug-in!\n"))