Andrew Wood
|
7fdb6716e1
|
In the pvwatchfd_s structure, use booleans "displayable" and "unused" instead of having values of watch_pid=0 for unused and watch_fd=-1 for not displayable, so that each item only means one thing.
|
2025-09-26 23:01:07 +01:00 |
|
Andrew Wood
|
c61c589378
|
Typo correction in the comment.
|
2025-09-26 22:29:36 +01:00 |
|
Andrew Wood
|
c688987087
|
Adjust the --watchfd documentation to say that multiple PID/PID:FD arguments are allowed (#12).
|
2025-09-25 06:21:55 +01:00 |
|
Andrew Wood
|
0b2f9ec397
|
Only call pv_watchfd_loop() from main, so that eventually pv_watchpid_loop() can be removed and multiple "-d" values supported (#12).
|
2025-09-24 22:11:44 +01:00 |
|
Andrew Wood
|
8a8e6d71a4
|
Reinstate the previously removed "cannot transfer files" message for "-d".
|
2025-09-23 05:46:53 +01:00 |
|
Andrew Wood
|
a0a9d682ca
|
Reject "-o" when using "-d".
|
2025-09-23 05:45:43 +01:00 |
|
Andrew Wood
|
05a72bf75e
|
Position updates, two new strings, one old message removed.
|
2025-09-23 05:39:43 +01:00 |
|
Andrew Wood
|
22bf08f8e4
|
Accept additional arguments when -d is specified, expecting them to be more pid[:fd] values (#12).
|
2025-09-22 21:50:35 +01:00 |
|
Andrew Wood
|
b5fbd1978e
|
Replace watch_pid, watch_fd with arrays, though for now only use the first item in the arrays (#12).
|
2025-09-21 19:50:56 +01:00 |
|
Andrew Wood
|
db80f838ff
|
Explicitly set an action variable to say which action to perform, instead of inferring it from other settings like whether a watch PID was set (#12).
|
2025-09-18 06:18:18 +01:00 |
|
Andrew Wood
|
8c2e934768
|
Add a TODO marker for the next step to take.
|
2025-09-18 05:47:15 +01:00 |
|
Andrew Wood
|
dbce5b355e
|
Add --watchfd option values to an array in the main state, as well as to the currently used variables (#12).
|
2025-09-17 23:12:13 +01:00 |
|
Andrew Wood
|
12cc996d32
|
Add --watchfd option values to an array as well as to the currently used variables (#12).
|
2025-09-17 22:12:45 +01:00 |
|
Andrew Wood
|
4a0f9e713c
|
Define struct pvwatchspec_s for future use in an array for --watchfd, and add a comment defining nullable_string_t.
|
2025-09-16 23:05:41 +01:00 |
|
Andrew Wood
|
8771b901d9
|
Add TODO markers as part of looking at supporting multiple "-d" options (#12).
|
2025-09-15 20:12:55 +01:00 |
|
Andrew Wood
|
48ac509af7
|
Line number updates.
|
2025-09-14 16:42:42 +01:00 |
|
Andrew Wood
|
f70627c031
|
Pass through indent.
|
2025-09-14 16:42:08 +01:00 |
|
Andrew Wood
|
1e6c9704b1
|
Adjustments to remove the need for the unqualifiedtrans and nullstate splint workarounds.
|
2025-09-14 16:39:47 +01:00 |
|
Andrew Wood
|
a629a488d7
|
Add TODO marker for the planned next step.
|
2025-07-28 20:39:05 +01:00 |
|
Andrew Wood
|
ad1d0e1c9a
|
In the watchfd info array, instead of using copies of the global state, each fd has its own flags, transfer, calc, and display sub-structures (#165).
|
2025-07-28 00:25:14 +01:00 |
|
Andrew Wood
|
4f9d746823
|
Split the state reset functions into smaller pieces, so sub-structures can be reset individually (#165).
|
2025-07-27 23:24:56 +01:00 |
|
Andrew Wood
|
9fc9b6a8ed
|
Carry the fd info_array "size" into the global "control" structure just before calling pv_display() so it gets used without having to have a per-fd copy of "control" (#165).
|
2025-07-27 21:39:36 +01:00 |
|
Andrew Wood
|
9ab82cde1e
|
Use the original info_aray size for comparison as the "control" structure may be made irrelevant here soon (#165).
|
2025-07-27 21:38:55 +01:00 |
|
Andrew Wood
|
a7f392e3c3
|
Address splint warnings about setting and clearing state->control.name (#165).
|
2025-07-27 21:34:46 +01:00 |
|
Andrew Wood
|
574ea04502
|
Instead of adding an aliased display name and having to maintain it and treat it differently, go back to keeping the name only in the "control" sub-structure of the state, but share the global state "control" across all watched fds, and just change it before each pv_display() call so it points to the relevant fd display_name when needed (#165).
|
2025-07-27 21:23:41 +01:00 |
|
Andrew Wood
|
5282a521b5
|
Pass only the relevant sub-structure to pv_alloc_history (#165).
|
2025-07-27 20:59:21 +01:00 |
|
Andrew Wood
|
52634f01f9
|
Do not call pv_state_name_set when adjusting an fd display_name, but instead set the alias state->display.name ourselves. Since the fd display_name we are pointing to is within the info_array, if we extend info_array with realloc we then have to also reset those aliases since display_name may move if realloc rebases the array. (#165)
|
2025-07-27 20:51:00 +01:00 |
|
Andrew Wood
|
a0f2d9c9c7
|
Use status, cursor from main state, and a null extra_display, to reduce the dependency on the per-watched-fd state (#165).
|
2025-07-27 20:46:51 +01:00 |
|
Andrew Wood
|
8386c05978
|
Explicitly check for non-NULL rather than treating NULL as boolean false.
|
2025-07-27 20:43:52 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 19:53:28 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 17:05:04 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 15:56:03 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 15:37:16 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 15:20:05 +01:00 |
|
Andrew Wood
|
2171f40703
|
Address the splint warning.
|
2025-07-27 00:34:09 +01:00 |
|
Andrew Wood
|
960ff1572f
|
Pass state->status, rather than state itself, to pv_format (#165).
|
2025-07-27 00:31:45 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 00:22:57 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-26 22:49:29 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-26 22:28:39 +01:00 |
|
Andrew Wood
|
18548d217b
|
Rename struct pvipcstate_s to pvcursorstate_s since it is for cursor positioning, not for IPC (#165).
|
2025-07-26 21:30:16 +01:00 |
|
Andrew Wood
|
653326ca9b
|
Rename struct pvcursorstate_s to pvipccursorstate_s for clarity since it is only for IPC (#165).
|
2025-07-26 21:29:20 +01:00 |
|
Andrew Wood
|
0cf8902d9b
|
Rename display structure member "display_visible" to "output_produced" for clarity.
|
2025-07-26 21:25:54 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-26 21:18:13 +01:00 |
|
Andrew Wood
|
3bd49a0c3f
|
Ensure the current average rate calculation can't accidentally divide by zero.
|
2025-07-26 20:53:22 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-26 20:51:28 +01:00 |
|
Andrew Wood
|
3b0891b128
|
Pass more specific structures to pv_calculate_transfer_rate rather than the whole state (#165).
|
2025-07-26 19:22:07 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-26 18:33:24 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-26 18:24:47 +01:00 |
|
Andrew Wood
|
0070a74390
|
Correct a minor typo in a comment.
|
2025-07-26 17:57:46 +01:00 |
|
Andrew Wood
|
283bafa228
|
Word wrap update from auto generation.
v1.9.34
|
2025-07-26 14:58:02 +01:00 |
|