X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FTermlib%2FTerminfo.hh;h=42e61a7f0158e4819cd159e6908ae2d17c5878ed;hb=refs%2Fheads%2Fmaster;hp=601051bc7d2c6ed56f7a47c6f98a31279e63ac11;hpb=9cb871b939efe93e35dd96808d25089399acfc46;p=senf.git diff --git a/senf/Utils/Termlib/Terminfo.hh b/senf/Utils/Termlib/Terminfo.hh index 601051b..42e61a7 100644 --- a/senf/Utils/Termlib/Terminfo.hh +++ b/senf/Utils/Termlib/Terminfo.hh @@ -2,23 +2,28 @@ // // Copyright (C) 2009 // Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY -// Stefan Bund // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. +// The contents of this file are subject to the Fraunhofer FOKUS Public License +// Version 1.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// http://senf.berlios.de/license.html // -// 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 more details. +// The Fraunhofer FOKUS Public License Version 1.0 is based on, +// but modifies the Mozilla Public License Version 1.1. +// See the full license text for the amendments. // -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the -// Free Software Foundation, Inc., -// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the License. +// +// The Original Code is Fraunhofer FOKUS code. +// +// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. +// (registered association), Hansastraße 27 c, 80686 Munich, Germany. +// All Rights Reserved. +// +// Contributor(s): +// Stefan Bund /** \file \brief Terminfo public header */ @@ -36,7 +41,7 @@ #include //#include "Terminfo.mpp" -///////////////////////////////hh.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace senf { namespace term { @@ -65,7 +70,7 @@ namespace term { class Terminfo { public: - /////////////////////////////////////////////////////////////////////////// + //-//////////////////////////////////////////////////////////////////////// // Types /** \brief NoValue constant @@ -184,7 +189,7 @@ namespace term { typedef boost::int16_t number_t; ///< Numeric terminfo property type typedef char const* string_t; ///< String terminfo property type - /////////////////////////////////////////////////////////////////////////// + //-//////////////////////////////////////////////////////////////////////// Terminfo(); explicit Terminfo(std::string const & term); ///< Load terminfo entry \a term @@ -208,13 +213,14 @@ namespace term { /**< Formats the string property \a p containing special terminfo codes. Terminfo supports up to 9 parameters. */ - /////////////////////////////////////////////////////////////////////////// + //-//////////////////////////////////////////////////////////////////////// void dump(std::ostream & os) const; ///< Dump a description of the terminfo entry /** \brief Invalid, incomplete or non-existent terminfo entry exception */ - struct InvalidTerminfoException : public senf::Exception - { InvalidTerminfoException() : senf::Exception("Unreadable terminfo file") {} }; + struct InvalidTerminfoException : public senf::Exception { + InvalidTerminfoException(std::string const & term = ""); + }; private: typedef std::vector BoolVec; @@ -222,7 +228,7 @@ namespace term { typedef std::vector StringVec; typedef std::vector StringPool; - std::string findTerminfo(std::string const & name); + static std::string findTerminfo(std::string const & name); void load(std::istream & is); std::string name_; @@ -245,7 +251,7 @@ namespace term { class KeyParser { public: - /////////////////////////////////////////////////////////////////////////// + //-//////////////////////////////////////////////////////////////////////// // Types /** \brief Special keyboard key codes */ @@ -275,7 +281,7 @@ namespace term { /** \brief Helper to convert uppercase char to Control key code */ static keycode_t Ctrl(char ch) { return ch-'@'; } - /////////////////////////////////////////////////////////////////////////// + //-//////////////////////////////////////////////////////////////////////// KeyParser(); explicit KeyParser(Terminfo const & ti); ///< Load keymap information from \a ti @@ -314,7 +320,7 @@ namespace term { }} -///////////////////////////////hh.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// //#include "Terminfo.cci" //#include "Terminfo.ct" //#include "Terminfo.cti"