]> git.sur5r.net Git - openocd/blobdiff - src/helper/interpreter.c
move options handling to separate file to better support embedded implementations...
[openocd] / src / helper / interpreter.c
index 85cd71586dcd9a820c11b58a1681d97490ededa9..c5c38b83bccb65fe2c2e95e3c2a918b8c7206f1f 100644 (file)
@@ -22,6 +22,7 @@
 #endif
 
 #include "interpreter.h"
+#include "configuration.h"
 
 #include "binarybuffer.h"
 #include <stdlib.h>
@@ -92,7 +93,7 @@ var_t* get_var_by_namenum(char *namenum)
        
 }
 
-int field_le_to_host(u8 *buffer, void *priv)
+int field_le_to_host(u8 *buffer, void *priv, struct scan_field_s *dummy)
 {
        var_field_t *field = priv;
        field->value = buf_get_u32(buffer, 0, field->num_bits);
@@ -221,7 +222,8 @@ int handle_script_command(struct command_context_s *cmd_ctx, char *cmd, char **a
        if (argc != 1)
                command_print(cmd_ctx, "usage: script <file>");
 
-       script_file = fopen(args[0], "r");
+       script_file = open_file_from_path(cmd_ctx, args[0], "r");
+
        if (!script_file)
        {
                command_print(cmd_ctx, "couldn't open script file %s", args[0]);