static size_t num_script_dirs;
static char** script_search_dirs;
-
void add_script_search_dir (const char *dir)
{
num_script_dirs++;
int parse_config_file(struct command_context_s *cmd_ctx)
{
char **cfg;
- FILE *config_file;
if (!config_file_names)
add_config_file_name ("script openocd.cfg");
extern int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]);
extern int parse_config_file(struct command_context_s *cmd_ctx);
+extern void add_config_file_name (const char *cfg);
+extern void add_script_search_dir (const char *dir);
extern int configuration_output_handler(struct command_context_s *context, char* line);
extern FILE *open_file_from_path (command_context_t *cmd_ctx, char *file, char *mode);
{
log_callback_t *cb, **p;
- for (p = &log_callbacks; cb = *p; p = &(*p)->next)
+ for (p = &log_callbacks; (cb = *p); p = &(*p)->next)
{
if (cb->fn == fn && cb->priv == priv)
{
#include <getopt.h>
#include <string.h>
-
static int help_flag;
static struct option long_options[] =
{0, 0, 0, 0}
};
-
-
int configuration_output_handler(struct command_context_s *context, char* line)
{
INFO(line);
return ERROR_OK;
}
-
int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[])
{
int c;
int jtag_init(struct command_context_s *cmd_ctx)
{
- int i, validate_tries = 0;
+ int validate_tries = 0;
jtag_device_t *device;
DEBUG("-");
connection_t *c;
/* find connection */
- while(c = *p)
+ while((c = *p))
{
if (c->fd == connection->fd)
{
service_t *c;
/* find service */
- while(c = *p)
+ while((c = *p))
{
if (c->port == port)
{