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

Addition of a man-page #559

Merged
merged 5 commits into from
Jun 21, 2023
Merged

Addition of a man-page #559

merged 5 commits into from
Jun 21, 2023

Conversation

czurnieden
Copy link
Contributor

A Troff formatted man-page.

@czurnieden
Copy link
Contributor Author

It is currently just an alphabetical list of LibTomMath's functions with the obligatory man-page boilerplates.

@sjaeckel
Copy link
Member

How did you generate this? (Please don't say by hand 😂)

@czurnieden
Copy link
Contributor Author

How did you generate this? (Please don't say by hand )

How can I answer that question if you forbid me to tell you? ;-)

But serious: grep'd the functions, formatted them with a bit of sed and tr and c&p'ed a lot of text from bn.tex.
Tables were a bit fiddly, but they seem to work now.

@czurnieden
Copy link
Contributor Author

Seems as if I am innocent this time:

 E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/b/babeltrace/libbabeltrace1_1.5.8-1build1_amd64.deb  503  Service Unavailable [IP: 40.119.46.219 80]

@czurnieden
Copy link
Contributor Author

Digged through my shell history:

grep -E "^mp_err" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "^void" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "^int" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "^uint" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "^long" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "^bool" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "^size_t" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
grep -E "define mp" doc/bn.tex | sed -e 's/ /\\ /g;s/^/.LP /' >> ~/DIV_C_FILES/ltm_functions
   ...
sort -u  ~/DIV_C_FILES/ltm_functions | > ~/DIV_C_FILES/ltm_functions_uniq
   ...
sort -k 3 ~/DIV_C_FILES/ltm_functions.troff  > ~/DIV_C_FILES/ltm_functions.troff_bis
mv -v ~/DIV_C_FILES/ltm_functions.troff_bis ~/DIV_C_FILES/ltm_functions.troff

The rest was done in the editor, so no "automagic" latex2troff here, sorry.

There is latex2man which I couldn't get working the way I wanted it to work but I did not spend a lot of time with it, so it might be my inability that was hindering latex2man to do its job.

@sjaeckel
Copy link
Member

Can you please cross check what I added?

@sjaeckel
Copy link
Member

There is latex2man which I couldn't get working the way I wanted it to work but I did not spend a lot of time with it, so it might be my inability that was hindering latex2man to do its job.

I also tried it out, but couldn't get it working...

Copy link
Member

@sjaeckel sjaeckel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe also install the manpages from the regular makefiles?

czurnieden and others added 4 commits June 21, 2023 17:01
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
@czurnieden
Copy link
Contributor Author

Can you please cross check what I added?

You added a check in helper.pl so it should be complete now.
I hope.

Should we maybe also install the manpages from the regular makefiles?

Yes. We have it, we brag aboutuse it.

What about the two random examples at the end? We have a couple in etc which…don't compile anymore. (path to tommath*h is wrong). Guh&hellip:reat. The implementation of the Maurer(?) algorithm in pprime.c has not been written for MP_64BIT it would take a couple of days as it is now. The link to the paper at gmail.com is broken (gets timeouts). And more.

Nah, not today, the odd problems with the timing over at #499 are enough for now.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
@sjaeckel
Copy link
Member

What about the two random examples at the end? We have a couple in etc which…don't compile anymore. (path to tommath*h is wrong). Guh&hellip:reat. The implementation of the Maurer(?) algorithm in pprime.c has not been written for MP_64BIT it would take a couple of days as it is now. The link to the paper at gmail.com is broken (gets timeouts). And more.

I've fixed them (at least to compile w/o warnings), will push it after I've merged this PR.

@czurnieden
Copy link
Contributor Author

I've fixed them (at least to compile w/o warnings), will push it after I've merged this PR.

Oh, you are way too fast!
Or am I too slow? ;-)

Couldn't get even a start point with the radix conversion problem, so I grabbed the low hanging fruits first and repaired the files in etc in #561. But I repaired the Maurer algorithm in pprime.c, too. Replaced the giant small-prime database with a call to mp_prime_next_prime because mp_prime_is_prime is deterministic up to 64 bits (and more). and adapted the rest.

Sorry.

@sjaeckel sjaeckel merged commit 38bb369 into libtom:develop Jun 21, 2023
77 checks passed
@sjaeckel sjaeckel added this to the v2.0.0 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants