comparison src/pr-output.cc @ 6018:bda649f500bd

[project @ 2006-10-02 17:23:18 by jwe]
author jwe
date Mon, 02 Oct 2006 17:23:19 +0000
parents a104f362b5d4
children c68896f193e3
comparison
equal deleted inserted replaced
6017:b124a912d28b 6018:bda649f500bd
1377 os << "\n"; 1377 os << "\n";
1378 } 1378 }
1379 } 1379 }
1380 1380
1381 template <class T> 1381 template <class T>
1382 static inline void 1382 /* static */ inline void
1383 pr_plus_format (std::ostream& os, const T& val) 1383 pr_plus_format (std::ostream& os, const T& val)
1384 { 1384 {
1385 if (val > T (0)) 1385 if (val > T (0))
1386 os << plus_format_chars[0]; 1386 os << plus_format_chars[0];
1387 else if (val < T (0)) 1387 else if (val < T (0))
1626 break; 1626 break;
1627 } 1627 }
1628 } 1628 }
1629 1629
1630 template <> 1630 template <>
1631 static inline void 1631 /* static */ inline void
1632 pr_plus_format<> (std::ostream& os, const Complex& c) 1632 pr_plus_format<> (std::ostream& os, const Complex& c)
1633 { 1633 {
1634 double rp = c.real (); 1634 double rp = c.real ();
1635 double ip = c.imag (); 1635 double ip = c.imag ();
1636 1636
2139 PRINT_CONV (octave_uint8, octave_uint16); 2139 PRINT_CONV (octave_uint8, octave_uint16);
2140 2140
2141 #undef PRINT_CONV 2141 #undef PRINT_CONV
2142 2142
2143 template <class T> 2143 template <class T>
2144 static inline void 2144 /* static */ inline void
2145 pr_int (std::ostream& os, const T& d, int fw = 0) 2145 pr_int (std::ostream& os, const T& d, int fw = 0)
2146 { 2146 {
2147 size_t sz = d.byte_size(); 2147 size_t sz = d.byte_size();
2148 const unsigned char * tmpi = d.iptr(); 2148 const unsigned char * tmpi = d.iptr();
2149 2149
2204 os << ".00"; 2204 os << ".00";
2205 } 2205 }
2206 } 2206 }
2207 2207
2208 template <class T> 2208 template <class T>
2209 static inline T 2209 /* static */ inline T
2210 abs (T x) 2210 abs (T x)
2211 { 2211 {
2212 return x; 2212 return x;
2213 } 2213 }
2214 2214
2215 #define INSTANTIATE_ABS(T) template static inline T abs (T x) 2215 #define INSTANTIATE_ABS(T) template /* static */ inline T abs (T x)
2216 2216
2217 INSTANTIATE_ABS (unsigned int); 2217 INSTANTIATE_ABS (unsigned int);
2218 INSTANTIATE_ABS (unsigned short); 2218 INSTANTIATE_ABS (unsigned short);
2219 INSTANTIATE_ABS (unsigned long); 2219 INSTANTIATE_ABS (unsigned long);
2220 INSTANTIATE_ABS (unsigned long long); 2220 INSTANTIATE_ABS (unsigned long long);