Skip to content

BuiHoangTu/c-minilib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MINI_LIB

The extended data type structure for vanilla C language

Disclaimer: This code is for learning purpose, using with prudence in production. Owner does NOT guarantee the quality of this code.

Naming convention

CamelCase

  1. Type

Any new type should be treated as reference type.

Ex: NewType, HashMap, ...

Long type can be shortened.

Ex: SingleLinkedList -> Sll, ...
  1. Function

Functions of mini_lib usually provide support for a new defined type. Thus, their names should indicate the associate type.

Ex: newTypeAction like hashMapPut, ...

There are 2 name types of function actionType, typeAction.

  1. If Type is the main type (HashMap, SLL) and function return that type, we use action+TypeName.

     Ex: createHashMap, initHashMap, ...
    
  2. If return type is subtype (SingleLinkedNode), we use mainType+Action+Subtype.

     Ex: sllCreateNode, ...
    
  3. If function does modify internal values of DataType, we use typeName+Action.

     Ex: hashMapGet
    
  4. File

    Types and functions declaration should be grouped in my_type.h and function description should be in my_type.c

About

additional basic structures for pure c

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published