From 43b4bb1474e092a0b87f3b23b5246900c94e1d4e Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 4 Jun 2013 23:19:01 +0200 Subject: Use dist_ prefix in Makefile.am rather than EXTRA_DIST where possible. Signed-off-by: Ralf Baechle --- user_call/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'user_call') diff --git a/user_call/Makefile.am b/user_call/Makefile.am index 1911d6f..b45e47c 100644 --- a/user_call/Makefile.am +++ b/user_call/Makefile.am @@ -4,11 +4,9 @@ installconf: sbin_PROGRAMS = ax25_call netrom_call rose_call tcp_call -man_MANS = ax25_call.8 netrom_call.8 rose_call.8 tcp_call.8 +dist_man_MANS = ax25_call.8 netrom_call.8 rose_call.8 tcp_call.8 -doc_DATA= README.user_call - -EXTRA_DIST = $(man_MANS) $(doc_DATA) +dist_doc_DATA= README.user_call LDADD = $(AX25_LIB) $(Z_LIB) -- cgit v1.2.3 From 0b4425760be1f92a1f25daeb5d3dc91814a98622 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 00:55:50 +0200 Subject: Nuke trailing blank lines. Signed-off-by: Ralf Baechle --- user_call/Makefile.am | 1 - 1 file changed, 1 deletion(-) (limited to 'user_call') diff --git a/user_call/Makefile.am b/user_call/Makefile.am index b45e47c..d7b1fb8 100644 --- a/user_call/Makefile.am +++ b/user_call/Makefile.am @@ -25,4 +25,3 @@ rose_call_SOURCES = rose_call.c \ tcp_call_SOURCES = tcp_call.c \ user_io.c \ user_io.h - -- cgit v1.2.3 From 1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 00:57:38 +0200 Subject: Nuke trailing whitespace. Signed-off-by: Ralf Baechle --- user_call/ax25_call.8 | 2 +- user_call/user_io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'user_call') diff --git a/user_call/ax25_call.8 b/user_call/ax25_call.8 index 81b305f..ce1d394 100644 --- a/user_call/ax25_call.8 +++ b/user_call/ax25_call.8 @@ -27,7 +27,7 @@ For .B netrom_call the remote_netrom_addr parameter may either be in the form of a single callsign or as a NET/ROM alias and callsign pair separated by -colon. For example NMCLUS:GB7BPQ. +colon. For example NMCLUS:GB7BPQ. .sp For .B rose_call diff --git a/user_call/user_io.c b/user_call/user_io.c index c486e46..d7e03c8 100644 --- a/user_call/user_io.c +++ b/user_call/user_io.c @@ -193,7 +193,7 @@ int select_loop(int s) FD_ZERO(&read_fd); FD_SET(STDIN_FILENO, &read_fd); FD_SET(s, &read_fd); - + select(s + 1, &read_fd, NULL, NULL, NULL); if (FD_ISSET(s, &read_fd)) { -- cgit v1.2.3 From 5feb3d651dbd1b096a26963bd1dffcfe0a5f9eea Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 01:42:05 +0200 Subject: Remove useless initializations to 0 or NULL. They only inflate the .data section of the binary. Initializations to FALSE are still left to do. Signed-off-by: Ralf Baechle --- user_call/user_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_call') diff --git a/user_call/user_io.c b/user_call/user_io.c index d7e03c8..0a25136 100644 --- a/user_call/user_io.c +++ b/user_call/user_io.c @@ -11,7 +11,7 @@ #define BUFLEN 8192 -int compression = 0; +int compression; int paclen_in = 256; int paclen_out = 256; @@ -22,7 +22,7 @@ static unsigned char buf[BUFLEN]; #include /* Error in (de)compression happened? */ -static int compression_error = 0; +static int compression_error; /* These are for the (de)compressor */ static unsigned char input_buffer[BUFLEN]; -- cgit v1.2.3 From f76e0b330f0be28f9f3af3073904ede3a34d48f5 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 15:34:56 +0200 Subject: Reformat consistently. Strictly whitespace changes only. Indentation by tabs only. Move case labels in switches are on the same level as the switch keyword. Signed-off-by: Ralf Baechle --- user_call/ax25_call.c | 24 ++++++++++++------------ user_call/netrom_call.c | 24 ++++++++++++------------ user_call/rose_call.c | 24 ++++++++++++------------ 3 files changed, 36 insertions(+), 36 deletions(-) (limited to 'user_call') diff --git a/user_call/ax25_call.c b/user_call/ax25_call.c index 1fafe4f..29b788e 100644 --- a/user_call/ax25_call.c +++ b/user_call/ax25_call.c @@ -123,18 +123,18 @@ int main(int argc, char **argv) */ if (connect(s, (struct sockaddr *)&axconnect, addrlen) != 0) { switch (errno) { - case ECONNREFUSED: - strcpy(buffer, "*** Connection refused - aborting\r"); - break; - case ENETUNREACH: - strcpy(buffer, "*** No known route - aborting\r"); - break; - case EINTR: - strcpy(buffer, "*** Connection timed out - aborting\r"); - break; - default: - sprintf(buffer, "ERROR: cannot connect to AX.25 callsign, %s\r", strerror(errno)); - break; + case ECONNREFUSED: + strcpy(buffer, "*** Connection refused - aborting\r"); + break; + case ENETUNREACH: + strcpy(buffer, "*** No known route - aborting\r"); + break; + case EINTR: + strcpy(buffer, "*** Connection timed out - aborting\r"); + break; + default: + sprintf(buffer, "ERROR: cannot connect to AX.25 callsign, %s\r", strerror(errno)); + break; } err(buffer); diff --git a/user_call/netrom_call.c b/user_call/netrom_call.c index 8d7fd85..e247e8c 100644 --- a/user_call/netrom_call.c +++ b/user_call/netrom_call.c @@ -134,18 +134,18 @@ int main(int argc, char **argv) */ if (connect(s, (struct sockaddr *)&nrconnect, addrlen) != 0) { switch (errno) { - case ECONNREFUSED: - strcpy(buffer, "*** Connection refused - aborting\r"); - break; - case ENETUNREACH: - strcpy(buffer, "*** No known route - aborting\r"); - break; - case EINTR: - strcpy(buffer, "*** Connection timed out - aborting\r"); - break; - default: - sprintf(buffer, "ERROR: cannot connect to NET/ROM node, %s\r", strerror(errno)); - break; + case ECONNREFUSED: + strcpy(buffer, "*** Connection refused - aborting\r"); + break; + case ENETUNREACH: + strcpy(buffer, "*** No known route - aborting\r"); + break; + case EINTR: + strcpy(buffer, "*** Connection timed out - aborting\r"); + break; + default: + sprintf(buffer, "ERROR: cannot connect to NET/ROM node, %s\r", strerror(errno)); + break; } err(buffer); diff --git a/user_call/rose_call.c b/user_call/rose_call.c index 43a27ae..602b1fe 100644 --- a/user_call/rose_call.c +++ b/user_call/rose_call.c @@ -129,18 +129,18 @@ int main(int argc, char **argv) */ if (connect(s, (struct sockaddr *)&roseconnect, addrlen) != 0) { switch (errno) { - case ECONNREFUSED: - strcpy(buffer, "*** Connection refused - aborting\r"); - break; - case ENETUNREACH: - strcpy(buffer, "*** No known route - aborting\r"); - break; - case EINTR: - strcpy(buffer, "*** Connection timed out - aborting\r"); - break; - default: - sprintf(buffer, "ERROR: cannot connect to Rose address, %s\r", strerror(errno)); - break; + case ECONNREFUSED: + strcpy(buffer, "*** Connection refused - aborting\r"); + break; + case ENETUNREACH: + strcpy(buffer, "*** No known route - aborting\r"); + break; + case EINTR: + strcpy(buffer, "*** Connection timed out - aborting\r"); + break; + default: + sprintf(buffer, "ERROR: cannot connect to Rose address, %s\r", strerror(errno)); + break; } err(buffer); -- cgit v1.2.3