Mercurial > cpython-lru_cache-weakref
annotate Modules/clmodule.c @ 3044:7e7bb00a0a2e legacy-trunk
Added functionality: locate CW projects, copy them, empty them and
binhex them.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Thu, 31 Aug 1995 13:47:14 +0000 |
| parents | 75afaac85567 |
| children | 65d2d8e67da3 |
| rev | line source |
|---|---|
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
1 /*********************************************************** |
|
2061
172ba04a5191
Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
2 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
|
172ba04a5191
Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
3 The Netherlands. |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
4 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
5 All Rights Reserved |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
6 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
7 Permission to use, copy, modify, and distribute this software and its |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
8 documentation for any purpose and without fee is hereby granted, |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
9 provided that the above copyright notice appear in all copies and that |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
10 both that copyright notice and this permission notice appear in |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
11 supporting documentation, and that the names of Stichting Mathematisch |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
12 Centrum or CWI not be used in advertising or publicity pertaining to |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
13 distribution of the software without specific, written prior permission. |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
14 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
15 STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
16 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
17 FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
18 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
21 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
22 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
23 ******************************************************************/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
24 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
25 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
26 /* Cl objects */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
27 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
28 #define CLDEBUG |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
29 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
30 #include <stdarg.h> |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
31 #include <cl.h> |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
32 #include "allobjects.h" |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
33 #include "modsupport.h" /* For getargs() etc. */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
34 #include "ceval.h" /* For call_object() */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
35 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
36 typedef struct { |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
37 OB_HEAD |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
38 int ob_isCompressor; /* Compressor or Decompressor */ |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
39 CL_Handle ob_compressorHdl; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
40 int *ob_paramtypes; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
41 int ob_nparams; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
42 } clobject; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
43 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
44 static object *ClError; /* exception cl.error */ |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
45 |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
46 static int error_handler_called = 0; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
47 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
48 /* |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
49 * We want to use the function prototypes that are available in the C |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
50 * compiler on the SGI. Because of that, we need to declare the first |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
51 * argument of the compressor and decompressor methods as "object *", |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
52 * even though they are really "clobject *". Therefore we cast the |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
53 * argument to the proper type using this macro. |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
54 */ |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
55 #define SELF ((clobject *) self) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
56 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
57 /******************************************************************** |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
58 Utility routines. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
59 ********************************************************************/ |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
60 static void |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
61 cl_ErrorHandler(CL_Handle handle, int code, const char *fmt, ...) |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
62 { |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
63 va_list ap; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
64 char errbuf[BUFSIZ]; /* hopefully big enough */ |
| 1075 | 65 char *p; |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
66 |
| 1075 | 67 if (err_occurred()) /* don't change existing error */ |
| 68 return; | |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
69 error_handler_called = 1; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
70 va_start(ap, fmt); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
71 vsprintf(errbuf, fmt, ap); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
72 va_end(ap); |
| 1075 | 73 p = &errbuf[strlen(errbuf) - 1]; /* swat the line feed */ |
| 74 if (*p == '\n') | |
| 75 *p = 0; | |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
76 err_setstr(ClError, errbuf); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
77 } |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
78 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
79 /* |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
80 * This assumes that params are always in the range 0 to some maximum. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
81 */ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
82 static int |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
83 param_type_is_float(clobject *self, int param) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
84 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
85 int bufferlength; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
86 int ret; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
87 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
88 if (self->ob_paramtypes == NULL) { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
89 error_handler_called = 0; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
90 bufferlength = clQueryParams(self->ob_compressorHdl, 0, 0); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
91 if (error_handler_called) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
92 return -1; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
93 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
94 self->ob_paramtypes = NEW(int, bufferlength); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
95 if (self->ob_paramtypes == NULL) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
96 return -1; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
97 self->ob_nparams = bufferlength / 2; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
98 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
99 (void) clQueryParams(self->ob_compressorHdl, self->ob_paramtypes, bufferlength); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
100 if (error_handler_called) { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
101 DEL(self->ob_paramtypes); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
102 self->ob_paramtypes = NULL; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
103 return -1; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
104 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
105 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
106 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
107 if (param < 0 || param >= self->ob_nparams) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
108 return -1; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
109 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
110 if (self->ob_paramtypes[param*2 + 1] == CL_FLOATING_ENUM_VALUE || |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
111 self->ob_paramtypes[param*2 + 1] == CL_FLOATING_RANGE_VALUE) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
112 return 1; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
113 else |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
114 return 0; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
115 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
116 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
117 /******************************************************************** |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
118 Single image compression/decompression. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
119 ********************************************************************/ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
120 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
121 cl_CompressImage(object *self, object *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
122 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
123 int compressionScheme, width, height, originalFormat; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
124 float compressionRatio; |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
125 int frameBufferSize, compressedBufferSize; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
126 char *frameBuffer; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
127 object *compressedBuffer; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
128 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
129 if (!getargs(args, "(iiiifs#)", &compressionScheme, &width, &height, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
130 &originalFormat, &compressionRatio, &frameBuffer, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
131 &frameBufferSize)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
132 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
133 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
134 retry: |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
135 compressedBuffer = newsizedstringobject(NULL, frameBufferSize); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
136 if (compressedBuffer == NULL) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
137 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
138 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
139 compressedBufferSize = frameBufferSize; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
140 error_handler_called = 0; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
141 if (clCompressImage(compressionScheme, width, height, originalFormat, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
142 compressionRatio, (void *) frameBuffer, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
143 &compressedBufferSize, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
144 (void *) getstringvalue(compressedBuffer)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
145 == FAILURE) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
146 DECREF(compressedBuffer); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
147 if (!error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
148 err_setstr(ClError, "clCompressImage failed"); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
149 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
150 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
151 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
152 if (compressedBufferSize > frameBufferSize) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
153 frameBufferSize = compressedBufferSize; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
154 DECREF(compressedBuffer); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
155 goto retry; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
156 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
157 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
158 if (compressedBufferSize < frameBufferSize) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
159 if (resizestring(&compressedBuffer, compressedBufferSize)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
160 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
161 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
162 return compressedBuffer; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
163 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
164 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
165 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
166 cl_DecompressImage(object *self, object *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
167 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
168 int compressionScheme, width, height, originalFormat; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
169 char *compressedBuffer; |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
170 int compressedBufferSize, frameBufferSize; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
171 object *frameBuffer; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
172 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
173 if (!getargs(args, "(iiiis#)", &compressionScheme, &width, &height, |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
174 &originalFormat, &compressedBuffer, |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
175 &compressedBufferSize)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
176 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
177 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
178 frameBufferSize = width * height * CL_BytesPerPixel(originalFormat); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
179 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
180 frameBuffer = newsizedstringobject(NULL, frameBufferSize); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
181 if (frameBuffer == NULL) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
182 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
183 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
184 error_handler_called = 0; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
185 if (clDecompressImage(compressionScheme, width, height, originalFormat, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
186 compressedBufferSize, compressedBuffer, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
187 (void *) getstringvalue(frameBuffer)) == FAILURE) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
188 DECREF(frameBuffer); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
189 if (!error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
190 err_setstr(ClError, "clDecompressImage failed"); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
191 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
192 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
193 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
194 return frameBuffer; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
195 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
196 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
197 /******************************************************************** |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
198 Sequential compression/decompression. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
199 ********************************************************************/ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
200 #define CheckCompressor(self) if ((self)->ob_compressorHdl == NULL) { \ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
201 err_setstr(RuntimeError, "(de)compressor not active"); \ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
202 return NULL; \ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
203 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
204 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
205 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
206 doClose(clobject *self, object *args, int (*close_func)(CL_Handle)) |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
207 { |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
208 CheckCompressor(self); |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
209 |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
210 if (!getnoarg(args)) |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
211 return NULL; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
212 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
213 error_handler_called = 0; |
| 1075 | 214 if ((*close_func)(self->ob_compressorHdl) == FAILURE) { |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
215 if (!error_handler_called) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
216 err_setstr(ClError, "close failed"); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
217 return NULL; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
218 } |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
219 |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
220 self->ob_compressorHdl = NULL; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
221 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
222 if (self->ob_paramtypes) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
223 DEL(self->ob_paramtypes); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
224 self->ob_paramtypes = NULL; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
225 |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
226 INCREF(None); |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
227 return None; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
228 } |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
229 |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
230 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
231 clm_CloseCompressor(object *self, object *args) |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
232 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
233 return doClose(SELF, args, clCloseCompressor); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
234 } |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
235 |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
236 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
237 clm_CloseDecompressor(object *self, object *args) |
| 1075 | 238 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
239 return doClose(SELF, args, clCloseDecompressor); |
| 1075 | 240 } |
| 241 | |
| 242 static object * | |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
243 clm_Compress(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
244 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
245 int numberOfFrames; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
246 int frameBufferSize, compressedBufferSize, size; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
247 char *frameBuffer; |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
248 object *data; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
249 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
250 CheckCompressor(SELF); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
251 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
252 if (!getargs(args, "(is#)", &numberOfFrames, &frameBuffer, &frameBufferSize)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
253 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
254 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
255 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
256 size = clGetParam(SELF->ob_compressorHdl, CL_COMPRESSED_BUFFER_SIZE); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
257 compressedBufferSize = size; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
258 if (error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
259 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
260 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
261 data = newsizedstringobject(NULL, size); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
262 if (data == NULL) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
263 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
264 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
265 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
266 if (clCompress(SELF->ob_compressorHdl, numberOfFrames, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
267 (void *) frameBuffer, &compressedBufferSize, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
268 (void *) getstringvalue(data)) == FAILURE) { |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
269 DECREF(data); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
270 if (!error_handler_called) |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
271 err_setstr(ClError, "compress failed"); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
272 return NULL; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
273 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
274 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
275 if (compressedBufferSize < size) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
276 if (resizestring(&data, compressedBufferSize)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
277 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
278 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
279 if (compressedBufferSize > size) { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
280 /* we didn't get all "compressed" data */ |
| 1075 | 281 DECREF(data); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
282 err_setstr(ClError, "compressed data is more than fitted"); |
| 1075 | 283 return NULL; |
| 284 } | |
| 285 | |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
286 return data; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
287 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
288 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
289 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
290 clm_Decompress(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
291 { |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
292 object *data; |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
293 int numberOfFrames; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
294 char *compressedData; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
295 int compressedDataSize, dataSize; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
296 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
297 CheckCompressor(SELF); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
298 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
299 if (!getargs(args, "(is#)", &numberOfFrames, &compressedData, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
300 &compressedDataSize)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
301 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
302 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
303 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
304 dataSize = clGetParam(SELF->ob_compressorHdl, CL_FRAME_BUFFER_SIZE); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
305 if (error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
306 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
307 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
308 data = newsizedstringobject(NULL, dataSize); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
309 if (data == NULL) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
310 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
311 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
312 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
313 if (clDecompress(SELF->ob_compressorHdl, numberOfFrames, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
314 compressedDataSize, (void *) compressedData, |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
315 (void *) getstringvalue(data)) == FAILURE) { |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
316 DECREF(data); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
317 if (!error_handler_called) |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
318 err_setstr(ClError, "decompress failed"); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
319 return NULL; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
320 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
321 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
322 return data; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
323 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
324 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
325 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
326 doParams(clobject *self, object *args, int (*func)(CL_Handle, int *, int), |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
327 int modified) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
328 { |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
329 object *list, *v; |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
330 int *PVbuffer; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
331 int length; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
332 int i; |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
333 float number; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
334 |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
335 CheckCompressor(self); |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
336 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
337 if (!getargs(args, "O", &list)) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
338 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
339 if (!is_listobject(list)) { |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
340 err_badarg(); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
341 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
342 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
343 length = getlistsize(list); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
344 PVbuffer = NEW(int, length); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
345 if (PVbuffer == NULL) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
346 return err_nomem(); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
347 for (i = 0; i < length; i++) { |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
348 v = getlistitem(list, i); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
349 if (is_floatobject(v)) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
350 number = getfloatvalue(v); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
351 PVbuffer[i] = CL_TypeIsInt(number); |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
352 } else if (is_intobject(v)) { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
353 PVbuffer[i] = getintvalue(v); |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
354 if ((i & 1) && |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
355 param_type_is_float(self, PVbuffer[i-1]) > 0) { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
356 number = PVbuffer[i]; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
357 PVbuffer[i] = CL_TypeIsInt(number); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
358 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
359 } else { |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
360 DEL(PVbuffer); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
361 err_badarg(); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
362 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
363 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
364 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
365 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
366 error_handler_called = 0; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
367 (*func)(self->ob_compressorHdl, PVbuffer, length); |
|
1334
f3848f74b282
* clmodule.c (doParams): free PVbuffer in error condition.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1252
diff
changeset
|
368 if (error_handler_called) { |
|
f3848f74b282
* clmodule.c (doParams): free PVbuffer in error condition.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1252
diff
changeset
|
369 DEL(PVbuffer); |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
370 return NULL; |
|
1334
f3848f74b282
* clmodule.c (doParams): free PVbuffer in error condition.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1252
diff
changeset
|
371 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
372 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
373 if (modified) { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
374 for (i = 0; i < length; i++) { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
375 if ((i & 1) && |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
376 param_type_is_float(self, PVbuffer[i-1]) > 0) { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
377 number = CL_TypeIsFloat(PVbuffer[i]); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
378 v = newfloatobject(number); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
379 } else |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
380 v = newintobject(PVbuffer[i]); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
381 setlistitem(list, i, v); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
382 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
383 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
384 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
385 DEL(PVbuffer); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
386 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
387 INCREF(None); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
388 return None; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
389 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
390 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
391 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
392 clm_GetParams(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
393 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
394 return doParams(SELF, args, clGetParams, 1); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
395 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
396 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
397 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
398 clm_SetParams(object *self, object *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
399 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
400 return doParams(SELF, args, clSetParams, 0); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
401 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
402 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
403 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
404 do_get(clobject *self, object *args, int (*func)(CL_Handle, int)) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
405 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
406 int paramID, value; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
407 float fvalue; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
408 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
409 CheckCompressor(self); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
410 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
411 if (!getargs(args, "i", ¶mID)) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
412 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
413 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
414 error_handler_called = 0; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
415 value = (*func)(self->ob_compressorHdl, paramID); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
416 if (error_handler_called) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
417 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
418 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
419 if (param_type_is_float(self, paramID) > 0) { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
420 fvalue = CL_TypeIsFloat(value); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
421 return newfloatobject(fvalue); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
422 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
423 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
424 return newintobject(value); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
425 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
426 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
427 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
428 clm_GetParam(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
429 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
430 return do_get(SELF, args, clGetParam); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
431 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
432 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
433 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
434 clm_GetDefault(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
435 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
436 return do_get(SELF, args, clGetDefault); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
437 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
438 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
439 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
440 clm_SetParam(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
441 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
442 int paramID, value; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
443 float fvalue; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
444 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
445 CheckCompressor(SELF); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
446 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
447 if (!getargs(args, "(ii)", ¶mID, &value)) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
448 err_clear(); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
449 if (!getargs(args, "(if)", ¶mID, &fvalue)) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
450 err_clear(); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
451 err_setstr(TypeError, "bad argument list (format '(ii)' or '(if)')"); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
452 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
453 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
454 value = CL_TypeIsInt(fvalue); |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
455 } else { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
456 if (param_type_is_float(SELF, paramID) > 0) { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
457 fvalue = value; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
458 value = CL_TypeIsInt(fvalue); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
459 } |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
460 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
461 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
462 error_handler_called = 0; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
463 value = clSetParam(SELF->ob_compressorHdl, paramID, value); |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
464 if (error_handler_called) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
465 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
466 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
467 if (param_type_is_float(SELF, paramID) > 0) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
468 return newfloatobject(CL_TypeIsFloat(value)); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
469 else |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
470 return newintobject(value); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
471 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
472 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
473 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
474 clm_GetParamID(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
475 { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
476 char *name; |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
477 int value; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
478 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
479 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
480 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
481 if (!getargs(args, "s", &name)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
482 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
483 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
484 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
485 value = clGetParamID(SELF->ob_compressorHdl, name); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
486 if (value == FAILURE) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
487 if (!error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
488 err_setstr(ClError, "getparamid failed"); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
489 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
490 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
491 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
492 return newintobject(value); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
493 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
494 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
495 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
496 clm_QueryParams(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
497 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
498 int bufferlength; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
499 int *PVbuffer; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
500 object *list; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
501 int i; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
502 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
503 CheckCompressor(SELF); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
504 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
505 if (!getnoarg(args)) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
506 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
507 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
508 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
509 bufferlength = clQueryParams(SELF->ob_compressorHdl, 0, 0); |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
510 if (error_handler_called) |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
511 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
512 |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
513 PVbuffer = NEW(int, bufferlength); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
514 if (PVbuffer == NULL) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
515 return err_nomem(); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
516 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
517 bufferlength = clQueryParams(SELF->ob_compressorHdl, PVbuffer, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
518 bufferlength); |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
519 if (error_handler_called) { |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
520 DEL(PVbuffer); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
521 return NULL; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
522 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
523 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
524 list = newlistobject(bufferlength); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
525 if (list == NULL) { |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
526 DEL(PVbuffer); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
527 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
528 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
529 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
530 for (i = 0; i < bufferlength; i++) { |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
531 if (i & 1) |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
532 setlistitem(list, i, newintobject(PVbuffer[i])); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
533 else if (PVbuffer[i] == 0) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
534 INCREF(None); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
535 setlistitem(list, i, None); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
536 } else |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
537 setlistitem(list, i, newstringobject((char *) PVbuffer[i])); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
538 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
539 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
540 DEL(PVbuffer); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
541 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
542 return list; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
543 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
544 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
545 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
546 clm_GetMinMax(object *self, object *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
547 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
548 int param, min, max; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
549 float fmin, fmax; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
550 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
551 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
552 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
553 if (!getargs(args, "i", ¶m)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
554 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
555 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
556 clGetMinMax(SELF->ob_compressorHdl, param, &min, &max); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
557 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
558 if (param_type_is_float(SELF, param) > 0) { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
559 fmin = CL_TypeIsFloat(min); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
560 fmax = CL_TypeIsFloat(max); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
561 return mkvalue("(ff)", fmin, fmax); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
562 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
563 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
564 return mkvalue("(ii)", min, max); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
565 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
566 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
567 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
568 clm_GetName(object *self, object *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
569 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
570 int param; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
571 char *name; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
572 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
573 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
574 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
575 if (!getargs(args, "i", ¶m)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
576 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
577 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
578 error_handler_called = 0; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
579 name = clGetName(SELF->ob_compressorHdl, param); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
580 if (name == NULL || error_handler_called) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
581 if (!error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
582 err_setstr(ClError, "getname failed"); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
583 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
584 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
585 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
586 return newstringobject(name); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
587 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
588 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
589 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
590 clm_QuerySchemeFromHandle(object *self, object *args) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
591 { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
592 CheckCompressor(SELF); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
593 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
594 if (!getnoarg(args)) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
595 return NULL; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
596 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
597 return newintobject(clQuerySchemeFromHandle(SELF->ob_compressorHdl)); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
598 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
599 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
600 static object * |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
601 clm_ReadHeader(object *self, object *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
602 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
603 char *header; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
604 int headerSize; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
605 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
606 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
607 |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
608 if (!getargs(args, "s#", &header, &headerSize)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
609 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
610 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
611 return newintobject(clReadHeader(SELF->ob_compressorHdl, |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
612 headerSize, header)); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
613 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
614 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
615 static struct methodlist compressor_methods[] = { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
616 {"close", clm_CloseCompressor}, /* alias */ |
| 1075 | 617 {"CloseCompressor", clm_CloseCompressor}, |
| 618 {"Compress", clm_Compress}, | |
| 619 {"GetDefault", clm_GetDefault}, | |
| 620 {"GetMinMax", clm_GetMinMax}, | |
| 621 {"GetName", clm_GetName}, | |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
622 {"GetParam", clm_GetParam}, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
623 {"GetParamID", clm_GetParamID}, |
| 1075 | 624 {"GetParams", clm_GetParams}, |
| 625 {"QueryParams", clm_QueryParams}, | |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
626 {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle}, |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
627 {"SetParam", clm_SetParam}, |
| 1075 | 628 {"SetParams", clm_SetParams}, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
629 {NULL, NULL} /* sentinel */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
630 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
631 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
632 static struct methodlist decompressor_methods[] = { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
633 {"close", clm_CloseDecompressor}, /* alias */ |
| 1075 | 634 {"CloseDecompressor", clm_CloseDecompressor}, |
| 635 {"Decompress", clm_Decompress}, | |
| 636 {"GetDefault", clm_GetDefault}, | |
| 637 {"GetMinMax", clm_GetMinMax}, | |
| 638 {"GetName", clm_GetName}, | |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
639 {"GetParam", clm_GetParam}, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
640 {"GetParamID", clm_GetParamID}, |
| 1075 | 641 {"GetParams", clm_GetParams}, |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
642 {"ReadHeader", clm_ReadHeader}, |
| 1075 | 643 {"QueryParams", clm_QueryParams}, |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
644 {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle}, |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
645 {"SetParam", clm_SetParam}, |
| 1075 | 646 {"SetParams", clm_SetParams}, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
647 {NULL, NULL} /* sentinel */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
648 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
649 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
650 static void |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
651 cl_dealloc(object *self) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
652 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
653 if (SELF->ob_compressorHdl) { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
654 if (SELF->ob_isCompressor) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
655 clCloseCompressor(SELF->ob_compressorHdl); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
656 else |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
657 clCloseDecompressor(SELF->ob_compressorHdl); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
658 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
659 DEL(self); |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
660 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
661 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
662 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
663 cl_getattr(object *self, char *name) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
664 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
665 if (SELF->ob_isCompressor) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
666 return findmethod(compressor_methods, self, name); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
667 else |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
668 return findmethod(decompressor_methods, self, name); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
669 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
670 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
671 static typeobject Cltype = { |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
672 OB_HEAD_INIT(&Typetype) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
673 0, /*ob_size*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
674 "cl", /*tp_name*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
675 sizeof(clobject), /*tp_size*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
676 0, /*tp_itemsize*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
677 /* methods */ |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1334
diff
changeset
|
678 (destructor)cl_dealloc, /*tp_dealloc*/ |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
679 0, /*tp_print*/ |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1334
diff
changeset
|
680 (getattrfunc)cl_getattr, /*tp_getattr*/ |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
681 0, /*tp_setattr*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
682 0, /*tp_compare*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
683 0, /*tp_repr*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
684 0, /*tp_as_number*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
685 0, /*tp_as_sequence*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
686 0, /*tp_as_mapping*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
687 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
688 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
689 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
690 doOpen(object *self, object *args, int (*open_func)(int, CL_Handle *), |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
691 int iscompressor) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
692 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
693 int scheme; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
694 clobject *new; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
695 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
696 if (!getargs(args, "i", &scheme)) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
697 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
698 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
699 new = NEWOBJ(clobject, &Cltype); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
700 if (new == NULL) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
701 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
702 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
703 new->ob_compressorHdl = NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
704 new->ob_isCompressor = iscompressor; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
705 new->ob_paramtypes = NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
706 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
707 error_handler_called = 0; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
708 if ((*open_func)(scheme, &new->ob_compressorHdl) == FAILURE) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
709 DECREF(new); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
710 if (!error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
711 err_setstr(ClError, "Open(De)Compressor failed"); |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
712 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
713 } |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1334
diff
changeset
|
714 return (object *)new; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
715 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
716 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
717 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
718 cl_OpenCompressor(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
719 { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
720 return doOpen(self, args, clOpenCompressor, 1); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
721 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
722 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
723 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
724 cl_OpenDecompressor(object *self, object *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
725 { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
726 return doOpen(self, args, clOpenDecompressor, 0); |
| 1075 | 727 } |
| 728 | |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
729 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
730 cl_QueryScheme(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
731 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
732 char *header; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
733 int headerlen; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
734 int scheme; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
735 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
736 if (!getargs(args, "s#", &header, &headerlen)) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
737 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
738 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
739 scheme = clQueryScheme(header); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
740 if (scheme < 0) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
741 err_setstr(ClError, "unknown compression scheme"); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
742 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
743 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
744 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
745 return newintobject(scheme); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
746 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
747 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
748 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
749 cl_QueryMaxHeaderSize(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
750 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
751 int scheme; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
752 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
753 if (!getargs(args, "i", &scheme)) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
754 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
755 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
756 return newintobject(clQueryMaxHeaderSize(scheme)); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
757 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
758 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
759 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
760 cl_QueryAlgorithms(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
761 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
762 int algorithmMediaType; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
763 int bufferlength; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
764 int *PVbuffer; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
765 object *list; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
766 int i; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
767 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
768 if (!getargs(args, "i", &algorithmMediaType)) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
769 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
770 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
771 error_handler_called = 0; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
772 bufferlength = clQueryAlgorithms(algorithmMediaType, 0, 0); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
773 if (error_handler_called) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
774 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
775 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
776 PVbuffer = NEW(int, bufferlength); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
777 if (PVbuffer == NULL) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
778 return err_nomem(); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
779 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
780 bufferlength = clQueryAlgorithms(algorithmMediaType, PVbuffer, |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
781 bufferlength); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
782 if (error_handler_called) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
783 DEL(PVbuffer); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
784 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
785 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
786 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
787 list = newlistobject(bufferlength); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
788 if (list == NULL) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
789 DEL(PVbuffer); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
790 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
791 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
792 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
793 for (i = 0; i < bufferlength; i++) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
794 if (i & 1) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
795 setlistitem(list, i, newintobject(PVbuffer[i])); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
796 else if (PVbuffer[i] == 0) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
797 INCREF(None); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
798 setlistitem(list, i, None); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
799 } else |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
800 setlistitem(list, i, newstringobject((char *) PVbuffer[i])); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
801 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
802 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
803 DEL(PVbuffer); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
804 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
805 return list; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
806 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
807 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
808 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
809 cl_QuerySchemeFromName(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
810 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
811 int algorithmMediaType; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
812 char *name; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
813 int scheme; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
814 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
815 if (!getargs(args, "(is)", &algorithmMediaType, &name)) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
816 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
817 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
818 error_handler_called = 0; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
819 scheme = clQuerySchemeFromName(algorithmMediaType, name); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
820 if (error_handler_called) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
821 err_setstr(ClError, "unknown compression scheme"); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
822 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
823 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
824 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
825 return newintobject(scheme); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
826 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
827 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
828 static object * |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
829 cl_GetAlgorithmName(object *self, object *args) |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
830 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
831 int scheme; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
832 char *name; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
833 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
834 if (!getargs(args, "i", &scheme)) |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
835 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
836 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
837 name = clGetAlgorithmName(scheme); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
838 if (name == 0) { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
839 err_setstr(ClError, "unknown compression scheme"); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
840 return NULL; |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
841 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
842 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
843 return newstringobject(name); |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
844 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
845 |
|
1222
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
846 static object * |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
847 do_set(object *self, object *args, int (*func)(int, int, int)) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
848 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
849 int scheme, paramID, value; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
850 float fvalue; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
851 int is_float = 0; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
852 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
853 if (!getargs(args, "(iii)", &scheme, ¶mID, &value)) { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
854 err_clear(); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
855 if (!getargs(args, "(iif)", &scheme, ¶mID, &fvalue)) { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
856 err_clear(); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
857 err_setstr(TypeError, "bad argument list (format '(iii)' or '(iif)')"); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
858 return NULL; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
859 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
860 value = CL_TypeIsInt(fvalue); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
861 is_float = 1; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
862 } else { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
863 /* check some parameters which we know to be floats */ |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
864 switch (scheme) { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
865 case CL_COMPRESSION_RATIO: |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
866 case CL_SPEED: |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
867 fvalue = value; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
868 value = CL_TypeIsInt(fvalue); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
869 is_float = 1; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
870 break; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
871 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
872 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
873 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
874 error_handler_called = 0; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
875 value = (*func)(scheme, paramID, value); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
876 if (error_handler_called) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
877 return NULL; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
878 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
879 if (is_float) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
880 return newfloatobject(CL_TypeIsFloat(value)); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
881 else |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
882 return newintobject(value); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
883 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
884 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
885 static object * |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
886 cl_SetDefault(object *self, object *args) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
887 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
888 return do_set(self, args, clSetDefault); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
889 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
890 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
891 static object * |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
892 cl_SetMin(object *self, object *args) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
893 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
894 return do_set(self, args, clSetMin); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
895 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
896 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
897 static object * |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
898 cl_SetMax(object *self, object *args) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
899 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
900 return do_set(self, args, clSetMax); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
901 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
902 |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
903 #define func(name, type) \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
904 static object *cl_##name(object *self, object *args) \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
905 { \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
906 int x; \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
907 if (!getargs(args, "i", &x)) return NULL; \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
908 return new##type##object(CL_##name(x)); \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
909 } |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
910 |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
911 #define func2(name, type) \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
912 static object *cl_##name(object *self, object *args) \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
913 { \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
914 int a1, a2; \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
915 if (!getargs(args, "(ii)", &a1, &a2)) return NULL; \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
916 return new##type##object(CL_##name(a1, a2)); \ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
917 } |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
918 |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
919 func(BytesPerSample,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
920 func(BytesPerPixel,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
921 func(AudioFormatName,string) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
922 func(VideoFormatName,string) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
923 func(AlgorithmNumber,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
924 func(AlgorithmType,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
925 func2(Algorithm,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
926 func(ParamNumber,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
927 func(ParamType,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
928 func2(ParamID,int) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
929 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
930 #ifdef CLDEBUG |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
931 static object * |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
932 cvt_type(object *self, object *args) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
933 { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
934 int number; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
935 float fnumber; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
936 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
937 if (getargs(args, "i", &number)) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
938 return newfloatobject(CL_TypeIsFloat(number)); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
939 else { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
940 err_clear(); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
941 if (getargs(args, "f", &fnumber)) |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
942 return newintobject(CL_TypeIsInt(fnumber)); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
943 return NULL; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
944 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
945 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
946 #endif |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
947 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
948 static struct methodlist cl_methods[] = { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
949 {"CompressImage", cl_CompressImage}, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
950 {"DecompressImage", cl_DecompressImage}, |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
951 {"GetAlgorithmName", cl_GetAlgorithmName}, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
952 {"OpenCompressor", cl_OpenCompressor}, |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
953 {"OpenDecompressor", cl_OpenDecompressor}, |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
954 {"QueryAlgorithms", cl_QueryAlgorithms}, |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
955 {"QueryMaxHeaderSize", cl_QueryMaxHeaderSize}, |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
956 {"QueryScheme", cl_QueryScheme}, |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
957 {"QuerySchemeFromName", cl_QuerySchemeFromName}, |
|
1222
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
958 {"SetDefault", cl_SetDefault}, |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
959 {"SetMax", cl_SetMax}, |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
960 {"SetMin", cl_SetMin}, |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
961 {"BytesPerSample", cl_BytesPerSample}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
962 {"BytesPerPixel", cl_BytesPerPixel}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
963 {"AudioFormatName", cl_AudioFormatName}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
964 {"VideoFormatName", cl_VideoFormatName}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
965 {"AlgorithmNumber", cl_AlgorithmNumber}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
966 {"AlgorithmType", cl_AlgorithmType}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
967 {"Algorithm", cl_Algorithm}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
968 {"ParamNumber", cl_ParamNumber}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
969 {"ParamType", cl_ParamType}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
970 {"ParamID", cl_ParamID}, |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
971 #ifdef CLDEBUG |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
972 {"cvt_type", cvt_type}, |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
973 #endif |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
974 {NULL, NULL} /* Sentinel */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
975 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
976 |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
977 #ifdef CL_JPEG_SOFTWARE |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
978 #define IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
979 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
980 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
981 void |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
982 initcl() |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
983 { |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
984 object *m, *d; |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
985 |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
986 m = initmodule("cl", cl_methods); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
987 d = getmoduledict(m); |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
988 |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
989 ClError = newstringobject("cl.error"); |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
990 (void) dictinsert(d, "error", ClError); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
991 |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
992 (void) dictinsert(d, "MAX_NUMBER_OF_ORIGINAL_FORMATS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
993 newintobject(CL_MAX_NUMBER_OF_ORIGINAL_FORMATS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
994 (void) dictinsert(d, "MONO", newintobject(CL_MONO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
995 (void) dictinsert(d, "STEREO_INTERLEAVED", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
996 newintobject(CL_STEREO_INTERLEAVED)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
997 (void) dictinsert(d, "RGB", newintobject(CL_RGB)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
998 (void) dictinsert(d, "RGBX", newintobject(CL_RGBX)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
999 (void) dictinsert(d, "RGBA", newintobject(CL_RGBA)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1000 (void) dictinsert(d, "RGB332", newintobject(CL_RGB332)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1001 (void) dictinsert(d, "GRAYSCALE", newintobject(CL_GRAYSCALE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1002 (void) dictinsert(d, "Y", newintobject(CL_Y)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1003 (void) dictinsert(d, "YUV", newintobject(CL_YUV)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1004 (void) dictinsert(d, "YCbCr", newintobject(CL_YCbCr)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1005 (void) dictinsert(d, "YUV422", newintobject(CL_YUV422)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1006 (void) dictinsert(d, "YCbCr422", newintobject(CL_YCbCr422)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1007 (void) dictinsert(d, "YUV422HC", newintobject(CL_YUV422HC)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1008 (void) dictinsert(d, "YCbCr422HC", newintobject(CL_YCbCr422HC)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1009 (void) dictinsert(d, "YUV422DC", newintobject(CL_YUV422DC)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1010 (void) dictinsert(d, "YCbCr422DC", newintobject(CL_YCbCr422DC)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1011 (void) dictinsert(d, "RGB8", newintobject(CL_RGB8)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1012 (void) dictinsert(d, "BEST_FIT", newintobject(CL_BEST_FIT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1013 (void) dictinsert(d, "MAX_NUMBER_OF_AUDIO_ALGORITHMS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1014 newintobject(CL_MAX_NUMBER_OF_AUDIO_ALGORITHMS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1015 (void) dictinsert(d, "MAX_NUMBER_OF_VIDEO_ALGORITHMS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1016 newintobject(CL_MAX_NUMBER_OF_VIDEO_ALGORITHMS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1017 (void) dictinsert(d, "AUDIO", newintobject(CL_AUDIO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1018 (void) dictinsert(d, "VIDEO", newintobject(CL_VIDEO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1019 (void) dictinsert(d, "UNKNOWN_SCHEME", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1020 newintobject(CL_UNKNOWN_SCHEME)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1021 (void) dictinsert(d, "UNCOMPRESSED_AUDIO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1022 newintobject(CL_UNCOMPRESSED_AUDIO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1023 (void) dictinsert(d, "G711_ULAW", newintobject(CL_G711_ULAW)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1024 (void) dictinsert(d, "ULAW", newintobject(CL_ULAW)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1025 (void) dictinsert(d, "G711_ALAW", newintobject(CL_G711_ALAW)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1026 (void) dictinsert(d, "ALAW", newintobject(CL_ALAW)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1027 (void) dictinsert(d, "AWARE_MPEG_AUDIO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1028 newintobject(CL_AWARE_MPEG_AUDIO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1029 (void) dictinsert(d, "AWARE_MULTIRATE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1030 newintobject(CL_AWARE_MULTIRATE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1031 (void) dictinsert(d, "UNCOMPRESSED", newintobject(CL_UNCOMPRESSED)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1032 (void) dictinsert(d, "UNCOMPRESSED_VIDEO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1033 newintobject(CL_UNCOMPRESSED_VIDEO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1034 (void) dictinsert(d, "RLE", newintobject(CL_RLE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1035 (void) dictinsert(d, "JPEG", newintobject(CL_JPEG)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1036 #ifdef IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1037 (void) dictinsert(d, "JPEG_SOFTWARE", newintobject(CL_JPEG_SOFTWARE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1038 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1039 (void) dictinsert(d, "MPEG_VIDEO", newintobject(CL_MPEG_VIDEO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1040 (void) dictinsert(d, "MVC1", newintobject(CL_MVC1)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1041 (void) dictinsert(d, "RTR", newintobject(CL_RTR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1042 (void) dictinsert(d, "RTR1", newintobject(CL_RTR1)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1043 (void) dictinsert(d, "HDCC", newintobject(CL_HDCC)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1044 (void) dictinsert(d, "MVC2", newintobject(CL_MVC2)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1045 (void) dictinsert(d, "RLE24", newintobject(CL_RLE24)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1046 (void) dictinsert(d, "MAX_NUMBER_OF_PARAMS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1047 newintobject(CL_MAX_NUMBER_OF_PARAMS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1048 (void) dictinsert(d, "IMAGE_WIDTH", newintobject(CL_IMAGE_WIDTH)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1049 (void) dictinsert(d, "IMAGE_HEIGHT", newintobject(CL_IMAGE_HEIGHT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1050 (void) dictinsert(d, "ORIGINAL_FORMAT", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1051 newintobject(CL_ORIGINAL_FORMAT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1052 (void) dictinsert(d, "INTERNAL_FORMAT", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1053 newintobject(CL_INTERNAL_FORMAT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1054 (void) dictinsert(d, "COMPONENTS", newintobject(CL_COMPONENTS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1055 (void) dictinsert(d, "BITS_PER_COMPONENT", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1056 newintobject(CL_BITS_PER_COMPONENT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1057 (void) dictinsert(d, "FRAME_RATE", newintobject(CL_FRAME_RATE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1058 (void) dictinsert(d, "COMPRESSION_RATIO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1059 newintobject(CL_COMPRESSION_RATIO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1060 (void) dictinsert(d, "EXACT_COMPRESSION_RATIO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1061 newintobject(CL_EXACT_COMPRESSION_RATIO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1062 (void) dictinsert(d, "FRAME_BUFFER_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1063 newintobject(CL_FRAME_BUFFER_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1064 (void) dictinsert(d, "COMPRESSED_BUFFER_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1065 newintobject(CL_COMPRESSED_BUFFER_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1066 (void) dictinsert(d, "BLOCK_SIZE", newintobject(CL_BLOCK_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1067 (void) dictinsert(d, "PREROLL", newintobject(CL_PREROLL)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1068 (void) dictinsert(d, "FRAME_TYPE", newintobject(CL_FRAME_TYPE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1069 (void) dictinsert(d, "ALGORITHM_ID", newintobject(CL_ALGORITHM_ID)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1070 (void) dictinsert(d, "ALGORITHM_VERSION", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1071 newintobject(CL_ALGORITHM_VERSION)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1072 (void) dictinsert(d, "ORIENTATION", newintobject(CL_ORIENTATION)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1073 (void) dictinsert(d, "NUMBER_OF_FRAMES", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1074 newintobject(CL_NUMBER_OF_FRAMES)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1075 (void) dictinsert(d, "SPEED", newintobject(CL_SPEED)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1076 (void) dictinsert(d, "LAST_FRAME_INDEX", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1077 newintobject(CL_LAST_FRAME_INDEX)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1078 #ifdef IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1079 (void) dictinsert(d, "ENABLE_IMAGEINFO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1080 newintobject(CL_ENABLE_IMAGEINFO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1081 (void) dictinsert(d, "INTERNAL_IMAGE_WIDTH", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1082 newintobject(CL_INTERNAL_IMAGE_WIDTH)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1083 (void) dictinsert(d, "INTERNAL_IMAGE_HEIGHT", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1084 newintobject(CL_INTERNAL_IMAGE_HEIGHT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1085 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1086 (void) dictinsert(d, "NUMBER_OF_PARAMS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1087 newintobject(CL_NUMBER_OF_PARAMS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1088 #ifdef IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1089 (void) dictinsert(d, "MVC2_LUMA_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1090 newintobject(CL_MVC2_LUMA_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1091 (void) dictinsert(d, "MVC2_CHROMA_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1092 newintobject(CL_MVC2_CHROMA_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1093 (void) dictinsert(d, "MVC2_EDGE_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1094 newintobject(CL_MVC2_EDGE_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1095 (void) dictinsert(d, "MVC2_BLENDING", newintobject(CL_MVC2_BLENDING)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1096 (void) dictinsert(d, "MVC2_BLENDING_OFF", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1097 newintobject(CL_MVC2_BLENDING_OFF)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1098 (void) dictinsert(d, "MVC2_BLENDING_ON", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1099 newintobject(CL_MVC2_BLENDING_ON)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1100 (void) dictinsert(d, "JPEG_QUALITY_FACTOR", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1101 newintobject(CL_JPEG_QUALITY_FACTOR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1102 (void) dictinsert(d, "JPEG_STREAM_HEADERS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1103 newintobject(CL_JPEG_STREAM_HEADERS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1104 (void) dictinsert(d, "JPEG_QUANTIZATION_TABLES", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1105 newintobject(CL_JPEG_QUANTIZATION_TABLES)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1106 (void) dictinsert(d, "JPEG_NUM_PARAMS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1107 newintobject(CL_JPEG_NUM_PARAMS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1108 (void) dictinsert(d, "RTR_QUALITY_LEVEL", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1109 newintobject(CL_RTR_QUALITY_LEVEL)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1110 (void) dictinsert(d, "HDCC_TILE_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1111 newintobject(CL_HDCC_TILE_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1112 (void) dictinsert(d, "HDCC_SAMPLES_PER_TILE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1113 newintobject(CL_HDCC_SAMPLES_PER_TILE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1114 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1115 (void) dictinsert(d, "END_OF_SEQUENCE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1116 newintobject(CL_END_OF_SEQUENCE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1117 (void) dictinsert(d, "CHANNEL_POLICY", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1118 newintobject(CL_CHANNEL_POLICY)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1119 (void) dictinsert(d, "NOISE_MARGIN", newintobject(CL_NOISE_MARGIN)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1120 (void) dictinsert(d, "BITRATE_POLICY", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1121 newintobject(CL_BITRATE_POLICY)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1122 (void) dictinsert(d, "BITRATE_TARGET", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1123 newintobject(CL_BITRATE_TARGET)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1124 (void) dictinsert(d, "LAYER", newintobject(CL_LAYER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1125 (void) dictinsert(d, "ENUM_VALUE", newintobject(CL_ENUM_VALUE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1126 (void) dictinsert(d, "RANGE_VALUE", newintobject(CL_RANGE_VALUE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1127 (void) dictinsert(d, "FLOATING_ENUM_VALUE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1128 newintobject(CL_FLOATING_ENUM_VALUE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1129 (void) dictinsert(d, "FLOATING_RANGE_VALUE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1130 newintobject(CL_FLOATING_RANGE_VALUE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1131 (void) dictinsert(d, "DECOMPRESSOR", newintobject(CL_DECOMPRESSOR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1132 (void) dictinsert(d, "COMPRESSOR", newintobject(CL_COMPRESSOR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1133 (void) dictinsert(d, "CODEC", newintobject(CL_CODEC)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1134 (void) dictinsert(d, "NONE", newintobject(CL_NONE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1135 #ifdef IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1136 (void) dictinsert(d, "BUF_FRAME", newintobject(CL_BUF_FRAME)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1137 (void) dictinsert(d, "BUF_DATA", newintobject(CL_BUF_DATA)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1138 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1139 #ifdef CL_FRAME |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1140 (void) dictinsert(d, "FRAME", newintobject(CL_FRAME)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1141 (void) dictinsert(d, "DATA", newintobject(CL_DATA)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1142 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1143 (void) dictinsert(d, "NONE", newintobject(CL_NONE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1144 (void) dictinsert(d, "KEYFRAME", newintobject(CL_KEYFRAME)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1145 (void) dictinsert(d, "INTRA", newintobject(CL_INTRA)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1146 (void) dictinsert(d, "PREDICTED", newintobject(CL_PREDICTED)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1147 (void) dictinsert(d, "BIDIRECTIONAL", newintobject(CL_BIDIRECTIONAL)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1148 (void) dictinsert(d, "TOP_DOWN", newintobject(CL_TOP_DOWN)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1149 (void) dictinsert(d, "BOTTOM_UP", newintobject(CL_BOTTOM_UP)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1150 #ifdef IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1151 (void) dictinsert(d, "CONTINUOUS_BLOCK", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1152 newintobject(CL_CONTINUOUS_BLOCK)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1153 (void) dictinsert(d, "CONTINUOUS_NONBLOCK", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1154 newintobject(CL_CONTINUOUS_NONBLOCK)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1155 (void) dictinsert(d, "EXTERNAL_DEVICE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1156 newintobject((long)CL_EXTERNAL_DEVICE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1157 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1158 (void) dictinsert(d, "AWCMP_STEREO", newintobject(AWCMP_STEREO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1159 (void) dictinsert(d, "AWCMP_JOINT_STEREO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1160 newintobject(AWCMP_JOINT_STEREO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1161 (void) dictinsert(d, "AWCMP_INDEPENDENT", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1162 newintobject(AWCMP_INDEPENDENT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1163 (void) dictinsert(d, "AWCMP_FIXED_RATE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1164 newintobject(AWCMP_FIXED_RATE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1165 (void) dictinsert(d, "AWCMP_CONST_QUAL", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1166 newintobject(AWCMP_CONST_QUAL)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1167 (void) dictinsert(d, "AWCMP_LOSSLESS", newintobject(AWCMP_LOSSLESS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1168 (void) dictinsert(d, "AWCMP_MPEG_LAYER_I", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1169 newintobject(AWCMP_MPEG_LAYER_I)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1170 (void) dictinsert(d, "AWCMP_MPEG_LAYER_II", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1171 newintobject(AWCMP_MPEG_LAYER_II)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1172 (void) dictinsert(d, "HEADER_START_CODE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1173 newintobject(CL_HEADER_START_CODE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1174 (void) dictinsert(d, "BAD_NO_BUFFERSPACE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1175 newintobject(CL_BAD_NO_BUFFERSPACE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1176 (void) dictinsert(d, "BAD_PVBUFFER", newintobject(CL_BAD_PVBUFFER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1177 (void) dictinsert(d, "BAD_BUFFERLENGTH_NEG", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1178 newintobject(CL_BAD_BUFFERLENGTH_NEG)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1179 (void) dictinsert(d, "BAD_BUFFERLENGTH_ODD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1180 newintobject(CL_BAD_BUFFERLENGTH_ODD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1181 (void) dictinsert(d, "BAD_PARAM", newintobject(CL_BAD_PARAM)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1182 (void) dictinsert(d, "BAD_COMPRESSION_SCHEME", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1183 newintobject(CL_BAD_COMPRESSION_SCHEME)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1184 (void) dictinsert(d, "BAD_COMPRESSOR_HANDLE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1185 newintobject(CL_BAD_COMPRESSOR_HANDLE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1186 (void) dictinsert(d, "BAD_COMPRESSOR_HANDLE_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1187 newintobject(CL_BAD_COMPRESSOR_HANDLE_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1188 (void) dictinsert(d, "BAD_BUFFER_HANDLE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1189 newintobject(CL_BAD_BUFFER_HANDLE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1190 (void) dictinsert(d, "BAD_BUFFER_QUERY_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1191 newintobject(CL_BAD_BUFFER_QUERY_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1192 (void) dictinsert(d, "JPEG_ERROR", newintobject(CL_JPEG_ERROR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1193 (void) dictinsert(d, "BAD_FRAME_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1194 newintobject(CL_BAD_FRAME_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1195 (void) dictinsert(d, "PARAM_OUT_OF_RANGE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1196 newintobject(CL_PARAM_OUT_OF_RANGE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1197 (void) dictinsert(d, "ADDED_ALGORITHM_ERROR", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1198 newintobject(CL_ADDED_ALGORITHM_ERROR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1199 (void) dictinsert(d, "BAD_ALGORITHM_TYPE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1200 newintobject(CL_BAD_ALGORITHM_TYPE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1201 (void) dictinsert(d, "BAD_ALGORITHM_NAME", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1202 newintobject(CL_BAD_ALGORITHM_NAME)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1203 (void) dictinsert(d, "BAD_BUFFERING", newintobject(CL_BAD_BUFFERING)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1204 (void) dictinsert(d, "BUFFER_NOT_CREATED", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1205 newintobject(CL_BUFFER_NOT_CREATED)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1206 (void) dictinsert(d, "BAD_BUFFER_EXISTS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1207 newintobject(CL_BAD_BUFFER_EXISTS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1208 (void) dictinsert(d, "BAD_INTERNAL_FORMAT", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1209 newintobject(CL_BAD_INTERNAL_FORMAT)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1210 (void) dictinsert(d, "BAD_BUFFER_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1211 newintobject(CL_BAD_BUFFER_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1212 (void) dictinsert(d, "FRAME_BUFFER_SIZE_ZERO", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1213 newintobject(CL_FRAME_BUFFER_SIZE_ZERO)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1214 (void) dictinsert(d, "BAD_STREAM_HEADER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1215 newintobject(CL_BAD_STREAM_HEADER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1216 (void) dictinsert(d, "BAD_LICENSE", newintobject(CL_BAD_LICENSE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1217 (void) dictinsert(d, "AWARE_ERROR", newintobject(CL_AWARE_ERROR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1218 (void) dictinsert(d, "BAD_BUFFER_SIZE_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1219 newintobject(CL_BAD_BUFFER_SIZE_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1220 (void) dictinsert(d, "BAD_BUFFER_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1221 newintobject(CL_BAD_BUFFER_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1222 (void) dictinsert(d, "BAD_BUFFER_TYPE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1223 newintobject(CL_BAD_BUFFER_TYPE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1224 (void) dictinsert(d, "BAD_HEADER_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1225 newintobject(CL_BAD_HEADER_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1226 (void) dictinsert(d, "BAD_FUNCTION_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1227 newintobject(CL_BAD_FUNCTION_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1228 (void) dictinsert(d, "BAD_SCHEME_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1229 newintobject(CL_BAD_SCHEME_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1230 (void) dictinsert(d, "BAD_STRING_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1231 newintobject(CL_BAD_STRING_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1232 (void) dictinsert(d, "BAD_MIN_GT_MAX", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1233 newintobject(CL_BAD_MIN_GT_MAX)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1234 (void) dictinsert(d, "BAD_INITIAL_VALUE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1235 newintobject(CL_BAD_INITIAL_VALUE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1236 (void) dictinsert(d, "BAD_PARAM_ID_POINTER", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1237 newintobject(CL_BAD_PARAM_ID_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1238 (void) dictinsert(d, "BAD_PARAM_TYPE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1239 newintobject(CL_BAD_PARAM_TYPE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1240 (void) dictinsert(d, "BAD_TEXT_STRING_PTR", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1241 newintobject(CL_BAD_TEXT_STRING_PTR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1242 (void) dictinsert(d, "BAD_FUNCTIONALITY", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1243 newintobject(CL_BAD_FUNCTIONALITY)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1244 (void) dictinsert(d, "BAD_NUMBER_OF_BLOCKS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1245 newintobject(CL_BAD_NUMBER_OF_BLOCKS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1246 (void) dictinsert(d, "BAD_BLOCK_SIZE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1247 newintobject(CL_BAD_BLOCK_SIZE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1248 (void) dictinsert(d, "BAD_POINTER", newintobject(CL_BAD_POINTER)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1249 (void) dictinsert(d, "BAD_BOARD", newintobject(CL_BAD_BOARD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1250 (void) dictinsert(d, "MVC2_ERROR", newintobject(CL_MVC2_ERROR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1251 #ifdef IRIX_5_3_LIBRARY |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1252 (void) dictinsert(d, "NEXT_NOT_AVAILABLE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1253 newintobject(CL_NEXT_NOT_AVAILABLE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1254 (void) dictinsert(d, "SCHEME_BUSY", newintobject(CL_SCHEME_BUSY)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1255 (void) dictinsert(d, "SCHEME_NOT_AVAILABLE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1256 newintobject(CL_SCHEME_NOT_AVAILABLE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1257 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1258 #ifdef CL_LUMA_THRESHOLD |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1259 /* backward compatibility */ |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1260 (void) dictinsert(d, "LUMA_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1261 newintobject(CL_LUMA_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1262 (void) dictinsert(d, "CHROMA_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1263 newintobject(CL_CHROMA_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1264 (void) dictinsert(d, "EDGE_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1265 newintobject(CL_EDGE_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1266 (void) dictinsert(d, "BLENDING", newintobject(CL_BLENDING)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1267 (void) dictinsert(d, "QUALITY_FACTOR", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1268 newintobject(CL_QUALITY_FACTOR)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1269 (void) dictinsert(d, "STREAM_HEADERS", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1270 newintobject(CL_STREAM_HEADERS)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1271 (void) dictinsert(d, "QUALITY_LEVEL", newintobject(CL_QUALITY_LEVEL)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1272 (void) dictinsert(d, "TILE_THRESHOLD", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1273 newintobject(CL_TILE_THRESHOLD)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1274 (void) dictinsert(d, "SAMPLES_PER_TILE", |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1275 newintobject(CL_SAMPLES_PER_TILE)); |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1276 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1277 |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1278 if (err_occurred()) |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1279 fatal("can't initialize module cl"); |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
1280 |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
1281 (void) clSetErrorHandler(cl_ErrorHandler); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
1282 } |
