blob: ee92763880e251d7c034ee6fa254673997514dc8 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/**
* @file indent.h
* prototypes for indent.cpp
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef INDENT_H_INCLUDED
#define INDENT_H_INCLUDED
#include "uncrustify_types.h"
/**
* Change the top-level indentation only by changing the column member in
* the chunk structures.
* The level indicator must already be set.
*/
void indent_text();
/**
* Indent the preprocessor stuff from column 1.
* FIXME: This is broken if there is a comment or escaped newline
* between '#' and 'define'.
*/
void indent_preproc();
/**
*
* @param pc chunk at the start of the line
* @param column desired column
*/
void indent_to_column(Chunk *pc, size_t column);
/**
* Same as indent_to_column, except we can move both ways
*
* @param pc chunk at the start of the line
* @param column desired column
*/
void align_to_column(Chunk *pc, size_t column);
//! Scan to see if the whole file is covered by one #ifdef
bool ifdef_over_whole_file();
/**
* Changes the initial indent for a line to the given column
*
* @param pc The chunk at the start of the line
* @param column The desired column
*/
void reindent_line(Chunk *pc, size_t column);
#endif /* INDENT_H_INCLUDED */
|