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

Subversion Repositories w11

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 wfjm
// $Id: Rutiltpp_Init.cpp 521 2013-05-20 22:16:45Z mueller $
2 10 wfjm
//
3 22 wfjm
// Copyright 2011-2013 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 22 wfjm
// 2013-05-17   512   1.0.3  add RtclSystem::CreateCmds()
17 19 wfjm
// 2013-02-10   485   1.0.2  remove Tcl_InitStubs()
18
// 2011-03-20   372   1.0.1  renamed ..tcl -> ..tpp
19 10 wfjm
// 2011-03-19   371   1.0    Initial version
20
// ---------------------------------------------------------------------------
21
 
22
/*!
23
  \file
24 22 wfjm
  \version $Id: Rutiltpp_Init.cpp 521 2013-05-20 22:16:45Z mueller $
25 10 wfjm
  \brief   Implemenation of Rutiltpp_Init .
26
*/
27
 
28
#include "tcl.h"
29
 
30
#include <stdexcept>
31
 
32 22 wfjm
#include "RtclSystem.hpp"
33 10 wfjm
#include "RtclBvi.hpp"
34
 
35
using namespace std;
36
using namespace Retro;
37
 
38
//------------------------------------------+-----------------------------------
39
extern "C" int Rutiltpp_Init(Tcl_Interp* interp)
40
{
41
  int irc;
42
 
43
  // declare package name and version
44
  irc = Tcl_PkgProvide(interp, "rutiltpp", "1.0.0");
45
  if (irc != TCL_OK) return irc;
46
 
47
  try {
48
    // register general commands
49 22 wfjm
    RtclSystem::CreateCmds(interp);
50 10 wfjm
    RtclBvi::CreateCmds(interp);
51
    return TCL_OK;
52
 
53
  } catch (exception& e) {
54 19 wfjm
    Tcl_AppendResult(interp, "-E: exception caught in Rutiltpp_Init: '",
55
                     e.what(), "'", NULL);
56 10 wfjm
  }
57
  return TCL_ERROR;
58
}
59
 

powered by: WebSVN 2.1.0

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