Skip to content
New issue

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

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

Already on GitHub? # to your account

let printf understands %c #286

Open
wants to merge 2 commits into
base: riscv
Choose a base branch
from
Open

Conversation

AnzhiZhang
Copy link

@AnzhiZhang AnzhiZhang commented Oct 24, 2024

We utilize xv6 as part of our teaching materials. Recently, we designed an exercise in which students use pipes to send bytes and display characters via printf. During this, we observed that the current printf implementation in xv6 does not support the %c specifier to print single characters.

This update involves only two additional lines and allows for %c usage, which is frequently needed for character display. We believe this adjustment would enhance the learning experience and minimize confusion among students.

It looks like forgot to implement when rewriting printf in dd2574b. In the commented parts, parsing %c still exists.

resolves #283

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

printf() with %c to print a single char does not work
1 participant