Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xxd -n option #214

Open
fvalasiad opened this issue Dec 1, 2023 · 8 comments · May be fixed by #217
Open

xxd -n option #214

fvalasiad opened this issue Dec 1, 2023 · 8 comments · May be fixed by #217

Comments

@fvalasiad
Copy link
Collaborator

xxd fails because it does not recognize -n schema.

Failing to find any info on the web or manpage regarding that option, is it platform-specific?

I'd recommend instead letting it just print the values and then simply doing:

arr = { #include "schema.h" }

@zvr
Copy link
Collaborator

zvr commented Dec 3, 2023

I've been using xxd that comes with vim,
I don't think xxd is specified in POSIX, so relying on any specific behavior will be problematic, anyway.

@zvr zvr changed the title Cannot build from clean fork either. xxd -n option Dec 3, 2023
@fvalasiad
Copy link
Collaborator Author

@zvr Should I look for alternative POSIX defined ways to achieve the same result? Or even code it, it's relatively simple.

@zvr
Copy link
Collaborator

zvr commented Dec 4, 2023

I don't think it's worth it. This is only used when the schema changes, which should be rare.
We just have to make sure that the generated .h file is included in the release tarball.

@fvalasiad
Copy link
Collaborator Author

@zvr Do I fix the above PR then and make sure the generated schema.h is included in the tarball?

@zvr
Copy link
Collaborator

zvr commented Dec 4, 2023

Yes, please -- something like #213.
Submit a new PR and close the old one, there will be no relation in the code.

@fvalasiad
Copy link
Collaborator Author

@zvr I am a little confused, what is the goal of the PR? The problem of schema not being included in the tarball was already somehow dealt with in #213. In the PR it can be seen that I also include $SCHEMA in the tarball.

If we are not tackling the -n option issue with #215, what do we do instead?

@zvr
Copy link
Collaborator

zvr commented Dec 5, 2023

The schema is included in the tarball.
The new PR should also add the generated schema.c in the tarball, so that people can compile the software without need to use xxd.

@fvalasiad fvalasiad linked a pull request Dec 6, 2023 that will close this issue
@fvalasiad
Copy link
Collaborator Author

Well looking around out of curiosity. vim/vim@83e1180

It's a fairly recent addition, so my current OS based off of ubuntu jammy 22.04 does not include it. Debian 12 should have it though, it's only LTS versions that are impacted by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants