26 #include "../tapctl/error.h"
27 #include "../tapctl/tap.h"
47 seq->head = seq->head->
next;
59 size_t argument_size = (_tcslen(argument) + 1) *
sizeof(TCHAR);
63 msg(
M_FATAL,
"%s: malloc(%u) failed", __FUNCTION__,
sizeof(
struct msica_arg) + argument_size);
65 memcpy(p->
val, argument, argument_size);
68 if (seq->tail == NULL)
80 size_t argument_size = (_tcslen(argument) + 1) *
sizeof(TCHAR);
84 msg(
M_FATAL,
"%s: malloc(%u) failed", __FUNCTION__,
sizeof(
struct msica_arg) + argument_size);
86 memcpy(p->
val, argument, argument_size);
88 *(seq->tail ? &seq->tail->next : &seq->head) = p;
100 size += _tcslen(p->val) + 1 ;
102 size *=
sizeof(TCHAR);
105 LPTSTR str = malloc(size);
108 msg(
M_FATAL,
"%s: malloc(%u) failed", __FUNCTION__, size);
113 #pragma warning(push)
114 #pragma warning(disable: 4996)
118 _tcscpy(str, TEXT(
"x"));
122 for (
struct msica_arg *p = seq->head; p != NULL; p = p->
next)
129 s += _tcslen(p->val);