1
0
mirror of https://github.com/wfjm/w11.git synced 2026-02-18 13:47:24 +00:00

- add sources for C++/Tcl based backend, add directories

- tools/src/...
  - tools/tcl/...
  - tools/dox
  - tools/make
- add rlink test system
  - rtl/sys_gen/tst_rlink/nexys2/...
This commit is contained in:
Walter F.J. Mueller
2011-04-02 11:08:56 +00:00
parent c3d40ba4b9
commit a20f49fcd5
183 changed files with 17944 additions and 34 deletions

View File

@@ -0,0 +1,62 @@
// $Id: Rlinktpp_Init.cpp 375 2011-04-02 07:56:47Z mueller $
//
// Copyright 2011- 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
// 2011-03-20 372 1.0.2 renamed ..tcl -> ..tpp
// 2011-03-19 371 1.0.1 moved Bvi into librtoolstcl
// 2011-02-11 360 0.1 First draft
// ---------------------------------------------------------------------------
/*!
\file
\version $Id: Rlinktpp_Init.cpp 375 2011-04-02 07:56:47Z mueller $
\brief Implemenation of Rlinktpp_Init .
*/
#include "tcl.h"
#include <stdexcept>
#include "librtcltools/RtclClassOwned.hpp"
#include "RtclRlinkConnect.hpp"
using namespace std;
using namespace Retro;
//------------------------------------------+-----------------------------------
extern "C" int Rlinktpp_Init(Tcl_Interp* interp)
{
int irc;
// use stubs
const char* vers = Tcl_InitStubs(interp, TCL_VERSION, 0);
if (vers == NULL) return TCL_ERROR;
// declare package name and version
irc = Tcl_PkgProvide(interp, "rlinktpp", "1.0.0");
if (irc != TCL_OK) return irc;
try {
// register class commands
RtclClassOwned<RtclRlinkConnect>::CreateClass(interp, "rlinkconnect",
"RlinkConnect");
return TCL_OK;
} catch (exception& e) {
Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: \"",
e.what(), "\"", NULL);
}
return TCL_ERROR;
}