Browse Source

* include/cln/number.h, cl_number::_as_cl_private_thing(): removed.

Rearranged for a clearer distinction between macros and remaining
          identifiers, so Cint can parse it smoothly.
        * Changelog: *trival* documentation changes have nix verloren.
        * doc/cln.info, doc/cln.texi: Removed non-sources from CVS.
master
Richard Kreckel 25 years ago
parent
commit
f6b8e7b68c
  1. 21
      ChangeLog
  2. 3767
      doc/cln.info
  3. 4076
      doc/cln.texi
  4. 54
      include/cln/number.h

21
ChangeLog

@ -1,8 +1,18 @@
2000-08-30 Richard Kreckel <kreckel@ginac.de>
* include/cln/number.h, cl_number::_as_cl_private_thing(): removed.
Rearranged for a clearer distinction between macros and remaining
identifiers, so Cint can parse it smoothly.
2000-08-29 Richard Kreckel <kreckel@ginac.de> 2000-08-29 Richard Kreckel <kreckel@ginac.de>
* include/cln/number.h, the(const cl_number& x): New template * include/cln/number.h, the(const cl_number& x): New template
function. function.
2000-08-29 Richard Kreckel <kreckel@ginac.de>
* TODO: DESCRIBE NAMESPACE CHANGES HERE!!!
2000-08-26 Bruno Haible <haible@clisp.cons.org> 2000-08-26 Bruno Haible <haible@clisp.cons.org>
* autoconf/acgeneral.m4 (AC_OUTPUT): Use braces in exec_prefix default * autoconf/acgeneral.m4 (AC_OUTPUT): Use braces in exec_prefix default
@ -31,11 +41,6 @@
* src/float/sfloat/cl_SF.h: Use cl_pointer_size instead of * src/float/sfloat/cl_SF.h: Use cl_pointer_size instead of
cl_word_size. cl_word_size.
2000-06-05 Richard Kreckel <kreckel@ginac.de>
* doc/*, INSTALL: Mention that both shared and static library are
are now build by default.
2000-05-31 Bruno Haible <haible@clisp.cons.org> 2000-05-31 Bruno Haible <haible@clisp.cons.org>
* tests/exam_I_floor.cc (integer_floor_tests): Add one more entry. * tests/exam_I_floor.cc (integer_floor_tests): Add one more entry.
@ -93,12 +98,6 @@
* INSTALL.generic: Clarified behaviour of --with-gmp. * INSTALL.generic: Clarified behaviour of --with-gmp.
* autoconf/config.guess: updated from Clisp-2000-03-06 sources. * autoconf/config.guess: updated from Clisp-2000-03-06 sources.
2000-05-05 Richard Kreckel <kreckel@ginac.de>
* doc/cln.tex: Added index entries.
* doc/texinfo.tex: Upgraded to newer version 1999-10-01.07.
* doc/*: Changes triggered.
2000-05-04 Richard Kreckel <kreckel@ginac.de> 2000-05-04 Richard Kreckel <kreckel@ginac.de>
* gmp/: removed completely. From now on we are going to link * gmp/: removed completely. From now on we are going to link

3767
doc/cln.info
File diff suppressed because it is too large
View File

4076
doc/cln.texi
File diff suppressed because it is too large
View File

54
include/cln/number.h

@ -1,13 +1,13 @@
// Basic definitions of numbers // Basic definitions of numbers
#ifndef _CL_NUMBER_H #ifndef _CL_NUMBER_H
#define _CL_NUMBER_H #define _CL_NUMBER_H
#include "cln/object.h" #include "cln/object.h"
#include "cln/malloc.h" #include "cln/malloc.h"
namespace cln {
// Type hierachy: // Type hierachy:
// Number (N) = // Number (N) =
// Real (R) = // Real (R) =
@ -110,26 +110,12 @@ inline _class_& _class_::operator= (const unsigned long wert) \
#endif #endif
// Conversions to subtypes:
// As(cl_I)(x) returns x as a cl_I. It first checks that x is a cl_I
// and then returns it without change of representation.
#if 0 // no debug information
#define As(type) as_##type
#define CL_DEFINE_AS_CONVERSION(_class_) \
extern const _class_& as_##_class_ (const cl_number& x); \
inline const _class_& as_##_class_ (const _class_& x) { return x; }
#else // Line number information for ease of debugging.
#define As(type) as_##type cl_as_aux
#define cl_as_aux(expr) (expr,__FILE__,__LINE__)
#define CL_DEFINE_AS_CONVERSION(_class_) \
extern const _class_& as_##_class_ (const cl_number& x, const char * filename, int line); \
inline const _class_& as_##_class_ (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; }
#endif
namespace cln {
// Constructors and assignment operators from C numeric types. // Constructors and assignment operators from C numeric types.
// from `float': // from `float':
union ffloatjanus;
extern cl_private_thing cl_float_to_FF_pointer (const union ffloatjanus& val); extern cl_private_thing cl_float_to_FF_pointer (const union ffloatjanus& val);
#define CL_DEFINE_FLOAT_CONSTRUCTOR(_class_) \ #define CL_DEFINE_FLOAT_CONSTRUCTOR(_class_) \
@ -145,6 +131,7 @@ inline _class_& _class_::operator= (const float x) \
} }
// from `double': // from `double':
union dfloatjanus;
extern struct cl_heap_dfloat * cl_double_to_DF_pointer (const union dfloatjanus& val); extern struct cl_heap_dfloat * cl_double_to_DF_pointer (const union dfloatjanus& val);
#define CL_DEFINE_DOUBLE_CONSTRUCTOR(_class_) \ #define CL_DEFINE_DOUBLE_CONSTRUCTOR(_class_) \
@ -189,7 +176,6 @@ public:
// cl_number (const char *); // cl_number (const char *);
// Private pointer manipulations. // Private pointer manipulations.
cl_number (cl_private_thing); cl_number (cl_private_thing);
cl_private_thing _as_cl_private_thing () const;
}; };
// Private constructors. // Private constructors.
@ -217,8 +203,8 @@ CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_number)
// Hack section. // Hack section.
// Conversions to subtypes without checking:
// the<cl_I>(x) converts x to a cl_I, without change of representation!
// Conversions to subtypes without checking, template version:
// the<cl_I>(x) converts x to a cl_I, without change of representation.
template<class type> template<class type>
inline const type& the(const cl_number& x) inline const type& the(const cl_number& x)
{ {
@ -226,13 +212,31 @@ inline const type& the(const cl_number& x)
typedef int assertion1 [1 - 2 * (sizeof(type) != sizeof(cl_number))]; typedef int assertion1 [1 - 2 * (sizeof(type) != sizeof(cl_number))];
return *(const type *) &x; return *(const type *) &x;
} }
// Conversions to subtypes without checking:
// The(cl_I)(x) converts x to a cl_I, without change of representation!
// Conversions to subtypes without checking, macro version:
// The(cl_I)(x) converts x to a cl_I, without change of representation.
#define The(type) *(const type *) & cl_identity #define The(type) *(const type *) & cl_identity
// This inline function is for type checking purposes only. // This inline function is for type checking purposes only.
inline const cl_number& cl_identity (const cl_number& x) { return x; } inline const cl_number& cl_identity (const cl_number& x) { return x; }
} // namespace cln
// Conversions to subtypes:
// As(cl_I)(x) returns x as a cl_I. It first checks that x is a cl_I
// and then returns it without change of representation.
#if 0 // no debug information
#define As(type) as_##type
#define CL_DEFINE_AS_CONVERSION(_class_) \
extern const _class_& as_##_class_ (const cl_number& x); \
inline const _class_& as_##_class_ (const _class_& x) { return x; }
#else // Line number information for ease of debugging.
#define As(type) as_##type cl_as_aux
#define cl_as_aux(expr) (expr,__FILE__,__LINE__)
#define CL_DEFINE_AS_CONVERSION(_class_) \
extern const _class_& as_##_class_ (const cl_number& x, const char * filename, int line); \
inline const _class_& as_##_class_ (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; }
#endif
// Mutable(type,x); // Mutable(type,x);
// x should be a variable `const type x' or `const type& x'. // x should be a variable `const type x' or `const type& x'.
// This macro introduces a new variable `type& x' whose value can be // This macro introduces a new variable `type& x' whose value can be
@ -252,6 +256,4 @@ inline const type& the(const cl_number& x)
const type& __tmp_##x = *(const type*) &x; \ const type& __tmp_##x = *(const type*) &x; \
const type& x = __tmp_##x; const type& x = __tmp_##x;
} // namespace cln
#endif /* _CL_NUMBER_H */ #endif /* _CL_NUMBER_H */
Loading…
Cancel
Save