#endif
#ifndef _di_fl_conversion_string_to_binary_signed_
- f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
+ f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_binary_signed_
#ifndef _di_fl_conversion_string_to_binary_unsigned_
- f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_binary_unsigned_
#ifndef _di_fl_conversion_string_to_decimal_signed_
- f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
+ f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_decimal_signed_
#ifndef _di_fl_conversion_string_to_decimal_unsigned_
- f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_decimal_unsigned_
#ifndef _di_fl_conversion_string_to_duodecimal_signed_
- f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
+ f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_duodecimal_signed_
#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
- f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_duodecimal_unsigned_
#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
- f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
+ f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_hexidecimal_signed_
#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
- f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_hexidecimal_unsigned_
#ifndef _di_fl_conversion_string_to_octal_signed_
- f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
+ f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_octal_signed_
#ifndef _di_fl_conversion_string_to_octal_unsigned_
- f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
#endif // _di_fl_conversion_string_to_octal_unsigned_
#ifndef _di_fl_conversion_string_to_number_signed_
- f_status_t fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_number_signed(const f_string_t string, const f_string_range_t range, f_number_signed_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
}
if (mode == 10) {
- return fl_conversion_string_to_decimal_signed(string, number, location_offset, vector == -1);
+ return fl_conversion_string_to_decimal_signed(string, location_offset, vector == -1, number);
}
if (mode == 16) {
- return fl_conversion_string_to_hexidecimal_signed(string, number, location_offset, vector == -1);
+ return fl_conversion_string_to_hexidecimal_signed(string, location_offset, vector == -1, number);
}
if (mode == 12) {
- return fl_conversion_string_to_duodecimal_signed(string, number, location_offset, vector == -1);
+ return fl_conversion_string_to_duodecimal_signed(string, location_offset, vector == -1, number);
}
if (mode == 8) {
- return fl_conversion_string_to_octal_signed(string, number, location_offset, vector == -1);
+ return fl_conversion_string_to_octal_signed(string, location_offset, vector == -1, number);
}
- return fl_conversion_string_to_binary_signed(string, number, location_offset, vector == -1);
+ return fl_conversion_string_to_binary_signed(string, location_offset, vector == -1, number);
}
#endif // _di_fl_conversion_string_to_number_signed_
#ifndef _di_fl_conversion_string_to_number_unsigned_
- f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
+ f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
#ifndef _di_level_1_parameter_checking_
if (!string) return F_status_set_error(F_parameter);
- if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string[0]) {
}
if (mode == 10) {
- status = fl_conversion_string_to_decimal_unsigned(string, number, location_offset);
+ status = fl_conversion_string_to_decimal_unsigned(string, location_offset, number);
}
else if (mode == 16) {
- status = fl_conversion_string_to_hexidecimal_unsigned(string, number, location_offset);
+ status = fl_conversion_string_to_hexidecimal_unsigned(string, location_offset, number);
}
else if (mode == 12) {
- status = fl_conversion_string_to_duodecimal_unsigned(string, number, location_offset);
+ status = fl_conversion_string_to_duodecimal_unsigned(string, location_offset, number);
}
else if (mode == 8) {
- status = fl_conversion_string_to_octal_unsigned(string, number, location_offset);
+ status = fl_conversion_string_to_octal_unsigned(string, location_offset, number);
}
else {
- status = fl_conversion_string_to_binary_unsigned(string, number, location_offset);
+ status = fl_conversion_string_to_binary_unsigned(string, location_offset, number);
}
// +/- signs are not allowed.
*
* @param string
* The string to convert.
- * @param number
- * This will store the value of the converted string.
- * This value is only changed on success.
* @param location
* The start/stop range to convert.
* @param negative
* Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ * This will store the value of the converted string.
+ * This value is only changed on success.
*
* @return
* F_none if the binary string was converted to an signed long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-binary values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_number_underflow (with error bit) on integer underflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_binary_signed_
- extern f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
+ extern f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
#endif // _di_fl_conversion_string_to_binary_signed_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none if the binary string was converted to an unsigned long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-binary values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_binary_unsigned_
- extern f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
#endif // _di_fl_conversion_string_to_binary_unsigned_
/**
*
* @param string
* The string to convert.
- * @param number
- * This will store the value of the converted string.
- * This value is only changed on success.
* @param range
* The start/stop range to convert.
* @param negative
* Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ * This will store the value of the converted string.
+ * This value is only changed on success.
*
* @return
* F_none if the decimal string was converted to an signed long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-decimal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_number_underflow (with error bit) on integer underflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_decimal_signed_
- extern f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
+ extern f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
#endif // _di_fl_conversion_string_to_decimal_signed_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none if the decimal string was converted to an unsigned long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-decimal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_decimal_unsigned_
- extern f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
#endif // _di_fl_conversion_string_to_decimal_unsigned_
/**
*
* @param string
* The string to convert.
- * @param number
- * This will store the value of the converted string.
- * This value is only changed on success.
* @param range
* The start/stop range to convert.
* @param negative
* Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ * This will store the value of the converted string.
+ * This value is only changed on success.
*
* @return
* F_none if the duodecimal string was converted to an signed long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-duodecimal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_number_underflow (with error bit) on integer underflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_duodecimal_signed_
- extern f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
+ extern f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
#endif // _di_fl_conversion_string_to_duodecimal_signed_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none if the duodecimal string was converted to an unsigned long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-duodecimal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
- extern f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
#endif // _di_fl_conversion_string_to_duodecimal_unsigned_
/**
*
* @param string
* The string to convert.
- * @param number
- * This will store the value of the converted string.
- * This value is only changed on success.
* @param range
* The start/stop range to convert.
* @param negative
* Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ * This will store the value of the converted string.
+ * This value is only changed on success.
*
* @return
* F_none if the hexidecimal string was converted to an signed long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-hexidecimal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_number_underflow (with error bit) on integer underflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
- extern f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
+ extern f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
#endif // _di_fl_conversion_string_to_hexidecimal_signed_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none if the hexidecimal string was converted to an unsigned long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-hexidecimal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
- extern f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
#endif // _di_fl_conversion_string_to_hexidecimal_unsigned_
/**
*
* @param string
* The string to convert.
- * @param number
- * This will store the value of the converted string.
- * This value is only changed on success.
* @param range
* The start/stop range to convert.
* @param negative
* Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ * This will store the value of the converted string.
+ * This value is only changed on success.
*
* @return
* F_none if the octal string was converted to an signed long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-octal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_octal_signed_
- extern f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
+ extern f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
#endif // _di_fl_conversion_string_to_octal_signed_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none if the octal string was converted to an unsigned long.
* F_data_not if string starts with a null (length is 0).
+ *
* F_number (with error bit) if no conversion was made due to non-octal values being found.
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_octal_unsigned_
- extern f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
#endif // _di_fl_conversion_string_to_octal_unsigned_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none on success.
* F_data_not if string starts with a null (length is 0).
+ *
* F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found.
* F_number (with error bit) if parameter is not a number.
* F_number_overflow (with error bit) on integer overflow.
* @see strtoll()
*/
#ifndef _di_fl_conversion_string_to_number_signed_
- extern f_status_t fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_number_signed(const f_string_t string, const f_string_range_t range, f_number_signed_t *number);
#endif // _di_fl_conversion_string_to_number_signed_
/**
*
* @param string
* The string to convert.
+ * @param range
+ * The start/stop range to convert.
* @param number
* This will store the value of the converted string.
* This value is only changed on success.
- * @param range
- * The start/stop range to convert.
*
* @return
* F_none on success.
* F_data_not if string starts with a null (length is 0).
+ *
* F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found.
* F_number (with error bit) if parameter is not a number.
* F_number_negative (with error bit) on negative value.
* @see strtoull()
*/
#ifndef _di_fl_conversion_string_to_number_unsigned_
- extern f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
+ extern f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
#endif // _di_fl_conversion_string_to_number_unsigned_
#ifdef __cplusplus
range.stop = i;
// 1: A possibly valid header type was found, now convert it into its proper format and save the header type.
- const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
+ const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, range, &header->type);
if (F_status_is_error(status)) return status;
if (status == F_none) {
range.start = i - 4;
range.stop = i;
- const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
+ const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, range, &header->type);
if (F_status_is_error(status)) return status;
header->length = i + 1;
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status) || number < 1 || number >= 0xfb) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status) || number > f_number_t_size_unsigned) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status) || number < 0 || number > f_number_t_size_unsigned) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
if (!isspace(pid_buffer.string[range.stop])) break;
} // for
- status = fl_conversion_string_to_decimal_unsigned(pid_buffer.string, &number, range);
+ status = fl_conversion_string_to_decimal_unsigned(pid_buffer.string, range, &number);
if (F_status_is_error_not(status) && number == data.pid) {
status = f_file_remove(path_pid.string);
f_number_unsigned_t number = 0;
// @todo fix argument ordering in fl_conversion_string_to_number_unsigned().
- f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
f_number_unsigned_t number = 0;
// @todo fix argument ordering in fl_conversion_string_to_number_unsigned().
- f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
if (action->status == F_none) {
const f_string_range_t range = f_macro_string_range_t_initialize(action->parameters.array[1].used);
- status = fl_conversion_string_to_number_unsigned(action->parameters.array[1].string, &action->number, range);
+ status = fl_conversion_string_to_number_unsigned(action->parameters.array[1].string, range, &action->number);
if (F_status_is_error(status) || status == F_data_not) {
action->number = 0;
break;
}
- status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[j]);
+ status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[j], &number);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
for (j = 1; j < 3; ++j, number = 0) {
- status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[j]);
+ status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[j], &number);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
f_number_signed_t number = 0;
- status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[1]);
+ status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[1], &number);
if (F_status_is_error(status) || (zero_only && number) || (!zero_only && (number < 1 || number > 99))) {
status = F_status_set_fine(status);
else if (type == controller_rule_setting_type_nice) {
f_number_signed_t number = 0;
- status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[0]);
+ status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[0], &number);
if (F_status_is_error(status) || number < -20 || number > 19) {
status = F_status_set_fine(status);
f_number_unsigned_t number = 0;
- f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
f_number_unsigned_t number = 0;
- f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
status_number = F_status_set_error(F_failure);
}
else {
- status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, &number_left, range);
+ status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number_left);
}
if (F_status_is_error_not(status_number)) {
status_number = F_status_set_error(F_failure);
}
else {
- status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, &number_right, range);
+ status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number_right);
}
}
else {
status_number = F_status_set_error(F_failure);
}
else {
- status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, &number, range);
+ status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number);
}
}
else {
range.start++;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_delimit, arguments.argv[location]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_depth, arguments.argv[position_depth]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_at, arguments.argv[depths->array[i].index_at]);
const f_array_length_t index = data->parameters[fss_basic_list_read_parameter_select].values.array[data->parameters[fss_basic_list_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_select, arguments.argv[index]);
const f_array_length_t index = data->parameters[fss_basic_list_read_parameter_line].values.array[data->parameters[fss_basic_list_read_parameter_line].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_line, arguments.argv[index]);
range.start++;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_delimit, arguments.argv[location]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_depth, arguments.argv[position_depth]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_at, arguments.argv[depths->array[i].index_at]);
const f_array_length_t index = data->parameters[fss_basic_read_parameter_select].values.array[data->parameters[fss_basic_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_select, arguments.argv[index]);
const f_array_length_t index = data->parameters[fss_basic_read_parameter_line].values.array[data->parameters[fss_basic_read_parameter_line].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_line, arguments.argv[index]);
range.start++;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit, arguments.argv[location]);
if (values_type[i] == fss_embedded_list_read_parameter_depth || values_type[i] == fss_embedded_list_read_parameter_at) {
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[values_order[i]]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[values_order[i]], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[values_order[i]], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_depth, arguments.argv[values_order[i]]);
const f_array_length_t index = data->parameters[fss_embedded_list_read_parameter_select].values.array[data->parameters[fss_embedded_list_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_select, arguments.argv[index]);
const f_array_length_t index = data->parameters[fss_embedded_list_read_parameter_line].values.array[data->parameters[fss_embedded_list_read_parameter_line].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_line, arguments.argv[index]);
range.start = 1;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore, arguments.argv[index]);
range.start = 1;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore, arguments.argv[index]);
range.start++;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_delimit, arguments.argv[location]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_depth, arguments.argv[position_depth]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_at, arguments.argv[depths->array[i].index_at]);
const f_array_length_t index = data->parameters[fss_extended_list_read_parameter_select].values.array[data->parameters[fss_extended_list_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_select, arguments.argv[index]);
const f_array_length_t index = data->parameters[fss_extended_list_read_parameter_line].values.array[data->parameters[fss_extended_list_read_parameter_line].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_line, arguments.argv[index]);
range.start = 1;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore, arguments.argv[index]);
range.start = 1;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore, arguments.argv[index]);
range.start++;
}
- status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_delimit, arguments.argv[location]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_depth, arguments.argv[position_depth]);
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_at, arguments.argv[depths->array[i].index_at]);
const f_array_length_t index = data->parameters[fss_extended_read_parameter_select].values.array[data->parameters[fss_extended_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_select, arguments.argv[index]);
const f_array_length_t index = data->parameters[fss_extended_read_parameter_line].values.array[data->parameters[fss_extended_read_parameter_line].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_line, arguments.argv[index]);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(value, &number, range);
+ status = fl_conversion_string_to_number_unsigned(value, range, &number);
if (status == F_none) {
fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol_s[0]);
f_status_t fss_status_code_convert_number(const fss_status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) {
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(value));
- f_status_t status = fl_conversion_string_to_number_unsigned(value, number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number);
if (*number > F_status_size_max_with_signal) {
fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, iki_read_long_at, arguments.argv[index]);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
+ status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number);
if (F_status_is_error(status)) {
fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, iki_read_long_line, arguments.argv[index]);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(value, &number, range);
+ status = fl_conversion_string_to_number_unsigned(value, range, &number);
if (status == F_none) {
fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol_s[0]);
f_status_t status_code_convert_number(const status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) {
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(value));
- f_status_t status = fl_conversion_string_to_number_unsigned(value, number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number);
if (*number > F_status_size_max_with_signal) {
fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]);