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

Handle linefeeds #2

Merged
merged 26 commits into from
Jun 13, 2018
Merged

Handle linefeeds #2

merged 26 commits into from
Jun 13, 2018

Conversation

NiLuJe
Copy link
Owner

@NiLuJe NiLuJe commented Jun 13, 2018

As in, the LF character (0x0A), not the escape code (\n).

NiLuJe added 26 commits June 13, 2018 00:50
This "works", but it's not pretty, it's buggy, and, well, bleh.
They were clobbering each other, because we assumed they all took up one
line, instead of the actual amount print had to spread them over.
0 times crap still equals zero!
Fix that, so printing a single char isn't interpreted as failure...
Padding, centering, & both now work with LF reflowing.
Also, we don't care about available_cols, we've already diagnosed it at the beginning, and it cannot change.
Revert the actual code changes that never should have made it to the
previous commit... Ooops.
So, expand the hextoc Python script for MINIMUM EFFORT! :D
Now you can basically blindly c/p, there's no hand-tweaking needed.
Now you *really* can do it blinfolded ;p.
@NiLuJe
Copy link
Owner Author

NiLuJe commented Jun 13, 2018

Meaning if you want to print your own stuff with linefeeds, get something else to handle the escape code conversion.

i.e., fbink "$(echo -e "This\nis\nprinted\nover\nmultiple\nlines")" -x 1 -y 10

@NiLuJe
Copy link
Owner Author

NiLuJe commented Jun 13, 2018

The LF character gets rendered as a blank space, and I'm keeping it that way, for... reasons.

(It makes padding prettier, and the code simpler to deal with).

@NiLuJe NiLuJe merged commit f9c262d into master Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant