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

New utility functions, allow inventory.html #1074

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

xexyl
Copy link
Contributor

@xexyl xexyl commented Jan 13, 2025

Sync jparse repo (https://github.com/xexyl/jparse/) to jparse/ with new utility functions that act on directory paths. These functions are:

  • dir_name(): takes a path and strips off level components (i.e. /). In the case of successive /s it removes those as well. The comments at the top of the function explains in more detail the way the level works. This is modelled after the base_name() function which functions as the basename(3) function; dir_name() functions as dirname(3).
  • count_comps(): counts in a string the number of components delimited by the component character (a char). Successive component characters are counted as one. The comments at the top of the function details specifics.
  • count_dirs(): using count_comps() (with component /), count the number of directory components in a path.

Updated the jparse utility test code to test the new functions.

Remove blacklisting of inventory.html file. This involved a new version of mkiocccentry, txzchk and chkentry as all of these tools prevented such files from existing.

Sync jparse repo (https://github.com/xexyl/jparse/) to jparse/ with new
utility functions that act on directory paths. These functions are:

- dir_name(): takes a path and strips off level components (i.e. /). In
the case of successive /s it removes those as well. The comments at the top of
the function explains in more detail the way the level works. This is modelled
after the base_name() function which functions as the basename(3) function;
dir_name() functions as dirname(3).
- count_comps(): counts in a string the number of components delimited by the
component character (a char). Successive component characters are counted as
one. The comments at the top of the function details specifics.
- count_dirs(): using count_comps() (with component /), count the number
of directory components in a path.

Updated the jparse utility test code to test the new functions.

Remove blacklisting of inventory.html file. This involved a new version of
mkiocccentry, txzchk and chkentry as all of these tools prevented such
files from existing.
Copy link
Contributor

@lcn2 lcn2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lcn2 lcn2 merged commit b99b6e2 into ioccc-src:master Jan 13, 2025
3 checks passed
@xexyl xexyl deleted the inventory branch January 13, 2025 19:55
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.

2 participants