#include "config.h"
#endif
-#include "log.h"
-#include "types.h"
#include "jtag.h"
#include "configuration.h"
#include "xsvf.h"
#include "pld.h"
#include "mflash.h"
-#include "command.h"
#include "server.h"
#include "telnet_server.h"
#include "gdb_server.h"
#include "tcl_server.h"
-#include <sys/time.h>
-#include <sys/types.h>
+#ifdef HAVE_STRINGS_H
#include <strings.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
+#endif
#define OPENOCD_VERSION \
/* Give TELNET a way to find out what version this is */
static int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- if (argc!=0)
+ if (argc != 0)
return ERROR_COMMAND_SYNTAX_ERROR;
command_print(cmd_ctx, OPENOCD_VERSION);
static void exit_handler(void)
{
- /* close JTAG interface */
- if (jtag && jtag->quit)
- jtag->quit();
+ jtag_interface_quit();
}
static int log_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv)
static int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- if (argc!=0)
+ if (argc != 0)
return ERROR_COMMAND_SYNTAX_ERROR;
int retval;
return EXIT_FAILURE;
#if BUILD_HTTPD
- if (httpd_start()!=ERROR_OK)
+ if (httpd_start() != ERROR_OK)
return EXIT_FAILURE;
#endif
if (ret != ERROR_COMMAND_CLOSE_CONNECTION)
{
command_context_mode(cmd_ctx, COMMAND_EXEC);
- if (command_run_line(cmd_ctx, "init")!=ERROR_OK)
+ if (command_run_line(cmd_ctx, "init") != ERROR_OK)
return EXIT_FAILURE;
/* handle network connections */