format **/*.c with clang-format-3.5
This has multiple effects: 1) The i3 codebase is now consistently formatted. clang-format uncovered plenty of places where inconsistent code made it into our code base. 2) When writing code, you don’t need to think or worry about our coding style. Write it in yours, then run clang-format-3.5 3) When submitting patches, we don’t need to argue about coding style. The basic idea is that we don’t want to care about _how_ we write the code, but _what_ it does :). The coding style that we use is defined in the .clang-format config file and is based on the google style, but adapted in such a way that the number of modifications to the i3 code base is minimal.
This commit is contained in:
@ -42,8 +42,8 @@ char *convert_ucs2_to_utf8(xcb_char2b_t *text, size_t num_glyphs) {
|
||||
|
||||
/* Do the conversion */
|
||||
size_t input_len = num_glyphs * sizeof(xcb_char2b_t);
|
||||
size_t rc = iconv(utf8_conversion_descriptor, (char**)&text,
|
||||
&input_len, &output, &output_size);
|
||||
size_t rc = iconv(utf8_conversion_descriptor, (char **)&text,
|
||||
&input_len, &output, &output_size);
|
||||
if (rc == (size_t)-1) {
|
||||
perror("Converting to UTF-8 failed");
|
||||
free(buffer);
|
||||
@ -83,8 +83,8 @@ xcb_char2b_t *convert_utf8_to_ucs2(char *input, size_t *real_strlen) {
|
||||
}
|
||||
|
||||
/* Do the conversion */
|
||||
size_t rc = iconv(ucs2_conversion_descriptor, (char**)&input,
|
||||
&input_size, (char**)&output, &output_size);
|
||||
size_t rc = iconv(ucs2_conversion_descriptor, (char **)&input,
|
||||
&input_size, (char **)&output, &output_size);
|
||||
if (rc == (size_t)-1) {
|
||||
perror("Converting to UCS-2 failed");
|
||||
free(buffer);
|
||||
|
Reference in New Issue
Block a user