Comments (22)
haha, no the issue is on latest freebsd and macos; build from head master and ran with -2, still only shows one chart, -c and others do not work
from ttyplot.
@fcambus any chance you could bump ttyplot to 1.5.2 to fix issue #102 (comment) for users of OpenBSD?
from ttyplot.
I cannot reproduce:
$ git switch master
Already on 'master'
Your branch is up to date with 'upstream/master'.
$ git pull upstream
Already up to date.
$ git clean -dxf # make this as clean as it gets
Removing ttyplot
$ make
cc -Wall -Wextra ttyplot.c `pkg-config --libs ncurses 2>/dev/null || echo '-lcurses -ltinfo'` -o ttyplot
$ ./ttyplot -v
ttyplot 1.5.1
$ ./ttyplot -h
Usage:
ttyplot [-h] [-v] [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]
-2 read two values and draw two plots, the second one is in reverse video
[snip]
$ seq 1 80 | ./ttyplot -c o
# A plot is displayed with the ‘o’ character.
$ lsb_release -ds
Ubuntu 22.04.3 LTS
from ttyplot.
I can't reproduce either,
git checkout 1.5.1
rm ttyplot && make
seq 1 80 | ./ttyplot -c o -m 40 -t "I ain't scared of no ghosts." -u ghosts
Works great!
from ttyplot.
@tenox7 can you define broken and share more about the environment? E.g. is it a box with ancient broken getopt by any chance?
from ttyplot.
It could be that optind
needs to be reset to 1 instead of 0.
from ttyplot.
@tenox7 (and everyone else): Could you check if this MR works for you? If yes, I also incremented the version numbers for a hotfix release.
from ttyplot.
tried https://github.com/MIvanchev/ttyplot/tree/issue-102-potentially-incorrect-usage still same issue, both freebsd and macos
from ttyplot.
@tenox7 OK, I know what the issue is, stand by.
from ttyplot.
thank you :)
from ttyplot.
@tenox7 Try now? I've added some BSD and Mac logic.
from ttyplot.
checking (thank you!)
from ttyplot.
same repo? just did git clone https://github.com/MIvanchev/ttyplot.git && cd ttyplot && make ttyplot && ./ttyplot -2
linux: works
freebsd: doesnt
macos: doesnt
from ttyplot.
git clone --branch issue-102-potentially-incorrect-usage
https://github.com/MIvanchev/ttyplot.git && cd ttyplot && make ttyplot && ./ttyplot -2
from ttyplot.
wait I guess I forgot to switch the branch
from ttyplot.
ok branch remotes/origin/issue-102-potentially-incorrect-usage
works!
linux: works
macos: works
freebsd: works
thank you! please send a PR
from ttyplot.
It's here #103, good thing you test on non Linuxes :))
P.S.
I'll research how to set automated tests for that.
P.S.S.
Versions numbers are adjusted for 1.5.2 if you decide to hotfix immediately.
from ttyplot.
thank you for fixing @MIvanchev much appreciated!!!!
from ttyplot.
NP, this is a small one, much more work to be done.
from ttyplot.
FYI pull request Homebrew/homebrew-core#154651 by @Porkepix will get 1.5.2 with the fix into homebrew for macOS. OpenBSD with current 1.5.1 is also affected. Is anyone in touch with them on the topic already?
from ttyplot.
@fcambus any chance you could bump ttyplot to 1.5.2 to fix issue #102 (comment) for users of OpenBSD?
I just committed an update, thanks for the heads-up!
from ttyplot.
@fcambus excellent, thank you! 👍
from ttyplot.
Related Issues (20)
- Please add a Fish shell completion file HOT 1
- [1.5.2] `ttyplot.c:129:9: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'` HOT 5
- [1.5.2] `ttyplot -c X -2` fails to use ASCII character "X" for drawing? HOT 2
- (Plans and remaing todos for) Release 1.6.0 HOT 6
- ttyplot doesn't build (in general and on Void Linux) because of issues in the Makefile HOT 15
- Use of `M_PI` in `stresstest.c` is not C99 and unfortunately breaks compilation with musl libc HOT 5
- [1.6.1] Chart output corrupts after a few minutes on macOS? HOT 20
- Shortcut for live plot of memory usage? HOT 7
- [1.6.3] Pretends to be 1.6.2. Re-release as 1.6.4 after a fix? HOT 2
- [1.6.4] CI is broken on `master` HOT 3
- use hline() vline() instead of drawing by hand HOT 1
- better SIGWINCH handler HOT 2
- stdin closes on SIGWINCH on some systems HOT 3
- [1.5.1] Minimum window size assumptions can be violated? HOT 4
- error: format not a string literal and no format arguments HOT 6
- handle window resize on older systems HOT 2
- Multi-byte characters not supported? HOT 17
- Average should be calculated from the available samples instead of the total number of potentially availalbe values HOT 4
- Release a new version and support -v option? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ttyplot.