Skip to content

WINC - it's the set of the simple and convenient libraries for C language.

License

Notifications You must be signed in to change notification settings

VladimirBalun/WINC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WINC

General information

WINC - it's a set of simple and convenient cross-platform libraries for C language. A large number of different libraries will be added soon, but now the set contains the following libraries for working with:

  • File system
  • Utils
    • Collections
    • Multithreading

Short examples

One of the example collection from the Utils library:

int main(int argc, char** argv)
{
    list_t* list = init_list();
    push_back_list(list, "world");
    push_back_list(list, "!!!");
    push_front_list(list, "Hello ");
        
    FOR_EACH_LIST(iterator, list)
    {
        printf("%s", (char*) list_get(iterator));
    }
          
    destroy_list(list);
    return EXIT_SUCCESS;
}

Example of the file system iterator from the FileSystem library:

void iteration_callback(const char* element)
{
    printf("%s\n", element);
}

int main(int argc, char** argv)
{
    char* user_dir = get_user_directory();
    printf("Iteration in the user directory:\n");
    path_iterate(user_dir, iteration_callback);   
          
    free(user_dir);
    return EXIT_SUCCESS;
}

How to build WINC

Clone a copy of the main WINC git repository by running:

git clone https://github.com/VladimirBalun/WINC.git

For building libraries you can use following script:

build.bat  // for Windows
./build.sh // for UNIX-based

You also can build manually by running the following commands:

mkdir build
cd build
cmake ..
// run with your compiler 

Documentation will be supplemented over time, but if you have any questions, please contact: [email protected]

About

WINC - it's the set of the simple and convenient libraries for C language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published