Work on ansi and clean Makefiles

FossilOrigin-Name: 0805f78d34219a2aac597a313081ce869c389e6b5d471c65c7f43d0906c0a400
This commit is contained in:
7u83@mail.ru
2018-02-28 08:05:45 +00:00
parent f0e838de0a
commit d8c8bd022e
42 changed files with 147 additions and 1145 deletions

17
src/cw/bstrv_create.c Normal file
View File

@ -0,0 +1,17 @@
#include "bstr.h"
uint8_t * bstrv_create(uint32_t vendor_id, uint8_t *data, uint8_t len)
{
uint8_t * str = malloc(bstrv_size(len));
if (!str)
return 0;
bstrv_set_vendor_id(str,vendor_id);
bstrv_set_len(str,len);
memcpy(bstrv_data(str),data,len);
*(bstrv_data(str)+bstrv_len(str))=0;
return str;
}