Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: utils/archive/reader.c

Issue 10824210: Fix the archive code so that it compiles in a stricter mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fixes Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/archive/reader.h ('k') | utils/archive/reader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "entry.h" 5 #include "entry.h"
6 #include "messaging.h" 6 #include "messaging.h"
7 #include "reader.h" 7 #include "reader.h"
8 8
9 void archiveReadNew(Dart_Port p) { 9 void archiveReadNew(Dart_Port p) {
10 checkPointerResult(p, archive_read_new(), "archive input stream"); 10 checkPointerResult(p, archive_read_new(), "archive input stream");
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 void archiveReadSupportFormatTar(Dart_Port p, struct archive* a) { 88 void archiveReadSupportFormatTar(Dart_Port p, struct archive* a) {
89 checkResult(p, a, archive_read_support_format_tar(a)); 89 checkResult(p, a, archive_read_support_format_tar(a));
90 } 90 }
91 91
92 void archiveReadSupportFormatZip(Dart_Port p, struct archive* a) { 92 void archiveReadSupportFormatZip(Dart_Port p, struct archive* a) {
93 checkResult(p, a, archive_read_support_format_zip(a)); 93 checkResult(p, a, archive_read_support_format_zip(a));
94 } 94 }
95 95
96 void archiveReadSetFilterOptions(Dart_Port p, struct archive* a, 96 void archiveReadSetFilterOption(Dart_Port p, struct archive* a,
97 Dart_CObject* request) { 97 Dart_CObject* request) {
98 Dart_CObject* options = getTypedArgument(p, request, 0, kString); 98 char* module;
99 if (options == NULL) return; 99 char* name;
100 int result = archive_read_set_filter_options(a, options->value.as_string); 100 char* value;
101
102 getOptionArguments(p, request, &module, &name, &value);
103 int result = archive_read_set_filter_option(a, module, name, value);
101 checkResult(p, a, result); 104 checkResult(p, a, result);
102 } 105 }
103 106
104 void archiveReadSetFormatOptions(Dart_Port p, struct archive* a, 107 void archiveReadSetFormatOptions(Dart_Port p, struct archive* a,
105 Dart_CObject* request) { 108 Dart_CObject* request) {
106 Dart_CObject* options = getTypedArgument(p, request, 0, kString); 109 char* module;
107 if (options == NULL) return; 110 char* name;
108 int result = archive_read_set_format_options(a, options->value.as_string); 111 char* value;
112
113 getOptionArguments(p, request, &module, &name, &value);
114 int result = archive_read_set_format_option(a, module, name, value);
109 checkResult(p, a, result); 115 checkResult(p, a, result);
110 } 116 }
111 117
112 void archiveReadSetOptions(Dart_Port p, struct archive* a, 118 void archiveReadSetOptions(Dart_Port p, struct archive* a,
113 Dart_CObject* request) { 119 Dart_CObject* request) {
114 Dart_CObject* options = getTypedArgument(p, request, 0, kString); 120 char* module;
115 if (options == NULL) return; 121 char* name;
116 int result = archive_read_set_options(a, options->value.as_string); 122 char* value;
123
124 getOptionArguments(p, request, &module, &name, &value);
125 int result = archive_read_set_option(a, module, name, value);
117 checkResult(p, a, result); 126 checkResult(p, a, result);
118 } 127 }
119 128
120 // TODO(nweiz): wrap archive_read_open2 129 // TODO(nweiz): wrap archive_read_open2
121 // TODO(nweiz): wrap archive_read_FILE when issue 4160 is fixed 130 // TODO(nweiz): wrap archive_read_FILE when issue 4160 is fixed
122 131
123 void archiveReadOpenFilename(Dart_Port p, struct archive* a, 132 void archiveReadOpenFilename(Dart_Port p, struct archive* a,
124 Dart_CObject* request) { 133 Dart_CObject* request) {
125 Dart_CObject* filename = getTypedArgument(p, request, 0, kString); 134 Dart_CObject* filename = getTypedArgument(p, request, 0, kString);
126 if (filename == NULL) return; 135 if (filename == NULL) return;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // TODO(nweiz): wrap archive_read_into_fd when issue 4160 is fixed 197 // TODO(nweiz): wrap archive_read_into_fd when issue 4160 is fixed
189 // TODO(nweiz): wrap archive_read_extract and friends 198 // TODO(nweiz): wrap archive_read_extract and friends
190 199
191 void archiveReadClose(Dart_Port p, struct archive* a) { 200 void archiveReadClose(Dart_Port p, struct archive* a) {
192 checkResult(p, a, archive_read_close(a)); 201 checkResult(p, a, archive_read_close(a));
193 } 202 }
194 203
195 void archiveReadFree(Dart_Port p, struct archive* a) { 204 void archiveReadFree(Dart_Port p, struct archive* a) {
196 checkResult(p, a, archive_read_free(a)); 205 checkResult(p, a, archive_read_free(a));
197 } 206 }
OLDNEW
« no previous file with comments | « utils/archive/reader.h ('k') | utils/archive/reader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698