* @param cp The string to be converted
* @param endp Updated to point to the first character not converted
* @param base The number base to use (0 for the default)
- * @return value decoded from string (0 if invalid)
+ * Return: value decoded from string (0 if invalid)
*
* Converts a string to an unsigned long. If there are invalid characters at
* the end these are ignored. In the worst case, if all characters are invalid,
*
* @param cp The string to be converted
* @param endp Updated to point to the first character not converted
- * @return value decoded from string (0 if invalid)
+ * Return: value decoded from string (0 if invalid)
*
* Converts a hex string to an unsigned long. If there are invalid characters at
* the end these are ignored. In the worst case, if all characters are invalid,
*
* @param cp The string to be converted
* @param endp Updated to point to the first character not converted
- * @return value decoded from string (0 if invalid)
+ * Return: value decoded from string (0 if invalid)
*
* Converts a decimal string to an unsigned long. If there are invalid
* characters at the end these are ignored. In the worst case, if all characters
* @param cp The string to be converted
* @param base The number base to use (0 for the default)
* @param res The converted result value
- * @return 0 if conversion is successful and *res is set to the converted
+ * Return: 0 if conversion is successful and *res is set to the converted
* value, otherwise it returns -EINVAL and *res is set to 0.
*
* strict_strtoul converts a string to an unsigned long only if the
* For example, "abc123" would return 123.
*
* @str: String to exxamine
- * @return training number if found, else -1
+ * Return: training number if found, else -1
*/
long trailing_strtol(const char *str);
* @str: String to exxamine
* @end: Pointer to end of string to examine, or NULL to use the
* whole string
- * @return training number if found, else -1
+ * Return: training number if found, else -1
*/
long trailing_strtoln(const char *str, const char *end);
* @param buf The buffer to place the result into
* @param fmt The format string to use
* @param args Arguments for the format string
- * @return the number of characters which have been written into
+ * Return: the number of characters which have been written into
* the @buf not including the trailing '\0'.
*
* If you're not already dealing with a va_list consider using scnprintf().
* See the vsprintf() documentation for format string extensions over C99.
*/
int vsprintf(char *buf, const char *fmt, va_list args);
-char *simple_itoa(ulong i);
+
+/**
+ * simple_itoa() - convert an unsigned integer to a string
+ *
+ * This returns a static string containing the decimal representation of the
+ * given value. The returned value may be overwritten by other calls to other
+ * simple_... functions, so should be used immediately
+ *
+ * @val: Value to convert
+ * Return: string containing the decimal representation of @val
+ */
+char *simple_itoa(ulong val);
+
+/**
+ * simple_xtoa() - convert an unsigned integer to a hex string
+ *
+ * This returns a static string containing the hexadecimal representation of the
+ * given value. The returned value may be overwritten by other calls to other
+ * simple_... functions, so should be used immediately
+ *
+ * @val: Value to convert
+ * Return: string containing the hexecimal representation of @val
+ */
+char *simple_xtoa(ulong num);
/**
* Format a string and place it in a buffer
* @param size The size of the buffer, including the trailing null space
* @param fmt The format string to use
* @param ... Arguments for the format string
- * @return the number of characters which would be
+ * Return: the number of characters which would be
* generated for the given input, excluding the trailing null,
* as per ISO C99. If the return is greater than or equal to
* @size, the resulting string is truncated.
* @param size The size of the buffer, including the trailing null space
* @param fmt The format string to use
* @param args Arguments for the format string
- * @return The number characters which would be generated for the given
+ * Return: The number characters which would be generated for the given
* input, excluding the trailing '\0', as per ISO C99. Note that fewer
* characters may be written if this number of characters is >= size.
*
* @param size The size of the buffer, including the trailing null space
* @param fmt The format string to use
* @param args Arguments for the format string
- * @return the number of characters which have been written into
+ * Return: the number of characters which have been written into
* the @buf not including the trailing '\0'. If @size is == 0 the function
* returns 0.
*
void str_to_upper(const char *in, char *out, size_t len);
/**
+ * vsscanf - Unformat a buffer into a list of arguments
+ * @buf: input buffer
+ * @fmt: format of buffer
+ * @args: arguments
+ */
+int vsscanf(const char *inp, char const *fmt0, va_list ap);
+
+/**
* sscanf - Unformat a buffer into a list of arguments
* @buf: input buffer
* @fmt: formatting of buffer