| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 #include "handlers.h" | 6 #include "handlers.h" |
| 7 | 7 |
| 8 #include <assert.h> | 8 #include <assert.h> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| 11 #include <string.h> | 11 #include <string.h> |
| 12 | 12 |
| 13 #include "hello_nacl_mounts.h" | 13 #include "hello_nacl_io.h" |
| 14 | 14 |
| 15 #define MAX_OPEN_FILES 10 | 15 #define MAX_OPEN_FILES 10 |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * A mapping from int -> FILE*, so the JavaScript messages can refer to an open | 18 * A mapping from int -> FILE*, so the JavaScript messages can refer to an open |
| 19 * File. */ | 19 * File. */ |
| 20 static FILE* g_OpenFiles[MAX_OPEN_FILES]; | 20 static FILE* g_OpenFiles[MAX_OPEN_FILES]; |
| 21 | 21 |
| 22 | 22 |
| 23 /** | 23 /** |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 if (result) { | 313 if (result) { |
| 314 *output = PrintfToNewString("Error: fclose returned error %d.", result); | 314 *output = PrintfToNewString("Error: fclose returned error %d.", result); |
| 315 return 3; | 315 return 3; |
| 316 } | 316 } |
| 317 | 317 |
| 318 RemoveFileFromMap(file_index); | 318 RemoveFileFromMap(file_index); |
| 319 | 319 |
| 320 *output = PrintfToNewString("fclose\1%s", file_index_string); | 320 *output = PrintfToNewString("fclose\1%s", file_index_string); |
| 321 return 0; | 321 return 0; |
| 322 } | 322 } |
| OLD | NEW |