OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <string.h> | 6 #include <string.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 uint8_t** output, unsigned int* output_length) { | 1291 uint8_t** output, unsigned int* output_length) { |
1292 ASSERT(input != NULL); | 1292 ASSERT(input != NULL); |
1293 ASSERT(input_len > 0); | 1293 ASSERT(input_len > 0); |
1294 ASSERT(output != NULL); | 1294 ASSERT(output != NULL); |
1295 ASSERT(output_length != NULL); | 1295 ASSERT(output_length != NULL); |
1296 | 1296 |
1297 // Initialize output. | 1297 // Initialize output. |
1298 *output = NULL; | 1298 *output = NULL; |
1299 *output_length = 0; | 1299 *output_length = 0; |
1300 | 1300 |
1301 const intptr_t kChunkSize = 256 * 1024; | 1301 const unsigned int kChunkSize = 256 * 1024; |
1302 uint8_t chunk_out[kChunkSize]; | 1302 uint8_t chunk_out[kChunkSize]; |
1303 z_stream strm; | 1303 z_stream strm; |
1304 strm.zalloc = Z_NULL; | 1304 strm.zalloc = Z_NULL; |
1305 strm.zfree = Z_NULL; | 1305 strm.zfree = Z_NULL; |
1306 strm.opaque = Z_NULL; | 1306 strm.opaque = Z_NULL; |
1307 strm.avail_in = 0; | 1307 strm.avail_in = 0; |
1308 strm.next_in = 0; | 1308 strm.next_in = 0; |
1309 int ret = inflateInit2(&strm, 32 + MAX_WBITS); | 1309 int ret = inflateInit2(&strm, 32 + MAX_WBITS); |
1310 ASSERT(ret == Z_OK); | 1310 ASSERT(ret == Z_OK); |
1311 | 1311 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 Platform::Exit(Process::GlobalExitCode()); | 1493 Platform::Exit(Process::GlobalExitCode()); |
1494 } | 1494 } |
1495 | 1495 |
1496 } // namespace bin | 1496 } // namespace bin |
1497 } // namespace dart | 1497 } // namespace dart |
1498 | 1498 |
1499 int main(int argc, char** argv) { | 1499 int main(int argc, char** argv) { |
1500 dart::bin::main(argc, argv); | 1500 dart::bin::main(argc, argv); |
1501 UNREACHABLE(); | 1501 UNREACHABLE(); |
1502 } | 1502 } |
OLD | NEW |