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

Reduce use of carriage returns #97

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Reduce use of carriage returns #97

wants to merge 3 commits into from

Commits on Apr 15, 2022

  1. Switch from fprintf to printf.

    Since print_page_residency_chart() was only ever called with the first
    parameter set to stdout, this API flexibility is not used.  Simplify API
    until it's needed by removing the first parameter.
    pfee committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    25e231d View commit details
    Browse the repository at this point in the history
  2. Make function file scoped.

    This makes it easier to reason about function, knowing that it's never
    called outside this compilation unit.
    pfee committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    4c878f2 View commit details
    Browse the repository at this point in the history
  3. Move CR printing from print_page_residency_chart.

    The carriage return is not needed the first time
    print_page_residency_chart() is called.  By moving \r printing to the
    caller, it knows which is the first time.
    
    Only within the o_touch loop is print_page_residency_chart() called
    multiple times, so only within that loop is \r necessary.
    
    The final call to print_page_residency_chart() has been removed since it
    would print identical content to the previous time it was called,
    whether than be within the o_touch loop or not.  Hence it has been
    removed as all that's needed is to terminate the line with \n.
    pfee committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    ab21a14 View commit details
    Browse the repository at this point in the history