Skip to content

YanHaoChen/toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

toolbox

I made some tools useful to reduce the time of programing.

What are tools in this box?

C

  • toolbox.h,toolbox.c

    • void swap(char *got_array, int a, int b)
    • void char_qsort(char *got_array, int left, int right)
    • int yes_or_no(void)
    • struct key_char_head *init_key_char(void)
    • int get_hash(char *key)
    • struct key_char_node *get_key_char_node(struct key_char_head *this_head, char *key)
    • char *get_key_char_value(struct key_char_head *this_head, char *key)
    • int delete_key_char(struct key_char_head *this_head, char *key)
  • packetg.h,packetg.c

  • Tools:pcinfo,sysinfoswap

Testing

toolbox_testing.c

Start test.
----------------
swap: pass
----------------
char_qsort: pass
----------------
get_hash: pass
----------------
get_hash_with_zero_char: pass
----------------
pass: 4
pass rate: 100.00%

Dictionary testing:dictionary_testing.c

Append: key:abc value:def
state:1
Find the value with this key: adc.
result:def
Append: key:bac value:aaa
state:2
Find the value with this key: bac.
result:aaa
Delete the value with this key: abc.
state:1
Find the value with this key: bac.
result:aaa

Releases

No releases published

Packages

No packages published

Languages