Browse Source

Make index variables uintC.

master
Richard Kreckel 17 years ago
parent
commit
3a8c34e9a6
  1. 12
      ChangeLog
  2. 2
      include/cln/float_io.h
  3. 2
      include/cln/integer_io.h
  4. 2
      include/cln/rational_io.h
  5. 4
      src/float/input/cl_F_readparsed.cc
  6. 2
      src/integer/input/cl_I_readparsed.cc
  7. 4
      src/rational/input/cl_RA_readparsed.cc
  8. 4
      src/vector/output/cl_GV_number_aprint.cc
  9. 4
      src/vector/output/cl_SV_aprint.cc
  10. 4
      src/vector/output/cl_SV_number_aprint.cc

12
ChangeLog

@ -1,3 +1,15 @@
2007-02-22 Richard B. Kreckel <kreckel@ginac.de>
* include/cln/integer_io.h (read_integer): Make index args uintC.
* src/integer/input/cl_I_readparsed.cc: Likewise.
* include/cln/rational_io.h (read_rational): Likewise.
* src/rational/input/cl_RA_readparsed.cc: Likewise
* include/cln/float_io.h (read_float): Likewise.
* src/float/input/cl_F_readparsed.cc: Likewise.
* src/vector/output/cl_GV_number_aprint.cc: Vector lengths are uintC.
* src/vector/output/cl_SV_aprint.cc: Likewise.
* src/vector/output/cl_SV_number_aprint.cc: Likewise.
2007-02-15 Richard B. Kreckel <kreckel@ginac.de> 2007-02-15 Richard B. Kreckel <kreckel@ginac.de>
* m4/cc.m4 (CL_HAVE_ATTRIBUTE_FLATTEN): More robust definition allows... * m4/cc.m4 (CL_HAVE_ATTRIBUTE_FLATTEN): More robust definition allows...

2
include/cln/float_io.h

@ -26,7 +26,7 @@ namespace cln {
// Exponenten-Ziffer) // Exponenten-Ziffer)
// < ergebnis: Float // < ergebnis: Float
extern const cl_F read_float (unsigned int base, float_format_t prec, extern const cl_F read_float (unsigned int base, float_format_t prec,
cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3);
cl_signean sign, const char * string, uintC index1, uintC index4, uintC index2, uintC index3);
// The following does strictly the same as the general read_complex. // The following does strictly the same as the general read_complex.
// It is here only so that you don't need the complex and rational number // It is here only so that you don't need the complex and rational number

2
include/cln/integer_io.h

@ -21,7 +21,7 @@ namespace cln {
// (also index2-index1 Ziffern, incl. evtl. Dezimalpunkt am Schluß) // (also index2-index1 Ziffern, incl. evtl. Dezimalpunkt am Schluß)
// < ergebnis: Integer // < ergebnis: Integer
extern const cl_I read_integer (unsigned int base, extern const cl_I read_integer (unsigned int base,
cl_signean sign, const char * string, uintL index1, uintL index2);
cl_signean sign, const char * string, uintC index1, uintC index2);
// The following does strictly the same as the general read_complex. // The following does strictly the same as the general read_complex.
// It is here only so that you don't need the rational, complex and float number // It is here only so that you don't need the rational, complex and float number

2
include/cln/rational_io.h

@ -21,7 +21,7 @@ namespace cln {
// (also index3-index1 Zähler-Ziffern, index2-index3-1 Nenner-Ziffern) // (also index3-index1 Zähler-Ziffern, index2-index3-1 Nenner-Ziffern)
// < ergebnis: rationale Zahl // < ergebnis: rationale Zahl
extern const cl_RA read_rational (unsigned int base, extern const cl_RA read_rational (unsigned int base,
cl_signean sign, const char * string, uintL index1, uintL index3, uintL index2);
cl_signean sign, const char * string, uintC index1, uintC index3, uintC index2);
// The following does strictly the same as the general read_complex. // The following does strictly the same as the general read_complex.
// It is here only so that you don't need the complex and float number // It is here only so that you don't need the complex and float number

4
src/float/input/cl_F_readparsed.cc

@ -26,11 +26,11 @@
namespace cln { namespace cln {
const cl_F read_float (unsigned int base, float_format_t prec, cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3)
const cl_F read_float (unsigned int base, float_format_t prec, cl_signean sign, const char * string, uintC index1, uintC index4, uintC index2, uintC index3)
{ {
var cl_I exponent; var cl_I exponent;
{ {
var uintL exp_len = index2-index4; // Anzahl Stellen des Exponenten
var uintC exp_len = index2-index4; // Anzahl Stellen des Exponenten
if (exp_len > 0) { if (exp_len > 0) {
var const char * ptr = &string[index4]; // zeigt auf den Exponentmarker var const char * ptr = &string[index4]; // zeigt auf den Exponentmarker
ptr++; exp_len--; // Exponentmarker überlesen ptr++; exp_len--; // Exponentmarker überlesen

2
src/integer/input/cl_I_readparsed.cc

@ -13,7 +13,7 @@
namespace cln { namespace cln {
const cl_I read_integer (unsigned int base, cl_signean sign, const char * string, uintL index1, uintL index2)
const cl_I read_integer (unsigned int base, cl_signean sign, const char * string, uintC index1, uintC index2)
{ {
var cl_I x = digits_to_I(&string[index1],index2-index1,(uintD)base); var cl_I x = digits_to_I(&string[index1],index2-index1,(uintD)base);
if (sign == 0) if (sign == 0)

4
src/rational/input/cl_RA_readparsed.cc

@ -15,9 +15,9 @@
namespace cln { namespace cln {
const cl_RA read_rational (unsigned int base, cl_signean sign, const char * string, uintL index1, uintL index3, uintL index2)
const cl_RA read_rational (unsigned int base, cl_signean sign, const char * string, uintC index1, uintC index3, uintC index2)
{ {
var uintL index3_1 = index3+1; // Index der ersten Nennerziffer
var uintC index3_1 = index3+1; // Index der ersten Nennerziffer
var cl_I den = // Nenner var cl_I den = // Nenner
digits_to_I(&string[index3_1],index2-index3_1,(uintD)base); digits_to_I(&string[index3_1],index2-index3_1,(uintD)base);
if (zerop(den)) // Division durch 0 abfangen if (zerop(den)) // Division durch 0 abfangen

4
src/vector/output/cl_GV_number_aprint.cc

@ -19,13 +19,13 @@ namespace cln {
void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector) void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector)
{ {
var uintL len = vector.length();
var uintC len = vector.length();
if (flags.vector_syntax == vsyntax_commonlisp) { if (flags.vector_syntax == vsyntax_commonlisp) {
fprintchar(stream,'#'); fprintchar(stream,'#');
fprintchar(stream,'('); fprintchar(stream,'(');
} else } else
fprintchar(stream,'['); fprintchar(stream,'[');
for (var uintL i = 0; i < len; i++) {
for (var uintC i = 0; i < len; i++) {
if (i > 0) { if (i > 0) {
if (flags.vector_syntax == vsyntax_algebraic) if (flags.vector_syntax == vsyntax_algebraic)
fprintchar(stream,','); fprintchar(stream,',');

4
src/vector/output/cl_SV_aprint.cc

@ -16,13 +16,13 @@ namespace cln {
void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& vector) void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& vector)
{ {
var const cl_print_flags& flags = default_print_flags; var const cl_print_flags& flags = default_print_flags;
var uintL len = vector.length();
var uintC len = vector.length();
if (flags.vector_syntax == vsyntax_commonlisp) { if (flags.vector_syntax == vsyntax_commonlisp) {
fprintchar(stream,'#'); fprintchar(stream,'#');
fprintchar(stream,'('); fprintchar(stream,'(');
} else } else
fprintchar(stream,'['); fprintchar(stream,'[');
for (var uintL i = 0; i < len; i++) {
for (var uintC i = 0; i < len; i++) {
if (i > 0) { if (i > 0) {
if (flags.vector_syntax == vsyntax_algebraic) if (flags.vector_syntax == vsyntax_algebraic)
fprintchar(stream,','); fprintchar(stream,',');

4
src/vector/output/cl_SV_number_aprint.cc

@ -19,13 +19,13 @@ namespace cln {
void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector) void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector)
{ {
var uintL len = vector.length();
var uintC len = vector.length();
if (flags.vector_syntax == vsyntax_commonlisp) { if (flags.vector_syntax == vsyntax_commonlisp) {
fprintchar(stream,'#'); fprintchar(stream,'#');
fprintchar(stream,'('); fprintchar(stream,'(');
} else } else
fprintchar(stream,'['); fprintchar(stream,'[');
for (var uintL i = 0; i < len; i++) {
for (var uintC i = 0; i < len; i++) {
if (i > 0) { if (i > 0) {
if (flags.vector_syntax == vsyntax_algebraic) if (flags.vector_syntax == vsyntax_algebraic)
fprintchar(stream,','); fprintchar(stream,',');

Loading…
Cancel
Save