mirror of
https://github.com/wfjm/w11.git
synced 2026-01-28 21:11:57 +00:00
- migrate to rlink protocol version 4
- Goals for rlink v4
- 16 bit addresses (instead of 8 bit)
- more robust encoding, support for error recovery at transport level
- add features to reduce round trips
- improved attention handling
- new 'list abort' command
- For further details see README_Rlink_V4.txt
- use own C++ based tcl shell tclshcpp instead of tclsh
This commit is contained in:
1
tools/src/tclshcpp/.cvsignore
Normal file
1
tools/src/tclshcpp/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
*.dep
|
||||
54
tools/src/tclshcpp/Makefile
Normal file
54
tools/src/tclshcpp/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
# $Id: Makefile 601 2014-11-07 22:44:43Z mueller $
|
||||
#
|
||||
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2014-11-07 601 1.0 Initial version
|
||||
#
|
||||
# Compile and Link search paths
|
||||
#
|
||||
include ../checkpath_cpp.mk
|
||||
#
|
||||
INCLFLAGS = -I${TCLINC}
|
||||
LDLIBS += -L$(TCLLIB) -l$(TCLLIBNAME)
|
||||
#
|
||||
BINPATH = $(RETROBASE)/tools/bin
|
||||
#
|
||||
# Object files to be included
|
||||
#
|
||||
OBJ_all = tclshcpp.o
|
||||
#
|
||||
DEP_all = $(OBJ_all:.o=.dep)
|
||||
#
|
||||
# link target
|
||||
#
|
||||
$(BINPATH)/tclshcpp : $(OBJ_all)
|
||||
$(CXX) -o $(BINPATH)/tclshcpp $(OBJ_all) $(LDLIBS)
|
||||
|
||||
#- generic part ----------------------------------------------------------------
|
||||
#
|
||||
include $(RETROBASE)/tools/make/generic_cpp.mk
|
||||
include $(RETROBASE)/tools/make/generic_dep.mk
|
||||
include $(RETROBASE)/tools/make/dontincdep.mk
|
||||
#
|
||||
# The magic auto-dependency include
|
||||
#
|
||||
ifndef DONTINCDEP
|
||||
include $(DEP_all)
|
||||
endif
|
||||
#
|
||||
# cleanup phonies:
|
||||
#
|
||||
.PHONY : clean cleandep distclean
|
||||
clean :
|
||||
@ rm -f $(OBJ_all)
|
||||
@ echo "Object files removed"
|
||||
#
|
||||
cleandep :
|
||||
@ rm -f $(DEP_all)
|
||||
@ echo "Dependency files removed"
|
||||
#
|
||||
distclean :
|
||||
@ rm -f $(BINPATH)/tclshcpp
|
||||
@ echo "Executable files removed"
|
||||
47
tools/src/tclshcpp/tclshcpp.cpp
Normal file
47
tools/src/tclshcpp/tclshcpp.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
// $Id: tclshcpp.cpp 601 2014-11-07 22:44:43Z mueller $
|
||||
//
|
||||
// Copyright 2014- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, or at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// for complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2014-11-07 601 1.0 Initial version
|
||||
|
||||
// This code is the minimal code for a tclsh, as recommended by
|
||||
// http://wiki.tcl.tk/1315
|
||||
// but also equivalent to the code in tclAppInit.c which is the source of
|
||||
// tclsh when all ifdefs and options have been removed.
|
||||
//
|
||||
// Only difference to the plain C version is the inclusion of <iostream>.
|
||||
// This ensures that the C++ basing I/O streams are initialized before the
|
||||
// Tcl interpreter starts.
|
||||
//
|
||||
// If iostream is not included one gets core dumps when a 'package require'
|
||||
// loads a dynamic library which has C++ code and unresolved references.
|
||||
// With iostream included one gets a proper error message.
|
||||
//
|
||||
|
||||
#include "tcl.h"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
extern int Tcl_AppInit(Tcl_Interp *interp);
|
||||
Tcl_Main(argc, argv, Tcl_AppInit);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Tcl_AppInit(Tcl_Interp *interp)
|
||||
{
|
||||
if (Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR;
|
||||
Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY);
|
||||
return TCL_OK;
|
||||
}
|
||||
Reference in New Issue
Block a user