summaryrefslogtreecommitdiffstats
path: root/listen/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Compress multiple blank lines into single lines.Ralf Baechle2017-07-251-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Listen: Move statement following if to separate line.Ralf Baechle2017-07-251-1/+2
| | | | | | Broken out from a larger patch submitted by Wietse Ruyg <pe1oez@dds.nl>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* listen: Fix comparison broken by limited range of types.Ralf Baechle2017-01-311-1/+1
| | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wextra -pedantic -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c utils.c: In function ‘lprintf’: utils.c:73:27: warning: comparison is always true due to limited range of data type [-Wtype-limits] || (*p > 126 && *p < 160 && sevenbit)) ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Sort out variable and function declarations.Ralf Baechle2017-01-311-1/+1
| | | | | | | | | | - Make static what can be made static. - Add declaration where they were missing. - Don't define variables in headers. - Move declaations to the proper locations. - Pick up declarations from the proper headers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* fixed segfault on -c option.root2016-07-041-2/+4
| | | | | | | has_colors() was called before initscr(). also added error message if terminal does not support colors (and then exit). Signed-off-by: root <root@db0fhn.ampr.org>
* listen: Fix signedness compiler warnings.Ralf Baechle2015-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make[2]: Entering directory '/home/ralf/src/ax25/ax25-apps/listen' gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT listen.o -MD -MP -MF .deps/listen.Tpo -c -o listen.o listen.c listen.c: In function ‘ascii_dump’: listen.c:231:4: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign] strncat(buf, &c, 1); ^ listen.c:231:4: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ listen.c: In function ‘hex_dump’: listen.c:282:8: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] data2 = data; ^ [...] gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT rosedump.o -MD -MP -MF .deps/rosedump.Tpo -c -o rosedump.o rosedump.c rosedump.c: In function ‘facility’: rosedump.c:331:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] factot = data; ^ rosedump.c:398:11: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] for (d = data, l = 0; l < lgaddcall; ^ rosedump.c:406:28: warning: pointer targets in passing argument 1 of ‘dump_ax25_call’ differ in signedness [-Wpointer-sign] dump_ax25_call(d, 7)); ^ rosedump.c:296:14: note: expected ‘unsigned char *’ but argument is of type ‘char *’ static char *dump_ax25_call(unsigned char *data, int l_data) ^ rosedump.c:410:28: warning: pointer targets in passing argument 1 of ‘dump_ax25_call’ differ in signedness [-Wpointer-sign] dump_ax25_call(d, 7)); ^ rosedump.c:296:14: note: expected ‘unsigned char *’ but argument is of type ‘char *’ static char *dump_ax25_call(unsigned char *data, int l_data) ^ rosedump.c:438:4: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign] strncpy(indorig, data, lgadind); ^ rosedump.c:438:4: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ rosedump.c:441:4: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign] strncpy(inddest, data, lgadind); ^ rosedump.c:441:4: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ rosedump.c:451:14: warning: pointer targets in passing argument 1 of ‘data_dump’ differ in signedness [-Wpointer-sign] data_dump(factot, lgtot, 1); ^ In file included from rosedump.c:11:0: listen.h:31:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void data_dump(unsigned char *, int, int); ^ [...] gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c utils.c: In function ‘lprintf’: utils.c:49:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] for (p = str; *p != '\0'; p++) { ^ utils.c:71:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] for (p = str; *p != '\0'; p++) ^ [...] make[2]: Leaving directory '/home/ralf/src/ax25/ax25-apps/listen' Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Listen: Fix test for tty's color capabilities.Ralf Baechle2013-06-161-1/+1
| | | | | | | | | | It was testing the address of the curses function has_color(), not its return value indicated by the following warning: utils.c: In function ‘initcolor’: utils.c:84:6: warning: the address of ‘has_colors’ will always evaluate as ‘true’ [-Waddress] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Added some includes. This fixes compilation problems in gentoo,Thomas Osterried2009-04-221-0/+1
| | | | and warnings.
* listen did not terminate if caller has died. fputs and fflushThomas Osterried2008-11-241-2/+4
| | | | return value EOF was not honored.
* updated addressesThomas Osterried2008-04-131-2/+2
|
* Added opentrac to listenCraig Small2004-02-041-0/+1
| | | | More autobbreak updating nightmares
* updated libtool, uniformly indented source, corrected small ax25mond ↵Terry Dawson VK2KTJ2001-09-121-18/+17
| | | | Makefile bug
* Import ax25-apps 0.0.3 from tarballax25-apps-0.0.3Ralf Baechle1999-08-101-2/+5
|
* Import ax25-apps 0.0.1 from tarballax25-apps-0.0.1Ralf Baechle1999-06-071-0/+121