Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ package: clean
install -m 755 -t ../voss/bin ../bin/functor
install -m 755 -t ../voss/bin ../bin/write_pexlif.so
install -m 755 -t ../voss/bin ../bin/front_end.tcl
install -m 755 -t ../voss/bin ../bin/front_end_debug.tcl
install -m 644 -t ../voss/bin ../bin/prefs.tcl
install -m 644 -t ../voss/bin ../bin/utils.tcl
install -m 644 -t ../voss/bin ../bin/builtins.fl
Expand Down Expand Up @@ -200,6 +201,8 @@ install_all: fl functor \
@chmod ugo+r $(BIN_DIR)/preamble.fl
@cp ./bin/fl/front_end.tcl $(BIN_DIR)/front_end.tcl
@chmod ugo+r $(BIN_DIR)/front_end.tcl
@cp ./bin/fl/front_end_debug.tcl $(BIN_DIR)/front_end_debug.tcl
@chmod ugo+r $(BIN_DIR)/front_end_debug.tcl
@cp ./bin/fl/utils.tcl $(BIN_DIR)/utils.tcl
@chmod ugo+r $(BIN_DIR)/utils.tcl
@cp ./bin/fl/prefs.tcl $(BIN_DIR)/prefs.tcl
Expand Down
2 changes: 0 additions & 2 deletions src/bin/fl/FL

This file was deleted.

18 changes: 14 additions & 4 deletions src/bin/fl/fl.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bool use_stdin = FALSE;
bool use_stdout = FALSE;
bool Interrupt_asap = FALSE;
bool cephalopode_mode = FALSE;
bool debug_tcl = FALSE;
bool profiling_active = FALSE;
bool profiling_builtins = FALSE;
#if DBG_TRACE_AND_SAVE
Expand Down Expand Up @@ -289,6 +290,12 @@ fl_main(int argc, char *argv[])
unbuf_stdout = TRUE;
argc--, argv++;
} else
if( (strcmp(argv[1], "-debug_tcl") == 0) ||
(strcmp(argv[1], "--debug_tcl") == 0) )
{
debug_tcl = TRUE;
argc--, argv++;
} else
if( (strcmp(argv[1], "-use_stdout") == 0) ||
(strcmp(argv[1], "--use_stdout") == 0) )
{
Expand Down Expand Up @@ -904,13 +911,15 @@ setup_sockets()

pid_t fl_pid = getpid();

string front_end_tcl = debug_tcl ? "front_end_debug.tcl" : "front_end.tcl";

if( use_window != NULL ) {
Sprintf(buf, "wish %s/front_end.tcl %d %d %d %s %s -use %s &",
binary_location, fl_pid, addr, port, Voss_tmp_dir,
Sprintf(buf, "wish %s/%s %d %d %d %s %s -use %s &",
binary_location, front_end_tcl, fl_pid, addr, port, Voss_tmp_dir,
scaling_factor, use_window);
} else {
Sprintf(buf, "wish %s/front_end.tcl %d %d %d %s %s &",
binary_location, fl_pid, addr, port, Voss_tmp_dir,
Sprintf(buf, "wish %s/%s %d %d %d %s %s &",
binary_location, front_end_tcl, fl_pid, addr, port, Voss_tmp_dir,
scaling_factor);
}
if( system(buf) != 0 ) {
Expand Down Expand Up @@ -1238,6 +1247,7 @@ print_help()
P(" -hide-window hide the main window while still preserving X functionality\n");
P(" -noX do not use X windows (text only)\n");
P(" --noX do not use X windows (text only)\n");
P(" -debug_tcl use tcl_pro_debug to debug tcl functions. Need to set FL_PRODEBUG_AUTOPATH\n");
P(" -use_stdin read inputs also from stdin\n");
P(" -use_stdout write outputs also to stdout\n");
P(" --hide-window hide the main window while still preserving X functionality\n");
Expand Down
9 changes: 9 additions & 0 deletions src/bin/fl/front_end_debug.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set auto_path [linsert $auto_path 0 $::env(FL_PRODEBUG_AUTOPATH)]
package require remotedebug


debugger_init localhost 2576
debugger_eval {
source [string map {front_end_debug front_end} $argv0]
}