OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librutiltpp/] [Rutiltpp_Init.cpp] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 wfjm
// $Id: Rutiltpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $
2 10 wfjm
//
3 27 wfjm
// Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 wfjm
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16 27 wfjm
// 2014-08-22   584   1.0.4  use nullptr
17 22 wfjm
// 2013-05-17   512   1.0.3  add RtclSystem::CreateCmds()
18 19 wfjm
// 2013-02-10   485   1.0.2  remove Tcl_InitStubs()
19
// 2011-03-20   372   1.0.1  renamed ..tcl -> ..tpp
20 10 wfjm
// 2011-03-19   371   1.0    Initial version
21
// ---------------------------------------------------------------------------
22
 
23
/*!
24
  \file
25 27 wfjm
  \version $Id: Rutiltpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $
26 10 wfjm
  \brief   Implemenation of Rutiltpp_Init .
27
*/
28
 
29
#include "tcl.h"
30
 
31
#include <stdexcept>
32
 
33 22 wfjm
#include "RtclSystem.hpp"
34 10 wfjm
#include "RtclBvi.hpp"
35
 
36
using namespace std;
37
using namespace Retro;
38
 
39
//------------------------------------------+-----------------------------------
40
extern "C" int Rutiltpp_Init(Tcl_Interp* interp)
41
{
42
  int irc;
43
 
44
  // declare package name and version
45
  irc = Tcl_PkgProvide(interp, "rutiltpp", "1.0.0");
46
  if (irc != TCL_OK) return irc;
47
 
48
  try {
49
    // register general commands
50 22 wfjm
    RtclSystem::CreateCmds(interp);
51 10 wfjm
    RtclBvi::CreateCmds(interp);
52
    return TCL_OK;
53
 
54
  } catch (exception& e) {
55 19 wfjm
    Tcl_AppendResult(interp, "-E: exception caught in Rutiltpp_Init: '",
56 27 wfjm
                     e.what(), "'", nullptr);
57 10 wfjm
  }
58
  return TCL_ERROR;
59
}
60
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.