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

Subversion Repositories w11

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 10 wfjm
// $Id: Rutiltpp_Init.cpp 374 2011-03-27 17:02:47Z mueller $
2
//
3
// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
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
// 2011-03-20   372   1.0.2  renamed ..tcl -> ..tpp
17
// 2011-03-19   371   1.0    Initial version
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22
  \version $Id: Rutiltpp_Init.cpp 374 2011-03-27 17:02:47Z mueller $
23
  \brief   Implemenation of Rutiltpp_Init .
24
*/
25
 
26
#include "tcl.h"
27
 
28
#include <stdexcept>
29
 
30
#include "RtclBvi.hpp"
31
 
32
using namespace std;
33
using namespace Retro;
34
 
35
//------------------------------------------+-----------------------------------
36
extern "C" int Rutiltpp_Init(Tcl_Interp* interp)
37
{
38
  int irc;
39
 
40
  // use stubs
41
  const char* vers = Tcl_InitStubs(interp, TCL_VERSION, 0);
42
  if (vers == NULL) return TCL_ERROR;
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
    RtclBvi::CreateCmds(interp);
51
    return TCL_OK;
52
 
53
  } catch (exception& e) {
54
    Tcl_AppendResult(interp, "-E: exception caught in Rutiltpp_Init: \"",
55
                     e.what(), "\"", NULL);
56
  }
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.