contest: log ncurses start & key press trace messages

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: add tracing functionality to msg API

When enabled, all messages will be written to trace.log in the data
directory.  Additionally, this commit adds a new function which only writes
to the log file and is a no-op when tracing is disabled.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
hlog & contest: remove unused xcurses helpers

They got superseded by the xwin line drawing functions.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
hlog & contest: rename xform.h to xscreen.h

The header contains all 3 abstractions - screen, window, and form.
Therefore, it makes sense to name the file after the broadest level (the
screen).

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: remove unneeded call to recent_refresh

Right after the UI is allocated, we enter the main loop which refreshes the
recent lists.  So, we don't need to pro-actively do it in the allocation
code.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
hlog & contest: remove status_refresh

This function became a no-op with the recent UI rearchitecture and therefore
it isn't needed.  Refresh of all windows and forms is automatically driven
from the screen refresh.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
hlog & contest: rearchitect ncurses UI abstraction

Instead of using raw ncurses for everything except the forms, this commit
adds a new API that provides three abstractions:

1. a screen (which contains a root window for simplicity, but that's an
   implementation detail)
2. 0+ user-allocated windows (windows are associated with the screen)
3. 0+ user-allocated forms (forms are associated with a window)

The form are the virtually the same as xform prior to this rearchitecture.

There is still a lot of clean up, improve, and functionality to add.
However, the code is in a decent enough shape to commit.

Finally, this commit converts hlog & contest binaries to this new API.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
docs: describe HLQ0 types in more detail

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
docs: finish describing the QSO side HLQ0 fields

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
docs: Add examples to HLQ0 file format doc

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Document HLQ0 file format

The document is still a work-in-progress, but it's better to get *something*
out sooner than later.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
common: explicitly specify POST_BUILD on revisiontag target

CMake 3.31 started warning about add_custom_command(TARGET ...) not
specifying one of PRE_BUILD, PRE_LINK, or POST_BUILD.  Previous versions
assumed POST_BUILD, so we explicitly specify it.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: map RIG_ELIMIT and RIG_EACCESS if present

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
cmake: use a helper macro for hamlib enum/defines checking

Instead of copy & pasting the same 4 lines over and over, let's use a macro
to make the checks cleaner.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: printf-like function format string must be a string literal

This avoids -Wformat-security warning:

hlog/contest/ui.c:583:5: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
hlog: printf-like string widths & lengths must be int, not size_t

This avoids -Wformat warnings like:

hlog/contest/callout.c:65:29: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
xlua: fix NEQP exchange LCD displaying

The variable holding the exchange got renamed recently, but one place missed
the rename.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
xlua: make NEQP qso init not modify the qso

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
xlua: NEQP's qso_load event should call qso_load, not qso_done

The county helper's qso_done method tries to modify the QSO (namely, setting
the contest & year) but the qso_load event gets a read-only QSO.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
xlua: improve points, mults, and dups handling in NEQP

The rules are short and easy to read, but that means that one has to infer
what to do in some situations.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Next