[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

STL & GNU/Open Source Copyright notices



Hej alle!

Jeg sidder og nørkler med STL - da mit projekt ikke kan vente på en
Linux implementation - laver jeg mine egne ad hoc klasser som svarer
ISO/IEC 14482:1998(E)
samt er kompatible med Linux g++-2 (under gcc) (version numre på
"broken" libaries har jeg opgivet at følge med i).

?Spørgsmålet er:?
Hvordan formuler jeg en Copyright notice der yder beskyttelse som via
GNU-licens?
Jeg finder det forkert at automatisk recitere "All rights reserved" når
nu det ikke er det jeg ønsker.

Eksempel:
// -*- C++ -*- header file

// ngr_string.h:
// ngr string ad hoc implementaion declaration file


/* Copyright (c) 1999 Nils AAke Ljunggren && needless Game resigns     *

 * All rights reserved
*/

/* ad hoc implementation of std::char_traits<.>                        *

 * adhering to ISO/IEC 14882:1998(E) 21.1 except for name && namespace
*/


#ifndef _NGR_STRING_H
#define _NGR_STRING_H

#include <string>

extern "C++" {


// ngr_char_traits struct declaration:

template<class charT> struct ngr_char_traits;


// ngr_char_traits<char> specialization struct definition:
// ISO/IEC 14882:1998(E) 21.1.3.1

template <>
struct ngr_char_traits<char> {
  typedef char char_type;
  typedef int int_type;
  typedef streamoff off_type;
  typedef streampos pos_type;
  typedef mbstate_t state_type;

  static void assign(char_type& c1, const char_type& c2) { c1= c2; }
  static bool eq(const char_type& c1, const char_type& c2) { c1 == c2; }

  static bool lt(const char_type& c1, const char_type& c2) { return c1 <
c2; }

  static int compare(const char* s1, const char* s2, size_t n)
    { return memcmp(s1, s2, n); }
  static size_t length(const char_type* s)
    { return strlen(s); }
  static char_type* find(const char_type* s, size_t n, const char_type&
a)
    { return memchr(s, to_int_type(a), n); }
  static char_type* move(char_type* s1, const char_type* s2, size_t n)
    { return memmove(s1, s2, n); }
  static char_type* copy(char_type* s1, const char_type* s2, size_t n)
    { return memcpy(s1, s2, n); }
  static char_type* assign(char_type* s, size_t n, char_type a)
    { return memset(s, to_int_type(a), n); }

  static int not_eof(const int_type& c)
    { return !eq(c, eof()) ? c : !eof(); }
  static char_type to_char_type(const int_type& c)
    { return static_cast<char_type>(c); }
  static int_type to_int_type(const char_type& c)
    { return static_cast<int_type>(c); }
  static bool eq_int_type(const int_type& c1, const int_type& c2)
    { return c1 == c2; }
  static int_type eof()
    { return EOF; }
};

} // extern "C++"

#endif /* !_NGR_STRING_H */




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *