Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* filelist.h
- Copyright (C) 1999-2003 Tom Gilbert.
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies of the Software and its documentation and acknowledgment shall be
- given in the documentation and software packages that this Software was
- used.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- imPLIED, INCLUDING BUT NOT LimITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- THE AUTHORS BE LIABLE FOR ANY CLAim, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- //aug 10 2017
- Modifactions made by me.
- Same permissions are passed on as formentioned pertaining to the
- modifactions made by me.
- Copyright (C) 2017 - ... Michael Hearas.
- */
- #ifndef FILELIST_H
- #define FILELIST_H
- #include <dirent.h>
- #include <Imlib2.h>
- #ifndef PATH_MAX
- #define PATH_MAX 4096
- #endif // PATH_MAX
- typedef struct TheList mylist;
- typedef int (compare_fn) (mylist *name1, mylist *name2);
- typedef int (secret_fn) (mylist *secret_name1, mylist *secret_name2);
- struct TheList
- {
- char *filename;
- int listcount;
- mylist *next;
- mylist *prev;
- };
- void add_2_front(mylist** filelist, char *filename);
- void remove_link(mylist** head, char *value_to_remove);
- void display_list(mylist* head);
- void prepare_filelist(void);
- void sort_list(void);
- void insertNode(mylist** head, char *filename, int c);
- void add_file_count(mylist* filelist);
- void GetFiles(char *name, int indent);
- char *get_file_name(void);
- char *remove_ext (char* mystr, char dot, char sep) ;
- char *remove_back(char *front);
- char *removeChar( char * string, char letter );
- char *get_number_in_list(int numberfile);
- char *get_next_name_in_list(void);
- char *get_im_name(void);
- char *get_absolute_path(char *path);
- int isDirectory(const char *path);
- int is_regular_file(const char *path);
- int check_file_ext(char *name1);
- int secret_cmp_filename(mylist *file1, mylist *file2);
- int cmp_filename(mylist *file1, mylist *file2);
- int list_length(mylist * l);
- int get_length(void);
- Imlib_Image check_image_err(Imlib_Image image);
- mylist * list_move_down_by_one(mylist * root, mylist * l);
- mylist* list_unlink(mylist * root, mylist * l);
- mylist * list_add_end(mylist * root, char *filename, int c);
- mylist * list_last(mylist * l);
- mylist * list_randomize(mylist * list);
- mylist *list_time_jump(mylist *l, int num);
- mylist *list_sort_merge(mylist * l1, mylist * l2 , compare_fn cmp);
- mylist *secret_list_sort(mylist * list, secret_fn cmp);
- mylist *secret_sort_murge(mylist * l1, mylist * l2 , secret_fn cmp);
- mylist *list_sort(mylist * list, compare_fn cmp);
- mylist * list_bubble_sort(mylist * list);
- extern mylist* filelist;
- extern mylist *current_file;
- extern int filelist_len;
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement