├── .vim ├── autoload │ └── pathogen.vim ├── bundle │ ├── auto-pairs │ │ ├── README.md │ │ └── plugin │ │ │ └── auto-pairs.vim │ ├── minibufexplorer │ │ └── plugin │ │ │ └── minibufexpl.vim │ ├── nerdtree │ │ ├── .gitignore │ │ ├── README.markdown │ │ ├── autoload │ │ │ ├── nerdtree.vim │ │ │ └── nerdtree │ │ │ │ └── ui_glue.vim │ │ ├── doc │ │ │ └── NERD_tree.txt │ │ ├── lib │ │ │ └── nerdtree │ │ │ │ ├── bookmark.vim │ │ │ │ ├── creator.vim │ │ │ │ ├── event.vim │ │ │ │ ├── flag_set.vim │ │ │ │ ├── key_map.vim │ │ │ │ ├── menu_controller.vim │ │ │ │ ├── menu_item.vim │ │ │ │ ├── nerdtree.vim │ │ │ │ ├── notifier.vim │ │ │ │ ├── opener.vim │ │ │ │ ├── path.vim │ │ │ │ ├── tree_dir_node.vim │ │ │ │ ├── tree_file_node.vim │ │ │ │ └── ui.vim │ │ ├── nerdtree_plugin │ │ │ ├── exec_menuitem.vim │ │ │ └── fs_menu.vim │ │ ├── plugin │ │ │ └── NERD_tree.vim │ │ └── syntax │ │ │ └── nerdtree.vim │ ├── omnicppcomplete │ │ ├── after │ │ │ └── ftplugin │ │ │ │ ├── c.vim │ │ │ │ └── cpp.vim │ │ ├── autoload │ │ │ └── omni │ │ │ │ ├── common │ │ │ │ ├── debug.vim │ │ │ │ └── utils.vim │ │ │ │ └── cpp │ │ │ │ ├── complete.vim │ │ │ │ ├── includes.vim │ │ │ │ ├── items.vim │ │ │ │ ├── maycomplete.vim │ │ │ │ ├── namespaces.vim │ │ │ │ ├── settings.vim │ │ │ │ ├── tokenizer.vim │ │ │ │ └── utils.vim │ │ └── doc │ │ │ ├── omnicppcomplete.txt │ │ │ └── tags │ ├── supertab │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.rst │ │ ├── doc │ │ │ └── supertab.txt │ │ ├── ftplugin │ │ │ ├── html.vim │ │ │ └── xml.vim │ │ └── plugin │ │ │ └── supertab.vim │ └── taglist │ │ ├── doc │ │ ├── taglist.txt │ │ └── tags │ │ └── plugin │ │ └── taglist.vim └── tags │ └── cpp_src │ ├── algorithm │ ├── allocator.h │ ├── basic_ios.h │ ├── basic_ios.tcc │ ├── basic_string.h │ ├── basic_string.tcc │ ├── bitset │ ├── boost_concept_check.h │ ├── cassert │ ├── cctype │ ├── cerrno │ ├── cfloat │ ├── char_traits.h │ ├── climits │ ├── clocale │ ├── cmath │ ├── cmath.tcc │ ├── codecvt.h │ ├── complex │ ├── concept_check.h │ ├── cpp_type_traits.h │ ├── csetjmp │ ├── csignal │ ├── cstdarg │ ├── cstddef │ ├── cstdio │ ├── cstdlib │ ├── cstring │ ├── ctime │ ├── cwchar │ ├── cwctype │ ├── deque │ ├── deque.tcc │ ├── exception │ ├── exception_defines.h │ ├── fstream │ ├── fstream.tcc │ ├── functexcept.h │ ├── functional │ ├── gslice.h │ ├── gslice_array.h │ ├── indirect_array.h │ ├── iomanip │ ├── ios │ ├── ios_base.h │ ├── iosfwd │ ├── iostream │ ├── istream │ ├── istream.tcc │ ├── iterator │ ├── limits │ ├── list │ ├── list.tcc │ ├── locale │ ├── locale_classes.h │ ├── locale_facets.h │ ├── locale_facets.tcc │ ├── localefwd.h │ ├── map │ ├── mask_array.h │ ├── memory │ ├── new │ ├── numeric │ ├── ostream │ ├── ostream.tcc │ ├── ostream_insert.h │ ├── postypes.h │ ├── queue │ ├── set │ ├── slice_array.h │ ├── sstream │ ├── sstream.tcc │ ├── stack │ ├── stdexcept │ ├── stl_algo.h │ ├── stl_algobase.h │ ├── stl_bvector.h │ ├── stl_construct.h │ ├── stl_deque.h │ ├── stl_function.h │ ├── stl_heap.h │ ├── stl_iterator.h │ ├── stl_iterator_base_funcs.h │ ├── stl_iterator_base_types.h │ ├── stl_list.h │ ├── stl_map.h │ ├── stl_multimap.h │ ├── stl_multiset.h │ ├── stl_numeric.h │ ├── stl_pair.h │ ├── stl_queue.h │ ├── stl_raw_storage_iter.h │ ├── stl_relops.h │ ├── stl_set.h │ ├── stl_stack.h │ ├── stl_tempbuf.h │ ├── stl_tree.h │ ├── stl_uninitialized.h │ ├── stl_vector.h │ ├── stream_iterator.h │ ├── streambuf │ ├── streambuf.tcc │ ├── streambuf_iterator.h │ ├── string │ ├── stringfwd.h │ ├── tags │ ├── typeinfo │ ├── utility │ ├── valarray │ ├── valarray_after.h │ ├── valarray_array.h │ ├── valarray_array.tcc │ ├── valarray_before.h │ ├── vector │ └── vector.tcc ├── .vimrc ├── auto_tags ├── auto_tags.conf ├── auto_tags.sh └── run_tags.sh └── diffdir /.vim/bundle/minibufexplorer/plugin/minibufexpl.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/handy1989/vim/103e31e9facbf272b9df91f27ea961206cb0c21b/.vim/bundle/minibufexplorer/plugin/minibufexpl.vim -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | tags 4 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/README.markdown: -------------------------------------------------------------------------------- 1 | The NERD Tree 2 | ============= 3 | 4 | Intro 5 | ----- 6 | 7 | The NERD tree allows you to explore your filesystem and to open files and 8 | directories. It presents the filesystem to you in the form of a tree which you 9 | manipulate with the keyboard and/or mouse. It also allows you to perform 10 | simple filesystem operations. 11 | 12 | The following features and functionality are provided by the NERD tree: 13 | 14 | * Files and directories are displayed in a hierarchical tree structure 15 | * Different highlighting is provided for the following types of nodes: 16 | * files 17 | * directories 18 | * sym-links 19 | * windows .lnk files 20 | * read-only files 21 | * executable files 22 | * Many (customisable) mappings are provided to manipulate the tree: 23 | * Mappings to open/close/explore directory nodes 24 | * Mappings to open files in new/existing windows/tabs 25 | * Mappings to change the current root of the tree 26 | * Mappings to navigate around the tree 27 | * ... 28 | * Directories and files can be bookmarked. 29 | * Most NERD tree navigation can also be done with the mouse 30 | * Filtering of tree content (can be toggled at runtime) 31 | * custom file filters to prevent e.g. vim backup files being displayed 32 | * optional displaying of hidden files (. files) 33 | * files can be "turned off" so that only directories are displayed 34 | * The position and size of the NERD tree window can be customised 35 | * The order in which the nodes in the tree are listed can be customised. 36 | * A model of your filesystem is created/maintained as you explore it. This 37 | has several advantages: 38 | * All filesystem information is cached and is only re-read on demand 39 | * If you revisit a part of the tree that you left earlier in your 40 | session, the directory nodes will be opened/closed as you left them 41 | * The script remembers the cursor position and window position in the NERD 42 | tree so you can toggle it off (or just close the tree window) and then 43 | reopen it (with NERDTreeToggle) the NERD tree window will appear exactly 44 | as you left it 45 | * You can have a separate NERD tree for each tab, share trees across tabs, 46 | or a mix of both. 47 | * By default the script overrides the default file browser (netrw), so if 48 | you :edit a directory a (slightly modified) NERD tree will appear in the 49 | current window 50 | * A programmable menu system is provided (simulates right clicking on a node) 51 | * one default menu plugin is provided to perform basic filesystem 52 | operations (create/delete/move/copy files/directories) 53 | * There's an API for adding your own keymappings 54 | 55 | Installation 56 | ------------ 57 | 58 | [pathogen.vim](https://github.com/tpope/vim-pathogen) is the recommended way to install nerdtree. 59 | 60 | cd ~/.vim/bundle 61 | git clone https://github.com/scrooloose/nerdtree.git 62 | 63 | Then reload vim, run `:Helptags`, and check out `:help NERD_tree.txt`. 64 | 65 | 66 | Faq 67 | --- 68 | 69 | __Q. Can I have the nerdtree on every tab automatically?__ 70 | 71 | A. Nope. If this is something you want then chances are you aren't using tabs 72 | and buffers as they were intended to be used. Read this 73 | http://stackoverflow.com/questions/102384/using-vims-tabs-like-buffers 74 | 75 | If you are interested in this behaviour then consider [vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs) 76 | 77 | __Q. How can I open a NERDTree automatically when vim starts up?__ 78 | 79 | A. Stick this in your vimrc: `autocmd vimenter * NERDTree` 80 | 81 | __Q. How can I open a NERDTree automatically when vim starts up if no files were specified?__ 82 | 83 | A. Stick this in your vimrc 84 | 85 | autocmd StdinReadPre * let s:std_in=1 86 | autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif 87 | 88 | __Q. How can I map a specific key or shortcut to open NERDTree?__ 89 | 90 | A. Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want): `map :NERDTreeToggle` 91 | 92 | __Q. How can I close vim if the only window left open is a NERDTree?__ 93 | 94 | A. Stick this in your vimrc: 95 | 96 | `autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif` 97 | 98 | 99 | Changelog 100 | --------- 101 | 102 | 4.2.0 (2011-12-28) 103 | 104 | * Add NERDTreeDirArrows option to make the UI use pretty arrow chars instead of the old +~| chars to define the tree structure (sickill) 105 | * shift the syntax highlighting out into its own syntax file (gnap) * add some mac specific options to the filesystem menu - for macvim only (andersonfreitas) 106 | * Add NERDTreeMinimalUI option to remove some non functional parts of the nerdtree ui (camthompson) 107 | * tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the new behaviour (benjamingeiger) 108 | * if no name is given to :Bookmark, make it default to the name of the target file/dir (minyoung) 109 | * use 'file' completion when doing copying, create, and move operations (EvanDotPro) 110 | * lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!) 111 | 112 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/event.vim: -------------------------------------------------------------------------------- 1 | "CLASS: Event 2 | "============================================================ 3 | let s:Event = {} 4 | let g:NERDTreeEvent = s:Event 5 | 6 | function! s:Event.New(nerdtree, subject, action, params) abort 7 | let newObj = copy(self) 8 | let newObj.nerdtree = a:nerdtree 9 | let newObj.subject = a:subject 10 | let newObj.action = a:action 11 | let newObj.params = a:params 12 | return newObj 13 | endfunction 14 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/flag_set.vim: -------------------------------------------------------------------------------- 1 | "CLASS: FlagSet 2 | "============================================================ 3 | let s:FlagSet = {} 4 | let g:NERDTreeFlagSet = s:FlagSet 5 | 6 | "FUNCTION: FlagSet.addFlag(scope, flag) {{{1 7 | function! s:FlagSet.addFlag(scope, flag) 8 | let flags = self._flagsForScope(a:scope) 9 | if index(flags, a:flag) == -1 10 | call add(flags, a:flag) 11 | end 12 | endfunction 13 | 14 | "FUNCTION: FlagSet.clearFlags(scope) {{{1 15 | function! s:FlagSet.clearFlags(scope) 16 | let self._flags[a:scope] = [] 17 | endfunction 18 | 19 | "FUNCTION: FlagSet._flagsForScope(scope) {{{1 20 | function! s:FlagSet._flagsForScope(scope) 21 | if !has_key(self._flags, a:scope) 22 | let self._flags[a:scope] = [] 23 | endif 24 | return self._flags[a:scope] 25 | endfunction 26 | 27 | "FUNCTION: FlagSet.New() {{{1 28 | function! s:FlagSet.New() 29 | let newObj = copy(self) 30 | let newObj._flags = {} 31 | return newObj 32 | endfunction 33 | 34 | "FUNCTION: FlagSet.removeFlag(scope, flag) {{{1 35 | function! s:FlagSet.removeFlag(scope, flag) 36 | let flags = self._flagsForScope(a:scope) 37 | 38 | let i = index(flags, a:flag) 39 | if i >= 0 40 | call remove(flags, i) 41 | endif 42 | endfunction 43 | 44 | "FUNCTION: FlagSet.renderToString() {{{1 45 | function! s:FlagSet.renderToString() 46 | let flagstring = "" 47 | for i in values(self._flags) 48 | let flagstring .= join(i) 49 | endfor 50 | 51 | if len(flagstring) == 0 52 | return "" 53 | endif 54 | 55 | return '[' . flagstring . ']' 56 | endfunction 57 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/key_map.vim: -------------------------------------------------------------------------------- 1 | "CLASS: KeyMap 2 | "============================================================ 3 | let s:KeyMap = {} 4 | let g:NERDTreeKeyMap = s:KeyMap 5 | 6 | "FUNCTION: KeyMap.All() {{{1 7 | function! s:KeyMap.All() 8 | if !exists("s:keyMaps") 9 | let s:keyMaps = [] 10 | endif 11 | return s:keyMaps 12 | endfunction 13 | 14 | "FUNCTION: KeyMap.FindFor(key, scope) {{{1 15 | function! s:KeyMap.FindFor(key, scope) 16 | for i in s:KeyMap.All() 17 | if i.key ==# a:key && i.scope ==# a:scope 18 | return i 19 | endif 20 | endfor 21 | return {} 22 | endfunction 23 | 24 | "FUNCTION: KeyMap.BindAll() {{{1 25 | function! s:KeyMap.BindAll() 26 | for i in s:KeyMap.All() 27 | call i.bind() 28 | endfor 29 | endfunction 30 | 31 | "FUNCTION: KeyMap.bind() {{{1 32 | function! s:KeyMap.bind() 33 | " If the key sequence we're trying to map contains any '<>' notation, we 34 | " must replace each of the '<' characters with '' to ensure the string 35 | " is not translated into its corresponding keycode during the later part 36 | " of the map command below 37 | " :he <> 38 | let specialNotationRegex = '\m<\([[:alnum:]_-]\+>\)' 39 | if self.key =~# specialNotationRegex 40 | let keymapInvokeString = substitute(self.key, specialNotationRegex, '\1', 'g') 41 | else 42 | let keymapInvokeString = self.key 43 | endif 44 | 45 | let premap = self.key == "" ? " " : " " 46 | 47 | exec 'nnoremap '. self.key . premap . ':call nerdtree#ui_glue#invokeKeyMap("'. keymapInvokeString .'")' 48 | endfunction 49 | 50 | "FUNCTION: KeyMap.Remove(key, scope) {{{1 51 | function! s:KeyMap.Remove(key, scope) 52 | let maps = s:KeyMap.All() 53 | for i in range(len(maps)) 54 | if maps[i].key ==# a:key && maps[i].scope ==# a:scope 55 | return remove(maps, i) 56 | endif 57 | endfor 58 | endfunction 59 | 60 | "FUNCTION: KeyMap.invoke() {{{1 61 | "Call the KeyMaps callback function 62 | function! s:KeyMap.invoke(...) 63 | let Callback = function(self.callback) 64 | if a:0 65 | call Callback(a:1) 66 | else 67 | call Callback() 68 | endif 69 | endfunction 70 | 71 | "FUNCTION: KeyMap.Invoke() {{{1 72 | "Find a keymapping for a:key and the current scope invoke it. 73 | " 74 | "Scope is determined as follows: 75 | " * if the cursor is on a dir node then "DirNode" 76 | " * if the cursor is on a file node then "FileNode" 77 | " * if the cursor is on a bookmark then "Bookmark" 78 | " 79 | "If a keymap has the scope of "all" then it will be called if no other keymap 80 | "is found for a:key and the scope. 81 | function! s:KeyMap.Invoke(key) 82 | 83 | "required because clicking the command window below another window still 84 | "invokes the mapping - but changes the window cursor 85 | "is in first 86 | " 87 | "TODO: remove this check when the vim bug is fixed 88 | if !g:NERDTree.ExistsForBuf() 89 | return {} 90 | endif 91 | 92 | let node = g:NERDTreeFileNode.GetSelected() 93 | if !empty(node) 94 | 95 | "try file node 96 | if !node.path.isDirectory 97 | let km = s:KeyMap.FindFor(a:key, "FileNode") 98 | if !empty(km) 99 | return km.invoke(node) 100 | endif 101 | endif 102 | 103 | "try dir node 104 | if node.path.isDirectory 105 | let km = s:KeyMap.FindFor(a:key, "DirNode") 106 | if !empty(km) 107 | return km.invoke(node) 108 | endif 109 | endif 110 | 111 | "try generic node 112 | let km = s:KeyMap.FindFor(a:key, "Node") 113 | if !empty(km) 114 | return km.invoke(node) 115 | endif 116 | 117 | endif 118 | 119 | "try bookmark 120 | let bm = g:NERDTreeBookmark.GetSelected() 121 | if !empty(bm) 122 | let km = s:KeyMap.FindFor(a:key, "Bookmark") 123 | if !empty(km) 124 | return km.invoke(bm) 125 | endif 126 | endif 127 | 128 | "try all 129 | let km = s:KeyMap.FindFor(a:key, "all") 130 | if !empty(km) 131 | return km.invoke() 132 | endif 133 | endfunction 134 | 135 | "FUNCTION: KeyMap.Create(options) {{{1 136 | function! s:KeyMap.Create(options) 137 | let opts = extend({'scope': 'all', 'quickhelpText': ''}, copy(a:options)) 138 | 139 | "dont override other mappings unless the 'override' option is given 140 | if get(opts, 'override', 0) == 0 && !empty(s:KeyMap.FindFor(opts['key'], opts['scope'])) 141 | return 142 | end 143 | 144 | let newKeyMap = copy(self) 145 | let newKeyMap.key = opts['key'] 146 | let newKeyMap.quickhelpText = opts['quickhelpText'] 147 | let newKeyMap.callback = opts['callback'] 148 | let newKeyMap.scope = opts['scope'] 149 | 150 | call s:KeyMap.Add(newKeyMap) 151 | endfunction 152 | 153 | "FUNCTION: KeyMap.Add(keymap) {{{1 154 | function! s:KeyMap.Add(keymap) 155 | call s:KeyMap.Remove(a:keymap.key, a:keymap.scope) 156 | call add(s:KeyMap.All(), a:keymap) 157 | endfunction 158 | 159 | " vim: set sw=4 sts=4 et fdm=marker: 160 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/menu_controller.vim: -------------------------------------------------------------------------------- 1 | "CLASS: MenuController 2 | "============================================================ 3 | let s:MenuController = {} 4 | let g:NERDTreeMenuController = s:MenuController 5 | 6 | "FUNCTION: MenuController.New(menuItems) {{{1 7 | "create a new menu controller that operates on the given menu items 8 | function! s:MenuController.New(menuItems) 9 | let newMenuController = copy(self) 10 | if a:menuItems[0].isSeparator() 11 | let newMenuController.menuItems = a:menuItems[1:-1] 12 | else 13 | let newMenuController.menuItems = a:menuItems 14 | endif 15 | return newMenuController 16 | endfunction 17 | 18 | "FUNCTION: MenuController.showMenu() {{{1 19 | "start the main loop of the menu and get the user to choose/execute a menu 20 | "item 21 | function! s:MenuController.showMenu() 22 | call self._saveOptions() 23 | 24 | try 25 | let self.selection = 0 26 | 27 | let done = 0 28 | while !done 29 | redraw! 30 | call self._echoPrompt() 31 | let key = nr2char(getchar()) 32 | let done = self._handleKeypress(key) 33 | endwhile 34 | finally 35 | call self._restoreOptions() 36 | endtry 37 | 38 | if self.selection != -1 39 | let m = self._current() 40 | call m.execute() 41 | endif 42 | endfunction 43 | 44 | "FUNCTION: MenuController._echoPrompt() {{{1 45 | function! s:MenuController._echoPrompt() 46 | echo "NERDTree Menu. Use j/k/enter and the shortcuts indicated" 47 | echo "==========================================================" 48 | 49 | for i in range(0, len(self.menuItems)-1) 50 | if self.selection == i 51 | echo "> " . self.menuItems[i].text 52 | else 53 | echo " " . self.menuItems[i].text 54 | endif 55 | endfor 56 | endfunction 57 | 58 | "FUNCTION: MenuController._current(key) {{{1 59 | "get the MenuItem that is currently selected 60 | function! s:MenuController._current() 61 | return self.menuItems[self.selection] 62 | endfunction 63 | 64 | "FUNCTION: MenuController._handleKeypress(key) {{{1 65 | "change the selection (if appropriate) and return 1 if the user has made 66 | "their choice, 0 otherwise 67 | function! s:MenuController._handleKeypress(key) 68 | if a:key == 'j' 69 | call self._cursorDown() 70 | elseif a:key == 'k' 71 | call self._cursorUp() 72 | elseif a:key == nr2char(27) "escape 73 | let self.selection = -1 74 | return 1 75 | elseif a:key == "\r" || a:key == "\n" "enter and ctrl-j 76 | return 1 77 | else 78 | let index = self._nextIndexFor(a:key) 79 | if index != -1 80 | let self.selection = index 81 | if len(self._allIndexesFor(a:key)) == 1 82 | return 1 83 | endif 84 | endif 85 | endif 86 | 87 | return 0 88 | endfunction 89 | 90 | "FUNCTION: MenuController._allIndexesFor(shortcut) {{{1 91 | "get indexes to all menu items with the given shortcut 92 | function! s:MenuController._allIndexesFor(shortcut) 93 | let toReturn = [] 94 | 95 | for i in range(0, len(self.menuItems)-1) 96 | if self.menuItems[i].shortcut == a:shortcut 97 | call add(toReturn, i) 98 | endif 99 | endfor 100 | 101 | return toReturn 102 | endfunction 103 | 104 | "FUNCTION: MenuController._nextIndexFor(shortcut) {{{1 105 | "get the index to the next menu item with the given shortcut, starts from the 106 | "current cursor location and wraps around to the top again if need be 107 | function! s:MenuController._nextIndexFor(shortcut) 108 | for i in range(self.selection+1, len(self.menuItems)-1) 109 | if self.menuItems[i].shortcut == a:shortcut 110 | return i 111 | endif 112 | endfor 113 | 114 | for i in range(0, self.selection) 115 | if self.menuItems[i].shortcut == a:shortcut 116 | return i 117 | endif 118 | endfor 119 | 120 | return -1 121 | endfunction 122 | 123 | "FUNCTION: MenuController._setCmdheight() {{{1 124 | "sets &cmdheight to whatever is needed to display the menu 125 | function! s:MenuController._setCmdheight() 126 | let &cmdheight = len(self.menuItems) + 3 127 | endfunction 128 | 129 | "FUNCTION: MenuController._saveOptions() {{{1 130 | "set any vim options that are required to make the menu work (saving their old 131 | "values) 132 | function! s:MenuController._saveOptions() 133 | let self._oldLazyredraw = &lazyredraw 134 | let self._oldCmdheight = &cmdheight 135 | set nolazyredraw 136 | call self._setCmdheight() 137 | endfunction 138 | 139 | "FUNCTION: MenuController._restoreOptions() {{{1 140 | "restore the options we saved in _saveOptions() 141 | function! s:MenuController._restoreOptions() 142 | let &cmdheight = self._oldCmdheight 143 | let &lazyredraw = self._oldLazyredraw 144 | endfunction 145 | 146 | "FUNCTION: MenuController._cursorDown() {{{1 147 | "move the cursor to the next menu item, skipping separators 148 | function! s:MenuController._cursorDown() 149 | let done = 0 150 | while !done 151 | if self.selection < len(self.menuItems)-1 152 | let self.selection += 1 153 | else 154 | let self.selection = 0 155 | endif 156 | 157 | if !self._current().isSeparator() 158 | let done = 1 159 | endif 160 | endwhile 161 | endfunction 162 | 163 | "FUNCTION: MenuController._cursorUp() {{{1 164 | "move the cursor to the previous menu item, skipping separators 165 | function! s:MenuController._cursorUp() 166 | let done = 0 167 | while !done 168 | if self.selection > 0 169 | let self.selection -= 1 170 | else 171 | let self.selection = len(self.menuItems)-1 172 | endif 173 | 174 | if !self._current().isSeparator() 175 | let done = 1 176 | endif 177 | endwhile 178 | endfunction 179 | 180 | " vim: set sw=4 sts=4 et fdm=marker: 181 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/menu_item.vim: -------------------------------------------------------------------------------- 1 | "CLASS: MenuItem 2 | "============================================================ 3 | let s:MenuItem = {} 4 | let g:NERDTreeMenuItem = s:MenuItem 5 | 6 | "FUNCTION: MenuItem.All() {{{1 7 | "get all top level menu items 8 | function! s:MenuItem.All() 9 | if !exists("s:menuItems") 10 | let s:menuItems = [] 11 | endif 12 | return s:menuItems 13 | endfunction 14 | 15 | "FUNCTION: MenuItem.AllEnabled() {{{1 16 | "get all top level menu items that are currently enabled 17 | function! s:MenuItem.AllEnabled() 18 | let toReturn = [] 19 | for i in s:MenuItem.All() 20 | if i.enabled() 21 | call add(toReturn, i) 22 | endif 23 | endfor 24 | return toReturn 25 | endfunction 26 | 27 | "FUNCTION: MenuItem.Create(options) {{{1 28 | "make a new menu item and add it to the global list 29 | function! s:MenuItem.Create(options) 30 | let newMenuItem = copy(self) 31 | 32 | let newMenuItem.text = a:options['text'] 33 | let newMenuItem.shortcut = a:options['shortcut'] 34 | let newMenuItem.children = [] 35 | 36 | let newMenuItem.isActiveCallback = -1 37 | if has_key(a:options, 'isActiveCallback') 38 | let newMenuItem.isActiveCallback = a:options['isActiveCallback'] 39 | endif 40 | 41 | let newMenuItem.callback = -1 42 | if has_key(a:options, 'callback') 43 | let newMenuItem.callback = a:options['callback'] 44 | endif 45 | 46 | if has_key(a:options, 'parent') 47 | call add(a:options['parent'].children, newMenuItem) 48 | else 49 | call add(s:MenuItem.All(), newMenuItem) 50 | endif 51 | 52 | return newMenuItem 53 | endfunction 54 | 55 | "FUNCTION: MenuItem.CreateSeparator(options) {{{1 56 | "make a new separator menu item and add it to the global list 57 | function! s:MenuItem.CreateSeparator(options) 58 | let standard_options = { 'text': '--------------------', 59 | \ 'shortcut': -1, 60 | \ 'callback': -1 } 61 | let options = extend(a:options, standard_options, "force") 62 | 63 | return s:MenuItem.Create(options) 64 | endfunction 65 | 66 | "FUNCTION: MenuItem.CreateSubmenu(options) {{{1 67 | "make a new submenu and add it to global list 68 | function! s:MenuItem.CreateSubmenu(options) 69 | let standard_options = { 'callback': -1 } 70 | let options = extend(a:options, standard_options, "force") 71 | 72 | return s:MenuItem.Create(options) 73 | endfunction 74 | 75 | "FUNCTION: MenuItem.enabled() {{{1 76 | "return 1 if this menu item should be displayed 77 | " 78 | "delegates off to the isActiveCallback, and defaults to 1 if no callback was 79 | "specified 80 | function! s:MenuItem.enabled() 81 | if self.isActiveCallback != -1 82 | return {self.isActiveCallback}() 83 | endif 84 | return 1 85 | endfunction 86 | 87 | "FUNCTION: MenuItem.execute() {{{1 88 | "perform the action behind this menu item, if this menuitem has children then 89 | "display a new menu for them, otherwise deletegate off to the menuitem's 90 | "callback 91 | function! s:MenuItem.execute() 92 | if len(self.children) 93 | let mc = g:NERDTreeMenuController.New(self.children) 94 | call mc.showMenu() 95 | else 96 | if self.callback != -1 97 | call {self.callback}() 98 | endif 99 | endif 100 | endfunction 101 | 102 | "FUNCTION: MenuItem.isSeparator() {{{1 103 | "return 1 if this menuitem is a separator 104 | function! s:MenuItem.isSeparator() 105 | return self.callback == -1 && self.children == [] 106 | endfunction 107 | 108 | "FUNCTION: MenuItem.isSubmenu() {{{1 109 | "return 1 if this menuitem is a submenu 110 | function! s:MenuItem.isSubmenu() 111 | return self.callback == -1 && !empty(self.children) 112 | endfunction 113 | 114 | " vim: set sw=4 sts=4 et fdm=marker: 115 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/nerdtree.vim: -------------------------------------------------------------------------------- 1 | "CLASS: NERDTree 2 | "============================================================ 3 | let s:NERDTree = {} 4 | let g:NERDTree = s:NERDTree 5 | 6 | " Function: s:NERDTree.ExistsForBuffer() {{{1 7 | " Returns 1 if a nerd tree root exists in the current buffer 8 | function! s:NERDTree.ExistsForBuf() 9 | return exists("b:NERDTreeRoot") 10 | endfunction 11 | 12 | " Function: s:NERDTree.ExistsForTab() {{{1 13 | " Returns 1 if a nerd tree root exists in the current tab 14 | function! s:NERDTree.ExistsForTab() 15 | return exists("t:NERDTreeBufName") 16 | endfunction 17 | 18 | function! s:NERDTree.ForCurrentBuf() 19 | if s:NERDTree.ExistsForBuf() 20 | return b:NERDTree 21 | else 22 | return {} 23 | endif 24 | endfunction 25 | 26 | function! s:NERDTree.New(path) 27 | let newObj = copy(self) 28 | let newObj.ui = g:NERDTreeUI.New(newObj) 29 | let newObj.root = g:NERDTreeDirNode.New(a:path) 30 | 31 | return newObj 32 | endfunction 33 | 34 | "FUNCTION: s:NERDTree.render() {{{1 35 | "A convenience function - since this is called often 36 | function! s:NERDTree.render() 37 | call self.ui.render() 38 | endfunction 39 | 40 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/lib/nerdtree/notifier.vim: -------------------------------------------------------------------------------- 1 | "CLASS: Notifier 2 | "============================================================ 3 | let s:Notifier = {} 4 | 5 | function! s:Notifier.AddListener(event, funcname) 6 | let listeners = s:Notifier.GetListenersForEvent(a:event) 7 | if listeners == [] 8 | let listenersMap = s:Notifier.GetListenersMap() 9 | let listenersMap[a:event] = listeners 10 | endif 11 | call add(listeners, a:funcname) 12 | endfunction 13 | 14 | function! s:Notifier.NotifyListeners(event, path, params) 15 | let event = g:NERDTreeEvent.New(b:NERDTree, a:path, a:event, a:params) 16 | 17 | for listener in s:Notifier.GetListenersForEvent(a:event) 18 | call {listener}(event) 19 | endfor 20 | endfunction 21 | 22 | function! s:Notifier.GetListenersMap() 23 | if !exists("s:refreshListenersMap") 24 | let s:refreshListenersMap = {} 25 | endif 26 | return s:refreshListenersMap 27 | endfunction 28 | 29 | function! s:Notifier.GetListenersForEvent(name) 30 | let listenersMap = s:Notifier.GetListenersMap() 31 | return get(listenersMap, a:name, []) 32 | endfunction 33 | 34 | let g:NERDTreePathNotifier = deepcopy(s:Notifier) 35 | 36 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/nerdtree_plugin/exec_menuitem.vim: -------------------------------------------------------------------------------- 1 | " ============================================================================ 2 | " File: exec_menuitem.vim 3 | " Description: plugin for NERD Tree that provides an execute file menu item 4 | " Maintainer: Martin Grenfell 5 | " Last Change: 22 July, 2009 6 | " License: This program is free software. It comes without any warranty, 7 | " to the extent permitted by applicable law. You can redistribute 8 | " it and/or modify it under the terms of the Do What The Fuck You 9 | " Want To Public License, Version 2, as published by Sam Hocevar. 10 | " See http://sam.zoy.org/wtfpl/COPYING for more details. 11 | " 12 | " ============================================================================ 13 | if exists("g:loaded_nerdtree_exec_menuitem") 14 | finish 15 | endif 16 | let g:loaded_nerdtree_exec_menuitem = 1 17 | 18 | call NERDTreeAddMenuItem({ 19 | \ 'text': '(!)Execute file', 20 | \ 'shortcut': '!', 21 | \ 'callback': 'NERDTreeExecFile', 22 | \ 'isActiveCallback': 'NERDTreeExecFileActive' }) 23 | 24 | function! NERDTreeExecFileActive() 25 | let node = g:NERDTreeFileNode.GetSelected() 26 | return !node.path.isDirectory && node.path.isExecutable 27 | endfunction 28 | 29 | function! NERDTreeExecFile() 30 | let treenode = g:NERDTreeFileNode.GetSelected() 31 | echo "==========================================================\n" 32 | echo "Complete the command to execute (add arguments etc):\n" 33 | let cmd = treenode.path.str({'escape': 1}) 34 | let cmd = input(':!', cmd . ' ') 35 | 36 | if cmd != '' 37 | exec ':!' . cmd 38 | else 39 | echo "Aborted" 40 | endif 41 | endfunction 42 | -------------------------------------------------------------------------------- /.vim/bundle/nerdtree/syntax/nerdtree.vim: -------------------------------------------------------------------------------- 1 | let s:tree_up_dir_line = '.. (up a dir)' 2 | syn match NERDTreeIgnore #\~# 3 | syn match NERDTreeIgnore #\[RO\]# 4 | 5 | "highlighting for the .. (up dir) line at the top of the tree 6 | execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#" 7 | 8 | "quickhelp syntax elements 9 | syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#ms=s+2,me=e-1 10 | syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#ms=s+2,me=e-1 11 | syn match NERDTreeHelpTitle #" .*\~#ms=s+2,me=e-1 12 | syn match NERDTreeToggleOn #(on)#ms=s+1,he=e-1 13 | syn match NERDTreeToggleOff #(off)#ms=e-3,me=e-1 14 | syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3 15 | syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeIgnore,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand 16 | 17 | "highlighting for sym links 18 | syn match NERDTreeLinkTarget #->.*# containedin=NERDTreeDir,NERDTreeFile 19 | syn match NERDTreeLinkFile #.* ->#me=e-3 containedin=NERDTreeFile 20 | syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir 21 | 22 | "highlighing for directory nodes and file nodes 23 | syn match NERDTreeDirSlash #/# containedin=NERDTreeDir 24 | 25 | if g:NERDTreeDirArrows 26 | syn match NERDTreeClosable #▾# containedin=NERDTreeDir,NERDTreeFile 27 | syn match NERDTreeOpenable #▸# containedin=NERDTreeDir,NERDTreeFile 28 | 29 | syn match NERDTreeDir #[^▾▸ ].*/# 30 | syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark 31 | syn match NERDTreeFile #^[^"\.▾▸] *[^▾▸]*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile 32 | 33 | "highlighting for readonly files 34 | syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile 35 | 36 | syn match NERDTreeFlags #^ *\zs\[.\]# containedin=NERDTreeFile 37 | syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir 38 | else 39 | "highlighting for the ~/+ symbols for the directory nodes 40 | syn match NERDTreeClosable #\~\<# 41 | syn match NERDTreeClosable #\~\.# 42 | syn match NERDTreeOpenable #+\<# 43 | syn match NERDTreeOpenable #+\.#he=e-1 44 | 45 | "highlighting for the tree structural parts 46 | syn match NERDTreePart #|# 47 | syn match NERDTreePart #`# 48 | syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart 49 | 50 | syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeOpenable,NERDTreeClosable 51 | syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark 52 | syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile 53 | syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile 54 | 55 | "highlighting for readonly files 56 | syn match NERDTreeRO #|-.*\[RO\]#he=e-5 contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreePart,NERDTreePartFile 57 | 58 | syn match NERDTreeFlags #-\[.\]# containedin=NERDTreeFile,NERDTreePartFile 59 | syn match NERDTreeFlags #[+~]\zs\[.\]# containedin=NERDTreeDir 60 | endif 61 | 62 | syn match NERDTreeCWD #^[# 69 | syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader 70 | syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader 71 | syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader 72 | 73 | hi def link NERDTreePart Special 74 | hi def link NERDTreePartFile Type 75 | hi def link NERDTreeExecFile Title 76 | hi def link NERDTreeDirSlash Identifier 77 | 78 | hi def link NERDTreeBookmarksHeader statement 79 | hi def link NERDTreeBookmarksLeader ignore 80 | hi def link NERDTreeBookmarkName Identifier 81 | hi def link NERDTreeBookmark normal 82 | 83 | hi def link NERDTreeHelp String 84 | hi def link NERDTreeHelpKey Identifier 85 | hi def link NERDTreeHelpCommand Identifier 86 | hi def link NERDTreeHelpTitle Macro 87 | hi def link NERDTreeToggleOn Question 88 | hi def link NERDTreeToggleOff WarningMsg 89 | 90 | hi def link NERDTreeLinkTarget Type 91 | hi def link NERDTreeLinkFile Macro 92 | hi def link NERDTreeLinkDir Macro 93 | 94 | hi def link NERDTreeDir Directory 95 | hi def link NERDTreeUp Directory 96 | hi def link NERDTreeFile Normal 97 | hi def link NERDTreeCWD Statement 98 | hi def link NERDTreeOpenable Title 99 | hi def link NERDTreeClosable Title 100 | hi def link NERDTreeIgnore ignore 101 | hi def link NERDTreeRO WarningMsg 102 | hi def link NERDTreeBookmark Statement 103 | hi def link NERDTreeFlags Number 104 | 105 | hi def link NERDTreeCurrentNode Search 106 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/after/ftplugin/c.vim: -------------------------------------------------------------------------------- 1 | " OmniCppComplete initialization 2 | call omni#cpp#complete#Init() 3 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/after/ftplugin/cpp.vim: -------------------------------------------------------------------------------- 1 | " OmniCppComplete initialization 2 | call omni#cpp#complete#Init() 3 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/autoload/omni/common/debug.vim: -------------------------------------------------------------------------------- 1 | " Description: Omni completion debug functions 2 | " Maintainer: Vissale NEANG 3 | " Last Change: 26 sept. 2007 4 | 5 | let s:CACHE_DEBUG_TRACE = [] 6 | 7 | " Start debug, clear the debug file 8 | function! omni#common#debug#Start() 9 | let s:CACHE_DEBUG_TRACE = [] 10 | call extend(s:CACHE_DEBUG_TRACE, ['============ Debug Start ============']) 11 | call writefile(s:CACHE_DEBUG_TRACE, "Omni.dbg") 12 | endfunc 13 | 14 | " End debug, write to debug file 15 | function! omni#common#debug#End() 16 | call extend(s:CACHE_DEBUG_TRACE, ["============= Debug End ============="]) 17 | call extend(s:CACHE_DEBUG_TRACE, [""]) 18 | call writefile(s:CACHE_DEBUG_TRACE, "Omni.dbg") 19 | endfunc 20 | 21 | " Debug trace function 22 | function! omni#common#debug#Trace(szFuncName, ...) 23 | let szTrace = a:szFuncName 24 | let paramNum = a:0 25 | if paramNum>0 26 | let szTrace .= ':' 27 | endif 28 | for i in range(paramNum) 29 | let szTrace = szTrace .' ('. string(eval('a:'.string(i+1))).')' 30 | endfor 31 | call extend(s:CACHE_DEBUG_TRACE, [szTrace]) 32 | endfunc 33 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/autoload/omni/common/utils.vim: -------------------------------------------------------------------------------- 1 | " Description: Omni completion utils 2 | " Maintainer: Vissale NEANG 3 | " Last Change: 26 sept. 2007 4 | 5 | " For sort numbers in list 6 | function! omni#common#utils#CompareNumber(i1, i2) 7 | let num1 = eval(a:i1) 8 | let num2 = eval(a:i2) 9 | return num1 == num2 ? 0 : num1 > num2 ? 1 : -1 10 | endfunc 11 | 12 | " TagList function calling the vim taglist() with try catch 13 | " The only throwed exception is 'TagList:UserInterrupt' 14 | " We also force the noignorecase option to avoid linear search when calling 15 | " taglist() 16 | function! omni#common#utils#TagList(szTagQuery) 17 | let result = [] 18 | let bUserIgnoreCase = &ignorecase 19 | " Forcing noignorecase search => binary search can be used in taglist() 20 | " if tags in the tag file are sorted 21 | if bUserIgnoreCase 22 | set noignorecase 23 | endif 24 | try 25 | let result = taglist(a:szTagQuery) 26 | catch /^Vim:Interrupt$/ 27 | " Restoring user's setting 28 | if bUserIgnoreCase 29 | set ignorecase 30 | endif 31 | throw 'TagList:UserInterrupt' 32 | catch 33 | "Note: it seems that ctags can generate corrupted files, in this case 34 | "taglist() will fail to read the tagfile and an exception from 35 | "has_add() is thrown 36 | endtry 37 | 38 | " Restoring user's setting 39 | if bUserIgnoreCase 40 | set ignorecase 41 | endif 42 | return result 43 | endfunc 44 | 45 | " Same as TagList but don't throw exception 46 | function! omni#common#utils#TagListNoThrow(szTagQuery) 47 | let result = [] 48 | try 49 | let result = omni#common#utils#TagList(a:szTagQuery) 50 | catch 51 | endtry 52 | return result 53 | endfunc 54 | 55 | " Get the word under the cursor 56 | function! omni#common#utils#GetWordUnderCursor() 57 | let szLine = getline('.') 58 | let startPos = getpos('.')[2]-1 59 | let startPos = (startPos < 0)? 0 : startPos 60 | if szLine[startPos] =~ '\w' 61 | let startPos = searchpos('\<\w\+', 'cbn', line('.'))[1] - 1 62 | endif 63 | 64 | let startPos = (startPos < 0)? 0 : startPos 65 | let szResult = matchstr(szLine, '\w\+', startPos) 66 | return szResult 67 | endfunc 68 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/autoload/omni/cpp/includes.vim: -------------------------------------------------------------------------------- 1 | " Description: Omni completion script for cpp files 2 | " Maintainer: Vissale NEANG 3 | " Last Change: 26 sept. 2007 4 | 5 | let g:omni#cpp#includes#CACHE_INCLUDES = {} 6 | let g:omni#cpp#includes#CACHE_FILE_TIME = {} 7 | 8 | let s:rePreprocIncludePart = '\C#\s*include\s*' 9 | let s:reIncludeFilePart = '\(<\|"\)\(\f\|\s\)\+\(>\|"\)' 10 | let s:rePreprocIncludeFile = s:rePreprocIncludePart . s:reIncludeFilePart 11 | 12 | " Get the include list of a file 13 | function! omni#cpp#includes#GetList(...) 14 | if a:0 > 0 15 | return s:GetIncludeListFromFile(a:1, (a:0 > 1)? a:2 : 0 ) 16 | else 17 | return s:GetIncludeListFromCurrentBuffer() 18 | endif 19 | endfunc 20 | 21 | " Get the include list from the current buffer 22 | function! s:GetIncludeListFromCurrentBuffer() 23 | let listIncludes = [] 24 | let originalPos = getpos('.') 25 | 26 | call setpos('.', [0, 1, 1, 0]) 27 | let curPos = [1,1] 28 | let alreadyInclude = {} 29 | while curPos != [0,0] 30 | let curPos = searchpos('\C\(^'.s:rePreprocIncludeFile.'\)', 'W') 31 | if curPos != [0,0] 32 | let szLine = getline('.') 33 | let startPos = curPos[1] 34 | let endPos = matchend(szLine, s:reIncludeFilePart, startPos-1) 35 | if endPos!=-1 36 | let szInclusion = szLine[startPos-1:endPos-1] 37 | let szIncludeFile = substitute(szInclusion, '\('.s:rePreprocIncludePart.'\)\|[<>""]', '', 'g') 38 | let szResolvedInclude = omni#cpp#utils#ResolveFilePath(szIncludeFile) 39 | 40 | " Protection over self inclusion 41 | if szResolvedInclude != '' && szResolvedInclude != omni#cpp#utils#ResolveFilePath(getreg('%')) 42 | let includePos = curPos 43 | if !has_key(alreadyInclude, szResolvedInclude) 44 | call extend(listIncludes, [{'pos' : includePos, 'include' : szResolvedInclude}]) 45 | let alreadyInclude[szResolvedInclude] = 1 46 | endif 47 | endif 48 | endif 49 | endif 50 | endwhile 51 | 52 | call setpos('.', originalPos) 53 | return listIncludes 54 | endfunc 55 | 56 | " Get the include list from a file 57 | function! s:GetIncludeListFromFile(szFilePath, bUpdate) 58 | let listIncludes = [] 59 | if a:szFilePath == '' 60 | return listIncludes 61 | endif 62 | 63 | if !a:bUpdate && has_key(g:omni#cpp#includes#CACHE_INCLUDES, a:szFilePath) 64 | return copy(g:omni#cpp#includes#CACHE_INCLUDES[a:szFilePath]) 65 | endif 66 | 67 | let g:omni#cpp#includes#CACHE_FILE_TIME[a:szFilePath] = getftime(a:szFilePath) 68 | 69 | let szFixedPath = escape(a:szFilePath, g:omni#cpp#utils#szEscapedCharacters) 70 | execute 'silent! lvimgrep /\C\(^'.s:rePreprocIncludeFile.'\)/gj '.szFixedPath 71 | 72 | let listQuickFix = getloclist(0) 73 | let alreadyInclude = {} 74 | for qf in listQuickFix 75 | let szLine = qf.text 76 | let startPos = qf.col 77 | let endPos = matchend(szLine, s:reIncludeFilePart, startPos-1) 78 | if endPos!=-1 79 | let szInclusion = szLine[startPos-1:endPos-1] 80 | let szIncludeFile = substitute(szInclusion, '\('.s:rePreprocIncludePart.'\)\|[<>""]', '', 'g') 81 | let szResolvedInclude = omni#cpp#utils#ResolveFilePath(szIncludeFile) 82 | 83 | " Protection over self inclusion 84 | if szResolvedInclude != '' && szResolvedInclude != a:szFilePath 85 | let includePos = [qf.lnum, qf.col] 86 | if !has_key(alreadyInclude, szResolvedInclude) 87 | call extend(listIncludes, [{'pos' : includePos, 'include' : szResolvedInclude}]) 88 | let alreadyInclude[szResolvedInclude] = 1 89 | endif 90 | endif 91 | endif 92 | endfor 93 | 94 | let g:omni#cpp#includes#CACHE_INCLUDES[a:szFilePath] = listIncludes 95 | 96 | return copy(listIncludes) 97 | endfunc 98 | 99 | " For debug purpose 100 | function! omni#cpp#includes#Display() 101 | let szPathBuffer = omni#cpp#utils#ResolveFilePath(getreg('%')) 102 | call s:DisplayIncludeTree(szPathBuffer, 0) 103 | endfunc 104 | 105 | " For debug purpose 106 | function! s:DisplayIncludeTree(szFilePath, indent, ...) 107 | let includeGuard = {} 108 | if a:0 >0 109 | let includeGuard = a:1 110 | endif 111 | let szFilePath = omni#cpp#utils#ResolveFilePath(a:szFilePath) 112 | if has_key(includeGuard, szFilePath) 113 | return 114 | else 115 | let includeGuard[szFilePath] = 1 116 | endif 117 | 118 | let szIndent = repeat(' ', a:indent) 119 | echo szIndent . a:szFilePath 120 | let incList = omni#cpp#includes#GetList(a:szFilePath) 121 | for inc in incList 122 | call s:DisplayIncludeTree(inc.include, a:indent+1, includeGuard) 123 | endfor 124 | endfunc 125 | 126 | 127 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/autoload/omni/cpp/maycomplete.vim: -------------------------------------------------------------------------------- 1 | " Description: Omni completion script for cpp files 2 | " Maintainer: Vissale NEANG 3 | " Last Change: 26 sept. 2007 4 | 5 | " Check if we can use omni completion in the current buffer 6 | function! s:CanUseOmnicompletion() 7 | " For C and C++ files and only if the omnifunc is omni#cpp#complete#Main 8 | return (index(['c', 'cpp'], &filetype)>=0 && &omnifunc == 'omni#cpp#complete#Main' && !omni#cpp#utils#IsCursorInCommentOrString()) 9 | endfunc 10 | 11 | " Return the mapping of omni completion 12 | function! omni#cpp#maycomplete#Complete() 13 | let szOmniMapping = "\\" 14 | 15 | " 0 = don't select first item 16 | " 1 = select first item (inserting it to the text, default vim behaviour) 17 | " 2 = select first item (without inserting it to the text) 18 | if g:OmniCpp_SelectFirstItem == 0 19 | " We have to force the menuone option to avoid confusion when there is 20 | " only one popup item 21 | set completeopt-=menu 22 | set completeopt+=menuone 23 | let szOmniMapping .= "\" 24 | elseif g:OmniCpp_SelectFirstItem == 2 25 | " We have to force the menuone option to avoid confusion when there is 26 | " only one popup item 27 | set completeopt-=menu 28 | set completeopt+=menuone 29 | let szOmniMapping .= "\" 30 | let szOmniMapping .= "\=pumvisible() ? \"\\\" : \"\"\" 31 | endif 32 | return szOmniMapping 33 | endfunc 34 | 35 | " May complete function for dot 36 | function! omni#cpp#maycomplete#Dot() 37 | if s:CanUseOmnicompletion() && g:OmniCpp_MayCompleteDot 38 | let g:omni#cpp#items#data = omni#cpp#items#Get(omni#cpp#utils#TokenizeCurrentInstruction('.')) 39 | if len(g:omni#cpp#items#data) 40 | let s:bMayComplete = 1 41 | return '.' . omni#cpp#maycomplete#Complete() 42 | endif 43 | endif 44 | return '.' 45 | endfunc 46 | " May complete function for arrow 47 | function! omni#cpp#maycomplete#Arrow() 48 | if s:CanUseOmnicompletion() && g:OmniCpp_MayCompleteArrow 49 | let index = col('.') - 2 50 | if index >= 0 51 | let char = getline('.')[index] 52 | if char == '-' 53 | let g:omni#cpp#items#data = omni#cpp#items#Get(omni#cpp#utils#TokenizeCurrentInstruction('>')) 54 | if len(g:omni#cpp#items#data) 55 | let s:bMayComplete = 1 56 | return '>' . omni#cpp#maycomplete#Complete() 57 | endif 58 | endif 59 | endif 60 | endif 61 | return '>' 62 | endfunc 63 | 64 | " May complete function for double points 65 | function! omni#cpp#maycomplete#Scope() 66 | if s:CanUseOmnicompletion() && g:OmniCpp_MayCompleteScope 67 | let index = col('.') - 2 68 | if index >= 0 69 | let char = getline('.')[index] 70 | if char == ':' 71 | let g:omni#cpp#items#data = omni#cpp#items#Get(omni#cpp#utils#TokenizeCurrentInstruction(':')) 72 | if len(g:omni#cpp#items#data) 73 | if len(g:omni#cpp#items#data[-1].tokens) && g:omni#cpp#items#data[-1].tokens[-1].value != '::' 74 | let s:bMayComplete = 1 75 | return ':' . omni#cpp#maycomplete#Complete() 76 | endif 77 | endif 78 | endif 79 | endif 80 | endif 81 | return ':' 82 | endfunc 83 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/autoload/omni/cpp/settings.vim: -------------------------------------------------------------------------------- 1 | " Description: Omni completion script for cpp files 2 | " Maintainer: Vissale NEANG 3 | " Last Change: 26 sept. 2007 4 | 5 | function! omni#cpp#settings#Init() 6 | " Global scope search on/off 7 | " 0 = disabled 8 | " 1 = enabled 9 | if !exists('g:OmniCpp_GlobalScopeSearch') 10 | let g:OmniCpp_GlobalScopeSearch = 1 11 | endif 12 | 13 | " Sets the namespace search method 14 | " 0 = disabled 15 | " 1 = search namespaces in the current file 16 | " 2 = search namespaces in the current file and included files 17 | if !exists('g:OmniCpp_NamespaceSearch') 18 | let g:OmniCpp_NamespaceSearch = 1 19 | endif 20 | 21 | " Set the class scope completion mode 22 | " 0 = auto 23 | " 1 = show all members (static, public, protected and private) 24 | if !exists('g:OmniCpp_DisplayMode') 25 | let g:OmniCpp_DisplayMode = 0 26 | endif 27 | 28 | " Set if the scope is displayed in the abbr column of the popup 29 | " 0 = no 30 | " 1 = yes 31 | if !exists('g:OmniCpp_ShowScopeInAbbr') 32 | let g:OmniCpp_ShowScopeInAbbr = 0 33 | endif 34 | 35 | " Set if the function prototype is displayed in the abbr column of the popup 36 | " 0 = no 37 | " 1 = yes 38 | if !exists('g:OmniCpp_ShowPrototypeInAbbr') 39 | let g:OmniCpp_ShowPrototypeInAbbr = 0 40 | endif 41 | 42 | " Set if the access (+,#,-) is displayed 43 | " 0 = no 44 | " 1 = yes 45 | if !exists('g:OmniCpp_ShowAccess') 46 | let g:OmniCpp_ShowAccess = 1 47 | endif 48 | 49 | " Set the list of default namespaces 50 | " eg: ['std'] 51 | if !exists('g:OmniCpp_DefaultNamespaces') 52 | let g:OmniCpp_DefaultNamespaces = [] 53 | endif 54 | 55 | " Set MayComplete to '.' 56 | " 0 = disabled 57 | " 1 = enabled 58 | " default = 1 59 | if !exists('g:OmniCpp_MayCompleteDot') 60 | let g:OmniCpp_MayCompleteDot = 1 61 | endif 62 | 63 | " Set MayComplete to '->' 64 | " 0 = disabled 65 | " 1 = enabled 66 | " default = 1 67 | if !exists('g:OmniCpp_MayCompleteArrow') 68 | let g:OmniCpp_MayCompleteArrow = 1 69 | endif 70 | 71 | " Set MayComplete to dot 72 | " 0 = disabled 73 | " 1 = enabled 74 | " default = 0 75 | if !exists('g:OmniCpp_MayCompleteScope') 76 | let g:OmniCpp_MayCompleteScope = 0 77 | endif 78 | 79 | " When completeopt does not contain longest option, this setting 80 | " controls the behaviour of the popup menu selection when starting the completion 81 | " 0 = don't select first item 82 | " 1 = select first item (inserting it to the text) 83 | " 2 = select first item (without inserting it to the text) 84 | " default = 0 85 | if !exists('g:OmniCpp_SelectFirstItem') 86 | let g:OmniCpp_SelectFirstItem= 0 87 | endif 88 | 89 | " Use local search function for variable definitions 90 | " 0 = use standard vim search function 91 | " 1 = use local search function 92 | " default = 0 93 | if !exists('g:OmniCpp_LocalSearchDecl') 94 | let g:OmniCpp_LocalSearchDecl= 0 95 | endif 96 | endfunc 97 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/autoload/omni/cpp/tokenizer.vim: -------------------------------------------------------------------------------- 1 | " Description: Omni completion tokenizer 2 | " Maintainer: Vissale NEANG 3 | " Last Change: 26 sept. 2007 4 | " TODO: Generic behaviour for Tokenize() 5 | 6 | " From the C++ BNF 7 | let s:cppKeyword = ['asm', 'auto', 'bool', 'break', 'case', 'catch', 'char', 'class', 'const', 'const_cast', 'continue', 'default', 'delete', 'do', 'double', 'dynamic_cast', 'else', 'enum', 'explicit', 'export', 'extern', 'false', 'float', 'for', 'friend', 'goto', 'if', 'inline', 'int', 'long', 'mutable', 'namespace', 'new', 'operator', 'private', 'protected', 'public', 'register', 'reinterpret_cast', 'return', 'short', 'signed', 'sizeof', 'static', 'static_cast', 'struct', 'switch', 'template', 'this', 'throw', 'true', 'try', 'typedef', 'typeid', 'typename', 'union', 'unsigned', 'using', 'virtual', 'void', 'volatile', 'wchar_t', 'while', 'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not', 'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'] 8 | 9 | let s:reCppKeyword = '\C\<'.join(s:cppKeyword, '\>\|\<').'\>' 10 | 11 | " The order of items in this list is very important because we use this list to build a regular 12 | " expression (see below) for tokenization 13 | let s:cppOperatorPunctuator = ['->*', '->', '--', '-=', '-', '!=', '!', '##', '#', '%:%:', '%=', '%>', '%:', '%', '&&', '&=', '&', '(', ')', '*=', '*', ',', '...', '.*', '.', '/=', '/', '::', ':>', ':', ';', '?', '[', ']', '^=', '^', '{', '||', '|=', '|', '}', '~', '++', '+=', '+', '<<=', '<%', '<:', '<<', '<=', '<', '==', '=', '>>=', '>>', '>=', '>'] 14 | 15 | " We build the regexp for the tokenizer 16 | let s:reCComment = '\/\*\|\*\/' 17 | let s:reCppComment = '\/\/' 18 | let s:reComment = s:reCComment.'\|'.s:reCppComment 19 | let s:reCppOperatorOrPunctuator = escape(join(s:cppOperatorPunctuator, '\|'), '*./^~[]') 20 | 21 | 22 | " Tokenize a c++ code 23 | " a token is dictionary where keys are: 24 | " - kind = cppKeyword|cppWord|cppOperatorPunctuator|unknown|cComment|cppComment|cppDigit 25 | " - value = 'something' 26 | " Note: a cppWord is any word that is not a cpp keyword 27 | function! omni#cpp#tokenizer#Tokenize(szCode) 28 | let result = [] 29 | 30 | " The regexp to find a token, a token is a keyword, word or 31 | " c++ operator or punctuator. To work properly we have to put 32 | " spaces and tabs to our regexp. 33 | let reTokenSearch = '\(\w\+\)\|\s\+\|'.s:reComment.'\|'.s:reCppOperatorOrPunctuator 34 | " eg: 'using namespace std;' 35 | " ^ ^ 36 | " start=0 end=5 37 | let startPos = 0 38 | let endPos = matchend(a:szCode, reTokenSearch) 39 | let len = endPos-startPos 40 | while endPos!=-1 41 | " eg: 'using namespace std;' 42 | " ^ ^ 43 | " start=0 end=5 44 | " token = 'using' 45 | " We also remove space and tabs 46 | let token = substitute(strpart(a:szCode, startPos, len), '\s', '', 'g') 47 | 48 | " eg: 'using namespace std;' 49 | " ^ ^ 50 | " start=5 end=15 51 | let startPos = endPos 52 | let endPos = matchend(a:szCode, reTokenSearch, startPos) 53 | let len = endPos-startPos 54 | 55 | " It the token is empty we continue 56 | if token=='' 57 | continue 58 | endif 59 | 60 | " Building the token 61 | let resultToken = {'kind' : 'unknown', 'value' : token} 62 | 63 | " Classify the token 64 | if token =~ '^\d\+' 65 | " It's a digit 66 | let resultToken.kind = 'cppDigit' 67 | elseif token=~'^\w\+$' 68 | " It's a word 69 | let resultToken.kind = 'cppWord' 70 | 71 | " But maybe it's a c++ keyword 72 | if match(token, s:reCppKeyword)>=0 73 | let resultToken.kind = 'cppKeyword' 74 | endif 75 | else 76 | if match(token, s:reComment)>=0 77 | if index(['/*','*/'],token)>=0 78 | let resultToken.kind = 'cComment' 79 | else 80 | let resultToken.kind = 'cppComment' 81 | endif 82 | else 83 | " It's an operator 84 | let resultToken.kind = 'cppOperatorPunctuator' 85 | endif 86 | endif 87 | 88 | " We have our token, let's add it to the result list 89 | call extend(result, [resultToken]) 90 | endwhile 91 | 92 | return result 93 | endfunc 94 | -------------------------------------------------------------------------------- /.vim/bundle/omnicppcomplete/doc/tags: -------------------------------------------------------------------------------- 1 | OmniCpp_DefaultNamespaces omnicppcomplete.txt /*OmniCpp_DefaultNamespaces* 2 | OmniCpp_DisplayMode omnicppcomplete.txt /*OmniCpp_DisplayMode* 3 | OmniCpp_GlobalScopeSearch omnicppcomplete.txt /*OmniCpp_GlobalScopeSearch* 4 | OmniCpp_LocalSearchDecl omnicppcomplete.txt /*OmniCpp_LocalSearchDecl* 5 | OmniCpp_MayCompleteArrow omnicppcomplete.txt /*OmniCpp_MayCompleteArrow* 6 | OmniCpp_MayCompleteDot omnicppcomplete.txt /*OmniCpp_MayCompleteDot* 7 | OmniCpp_MayCompleteScope omnicppcomplete.txt /*OmniCpp_MayCompleteScope* 8 | OmniCpp_NamespaceSearch omnicppcomplete.txt /*OmniCpp_NamespaceSearch* 9 | OmniCpp_SelectFirstItem omnicppcomplete.txt /*OmniCpp_SelectFirstItem* 10 | OmniCpp_ShowAccess omnicppcomplete.txt /*OmniCpp_ShowAccess* 11 | OmniCpp_ShowPrototypeInAbbr omnicppcomplete.txt /*OmniCpp_ShowPrototypeInAbbr* 12 | OmniCpp_ShowScopeInAbbr omnicppcomplete.txt /*OmniCpp_ShowScopeInAbbr* 13 | omnicpp-download omnicppcomplete.txt /*omnicpp-download* 14 | omnicpp-faq omnicppcomplete.txt /*omnicpp-faq* 15 | omnicpp-features omnicppcomplete.txt /*omnicpp-features* 16 | omnicpp-history omnicppcomplete.txt /*omnicpp-history* 17 | omnicpp-installation omnicppcomplete.txt /*omnicpp-installation* 18 | omnicpp-limitations omnicppcomplete.txt /*omnicpp-limitations* 19 | omnicpp-may-complete omnicppcomplete.txt /*omnicpp-may-complete* 20 | omnicpp-options omnicppcomplete.txt /*omnicpp-options* 21 | omnicpp-overview omnicppcomplete.txt /*omnicpp-overview* 22 | omnicpp-popup omnicppcomplete.txt /*omnicpp-popup* 23 | omnicpp-thanks omnicppcomplete.txt /*omnicpp-thanks* 24 | omnicppcomplete omnicppcomplete.txt /*omnicppcomplete* 25 | omnicppcomplete.txt omnicppcomplete.txt /*omnicppcomplete.txt* 26 | -------------------------------------------------------------------------------- /.vim/bundle/supertab/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.vmb 3 | doc/tags 4 | /README.html 5 | -------------------------------------------------------------------------------- /.vim/bundle/supertab/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/bash 2 | 3 | all: dist 4 | 5 | dist: 6 | @rm supertab.vmb 2> /dev/null || true 7 | @vim -c 'r! git ls-files doc plugin' \ 8 | -c '$$,$$d _' -c '%MkVimball supertab .' -c 'q!' 9 | 10 | clean: 11 | @rm -R build 2> /dev/null || true 12 | 13 | install: supertab.vmb 14 | vim $< -c 'so %' -c 'q' 15 | 16 | uninstall: 17 | vim -c 'RmVimball supertab.vmb' -c 'q' 18 | -------------------------------------------------------------------------------- /.vim/bundle/supertab/ftplugin/html.vim: -------------------------------------------------------------------------------- 1 | " Author: Eric Van Dewoestine 2 | " 3 | " License: {{{ 4 | " Copyright (c) 2014 5 | " All rights reserved. 6 | " 7 | " Redistribution and use of this software in source and binary forms, with 8 | " or without modification, are permitted provided that the following 9 | " conditions are met: 10 | " 11 | " * Redistributions of source code must retain the above 12 | " copyright notice, this list of conditions and the 13 | " following disclaimer. 14 | " 15 | " * Redistributions in binary form must reproduce the above 16 | " copyright notice, this list of conditions and the 17 | " following disclaimer in the documentation and/or other 18 | " materials provided with the distribution. 19 | " 20 | " * Neither the name of Gergely Kontra or Eric Van Dewoestine nor the names 21 | " of its contributors may be used to endorse or promote products derived 22 | " from this software without specific prior written permission of Gergely 23 | " Kontra or Eric Van Dewoestine. 24 | " 25 | " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 26 | " IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 27 | " THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 | " PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 29 | " CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 | " EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31 | " PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 | " PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | " LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | " NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | " SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | " }}} 37 | 38 | if !exists('b:SuperTabContextTextMemberPatterns') 39 | let b:SuperTabContextTextMemberPatterns = [' 2 | " 3 | " License: {{{ 4 | " Copyright (c) 2014 5 | " All rights reserved. 6 | " 7 | " Redistribution and use of this software in source and binary forms, with 8 | " or without modification, are permitted provided that the following 9 | " conditions are met: 10 | " 11 | " * Redistributions of source code must retain the above 12 | " copyright notice, this list of conditions and the 13 | " following disclaimer. 14 | " 15 | " * Redistributions in binary form must reproduce the above 16 | " copyright notice, this list of conditions and the 17 | " following disclaimer in the documentation and/or other 18 | " materials provided with the distribution. 19 | " 20 | " * Neither the name of Gergely Kontra or Eric Van Dewoestine nor the names 21 | " of its contributors may be used to endorse or promote products derived 22 | " from this software without specific prior written permission of Gergely 23 | " Kontra or Eric Van Dewoestine. 24 | " 25 | " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 26 | " IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 27 | " THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 | " PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 29 | " CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 | " EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31 | " PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 | " PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | " LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | " NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | " SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | " }}} 37 | 38 | if !exists('b:SuperTabContextTextMemberPatterns') 39 | let b:SuperTabContextTextMemberPatterns = [' -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/algorithm 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_ALGORITHM 61 | #define _GLIBCXX_ALGORITHM 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | 70 | #endif /* _GLIBCXX_ALGORITHM */ 71 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/allocator.h: -------------------------------------------------------------------------------- 1 | // Allocators -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /* 32 | * Copyright (c) 1996-1997 33 | * Silicon Graphics Computer Systems, Inc. 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Silicon Graphics makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | */ 43 | 44 | /** @file allocator.h 45 | * This is an internal header file, included by other library headers. 46 | * You should not attempt to use it directly. 47 | */ 48 | 49 | #ifndef _ALLOCATOR_H 50 | #define _ALLOCATOR_H 1 51 | 52 | // Define the base class to std::allocator. 53 | #include 54 | 55 | #include // for __is_empty 56 | 57 | namespace std { 58 | 59 | template 60 | class allocator; 61 | 62 | /// allocator specialization. 63 | template<> 64 | class allocator 65 | { 66 | public: 67 | typedef size_t size_type; 68 | typedef ptrdiff_t difference_type; 69 | typedef void* pointer; 70 | typedef const void* const_pointer; 71 | typedef void value_type; 72 | 73 | template 74 | struct rebind 75 | { typedef allocator<_Tp1> other; }; 76 | }; 77 | 78 | /** 79 | * @brief The "standard" allocator, as per [20.4]. 80 | * 81 | * Further details: 82 | * http://gcc.gnu.org/onlinedocs/libstdc++/20_util/allocator.html 83 | */ 84 | template 85 | class allocator: public __glibcxx_base_allocator<_Tp> 86 | { 87 | public: 88 | typedef size_t size_type; 89 | typedef ptrdiff_t difference_type; 90 | typedef _Tp* pointer; 91 | typedef const _Tp* const_pointer; 92 | typedef _Tp& reference; 93 | typedef const _Tp& const_reference; 94 | typedef _Tp value_type; 95 | 96 | template 97 | struct rebind 98 | { typedef allocator<_Tp1> other; }; 99 | 100 | allocator() throw() { } 101 | 102 | allocator(const allocator& __a) throw() 103 | : __glibcxx_base_allocator<_Tp>(__a) { } 104 | 105 | template 106 | allocator(const allocator<_Tp1>&) throw() { } 107 | 108 | ~allocator() throw() { } 109 | 110 | // Inherit everything else. 111 | }; 112 | 113 | template 114 | inline bool 115 | operator==(const allocator<_T1>&, const allocator<_T2>&) 116 | { return true; } 117 | 118 | template 119 | inline bool 120 | operator==(const allocator<_Tp>&, const allocator<_Tp>&) 121 | { return true; } 122 | 123 | template 124 | inline bool 125 | operator!=(const allocator<_T1>&, const allocator<_T2>&) 126 | { return false; } 127 | 128 | template 129 | inline bool 130 | operator!=(const allocator<_Tp>&, const allocator<_Tp>&) 131 | { return false; } 132 | 133 | // Inhibit implicit instantiations for required instantiations, 134 | // which are defined via explicit instantiations elsewhere. 135 | // NB: This syntax is a GNU extension. 136 | #if _GLIBCXX_EXTERN_TEMPLATE 137 | extern template class allocator; 138 | extern template class allocator; 139 | #endif 140 | 141 | // Undefine. 142 | #undef __glibcxx_base_allocator 143 | 144 | // To implement Option 3 of DR 431. 145 | template::__value> 146 | struct __alloc_swap 147 | { static void _S_do_it(_Alloc&, _Alloc&) { } }; 148 | 149 | template 150 | struct __alloc_swap<_Alloc, false> 151 | { 152 | static void 153 | _S_do_it(_Alloc& __one, _Alloc& __two) 154 | { 155 | // Precondition: swappable allocators. 156 | if (__one != __two) 157 | swap(__one, __two); 158 | } 159 | }; 160 | 161 | } // namespace std 162 | 163 | #endif 164 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cassert: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file cassert 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c assert.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 19.2 Assertions 43 | // 44 | 45 | // No include guards on this header... 46 | 47 | #pragma GCC system_header 48 | 49 | #include 50 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cctype: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/cctype 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c ctype.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 43 | // 44 | 45 | #ifndef _GLIBCXX_CCTYPE 46 | #define _GLIBCXX_CCTYPE 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | // Get rid of those macros defined in in lieu of real functions. 54 | #undef isalnum 55 | #undef isalpha 56 | #undef iscntrl 57 | #undef isdigit 58 | #undef isgraph 59 | #undef islower 60 | #undef isprint 61 | #undef ispunct 62 | #undef isspace 63 | #undef isupper 64 | #undef isxdigit 65 | #undef tolower 66 | #undef toupper 67 | 68 | namespace std { 69 | 70 | using ::isalnum; 71 | using ::isalpha; 72 | using ::iscntrl; 73 | using ::isdigit; 74 | using ::isgraph; 75 | using ::islower; 76 | using ::isprint; 77 | using ::ispunct; 78 | using ::isspace; 79 | using ::isupper; 80 | using ::isxdigit; 81 | using ::tolower; 82 | using ::toupper; 83 | 84 | } // namespace std 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cerrno: -------------------------------------------------------------------------------- 1 | // The -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file cerrno 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c errno.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 19.3 Error numbers 43 | // 44 | 45 | #ifndef _GLIBCXX_CERRNO 46 | #define _GLIBCXX_CERRNO 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | 52 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 53 | #ifndef errno 54 | #define errno errno 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cfloat: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/cfloat 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c float.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 18.2.2 Implementation properties: C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CFLOAT 46 | #define _GLIBCXX_CFLOAT 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/climits: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/climits 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c limits.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 18.2.2 Implementation properties: C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CLIMITS 46 | #define _GLIBCXX_CLIMITS 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/clocale: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file clocale 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c locale.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 18.2.2 Implementation properties: C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CLOCALE 46 | #define _GLIBCXX_CLOCALE 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | // Get rid of those macros defined in in lieu of real functions. 54 | #undef setlocale 55 | #undef localeconv 56 | 57 | namespace std { 58 | 59 | using ::lconv; 60 | using ::setlocale; 61 | using ::localeconv; 62 | 63 | } // namespace std 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cmath.tcc: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- C math library. 2 | 3 | // Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | // This file was written by Gabriel Dos Reis 31 | 32 | /** @file cmath.tcc 33 | * This is a Standard C++ Library file. 34 | */ 35 | 36 | #ifndef _GLIBCXX_CMATH_TCC 37 | #define _GLIBCXX_CMATH_TCC 1 38 | 39 | namespace std { 40 | 41 | template 42 | inline _Tp 43 | __cmath_power(_Tp __x, unsigned int __n) 44 | { 45 | _Tp __y = __n % 2 ? __x : 1; 46 | 47 | while (__n >>= 1) 48 | { 49 | __x = __x * __x; 50 | if (__n % 2) 51 | __y = __y * __x; 52 | } 53 | 54 | return __y; 55 | } 56 | 57 | } // namespace std 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/concept_check.h: -------------------------------------------------------------------------------- 1 | // Concept-checking control -*- C++ -*- 2 | 3 | // Copyright (C) 2001 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /** @file concept_check.h 31 | * This is an internal header file, included by other library headers. 32 | * You should not attempt to use it directly. 33 | */ 34 | 35 | #ifndef _CONCEPT_CHECK_H 36 | #define _CONCEPT_CHECK_H 1 37 | 38 | #pragma GCC system_header 39 | 40 | #include 41 | 42 | // All places in libstdc++-v3 where these are used, or /might/ be used, or 43 | // don't need to be used, or perhaps /should/ be used, are commented with 44 | // "concept requirements" (and maybe some more text). So grep like crazy 45 | // if you're looking for additional places to use these. 46 | 47 | // Concept-checking code is off by default unless users turn it on via 48 | // configure options or editing c++config.h. 49 | 50 | #ifndef _GLIBCXX_CONCEPT_CHECKS 51 | 52 | #define __glibcxx_function_requires(...) 53 | #define __glibcxx_class_requires(_a,_b) 54 | #define __glibcxx_class_requires2(_a,_b,_c) 55 | #define __glibcxx_class_requires3(_a,_b,_c,_d) 56 | #define __glibcxx_class_requires4(_a,_b,_c,_d,_e) 57 | 58 | #else // the checks are on 59 | 60 | #include 61 | 62 | // Note that the obvious and elegant approach of 63 | // 64 | //#define glibcxx_function_requires(C) boost::function_requires< boost::C >() 65 | // 66 | // won't work due to concept templates with more than one parameter, e.g., 67 | // BinaryPredicateConcept. The preprocessor tries to split things up on 68 | // the commas in the template argument list. We can't use an inner pair of 69 | // parenthesis to hide the commas, because "boost::(Temp)" isn't 70 | // a valid instantiation pattern. Thus, we steal a feature from C99. 71 | 72 | #define __glibcxx_function_requires(...) \ 73 | __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >(); 74 | #define __glibcxx_class_requires(_a,_C) \ 75 | _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C); 76 | #define __glibcxx_class_requires2(_a,_b,_C) \ 77 | _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C); 78 | #define __glibcxx_class_requires3(_a,_b,_c,_C) \ 79 | _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C); 80 | #define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \ 81 | _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C); 82 | 83 | #endif // enable/disable 84 | 85 | #endif // _GLIBCXX_CONCEPT_CHECK 86 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/csetjmp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file csetjmp 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c setjmp.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 20.4.6 C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CSETJMP 46 | #define _GLIBCXX_CSETJMP 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | // Get rid of those macros defined in in lieu of real functions. 54 | #undef longjmp 55 | 56 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 57 | #ifndef setjmp 58 | #define setjmp(env) setjmp (env) 59 | #endif 60 | 61 | namespace std { 62 | 63 | using ::jmp_buf; 64 | using ::longjmp; 65 | 66 | } // namespace std 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/csignal: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file csignal 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c signal.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 20.4.6 C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CSIGNAL 46 | #define _GLIBCXX_CSIGNAL 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | // Get rid of those macros defined in in lieu of real functions. 54 | #undef raise 55 | 56 | namespace std { 57 | 58 | using ::sig_atomic_t; 59 | using ::signal; 60 | using ::raise; 61 | 62 | } // namespace std 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cstdarg: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/cstdarg 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c stdarg.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 20.4.6 C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CSTDARG 46 | #define _GLIBCXX_CSTDARG 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 54 | #ifndef va_end 55 | #define va_end(ap) va_end (ap) 56 | #endif 57 | 58 | namespace std { 59 | 60 | using ::va_list; 61 | 62 | } // namespace std 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cstddef: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file cstddef 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c stddef.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 18.1 Types 43 | // 44 | 45 | #ifndef _GLIBCXX_CSTDDEF 46 | #define _GLIBCXX_CSTDDEF 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | namespace std { 54 | 55 | using ::ptrdiff_t; 56 | using ::size_t; 57 | 58 | } // namespace std 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cstdio: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/cstdio 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c stdio.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 27.8.2 C Library files 43 | // 44 | 45 | #ifndef _GLIBCXX_CSTDIO 46 | #define _GLIBCXX_CSTDIO 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | #include 54 | 55 | // Get rid of those macros defined in in lieu of real functions. 56 | #undef clearerr 57 | #undef fclose 58 | #undef feof 59 | #undef ferror 60 | #undef fflush 61 | #undef fgetc 62 | #undef fgetpos 63 | #undef fgets 64 | #undef fopen 65 | #undef fprintf 66 | #undef fputc 67 | #undef fputs 68 | #undef fread 69 | #undef freopen 70 | #undef fscanf 71 | #undef fseek 72 | #undef fsetpos 73 | #undef ftell 74 | #undef fwrite 75 | #undef getc 76 | #undef getchar 77 | #undef gets 78 | #undef perror 79 | #undef printf 80 | #undef putc 81 | #undef putchar 82 | #undef puts 83 | #undef remove 84 | #undef rename 85 | #undef rewind 86 | #undef scanf 87 | #undef setbuf 88 | #undef setvbuf 89 | #undef sprintf 90 | #undef sscanf 91 | #undef tmpfile 92 | #undef tmpnam 93 | #undef ungetc 94 | #undef vfprintf 95 | #undef vprintf 96 | #undef vsprintf 97 | 98 | namespace std { 99 | 100 | using ::FILE; 101 | using ::fpos_t; 102 | 103 | using ::clearerr; 104 | using ::fclose; 105 | using ::feof; 106 | using ::ferror; 107 | using ::fflush; 108 | using ::fgetc; 109 | using ::fgetpos; 110 | using ::fgets; 111 | using ::fopen; 112 | using ::fprintf; 113 | using ::fputc; 114 | using ::fputs; 115 | using ::fread; 116 | using ::freopen; 117 | using ::fscanf; 118 | using ::fseek; 119 | using ::fsetpos; 120 | using ::ftell; 121 | using ::fwrite; 122 | using ::getc; 123 | using ::getchar; 124 | using ::gets; 125 | using ::perror; 126 | using ::printf; 127 | using ::putc; 128 | using ::putchar; 129 | using ::puts; 130 | using ::remove; 131 | using ::rename; 132 | using ::rewind; 133 | using ::scanf; 134 | using ::setbuf; 135 | using ::setvbuf; 136 | using ::sprintf; 137 | using ::sscanf; 138 | using ::tmpfile; 139 | using ::tmpnam; 140 | using ::ungetc; 141 | using ::vfprintf; 142 | using ::vprintf; 143 | using ::vsprintf; 144 | 145 | } // namespace std 146 | 147 | #if _GLIBCXX_USE_C99 || defined(__UCLIBC__) 148 | 149 | #undef snprintf 150 | #undef vfscanf 151 | #undef vscanf 152 | #undef vsnprintf 153 | #undef vsscanf 154 | 155 | _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) 156 | 157 | #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC 158 | extern "C" int 159 | (snprintf)(char * restrict, size_t, const char * restrict, ...); 160 | extern "C" int 161 | (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list); 162 | extern "C" int (vscanf)(const char * restrict, __gnuc_va_list); 163 | extern "C" int 164 | (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list); 165 | extern "C" int 166 | (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list); 167 | #endif 168 | 169 | #if !_GLIBCXX_USE_C99_DYNAMIC 170 | using ::snprintf; 171 | using ::vfscanf; 172 | using ::vscanf; 173 | using ::vsnprintf; 174 | using ::vsscanf; 175 | #endif 176 | 177 | } // namespace std 178 | 179 | namespace std { 180 | 181 | using ::__gnu_cxx::snprintf; 182 | using ::__gnu_cxx::vfscanf; 183 | using ::__gnu_cxx::vscanf; 184 | using ::__gnu_cxx::vsnprintf; 185 | using ::__gnu_cxx::vsscanf; 186 | 187 | } // namespace std 188 | 189 | #endif 190 | 191 | #endif 192 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cstring: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file cstring 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c string.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 20.4.6 C library 43 | // 44 | 45 | #ifndef _GLIBCXX_CSTRING 46 | #define _GLIBCXX_CSTRING 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | #include 53 | 54 | // Get rid of those macros defined in in lieu of real functions. 55 | #undef memcpy 56 | #undef memmove 57 | #undef strcpy 58 | #undef strncpy 59 | #undef strcat 60 | #undef strncat 61 | #undef memcmp 62 | #undef strcmp 63 | #undef strcoll 64 | #undef strncmp 65 | #undef strxfrm 66 | #undef memchr 67 | #undef strchr 68 | #undef strcspn 69 | #undef strpbrk 70 | #undef strrchr 71 | #undef strspn 72 | #undef strstr 73 | #undef strtok 74 | #undef memset 75 | #undef strerror 76 | #undef strlen 77 | 78 | namespace std { 79 | 80 | using ::memcpy; 81 | using ::memmove; 82 | using ::strcpy; 83 | using ::strncpy; 84 | using ::strcat; 85 | using ::strncat; 86 | using ::memcmp; 87 | using ::strcmp; 88 | using ::strcoll; 89 | using ::strncmp; 90 | using ::strxfrm; 91 | using ::strcspn; 92 | using ::strspn; 93 | using ::strtok; 94 | using ::memset; 95 | using ::strerror; 96 | using ::strlen; 97 | 98 | using ::memchr; 99 | 100 | inline void* 101 | memchr(void* __p, int __c, size_t __n) 102 | { return memchr(const_cast(__p), __c, __n); } 103 | 104 | using ::strchr; 105 | 106 | inline char* 107 | strchr(char* __s1, int __n) 108 | { return __builtin_strchr(const_cast(__s1), __n); } 109 | 110 | using ::strpbrk; 111 | 112 | inline char* 113 | strpbrk(char* __s1, const char* __s2) 114 | { return __builtin_strpbrk(const_cast(__s1), __s2); } 115 | 116 | using ::strrchr; 117 | 118 | inline char* 119 | strrchr(char* __s1, int __n) 120 | { return __builtin_strrchr(const_cast(__s1), __n); } 121 | 122 | using ::strstr; 123 | 124 | inline char* 125 | strstr(char* __s1, const char* __s2) 126 | { return __builtin_strstr(const_cast(__s1), __s2); } 127 | 128 | } // namespace std 129 | 130 | #endif 131 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/ctime: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/ctime 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c time.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 20.5 Date and time 43 | // 44 | 45 | #ifndef _GLIBCXX_CTIME 46 | #define _GLIBCXX_CTIME 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | #include 52 | 53 | // Get rid of those macros defined in in lieu of real functions. 54 | #undef clock 55 | #undef difftime 56 | #undef mktime 57 | #undef time 58 | #undef asctime 59 | #undef ctime 60 | #undef gmtime 61 | #undef localtime 62 | #undef strftime 63 | 64 | namespace std { 65 | 66 | using ::clock_t; 67 | using ::time_t; 68 | using ::tm; 69 | 70 | using ::clock; 71 | using ::difftime; 72 | using ::mktime; 73 | using ::time; 74 | using ::asctime; 75 | using ::ctime; 76 | using ::gmtime; 77 | using ::localtime; 78 | using ::strftime; 79 | 80 | } // namespace std 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/cwctype: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file include/cwctype 32 | * This is a Standard C++ Library file. You should @c #include this file 33 | * in your programs, rather than any of the "*.h" implementation files. 34 | * 35 | * This is the C++ version of the Standard C Library header @c wctype.h, 36 | * and its contents are (mostly) the same as that header, but are all 37 | * contained in the namespace @c std (except for names which are defined 38 | * as macros in C). 39 | */ 40 | 41 | // 42 | // ISO C++ 14882: 43 | // 44 | 45 | #ifndef _GLIBCXX_CWCTYPE 46 | #define _GLIBCXX_CWCTYPE 1 47 | 48 | #pragma GCC system_header 49 | 50 | #include 51 | 52 | #if _GLIBCXX_HAVE_WCTYPE_H 53 | #include 54 | #endif 55 | 56 | // Get rid of those macros defined in in lieu of real functions. 57 | #undef iswalnum 58 | #undef iswalpha 59 | #if _GLIBCXX_HAVE_ISWBLANK 60 | # undef iswblank 61 | #endif 62 | #undef iswcntrl 63 | #undef iswctype 64 | #undef iswdigit 65 | #undef iswgraph 66 | #undef iswlower 67 | #undef iswprint 68 | #undef iswpunct 69 | #undef iswspace 70 | #undef iswupper 71 | #undef iswxdigit 72 | #undef towctrans 73 | #undef towlower 74 | #undef towupper 75 | #undef wctrans 76 | #undef wctype 77 | 78 | #if _GLIBCXX_USE_WCHAR_T 79 | 80 | namespace std { 81 | 82 | using ::wint_t; // cwchar 83 | 84 | using ::wctype_t; 85 | using ::wctrans_t; 86 | 87 | using ::iswalnum; 88 | using ::iswalpha; 89 | #if _GLIBCXX_HAVE_ISWBLANK 90 | using ::iswblank; 91 | #endif 92 | using ::iswcntrl; 93 | using ::iswctype; 94 | using ::iswdigit; 95 | using ::iswgraph; 96 | using ::iswlower; 97 | using ::iswprint; 98 | using ::iswpunct; 99 | using ::iswspace; 100 | using ::iswupper; 101 | using ::iswxdigit; 102 | using ::towctrans; 103 | using ::towlower; 104 | using ::towupper; 105 | using ::wctrans; 106 | using ::wctype; 107 | 108 | } // namespace std 109 | 110 | #endif //_GLIBCXX_USE_WCHAR_T 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/deque: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/deque 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_DEQUE 61 | #define _GLIBCXX_DEQUE 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | 72 | #ifndef _GLIBCXX_EXPORT_TEMPLATE 73 | # include 74 | #endif 75 | 76 | #ifdef _GLIBCXX_DEBUG 77 | # include 78 | #endif 79 | 80 | #endif /* _GLIBCXX_DEQUE */ 81 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/exception: -------------------------------------------------------------------------------- 1 | // Exception Handling support header for -*- C++ -*- 2 | 3 | // Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 4 | // 2004, 2005, 2006, 2007 5 | // Free Software Foundation 6 | // 7 | // This file is part of GCC. 8 | // 9 | // GCC is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU General Public License as published by 11 | // the Free Software Foundation; either version 2, or (at your option) 12 | // any later version. 13 | // 14 | // GCC is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU General Public License 20 | // along with GCC; see the file COPYING. If not, write to 21 | // the Free Software Foundation, 51 Franklin Street, Fifth Floor, 22 | // Boston, MA 02110-1301, USA. 23 | 24 | // As a special exception, you may use this file as part of a free software 25 | // library without restriction. Specifically, if other files instantiate 26 | // templates or use macros or inline functions from this file, or you compile 27 | // this file and link it with other files to produce an executable, this 28 | // file does not by itself cause the resulting executable to be covered by 29 | // the GNU General Public License. This exception does not however 30 | // invalidate any other reasons why the executable file might be covered by 31 | // the GNU General Public License. 32 | 33 | /** @file exception 34 | * This is a Standard C++ Library header. 35 | */ 36 | 37 | #ifndef __EXCEPTION__ 38 | #define __EXCEPTION__ 39 | 40 | #pragma GCC visibility push(default) 41 | 42 | #include 43 | 44 | extern "C++" { 45 | 46 | namespace std 47 | { 48 | /** 49 | * @brief Base class for all library exceptions. 50 | * 51 | * This is the base class for all exceptions thrown by the standard 52 | * library, and by certain language expressions. You are free to derive 53 | * your own %exception classes, or use a different hierarchy, or to 54 | * throw non-class data (e.g., fundamental types). 55 | */ 56 | class exception 57 | { 58 | public: 59 | exception() throw() { } 60 | virtual ~exception() throw(); 61 | 62 | /** Returns a C-style character string describing the general cause 63 | * of the current error. */ 64 | virtual const char* what() const throw(); 65 | }; 66 | 67 | /** If an %exception is thrown which is not listed in a function's 68 | * %exception specification, one of these may be thrown. */ 69 | class bad_exception : public exception 70 | { 71 | public: 72 | bad_exception() throw() { } 73 | 74 | // This declaration is not useless: 75 | // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 76 | virtual ~bad_exception() throw(); 77 | 78 | // See comment in eh_exception.cc. 79 | virtual const char* what() const throw(); 80 | }; 81 | 82 | /// If you write a replacement %terminate handler, it must be of this type. 83 | typedef void (*terminate_handler) (); 84 | 85 | /// If you write a replacement %unexpected handler, it must be of this type. 86 | typedef void (*unexpected_handler) (); 87 | 88 | /// Takes a new handler function as an argument, returns the old function. 89 | terminate_handler set_terminate(terminate_handler) throw(); 90 | 91 | /** The runtime will call this function if %exception handling must be 92 | * abandoned for any reason. It can also be called by the user. */ 93 | void terminate() __attribute__ ((__noreturn__)); 94 | 95 | /// Takes a new handler function as an argument, returns the old function. 96 | unexpected_handler set_unexpected(unexpected_handler) throw(); 97 | 98 | /** The runtime will call this function if an %exception is thrown which 99 | * violates the function's %exception specification. */ 100 | void unexpected() __attribute__ ((__noreturn__)); 101 | 102 | /** [18.6.4]/1: "Returns true after completing evaluation of a 103 | * throw-expression until either completing initialization of the 104 | * exception-declaration in the matching handler or entering @c unexpected() 105 | * due to the throw; or after entering @c terminate() for any reason 106 | * other than an explicit call to @c terminate(). [Note: This includes 107 | * stack unwinding [15.2]. end note]" 108 | * 109 | * 2: "When @c uncaught_exception() is true, throwing an %exception can 110 | * result in a call of @c terminate() (15.5.1)." 111 | */ 112 | bool uncaught_exception() throw(); 113 | } // namespace std 114 | 115 | _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) 116 | 117 | /** A replacement for the standard terminate_handler which prints more 118 | information about the terminating exception (if any) on stderr. Call 119 | @code 120 | std::set_terminate (__gnu_cxx::__verbose_terminate_handler) 121 | @endcode 122 | to use. For more info, see 123 | http://gcc.gnu.org/onlinedocs/libstdc++/19_diagnostics/howto.html#4 124 | 125 | In 3.4 and later, this is on by default. 126 | */ 127 | void __verbose_terminate_handler (); 128 | 129 | } // namespace std 130 | 131 | } // extern "C++" 132 | 133 | #pragma GCC visibility pop 134 | 135 | #endif 136 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/exception_defines.h: -------------------------------------------------------------------------------- 1 | // -fno-exceptions Support -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | // 31 | // ISO C++ 14882: 19.1 Exception classes 32 | // 33 | 34 | /** @file exception_defines.h 35 | * This is a Standard C++ Library header. 36 | */ 37 | 38 | #ifndef _EXCEPTION_DEFINES_H 39 | #define _EXCEPTION_DEFINES_H 1 40 | 41 | #ifndef __EXCEPTIONS 42 | // Iff -fno-exceptions, transform error handling code to work without it. 43 | # define try if (true) 44 | # define catch(X) if (false) 45 | # define __throw_exception_again 46 | #else 47 | // Else proceed normally. 48 | # define __throw_exception_again throw 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/functexcept.h: -------------------------------------------------------------------------------- 1 | // Function-Based Exception Support -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /** @file functexcept.h 31 | * This header provides support for -fno-exceptions. 32 | */ 33 | 34 | // 35 | // ISO C++ 14882: 19.1 Exception classes 36 | // 37 | 38 | #ifndef _FUNCTEXCEPT_H 39 | #define _FUNCTEXCEPT_H 1 40 | 41 | #include 42 | #include 43 | 44 | namespace std { 45 | 46 | // Helper for exception objects in 47 | void 48 | __throw_bad_exception(void) __attribute__((__noreturn__)); 49 | 50 | // Helper for exception objects in 51 | void 52 | __throw_bad_alloc(void) __attribute__((__noreturn__)); 53 | 54 | // Helper for exception objects in 55 | void 56 | __throw_bad_cast(void) __attribute__((__noreturn__)); 57 | 58 | void 59 | __throw_bad_typeid(void) __attribute__((__noreturn__)); 60 | 61 | // Helpers for exception objects in 62 | void 63 | __throw_logic_error(const char*) __attribute__((__noreturn__)); 64 | 65 | void 66 | __throw_domain_error(const char*) __attribute__((__noreturn__)); 67 | 68 | void 69 | __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 70 | 71 | void 72 | __throw_length_error(const char*) __attribute__((__noreturn__)); 73 | 74 | void 75 | __throw_out_of_range(const char*) __attribute__((__noreturn__)); 76 | 77 | void 78 | __throw_runtime_error(const char*) __attribute__((__noreturn__)); 79 | 80 | void 81 | __throw_range_error(const char*) __attribute__((__noreturn__)); 82 | 83 | void 84 | __throw_overflow_error(const char*) __attribute__((__noreturn__)); 85 | 86 | void 87 | __throw_underflow_error(const char*) __attribute__((__noreturn__)); 88 | 89 | // Helpers for exception objects in basic_ios 90 | void 91 | __throw_ios_failure(const char*) __attribute__((__noreturn__)); 92 | 93 | } // namespace std 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/functional: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * Copyright (c) 1997 32 | * Silicon Graphics Computer Systems, Inc. 33 | * 34 | * Permission to use, copy, modify, distribute and sell this software 35 | * and its documentation for any purpose is hereby granted without fee, 36 | * provided that the above copyright notice appear in all copies and 37 | * that both that copyright notice and this permission notice appear 38 | * in supporting documentation. Silicon Graphics makes no 39 | * representations about the suitability of this software for any 40 | * purpose. It is provided "as is" without express or implied warranty. 41 | * 42 | */ 43 | 44 | /** @file include/functional 45 | * This is a Standard C++ Library header. 46 | */ 47 | 48 | #ifndef _GLIBCXX_FUNCTIONAL 49 | #define _GLIBCXX_FUNCTIONAL 1 50 | 51 | #pragma GCC system_header 52 | 53 | #include 54 | #include 55 | #include 56 | 57 | #endif /* _GLIBCXX_FUNCTIONAL */ 58 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/gslice.h: -------------------------------------------------------------------------------- 1 | // The template and inlines for the -*- C++ -*- gslice class. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file gslice.h 32 | * This is an internal header file, included by other library headers. 33 | * You should not attempt to use it directly. 34 | */ 35 | 36 | // Written by Gabriel Dos Reis 37 | 38 | #ifndef _GSLICE_H 39 | #define _GSLICE_H 1 40 | 41 | #pragma GCC system_header 42 | 43 | namespace std { 44 | 45 | /** 46 | * @brief Class defining multi-dimensional subset of an array. 47 | * 48 | * The slice class represents a multi-dimensional subset of an array, 49 | * specified by three parameter sets: start offset, size array, and stride 50 | * array. The start offset is the index of the first element of the array 51 | * that is part of the subset. The size and stride array describe each 52 | * dimension of the slice. Size is the number of elements in that 53 | * dimension, and stride is the distance in the array between successive 54 | * elements in that dimension. Each dimension's size and stride is taken 55 | * to begin at an array element described by the previous dimension. The 56 | * size array and stride array must be the same size. 57 | * 58 | * For example, if you have offset==3, stride[0]==11, size[1]==3, 59 | * stride[1]==3, then slice[0,0]==array[3], slice[0,1]==array[6], 60 | * slice[0,2]==array[9], slice[1,0]==array[14], slice[1,1]==array[17], 61 | * slice[1,2]==array[20]. 62 | */ 63 | class gslice 64 | { 65 | public: 66 | /// Construct an empty slice. 67 | gslice (); 68 | 69 | /** 70 | * @brief Construct a slice. 71 | * 72 | * Constructs a slice with as many dimensions as the length of the @a l 73 | * and @a s arrays. 74 | * 75 | * @param o Offset in array of first element. 76 | * @param l Array of dimension lengths. 77 | * @param s Array of dimension strides between array elements. 78 | */ 79 | gslice(size_t, const valarray&, const valarray&); 80 | 81 | // XXX: the IS says the copy-ctor and copy-assignment operators are 82 | // synthetized by the compiler but they are just unsuitable 83 | // for a ref-counted semantic 84 | /// Copy constructor. 85 | gslice(const gslice&); 86 | 87 | /// Destructor. 88 | ~gslice(); 89 | 90 | // XXX: See the note above. 91 | /// Assignment operator. 92 | gslice& operator=(const gslice&); 93 | 94 | /// Return array offset of first slice element. 95 | size_t start() const; 96 | 97 | /// Return array of sizes of slice dimensions. 98 | valarray size() const; 99 | 100 | /// Return array of array strides for each dimension. 101 | valarray stride() const; 102 | 103 | private: 104 | struct _Indexer 105 | { 106 | size_t _M_count; 107 | size_t _M_start; 108 | valarray _M_size; 109 | valarray _M_stride; 110 | valarray _M_index; // Linear array of referenced indices 111 | _Indexer(size_t, const valarray&, 112 | const valarray&); 113 | void 114 | _M_increment_use() 115 | { ++_M_count; } 116 | 117 | size_t 118 | _M_decrement_use() 119 | { return --_M_count; } 120 | }; 121 | 122 | _Indexer* _M_index; 123 | 124 | template friend class valarray; 125 | }; 126 | 127 | inline size_t 128 | gslice::start () const 129 | { return _M_index ? _M_index->_M_start : 0; } 130 | 131 | inline valarray 132 | gslice::size () const 133 | { return _M_index ? _M_index->_M_size : valarray(); } 134 | 135 | inline valarray 136 | gslice::stride () const 137 | { return _M_index ? _M_index->_M_stride : valarray(); } 138 | 139 | inline gslice::gslice () : _M_index(0) {} 140 | 141 | inline 142 | gslice::gslice(size_t __o, const valarray& __l, 143 | const valarray& __s) 144 | : _M_index(new gslice::_Indexer(__o, __l, __s)) {} 145 | 146 | inline 147 | gslice::gslice(const gslice& __g) : _M_index(__g._M_index) 148 | { if (_M_index) _M_index->_M_increment_use(); } 149 | 150 | inline 151 | gslice::~gslice() 152 | { 153 | if (_M_index && _M_index->_M_decrement_use() == 0) 154 | delete _M_index; 155 | } 156 | 157 | inline gslice& 158 | gslice::operator= (const gslice& __g) 159 | { 160 | if (__g._M_index) 161 | __g._M_index->_M_increment_use(); 162 | if (_M_index && _M_index->_M_decrement_use() == 0) 163 | delete _M_index; 164 | _M_index = __g._M_index; 165 | return *this; 166 | } 167 | 168 | } // namespace std 169 | 170 | #endif /* _GSLICE_H */ 171 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/ios: -------------------------------------------------------------------------------- 1 | // Iostreams base classes -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /** @file ios 31 | * This is a Standard C++ Library header. 32 | */ 33 | 34 | // 35 | // ISO C++ 14882: 27.4 Iostreams base classes 36 | // 37 | 38 | #ifndef _GLIBCXX_IOS 39 | #define _GLIBCXX_IOS 1 40 | 41 | #pragma GCC system_header 42 | 43 | #include 44 | #include // For ios_base::failure 45 | #include // For char_traits, streamoff, streamsize, fpos 46 | #include // For SEEK_SET, SEEK_CUR, SEEK_END 47 | #include // For class locale 48 | #include // For ios_base declarations. 49 | #include 50 | #include 51 | 52 | #endif /* _GLIBCXX_IOS */ 53 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/iostream: -------------------------------------------------------------------------------- 1 | // Standard iostream objects -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2005 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file iostream 32 | * This is a Standard C++ Library header. 33 | */ 34 | 35 | // 36 | // ISO C++ 14882: 27.3 Standard iostream objects 37 | // 38 | 39 | #ifndef _GLIBCXX_IOSTREAM 40 | #define _GLIBCXX_IOSTREAM 1 41 | 42 | #pragma GCC system_header 43 | 44 | #include 45 | #include 46 | #include 47 | 48 | namespace std { 49 | 50 | /** 51 | * @name Standard Stream Objects 52 | * 53 | * The <iostream> header declares the eight standard stream 54 | * objects. For other declarations, see 55 | * http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#10 and the 56 | * @link s27_2_iosfwd I/O forward declarations @endlink 57 | * 58 | * They are required by default to cooperate with the global C library's 59 | * @c FILE streams, and to be available during program startup and 60 | * termination. For more information, see the HOWTO linked to above. 61 | */ 62 | //@{ 63 | extern istream cin; ///< Linked to standard input 64 | extern ostream cout; ///< Linked to standard output 65 | extern ostream cerr; ///< Linked to standard error (unbuffered) 66 | extern ostream clog; ///< Linked to standard error (buffered) 67 | 68 | // HACK by me for completion 69 | static istream cin; ///< Linked to standard input 70 | static ostream cout; ///< Linked to standard output 71 | static ostream cerr; ///< Linked to standard error (unbuffered) 72 | static ostream clog; ///< Linked to standard error (buffered) 73 | 74 | #ifdef _GLIBCXX_USE_WCHAR_T 75 | extern wistream wcin; ///< Linked to standard input 76 | extern wostream wcout; ///< Linked to standard output 77 | extern wostream wcerr; ///< Linked to standard error (unbuffered) 78 | extern wostream wclog; ///< Linked to standard error (buffered) 79 | #endif 80 | //@} 81 | 82 | // For construction of filebuffers for cout, cin, cerr, clog et. al. 83 | static ios_base::Init __ioinit; 84 | 85 | } // namespace std 86 | 87 | #endif /* _GLIBCXX_IOSTREAM */ 88 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/iterator: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/iterator 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_ITERATOR 61 | #define _GLIBCXX_ITERATOR 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | 75 | #endif /* _GLIBCXX_ITERATOR */ 76 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/list: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/list 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_LIST 61 | #define _GLIBCXX_LIST 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | 72 | #ifndef _GLIBCXX_EXPORT_TEMPLATE 73 | # include 74 | #endif 75 | 76 | #ifdef _GLIBCXX_DEBUG 77 | # include 78 | #endif 79 | 80 | #endif /* _GLIBCXX_LIST */ 81 | 82 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/locale: -------------------------------------------------------------------------------- 1 | // Locale support -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | // 31 | // ISO C++ 14882: 22.1 Locales 32 | // 33 | 34 | /** @file locale 35 | * This is a Standard C++ Library header. 36 | */ 37 | 38 | #ifndef _GLIBCXX_LOCALE 39 | #define _GLIBCXX_LOCALE 1 40 | 41 | #pragma GCC system_header 42 | 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | #endif /* _GLIBCXX_LOCALE */ 49 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/map: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/map 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_MAP 61 | #define _GLIBCXX_MAP 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | 69 | #ifdef _GLIBCXX_DEBUG 70 | # include 71 | #endif 72 | 73 | #endif /* _GLIBCXX_MAP */ 74 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/new: -------------------------------------------------------------------------------- 1 | // The -*- C++ -*- dynamic memory management header. 2 | 3 | // Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 4 | // 2003, 2004, 2005, 2006, 2007 5 | // Free Software Foundation 6 | 7 | // This file is part of GCC. 8 | // 9 | // GCC is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU General Public License as published by 11 | // the Free Software Foundation; either version 2, or (at your option) 12 | // any later version. 13 | // 14 | // GCC is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU General Public License 20 | // along with GCC; see the file COPYING. If not, write to 21 | // the Free Software Foundation, 51 Franklin Street, Fifth Floor, 22 | // Boston, MA 02110-1301, USA. 23 | 24 | // As a special exception, you may use this file as part of a free software 25 | // library without restriction. Specifically, if other files instantiate 26 | // templates or use macros or inline functions from this file, or you compile 27 | // this file and link it with other files to produce an executable, this 28 | // file does not by itself cause the resulting executable to be covered by 29 | // the GNU General Public License. This exception does not however 30 | // invalidate any other reasons why the executable file might be covered by 31 | // the GNU General Public License. 32 | 33 | /** @file new 34 | * This is a Standard C++ Library header. 35 | * 36 | * The header @c new defines several functions to manage dynamic memory and 37 | * handling memory allocation errors; see 38 | * http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more. 39 | */ 40 | 41 | #ifndef _NEW 42 | #define _NEW 43 | 44 | #include 45 | #include 46 | 47 | #pragma GCC visibility push(default) 48 | 49 | extern "C++" { 50 | 51 | namespace std 52 | { 53 | /** 54 | * @brief Exception possibly thrown by @c new. 55 | * 56 | * @c bad_alloc (or classes derived from it) is used to report allocation 57 | * errors from the throwing forms of @c new. */ 58 | class bad_alloc : public exception 59 | { 60 | public: 61 | bad_alloc() throw() { } 62 | 63 | // This declaration is not useless: 64 | // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 65 | virtual ~bad_alloc() throw(); 66 | 67 | // See comment in eh_exception.cc. 68 | virtual const char* what() const throw(); 69 | }; 70 | 71 | struct nothrow_t { }; 72 | 73 | extern const nothrow_t nothrow; 74 | 75 | /** If you write your own error handler to be called by @c new, it must 76 | * be of this type. */ 77 | typedef void (*new_handler)(); 78 | 79 | /// Takes a replacement handler as the argument, returns the 80 | /// previous handler. 81 | new_handler set_new_handler(new_handler) throw(); 82 | } // namespace std 83 | 84 | //@{ 85 | /** These are replaceable signatures: 86 | * - normal single new and delete (no arguments, throw @c bad_alloc on error) 87 | * - normal array new and delete (same) 88 | * - @c nothrow single new and delete (take a @c nothrow argument, return 89 | * @c NULL on error) 90 | * - @c nothrow array new and delete (same) 91 | * 92 | * Placement new and delete signatures (take a memory address argument, 93 | * does nothing) may not be replaced by a user's program. 94 | */ 95 | void* operator new(std::size_t) throw (std::bad_alloc); 96 | void* operator new[](std::size_t) throw (std::bad_alloc); 97 | void operator delete(void*) throw(); 98 | void operator delete[](void*) throw(); 99 | void* operator new(std::size_t, const std::nothrow_t&) throw(); 100 | void* operator new[](std::size_t, const std::nothrow_t&) throw(); 101 | void operator delete(void*, const std::nothrow_t&) throw(); 102 | void operator delete[](void*, const std::nothrow_t&) throw(); 103 | 104 | // Default placement versions of operator new. 105 | inline void* operator new(std::size_t, void* __p) throw() { return __p; } 106 | inline void* operator new[](std::size_t, void* __p) throw() { return __p; } 107 | 108 | // Default placement versions of operator delete. 109 | inline void operator delete (void*, void*) throw() { } 110 | inline void operator delete[](void*, void*) throw() { } 111 | //@} 112 | } // extern "C++" 113 | 114 | #pragma GCC visibility pop 115 | 116 | #endif 117 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/numeric: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/numeric 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_NUMERIC 61 | #define _GLIBCXX_NUMERIC 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | 71 | #endif /* _GLIBCXX_NUMERIC */ 72 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/ostream_insert.h: -------------------------------------------------------------------------------- 1 | // Helpers for ostream inserters -*- C++ -*- 2 | 3 | // Copyright (C) 2007 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /** @file ostream_insert.h 31 | * This is an internal header file, included by other library headers. 32 | * You should not attempt to use it directly. 33 | */ 34 | 35 | #ifndef _OSTREAM_INSERT_H 36 | #define _OSTREAM_INSERT_H 1 37 | 38 | #pragma GCC system_header 39 | 40 | #include 41 | 42 | namespace std { 43 | 44 | template 45 | inline void 46 | __ostream_write(basic_ostream<_CharT, _Traits>& __out, 47 | const _CharT* __s, streamsize __n) 48 | { 49 | typedef basic_ostream<_CharT, _Traits> __ostream_type; 50 | typedef typename __ostream_type::ios_base __ios_base; 51 | 52 | const streamsize __put = __out.rdbuf()->sputn(__s, __n); 53 | if (__put != __n) 54 | __out.setstate(__ios_base::badbit); 55 | } 56 | 57 | template 58 | inline void 59 | __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) 60 | { 61 | typedef basic_ostream<_CharT, _Traits> __ostream_type; 62 | typedef typename __ostream_type::ios_base __ios_base; 63 | 64 | const _CharT __c = __out.fill(); 65 | for (; __n > 0; --__n) 66 | { 67 | const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); 68 | if (_Traits::eq_int_type(__put, _Traits::eof())) 69 | { 70 | __out.setstate(__ios_base::badbit); 71 | break; 72 | } 73 | } 74 | } 75 | 76 | template 77 | basic_ostream<_CharT, _Traits>& 78 | __ostream_insert(basic_ostream<_CharT, _Traits>& __out, 79 | const _CharT* __s, streamsize __n) 80 | { 81 | typedef basic_ostream<_CharT, _Traits> __ostream_type; 82 | typedef typename __ostream_type::ios_base __ios_base; 83 | 84 | typename __ostream_type::sentry __cerb(__out); 85 | if (__cerb) 86 | { 87 | try 88 | { 89 | const streamsize __w = __out.width(); 90 | if (__w > __n) 91 | { 92 | const bool __left = ((__out.flags() 93 | & __ios_base::adjustfield) 94 | == __ios_base::left); 95 | if (!__left) 96 | __ostream_fill(__out, __w - __n); 97 | if (__out.good()) 98 | __ostream_write(__out, __s, __n); 99 | if (__left && __out.good()) 100 | __ostream_fill(__out, __w - __n); 101 | } 102 | else 103 | __ostream_write(__out, __s, __n); 104 | __out.width(0); 105 | } 106 | catch(...) 107 | { __out._M_setstate(__ios_base::badbit); } 108 | } 109 | return __out; 110 | } 111 | 112 | // Inhibit implicit instantiations for required instantiations, 113 | // which are defined via explicit instantiations elsewhere. 114 | // NB: This syntax is a GNU extension. 115 | #if _GLIBCXX_EXTERN_TEMPLATE 116 | extern template ostream& __ostream_insert(ostream&, const char*, streamsize); 117 | 118 | #ifdef _GLIBCXX_USE_WCHAR_T 119 | extern template wostream& __ostream_insert(wostream&, const wchar_t*, 120 | streamsize); 121 | #endif 122 | #endif 123 | 124 | } // namespace std 125 | 126 | #endif /* _OSTREAM_INSERT_H */ 127 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/queue: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/queue 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_QUEUE 61 | #define _GLIBCXX_QUEUE 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | #include 75 | #include 76 | 77 | #endif /* _GLIBCXX_QUEUE */ 78 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/set: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/set 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_SET 61 | #define _GLIBCXX_SET 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | 69 | #ifdef _GLIBCXX_DEBUG 70 | # include 71 | #endif 72 | 73 | #endif /* _GLIBCXX_SET */ 74 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/stack: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/stack 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_STACK 61 | #define _GLIBCXX_STACK 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | 72 | #endif /* _GLIBCXX_STACK */ 73 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/stdexcept: -------------------------------------------------------------------------------- 1 | // Standard exception classes -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /** @file stdexcept 31 | * This is a Standard C++ Library header. 32 | */ 33 | 34 | // 35 | // ISO C++ 19.1 Exception classes 36 | // 37 | 38 | #ifndef _GLIBCXX_STDEXCEPT 39 | #define _GLIBCXX_STDEXCEPT 1 40 | 41 | #pragma GCC system_header 42 | 43 | #include 44 | #include 45 | 46 | namespace std { 47 | 48 | /** Logic errors represent problems in the internal logic of a program; 49 | * in theory, these are preventable, and even detectable before the 50 | * program runs (e.g., violations of class invariants). 51 | * @brief One of two subclasses of exception. 52 | */ 53 | class logic_error : public exception 54 | { 55 | string _M_msg; 56 | 57 | public: 58 | /** Takes a character string describing the error. */ 59 | explicit 60 | logic_error(const string& __arg); 61 | 62 | virtual 63 | ~logic_error() throw(); 64 | 65 | /** Returns a C-style character string describing the general cause of 66 | * the current error (the same string passed to the ctor). */ 67 | virtual const char* 68 | what() const throw(); 69 | }; 70 | 71 | /** Thrown by the library, or by you, to report domain errors (domain in 72 | * the mathmatical sense). */ 73 | class domain_error : public logic_error 74 | { 75 | public: 76 | explicit domain_error(const string& __arg); 77 | }; 78 | 79 | /** Thrown to report invalid arguments to functions. */ 80 | class invalid_argument : public logic_error 81 | { 82 | public: 83 | explicit invalid_argument(const string& __arg); 84 | }; 85 | 86 | /** Thrown when an object is constructed that would exceed its maximum 87 | * permitted size (e.g., a basic_string instance). */ 88 | class length_error : public logic_error 89 | { 90 | public: 91 | explicit length_error(const string& __arg); 92 | }; 93 | 94 | /** This represents an argument whose value is not within the expected 95 | * range (e.g., boundary checks in basic_string). */ 96 | class out_of_range : public logic_error 97 | { 98 | public: 99 | explicit out_of_range(const string& __arg); 100 | }; 101 | 102 | /** Runtime errors represent problems outside the scope of a program; 103 | * they cannot be easily predicted and can generally only be caught as 104 | * the program executes. 105 | * @brief One of two subclasses of exception. 106 | */ 107 | class runtime_error : public exception 108 | { 109 | string _M_msg; 110 | 111 | public: 112 | /** Takes a character string describing the error. */ 113 | explicit 114 | runtime_error(const string& __arg); 115 | 116 | virtual 117 | ~runtime_error() throw(); 118 | 119 | /** Returns a C-style character string describing the general cause of 120 | * the current error (the same string passed to the ctor). */ 121 | virtual const char* 122 | what() const throw(); 123 | }; 124 | 125 | /** Thrown to indicate range errors in internal computations. */ 126 | class range_error : public runtime_error 127 | { 128 | public: 129 | explicit range_error(const string& __arg); 130 | }; 131 | 132 | /** Thrown to indicate arithmetic overflow. */ 133 | class overflow_error : public runtime_error 134 | { 135 | public: 136 | explicit overflow_error(const string& __arg); 137 | }; 138 | 139 | /** Thrown to indicate arithmetic underflow. */ 140 | class underflow_error : public runtime_error 141 | { 142 | public: 143 | explicit underflow_error(const string& __arg); 144 | }; 145 | 146 | } // namespace std 147 | 148 | #endif /* _GLIBCXX_STDEXCEPT */ 149 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/stl_raw_storage_iter.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file stl_raw_storage_iter.h 57 | * This is an internal header file, included by other library headers. 58 | * You should not attempt to use it directly. 59 | */ 60 | 61 | #ifndef _STL_RAW_STORAGE_ITERATOR_H 62 | #define _STL_RAW_STORAGE_ITERATOR_H 1 63 | 64 | namespace std { 65 | 66 | /** 67 | * This iterator class lets algorithms store their results into 68 | * uninitialized memory. 69 | */ 70 | template 71 | class raw_storage_iterator 72 | : public iterator 73 | { 74 | protected: 75 | _ForwardIterator _M_iter; 76 | 77 | public: 78 | explicit 79 | raw_storage_iterator(_ForwardIterator __x) 80 | : _M_iter(__x) {} 81 | 82 | raw_storage_iterator& 83 | operator*() { return *this; } 84 | 85 | raw_storage_iterator& 86 | operator=(const _Tp& __element) 87 | { 88 | std::_Construct(&*_M_iter, __element); 89 | return *this; 90 | } 91 | 92 | raw_storage_iterator<_ForwardIterator, _Tp>& 93 | operator++() 94 | { 95 | ++_M_iter; 96 | return *this; 97 | } 98 | 99 | raw_storage_iterator<_ForwardIterator, _Tp> 100 | operator++(int) 101 | { 102 | raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; 103 | ++_M_iter; 104 | return __tmp; 105 | } 106 | }; 107 | 108 | } // namespace std 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/stl_relops.h: -------------------------------------------------------------------------------- 1 | // std::rel_ops implementation -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * Copyright (c) 1996,1997 44 | * Silicon Graphics 45 | * 46 | * Permission to use, copy, modify, distribute and sell this software 47 | * and its documentation for any purpose is hereby granted without fee, 48 | * provided that the above copyright notice appear in all copies and 49 | * that both that copyright notice and this permission notice appear 50 | * in supporting documentation. Silicon Graphics makes no 51 | * representations about the suitability of this software for any 52 | * purpose. It is provided "as is" without express or implied warranty. 53 | * 54 | */ 55 | 56 | /** @file stl_relops.h 57 | * This is an internal header file, included by other library headers. 58 | * You should not attempt to use it directly. 59 | * 60 | * @if maint 61 | * Inclusion of this file has been removed from 62 | * all of the other STL headers for safety reasons, except std_utility.h. 63 | * For more information, see the thread of about twenty messages starting 64 | * with http://gcc.gnu.org/ml/libstdc++/2001-01/msg00223.html , or the 65 | * FAQ at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4 . 66 | * 67 | * Short summary: the rel_ops operators should be avoided for the present. 68 | * @endif 69 | */ 70 | 71 | #ifndef _STL_RELOPS_H 72 | #define _STL_RELOPS_H 1 73 | 74 | namespace std { 75 | 76 | namespace rel_ops 77 | { 78 | /** @namespace std::rel_ops 79 | * @brief The generated relational operators are sequestered here. 80 | */ 81 | 82 | /** 83 | * @brief Defines @c != for arbitrary types, in terms of @c ==. 84 | * @param x A thing. 85 | * @param y Another thing. 86 | * @return x != y 87 | * 88 | * This function uses @c == to determine its result. 89 | */ 90 | template 91 | inline bool 92 | operator!=(const _Tp& __x, const _Tp& __y) 93 | { return !(__x == __y); } 94 | 95 | /** 96 | * @brief Defines @c > for arbitrary types, in terms of @c <. 97 | * @param x A thing. 98 | * @param y Another thing. 99 | * @return x > y 100 | * 101 | * This function uses @c < to determine its result. 102 | */ 103 | template 104 | inline bool 105 | operator>(const _Tp& __x, const _Tp& __y) 106 | { return __y < __x; } 107 | 108 | /** 109 | * @brief Defines @c <= for arbitrary types, in terms of @c <. 110 | * @param x A thing. 111 | * @param y Another thing. 112 | * @return x <= y 113 | * 114 | * This function uses @c < to determine its result. 115 | */ 116 | template 117 | inline bool 118 | operator<=(const _Tp& __x, const _Tp& __y) 119 | { return !(__y < __x); } 120 | 121 | /** 122 | * @brief Defines @c >= for arbitrary types, in terms of @c <. 123 | * @param x A thing. 124 | * @param y Another thing. 125 | * @return x >= y 126 | * 127 | * This function uses @c < to determine its result. 128 | */ 129 | template 130 | inline bool 131 | operator>=(const _Tp& __x, const _Tp& __y) 132 | { return !(__x < __y); } 133 | 134 | } // namespace rel_ops 135 | 136 | } // namespace std 137 | 138 | #endif /* _STL_RELOPS_H */ 139 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/stl_tempbuf.h: -------------------------------------------------------------------------------- 1 | // Temporary buffer implementation -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /* 32 | * 33 | * Copyright (c) 1994 34 | * Hewlett-Packard Company 35 | * 36 | * Permission to use, copy, modify, distribute and sell this software 37 | * and its documentation for any purpose is hereby granted without fee, 38 | * provided that the above copyright notice appear in all copies and 39 | * that both that copyright notice and this permission notice appear 40 | * in supporting documentation. Hewlett-Packard Company makes no 41 | * representations about the suitability of this software for any 42 | * purpose. It is provided "as is" without express or implied warranty. 43 | * 44 | * 45 | * Copyright (c) 1996,1997 46 | * Silicon Graphics Computer Systems, Inc. 47 | * 48 | * Permission to use, copy, modify, distribute and sell this software 49 | * and its documentation for any purpose is hereby granted without fee, 50 | * provided that the above copyright notice appear in all copies and 51 | * that both that copyright notice and this permission notice appear 52 | * in supporting documentation. Silicon Graphics makes no 53 | * representations about the suitability of this software for any 54 | * purpose. It is provided "as is" without express or implied warranty. 55 | */ 56 | 57 | /** @file stl_tempbuf.h 58 | * This is an internal header file, included by other library headers. 59 | * You should not attempt to use it directly. 60 | */ 61 | 62 | #ifndef _TEMPBUF_H 63 | #define _TEMPBUF_H 1 64 | 65 | #include 66 | 67 | namespace std { 68 | 69 | /** 70 | * @if maint 71 | * This class is used in two places: stl_algo.h and ext/memory, 72 | * where it is wrapped as the temporary_buffer class. See 73 | * temporary_buffer docs for more notes. 74 | * @endif 75 | */ 76 | template 77 | class _Temporary_buffer 78 | { 79 | // concept requirements 80 | __glibcxx_class_requires(_ForwardIterator, _ForwardIteratorConcept) 81 | 82 | public: 83 | typedef _Tp value_type; 84 | typedef value_type* pointer; 85 | typedef pointer iterator; 86 | typedef ptrdiff_t size_type; 87 | 88 | protected: 89 | size_type _M_original_len; 90 | size_type _M_len; 91 | pointer _M_buffer; 92 | 93 | void 94 | _M_initialize_buffer(const _Tp&, __true_type) { } 95 | 96 | void 97 | _M_initialize_buffer(const _Tp& __val, __false_type) 98 | { std::uninitialized_fill_n(_M_buffer, _M_len, __val); } 99 | 100 | public: 101 | /// As per Table mumble. 102 | size_type 103 | size() const 104 | { return _M_len; } 105 | 106 | /// Returns the size requested by the constructor; may be >size(). 107 | size_type 108 | requested_size() const 109 | { return _M_original_len; } 110 | 111 | /// As per Table mumble. 112 | iterator 113 | begin() 114 | { return _M_buffer; } 115 | 116 | /// As per Table mumble. 117 | iterator 118 | end() 119 | { return _M_buffer + _M_len; } 120 | 121 | /** 122 | * Constructs a temporary buffer of a size somewhere between 123 | * zero and the size of the given range. 124 | */ 125 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); 126 | 127 | ~_Temporary_buffer() 128 | { 129 | std::_Destroy(_M_buffer, _M_buffer + _M_len); 130 | std::return_temporary_buffer(_M_buffer); 131 | } 132 | 133 | private: 134 | // Disable copy constructor and assignment operator. 135 | _Temporary_buffer(const _Temporary_buffer&); 136 | 137 | void 138 | operator=(const _Temporary_buffer&); 139 | }; 140 | 141 | 142 | template 143 | _Temporary_buffer<_ForwardIterator, _Tp>:: 144 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) 145 | : _M_original_len(std::distance(__first, __last)), 146 | _M_len(0), _M_buffer(0) 147 | { 148 | // Workaround for a __type_traits bug in the pre-7.3 compiler. 149 | typedef typename std::__is_scalar<_Tp>::__type _Trivial; 150 | 151 | try 152 | { 153 | pair __p(get_temporary_buffer< 154 | value_type>(_M_original_len)); 155 | _M_buffer = __p.first; 156 | _M_len = __p.second; 157 | if (_M_len > 0) 158 | _M_initialize_buffer(*__first, _Trivial()); 159 | } 160 | catch(...) 161 | { 162 | std::return_temporary_buffer(_M_buffer); 163 | _M_buffer = 0; 164 | _M_len = 0; 165 | __throw_exception_again; 166 | } 167 | } 168 | 169 | } // namespace std 170 | 171 | #endif /* _TEMPBUF_H */ 172 | 173 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/streambuf.tcc: -------------------------------------------------------------------------------- 1 | // Stream buffer classes -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | /** @file streambuf.tcc 32 | * This is an internal header file, included by other library headers. 33 | * You should not attempt to use it directly. 34 | */ 35 | 36 | // 37 | // ISO C++ 14882: 27.5 Stream buffers 38 | // 39 | 40 | #ifndef _STREAMBUF_TCC 41 | #define _STREAMBUF_TCC 1 42 | 43 | #pragma GCC system_header 44 | 45 | namespace std { 46 | 47 | template 48 | streamsize 49 | basic_streambuf<_CharT, _Traits>:: 50 | xsgetn(char_type* __s, streamsize __n) 51 | { 52 | streamsize __ret = 0; 53 | while (__ret < __n) 54 | { 55 | const streamsize __buf_len = this->egptr() - this->gptr(); 56 | if (__buf_len) 57 | { 58 | const streamsize __remaining = __n - __ret; 59 | const streamsize __len = std::min(__buf_len, __remaining); 60 | traits_type::copy(__s, this->gptr(), __len); 61 | __ret += __len; 62 | __s += __len; 63 | this->gbump(__len); 64 | } 65 | 66 | if (__ret < __n) 67 | { 68 | const int_type __c = this->uflow(); 69 | if (!traits_type::eq_int_type(__c, traits_type::eof())) 70 | { 71 | traits_type::assign(*__s++, traits_type::to_char_type(__c)); 72 | ++__ret; 73 | } 74 | else 75 | break; 76 | } 77 | } 78 | return __ret; 79 | } 80 | 81 | template 82 | streamsize 83 | basic_streambuf<_CharT, _Traits>:: 84 | xsputn(const char_type* __s, streamsize __n) 85 | { 86 | streamsize __ret = 0; 87 | while (__ret < __n) 88 | { 89 | const streamsize __buf_len = this->epptr() - this->pptr(); 90 | if (__buf_len) 91 | { 92 | const streamsize __remaining = __n - __ret; 93 | const streamsize __len = std::min(__buf_len, __remaining); 94 | traits_type::copy(this->pptr(), __s, __len); 95 | __ret += __len; 96 | __s += __len; 97 | this->pbump(__len); 98 | } 99 | 100 | if (__ret < __n) 101 | { 102 | int_type __c = this->overflow(traits_type::to_int_type(*__s)); 103 | if (!traits_type::eq_int_type(__c, traits_type::eof())) 104 | { 105 | ++__ret; 106 | ++__s; 107 | } 108 | else 109 | break; 110 | } 111 | } 112 | return __ret; 113 | } 114 | 115 | // Conceivably, this could be used to implement buffer-to-buffer 116 | // copies, if this was ever desired in an un-ambiguous way by the 117 | // standard. 118 | template 119 | streamsize 120 | __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, 121 | basic_streambuf<_CharT, _Traits>* __sbout, 122 | bool& __ineof) 123 | { 124 | streamsize __ret = 0; 125 | __ineof = true; 126 | typename _Traits::int_type __c = __sbin->sgetc(); 127 | while (!_Traits::eq_int_type(__c, _Traits::eof())) 128 | { 129 | __c = __sbout->sputc(_Traits::to_char_type(__c)); 130 | if (_Traits::eq_int_type(__c, _Traits::eof())) 131 | { 132 | __ineof = false; 133 | break; 134 | } 135 | ++__ret; 136 | __c = __sbin->snextc(); 137 | } 138 | return __ret; 139 | } 140 | 141 | template 142 | inline streamsize 143 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, 144 | basic_streambuf<_CharT, _Traits>* __sbout) 145 | { 146 | bool __ineof; 147 | return __copy_streambufs_eof(__sbin, __sbout, __ineof); 148 | } 149 | 150 | // Inhibit implicit instantiations for required instantiations, 151 | // which are defined via explicit instantiations elsewhere. 152 | // NB: This syntax is a GNU extension. 153 | #if _GLIBCXX_EXTERN_TEMPLATE 154 | extern template class basic_streambuf; 155 | extern template 156 | streamsize 157 | __copy_streambufs(basic_streambuf*, 158 | basic_streambuf*); 159 | extern template 160 | streamsize 161 | __copy_streambufs_eof(basic_streambuf*, 162 | basic_streambuf*, bool&); 163 | 164 | #ifdef _GLIBCXX_USE_WCHAR_T 165 | extern template class basic_streambuf; 166 | extern template 167 | streamsize 168 | __copy_streambufs(basic_streambuf*, 169 | basic_streambuf*); 170 | extern template 171 | streamsize 172 | __copy_streambufs_eof(basic_streambuf*, 173 | basic_streambuf*, bool&); 174 | #endif 175 | #endif 176 | 177 | } // namespace std 178 | 179 | #endif 180 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/string: -------------------------------------------------------------------------------- 1 | // Components for manipulating sequences of characters -*- C++ -*- 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 4 | // 2006, 2007 5 | // Free Software Foundation, Inc. 6 | // 7 | // This file is part of the GNU ISO C++ Library. This library is free 8 | // software; you can redistribute it and/or modify it under the 9 | // terms of the GNU General Public License as published by the 10 | // Free Software Foundation; either version 2, or (at your option) 11 | // any later version. 12 | 13 | // This library is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | 18 | // You should have received a copy of the GNU General Public License along 19 | // with this library; see the file COPYING. If not, write to the Free 20 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 21 | // USA. 22 | 23 | // As a special exception, you may use this file as part of a free software 24 | // library without restriction. Specifically, if other files instantiate 25 | // templates or use macros or inline functions from this file, or you compile 26 | // this file and link it with other files to produce an executable, this 27 | // file does not by itself cause the resulting executable to be covered by 28 | // the GNU General Public License. This exception does not however 29 | // invalidate any other reasons why the executable file might be covered by 30 | // the GNU General Public License. 31 | 32 | /** @file include/string 33 | * This is a Standard C++ Library header. 34 | */ 35 | 36 | // 37 | // ISO C++ 14882: 21 Strings library 38 | // 39 | 40 | #ifndef _GLIBCXX_STRING 41 | #define _GLIBCXX_STRING 1 42 | 43 | #pragma GCC system_header 44 | 45 | #include 46 | #include 47 | #include 48 | #include // For allocator. 49 | #include 50 | #include // For operators >>, <<, and getline decls. 51 | #include 52 | #include 53 | #include // For less 54 | #include 55 | 56 | #ifndef _GLIBCXX_EXPORT_TEMPLATE 57 | # include // for find_if 58 | # include 59 | #endif 60 | 61 | #endif /* _GLIBCXX_STRING */ 62 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/stringfwd.h: -------------------------------------------------------------------------------- 1 | // String support -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /** @file stringfwd.h 31 | * This is an internal header file, included by other library headers. 32 | * You should not attempt to use it directly. 33 | */ 34 | 35 | // 36 | // ISO C++ 14882: 21 Strings library 37 | // 38 | 39 | #ifndef _STRINGFWD_H 40 | #define _STRINGFWD_H 1 41 | 42 | #pragma GCC system_header 43 | 44 | #include 45 | 46 | namespace std { 47 | 48 | template 49 | class allocator; 50 | 51 | template 52 | struct char_traits; 53 | 54 | template, 55 | typename _Alloc = allocator<_CharT> > 56 | class basic_string; 57 | 58 | template<> struct char_traits; 59 | 60 | typedef basic_string string; 61 | 62 | #ifdef _GLIBCXX_USE_WCHAR_T 63 | template<> struct char_traits; 64 | 65 | typedef basic_string wstring; 66 | #endif 67 | 68 | } // namespace std 69 | 70 | #endif // _STRINGFWD_H 71 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/utility: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996,1997 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/utility 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_UTILITY 61 | #define _GLIBCXX_UTILITY 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | 69 | #endif /* _GLIBCXX_UTILITY */ 70 | -------------------------------------------------------------------------------- /.vim/tags/cpp_src/vector: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | /* 31 | * 32 | * Copyright (c) 1994 33 | * Hewlett-Packard Company 34 | * 35 | * Permission to use, copy, modify, distribute and sell this software 36 | * and its documentation for any purpose is hereby granted without fee, 37 | * provided that the above copyright notice appear in all copies and 38 | * that both that copyright notice and this permission notice appear 39 | * in supporting documentation. Hewlett-Packard Company makes no 40 | * representations about the suitability of this software for any 41 | * purpose. It is provided "as is" without express or implied warranty. 42 | * 43 | * 44 | * Copyright (c) 1996 45 | * Silicon Graphics Computer Systems, Inc. 46 | * 47 | * Permission to use, copy, modify, distribute and sell this software 48 | * and its documentation for any purpose is hereby granted without fee, 49 | * provided that the above copyright notice appear in all copies and 50 | * that both that copyright notice and this permission notice appear 51 | * in supporting documentation. Silicon Graphics makes no 52 | * representations about the suitability of this software for any 53 | * purpose. It is provided "as is" without express or implied warranty. 54 | */ 55 | 56 | /** @file include/vector 57 | * This is a Standard C++ Library header. 58 | */ 59 | 60 | #ifndef _GLIBCXX_VECTOR 61 | #define _GLIBCXX_VECTOR 1 62 | 63 | #pragma GCC system_header 64 | 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | 73 | #ifndef _GLIBCXX_EXPORT_TEMPLATE 74 | # include 75 | #endif 76 | 77 | #ifdef _GLIBCXX_DEBUG 78 | # include 79 | #endif 80 | 81 | #endif /* _GLIBCXX_VECTOR */ 82 | 83 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | set tags+=~/.vim/tags/cpp_src/tags " 设置tags搜索路径 2 | set wildmode=longest,list " Ex命令自动补全采用bash方式" 3 | syntax on 4 | filetype plugin indent on 5 | 6 | map :NERDTree 7 | 8 | " pathongen 9 | execute pathogen#infect() 10 | 11 | " taglist 12 | let Tlist_Show_One_File=1 13 | let Tlist_Exit_OnlyWindow=1 14 | let Tlist_Use_Right_Window=1 15 | let Tlist_Sort_Type="name" 16 | 17 | " omnicppcomplete 18 | set completeopt=longest,menu 19 | let OmniCpp_NamespaceSearch = 2 " search namespaces in the current buffer and in included files 20 | let OmniCpp_ShowPrototypeInAbbr = 1 " 显示函数参数列表 21 | let OmniCpp_MayCompleteScope = 1 " 输入 :: 后自动补全 22 | let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]"]" 23 | -------------------------------------------------------------------------------- /auto_tags/auto_tags.conf: -------------------------------------------------------------------------------- 1 | CTAGS=/usr/bin/ctags 2 | 3 | # 生成tags文件存放的目录 4 | tags_dir=../ 5 | 6 | # 源代码所在目录 7 | source_root=../ 8 | 9 | # 需要创建tags的目录名,注意只有目录名字,不是路径 10 | source_dirs="common include message nodes tests/sys_test/src metadata/node_metadata/src" 11 | 12 | # 日志相关 13 | max_log_size=10 # Unit: Mb 14 | log_file="auto_tags.log" 15 | 16 | -------------------------------------------------------------------------------- /auto_tags/auto_tags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | work_root=`dirname $(readlink -f $0)` 4 | 5 | function log 6 | { 7 | echo [`date +"%Y-%m-%d %H:%M:%S"`] $* >> $work_root/$log_file 8 | } 9 | 10 | conf_last_update_time=0 11 | 12 | while [ 1 -gt 0 ] 13 | do 14 | generate_tags=0 15 | # 如果配置文件有更新,则重新载入 16 | conf_cur_update_time=`date +%s -r ./auto_tags.conf` 17 | if [ $conf_cur_update_time -gt $conf_last_update_time ];then 18 | log "conf updated!" 19 | source ./auto_tags.conf 20 | generate_tags=1 21 | fi 22 | conf_last_update_time=$conf_cur_update_time 23 | 24 | cd $source_root || break 25 | 26 | if [ ! -f ./tags ];then 27 | generate_tags=1 28 | else 29 | latest_update_file_info=`find $source_dirs -name "*.cpp" -o -name "*.h" | 30 | xargs -I{} stat {} | grep -E "File|Modify" | 31 | awk '{if(NR%2==1){printf("%s ",$2)} else printf("%s-%s\n", $2, $3)}' | 32 | sort -k2r | head -1` 33 | 34 | if [ -z "$latest_update_file_info" ];then 35 | log "Something is wrong. maybe directories are empty!" 36 | break; 37 | fi 38 | latest_update_time=`echo "$latest_update_file_info" | awk '{print $2}'` 39 | tags_time=`stat ./tags | grep "Modify" | awk '{printf("%s-%s\n", $2, $3)}'` 40 | log "latest_update_file_info: $latest_update_file_info" 41 | log "tags_time: $tags_time" 42 | if [[ "$latest_update_time" > "$tags_time" ]];then 43 | generate_tags=1 44 | else 45 | log "tags is newer than source files!" 46 | fi 47 | fi 48 | if [ $generate_tags -eq 1 ];then 49 | log "execute: /usr/bin/ctags -o tags.new -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ $source_dirs" 50 | $CTAGS -o tags.new -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ $source_dirs 51 | if [ $? -ne 0 ];then 52 | log "generate tags.new failed!" 53 | break 54 | else 55 | log "mv tags.new to tags!" 56 | mv tags.new tags 57 | fi 58 | fi 59 | sleep 10 60 | log_size=`wc -c $work_root/$log_file | awk '{print $1}'` 61 | if [ $log_size -gt $(($max_log_size*1024*1024)) ];then 62 | mv $work_root/$log_file $work_root/$log_file.bak 63 | fi 64 | 65 | cd - || break 66 | done 67 | -------------------------------------------------------------------------------- /auto_tags/run_tags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | work_root=`dirname $(readlink -f $0)` 3 | auto_tags_script=$work_root/auto_tags.sh 4 | if [ $# -ne 1 ];then 5 | echo "usage:$0 [start/stop]" 6 | exit 1 7 | fi 8 | if [ $1 = "start" ];then 9 | nohup sh $auto_tags_script >/dev/null 2>&1 & 10 | elif [ $1 = "stop" ];then 11 | ps axu | grep $auto_tags_script | grep -v grep | awk '{print $2}' | xargs -I{} -t kill "{}" 12 | fi 13 | -------------------------------------------------------------------------------- /diffdir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ $# -ne 2 ];then 3 | echo "Usage:$0 dir1 dir2" 4 | exit 1 5 | fi 6 | if [ ! -d $1 -o ! -d $2 ];then 7 | echo "$1 or $2 is not derectory!" 8 | exit 1 9 | fi 10 | 11 | ## 注意,Mac的readlink程序和GNU readlink功能不同,Mac需要下载greadlink 12 | arg1=`greadlink -f $1` 13 | arg2=`greadlink -f $2` 14 | 15 | tmp_dir=/tmp/tmp.$$ 16 | rm -rf $tmp_dir 17 | mkdir -p $tmp_dir || exit 0 18 | #echo $tmp_dir 19 | 20 | trap "rm -rf $tmp_dir; exit 0" SIGINT SIGTERM 21 | 22 | ## 注意,Mac和Linux的MD5程序不同,请根据需求使用,这里是Mac版的用法 23 | function get_file_md5 24 | { 25 | if [ $# -ne 1 ];then 26 | echo "get_file_md5 arg num error!" 27 | return 1 28 | fi 29 | local file=$1 30 | md5 $file | awk -F"=" '{print $2}' 31 | } 32 | 33 | function myexit 34 | { 35 | rm -rf $tmp_dir 36 | exit 0 37 | } 38 | 39 | function show_diff 40 | { 41 | if [ $# -ne 1 ];then 42 | return 1 43 | fi 44 | local diff_file=$1 45 | echo "diff file:" 46 | printf " %-55s %-52s\n" $arg1 $arg2 47 | if [ -f $tmp_dir/A_ony_file ];then 48 | awk '{printf(" [%2d] %-50s\n", NR, $1)}' $tmp_dir/A_ony_file 49 | python -c 'print "-"*100' 50 | fi 51 | awk '{printf(" [%2d] %-50s %-50s\n", NR, $1, $1)}' $diff_file 52 | echo "(s):show diff files (a):open all diff files (q):exit" 53 | echo 54 | } 55 | 56 | function check_value 57 | { 58 | local diff_file=$1 59 | local value=$2 60 | tmp_file=$tmp_dir/tmp_file 61 | >$tmp_file 62 | for numbers in `echo "$value" | tr ',' ' '` 63 | do 64 | nf=`echo "$numbers" | awk -F"-" '{print NF}'` 65 | if [ $nf -ne 1 -a $nf -ne 2 ];then 66 | return 1 67 | fi 68 | begin=`echo "$numbers" | awk -F"-" '{print $1}'` 69 | end=`echo "$numbers" | awk -F"-" '{print $2}'` 70 | if [ -z "$end" ];then 71 | sed -n $begin'p' $diff_file >> $tmp_file 72 | else 73 | if [ "$end" -lt $begin ];then 74 | return 1 75 | fi 76 | sed -n $begin','$end'p' $diff_file >> $tmp_file 77 | fi 78 | if [ $? -ne 0 ];then 79 | return 1 80 | fi 81 | done 82 | awk -v dir1=$arg1 -v dir2=$arg2 '{ 83 | if (NR==1) 84 | { 85 | printf("edit %s/%s\nvertical diffsplit %s/%s\n", dir1, $0, dir2, $0) 86 | } 87 | else 88 | { 89 | printf("tabnew %s/%s\nvertical diffsplit %s/%s\n", dir1, $0, dir2, $0) 90 | } 91 | }' $tmp_file 92 | } 93 | 94 | ############################################################# 95 | # 获取diff info 96 | ############################################################# 97 | for file in `find $arg1 | grep -v "/\." | grep -v "^\."` 98 | do 99 | file_relative_name=${file#$arg1/} 100 | file $file | grep -Eq "text" 101 | if [ $? -ne 0 ];then 102 | continue 103 | fi 104 | if [ -f $arg2/$file_relative_name ];then 105 | file $arg2/$file_relative_name | grep -Eq "text" 106 | if [ $? -ne 0 ];then 107 | continue 108 | fi 109 | md5_1=`get_file_md5 $file` 110 | md5_2=`get_file_md5 $arg2/$file_relative_name` 111 | if [[ "$md5_1" = "$md5_2" ]];then 112 | continue 113 | fi 114 | ## file not same 115 | echo "$file_relative_name" >> $tmp_dir/diff_file 116 | else 117 | echo "$file_relative_name" >> $tmp_dir/A_ony_file 118 | fi 119 | done 120 | 121 | ############################################################# 122 | # 根据输入标签打开用vim打开文件比较diff 123 | ############################################################# 124 | if [ ! -f $tmp_dir/diff_file ];then 125 | exit 126 | fi 127 | 128 | show_diff $tmp_dir/diff_file 129 | while true 130 | do 131 | echo -n "Please choose file number list (like this:1,3-4,5):" 132 | read value 133 | if [[ "$value" = "s" ]] || [[ "$value" = "S" ]];then 134 | show_diff $tmp_dir/diff_file 135 | continue 136 | elif [[ "$value" = "q" ]] || [[ "$value" = "Q" ]];then 137 | myexit 138 | elif [[ "$value" = "a" ]] || [ "$value" = "A" ];then 139 | value="1-$" 140 | fi 141 | vim_script=`check_value $tmp_dir/diff_file "$value" 2>/dev/null` 142 | if [ $? -ne 0 ];then 143 | echo "invalid parameter[$value]!" 144 | else 145 | vim -c "$vim_script" 146 | fi 147 | done 148 | --------------------------------------------------------------------------------