Eliminate `bootstrappable.c`

Open
#74 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Read bootstrappable.c and trace the remaining require, match, in_set, and strtoint call sites. Check which standard interfaces are already available, then replace the uses and remove the obsolete functions; completion means the listed non-standard functions are gone or unused, while int2str remains as noted.

Written by the indexing model from the issue text.

Description

good first issue

bootstrappable.c has a number of functions from the early years of the M2* projects that were helpful at the time. However, we have gradually moved away from these towards more standard C library interfaces (as per this project).

We should eliminate the remaining non-standard functions from bootstrappable.c, first by introducing the new interfaces where they do not already exist, then replacing existing code with the standard interfaces, then removing the old functions.

  • require -> assert
    • implemented
    • replaced
    • removed
  • match -> strcmp
    • implemented
    • replaced
    • removed
  • in_set -> strchr
    • implemented
    • replaced
    • removed
  • strtoint -> atoi
    • implemented
    • replaced
    • removed
  • int2str is probably not removable at this time
Dominant language
C
Stars
27
Forks
20
Avg merge
5d 12h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oriansj/M2libc

All issues in oriansj/M2libc

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.