21ca350946
Use specific types for display widths, byte counts, and type of format string component, mainly to have the option of packing more into less space.
Andrew Wood2024-12-17 23:55:15 +00:00
02bf302f96
If ncurses is not supported, provide code to call "tputs" via popen(), but do not enable it because it is not very safe, and instead just assume colour is always available.
Andrew Wood2024-12-17 22:48:43 +00:00
76327fdf01
Only set format_uses_colour if colour is permitted for this display (i.e. the display is for a terminal and not a process or window title).
Andrew Wood2024-12-17 22:47:41 +00:00
8664395e5b
Adjust the script so it does not specifically apply to this package and can be re-used in others.
Andrew Wood2024-12-16 21:25:25 +00:00
3c09b31f92
Add colour code support with a %{sgr:...} format sequence.
Andrew Wood2024-12-15 23:25:20 +00:00
43e2eaa4db
Removed misplaced splint annotation.
Andrew Wood2024-12-15 22:54:15 +00:00
f3e98da13b
Prevent the background test components from waiting forever for the following PV process to start.
Andrew Wood2024-12-15 15:00:51 +00:00
25eaa2661a
Note the test race condition cleanup.
Andrew Wood2024-12-15 14:42:52 +00:00
4f58a3d751
Make background test processes wait for their subsequent foreground PV to start, to make a race condition less likely to trigger test failures on slower systems.
Andrew Wood2024-12-15 13:36:14 +00:00
7d18083dda
Handle the fact that the GNU Hurd sets the signal sender PID to -1, not either 0 or the signal sender, in the siginfo structure.
Andrew Wood2024-12-14 23:41:24 +00:00
f0aca0a2ce
Store the calculated percentage as a double rather than an int, so the granular progress bar is still granular on wide displays.
Andrew Wood2024-12-14 17:06:37 +00:00
18c76175b2
Read the PID from the correct work file when testing remote control of the extra display.
Andrew Wood2024-12-14 16:28:51 +00:00
8fa9df6e7a
New --bar-style option; replace "default" with "plain" or with a lookup against the selected default, as appropriate.
Andrew Wood2024-12-14 00:06:30 +00:00
e3382b1a62
Document the %{bar-*} format sequences.
Andrew Wood2024-12-13 23:15:08 +00:00
29c7a21725
Increase the size of the progress bar buffer.
Andrew Wood2024-12-13 20:55:39 +00:00
cb71277df4
Allocate more space for the display buffer, as wide characters take up more room.
Andrew Wood2024-12-13 20:38:45 +00:00
9f5923864b
Inhibit UTF-8 based bar formats when UTF-8 output support is not detected, falling back to the default format instead.
Andrew Wood2024-12-13 20:17:01 +00:00
60563f3e3c
New bar formats - default, block, granular, shaded - with the granular format providing a smoother bar using Unicode block characters (#15)
Andrew Wood2024-12-13 20:02:36 +00:00
5efd4d045f
Adjust the way the leading space is formatted, to better translate to Markdown.
Andrew Wood2024-12-10 23:10:57 +00:00
0516ba53bd
Remove the example with "dialog" and add a more usual use case with tar.
Andrew Wood2024-12-10 23:08:00 +00:00
1d76c0bc64
Permit decimals with suffix for --size, --rate-limit, --buffer-size, and --error-skip-block (#35); and document the types of numbers allowed in the manual.
Andrew Wood2024-12-10 22:09:32 +00:00
73bc1ab139
Classify --watchfd and --remote as "alternative operating modes" rather than "data transfer modifiers" since they change the way PV runs entirely.
Andrew Wood2024-12-10 21:05:59 +00:00
35fdb331e4
Add a leading space to the exit status codes, for readability.
Andrew Wood2024-12-10 21:01:38 +00:00
9ceda2059d
Set the indent so that the exit status items do not waste a line each.
Andrew Wood2024-12-10 20:59:04 +00:00
0e24c9f453
Use long options in examples where it makes sense to do so, for readability.
Andrew Wood2024-12-10 20:56:25 +00:00
ad54067b48
Note that --watchfd works on macOS as well as Linux, and correct the capitalisation of macOS elsewhere.
Andrew Wood2024-12-10 20:50:53 +00:00
e99a58b430
Remove the SY macros from the manual since they are not universally supported, and replace the technically correct and complete, but user-hostile, synopsis with a simplified version that lists the main modes of operation.
Andrew Wood2024-12-10 20:44:43 +00:00
51a5de71c1
Add a "can_display_utf8" flag based on the current locale, for future use.
Andrew Wood2024-12-09 23:23:07 +00:00
06eca8cefa
Renamed for consistency - pv__ for static functions, and name the array an array.
Andrew Wood2024-12-09 21:52:25 +00:00
a4494159ea
Positions update after moving the formatter functions.
Andrew Wood2024-12-09 21:46:00 +00:00
c95e25776e
Move the formatter functions into separate files so that display.c is less of a monolith; and replace the ctype.h macros with internal versions.
Andrew Wood2024-12-09 21:42:16 +00:00
c2a5be6aa9
Allow SKIP_VALGRIND_TESTS to be passed through to package building.
v1.9.15
Andrew Wood2024-12-08 23:15:31 +00:00
35d5b9efab
Handle wide characters and ECMA-48 CSI sequences in the format string when calculating string widths.
Andrew Wood2024-12-08 21:38:38 +00:00
f495303177
List all supported format sequences in the output of "--help".
Andrew Wood2024-12-08 20:40:05 +00:00
fb2e6b4074
New "--format" sequences "{progress-bar-only}" and "{progress-amount-only}".
Andrew Wood2024-12-08 20:13:33 +00:00
4ffdee0002
Introduce the pv_strwidth() function so that in future we can add support for escape sequences and UTF-8 in format strings.
Andrew Wood2024-12-08 17:40:12 +00:00
57149c2d03
Add long names to format sequences, such as "%{rate}".
Andrew Wood2024-12-08 17:16:02 +00:00
838ebcb78f
Improve the handling of dangling or invalid "%" sequences.
Andrew Wood2024-12-08 16:18:58 +00:00
6298a7be9d
Refactor the display formatters into their own functions, remove the static arrays for component contents, and start tracking the displayed width of each segment separately from the length in bytes.
Andrew Wood2024-12-08 16:04:00 +00:00
cfea00b200
Use standalone flags to indicate whether we are tracking the last bytes output or the previous line written, so that the component array is not needed outside of display.c.
Andrew Wood2024-12-08 10:23:24 +00:00
3d52919411
Remove the caveat about only specifying "%p" once, as it can now be used more than once.
Andrew Wood2024-12-07 23:26:12 +00:00
619a84949f
New format sequence "%nL" to display the most recently written line (#121).
Andrew Wood2024-12-07 23:12:41 +00:00
c3648af57f
Handle the progress bar appearing more than once in the format string.
Andrew Wood2024-12-07 20:23:20 +00:00
53b5ea54c6
Track the chosen size of format segments so that "%nA" can appear more than once, with different "n" values (#122).
Andrew Wood2024-12-07 19:39:44 +00:00
c4c7b9ec00
Refer to "bytes" rather than "length", so that in future we can differentiate between the number of bytes in a string and how many display columns it occupies.
Andrew Wood2024-12-07 17:17:59 +00:00
b428e7613d
Revert back to one test at a time, make it tunable.
Andrew Wood2024-12-07 16:39:12 +00:00
0e9534c10e
Correct how the permissions are set, now that subdirectories are present.
Andrew Wood2024-12-07 16:20:48 +00:00
31ea20dbd3
New script to help with the release process.
Andrew Wood2024-12-07 02:20:30 +00:00
97c48c8901
Allow valgrind tests to be skipped with an environment variable.
Andrew Wood2024-12-07 02:20:04 +00:00
bb339ba519
New script to build a package from the source (.rpm, .deb).
Andrew Wood2024-12-07 01:26:44 +00:00
499f8418bf
Move dev/test scripts from dist_doc_DATA to EXTRA_DIST so they do not get installed in /usr/share/doc/ but are just included in the sources.
Andrew Wood2024-12-07 01:23:20 +00:00
b84432ec7f
Change buffer pointer type to "char *" to avoid doing pointer arithmetic on "void *".
Andrew Wood2024-12-06 22:46:28 +00:00
29423f1f9a
Add a cross-compilation check before release.
Andrew Wood2024-12-03 21:59:53 +00:00
d51c57379a
When cross-compiling, we cannot run a test program to check whether a siginfo_t provides the signal sender PID, so we fall back to assuming that it does, and also check that SA_SIGINFO is declared so compilation will not fail on systems without it (#120).
Andrew Wood2024-12-03 21:04:58 +00:00
cf9e33a4e4
Rename the installation section to reflect what it is for.
Andrew Wood2024-12-02 17:40:14 +00:00
c07d6f9c49
Reword the compilation instructions.
Andrew Wood2024-12-02 17:39:32 +00:00
503a559b2a
Move "--extra-display" and "--stats" to the "Output modifiers" section, since they are not really display switches that directly affect the terminal progress display.
Andrew Wood2024-12-02 17:36:16 +00:00
d7d87fed76
Restructure and reformat the manual to be more in line with man-pages(7), with some small wording changes; move -8 and -k to the modifiers section rather than display switches; adjust "--help" output to report the options in the same order the manual lists them.
Andrew Wood2024-12-02 00:02:18 +00:00