-
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Wildcards, such as * and ?, don't work directly with standard C functions like fopen(3) or open(3) on Windows because the C standard library functions don't expand wildcards into lists of filenames.
To process wildcards we need to use the Windows API, specifically functions like FindFirstFile and FindNextFile.
Example:
#include <windows.h>
#include <stdio.h>
int main() {
WIN32_FIND_DATA findFileData;
HANDLE hFind = FindFirstFile("*.txt", &findFileData);
if (hFind == INVALID_HANDLE_VALUE) {
printf("No files found.\n");
return 1;
} else {
do {
printf("Found file: %s\n", findFileData.cFileName);
} while (FindNextFile(hFind, &findFileData) != 0);
FindClose(hFind);
}
return 0;
}Such a parsing logic should go into a function in src/file.c then called by src/cjit.c to parse arguments.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed