1
0
mirror of https://gitlab.com/klmp200/fish.git synced 2024-11-24 18:14:18 +00:00

documentation

This commit is contained in:
Aethor 2017-06-19 15:06:37 +02:00
parent 46d99e6836
commit e5c032bd2b
2 changed files with 13 additions and 1 deletions

View File

@ -270,7 +270,7 @@ WordList* getFiles(char* path, char* wildcardedString){
} }
int wildcardedStringMatches(char* string1, char* string2){//TODO int wildcardedStringMatches(char* string1, char* string2){
int i = 0; int i = 0;
char tempIChar; char tempIChar;

View File

@ -4,22 +4,34 @@
typedef struct dirent dirent; typedef struct dirent dirent;
/*send back a WordList containing every path correspnding to the different expand*/
WordList* fishExpand(WordList* wordArray); WordList* fishExpand(WordList* wordArray);
/*return a WordList containing every file in a path corresponding to a bash-like regex*/
WordList* getFiles(char* path, char* wildcardedString); WordList* getFiles(char* path, char* wildcardedString);
/*return a WordList containing every path corresponding to the expand of a word ( in shell meaning )*/
WordList* expandWord(char* word); WordList* expandWord(char* word);
/*Launch recursively the expand for every directory, and add each found path in listToExpand*/
void recursiveExpandWord(char* path, WordList* listToExpand); void recursiveExpandWord(char* path, WordList* listToExpand);
/*function returning true or false, depending on the regex matching of string2 with string1*/
int wildcardedStringMatches(char* string1, char* string2); int wildcardedStringMatches(char* string1, char* string2);
/*transform a string in a word list by splitting on splitchar*/
WordList* splitWordIntoList(char* string, char splitchar); WordList* splitWordIntoList(char* string, char splitchar);
/*Given a string, return only the corresponding filename, deleting the path*/
char* getFileName(char* string); char* getFileName(char* string);
/*Given a string, return only the corresponding path, cutting the filename*/
char* getPath(char* string); char* getPath(char* string);
/*Transform a word list into a string by concatenating every element of the list*/
char* concatWordListToWord(WordList* list, int firstElemIndex, int lastElemIndex); char* concatWordListToWord(WordList* list, int firstElemIndex, int lastElemIndex);
#endif //FISH_FISH_GLOBBING_H #endif //FISH_FISH_GLOBBING_H