Re-format code to avoid overly long lines and declarations

This commit is contained in:
Nils O. Selåsdal
2015-04-04 23:29:27 +02:00
parent a55139aba6
commit c6318c079d
17 changed files with 94 additions and 46 deletions
+9 -3
View File
@@ -36,7 +36,9 @@ uint8_t* uc_hex_decode(const char *restrict in, size_t maxlen,uint8_t *restrict
/** As uc_hex_encode , but inserts the @delim string between each converted
* byte (each 2 hex chars)
*/
char* uc_hex_encode_delim(const uint8_t *restrict in, size_t inlen, char *restrict out, int outlen, const char *restrict delim);
char* uc_hex_encode_delim(const uint8_t *restrict in, size_t inlen,
char *restrict out, int outlen,
const char *restrict delim);
/**
* Convert the string to lowercase, calls tolower() on each char.
@@ -67,7 +69,9 @@ void uc_str_toupper(char *s);
* if the number of ASCII digits is odd. This would usually be 0x0 or 0xf.
* @return the number of bytes written to bcdout
*/
size_t uc_ascii2bcd(const char *restrict ascii, unsigned char *restrict bcdout, unsigned char filler);
size_t uc_ascii2bcd(const char *restrict ascii,
unsigned char *restrict bcdout,
unsigned char filler);
/** Convert the BCD digits to ascii.
* The resulting ascii string is 0 terminated.
@@ -77,7 +81,9 @@ size_t uc_ascii2bcd(const char *restrict ascii, unsigned char *restrict bcdout,
* @param asciiout buffer to place ASCII in, must be UC_ASCII_LEN(bcdlen)+1 big
* @return the number of characters written to bcdout (this will always be UC_ASCII_LEN(bcdlen)
*/
size_t uc_bcd2ascii(const unsigned char *restrict bcd, size_t bcdlen, char *restrict asciiout);
size_t uc_bcd2ascii(const unsigned char *restrict bcd,
size_t bcdlen,
char *restrict asciiout);
/** uc_sprintb for converting the values into ascii bit representation
* e.g. 0x3 -> "00000011". The result must be able to hold the max number