summaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #7 from skurtz97/feature/views-and-dec-glyphsHEADmainSean Kurtz2 days28-607/+2906
|\ | | | | views: PS, FS and LOG, and a DEC-graphics frame
| * tidy: switch off bugprone-signed-bitwiseSean Kurtz2 days1-0/+8
| | | | | | | | | | | | | | | | | | | | | | LLVM 23's version of the check reports unsigned operands, not just signed ones: '\''unsigned b = a >> 2;'\'' and '\''p[0] = (unsigned char)(len >> 8);'\'' both warn, which is what the 22 findings in this tree were about. Left on it would mean either a NOLINT on every big-endian read or casts that change nothing, so it goes off with the demonstration written beside it, as the config asks. What is left after that is the five findings the project already carries: four atoi() calls on COLUMNS and LINES and the analyzer false positive at the region[] guard.
| * zmcs_req: the size check counted the compiler's paddingSean Kurtz2 days1-1/+3
| | | | | | | | | | | | | | | | | | The assert demanded sizeof == 188, which is the end of the csa field; the struct itself is 192 because save[] makes it 8-byte aligned. Linux built it silently -- the check is inside #if defined(__MVS__) -- and the first z/OS build failed on it. Assert the end of the last field instead, which is what the stub's interface actually ends at and does not depend on how the compiler pads a struct.
| * views: PS, FS and LOG, and a DEC-graphics frameSean Kurtz2 days28-607/+2896
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes that share files -- the views, and the screen they are drawn on -- so one commit; splitting them would mean splitting src/ztop.c and tui/tui.h by hunk, which is not a split a reviewer could follow. The views. Seven tabs instead of four: PS (w_getpsent), FS (w_getmntent plus statvfs) and LOG, a read-only extended MCS console behind -c. LOG needs supervisor state, so MCSOPER and MCSOPMSG live in src/zmcs.s: it switches to supervisor state, calls the macro, switches back, and hands the caller a copy of the message data block. src/mdb.c walks that MDB (IEAVM105) for the job name and the text line, and is separate from src/ztop.c because it is the one place ztop parses bytes written by another address space, so it is worth a test that runs anywhere. The small structs become C23 typedefs, src/vsm.c keeps the 16M line apart, and README lists the seven views and the keys they moved. The screen. The frame, the meters and the scrollbar were the last parts that said "curses". Borders and meters are now the DEC Special Graphics set, designated into G0 with ESC ( 0 and released with ESC ( B, with a fallback to + - | # when TERM is not one we know; the meters are shade fill over a horizontal rule instead of a [#### ] bar; table selection is a background colour instead of reverse video, which is the tell almost everyone recognises as curses; the tab row separates with a gap instead of |; titles are a dim style and the frame is grey so the accent colour means selection. The designation is tracked per cell, because an SGR reset does not leave the graphics set, and only the cells that carry a border glyph pay for it -- six bytes a row at 80 columns. Everything stays 7-bit ASCII in the source, which is what .gitattributes now enforces for the whole tree: one rule, ISO8859-1 in the working tree, the same line the zopen git port uses, so a checkout on z/OS is tagged ASCII for make, sh, awk and the compiler and no file needs a hand tag. Verified on Linux: make test TESTCC=cc green (test_vsm, test_sys, test_mdb, tui/test_tui, leakcheck), make tidy adds no finding to the ten that predate this, src/ztop.c passes -fsyntax-only with the project's warnings. The frame was checked against a painted screen with tests/screen.py, which now understands ESC ( 0. Not yet built on z/OS: the CBT build, make check and make leakcheck run after the push and the PR carries their result.
* | Update README.mdSean Kurtz2 days1-1/+1
|/ | | Bad grammar in README.
* Merge pull request #6 from skurtz97/feature/tabsSean Kurtz4 days14-130/+737
|\ | | | | System, jobs, paging views and a leak check
| * docs: four views, the IPL fields, the leak checkSean Kurtz4 days2-7/+27
| |
| * ztop: PVT has an unallocated pass, so it gets a total and a percentSean Kurtz4 days3-5/+18
| | | | | | | | | | Only CSA and PVT are asked for unallocated blocks; SQA and LSQA keep the dash, because their totals are not knowable this way.
| * tui: uppercase table headers, and a storage line that fitsSean Kurtz4 days2-14/+30
| | | | | | | | | | | | The percent now sits next to the bar instead of floating, the unallocated total is in the same units as the table, and the headers read USED like the rest of the row.
| * tests: a pty painter that prints the screen ztop thinks it drewSean Kurtz4 days3-1/+79
| | | | | | | | | | Checking the layout by eye over ssh is slow and lossy; this applies the output to a 100x30 grid and prints each frame after a key.
| * tui: key-cap hints in the help, the panel and the status barSean Kurtz4 days1-50/+62
| | | | | | | | | | | | The help box is a titled frame with the same hint rows as the bar, the subpool panel labels its values dim, and the bottom line names the keys that matter for the view instead of one fixed string.
| * leakcheck: compare the heaps of the modes, not gets with freesSean Kurtz4 days1-24/+37
| | | | | | | | | | | | | | Language Environment keeps a few kilobytes of its own heap for the enclave lifetime, so an absolute get/free match never holds. What does hold is that ztop allocates nothing: every mode must end with the same heap, and one that ends larger is the leak.
| * make tag: retag a fresh checkout, and run the leak check on cbtSean Kurtz4 days2-2/+15
| | | | | | | | | | | | git does not carry the ISO8859-1 tag, so a checkout makes the z/OS tools read ASCII through the EBCDIC converter. The target is one line per source group and ignored off z/OS.
| * leakcheck: a shell check of the LE report, with a selftestSean Kurtz4 days3-41/+78
| | | | | | | | | | | | The old z/OS awk rejects comments and trips over the program file, so the report is summed with sed and shell arithmetic instead. --selftest feeds it one clean and one leaking report so the checker itself is tested.
| * leak.awk: pattern matching the old z/OS awk acceptsSean Kurtz4 days1-17/+15
| |
| * leakcheck: awk wants -f, and its z/OS build wants no commentsSean Kurtz4 days2-17/+3
| |
| * leakcheck: let Language Environment look for a leakSean Kurtz4 days6-64/+242
| | | | | | | | | | | | | | RPTSTG, RPTOPTS and HEAPCHK will not find what the program never asks for, but they do see every get and every free. Every one-shot mode now runs under them and the storage report is checked for a heap request that was never returned.
| * ztop: system IPL and storage, a paging view, a 10 second refreshSean Kurtz4 days7-22/+265
|/
* Merge pull request #5 from skurtz97/feature/sort-detailsSean Kurtz4 days3-14/+234
|\ | | | | Sort the tables, a subpool panel, a live status line
| * docs: sorting, the detail panel and the status linefeature/sort-detailsSean Kurtz4 days1-1/+4
| |
| * ztop: room for the sort arrow in the column titlesSean Kurtz4 days1-4/+4
| |
| * ztop: sort the tables, a subpool detail panel, live status lineSean Kurtz4 days2-9/+226
|/ | | | | | | s changes the sort column and S reverses it; the header shows the column and direction. Enter opens a panel with every field of the selected subpool. The status line now shows what is under the cursor instead of just PAUSED.
* Merge pull request #4 from skurtz97/feature/mouseSean Kurtz4 days5-22/+166
|\ | | | | Mouse, clickable tabs, wheel and clearer help
| * tui: mouse messages; ztop: clickable tabs, wheel, better helpfeature/mouseSean Kurtz4 days5-22/+166
|/ | | | | | | Enable xterm SGR mouse reporting and decode it into TUI_MSG_MOUSE. ztop uses it for the view tabs, the storage sub-tabs, table rows and the wheel. The help panel now lists navigation explicitly, and the status line shows the keys for the current view.
* Revert "tui: mouse messages; ztop: clickable tabs, wheel, better help"Sean Kurtz4 days5-166/+22
| | | | This reverts commit 5f8909cf7beeefa6318c795f8bf52b4b9f4361ae.
* tui: mouse messages; ztop: clickable tabs, wheel, better helpSean Kurtz4 days5-22/+166
| | | | | | | Enable xterm SGR mouse reporting and decode it into TUI_MSG_MOUSE. ztop uses it for the view tabs, the storage sub-tabs, table rows and the wheel. The help panel now lists navigation explicitly, and the status line shows the keys for the current view.
* Merge pull request #3 from skurtz97/fix/default-tuiSean Kurtz4 days2-4/+13
|\ | | | | Bare ztop on a terminal starts the TUI
| * ztop: start the full-screen view for a bare run on a terminalfix/default-tuiSean Kurtz4 days2-4/+13
|/ | | | | | `ztop` with no arguments printed the one-shot CSA report even on a tty, which is not what a person expects from a monitor. Now a terminal and no report option means the TUI; -a, -s, -j, -x and a pipe keep the text.
* Merge pull request #2 from skurtz97/feature/viewsSean Kurtz4 days20-1207/+2233
|\ | | | | A TUI library with tabs, and system/jobs views
| * docs: describe the views, the library and the CVT/ASVT sourcefeature/viewsSean Kurtz4 days2-47/+105
| |
| * tui: let update reach the app, so quit worksSean Kurtz4 days4-8/+7
| |
| * sys: read the ASID as a halfword and print EBCDIC fields as readSean Kurtz4 days1-11/+12
| |
| * sys: __e2a_l converts in place, two argumentsSean Kurtz4 days1-2/+4
| |
| * tui: a library of messages and widgets; add system and jobs viewsSean Kurtz4 days18-1160/+2126
|/ | | | | | | | | | | | | | The screen code moves to tui/ as a small toolkit: a cell buffer with a diffing flush, a message loop in the shape of Bubble Tea (model, update, view, ticks), and widgets for a viewport, a table, tabs, a text input, a progress bar and a status line. ztop is now one user of it. ztop grows two views beside storage: SYSTEM (CVS name, release, address space count) and JOBS (one line per ASCB, from the CVT and ASVT, which need no authorization). Views are tabs; each table keeps its own selection and scroll position. Follows the zash code style: doxygen headers, .clang-format, POSIX make.
* Merge pull request #1 from skurtz97/feature/tui-stateSean Kurtz4 days12-229/+2236
|\ | | | | Parse the VSMLIST answer and show it in a full-screen view
| * gitignore: core dumps and assembler listingsfeature/tui-stateSean Kurtz4 days1-0/+2
| |
| * ztop: space out the region list, show real output in READMESean Kurtz4 days3-7/+12
| | | | | | | | | | The first region ran into the word 'regions' and later ones had no separator. The README sample is now what the tool actually prints.
| * ztop: -d takes its intervalSean Kurtz4 days1-3/+3
| |
| * tui: keys are EBCDIC, like every other character constantSean Kurtz4 days1-15/+1
| | | | | | | | | | | | | | | | Converting input with __e2a_l was exactly backwards: on z/OS a character constant or string literal is EBCDIC ('2' is 0xF2, 'q' is 0x98, '[' is 0xAD), and the terminal hands back those same bytes, so a plain compare already worked. Keep the cursor restore from the previous change and drop the translation.
| * tui: translate input from EBCDIC, restore the cursorSean Kurtz4 days1-2/+16
| | | | | | | | | | | | | | | | The tty converts output but not input, so keys and cursor reports arrive as EBCDIC in raw mode: 'q' is 0x98 and the report starts 0x27 0x5B. Translate each read with __e2a_l before decoding, and make the code that looks for ESC use the ASCII 0x1b it sees afterwards. Leaving the screen also forgot to show the cursor again.
| * Makefile: assemble src/zvslist.S through clang, no chtagSean Kurtz4 days1-7/+13
| | | | | | | | | | | | | | | | The integrated assembler on Open XL 2.2 is GNU syntax and rejects HLASM (CSECT, SYSSTATE). With -fno-integrated-as clang hands the preprocessed source to HLASM instead; -Xpreprocessor -P keeps the cpp line markers out of it, and clang writes the temporary HLASM reads, so the checked-out ASCII file no longer has to be tagged first.
| * zvslist: fix the service call and build the stub with clangSean Kurtz4 days4-87/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three separate faults kept the call from returning: - the binder rewrites =A(zvslist) into a function descriptor in an XPLINK module, so loading it into the base register sent every literal and branch elsewhere; BALR alone is the base setup the assembler needs; - WKAREA=((4),5) passes the literal 5 as the work-area length, not R5, so the macro stored its control block at the start of a request it had been told was five bytes long; - FREE and UNALLOC are different macro expansions, not a runtime space operand, so the stub now branches to power the right one. Rename the source to src/zvslist.S and let ibm-clang assemble it, which removes the chtag/column-71/EBCDIC dance from the build. With these changes VSMLIST answers without an APF bit, so the docs no longer claim otherwise, and the sample output is the real layout.
| * ztop: fix the assembler entry name and z/OS test compilerSean Kurtz4 days3-4/+7
| | | | | | | | | | | | | | | | | | | | HLASM upcases the CSECT name, so the C declaration needs the ZVSLIST asm label (the binder otherwise reports it unresolved). /bin/cc on z/OS is the old XL C compiler and rejects -std=c17; tests build with ibm-clang, and the README says to override TESTCC=cc on a Linux host. Also note the Makefile's own chtag step: after a git checkout it can be tagged UTF-8, and make spins reading it until it is ISO8859-1.
| * ztop: parse the VSMLIST answer, add a full-screen viewSean Kurtz4 days12-169/+2165
|/ | | | | | | | | | | | | | | | | | | | The old parser scanned from offset 4, which is the data-area pointer, not the data. Read the documented framing instead: the work area's first word is the service return code, then the address and length of the data area. Continuation (rc=4) reuses the same work area and must not clear that word, so the request build now happens once and each piece is merged. Parsing follows the reference: subpool descriptors, allocated blocks with their free descriptors (used = block length - free), unallocated regions and holes for CSA and PVT. CSA gets a total and a percentage; the other areas do not have that request. The display is a small cell-buffer TUI: diffed output, ASCII box drawing, termios raw input, CPR sizing because TIOCGWINSZ reports zero on z/OS, and EBCDIC ESC on __MVS__. One-shot output stays exact bytes for grep. tests/test_vsm.c builds synthetic data areas for the parser and runs on any host; tests/demo_tui.c exercises the terminal layer.
* zvslist: drop the TESTAUTH gate, it reported 4 on an authorized moduleskurtz974 days2-16/+3
|
* ztop: say which code the stub returnedskurtz974 days1-2/+4
|
* zvslist: keep the request block in R11, the reload from 16(,13) was the faultskurtz974 days1-7/+8
|
* Makefile: parenthesise the pipeline, z/OS make spins on |-and-||skurtz974 days1-3/+5
|
* Makefile: explicit rule, no suffix rule: z/OS make spins on .s.o for src/*.oskurtz974 days1-6/+6
|
* Makefile: POSIX make, the one z/OS shipsskurtz974 days1-23/+36
|