-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefactor.h
More file actions
122 lines (91 loc) · 5.15 KB
/
refactor.h
File metadata and controls
122 lines (91 loc) · 5.15 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/////////////////////////////////////////////////////////////////////////////////////////////
// __ _ _ //
// _ __ ___ / _| __ _ ___ | |_ ___ _ __ | |__ //
// | '__|/ _ \| |_ / _` | / __|| __|/ _ \ | '__|| '_ \ //
// | | | __/| _|| (_| || (__ | |_| (_) || | _ | | | | //
// |_| \___||_| \__,_| \___| \__|\___/ |_|(_)|_| |_| //
// //
// Code 're-factor' utility - stand-alone or utility API //
// //
/////////////////////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
X11workbench - X11 programmer's 'work bench' application and toolkit
Copyright (c) 2010-2019 by Bob Frazier (aka 'Big Bad Bombastic Bob')
all rights reserved
DISCLAIMER: The X11workbench application and toolkit software are supplied
'as-is', with no warranties, either implied or explicit.
BSD-like license:
There is no restriction as to what you can do with this software, so long
as you include the above copyright notice and DISCLAIMER for any distributed
work that is linked with, equivalent to, or derived from any portion of this
software, along with this paragraph that explains the terms of the license if
the source is also being made available. "Linked with" includes the use of a
portion of any of the source and/or header files, or their compiled binary
output, as a part of your application or library. A "derived work"
describes a work that uses a significant portion of the source files or the
algorithms that are included with this software.
EXCLUSIONS
Specifically excluded from this requirement are files that were generated by
the software, or anything that is included with the software that is part of
another package (such as files that were created or added during the
'configure' process).
DISTRIBUTION
The license also covers the use of part or all of any of the X11 workbench
toolkit source or header files in your distributed application, in source or
binary form. If you do not ship the source, the above copyright statement
and DISCLAIMER is still required to be placed in a reasonably prominent
place, such as documentation, splash screens, and/or 'about the application'
dialog boxes.
Use and distribution are in accordance with GPL, LGPL, and/or the above
BSD-like license. See COPYING and README.md files for more information.
Additionally, this software, in source or binary form, and in whole or in
part, may be used by explicit permission from the author, without the need
of a license.
Additional information at http://sourceforge.net/projects/X11workbench
and http://bombasticbob.github.io/X11workbench/
******************************************************************************/
#ifndef _REFACTOR_H_INCLUDED_
#define _REFACTOR_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
enum
{
refactor_symbol_functions = 1,
refactor_symbol_variables = 2,
refactor_symbol_macros = 4,
refactor_symbol_classes = 8,
refactor_symbol_members = 0x10,
refactor_symbol_all = 0x7fffffff,
refactor_symbol_nocase = 0x80000000
};
enum
{
refactor_indent_width_mask = 0xf,
refactor_indent_split_ll = 0x10, // split long lines (lineup with '(' or soft tab depending on flags)
refactor_indent_hard_tab = 0x20,
refactor_indent_split_str = 0x40, // split long strings as well as long lines of code
refactor_indent_soft_tab_line_cont = 0x80, // 'soft tab' line continuations (or '{}' depending on other flags)
refactor_indent_KandR = 0x100,
refactor_indent_1TBS = 0x200, // K&R with } else {
refactor_indent_Allman = 0x400,
refactor_indent_BSD = 0x400, // alias for 'Allman'
refactor_indent_BSD_KNF = 0x4a8, // BSD kernel normal format, ITBS with 8 char hard tab, 4 char soft tab for line continuations
// (don't include this with any other flags)
refactor_indent_Whitesmith = 0x800, // BSD with tabbed '{}' for control/scope, function and struct body '{}' not tabbed over
refactor_indent_GNU = 0x880, // half-indent '{}'
refactor_reserved = 0xf000, // reserved flags
refactor_lang_MASK = 0xf0000,
refactor_lang_C = 0x10000,
refactor_lang_CPP = 0x20000,
refactor_lang_Pascal = 0x30000,
refactor_lang_Java = 0x40000,
// other languages reserved
};
// workbench refactor tools - RESERVED
int refactor_symbol(const char *szSymbol, const char *szFile, int iFlags);
int refactor_indent(const char *szFile, int iFlags); // TODO: calls 'indent' application?
#ifdef __cplusplus
};
#endif // __cplusplus
#endif // _REFACTOR_H_INCLUDED_