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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librutiltpp/] [RtclSystem.cpp] - Diff between revs 27 and 29

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 27 Rev 29
Line 1... Line 1...
// $Id: RtclSystem.cpp 584 2014-08-22 19:38:12Z mueller $
// $Id: RtclSystem.cpp 632 2015-01-11 12:30:03Z mueller $
//
//
// Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2013-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
// 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
// the terms of the GNU General Public License as published by the Free
Line 17... Line 17...
// 2013-05-17   521   1.0    Initial version
// 2013-05-17   521   1.0    Initial version
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
/*!
/*!
  \file
  \file
  \version $Id: RtclSystem.cpp 584 2014-08-22 19:38:12Z mueller $
  \version $Id: RtclSystem.cpp 632 2015-01-11 12:30:03Z mueller $
  \brief   Implemenation of RtclSystem.
  \brief   Implemenation of RtclSystem.
*/
*/
 
 
#include <unistd.h>
#include <unistd.h>
#include <errno.h>
#include <errno.h>
Line 143... Line 143...
      if        (opt == "-init") {          // -init
      if        (opt == "-init") {          // -init
        if (!args.AllDone()) return kERR;
        if (!args.AllDone()) return kERR;
        return kOK;
        return kOK;
 
 
      } else if (opt == "-info") {          // -info
      } else if (opt == "-info") {          // -info
        RtclOPtr pres(Tcl_NewListObj(0,0));
        RtclOPtr pres(Tcl_NewListObj(0,nullptr));
        int siglist[] = {SIGHUP,SIGINT,SIGTERM,SIGUSR1,SIGUSR2};
        int siglist[] = {SIGHUP,SIGINT,SIGTERM,SIGUSR1,SIGUSR2};
        for (size_t i=0; i<sizeof(siglist)/sizeof(int); i++) {
        for (size_t i=0; i<sizeof(siglist)/sizeof(int); i++) {
          Tcl_Obj* pobj;
          Tcl_Obj* pobj;
          if (pact->GetAction(siglist[i], pobj, emsg)) {
          if (pact->GetAction(siglist[i], pobj, emsg)) {
            RtclOPtr pele(Tcl_NewListObj(0,0));
            RtclOPtr pele(Tcl_NewListObj(0,0));
Line 199... Line 199...
    if (!args.OptValid()) return kERR;
    if (!args.OptValid()) return kERR;
    if (!args.AllDone()) return kERR;
    if (!args.AllDone()) return kERR;
    Tcl_Obj* pobj;
    Tcl_Obj* pobj;
    if (!pact->GetAction(signum, pobj, emsg))
    if (!pact->GetAction(signum, pobj, emsg))
      return args.Quit("no handler defined");
      return args.Quit("no handler defined");
    if (pobj == 0) pobj = Tcl_NewStringObj("{}",-1);
    if (pobj == nullptr) pobj = Tcl_NewStringObj("{}",-1);
    args.SetResult(pobj);
    args.SetResult(pobj);
  }
  }
 
 
  return kOK;
  return kOK;
}
}

powered by: WebSVN 2.1.0

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