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

Add wildcard support to file and directory functions #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HeathenUK
Copy link
Contributor

Adds wildcard support to MOS DIR, COPY, MOVE/RENAME and DELETE commands.

As a consequence (and similar to MOS's own strtok implementation there are some basic strdup and strndup functions added to avoid lots of malloc spam.

This also requires FF_USE_FIND to be switched to 1, but this has had no measurable impact on performance or memory use.

@@ -276,6 +277,35 @@ char * mos_strtok_r(char *s1, const char *s2, char **ptr) {
return s1;
}

//Alternative to missing strnlen() in ZDS libraries
size_t mos_strnlen(const char *s, size_t maxlen) {
size_t len = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect your editor isn't set up to match the general style for C code in MOS...

these files generally use tabs rather than spaces. for the most part, I believe a tab size of 4 works for the C files; the assembler files seem to be written assuming a tab size of 8

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