Lines Matching refs:string

25 acpi_ut_bound_string_length(const char *string, acpi_size count);
27 static char *acpi_ut_bound_string_output(char *string, const char *end, char c);
29 static char *acpi_ut_format_number(char *string,
34 static char *acpi_ut_put_number(char *string, u64 number, u8 base, u8 upper);
40 * PARAMETERS: string - String with boundary
41 * count - Boundary of the string
43 * RETURN: Length of the string. Less than or equal to Count.
45 * DESCRIPTION: Calculate the length of a string with boundary.
50 acpi_ut_bound_string_length(const char *string, acpi_size count)
54 while (*string && count) {
56 string++;
67 * PARAMETERS: string - String with boundary
68 * end - Boundary of the string
69 * c - Character to be output to the string
73 * DESCRIPTION: Output a character into a string with boundary check.
77 static char *acpi_ut_bound_string_output(char *string, const char *end, char c)
80 if (string < end) {
81 *string = c;
84 ++string;
85 return (string);
92 * PARAMETERS: string - Buffer to hold reverse-ordered string
99 * DESCRIPTION: Convert an integer into a string, note that, the string holds a
104 static char *acpi_ut_put_number(char *string, u64 number, u8 base, u8 upper)
110 pos = string;
131 * PARAMETERS: string - String buffer
136 * DESCRIPTION: Scan a string for a decimal integer.
140 const char *acpi_ut_scan_number(const char *string, u64 *number_ptr)
144 while (isdigit((int)*string)) {
146 number += *(string++) - '0';
150 return (string);
157 * PARAMETERS: string - String buffer
162 * DESCRIPTION: Print a decimal integer into a string.
166 const char *acpi_ut_print_number(char *string, u64 number)
173 pos2 = string;
180 return (string);
187 * PARAMETERS: string - String buffer with boundary
188 * end - Boundary of the string
197 * DESCRIPTION: Print an integer into a string with any base and any precision.
201 static char *acpi_ut_format_number(char *string,
252 /* Generate full string in reverse order */
265 /* Output the string */
269 string = acpi_ut_bound_string_output(string, end, ' ');
273 string = acpi_ut_bound_string_output(string, end, sign);
276 string = acpi_ut_bound_string_output(string, end, '0');
278 string =
279 acpi_ut_bound_string_output(string, end,
285 string = acpi_ut_bound_string_output(string, end, zero);
290 string = acpi_ut_bound_string_output(string, end, '0');
293 string = acpi_ut_bound_string_output(string, end,
297 string = acpi_ut_bound_string_output(string, end, ' ');
300 return (string);
307 * PARAMETERS: string - String with boundary
308 * size - Boundary of the string
314 * DESCRIPTION: Formatted output to a string using argument list pointer.
318 int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
334 pos = string;
337 end = string + size;
554 return ((int)ACPI_PTR_DIFF(pos, string));
561 * PARAMETERS: string - String with boundary
562 * size - Boundary of the string
567 * DESCRIPTION: Formatted output to a string.
571 int snprintf(char *string, acpi_size size, const char *format, ...)
577 length = vsnprintf(string, size, format, args);
587 * PARAMETERS: string - String with boundary
592 * DESCRIPTION: Formatted output to a string.
596 int sprintf(char *string, const char *format, ...)
602 length = vsnprintf(string, ACPI_UINT32_MAX, format, args);