6a2b9a2788
Add an alias for the name for %N to the display sub-structure, so that the name can be varied between displays without having to alter the control value (#165).
Andrew Wood2025-07-27 19:53:28 +01:00
e04f50f0dc
Change all cursor positioning functions to use sub-structures rather than the whole state structure, and if turning off cursor positioning, do so via a new flag "cursor->disable" rather than changing the operator-supplied options in "control" (#165).
Andrew Wood2025-07-27 17:05:04 +01:00
021dc6e054
Pass individual sub-structures to pv_display, but still keep state for now, until the functions cursor.c have been updated to take sub-structures rather than the whole state (#165).
Andrew Wood2025-07-27 15:56:03 +01:00
7d7efac7c6
Move the terminal_supports_utf8, terminal_supports_colour, and checked_colour_support flags out of "control" and into "status", as they are not operator-supplied options, but are program-generated status flags; this will allow "control" to remain read-only for larger parts of the program (#165).
Andrew Wood2025-07-27 15:37:16 +01:00
f79bed3cb8
Rename "can_display_colour" and "can_display_utf8" to "terminal_supports_colour" and "terminal_supports_utf8" to make it clearer that these are not operator-supplied option settings, they are derived from terminal capabilities (colour) and the environment (UTF-8).
Andrew Wood2025-07-27 15:20:05 +01:00
960ff1572f
Pass state->status, rather than state itself, to pv_format (#165).
Andrew Wood2025-07-27 00:31:45 +01:00
da2a2e6fd2
Remove the state from the pv_error arguments, by adding a new function pv_set_error_prefix to call on startup, eliminating the need for a state program_name string; and add a private boolean to track whether there has been any output which means errors need preceding by a newline, which is updated by pv_display directly (#165).
Andrew Wood2025-07-27 00:22:57 +01:00
005bc2f841
Pass the sub-structures separately to pv_format and pv__format_init rather than the whole state; but still pass state for now, as pv_error needs it (#165).
Andrew Wood2025-07-26 22:49:29 +01:00
ecc0c0e414
Adjust the readonly structure pointer types so the pointer itself is not read-only but the thing it points to is; and change the display formatters to use pointers to control, transfer, and calc structures instead of the whole state, with read-only access enforced at compile time (#165).
Andrew Wood2025-07-26 22:28:39 +01:00
18548d217b
Rename struct pvipcstate_s to pvcursorstate_s since it is for cursor positioning, not for IPC (#165).
Andrew Wood2025-07-26 21:30:16 +01:00
653326ca9b
Rename struct pvcursorstate_s to pvipccursorstate_s for clarity since it is only for IPC (#165).
Andrew Wood2025-07-26 21:29:20 +01:00
0cf8902d9b
Rename display structure member "display_visible" to "output_produced" for clarity.
Andrew Wood2025-07-26 21:25:54 +01:00
762676f4e1
Make pv_tty_write take only the transient flags part of the state rather than the whole state, and rename the "flag" part of the state to "flags" for better readability (#165).
Andrew Wood2025-07-26 21:18:13 +01:00
3bd49a0c3f
Ensure the current average rate calculation can't accidentally divide by zero.
Andrew Wood2025-07-26 20:53:22 +01:00
870dfad9fd
Introduce read-only structure pointer typedefs for each of the state sub-structures, so the compiler will catch anywhere that a function would alter a structure it isn't expected to (#165).
Andrew Wood2025-07-26 20:51:28 +01:00
3b0891b128
Pass more specific structures to pv_calculate_transfer_rate rather than the whole state (#165).
Andrew Wood2025-07-26 19:22:07 +01:00
b3c854b27a
Add typedefs for the pointers to the sub-structures within struct pvstate_s, so they can be used as types in function declarations (#165).
Andrew Wood2025-07-26 18:33:24 +01:00
a923bdaca4
Give struct names to each of the sub-structures within struct pvstate_s, so they can be used as types in function declarations (#165).
Andrew Wood2025-07-26 18:24:47 +01:00
c180cc85cf
Allocate the state copy's default_bar_style using the setter function rather than pv_strdup directly (#163).
Andrew Wood2025-07-25 23:44:12 +01:00
092a30dd7d
When watching file descriptors, duplicate the default_bar_style string rather than copying its pointer, to avoid double-free() (#163).
Andrew Wood2025-07-25 23:40:41 +01:00
e687c9b4d9
When EOF on input and output is reached but the output pipe buffer is not empty, sleep for a short time before looping while waiting for the buffer to empty, to avoid a busy-wait (#164).
Andrew Wood2025-07-25 20:13:49 +01:00
d2e9028726
Add debugging output to pv_transfer wherever it returns zero (#164)
Andrew Wood2025-07-25 19:49:02 +01:00
f000530746
Correct which language Maxi_Mega is acknowledged for providing translations to.
Andrew Wood2025-05-31 15:15:56 +01:00
5bf04f841b
Acknowledge translations from user milimarg.
Andrew Wood2025-05-31 15:12:55 +01:00
5d95797aff
Merge pull request 'Translations update from Codeberg Translate' (#162) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-05-31 16:07:58 +02:00
6d6619cbb4
Merge pull request 'Translations update from Codeberg Translate' (#129) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-02-09 17:18:14 +00:00
81f9919992
Acknowledge new French translations.
Andrew Wood2025-02-09 17:16:44 +00:00
b57170d596
Merge pull request 'Translations update from Codeberg Translate' (#128) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-02-09 17:11:41 +00:00
3f597e59e0
Adjust the installer test to retry with both "gmake" and "make", to work around strange behaviour on NetBSD.
v1.9.31
Andrew Wood2025-01-28 22:10:49 +00:00
a62051e5ff
Adjust the sensitivity of the test.
Andrew Wood2025-01-28 21:35:42 +00:00
a552fc5329
Document the use of "--numeric" with "--format".
Andrew Wood2025-01-25 21:28:33 +00:00
505a91a6ed
In --numeric mode, still call the same formatting functions, only with a different default string, and end with a newline rather than a carriage return (#127).
Andrew Wood2025-01-25 21:15:05 +00:00
0d3b678800
Format the average rate, byte/line count, percentage completion, transfer rate, and elapsed time as just a number on its own in numeric mode.
Andrew Wood2025-01-24 23:10:59 +00:00
efb115c2aa
Remove the TODO since buffer utilisation may not be useful with --numeric, as it is not always a number.
Andrew Wood2025-01-24 23:07:05 +00:00
8721d285ce
Add TODO markers at possible touch points for "--numeric --format" implementation (#127).
Andrew Wood2025-01-23 21:56:57 +00:00
f421f9979d
Acknowledge updated Polish and Russian translations.
Andrew Wood2025-01-15 21:20:37 +00:00
d5ad641102
Merge pull request 'Translations update from Codeberg Translate' (#126) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-01-15 21:17:23 +00:00
dbc7cd7bac
Update the translation acknowledgements.
Andrew Wood2025-01-14 20:54:46 +00:00
4c1f36cda4
Merge pull request 'Translations update from Codeberg Translate' (#125) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-01-14 20:42:58 +00:00
5decddeb42
Ensure the dynamic segment width never tries to go negative.
Andrew Wood2024-12-22 00:21:34 +00:00
0f08153214
Skip the valgrind tests when building an RPM, as it appears that the optimisation flags do not work well with valgrind and lead to false results.
v1.9.24
Andrew Wood2024-12-19 22:01:56 +00:00
5c3743e1f8
Skip the valgrind tests when building an RPM, as it appears that the optimisation flags do not work well with valgrind and lead to false results.
Andrew Wood2024-12-19 21:40:11 +00:00
ff0355ca9c
Make the moving indicator more granular on wide displays by calculating its position with floating point rather than integer values.
Andrew Wood2024-12-18 21:59:17 +00:00