From 84df52f9ea78e2d71bde648a16b69d80404c6421 Mon Sep 17 00:00:00 2001 From: zwelch Date: Tue, 23 Jun 2009 22:42:54 +0000 Subject: - Fixes '=' whitespace - Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/server/gdb_server.c | 52 +++++++++++++++++++++++----------------------- src/server/httpd.c | 2 +- src/server/server.c | 6 +++--- src/server/telnet_server.c | 2 +- 4 files changed, 31 insertions(+), 31 deletions(-) (limited to 'src/server') diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index cc4c6751..4cf18757 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -107,7 +107,7 @@ int check_pending(connection_t *connection, int timeout_s, int *got_data) int t; if (got_data == NULL) got_data=&t; - *got_data=0; + *got_data = 0; if (gdb_con->buf_cnt>0) { @@ -133,14 +133,14 @@ int check_pending(connection_t *connection, int timeout_s, int *got_data) return ERROR_OK; } } - *got_data=FD_ISSET(connection->fd, &read_fds) != 0; + *got_data = FD_ISSET(connection->fd, &read_fds) != 0; return ERROR_OK; } int gdb_get_char(connection_t *connection, int* next_char) { gdb_connection_t *gdb_con = connection->priv; - int retval=ERROR_OK; + int retval = ERROR_OK; #ifdef _DEBUG_GDB_IO_ char *debug_buffer; @@ -313,7 +313,7 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len) int gotdata; for (;;) { - if ((retval=check_pending(connection, 0, &gotdata)) != ERROR_OK) + if ((retval = check_pending(connection, 0, &gotdata)) != ERROR_OK) return retval; if (!gotdata) break; @@ -409,7 +409,7 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len) } else { LOG_ERROR("unknown character(1) 0x%2.2x in reply, dropping connection", reply); - gdb_con->closed=1; + gdb_con->closed = 1; return ERROR_SERVER_REMOTE_CLOSED; } } @@ -421,7 +421,7 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len) else { LOG_ERROR("unknown character(2) 0x%2.2x in reply, dropping connection", reply); - gdb_con->closed=1; + gdb_con->closed = 1; return ERROR_SERVER_REMOTE_CLOSED; } } @@ -547,7 +547,7 @@ static __inline__ int fetch_packet(connection_t *connection, int *checksum_ok, i if (!noack) { - *checksum_ok=(my_checksum == strtoul(checksum, NULL, 16)); + *checksum_ok = (my_checksum == strtoul(checksum, NULL, 16)); } return ERROR_OK; @@ -600,11 +600,11 @@ int gdb_get_packet_inner(connection_t *connection, char *buffer, int *len) */ if (gdb_con->noack_mode) { - if ((retval=fetch_packet(connection, &checksum_ok, 1, len, buffer)) != ERROR_OK) + if ((retval = fetch_packet(connection, &checksum_ok, 1, len, buffer)) != ERROR_OK) return retval; } else { - if ((retval=fetch_packet(connection, &checksum_ok, 0, len, buffer)) != ERROR_OK) + if ((retval = fetch_packet(connection, &checksum_ok, 0, len, buffer)) != ERROR_OK) return retval; } @@ -649,7 +649,7 @@ int gdb_output_con(connection_t *connection, const char* line) return ERROR_GDB_BUFFER_TOO_SMALL; hex_buffer[0] = 'O'; - for (i=0; i='A'&&c<='F') { return c-'A'+10; @@ -1199,7 +1199,7 @@ int gdb_read_memory_packet(connection_t *connection, target_t *target, char *pac * gained by involving the user in this problem that hopefully will get resolved * eventually * - * http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2395 + * http://sourceware.org/cgi-bin/gnatsweb.pl?cmd = view%20audit-trail&database = gdb&pr = 2395 * * For now, the default is to fix up things to make current GDB versions work. * This can be overwritten using the gdb_report_data_abort <'enable'|'disable'> command. @@ -1268,7 +1268,7 @@ int gdb_write_memory_packet(connection_t *connection, target_t *target, char *pa LOG_DEBUG("addr: 0x%8.8" PRIx32 ", len: 0x%8.8" PRIx32 "", addr, len); - for (i=0; i0x%x\n" \ "\n", \ p->base, p->size, blocksize); - ram_start=p->base+p->size; + ram_start = p->base+p->size; } if (ram_start != 0) { @@ -2018,7 +2018,7 @@ int gdb_input_inner(connection_t *connection) { gdb_service_t *gdb_service = connection->service->priv; target_t *target = gdb_service->target; - char *packet=gdb_packet_buffer; + char *packet = gdb_packet_buffer; int packet_size; int retval; gdb_connection_t *gdb_con = connection->priv; @@ -2108,7 +2108,7 @@ int gdb_input_inner(connection_t *connection) gdb_con->frontend_state = TARGET_RUNNING; log_add_callback(gdb_log_callback, connection); target_call_event_callbacks(target, TARGET_EVENT_GDB_START); - int retval=gdb_step_continue_packet(connection, target, packet, packet_size); + int retval = gdb_step_continue_packet(connection, target, packet, packet_size); if (retval != ERROR_OK) { /* we'll never receive a halted condition... issue a false one.. */ @@ -2354,10 +2354,10 @@ int handle_gdb_breakpoint_override_command(struct command_context_s *cmd_ctx, ch gdb_breakpoint_override = 1; if (strcmp(args[0], "hard") == 0) { - gdb_breakpoint_override_type=BKPT_HARD; + gdb_breakpoint_override_type = BKPT_HARD; } else if (strcmp(args[0], "soft") == 0) { - gdb_breakpoint_override_type=BKPT_SOFT; + gdb_breakpoint_override_type = BKPT_SOFT; } else if (strcmp(args[0], "disable") == 0) { gdb_breakpoint_override = 0; diff --git a/src/server/httpd.c b/src/server/httpd.c index c19dc2b3..e7772168 100644 --- a/src/server/httpd.c +++ b/src/server/httpd.c @@ -402,7 +402,7 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, if (!*url) url="index.tcl"; - const char *file_name=alloc_printf("%s/%s", httpd_dir, url); + const char *file_name = alloc_printf("%s/%s", httpd_dir, url); int result = handle_request(connection, file_name); free((void *)file_name); return result; diff --git a/src/server/server.c b/src/server/server.c index bca9774f..a93d6ada 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -51,7 +51,7 @@ int add_connection(service_t *service, command_context_t *cmd_ctx) socklen_t address_size; connection_t *c, **p; int retval; - int flag=1; + int flag = 1; c = malloc(sizeof(connection_t)); c->fd = -1; @@ -70,7 +70,7 @@ int add_connection(service_t *service, command_context_t *cmd_ctx) /* This increases performance dramatically for e.g. GDB load which * does not have a sliding window protocol. */ - retval=setsockopt(c->fd, /* socket affected */ + retval = setsockopt(c->fd, /* socket affected */ IPPROTO_TCP, /* set option at TCP level */ TCP_NODELAY, /* name of option */ (char *)&flag, /* the cast is historical cruft */ @@ -183,7 +183,7 @@ int add_service(char *name, enum connection_type type, unsigned short port, int } #ifndef _WIN32 - int segsize=65536; + int segsize = 65536; setsockopt(c->fd, IPPROTO_TCP, TCP_MAXSEG, &segsize, sizeof(int)); #endif int window_size = 128 * 1024; diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 4355f8a6..82b7330e 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -130,7 +130,7 @@ void telnet_log_callback(void *priv, const char *file, int line, /* put the command line to its previous state */ telnet_prompt(connection); telnet_write(connection, t_con->line, t_con->line_size); - for (i=t_con->line_size; i>t_con->line_cursor; i--) + for (i = t_con->line_size; i>t_con->line_cursor; i--) telnet_write(connection, "\b", 1); } -- cgit v1.2.3