Mercurial > octave-nkf
comparison src/ov-base.cc @ 11586:12df7854fa7c
strip trailing whitespace from source files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:24:59 -0500 |
parents | fd0a3ac60b0e |
children | d08901c05c1b |
comparison
equal
deleted
inserted
replaced
11585:1473d0cf86d2 | 11586:12df7854fa7c |
---|---|
66 retval = static_cast<builtin_type_t> (x | y); | 66 retval = static_cast<builtin_type_t> (x | y); |
67 else if (x <= btyp_uint64 && y <= btyp_float) | 67 else if (x <= btyp_uint64 && y <= btyp_float) |
68 retval = x; | 68 retval = x; |
69 else if (x <= btyp_float && y <= btyp_uint64) | 69 else if (x <= btyp_float && y <= btyp_uint64) |
70 retval = y; | 70 retval = y; |
71 else if ((x >= btyp_int8 && x <= btyp_int64 | 71 else if ((x >= btyp_int8 && x <= btyp_int64 |
72 && y >= btyp_int8 && y <= btyp_int64) | 72 && y >= btyp_int8 && y <= btyp_int64) |
73 || (x >= btyp_uint8 && x <= btyp_uint64 | 73 || (x >= btyp_uint8 && x <= btyp_uint64 |
74 && y >= btyp_uint8 && y <= btyp_uint64)) | 74 && y >= btyp_uint8 && y <= btyp_uint64)) |
75 retval = (x > y) ? x : y; | 75 retval = (x > y) ? x : y; |
76 | 76 |
77 return retval; | 77 return retval; |
78 } | 78 } |
79 | 79 |
80 std::string btyp_class_name[btyp_num_types] = | 80 std::string btyp_class_name[btyp_num_types] = |
81 { | 81 { |
82 "double", "single", "double", "single", | 82 "double", "single", "double", "single", |
83 "int8", "int16", "int32", "int64", | 83 "int8", "int16", "int32", "int64", |
84 "uint8", "uint16", "uint32", "uint64", | 84 "uint8", "uint16", "uint32", "uint64", |
85 "logical", "char", | 85 "logical", "char", |
327 { | 327 { |
328 gripe_wrong_type_arg ("octave_base_value::resize ()", type_name ()); | 328 gripe_wrong_type_arg ("octave_base_value::resize ()", type_name ()); |
329 return octave_value (); | 329 return octave_value (); |
330 } | 330 } |
331 | 331 |
332 MatrixType | 332 MatrixType |
333 octave_base_value::matrix_type (void) const | 333 octave_base_value::matrix_type (void) const |
334 { | 334 { |
335 gripe_wrong_type_arg ("octave_base_value::matrix_type ()", type_name ()); | 335 gripe_wrong_type_arg ("octave_base_value::matrix_type ()", type_name ()); |
336 return MatrixType (); | 336 return MatrixType (); |
337 } | 337 } |
338 | 338 |
339 MatrixType | 339 MatrixType |
340 octave_base_value::matrix_type (const MatrixType&) const | 340 octave_base_value::matrix_type (const MatrixType&) const |
341 { | 341 { |
342 gripe_wrong_type_arg ("octave_base_value::matrix_type ()", type_name ()); | 342 gripe_wrong_type_arg ("octave_base_value::matrix_type ()", type_name ()); |
343 return MatrixType (); | 343 return MatrixType (); |
344 } | 344 } |
415 return retval; | 415 return retval; |
416 } | 416 } |
417 | 417 |
418 void | 418 void |
419 octave_base_value::print_with_name (std::ostream& output_buf, | 419 octave_base_value::print_with_name (std::ostream& output_buf, |
420 const std::string& name, | 420 const std::string& name, |
421 bool print_padding) | 421 bool print_padding) |
422 { | 422 { |
423 bool pad_after = print_name_tag (output_buf, name); | 423 bool pad_after = print_name_tag (output_buf, name); |
424 | 424 |
425 print (output_buf); | 425 print (output_buf); |
1032 octave_value_list retval; | 1032 octave_value_list retval; |
1033 gripe_wrong_type_arg ("octave_base_value::list_value()", type_name ()); | 1033 gripe_wrong_type_arg ("octave_base_value::list_value()", type_name ()); |
1034 return retval; | 1034 return retval; |
1035 } | 1035 } |
1036 | 1036 |
1037 bool | 1037 bool |
1038 octave_base_value::save_ascii (std::ostream&) | 1038 octave_base_value::save_ascii (std::ostream&) |
1039 { | 1039 { |
1040 gripe_wrong_type_arg ("octave_base_value::save_ascii()", type_name ()); | 1040 gripe_wrong_type_arg ("octave_base_value::save_ascii()", type_name ()); |
1041 return false; | 1041 return false; |
1042 } | 1042 } |
1043 | 1043 |
1044 bool | 1044 bool |
1045 octave_base_value::load_ascii (std::istream&) | 1045 octave_base_value::load_ascii (std::istream&) |
1046 { | 1046 { |
1047 gripe_wrong_type_arg ("octave_base_value::load_ascii()", type_name ()); | 1047 gripe_wrong_type_arg ("octave_base_value::load_ascii()", type_name ()); |
1048 return false; | 1048 return false; |
1049 } | 1049 } |
1050 | 1050 |
1051 bool | 1051 bool |
1052 octave_base_value::save_binary (std::ostream&, bool&) | 1052 octave_base_value::save_binary (std::ostream&, bool&) |
1053 { | 1053 { |
1054 gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ()); | 1054 gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ()); |
1055 return false; | 1055 return false; |
1056 } | 1056 } |
1057 | 1057 |
1058 bool | 1058 bool |
1059 octave_base_value::load_binary (std::istream&, bool, | 1059 octave_base_value::load_binary (std::istream&, bool, |
1060 oct_mach_info::float_format) | 1060 oct_mach_info::float_format) |
1061 { | 1061 { |
1062 gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ()); | 1062 gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ()); |
1063 return false; | 1063 return false; |
1071 gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ()); | 1071 gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ()); |
1072 | 1072 |
1073 return false; | 1073 return false; |
1074 } | 1074 } |
1075 | 1075 |
1076 bool | 1076 bool |
1077 octave_base_value::load_hdf5 (hid_t, const char *) | 1077 octave_base_value::load_hdf5 (hid_t, const char *) |
1078 { | 1078 { |
1079 gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ()); | 1079 gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ()); |
1080 | 1080 |
1081 return false; | 1081 return false; |
1115 | 1115 |
1116 return octave_value(); | 1116 return octave_value(); |
1117 } | 1117 } |
1118 | 1118 |
1119 octave_value | 1119 octave_value |
1120 octave_base_value::sort (Array<octave_idx_type> &, | 1120 octave_base_value::sort (Array<octave_idx_type> &, |
1121 octave_idx_type, sortmode) const | 1121 octave_idx_type, sortmode) const |
1122 { | 1122 { |
1123 gripe_wrong_type_arg ("octave_base_value::sort ()", type_name ()); | 1123 gripe_wrong_type_arg ("octave_base_value::sort ()", type_name ()); |
1124 | 1124 |
1125 return octave_value(); | 1125 return octave_value(); |
1151 | 1151 |
1152 | 1152 |
1153 const char * | 1153 const char * |
1154 octave_base_value::get_umap_name (unary_mapper_t umap) | 1154 octave_base_value::get_umap_name (unary_mapper_t umap) |
1155 { | 1155 { |
1156 static const char *names[num_unary_mappers] = | 1156 static const char *names[num_unary_mappers] = |
1157 { | 1157 { |
1158 "abs", | 1158 "abs", |
1159 "acos", | 1159 "acos", |
1160 "acosh", | 1160 "acosh", |
1161 "angle", | 1161 "angle", |
1347 | 1347 |
1348 // Try biased (one-sided) conversions first. | 1348 // Try biased (one-sided) conversions first. |
1349 if (cf_rhs.type_id () >= 0 | 1349 if (cf_rhs.type_id () >= 0 |
1350 && (octave_value_typeinfo::lookup_assign_op (octave_value::op_asn_eq, | 1350 && (octave_value_typeinfo::lookup_assign_op (octave_value::op_asn_eq, |
1351 t_lhs, cf_rhs.type_id ()) | 1351 t_lhs, cf_rhs.type_id ()) |
1352 || octave_value_typeinfo::lookup_pref_assign_conv (t_lhs, | 1352 || octave_value_typeinfo::lookup_pref_assign_conv (t_lhs, |
1353 cf_rhs.type_id ()) >= 0)) | 1353 cf_rhs.type_id ()) >= 0)) |
1354 cf_this = 0; | 1354 cf_this = 0; |
1355 else if (cf_this.type_id () >= 0 | 1355 else if (cf_this.type_id () >= 0 |
1356 && (octave_value_typeinfo::lookup_assign_op (octave_value::op_asn_eq, | 1356 && (octave_value_typeinfo::lookup_assign_op (octave_value::op_asn_eq, |
1357 cf_this.type_id (), t_rhs) | 1357 cf_this.type_id (), t_rhs) |
1424 | 1424 |
1425 void | 1425 void |
1426 octave_base_value::indent (std::ostream& os) const | 1426 octave_base_value::indent (std::ostream& os) const |
1427 { | 1427 { |
1428 assert (curr_print_indent_level >= 0); | 1428 assert (curr_print_indent_level >= 0); |
1429 | 1429 |
1430 if (beginning_of_line) | 1430 if (beginning_of_line) |
1431 { | 1431 { |
1432 // FIXME -- do we need this? | 1432 // FIXME -- do we need this? |
1433 // os << prefix; | 1433 // os << prefix; |
1434 | 1434 |
1469 octave_base_value::fast_elem_insert (octave_idx_type, const octave_value&) | 1469 octave_base_value::fast_elem_insert (octave_idx_type, const octave_value&) |
1470 { | 1470 { |
1471 return false; | 1471 return false; |
1472 } | 1472 } |
1473 | 1473 |
1474 bool | 1474 bool |
1475 octave_base_value::fast_elem_insert_self (void *, builtin_type_t) const | 1475 octave_base_value::fast_elem_insert_self (void *, builtin_type_t) const |
1476 { | 1476 { |
1477 return false; | 1477 return false; |
1478 } | 1478 } |
1479 | 1479 |