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

tinystdio: ungetc decrements file position indicator correctly #6

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Apr 24, 2024

  1. tinystdio: ungetc decrements file position indicator correctly

    According to the ISO/IEC_9899_1999, section: J.5.16 it is mentioned that there is a file position indicator that is decremented by each call of the ungetc function.
    
    The value of the file position indicator was not directed to the right position, this issue is now handled in the ftell function
    so the file indicator is placed correctly after the function
    ungetc is called.
    An "if" condition is added which checks on the value of unget and if it is not equal zero then ungetc function is called so the indicator will be decremented.
    
    Signed-off-by: Hana Ashour <[email protected]>
    HanaMAshour committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    89eb6c3 View commit details
    Browse the repository at this point in the history
  2. tinystdio: Add __atomic_load_ungetc

    This allows fetching the unget value using stdatomic interfaces to
    ensure atomicity wrt other unget operations.
    
    Signed-off-by: Keith Packard <[email protected]>
    keith-packard committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    f5140fe View commit details
    Browse the repository at this point in the history
  3. tinystdio: Check for pending unget in ftell

    A pending unget value means that the underlying reported seek position
    will be off by one.
    
    Signed-off-by: Keith Packard <[email protected]>
    keith-packard committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    5badc7b View commit details
    Browse the repository at this point in the history
  4. test: Test ftell in combination with ungetc

    Make sure ungetc affects ftell value correctly.
    
    Signed-off-by: Keith Packard <[email protected]>
    keith-packard committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    8272f29 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2024

  1. test: fixed copyrights

    pulled the changes from PR picolibc#719 and changed the copyrights in the test
    
    Signed-off-by: Hana Ashour <[email protected]>
    HanaMAshour committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    d979d28 View commit details
    Browse the repository at this point in the history