Commit graph

113 commits

Author SHA1 Message Date
Christoph Berg
ed39ebb5ee lib/precise_time.c: Remove dead code
The last branch of `#if _POSIX_TIMERS` was missing a declaration of
"showme". Since that variable is not used anywhere, just drop it.
2025-09-07 17:41:52 +02:00
Daniele Forsi IU5HKX
39e155efe7 Fix include config.h
It should be included, with its path, before any hamlib include
and before any #ifdef that uses the symbols that it defines.
2025-08-30 11:18:51 +02:00
Daniele Forsi IU5HKX
caf7346fc0 Fix typos 2025-08-16 11:52:55 +02:00
Nate Bargmann
79f8b1cde8
Merge HitHub PR #1811 2025-07-22 22:11:06 -05:00
Daniele Forsi IU5HKX
0267068220 Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
George Baltz N3GB
47dae3879d Fix compiler errors with strict C23 standards
Fix missing/misplaced '#include "config.h"' statements. Fixes missing
  function prototypes, unknown type definitions, etc. Allows configuration
  of GCC with CFLAGS="-std=c23" instead of using default -std=gnu23.

Don't know about CLANG, MSVC, MinGW, etc, but using
gwb@stitch:~> gcc --version
gcc (SUSE Linux) 15.1.1 20250714
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hamlib can compile in strict C23 mode, or previous standard levels.
2025-07-22 11:07:33 -04:00
Mike Black W9MDB
240407d917 Fix MacOS warning get getopt.h 2024-09-08 11:50:04 -05:00
Mike Black W9MDB
d20a235860 Fix MacOS warning in precise_time.c 2024-09-08 08:55:06 -05:00
Mike Black W9MDB
e267c62764 astyle files 2023-12-16 11:37:58 -06:00
Mike Black W9MDB
534fe449a2 Fix more cppcheck items 2023-10-13 17:36:29 -05:00
Mike Black W9MDB
3b5f7a6dcf Add and fix some cppcheck suppress items
https://github.com/Hamlib/Hamlib/issues/1351
2023-10-03 17:11:09 -05:00
Mike Black W9MDB
97b341eb3f Fix precise_time.c 2023-08-02 22:19:20 -05:00
Mike Black W9MDB
428500bb1c Fix cppcheck error
https://github.com/Hamlib/Hamlib/issues/1350
2023-08-02 12:37:36 -05:00
Mike Black W9MDB
00d94d410f Make windows termios.c a touch faster
Improve debug in termios.c
https://github.com/Hamlib/Hamlib/issues/1123
2023-07-25 10:33:49 -05:00
Mike Black W9MDB
2c40ebcbc1 Fix termios.c
https://github.com/Hamlib/Hamlib/issues/1123
2023-07-24 12:17:56 -05:00
Mike Black W9MDB
09143fcff9 Make find_port win32_serial_find_port so it can used elsewhere
Use WIN32 PurgeComm instead of polling chars
https://github.com/Hamlib/Hamlib/issues/1123
2023-07-24 12:15:37 -05:00
Mike Black W9MDB
f5b4cd6047 Move structure from termios.c to win32_termios.h
https://github.com/Hamlib/Hamlib/issues/1123
2023-07-24 12:08:18 -05:00
Mike Black W9MDB
97811d2aa7 Remove whitespace after backslash in lib/Makefile.am 2023-06-17 08:29:15 -05:00
Mike Black W9MDB
01a7eee18d Reduced loop time in termios.c to 1ms vice 10ms
https://github.com/Hamlib/Hamlib/issues/695
2023-05-16 07:38:21 -05:00
Mike Black W9MDB
d3b912aadb Add precise_time.c to misc to help speed up Windows
https://github.com/Hamlib/Hamlib/issues/1290
2023-05-15 11:45:40 -05:00
Mike Black W9MDB
4f0d78f1d9 Fix cppcheck warnings 2023-05-08 23:56:28 -05:00
Mike Black W9MDB
a83eb3bf42 astyle files for 4.5 release 2022-07-27 17:16:17 -05:00
Mike Black W9MDB
627ec83652 Change malloc to calloc 2022-07-27 10:26:08 -05:00
Mike Black W9MDB
ff15e141ef Fix termios.c warnings 2022-07-22 22:36:47 -05:00
Mike Black W9MDB
1063540765 Fix show_DCB in termios.c 2022-05-13 10:32:17 -05:00
Mike Black W9MDB
5588b2465c Change termios.c Windows sleep to 10,000us instead of 1,000us -- makes for more accurate sleep calculation
https://github.com/Hamlib/Hamlib/issues/996
2022-03-24 12:12:22 -05:00
Mike Black W9MDB
8c34ce1a2d astyle source code 2022-02-05 15:27:43 -06:00
Mike Black W9MDB
68e121d82c Change all to remove HAVE_CONFIG dependency and include <hamlib/config.h> by default
This is necessary to keep alignment between the client view of rig->state and the shared libarary view
Including PTHREAD functions in rig->state necessitated this as HAVE_PTHREAD only defined during hamlib compilation.
Clients including hamlib/rig.h did not pick up all the HAVE* config variable that control what gets included
https://github.com/Hamlib/Hamlib/issues/947
2022-02-04 07:41:36 -06:00
Mike Black W9MDB
9aade8de3f Add config.h to include/hamlib so HAVE_PTHREAD is available if needed
https://github.com/Hamlib/Hamlib/issues/947
2022-02-03 22:31:42 -06:00
Mike Black W9MDB
6f0d8bdcce Change snprintf to SNPRINTF in lib files
https://github.com/Hamlib/Hamlib/issues/857
2022-01-22 22:20:05 -06:00
Mike Black W9MDB
7ecd467126 Change sprintf to SNPRINTF in cJSON.c
https://github.com/Hamlib/Hamlib/issues/857
2022-01-18 15:28:09 -06:00
Mike Black W9MDB
7764b59f36 Change sprintf to snprint in termios.c
https://github.com/Hamlib/Hamlib/issues/857
2022-01-09 09:25:15 -06:00
Mike Black W9MDB
814ac551e8 Change sprintf to snprint in asyncpipe.c
https://github.com/Hamlib/Hamlib/issues/857
2022-01-09 09:18:43 -06:00
Mike Black W9MDB
0600adb077 Change sprintf to snprint in cJSON.c
https://github.com/Hamlib/Hamlib/issues/857
2022-01-08 17:26:54 -06:00
Mikael Nousiainen
a00d78c860 Implement pipes using asynchronous/overlapped I/O on Windows 2022-01-03 14:18:49 +02:00
Mikael Nousiainen
56c95b1529 Merge upstream changes and fix conflicts 2021-12-12 23:05:26 +02:00
Mikael Nousiainen
d857f18163 Initial implementation of: reader thread for async handling of rig data, UDP multicast publisher routine and rig state poll thread routine. The reader thread can correctly handle asynchronous data, such as transceive or spectrum data. Work in progress: multi-platform code for I/O routines still missing and the poll routine is not yet in use. Tested briefly on an IC-7300 so far. 2021-11-28 20:52:29 +02:00
Mike Black W9MDB
63a51c36a1 astyle files preparing for 4.4 release 2021-11-28 12:41:10 -06:00
Mike Black W9MDB
233036f874 Fix compile warning in termios.c 2021-11-03 11:56:34 -05:00
Mike Black W9MDB
30ef04b1a4 Speed up Windows serial I/O
Was using a fixed timeout instead of returning already read
https://github.com/Hamlib/Hamlib/issues/850
2021-11-02 16:40:39 -05:00
Mike Black W9MDB
52e0840f1d Speed up serial timeout minimum from ~12ms to ~1ms 2021-10-31 17:21:20 -05:00
Mike Black W9MDB
4501c1c97b Remove generated files 2021-04-14 15:41:01 -05:00
Mike Black W9MDB
9d310062eb More files for git clone configure to work 2021-04-14 09:19:27 -05:00
Michael Black W9MDB
ee60a68bec astyle files 2021-02-28 09:46:01 -06:00
Michael Black W9MDB
6049f54ef4 Fix compilation warnings in getopt.c 2021-02-26 11:17:35 -06:00
Michael Black W9MDB
c5ac5b2334 Fix win32termios.h build under mingw
https://github.com/Hamlib/Hamlib/issues/421
2020-10-16 15:26:30 -05:00
Michael Black W9MDB
1c7e5b2e48 Fix win32termios.h
https://github.com/Hamlib/Hamlib/issues/421
2020-10-16 14:48:01 -05:00
Michael Black W9MDB
cf32ace4be Fix gcc warnings
https://github.com/Hamlib/Hamlib/issues/421
2020-10-16 11:51:41 -05:00
Daniele Forsi
1e00e4e8db Fix typos
Command line:
codespell --write-changes --summary --skip=*.m4 --ignore-words-list="develope,get's,quitt,setts,som,ue,vektor,objext,ans
2020-10-11 18:03:50 +02:00
Michael Black W9MDB
b97d05369c astyle files 2020-09-14 23:12:35 -05:00