f_file_mode mode;
} f_file;
- #define f_file_initialize { 0, sizeof(int8_t), 0, (f_file_mode) f_file_read_only }
+ #define f_file_initialize { 0, 1, 0, (f_file_mode) f_file_read_only }
#endif // _di_f_file_
/**
*max_width = width;
if (f_utf_is_big_endian()) {
- memcpy(*character, &utf_character, sizeof(int8_t) * width);
+ memcpy(*character, &utf_character, width);
}
else {
uint32_t utf = 0;
utf = (f_macro_utf_character_to_char_4(utf_character) << 24) | (f_macro_utf_character_to_char_3(utf_character) << 16) | (f_macro_utf_character_to_char_2(utf_character) << 8) | f_macro_utf_character_to_char_1(utf_character);
}
- memcpy(*character, &utf, sizeof(int8_t) * width);
+ memcpy(*character, &utf, width);
}
return f_none;
return status;
}
- memcpy(names->array[names->used].string, listing[counter]->d_name, sizeof(int8_t) * size);
+ memcpy(names->array[names->used].string, listing[counter]->d_name, size);
names->array[names->used].used = size;
names->used++;
}
* The number of steps to decrement the start position.
* The steps refer to characters and not integers.
* Essentially this number is considered against the width of every character found.
- * (For ASCII each step would be (sizeof(int8_t)).
+ * (For ASCII each step would be (sizeof(int8_t), which is 1).
* (For UTF-8 character of width 3, each step would be (3 * sizeof(int8_t)).
*
* @return
* The number of steps to increment the start position.
* The steps refer to characters and not integers.
* Essentially this number is considered against the width of every character found.
- * (For ASCII each step would be (sizeof(int8_t)).
+ * (For ASCII each step would be (sizeof(int8_t), which is 1).
* (For UTF-8 character of width 3, each step would be (3 * sizeof(int8_t)).
*
* @return
}
if (serialized->used == 0) {
- memcpy(serialized->string + serialized->used, value.string, sizeof(int8_t) * value.used);
+ memcpy(serialized->string + serialized->used, value.string, value.used);
serialized->used += value.used;
}
else {
- memcpy(serialized->string + serialized->used, f_serialized_simple_splitter_string, sizeof(int8_t));
- memcpy(serialized->string + serialized->used + 1, value.string, sizeof(int8_t) * value.used);
+ memcpy(serialized->string + serialized->used, f_serialized_simple_splitter_string, 1);
+ memcpy(serialized->string + serialized->used + 1, value.string, value.used);
serialized->used += value.used + 1;
}
return status;
}
- memcpy(result->string, buffer.string + location.start, sizeof(int8_t) * size);
+ memcpy(result->string, buffer.string + location.start, size);
result->used = size;
return f_none;
return status;
}
- memcpy(fixed_arguments[i + 1], arguments.array[i].string, sizeof(int8_t) * arguments.array[i].used);
+ memcpy(fixed_arguments[i + 1], arguments.array[i].string, arguments.array[i].used);
fixed_arguments[i + 1][arguments.array[i].used] = f_string_eos;
} // for
return status;
}
- memcpy(fixed_arguments[i + 1], arguments.array[i].string, sizeof(int8_t) * arguments.array[i].used);
+ memcpy(fixed_arguments[i + 1], arguments.array[i].string, arguments.array[i].used);
fixed_arguments[i + 1][arguments.array[i].used] = f_string_eos;
} // for
return status;
}
- memcpy((void *)file_path.string, network_path, sizeof(int8_t) * network_path_length);
- memcpy((void *)(file_path.string + network_path_length), data->devices.array[i].string, sizeof(int8_t) * data->devices.array[i].used);
- memcpy((void *)(file_path.string + network_path_length + data->devices.array[i].used), firewall_file_suffix, sizeof(int8_t) * firewall_file_suffix_length);
+ memcpy((void *)file_path.string, network_path, network_path_length);
+ memcpy((void *)(file_path.string + network_path_length), data->devices.array[i].string, data->devices.array[i].used);
+ memcpy((void *)(file_path.string + network_path_length + data->devices.array[i].used), firewall_file_suffix, firewall_file_suffix_length);
file_path.used = network_path_length + data->devices.array[i].used + firewall_file_suffix_length;
file_path.string[file_path.used] = 0;
f_macro_fss_contents_delete(status, contents);
#define firewall_macro_concat_string(destination, source, length) \
- memcpy((void *)(destination), source, sizeof(int8_t) * length);
+ memcpy((void *)(destination), source, length);
#define firewall_macro_rule_contents_has_incorrect_items(index, total_items) \
local.rule_contents.array[index].used <= 0 || local.rule_contents.array[index].used > total_items