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:
@ -20,7 +20,7 @@ static int num_screens;
|
||||
*/
|
||||
static Output *get_screen_at(unsigned int x, unsigned int y) {
|
||||
Output *output;
|
||||
TAILQ_FOREACH(output, &outputs, outputs)
|
||||
TAILQ_FOREACH (output, &outputs, outputs)
|
||||
if (output->rect.x == x && output->rect.y == y)
|
||||
return output;
|
||||
|
||||
@ -60,7 +60,8 @@ void fake_outputs_init(const char *output_spec) {
|
||||
/* We always treat the screen at 0x0 as the primary screen */
|
||||
if (new_output->rect.x == 0 && new_output->rect.y == 0)
|
||||
TAILQ_INSERT_HEAD(&outputs, new_output, outputs);
|
||||
else TAILQ_INSERT_TAIL(&outputs, new_output, outputs);
|
||||
else
|
||||
TAILQ_INSERT_TAIL(&outputs, new_output, outputs);
|
||||
output_init_con(new_output);
|
||||
init_ws_for_output(new_output, output_get_content(new_output->con));
|
||||
num_screens++;
|
||||
|
Reference in New Issue
Block a user