Code Monkey home page Code Monkey logo

libgenerics's Introduction

libgenerics

libgenerics is a minimalistic and generic library for C basic data structures.

The entire implementation was aimed at providing reusable, generic and easy-to-read code like this:

#include <stdio.h>
#include <generics/queue.h>

#define N 10

int main()
{
	int i;
	queue_t q;
	queue_create(&q, sizeof(int));

	for( i=0; i<N; i++ )
		queue_enqueue(&q, &i);

	int temp;
	for( i=0; i<N/2; i++ ){
		queue_dequeue(&q, &temp);
		printf("dequeued: %d\n", temp);
	}

	queue_destroy(&q);
	return 0;
}

The doxygen documentation is available here. There's only the pdf version pre-generated, but you can generate the html and the man format with doxygen.

Installation

$ make
$ sudo make install

To make sure everything went well you may compile the examples:

$ make examples

You can copy the code above to a file name main.c and compile after the installation using:

$ gcc main.c -lgenerics

You may also try another examples.

Uninstall:

$ make uninstall

UNLICENSE

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

For more information, please refer to http://unlicense.org/

libgenerics's People

Contributors

yudi-matsuzake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.