summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/src/space.h
blob: 3989e126114c26ed2a0bddc5db5489cd66aea517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
 * @file space.h
 * prototypes for space.cpp
 *
 * @author  Ben Gardner
 * @license GPL v2+
 */
#ifndef SPACE_H_INCLUDED
#define SPACE_H_INCLUDED

#include "uncrustify_types.h"


/**
 * Marches through the whole file and checks to see how many spaces should be
 * between two chunks
 */
void space_text(void);


//! Marches through the whole file and adds spaces around nested parenthesis
void space_text_balance_nested_parens(void);


//! Determines if a space is required between two chunks
size_t space_needed(Chunk *first, Chunk *second);


/**
 * Calculates the column difference between two chunks.
 * The rules are bent a bit here, as IARF_IGNORE and IARF_ADD become IARF_FORCE.
 * So the column difference is either first->len or first->len + 1.
 *
 * @param first   The first chunk
 * @param second  The second chunk
 *
 * @return the column difference between the two chunks
 */
size_t space_col_align(Chunk *first, Chunk *second);


void space_add_after(Chunk *pc, size_t count);


#endif /* SPACE_H_INCLUDED */