Different architectures might not actually have a 1-byte size.
Rather than assuming the common behavior, always call sizeof(unsigned char) to determine size of memset() and mempcy() functions.
macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
if (F_status_is_error(status)) return status;
- memcpy(name->string, group_data.gr_name, name_length);
+ memcpy(name->string, group_data.gr_name, sizeof(unsigned char) * name_length);
name->string[name_length] = 0;
name->used = name_length;
macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
if (F_status_is_error(status)) return status;
- memcpy(name->string, group_data.gr_name, name_length);
+ memcpy(name->string, group_data.gr_name, sizeof(unsigned char) * name_length);
name->string[name_length] = 0;
name->used = name_length;
macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
if (F_status_is_error(status)) return status;
- memcpy(name->string, password.pw_name, name_length);
+ memcpy(name->string, password.pw_name, sizeof(unsigned char) * name_length);
name->string[name_length] = 0;
name->used = name_length;
macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
if (F_status_is_error(status)) return status;
- memcpy(name->string, password.pw_name, name_length);
+ memcpy(name->string, password.pw_name, sizeof(unsigned char) * name_length);
name->string[name_length] = 0;
name->used = name_length;
status = f_string_dynamic_resize(string_length + 1, &account->home);
if (F_status_is_error(status)) return status;
- memcpy(account->home.string, password.pw_dir, string_length);
+ memcpy(account->home.string, password.pw_dir, sizeof(unsigned char) * string_length);
account->home.string[string_length] = 0;
account->home.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->label);
if (F_status_is_error(status)) return status;
- memcpy(account->label.string, password.pw_gecos, string_length);
+ memcpy(account->label.string, password.pw_gecos, sizeof(unsigned char) * string_length);
account->label.string[string_length] = 0;
account->label.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->name);
if (F_status_is_error(status)) return status;
- memcpy(account->name.string, password.pw_name, string_length);
+ memcpy(account->name.string, password.pw_name, sizeof(unsigned char) * string_length);
account->name.string[string_length] = 0;
account->name.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->password);
if (F_status_is_error(status)) return status;
- memcpy(account->password.string, password.pw_passwd, string_length);
+ memcpy(account->password.string, password.pw_passwd, sizeof(unsigned char) * string_length);
account->password.string[string_length] = 0;
account->password.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->shell);
if (F_status_is_error(status)) return status;
- memcpy(account->shell.string, password.pw_shell, string_length);
+ memcpy(account->shell.string, password.pw_shell, sizeof(unsigned char) * string_length);
account->shell.string[string_length] = 0;
account->shell.used = string_length;
}
}
- memcpy(name->string + name->used, result, length);
+ memcpy(name->string + name->used, result, sizeof(unsigned char) * length);
name->used += length;
name->string[name->used] = 0;
}
}
- memcpy(text->string + text->used, result, length);
+ memcpy(text->string + text->used, result, sizeof(unsigned char) * length);
text->used += length;
text->string[text->used] = 0;
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
buffer->used += color1.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
buffer->used += color2.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
buffer->used += color2.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color3.used) {
- memcpy(buffer->string + buffer->used, color3.string, color3.used);
+ memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
buffer->used += color3.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
buffer->used += color2.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color3.used) {
- memcpy(buffer->string + buffer->used, color3.string, color3.used);
+ memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
buffer->used += color3.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color4.used) {
- memcpy(buffer->string + buffer->used, color4.string, color4.used);
+ memcpy(buffer->string + buffer->used, color4.string, sizeof(unsigned char) * color4.used);
buffer->used += color4.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
buffer->used += color2.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color3.used) {
- memcpy(buffer->string + buffer->used, color3.string, color3.used);
+ memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
buffer->used += color3.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color4.used) {
- memcpy(buffer->string + buffer->used, color4.string, color4.used);
+ memcpy(buffer->string + buffer->used, color4.string, sizeof(unsigned char) * color4.used);
buffer->used += color4.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
buffer->used += format.medium.used;
}
if (color5.used) {
- memcpy(buffer->string + buffer->used, color5.string, color5.used);
+ memcpy(buffer->string + buffer->used, color5.string, sizeof(unsigned char) * color5.used);
buffer->used += color5.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
buffer->used += format.end.used;
}
status = f_string_dynamic_increase_by(size, &names->array[names->used]);
if (F_status_is_error(status)) break;
- memcpy(names->array[names->used].string, listing[i]->d_name, size);
+ memcpy(names->array[names->used].string, listing[i]->d_name, sizeof(unsigned char) * size);
names->array[names->used++].used = size;
f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
const f_status_t status = f_string_dynamic_increase_by(size + 1, value);
if (F_status_is_error(status)) return status;
- memcpy(value->string + value->used, result, size);
+ memcpy(value->string + value->used, result, sizeof(unsigned char) * size);
value->used += size;
value->string[value->used] = 0;
unsigned char path_argument[path.used + 1];
f_string_t path_to_name;
- memcpy(path_argument, path.string, path.used);
+ memcpy(path_argument, path.string, sizeof(unsigned char) * path.used);
path_argument[path.used] = 0;
path_to_name = basename(path_argument);
const f_status_t status = f_string_dynamic_increase_by(size + 1, name_base);
if (F_status_is_error(status)) return status;
- memcpy(name_base->string + name_base->used, path_to_name, size);
+ memcpy(name_base->string + name_base->used, path_to_name, sizeof(unsigned char) * size);
name_base->used += size;
name_base->string[name_base->used] = 0;
unsigned char path_argument[path.used + 1];
f_string_t path_to_name;
- memcpy(path_argument, path.string, path.used);
+ memcpy(path_argument, path.string, sizeof(unsigned char) * path.used);
path_argument[path.used] = 0;
path_to_name = dirname(path_argument);
if (F_status_is_error(status)) return status;
}
- memcpy(name_directory->string + name_directory->used, path_to_name, size);
+ memcpy(name_directory->string + name_directory->used, path_to_name, sizeof(unsigned char) * size);
name_directory->used += size;
name_directory->string[name_directory->used] = 0;
ssize_t size_write = 0;
unsigned char *buffer[size_block];
- memset(buffer, 0, size_block);
+ memset(buffer, 0, sizeof(unsigned char) * size_block);
while ((size_read = read(file_source.id, buffer, size_block)) > 0) {
ssize_t size_write = 0;
unsigned char *buffer[size_block];
- memset(buffer, 0, size_block);
+ memset(buffer, 0, sizeof(unsigned char) * size_block);
while ((size_read = read(file_source.id, buffer, size_block)) > 0) {
if (F_status_is_error(status)) return status;
}
- memset(target->string, 0, target->used + 1);
+ memset(target->string, 0, sizeof(unsigned char) * (target->used + 1));
target->used = link_stat.st_size;
if (F_status_is_error(status)) return status;
}
- memset(target->string, 0, target->used + 1);
+ memset(target->string, 0, sizeof(unsigned char) * (target->used + 1));
target->used = link_stat.st_size;
if (F_status_is_error(status)) return status;
}
- memcpy(path->string, buffer, length);
+ memcpy(path->string, buffer, sizeof(unsigned char) * length);
path->string[length] = 0;
path->used = length;
} // while
// Use memcpy() to take advantage of its optimized copy behaviors whenever possible.
- memcpy(directory->string + directory->used, argument.string + i, j - i);
+ memcpy(directory->string + directory->used, argument.string + i, sizeof(unsigned char) * (j - i));
directory->used += j - i;
i = j;
if (F_status_is_error(status)) return status;
}
- memcpy(real->string, buffer, length);
+ memcpy(real->string, buffer, sizeof(unsigned char) * length);
real->string[length] = 0;
real->used = length;
}
if (!serialize->used) {
- memcpy(serialize->string + serialize->used, value.string, value.used);
+ memcpy(serialize->string + serialize->used, value.string, sizeof(unsigned char) * value.used);
serialize->used += value.used;
}
else {
- memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s.string, f_serialize_simple_splitter_s.used);
- memcpy(serialize->string + serialize->used + f_serialize_simple_splitter_s.used, value.string, value.used);
+ memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s.string, sizeof(unsigned char) * f_serialize_simple_splitter_s.used);
+ memcpy(serialize->string + serialize->used + f_serialize_simple_splitter_s.used, value.string, sizeof(unsigned char) * value.used);
serialize->used += value.used + 1;
}
strings->array[strings->used].size = total;
}
- memcpy(strings->array[strings->used].string, serialize.string + start, total);
+ memcpy(strings->array[strings->used].string, serialize.string + start, sizeof(unsigned char) * total);
strings->array[strings->used].used = total;
++strings->used;
if (F_status_is_error(status_allocation)) return status_allocation;
}
- memcpy(dynamic->string, serialize.string + range.start, total);
+ memcpy(dynamic->string, serialize.string + range.start, sizeof(unsigned char) * total);
dynamic->used = total;
return status;
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source, length);
+ memcpy(destination->string + destination->used, source, sizeof(unsigned char) * length);
destination->used += length;
destination->string[destination->used] = 0;
if (i && i > first) {
size = i - first;
- memcpy(destination->string + destination->used, source + first, size);
+ memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
destination->used += size;
}
if (i > first) {
size = i - first;
- memcpy(destination->string + destination->used, source + first, size);
+ memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
destination->used += size;
}
if (destination->used) {
memmove(destination->string + length, destination->string, destination->used);
- memcpy(destination->string, source, length);
+ memcpy(destination->string, source, sizeof(unsigned char) * length);
}
else {
- memcpy(destination->string, source, length);
+ memcpy(destination->string, source, sizeof(unsigned char) * length);
}
destination->used += length;
}
memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, size);
+ memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
destination->used += size;
offset += size;
return F_status_set_error(F_failure);
}
- memcpy(*character, &utf, macro_f_utf_character_t_width_is(utf_character));
+ memcpy(*character, &utf, sizeof(unsigned char) * macro_f_utf_character_t_width_is(utf_character));
#else
- memcpy(*character, &utf_character, macro_f_utf_character_t_width_is(utf_character));
+ memcpy(*character, &utf_character, sizeof(unsigned char) * macro_f_utf_character_t_width_is(utf_character));
#endif // __BYTE_ORDER == __LITTLE_ENDIAN
return F_none;
#if __BYTE_ORDER == __LITTLE_ENDIAN
uint32_t utf = macro_f_utf_character_t_to_char_1(utf_character) << 24;
- memcpy(*character, &utf, 1);
+ memcpy(*character, &utf, sizeof(unsigned char));
#else
- memcpy(*character, &utf_character, 1);
+ memcpy(*character, &utf_character, sizeof(unsigned char));
#endif // __BYTE_ORDER == __LITTLE_ENDIAN
return F_none;
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source, length);
+ memcpy(destination->string + destination->used, source, sizeof(unsigned char) * length);
destination->used = destination->used + length;
return F_none;
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + first, size);
+ memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
destination->used = destination->used + size;
}
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + first, size);
+ memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
destination->used = destination->used + size;
}
if (destination->used) {
memmove(destination->string + length, destination->string, destination->used);
- memcpy(destination->string, source, length);
+ memcpy(destination->string, source, sizeof(unsigned char) * length);
}
else {
- memcpy(destination->string, source, length);
+ memcpy(destination->string, source, sizeof(unsigned char) * length);
}
destination->used = destination->used + length;
}
memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, size);
+ memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
destination->used = destination->used + size;
offset += size;
}
memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, size);
+ memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
destination->used = destination->used + size;
offset += size;
path.string = path_string;
if (control_group.path.used) {
- memcpy(path.string, control_group.path.string, control_group.path.used);
+ memcpy(path.string, control_group.path.string, sizeof(unsigned char) * control_group.path.used);
}
- memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
- memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, F_control_group_path_system_suffix_s_length);
+ memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(unsigned char) * control_group.groups.array[i].used);
+ memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, sizeof(unsigned char) * F_control_group_path_system_suffix_s_length);
path.string[path.used] = 0;
for (; at_path < path.used; ++at_path) {
if (at_path && path.string[at_path] == f_path_separator_s.string[0]) {
- memcpy(tree.string, path.string + at_tree, at_path - at_tree);
+ memcpy(tree.string, path.string + at_tree, sizeof(unsigned char) * (at_path - at_tree));
tree.string[at_path - at_tree] = 0;
status = f_directory_exists(tree);
unsigned char path_source_sub[source_sub.used + 1];
unsigned char path_destination_sub[destination_sub.used + 1];
- memcpy(path_source_sub, source.string, source.used);
- memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_source_sub, source.string, sizeof(unsigned char) * source.used);
+ memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
- memcpy(path_destination_sub, destination.string, destination.used);
- memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_destination_sub, destination.string, sizeof(unsigned char) * destination.used);
+ memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
path_source_sub[source.used] = f_path_separator_s.string[0];
path_source_sub[source_sub.used] = 0;
path_source.string = path_source_string;
path_destination.string = path_destination_string;
- memcpy(path_source_string, source.string, source.used);
- memcpy(path_source_string + source.used + 1, file.string, file.used);
+ memcpy(path_source_string, source.string, sizeof(unsigned char) * source.used);
+ memcpy(path_source_string + source.used + 1, file.string, sizeof(unsigned char) * file.used);
path_source_string[source.used] = f_path_separator_s.string[0];
path_source_string[source.used + file.used + 1] = 0;
- memcpy(path_destination_string, destination.string, destination.used);
- memcpy(path_destination_string + destination.used + 1, file.string, file.used);
+ memcpy(path_destination_string, destination.string, sizeof(unsigned char) * destination.used);
+ memcpy(path_destination_string + destination.used + 1, file.string, sizeof(unsigned char) * file.used);
path_destination_string[destination.used] = f_path_separator_s.string[0];
path_destination_string[destination.used + file.used + 1] = 0;
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_source.string, size);
+ memcpy(failure.path.string, path_source.string, sizeof(unsigned char) * size);
failure.path.string[size] = 0;
}
else {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_destination.string, size);
+ memcpy(failure.path.string, path_destination.string, sizeof(unsigned char) * size);
failure.path.string[size] = 0;
}
unsigned char path_source_sub[source_sub.used + 1];
unsigned char path_destination_sub[destination_sub.used + 1];
- memcpy(path_source_sub, source.string, source.used);
- memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_source_sub, source.string, sizeof(unsigned char) * source.used);
+ memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
memcpy(path_destination_sub, destination.string, destination.used);
- memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
path_source_sub[source.used] = f_path_separator_s.string[0];
path_source_sub[source_sub.used] = 0;
path_source.string = path_source_string;
path_destination.string = path_destination_string;
- memcpy(path_source_string, source.string, source.used);
- memcpy(path_source_string + source.used + 1, file.string, file.used);
+ memcpy(path_source_string, source.string, sizeof(unsigned char) * source.used);
+ memcpy(path_source_string + source.used + 1, file.string, sizeof(unsigned char) * file.used);
path_source_string[source.used] = f_path_separator_s.string[0];
path_source_string[source.used + file.used + 1] = 0;
- memcpy(path_destination_string, destination.string, destination.used);
- memcpy(path_destination_string + destination.used + 1, file.string, file.used);
+ memcpy(path_destination_string, destination.string, sizeof(unsigned char) * destination.used);
+ memcpy(path_destination_string + destination.used + 1, file.string, sizeof(unsigned char) * file.used);
path_destination_string[destination.used] = f_path_separator_s.string[0];
path_destination_string[destination.used + file.used + 1] = 0;
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_source.string, size);
+ memcpy(failure.path.string, path_source.string, sizeof(unsigned char) * size);
failure.path.string[size] = 0;
}
else {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_destination.string, size);
+ memcpy(failure.path.string, path_destination.string, sizeof(unsigned char) * size);
failure.path.string[size] = 0;
}
status = f_string_dynamic_increase_by(name_directory.used, &names->array[names->used]);
if (F_status_is_error(status)) break;
- memcpy(names->array[names->used].string, name_directory.string, name_directory.used);
+ memcpy(names->array[names->used].string, name_directory.string, sizeof(unsigned char) * name_directory.used);
names->array[names->used++].used = name_directory.used;
f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
}
if (length_truncated - start > 0) {
- memcpy(destination->string + destination->used, source.string + start, length_truncated - start);
+ memcpy(destination->string + destination->used, source.string + start, sizeof(unsigned char) * (length_truncated - start));
}
destination->used += total;
status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
if (F_status_is_error(status)) return status;
- memcpy(paths->array[paths->used].string, buffer, k);
+ memcpy(paths->array[paths->used].string, buffer, sizeof(unsigned char) * k);
paths->array[paths->used++].used = k;
}
status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
if (F_status_is_error(status)) return status;
- memcpy(paths->array[paths->used].string, buffer, k);
+ memcpy(paths->array[paths->used].string, buffer, sizeof(unsigned char) * k);
paths->array[paths->used++].used = k;
}
unsigned char format[33];
unsigned char buffer[129];
- memset(format, 0, 33);
- memset(buffer, 0, 129);
+ memset(format, 0, sizeof(unsigned char) * 33);
+ memset(buffer, 0, sizeof(unsigned char) * 129);
format[f++] = f_string_ascii_percent_s.string[0];
// @todo this needs to identify an invalid UTF-8 string before writing and return an error if invalid.
do {
- memset(buffer_write, 0, write_size);
+ memset(buffer_write, 0, sizeof(unsigned char) * write_size);
for (i = 0, used = 0; used < write_size && *written + i < write_max; ++i, used += width) {
path.string = path_string;
if (control_group.path.used) {
- memcpy(path.string, control_group.path.string, control_group.path.used);
+ memcpy(path.string, control_group.path.string, sizeof(unsigned char) * control_group.path.used);
}
- memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
+ memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(unsigned char) * control_group.groups.array[i].used);
path.string[path.used] = 0;
status = fl_directory_create(path, F_file_mode_all_rwx_d);
unsigned char program_path[found->used + 1];
program_path[found->used] = 0;
- memcpy(&program_path, found->string, found->used);
+ memcpy(&program_path, found->string, sizeof(unsigned char) * found->used);
f_string_dynamics_resize(0, &paths);
unsigned char program_path[found->used + 1];
program_path[found->used] = 0;
- memcpy(&program_path, found->string, found->used);
+ memcpy(&program_path, found->string, sizeof(unsigned char) * found->used);
program_name.string = program_path;
program_name.used = found->used;
#if !defined(_di_fll_execute_program_)
void private_fll_execute_path_arguments_fixate(const f_string_static_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, f_string_static_t program_name, f_string_t fixed_arguments[]) {
- memset(program_name.string, 0, program_name.used + 1);
+ memset(program_name.string, 0, sizeof(unsigned char) * (program_name.used + 1));
memset(fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
- memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, program_name.used);
+ memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, sizeof(unsigned char) * program_name.used);
if (program_name.used) {
fixed_arguments[0] = program_name.string;
unsigned char path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, path.used);
- memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, list[i]->array[j].used);
+ memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+ memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(unsigned char) * list[i]->array[j].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
unsigned char path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, path.used);
- memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+ memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
unsigned char path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, path.used);
- memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, list[i]->array[j].used);
+ memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+ memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(unsigned char) * list[i]->array[j].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
unsigned char path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, path.used);
- memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+ memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
}
}
- memcpy(destination->string + destination->used + i, content.string + i, F_fss_default_block_size_normal_d);
+ memcpy(destination->string + destination->used + i, content.string + i, sizeof(unsigned char) * F_fss_default_block_size_normal_d);
} // for
if (i < content.used) {
- memcpy(destination->string + destination->used + i, content.string + i, content.used - i);
+ memcpy(destination->string + destination->used + i, content.string + i, sizeof(unsigned char) * (content.used - i));
}
destination->used += content.used;
unsigned char buffer[controller_control_default_socket_buffer_d + 1];
size_t length = 0;
- memset(buffer, 0, controller_control_default_socket_buffer_d + 1);
+ memset(buffer, 0, sizeof(unsigned char) * (controller_control_default_socket_buffer_d + 1));
// Pre-process the packet header.
control->client.size_read = controller_control_default_socket_header_d;
path.string = path_string;
if (global.setting->path_setting.used) {
- memcpy(path_string, global.setting->path_setting.string, global.setting->path_setting.used);
- memcpy(path_string + global.setting->path_setting.used + F_path_separator_s_length, cache->action.name_file.string, cache->action.name_file.used);
+ memcpy(path_string, global.setting->path_setting.string, sizeof(unsigned char) * global.setting->path_setting.used);
+ memcpy(path_string + global.setting->path_setting.used + F_path_separator_s_length, cache->action.name_file.string, sizeof(unsigned char) * cache->action.name_file.used);
path_string[global.setting->path_setting.used] = f_path_separator_s.string[0];
}
else {
- memcpy(path_string, cache->action.name_file.string, cache->action.name_file.used);
+ memcpy(path_string, cache->action.name_file.string, sizeof(unsigned char) * cache->action.name_file.used);
}
path_string[path.used] = 0;
unsigned char temporary[--length];
temporary[length] = 0;
- memcpy(temporary, destination->string + setting->path_current.used + 1, length);
- memcpy(destination->string, temporary, length);
+ memcpy(temporary, destination->string + setting->path_current.used + 1, sizeof(unsigned char) * length);
+ memcpy(destination->string, temporary, sizeof(unsigned char) * length);
destination->string[length] = 0;
destination->used = length;
unsigned char id_rule_name[id_rule_length + 1];
const f_string_static_t alias_rule = macro_f_string_static_t_initialize2(id_rule_name, id_rule_length);
- memcpy(id_rule_name, entry_action->parameters.array[0].string, entry_action->parameters.array[0].used);
- memcpy(id_rule_name + entry_action->parameters.array[0].used + 1, entry_action->parameters.array[1].string, entry_action->parameters.array[1].used);
+ memcpy(id_rule_name, entry_action->parameters.array[0].string, sizeof(unsigned char) * entry_action->parameters.array[0].used);
+ memcpy(id_rule_name + entry_action->parameters.array[0].used + 1, entry_action->parameters.array[1].string, sizeof(unsigned char) * entry_action->parameters.array[1].used);
id_rule_name[entry_action->parameters.array[0].used] = f_path_separator_s.string[0];
id_rule_name[id_rule_length] = 0;
unsigned char cache_name_item[cache_name_item_used];
unsigned char cache_name_file[cache_name_file_used];
- memcpy(cache_name_action, cache->action.name_action.string, cache->action.name_action.used);
- memcpy(cache_name_item, cache->action.name_item.string, cache->action.name_item.used);
- memcpy(cache_name_file, cache->action.name_file.string, cache->action.name_file.used);
+ memcpy(cache_name_action, cache->action.name_action.string, sizeof(unsigned char) * cache->action.name_action.used);
+ memcpy(cache_name_item, cache->action.name_item.string, sizeof(unsigned char) * cache->action.name_item.used);
+ memcpy(cache_name_file, cache->action.name_file.string, sizeof(unsigned char) * cache->action.name_file.used);
status_lock = controller_lock_write(is_entry, global->thread, &global->thread->lock.rule);
}
// Restore cache.
- memcpy(cache->action.name_action.string, cache_name_action, cache_name_action_used);
- memcpy(cache->action.name_item.string, cache_name_item, cache_name_item_used);
- memcpy(cache->action.name_file.string, cache_name_file, cache_name_file_used);
+ memcpy(cache->action.name_action.string, cache_name_action, sizeof(unsigned char) * cache_name_action_used);
+ memcpy(cache->action.name_item.string, cache_name_item, sizeof(unsigned char) * cache_name_item_used);
+ memcpy(cache->action.name_file.string, cache_name_file, sizeof(unsigned char) * cache_name_file_used);
cache->action.name_action.string[cache_name_action_used] = 0;
cache->action.name_item.string[cache_name_item_used] = 0;
unsigned char buffer_string[buffer.used + 1];
- memcpy(buffer_string, source.string + content.start, buffer.used);
+ memcpy(buffer_string, source.string + content.start, sizeof(unsigned char) * buffer.used);
buffer_string[buffer.used] = 0;
buffer.string = buffer_string;
process->cache.action.generic.used = 0;
unsigned char buffer_string[buffer.used];
buffer.string = buffer_string;
- memcpy(buffer_string, options[i].string, options[i].used);
- memcpy(buffer_string + options[i].used, controller_parameter_map_option_s.string, controller_parameter_map_option_s.used);
+ memcpy(buffer_string, options[i].string, sizeof(unsigned char) * options[i].used);
+ memcpy(buffer_string + options[i].used, controller_parameter_map_option_s.string, sizeof(unsigned char) * controller_parameter_map_option_s.used);
if (fl_string_dynamic_partial_compare_string(buffer.string, source, buffer.used, content) == F_equal_to) {
if (values[i] && parameters->array[codes[i]].result == f_console_result_additional_e || !values[i] && parameters->array[codes[i]].result == f_console_result_found_e) {
unsigned char buffer_string[buffer.used];
buffer.string = buffer_string;
- memcpy(buffer_string, options[i].string, options[i].used);
- memcpy(buffer_string + options[i].used, controller_parameter_map_value_s.string, controller_parameter_map_value_s.used);
+ memcpy(buffer_string, options[i].string, sizeof(unsigned char) * options[i].used);
+ memcpy(buffer_string + options[i].used, controller_parameter_map_value_s.string, sizeof(unsigned char) * controller_parameter_map_value_s.used);
if (fl_string_dynamic_partial_compare_string(buffer.string, source, buffer.used, content) == F_equal_to) {
if (parameters->array[codes[i]].result == f_console_result_additional_e) {
unsigned char alias_other_buffer_string[alias_other_buffer.used + 1];
alias_other_buffer.string = alias_other_buffer_string;
- memcpy(alias_other_buffer_string, global.setting->rules.array[id_rule].alias.string, alias_other_buffer.used);
+ memcpy(alias_other_buffer_string, global.setting->rules.array[id_rule].alias.string, sizeof(unsigned char) * alias_other_buffer.used);
alias_other_buffer_string[alias_other_buffer.used] = 0;
f_thread_unlock(&global.thread->lock.rule);
unsigned char name_item[length_name_item];
name_item[length_name_item] = 0;
- memcpy(name_item, cache->action.name_item.string, length_name_item);
+ memcpy(name_item, cache->action.name_item.string, sizeof(unsigned char) * length_name_item);
for (; i < cache->content_actions.used; ++i, type = 0) {
} // for
// Restore the current name item and line number, which there should already be enough allocated space for.
- memcpy(cache->action.name_item.string, name_item, length_name_item);
+ memcpy(cache->action.name_item.string, name_item, sizeof(unsigned char) * length_name_item);
cache->action.name_item.string[length_name_item] = 0;
cache->action.name_item.used = length_name_item;
for (; i < strings_length; ++i) {
- memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+ memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
strings[i]->used += fake_build_parameter_library_name_prefix_s.used;
} // for
for (i = 0; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
strings[i]->used += data_build->setting.build_name.used;
} // for
for (i = 0; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
+ memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_shared_s.used);
strings[i]->used += fake_build_parameter_library_name_suffix_shared_s.used;
} // for
if (data_build->setting.version_major_prefix.used) {
for (i = 1; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, data_build->setting.version_major_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, sizeof(unsigned char) * data_build->setting.version_major_prefix.used);
strings[i]->used += data_build->setting.version_major_prefix.used;
} // for
for (i = 1; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, data_build->setting.version_major.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, sizeof(unsigned char) * data_build->setting.version_major.used);
strings[i]->used += data_build->setting.version_major.used;
} // for
if (data_build->setting.version_minor_prefix.used) {
for (i = 2; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, data_build->setting.version_minor_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, sizeof(unsigned char) * data_build->setting.version_minor_prefix.used);
strings[i]->used += data_build->setting.version_minor_prefix.used;
} // for
for (i = 2; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, data_build->setting.version_minor.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, sizeof(unsigned char) * data_build->setting.version_minor.used);
strings[i]->used += data_build->setting.version_minor.used;
} // for
if (data_build->setting.version_micro_prefix.used) {
for (i = 3; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, data_build->setting.version_micro_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, sizeof(unsigned char) * data_build->setting.version_micro_prefix.used);
strings[i]->used += data_build->setting.version_micro_prefix.used;
} // for
for (i = 3; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, data_build->setting.version_micro.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, sizeof(unsigned char) * data_build->setting.version_micro.used);
strings[i]->used += data_build->setting.version_micro.used;
} // for
if (data_build->setting.version_nano_prefix.used) {
for (i = 4; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, data_build->setting.version_nano_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, sizeof(unsigned char) * data_build->setting.version_nano_prefix.used);
strings[i]->used += data_build->setting.version_nano_prefix.used;
} // for
for (i = 4; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, data_build->setting.version_nano.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, sizeof(unsigned char) * data_build->setting.version_nano.used);
strings[i]->used += data_build->setting.version_nano.used;
} // for
parameter_file_path_string[parameter_file_path.used] = 0;
parameter_linker_string[parameter_linker.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
- memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, fake_build_parameter_library_shared_prefix_s.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+ memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_shared_prefix_s.used);
if (data_build->setting.version_file == fake_build_version_type_major_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, parameter_file_name_major.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, sizeof(unsigned char) * parameter_file_name_major.used);
}
else if (data_build->setting.version_file == fake_build_version_type_minor_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, parameter_file_name_minor.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, sizeof(unsigned char) * parameter_file_name_minor.used);
}
else if (data_build->setting.version_file == fake_build_version_type_micro_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, parameter_file_name_micro.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, sizeof(unsigned char) * parameter_file_name_micro.used);
}
else if (data_build->setting.version_file == fake_build_version_type_nano_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, parameter_file_name_nano.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, sizeof(unsigned char) * parameter_file_name_nano.used);
}
if (data_build->setting.version_target == fake_build_version_type_major_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, parameter_file_name_major.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, sizeof(unsigned char) * parameter_file_name_major.used);
}
else if (data_build->setting.version_target == fake_build_version_type_minor_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, parameter_file_name_minor.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, sizeof(unsigned char) * parameter_file_name_minor.used);
}
else if (data_build->setting.version_target == fake_build_version_type_micro_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, parameter_file_name_micro.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, sizeof(unsigned char) * parameter_file_name_micro.used);
}
else if (data_build->setting.version_target == fake_build_version_type_nano_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, parameter_file_name_nano.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, sizeof(unsigned char) * parameter_file_name_nano.used);
}
const f_string_static_t values[] = {
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name.string, parameter_file_name.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name.string, sizeof(unsigned char) * parameter_file_name.used);
*status = f_file_link(parameter_file_name_major, parameter_file_path);
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major.string, parameter_file_name_major.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(unsigned char) * parameter_file_name_major.used);
*status = f_file_link(parameter_file_name_minor, parameter_file_path);
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor.string, parameter_file_name_minor.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(unsigned char) * parameter_file_name_minor.used);
*status = f_file_link(parameter_file_name_micro, parameter_file_path);
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro.string, parameter_file_name_micro.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(unsigned char) * parameter_file_name_micro.used);
*status = f_file_link(parameter_file_name_nano, parameter_file_path);
destination_string[destination.used] = 0;
destination.used = 0;
- memcpy(destination_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+ memcpy(destination_string, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
destination.used += main->path_build_libraries_static.used;
- memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+ memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
destination.used += fake_build_parameter_library_name_prefix_s.used;
- memcpy(destination_string + destination.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+ memcpy(destination_string + destination.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
destination.used += data_build->setting.build_name.used;
- memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used);
+ memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_static_s.used);
destination.used += fake_build_parameter_library_name_suffix_static_s.used;
*status = fll_execute_arguments_add(destination, &arguments);
source_string[source.used] = 0;
if (source_path.used) {
- memcpy(source_string, source_path.string, source_path.used);
- memcpy(source_string + source_path.used, file_name.string, file_name.used);
- memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+ memcpy(source_string, source_path.string, sizeof(unsigned char) * source_path.used);
+ memcpy(source_string + source_path.used, file_name.string, sizeof(unsigned char) * file_name.used);
+ memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
}
else {
- memcpy(source_string, main->path_build_objects.string, main->path_build_objects.used);
- memcpy(source_string + main->path_build_objects.used, file_name.string, file_name.used);
- memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+ memcpy(source_string, main->path_build_objects.string, sizeof(unsigned char) * main->path_build_objects.used);
+ memcpy(source_string + main->path_build_objects.used, file_name.string, sizeof(unsigned char) * file_name.used);
+ memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
}
*status = fll_execute_arguments_add(source, &arguments);
f_fss_contents_t contents = f_fss_contents_t_initialize;
if (setting_file.used) {
- memcpy(path_file_string, main->path_data_build.string, main->path_data_build.used);
- memcpy(path_file_string + main->path_data_build.used, setting_file.string, setting_file.used);
+ memcpy(path_file_string, main->path_data_build.string, sizeof(unsigned char) * main->path_data_build.used);
+ memcpy(path_file_string + main->path_data_build.used, setting_file.string, sizeof(unsigned char) * setting_file.used);
*status = fake_file_buffer(main, path_file, &buffer);
}
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_objects_shared.string, main->path_build_objects_shared.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+ memcpy(parameter_file_name_path_string, main->path_build_objects_shared.string, sizeof(unsigned char) * main->path_build_objects_shared.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_objects_static.string, main->path_build_objects_static.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+ memcpy(parameter_file_name_path_string, main->path_build_objects_static.string, sizeof(unsigned char) * main->path_build_objects_static.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
- memcpy(source_string + source.used, sources[i]->array[j].string, sources[i]->array[j].used);
+ memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
source.used += sources[i]->array[j].used;
source.string[source.used] = 0;
destination_string[destination.used] = 0;
if (destination_path.used) {
- memcpy(destination_string, destination_path.string, destination_path.used);
- memcpy(destination_string + destination_path.used, file_name.string, file_name.used);
- memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+ memcpy(destination_string, destination_path.string, sizeof(unsigned char) * destination_path.used);
+ memcpy(destination_string + destination_path.used, file_name.string, sizeof(unsigned char) * file_name.used);
+ memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
}
else {
- memcpy(destination_string, main->path_build_objects.string, main->path_build_objects.used);
- memcpy(destination_string + main->path_build_objects.used, file_name.string, file_name.used);
- memcpy(destination_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+ memcpy(destination_string, main->path_build_objects.string, sizeof(unsigned char) * main->path_build_objects.used);
+ memcpy(destination_string + main->path_build_objects.used, file_name.string, sizeof(unsigned char) * file_name.used);
+ memcpy(destination_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
}
const f_string_static_t values[] = {
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_programs_shared.string, main->path_build_programs_shared.used);
- memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string, main->path_build_programs_shared.string, sizeof(unsigned char) * main->path_build_programs_shared.used);
+ memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
const f_string_static_t values[] = {
fake_build_parameter_library_output_s,
link_project_library.string = link_project_library_string;
link_project_library_string[link_project_library.used] = 0;
- memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, fake_build_parameter_library_link_file_s.used);
- memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+ memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_file_s.used);
+ memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
*status = fll_execute_arguments_add(link_project_library, &arguments);
}
// Only include the library if there are sources that would result in it being built.
if (data_build->setting.build_sources_library.used) {
- memcpy(source_library_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+ memcpy(source_library_string, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
source_library.used += main->path_build_libraries_static.used;
- memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+ memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
source_library.used += fake_build_parameter_library_name_prefix_s.used;
- memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+ memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
source_library.used += data_build->setting.build_name.used;
- memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used);
+ memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_static_s.used);
source_library.used += fake_build_parameter_library_name_suffix_static_s.used;
}
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_programs_static.string, main->path_build_programs_static.used);
- memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string, main->path_build_programs_static.string, sizeof(unsigned char) * main->path_build_programs_static.used);
+ memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
const f_string_static_t values[] = {
source_library,
path_headers.string = path_headers_string;
if (data_build->setting.path_headers.used) {
- memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used);
- memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, data_build->setting.path_headers.used);
+ memcpy(path_headers_string, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
+ memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, sizeof(unsigned char) * data_build->setting.path_headers.used);
}
else {
path_headers.used = 0;
unsigned char build_libraries[build_libraries_length + 1];
- memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
+ memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
if (is_shared) {
- memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
+ memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
}
else {
- memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+ memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
}
build_libraries[build_libraries_length] = 0;
unsigned char build_includes[build_includes_length + 1];
- memcpy(build_includes, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
- memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, main->path_build_includes.used);
+ memcpy(build_includes, fake_build_parameter_library_include_s.string, sizeof(unsigned char) * fake_build_parameter_library_include_s.used);
+ memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
const f_string_static_t values[] = {
macro_f_string_static_t_initialize(build_libraries, 0, build_libraries_length),
buffer.string = buffer_string;
buffer_string[buffer.used] = 0;
- memcpy(buffer_string, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
- memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, main->path_work_includes.used);
+ memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(unsigned char) * fake_build_parameter_library_include_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, sizeof(unsigned char) * main->path_work_includes.used);
*status = fll_execute_arguments_add(buffer, arguments);
}
buffer.string = buffer_string;
buffer_string[buffer.used] = 0;
- memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
- memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, main->path_work_libraries_shared.used);
+ memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, sizeof(unsigned char) * main->path_work_libraries_shared.used);
*status = fll_execute_arguments_add(buffer, arguments);
}
buffer.string = buffer_string;
buffer_string[buffer.used] = 0;
- memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
- memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, main->path_work_libraries_static.used);
+ memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, sizeof(unsigned char) * main->path_work_libraries_static.used);
*status = fll_execute_arguments_add(buffer, arguments);
}
return;
}
- memcpy(path_source.string, source.string, source.used);
+ memcpy(path_source.string, source.string, sizeof(unsigned char) * source.used);
fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
argument.string = argument_string;
argument_string[argument.used] = 0;
- memcpy(argument_string, f_console_symbol_short_disable_s.string, f_console_symbol_short_disable_s.used);
+ memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(unsigned char) * f_console_symbol_short_disable_s.used);
if (main->context.mode == F_color_mode_dark_d) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, f_console_standard_short_dark_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, sizeof(unsigned char) * f_console_standard_short_dark_s.used);
}
else if (main->context.mode == F_color_mode_light_d) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, f_console_standard_short_light_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, sizeof(unsigned char) * f_console_standard_short_light_s.used);
}
else if (main->context.mode == F_color_mode_no_color_d) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, f_console_standard_short_no_color_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, sizeof(unsigned char) * f_console_standard_short_no_color_s.used);
}
*status = fll_execute_arguments_add(argument, &arguments);
argument.string = argument_string;
argument_string[argument.used] = 0;
- memcpy(argument_string, f_console_symbol_short_disable_s.string, f_console_symbol_short_disable_s.used);
+ memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(unsigned char) * f_console_symbol_short_disable_s.used);
if (main->context.mode == f_console_verbosity_quiet_e) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, f_console_standard_short_quiet_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, sizeof(unsigned char) * f_console_standard_short_quiet_s.used);
}
else if (main->context.mode == f_console_verbosity_verbose_e) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, f_console_standard_short_verbose_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, sizeof(unsigned char) * f_console_standard_short_verbose_s.used);
}
else if (main->context.mode == f_console_verbosity_debug_e) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, f_console_standard_short_debug_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, sizeof(unsigned char) * f_console_standard_short_debug_s.used);
}
*status = fll_execute_arguments_add(argument, &arguments);
source.string = source_string;
source_string[source.used] = 0;
- memcpy(source_string, path->string, path->used);
- memcpy(source_string + path->used, sources[i]->array[j].string, sources[i]->array[j].used);
+ memcpy(source_string, path->string, sizeof(unsigned char) * path->used);
+ memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
status = fll_execute_arguments_add(source, arguments);
if (F_status_is_error(status)) return status;
fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
- memcpy(source_string + source.used, fake_path_part_script_s.string, fake_path_part_script_s.used);
+ memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(unsigned char) * fake_path_part_script_s.used);
source.used += fake_path_part_script_s.used;
source.string[source.used] = 0;
unsigned char path_headers_string[path_headers.used + 1];
path_headers.string = path_headers_string;
- memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used);
+ memcpy(path_headers_string, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
if (data_build.setting.path_headers.used) {
- memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, data_build.setting.path_headers.used);
+ memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, sizeof(unsigned char) * data_build.setting.path_headers.used);
}
path_headers_string[path_headers.used] = 0;
fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
- memcpy(source_string + source.used, fake_path_part_script_s.string, fake_path_part_script_s.used);
+ memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(unsigned char) * fake_path_part_script_s.used);
source.used += fake_path_part_script_s.used;
source.string[source.used] = 0;
source->used = 0;
- memcpy(source->string, main->path_sources.string, main->path_sources.used);
+ memcpy(source->string, main->path_sources.string, sizeof(unsigned char) * main->path_sources.used);
source->used += main->path_sources.used;
- memcpy(source->string + source->used, setting_path_source->string, setting_path_source->used);
+ memcpy(source->string + source->used, setting_path_source->string, sizeof(unsigned char) * setting_path_source->used);
source->used += setting_path_source->used;
if (data_build->setting.has_path_standard) {
if (data_build->setting.build_language == fake_build_language_type_c_e) {
- memcpy(source->string + source->used, fake_build_language_c_s.string, fake_build_language_c_s.used);
+ memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(unsigned char) * fake_build_language_c_s.used);
source->used += fake_build_language_c_s.used;
}
else if (data_build->setting.build_language == fake_build_language_type_cpp_e) {
- memcpy(source->string + source->used, fake_build_language_cpp_s.string, fake_build_language_cpp_s.used);
+ memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(unsigned char) * fake_build_language_cpp_s.used);
source->used += fake_build_language_cpp_s.used;
}
else if (data_build->setting.build_language == fake_build_language_type_bash_e) {
- memcpy(source->string + source->used, fake_build_language_bash_s.string, fake_build_language_bash_s.used);
+ memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(unsigned char) * fake_build_language_bash_s.used);
source->used += fake_build_language_bash_s.used;
}
- memcpy(source->string + source->used, f_path_separator_s.string, f_path_separator_s.used);
+ memcpy(source->string + source->used, f_path_separator_s.string, sizeof(unsigned char) * f_path_separator_s.used);
source->used += f_path_separator_s.used;
}
fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
- memcpy(source_string + source.used, sources[i]->array[j].string, sources[i]->array[j].used);
+ memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
source.used += sources[i]->array[j].used;
source.string[source.used] = 0;
fake_build_path_source_string(main, data_build, &data_build->setting.path_sources_object, &source);
if (specific->used) {
- memcpy(source_string + source.used, specific->string, specific->used);
+ memcpy(source_string + source.used, specific->string, sizeof(unsigned char) * specific->used);
source.used += specific->used;
}
else {
- memcpy(source_string + source.used, generic->string, generic->used);
+ memcpy(source_string + source.used, generic->string, sizeof(unsigned char) * generic->used);
source.used += generic->used;
}
destination.string = destination_string;
destination_string[destination.used] = 0;
- memcpy(destination_string, arguments.array[total].string, arguments.array[total].used);
+ memcpy(destination_string, arguments.array[total].string, sizeof(unsigned char) * arguments.array[total].used);
if (existing) {
- memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, arguments.array[i].used);
+ memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(unsigned char) * arguments.array[i].used);
destination_string[arguments.array[total].used] = f_path_separator_s.string[0];
}
destination.string = destination_string;
destination_string[destination.used] = 0;
- memcpy(destination_string, arguments.array[total].string, arguments.array[total].used);
+ memcpy(destination_string, arguments.array[total].string, sizeof(unsigned char) * arguments.array[total].used);
if (existing) {
- memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, arguments.array[i].used);
+ memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(unsigned char) * arguments.array[i].used);
destination_string[arguments.array[total].used] = f_path_separator_s.string[0];
}
path_file.string = path_file_string;
path_file_string[path_file.used] = 0;
- memcpy(path_file_string, data_make->main->path_data_build.string, data_make->main->path_data_build.used);
- memcpy(path_file_string + data_make->main->path_data_build.used, arguments.array[0].string, arguments.array[0].used);
+ memcpy(path_file_string, data_make->main->path_data_build.string, sizeof(unsigned char) * data_make->main->path_data_build.used);
+ memcpy(path_file_string + data_make->main->path_data_build.used, arguments.array[0].string, sizeof(unsigned char) * arguments.array[0].used);
f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false);
source->used = 0;
- memcpy(source->string, main->path_sources.string, main->path_sources.used);
+ memcpy(source->string, main->path_sources.string, sizeof(unsigned char) * main->path_sources.used);
source->used += main->path_sources.used;
- memcpy(source->string, fake_default_path_sources_s.string, fake_default_path_sources_s.used);
+ memcpy(source->string, fake_default_path_sources_s.string, sizeof(unsigned char) * fake_default_path_sources_s.used);
source->used += fake_default_path_sources_s.used;
- memcpy(source->string + source->used, partial->string, partial->used);
+ memcpy(source->string + source->used, partial->string, sizeof(unsigned char) * partial->used);
source->used += partial->used;
source->string[source->used] = 0;
path_file_other.string = path_file_other_string;
path_file_other_string[path_file_other.used] = 0;
- memcpy(path_file_other_string, firewall_network_path_s.string, firewall_network_path_s.used);
- memcpy(path_file_other_string + firewall_network_path_s.used, firewall_file_other_s.string, firewall_file_other_s.used);
+ memcpy(path_file_other_string, firewall_network_path_s.string, sizeof(unsigned char) * firewall_network_path_s.used);
+ memcpy(path_file_other_string + firewall_network_path_s.used, firewall_file_other_s.string, sizeof(unsigned char) * firewall_file_other_s.used);
status = firewall_buffer_rules(main, path_file_other, F_false, &local);
path_file_first.string = path_file_first_string;
path_file_first_string[path_file_first.used] = 0;
- memcpy(path_file_first_string, firewall_network_path_s.string, firewall_network_path_s.used);
- memcpy(path_file_first_string + firewall_network_path_s.used, firewall_file_first_s.string, firewall_file_first_s.used);
+ memcpy(path_file_first_string, firewall_network_path_s.string, sizeof(unsigned char) * firewall_network_path_s.used);
+ memcpy(path_file_first_string + firewall_network_path_s.used, firewall_file_first_s.string, sizeof(unsigned char) * firewall_file_first_s.used);
status = firewall_buffer_rules(main, path_file_first, F_false, &local);
if (F_status_is_error(status)) break;
}
- memcpy(device.string, main->devices.array[local.device].string, main->devices.array[local.device].used);
+ memcpy(device.string, main->devices.array[local.device].string, sizeof(unsigned char) * main->devices.array[local.device].used);
device.used = main->devices.array[local.device].used;
}
// Determine the linear order in which all of the three parameter values are to be applied.
if (values_total) {
- memset(values_order, 0, values_total);
+ memset(values_order, 0, sizeof(unsigned char) * values_total);
f_array_length_t k = 0;
f_array_length_t l = 0;
break;
}
- memcpy(content.string, block.string + range.start, total);
+ memcpy(content.string, block.string + range.start, sizeof(unsigned char) * total);
content.used += total;
}
break;
}
- memcpy(content.string, block.string, block.used);
+ memcpy(content.string, block.string, sizeof(unsigned char) * block.used);
content.used += block.used;
}