Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 520 Bytes

naming-convention.md

File metadata and controls

27 lines (22 loc) · 520 Bytes

Naming Convention

dcurl uses the snake case naming convention.

  • Variable and function

    bool pow_c(void *pow_ctx) {
        ......
        int completed_index = -1; 
        ......
    }
    
  • Structure: The suffixes _s represents for structure and _t represents for type

    typedef struct pwork_s pwork_t;
    struct pwork_s {
        ......
    }
    
  • Macro: Use capital letters

    #define MIN_TRYTE_VALUE (-13)
    #define MAX_TRYTE_VALUE 13