4901
|
1 /* |
|
2 |
|
3 Copyright (C) 2004 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #ifdef HAVE_CONFIG_H |
|
24 #include <config.h> |
|
25 #endif |
|
26 |
|
27 #include <climits> |
|
28 |
|
29 #include <iostream> |
|
30 #include <vector> |
|
31 |
|
32 #include "lo-ieee.h" |
|
33 #include "lo-utils.h" |
|
34 #include "mx-base.h" |
|
35 #include "quit.h" |
|
36 |
|
37 #include "defun.h" |
|
38 #include "gripes.h" |
|
39 #include "oct-obj.h" |
|
40 #include "oct-lvalue.h" |
|
41 #include "ops.h" |
|
42 #include "ov-base.h" |
4917
|
43 |
|
44 #ifdef HAVE_HDF5 |
|
45 #define HDF5_SAVE_TYPE H5T_NATIVE_UINT8 |
|
46 #endif |
|
47 |
4901
|
48 #include "ov-base-int.h" |
|
49 #include "ov-base-int.cc" |
|
50 #include "ov-uint8.h" |
|
51 #include "ov-type-conv.h" |
|
52 #include "pr-output.h" |
|
53 #include "variables.h" |
|
54 |
|
55 #include "byte-swap.h" |
|
56 #include "ls-oct-ascii.h" |
|
57 #include "ls-utils.h" |
|
58 #include "ls-hdf5.h" |
|
59 |
|
60 template class octave_base_matrix<uint8NDArray>; |
|
61 |
|
62 template class octave_base_int_matrix<uint8NDArray>; |
|
63 |
|
64 DEFINE_OCTAVE_ALLOCATOR (octave_uint8_matrix); |
|
65 |
|
66 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint8_matrix, |
|
67 "uint8 matrix", "uint8"); |
|
68 |
|
69 template class octave_base_scalar<octave_uint8>; |
|
70 |
|
71 template class octave_base_int_scalar<octave_uint8>; |
|
72 |
|
73 DEFINE_OCTAVE_ALLOCATOR (octave_uint8_scalar); |
|
74 |
|
75 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint8_scalar, |
|
76 "uint8 scalar", "uint8"); |
|
77 |
|
78 DEFUN (uint8, args, , |
|
79 "-*- texinfo -*-\n\ |
|
80 @deftypefn {Built-in Function} {} uint8 (@var{x})\n\ |
|
81 Convert @var{x} to unsigned 8-bit integer type.\n\ |
|
82 @end deftypefn") |
|
83 { |
|
84 OCTAVE_TYPE_CONV_BODY (uint8); |
|
85 } |
|
86 |
|
87 /* |
|
88 ;;; Local Variables: *** |
|
89 ;;; mode: C++ *** |
|
90 ;;; End: *** |
|
91 */ |