diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-08-09 16:36:10 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-08-09 16:36:10 +0000 |
commit | 976fb9200128c751831adea978cdb64019443c32 (patch) | |
tree | c5f94c2a6aa4a0f6a99825c38864d1a1a851181c /gdb/cli | |
parent | 624d6fa0f2dc00845a7dd12daa3c3fd692dd9d92 (diff) | |
download | gdb-976fb9200128c751831adea978cdb64019443c32.tar.gz |
* cli/cli-dump.c: Change fopen modes to use binary open modes
as defined in include/fopen-bin.h throughout.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-dump.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 7aa60925d65..a648093dd47 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -360,61 +360,61 @@ dump_filetype (char *cmd, char *mode, char *filetype) static void dump_srec_memory (char *args, int from_tty) { - dump_memory_to_file (args, "w", "srec"); + dump_memory_to_file (args, FOPEN_WB, "srec"); } static void dump_srec_value (char *args, int from_tty) { - dump_value_to_file (args, "w", "srec"); + dump_value_to_file (args, FOPEN_WB, "srec"); } static void dump_ihex_memory (char *args, int from_tty) { - dump_memory_to_file (args, "w", "ihex"); + dump_memory_to_file (args, FOPEN_WB, "ihex"); } static void dump_ihex_value (char *args, int from_tty) { - dump_value_to_file (args, "w", "ihex"); + dump_value_to_file (args, FOPEN_WB, "ihex"); } static void dump_tekhex_memory (char *args, int from_tty) { - dump_memory_to_file (args, "w", "tekhex"); + dump_memory_to_file (args, FOPEN_WB, "tekhex"); } static void dump_tekhex_value (char *args, int from_tty) { - dump_value_to_file (args, "w", "tekhex"); + dump_value_to_file (args, FOPEN_WB, "tekhex"); } static void dump_binary_memory (char *args, int from_tty) { - dump_memory_to_file (args, "w", "binary"); + dump_memory_to_file (args, FOPEN_WB, "binary"); } static void dump_binary_value (char *args, int from_tty) { - dump_value_to_file (args, "w", "binary"); + dump_value_to_file (args, FOPEN_WB, "binary"); } static void append_binary_memory (char *args, int from_tty) { - dump_memory_to_file (args, "a", "binary"); + dump_memory_to_file (args, FOPEN_AB, "binary"); } static void append_binary_value (char *args, int from_tty) { - dump_value_to_file (args, "a", "binary"); + dump_value_to_file (args, FOPEN_AB, "binary"); } struct dump_context @@ -442,7 +442,7 @@ add_dump_command (char *name, void (*func) (char *args, char *mode), c->completer = filename_completer; d = XMALLOC (struct dump_context); d->func = func; - d->mode = "wb"; + d->mode = FOPEN_WB; set_cmd_context (c, d); c->func = call_dump_func; @@ -450,7 +450,7 @@ add_dump_command (char *name, void (*func) (char *args, char *mode), c->completer = filename_completer; d = XMALLOC (struct dump_context); d->func = func; - d->mode = "ab"; + d->mode = FOPEN_AB; set_cmd_context (c, d); c->func = call_dump_func; @@ -547,7 +547,7 @@ restore_section_callback (bfd *ibfd, asection *isec, void *args) static void restore_binary_file (char *filename, struct callback_data *data) { - FILE *file = fopen_with_cleanup (filename, "r"); + FILE *file = fopen_with_cleanup (filename, FOPEN_RB); int status; char *buf; long len; |