├── .github
└── workflows
│ └── docs.yml
├── .gitignore
├── .gitmodules
├── LICENSE-APACHE
├── LICENSE-MIT
├── Makefile
├── README.md
├── docs
├── config.toml
├── content
│ ├── _index.md
│ ├── changelog.md
│ ├── faq.md
│ ├── privacy.md
│ └── testimonial.md
├── sass
│ └── index.scss
├── static
│ ├── banner.png
│ ├── chrome.svg
│ ├── commands.png
│ ├── cpp-search-extension.gif
│ ├── edge.svg
│ ├── firefox.svg
│ ├── logo.png
│ └── offline-mode.gif
└── templates
│ ├── _variables.html
│ └── index.html
├── extension
├── command
│ ├── header.js
│ ├── help.js
│ └── posix.js
├── index
│ ├── headers.js
│ ├── posix.js
│ └── std.js
├── logo.png
├── main.js
├── popup
│ ├── index.css
│ ├── index.html
│ └── index.js
├── search
│ └── std.js
├── service-worker.js
└── settings.js
├── manifest.jsonnet
├── tools
├── Cargo.toml
├── headers.js
├── posix
│ ├── Cargo.toml
│ └── src
│ │ └── main.rs
└── std
│ ├── Cargo.toml
│ ├── search-c
│ ├── search-cpp
│ └── src
│ └── main.rs
└── vercel.json
/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | name: docs
2 |
3 | on:
4 | workflow_dispatch:
5 | repository_dispatch:
6 | types: deploy-docs
7 |
8 | jobs:
9 | build:
10 | name: Deploy to now branch
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 | with:
15 | ref: 'master'
16 | submodules: 'recursive'
17 | - run: |
18 | git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
19 | - name: Deloy docs
20 | run: |
21 | source ./core/deploy-docs.sh && build && deploy
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .DS_Store
3 | *.crx
4 | *.pem
5 | web-ext-artifacts
6 | node_modules
7 | target
8 | docs/public
9 | *.db
10 | manifest.json
11 | extension/core
12 |
13 | tools/target
14 | tools/Cargo.lock
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "core"]
2 | path = core
3 | url = git@github.com:huhu/search-extension-core.git
4 | [submodule "docs/themes/juice"]
5 | path = docs/themes/juice
6 | url = https://github.com/huhu/juice
7 |
--------------------------------------------------------------------------------
/LICENSE-APACHE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2020 C/C++ Search Extension teams
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/LICENSE-MIT:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 C/C++ Search Extension
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | include core/extension.mk
2 |
3 | .PHONY: chrome
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # C/C++ Search Extension
2 |
3 |
4 |
5 | ### The ultimate search extension for C/C++.
6 |
7 | 
8 | 
9 | 
10 | [](https://github.com/huhu/rust-search-extension/blob/master/LICENSE-MIT)
11 | [](https://github.com/huhu/cpp-search-extension/blob/master/LICENSE)
12 | [](https://discord.gg/xucZNVd)
13 |
14 | [https://cpp.extension.sh/](https://cpp.extension.sh/)
15 |
16 | ## Installation
17 |
18 | - [Chrome Web Store](https://chrome.google.com/webstore/detail/cc++-search-extension/ifpcmhciihicaljnhgobnhoehoabidhd)
19 |
20 | - [Firefox](https://addons.mozilla.org/en-US/firefox/addon/c-c-search-extension/)
21 |
22 | - [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/ffajabficigcddnckikojejmkammkmpe)
23 |
24 |
25 | ## Features
26 |
27 | - Search standard library docs
28 | - Offline mode supported
29 | - Builtin commands (`:header`, `:posix` and `:history` etc)
30 |
31 | ## How to use it
32 |
33 | Input keyword **cc** in the address bar, press `Space` to activate the search bar. Then enter any word
34 | you want to search, the extension will response the related search results instantly.
35 |
36 | ## Contribution
37 |
38 | [jsonnet](https://jsonnet.org/) is required before getting started. To install `jsonnet`, please check `jsonnet`'s [README](https://github.com/google/jsonnet#packages). For Linux users, the `snap` is a good choice to [install jsonnet](https://snapcraft.io/install/jsonnet/ubuntu).
39 |
40 | ```bash
41 | $ git clone --recursive https://github.com/huhu/cpp-search-extension
42 | Cloning into 'cpp-search-extension'...
43 |
44 | $ cd cpp-search-extension
45 |
46 | $ make chrome # For Chrome version
47 |
48 | $ make firefox # For Firefox version
49 |
50 | $ make edge # For Edge version
51 | ```
52 |
53 | ## Get involved
54 |
55 | - You can contact us on Discord Channel: https://discord.gg/xucZNVd
56 |
--------------------------------------------------------------------------------
/docs/config.toml:
--------------------------------------------------------------------------------
1 | # The URL the site will be built for
2 | base_url = "/"
3 |
4 | # Whether to automatically compile all Sass files in the sass directory
5 | compile_sass = true
6 |
7 | # Whether to do syntax highlighting
8 | highlight_theme = "inspired-github"
9 | # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
10 | highlight_code = true
11 |
12 | # Whether to build a search index to be used later on by a JavaScript library
13 | build_search_index = false
14 | theme = "juice"
15 |
16 | [extra]
17 | # Put all your custom variables here
18 | juice_logo_name = "C/C++ Search Extension"
19 | juice_logo_path = "logo.png"
20 | juice_extra_menu = [
21 | { title = "Github", link = "https://github.com/huhu/cpp-search-extension"}
22 | ]
23 | repository_url = "https://github.com/huhu/cpp-search-extension"
24 | meta_title = "C/C++ Search Extension: The ultimate search extension for C/C++"
25 | meta_description = "Input keyword cc then press Space in the address bar to get started. Just that easy!"
--------------------------------------------------------------------------------
/docs/content/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "C/C++ Search Extension"
3 | sort_by = "weight"
4 | +++
5 |
6 | # Search std docs
7 |
8 | We built an offline search index for C/C++ std library based on [cppreference.com](https://en.cppreference.com/w/).
9 | Input any keyword in the address bar, you'll get the result instantly. It's blaze-fast!
10 |
11 | 
12 |
13 | # Offline mode
14 |
15 | You can download the offline archive from [Cppreference archiven page](https://en.cppreference.com/w/Cppreference:Archives).
16 | To enable the offline mode, you should check the checkbox and input the offline docs path on the popup page.
17 | However, please check the [Caveats](/faq/#caveats) if you are a Firefox user.
18 |
19 | 
20 |
21 | # Command systems
22 |
23 | The command system brings a handy set of useful and convenient commands to you. Each command starts with a **:** (colon), followed by the name, and function differently in individual. Those commands including but not limited to:
24 |
25 | - `:help` - Show the help messages.
26 | - `:header` - Show all C++ header libraries.
27 | - `:posix` - Show all POSIX [system interfaces](https://pubs.opengroup.org/onlinepubs/9799919799/functions/contents.html).
28 | - `:history` - Show your local search history
29 |
30 | 
31 |
32 | # Miscellaneous
33 |
34 | ## Multi-locale language search
35 |
36 | You can configure you prefer locale language for cppreference docs search in the popup page.
37 |
38 | ## Page down/up easily
39 |
40 | You can press `space` after the keyword, then increase or decrease the number of **-** (hyphen) to page down or page up.
41 |
--------------------------------------------------------------------------------
/docs/content/changelog.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Changelog"
3 | description = "Changelog"
4 | weight = 3
5 | +++
6 |
7 |
8 | # v0.4 - 2023-07-29
9 |
10 | - Update to last cppreference.com docs
11 | - Add options page to configure offline docs path
12 | - Migrate to latest jsonnet
13 | - Add index generating tools
14 |
15 | # v0.3 - 2022-06-02
16 |
17 | - Migrate from `localStorage` to `chrome.storage` API. The new `storage` permission is required.
18 | - Remove the `tabs` permission requirement.
19 | - Remove offline doc path validation. Fixes {{ issue(id=8) }}.
20 |
21 | # v0.2 - 2021-01-31
22 |
23 | - Support multi-locale language cppreference docs search
24 | - New command:
25 | - `:posix` - Show all POSIX [system interfaces](https://pubs.opengroup.org/onlinepubs/9799919799/functions/contents.html)
26 | - Improve user experience of offline doc path configuration, thanks to the PR ([#3](https://github.com/huhu/cpp-search-extension/pull/3)) from [@knewbie](https://github.com/knewbie).
27 |
28 | # v0.1 - 2020-09-30
29 |
30 | First release version! 🎉🥳🥳
31 |
32 | - Search C/C++ standard library docs
33 | - Offline mode supported
34 | - Command systems:
35 | - `:help` command to show all help messages
36 | - `:header` command to show all C++ header libraries
37 | - `:history` command to show your local search history
38 |
39 |
40 |
--------------------------------------------------------------------------------
/docs/content/faq.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "FAQ"
3 | description = "Frequently asked questions"
4 | weight = 2
5 | +++
6 |
7 | # Platform
8 |
9 | ### Any plans to support Safari?
10 |
11 | Unfortunately, no. According to MDN's web extension [compatibility chart](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs#omnibox):
12 | Safari doesn't support omnibox API, which is essential to this extension.
13 |
14 | # Caveats
15 |
16 | ### Why local `file:` doc not work properly on Firefox?
17 |
18 | For security reasons, in Firefox, `file:` URLs is an unprivileged URL, accessing to those unprivileged URLs are prohibited.
19 | See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create) for more detail.
20 |
21 | ### Any workaround to support offline mode on Firefox?
22 |
23 | Sure. A good choice is use http server! For example using python **http.server** module:
24 |
25 | ```sh
26 | $ cd ~/Downloads/html-book-20200913/reference
27 | $ python -m http.server
28 | Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
29 | ```
30 |
31 | Then set `http://0.0.0.0:8000/en` as your local doc path.
32 |
--------------------------------------------------------------------------------
/docs/content/privacy.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Privacy"
3 | description = "Privacy Policy"
4 | weight = 3
5 | +++
6 |
7 |
8 | -- Last updated: 2020-04-20
9 |
10 | [Huhu.io](https://huhu.io), ("we",or "us") operates the **C/C++ Search Extension** (including Chrome, Firefox and Microsoft Edge versions) and the website [https://cpp.extension.sh](/) (collectively, the “Service” or “Products”).
11 | We believe that your privacy is a fundamental right. This page informs you of our policies and practices regarding the collection, use and disclosure of information which personally identifies you ("Personal Information") when you use our Service.
12 |
13 | # Information collection
14 |
15 | No information do we collect, including and not limited to:
16 |
17 | - Your search history
18 | - Your search preferences
19 |
20 | # Updates to this Privacy Policy
21 |
22 | We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. Your continued use of the Service after we post any modifications to the Privacy Policy on this page will constitute your acknowledgment of the modifications and your consent to abide and be bound by the modified Privacy Policy.
23 |
24 | The "Last updated" legend at the top of this Privacy Policy indicates when this Privacy Policy was last revised. Any changes are effective when we post the revised Privacy Policy on the Services.
25 |
26 | # Contact us
27 |
28 | If You have any questions about this Privacy Policy, please contact us at [legal@huhu.io](mailto:legal@huhu.io).
--------------------------------------------------------------------------------
/docs/content/testimonial.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Testimonial"
3 | description = "Testimonials"
4 | weight = 1
5 | +++
6 |
7 | ### From *Khalil Estell*
8 |
9 | > Use this extension literally everyday and it makes looking up details in C++ so much faster. This is a great too for C++ power users.
10 |
11 | ### From *Luna Lucadou*
12 |
13 | > This extension is perfect! Chrome never seems to suggest cpp docs from my history (probably because of std:: being mistaken for a protocol, and "thread", "string", etc. being too generic), so this saves those extra clicks to get to them.
14 |
15 | ### From *u/anon_502*
16 |
17 | > Awesome! Perhaps I can finally remove Zeal from my laptop.
18 |
19 | ### From *u/witcher_rat*
20 |
21 | > I wanted to thank you - I've been using it on Firefox ever since
22 | > you posted about the first release. I use it almost every day, so thank you!
23 |
24 | ### From *u/Adequat91*
25 |
26 | > Thanks for your time!... it will save time for many of us :)
27 |
28 | ### From *Darius-Florentin Neațu*
29 |
30 | > Awesome! You can directly open a page for a feature/entity from docs.
31 |
32 |
--------------------------------------------------------------------------------
/docs/sass/index.scss:
--------------------------------------------------------------------------------
1 | .content img {
2 | width: 75%;
3 | height: auto;
4 | }
5 |
6 | .demonstration-gif {
7 | max-width: 55%;
8 | padding: 20px;
9 | }
10 |
11 | .btn-download {
12 | font-family: "Fira Sans", sans-serif;
13 | color: black;
14 | background-color: #FDFDFD;
15 | border-radius: 12px;
16 | margin: 15px;
17 | padding: 10px 0 10px 20px;
18 | font-size: 20px;
19 | text-align: center;
20 | background-repeat: no-repeat;
21 | background-size: 24px 24px;
22 | background-position: 20px;
23 | width: 240px;
24 | }
25 |
26 | .chrome {
27 | background-image: url("chrome.svg");
28 | }
29 |
30 | .firefox {
31 | background-image: url("firefox.svg");
32 | }
33 |
34 | .edg {
35 | background-image: url("edge.svg");
36 | }
37 |
38 | .hide {
39 | display: none;
40 | }
41 |
42 | .sidebar {
43 | width: 215px;
44 | }
45 |
46 | @media screen and (max-width: 768px) {
47 | .logo {
48 | font-size: 16px;
49 | margin: 10px;
50 |
51 | img {
52 | width: 25px;
53 | margin: 0 10px 0 0;
54 | }
55 | }
56 |
57 | main {
58 | padding: 30px;
59 | display: flex;
60 | flex-direction: column;
61 | }
62 |
63 | .sidebar {
64 | width: 215px;
65 | margin: 2rem auto 0;
66 | }
67 |
68 | .explore-more, .demonstration-gif {
69 | display: none;
70 | }
71 |
72 | .content img {
73 | width: 100%;
74 | height: auto;
75 | }
76 | }
--------------------------------------------------------------------------------
/docs/static/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huhu/cpp-search-extension/565821eec89cc4dcf519ce9052b18dcb2c433ef2/docs/static/banner.png
--------------------------------------------------------------------------------
/docs/static/chrome.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/static/commands.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huhu/cpp-search-extension/565821eec89cc4dcf519ce9052b18dcb2c433ef2/docs/static/commands.png
--------------------------------------------------------------------------------
/docs/static/cpp-search-extension.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huhu/cpp-search-extension/565821eec89cc4dcf519ce9052b18dcb2c433ef2/docs/static/cpp-search-extension.gif
--------------------------------------------------------------------------------
/docs/static/edge.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/static/firefox.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huhu/cpp-search-extension/565821eec89cc4dcf519ce9052b18dcb2c433ef2/docs/static/logo.png
--------------------------------------------------------------------------------
/docs/static/offline-mode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huhu/cpp-search-extension/565821eec89cc4dcf519ce9052b18dcb2c433ef2/docs/static/offline-mode.gif
--------------------------------------------------------------------------------
/docs/templates/_variables.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends "juice/templates/index.html" %}
2 | {% block head %}
3 |
5 |
7 |
9 |
10 |
11 |
12 |
13 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
26 |
27 |
28 |
29 | {% endblock head %}
30 | {% block hero %}
31 |
32 |
33 | The ultimate search extension for C/C++
34 |
35 |
36 | Input keyword cc then press
37 | Space
in the address bar
38 | to get started. Just that easy!
39 |
40 |
60 |
61 |
62 |
64 | Explore More ⇩
65 |
66 |
84 | {% endblock %}
85 |
86 | {% block sidebar %}
87 |
90 | {% endblock %}
91 |
92 | {% block footer %}
93 |
95 |
100 | {% endblock footer %}
--------------------------------------------------------------------------------
/extension/command/header.js:
--------------------------------------------------------------------------------
1 | class HeaderCommand extends Command {
2 | constructor(index) {
3 | super("header", "Show all C++ Standard Library headers.");
4 | this.headers = index;
5 | }
6 |
7 | async onExecute(arg) {
8 | let results = this.headers;
9 | if (arg) {
10 | results = [];
11 | for (let header of this.headers) {
12 | let index = header.name.toLowerCase().indexOf(arg);
13 | if (index > -1) {
14 | header["matchIndex"] = index;
15 | results.push(header);
16 | }
17 | }
18 |
19 | results = results.sort((a, b) => {
20 | if (a.matchIndex === b.matchIndex) {
21 | return a.name.length - b.name.length;
22 | }
23 | return a.matchIndex - b.matchIndex;
24 | });
25 | }
26 |
27 | let isOfflineMode = await settings.isOfflineMode;
28 | let offlineDocPath = await settings.offlineDocPath;
29 | return results.map(header => {
30 | return {
31 | content: isOfflineMode ? `${offlineDocPath}${header.path}.html` : `https://en.cppreference.com/w/${header.path}`,
32 | description: `${c.match(c.escape(header.name))} - ${c.dim(c.escape(header.description))}`
33 | }
34 | });
35 | }
36 | }
--------------------------------------------------------------------------------
/extension/command/help.js:
--------------------------------------------------------------------------------
1 | class HelpCommand extends Command {
2 | constructor() {
3 | super("help", "Show the help messages.")
4 | }
5 |
6 | onExecute() {
7 | const value = ([
8 | `Prefix ${c.match(":")} to execute command (:header, :history, etc)`,
9 | ]);
10 | return value.map((description, index) => {
11 | return {content: `${index + 1}`, description};
12 | });
13 | }
14 | }
--------------------------------------------------------------------------------
/extension/command/posix.js:
--------------------------------------------------------------------------------
1 | class PosixCommand extends Command {
2 | constructor(index) {
3 | super("posix", "Show all POSIX system interfaces.");
4 | this.items = Object.entries(index).map(([name, description]) => {
5 | return {name, description};
6 | });
7 | }
8 |
9 | onExecute(arg) {
10 | let results = this.items.sort((a, b) => a.name.localeCompare(b.name));
11 | if (arg) {
12 | results = [];
13 | for (let item of this.items) {
14 | let index = item.name.toLowerCase().indexOf(arg);
15 | if (index > -1) {
16 | item["matchIndex"] = index;
17 | results.push(item);
18 | }
19 | }
20 |
21 | results = results.sort((a, b) => {
22 | if (a.matchIndex === b.matchIndex) {
23 | return a.name.length - b.name.length;
24 | }
25 | return a.matchIndex - b.matchIndex;
26 | });
27 | }
28 | return results.map(item => {
29 | return {
30 | content: `https://pubs.opengroup.org/onlinepubs/9799919799/functions/${item.name}.html`,
31 | description: `${c.match(c.escape(item.name))} - ${c.dim(c.escape(item.description))}`
32 | };
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/extension/index/headers.js:
--------------------------------------------------------------------------------
1 | var headersIndex=[{"name":" ","path":"cpp/header/concepts","description":"Fundamental library concepts [edit]"},{"name":" ","path":"cpp/header/coroutine","description":"Coroutine support library [edit]"},{"name":" ","path":"cpp/header/any","description":"std::any class [edit]"},{"name":" ","path":"cpp/header/bitset","description":"std::bitset class template [edit]"},{"name":" ","path":"cpp/header/chrono","description":"C++ time utilities [edit]"},{"name":" ","path":"cpp/header/compare","description":"Three-way comparison operator support [edit]"},{"name":" ","path":"cpp/header/csetjmp","description":"Macro (and function) that saves (and jumps) to an execution context [edit]"},{"name":" ","path":"cpp/header/csignal","description":"Functions and macro constants for signal management [edit]"},{"name":" ","path":"cpp/header/cstdarg","description":"Handling of variable length argument lists [edit]"},{"name":" ","path":"cpp/header/cstddef","description":"Standard macros and typedefs [edit]"},{"name":" ","path":"cpp/header/cstdlib","description":"General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search [edit]"},{"name":" ","path":"cpp/header/ctime","description":"C-style time/date utilities [edit]"},{"name":" ","path":"cpp/header/expected","description":"std::expected class template [edit]"},{"name":" ","path":"cpp/header/functional","description":"Function objects, Function invocations, Bind operations and Reference wrappers [edit]"},{"name":" ","path":"cpp/header/initializer list","description":"std::initializer_list class template [edit]"},{"name":" ","path":"cpp/header/optional","description":"std::optional class template [edit]"},{"name":" ","path":"cpp/header/source location","description":"Supplies means to obtain source code location [edit]"},{"name":" ","path":"cpp/header/tuple","description":"std::tuple class template [edit]"},{"name":" ","path":"cpp/header/type traits","description":"Compile-time type information [edit]"},{"name":" ","path":"cpp/header/typeindex","description":"std::type_index [edit]"},{"name":" ","path":"cpp/header/typeinfo","description":"Runtime type information utilities [edit]"},{"name":" ","path":"cpp/header/utility","description":"Various utility components [edit]"},{"name":" ","path":"cpp/header/variant","description":"std::variant class template [edit]"},{"name":" ","path":"cpp/header/version","description":"Supplies implementation-dependent library information [edit]"},{"name":" ","path":"cpp/header/memory","description":"High-level memory management utilities [edit]"},{"name":" ","path":"cpp/header/memory resource","description":"Polymorphic allocators and memory resources [edit]"},{"name":" ","path":"cpp/header/new","description":"Low-level memory management utilities [edit]"},{"name":" ","path":"cpp/header/scoped allocator","description":"Nested allocator class [edit]"},{"name":" ","path":"cpp/header/cfloat","description":"Limits of floating-point types [edit]"},{"name":" ","path":"cpp/header/cinttypes","description":"Formatting macros, intmax_t and uintmax_t math and conversions [edit]"},{"name":" ","path":"cpp/header/climits","description":"Limits of integral types [edit]"},{"name":" ","path":"cpp/header/cstdint","description":"Fixed-width integer types and limits of other types [edit]"},{"name":" ","path":"cpp/header/limits","description":"Uniform way to query properties of arithmetic types [edit]"},{"name":" ","path":"cpp/header/stdfloat","description":"Optional extended floating-point types [edit]"},{"name":" ","path":"cpp/header/cassert","description":"Conditionally compiled macro that compares its argument to zero [edit]"},{"name":" ","path":"cpp/header/cerrno","description":"Macro containing the last error number [edit]"},{"name":" ","path":"cpp/header/exception","description":"Exception handling utilities [edit]"},{"name":" ","path":"cpp/header/stacktrace","description":"Stacktrace library [edit]"},{"name":" ","path":"cpp/header/stdexcept","description":"Standard exception objects [edit]"},{"name":" ","path":"cpp/header/system error","description":"Defines std::error_code, a platform-dependent error code [edit]"},{"name":" ","path":"cpp/header/cctype","description":"Functions to determine the category of narrow characters [edit]"},{"name":" ","path":"cpp/header/charconv","description":"std::to_chars and std::from_chars [edit]"},{"name":" ","path":"cpp/header/cstring","description":"Various narrow character string handling functions [edit]"},{"name":" ","path":"cpp/header/cuchar","description":"C-style Unicode character conversion functions [edit]"},{"name":" ","path":"cpp/header/cwchar","description":"Various wide and multibyte string handling functions [edit]"},{"name":" ","path":"cpp/header/cwctype","description":"Functions to determine the category of wide characters [edit]"},{"name":" ","path":"cpp/header/format","description":"Formatting library including std::format [edit]"},{"name":" ","path":"cpp/header/string","description":"std::basic_string class template [edit]"},{"name":" ","path":"cpp/header/string view","description":"std::basic_string_view class template [edit]"},{"name":" ","path":"cpp/header/array","description":"std::array container [edit]"},{"name":" ","path":"cpp/header/deque","description":"std::deque container [edit]"},{"name":" ","path":"cpp/header/flat map","description":"std::flat_map and std::flat_multimap container adaptors [edit]"},{"name":" ","path":"cpp/header/flat set","description":"std::flat_set and std::flat_multiset container adaptors [edit]"},{"name":" ","path":"cpp/header/forward list","description":"std::forward_list container [edit]"},{"name":" ","path":"cpp/header/list","description":"std::list container [edit]"},{"name":" ","path":"cpp/header/map","description":"std::map and std::multimap associative containers [edit]"},{"name":" ","path":"cpp/header/mdspan","description":"std::mdspan view [edit]"},{"name":" ","path":"cpp/header/queue","description":"std::queue and std::priority_queue container adaptors [edit]"},{"name":" ","path":"cpp/header/set","description":"std::set and std::multiset associative containers [edit]"},{"name":" ","path":"cpp/header/span","description":"std::span view [edit]"},{"name":" ","path":"cpp/header/stack","description":"std::stack container adaptor [edit]"},{"name":" ","path":"cpp/header/unordered map","description":"std::unordered_map and std::unordered_multimap unordered associative containers [edit]"},{"name":" ","path":"cpp/header/unordered set","description":"std::unordered_set and std::unordered_multiset unordered associative containers [edit]"},{"name":" ","path":"cpp/header/vector","description":"std::vector container [edit]"},{"name":" ","path":"cpp/header/iterator","description":"Range iterators [edit]"},{"name":" ","path":"cpp/header/generator","description":"std::generator class template [edit]"},{"name":" ","path":"cpp/header/ranges","description":"Range access, primitives, requirements, utilities and adaptors [edit]"},{"name":" ","path":"cpp/header/algorithm","description":"Algorithms that operate on ranges [edit]"},{"name":" ","path":"cpp/header/execution","description":"Predefined execution policies for parallel versions of the algorithms [edit]"},{"name":" ","path":"cpp/header/bit","description":"Bit manipulation functions [edit]"},{"name":" ","path":"cpp/header/cfenv","description":"Floating-point environment access functions [edit]"},{"name":" ","path":"cpp/header/cmath","description":"Common mathematics functions [edit]"},{"name":" ","path":"cpp/header/complex","description":"Complex number type [edit]"},{"name":" ","path":"cpp/header/numbers","description":"Math constants [edit]"},{"name":" ","path":"cpp/header/numeric","description":"Numeric operations on values in ranges [edit]"},{"name":" ","path":"cpp/header/random","description":"Random number generators and distributions [edit]"},{"name":" ","path":"cpp/header/ratio","description":"Compile-time rational arithmetic [edit]"},{"name":" ","path":"cpp/header/valarray","description":"Class for representing and manipulating arrays of values [edit]"},{"name":" ","path":"cpp/header/clocale","description":"C localization utilities [edit]"},{"name":" ","path":"cpp/header/codecvt","description":"Unicode conversion facilities [edit]"},{"name":" ","path":"cpp/header/locale","description":"Localization utilities [edit]"},{"name":" ","path":"cpp/header/cstdio","description":"C-style input-output functions [edit]"},{"name":" ","path":"cpp/header/fstream","description":"std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs [edit]"},{"name":" ","path":"cpp/header/iomanip","description":"Helper functions to control the format of input and output [edit]"},{"name":" ","path":"cpp/header/ios","description":"std::ios_base class, std::basic_ios class template and several typedefs [edit]"},{"name":" ","path":"cpp/header/iosfwd","description":"Forward declarations of all classes in the input/output library [edit]"},{"name":" ","path":"cpp/header/iostream","description":"Several standard stream objects [edit]"},{"name":" ","path":"cpp/header/istream","description":"std::basic_istream class template and several typedefs [edit]"},{"name":" ","path":"cpp/header/ostream","description":"std::basic_ostream, std::basic_iostream class templates and several typedefs [edit]"},{"name":" ","path":"cpp/header/print","description":"Formatted output library including std::print [edit]"},{"name":" ","path":"cpp/header/spanstream","description":"std::basic_spanstream, std::basic_ispanstream, std::basic_ospanstream class templates and typedefs [edit]"},{"name":" ","path":"cpp/header/sstream","description":"std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs [edit]"},{"name":" ","path":"cpp/header/streambuf","description":"std::basic_streambuf class template [edit]"},{"name":" ","path":"cpp/header/strstream","description":"std::strstream, std::istrstream, std::ostrstream [edit]"},{"name":" ","path":"cpp/header/syncstream","description":"std::basic_osyncstream, std::basic_syncbuf, and typedefs [edit]"},{"name":" ","path":"cpp/header/filesystem","description":"std::path class and supporting functions [edit]"},{"name":" ","path":"cpp/header/regex","description":"Classes, algorithms and iterators to support regular expression processing [edit]"},{"name":" ","path":"cpp/header/atomic","description":"Atomic operations library [edit]"},{"name":" ","path":"cpp/header/barrier","description":"Barriers [edit]"},{"name":" ","path":"cpp/header/condition variable","description":"Thread waiting conditions [edit]"},{"name":" ","path":"cpp/header/future","description":"Primitives for asynchronous computations [edit]"},{"name":" ","path":"cpp/header/latch","description":"Latches [edit]"},{"name":" ","path":"cpp/header/mutex","description":"Mutual exclusion primitives [edit]"},{"name":" ","path":"cpp/header/semaphore","description":"Semaphores [edit]"},{"name":" ","path":"cpp/header/shared mutex","description":"Shared mutual exclusion primitives [edit]"},{"name":" ","path":"cpp/header/stop token","description":"Stop tokens for std::jthread [edit]"},{"name":" ","path":"cpp/header/thread","description":"std::thread class and supporting functions [edit]"},{"name":" ","path":"cpp/header/cassert","description":"Behaves same as [edit]"},{"name":" ","path":"cpp/header/cctype","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cerrno","description":"Behaves same as [edit]"},{"name":" ","path":"cpp/header/cfenv","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cfloat","description":"Behaves same as [edit]"},{"name":" ","path":"cpp/header/cinttypes","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/climits","description":"Behaves same as [edit]"},{"name":" ","path":"cpp/header/clocale","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cmath","description":"Behaves as if each name from is placed in global namespace,except for names of mathematical special functions [edit]"},{"name":" ","path":"cpp/header/csetjmp","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/csignal","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cstdarg","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cstddef","description":"Behaves as if each name from is placed in global namespace,except for names of std::byte and related functions [edit]"},{"name":" ","path":"cpp/header/cstdint","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cstdio","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cstdlib","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cstring","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/ctime","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cuchar","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cwchar","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/cwctype","description":"Behaves as if each name from is placed in global namespace [edit]"},{"name":" ","path":"cpp/header/stdatomic.h","description":"Defines _Atomic and provides corresponding components in the C standard library [edit]"},{"name":" ","path":"cpp/header/ccomplex","description":"Simply includes the header [edit]"},{"name":" ","path":"cpp/header/ccomplex","description":"Simply includes the header [edit]"},{"name":" ","path":"cpp/header/ctgmath","description":"Simply includes the headers and : the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers [edit]"},{"name":" ","path":"cpp/header/ctgmath","description":"Simply includes the headers and [edit]"},{"name":" ","path":"cpp/header/ciso646","description":"Empty header. The macros that appear in iso646.h in C are keywords in C++ [edit]"},{"name":" ","path":"cpp/header/cstdalign","description":"Defines one compatibility macro constant [edit]"},{"name":" ","path":"cpp/header/cstdbool","description":"Defines one compatibility macro constant [edit]"},{"name":" ","path":"cpp/header/ciso646","description":"Has no effect [edit]"},{"name":" ","path":"cpp/header/cstdalign","description":"Defines one compatibility macro constant [edit]"},{"name":" ","path":"cpp/header/cstdbool","description":"Defines one compatibility macro constant [edit]"}];
--------------------------------------------------------------------------------
/extension/index/posix.js:
--------------------------------------------------------------------------------
1 | var posixIndex={"clock_nanosleep":"high resolution sleep with specifiable clock","getpwnam_r":"search user database for a name","putwchar":"put a wide character on a stdout stream","getpwuid_r":"search user database for a user ID","strchr":"string scanning operation","remainderl":"remainder function","vsprintf":"format output of a stdarg argument list","sigaddset":"add a signal to a signal set","iswctype":"test character for a specified class","pthread_attr_getdetachstate":"get and set the detachstate attribute","sem_post":"unlock a semaphore","getitimer":"get and set value of interval timer","atan2l":"arc tangent functions","stpncpy":"copy fixed length string, returning a pointer to the array end","posix_trace_attr_getclockres":"retrieve and set information about a trace stream (TRACING)","optind":"command option parsing","telldir":"current location of a named directory stream","gmtime_r":"down UTC time","pthread_getconcurrency":"get and set the level of concurrency","getwchar":"get a wide character from a stdin stream","FD_SET":"synchronous I/O multiplexing","readdir":"read a directory","regfree":"regular expression matching","pow":"power function","posix_spawn_file_actions_addclose":"add close or open action to spawn file actions object (ADVANCED REALTIME)","cproj":"complex projection functions","tgammaf":"compute gamma() function","opterr":"command option parsing","mq_receive":"receive a message from a message queue (REALTIME)","glob":"generate pathnames matching a pattern","fesetexceptflag":"point status flags","expm1f":"compute exponential functions","exit":"terminate a process","strncasecmp":"insensitive string comparisons","wordfree":"perform word expansions","setgrent":"group database entry functions","fminf":"point numbers","gettimeofday":"get the date and time","cos":"cosine function","fileno":"map a stream pointer to a file descriptor","fwide":"set stream orientation","fchmod":"change mode of a file","utimes":"set file access and modification times","setstate":"random number functions","pthread_mutexattr_settype":"get and set the mutex type attribute","ilogb":"return an unbiased exponent","cosh":"hyperbolic cosine functions","wordexp":"perform word expansions","rintl":"nearest integral value","iswblank":"character code","getprotobynumber":"network protocol database functions","alphasort":"scan a directory","readv":"read a vector","getpgrp":"get the process group ID of the calling process","execle":"execute a file","pthread_condattr_destroy":"destroy and initialize the condition variable attributes object","openlog":"control system log","llroundf":"round to nearest integer value","logbf":"independent exponent","frexp":"extract mantissa and exponent from a double precision number","sighold":"signal management","isblank_l":"test for a blank character","isspace_l":"space character","memmove":"copy bytes in memory with overlapping areas","isgraph":"test for a visible character","putpmsg":"send a message on a STREAM (STREAMS)","sigqueue":"queue a signal to a process","pthread_setconcurrency":"get and set the level of concurrency","memccpy":"copy bytes in memory","iconv_open":"codeset conversion allocation function","isinf":"test for infinity","coshl":"hyperbolic cosine functions","getlogin_r":"get login name","iswpunct":"character code","sem_open":"initialize and open a named semaphore","sigaction":"examine and change a signal action","pthread_mutexattr_destroy":"destroy and initialize the mutex attributes object","ccos":"complex cosine functions","islower":"test for a lowercase letter","posix_trace_attr_setinherited":"retrieve and set the behavior of a trace stream (TRACING)","wcstombs":"character string to a character string","mbsnrtowcs":"character string (restartable)","modfl":"point number","posix_typed_mem_open":"open a typed memory object (ADVANCED REALTIME)","isdigit":"test for a decimal digit","scalbnf":"compute exponent using FLT_RADIX","posix_trace_attr_getmaxsystemeventsize":"retrieve and set trace stream size attributes (TRACING)","pthread_rwlock_destroy":"write lock object","ctime_r":"convert a time value to a date and time string","iswxdigit":"character code","pthread_attr_setstack":"get and set stack attributes","getdelim":"read a delimited record from stream","posix_trace_attr_getname":"retrieve and set information about a trace stream (TRACING)","pthread_sigmask":"examine and change blocked signals","iswcntrl_l":"character code","cexp":"complex exponential functions","wmemmove":"copy wide characters in memory with overlapping areas","vfscanf":"format input of a stdarg argument list","accept":"accept a new connection on a socket","vfprintf":"format output of a stdarg argument list","mkdirat":"make a directory","dbm_nextkey":"database functions","posix_trace_clear":"clear trace stream and trace log (TRACING)","posix_trace_eventset_empty":"manipulate trace event type sets (TRACING)","lcong48":"random numbers","ulimit":"get and set process limits","tan":"tangent function","roundl":"point format","realloc":"memory reallocator","fdim":"point numbers","pthread_attr_getinheritsched":"get and set the inheritsched attribute (REALTIME THREADS)","fflush":"flush a stream","seteuid":"set effective user ID","strtoimax":"convert string to integer type","strerror":"get error message string","getutxid":"user accounting database functions","execlp":"execute a file","lrand48":"random numbers","opendir":"open directory associated with file descriptor","iswblank_l":"character code","msgsnd":"XSI message send operation","lfind":"linear search and update","isprint":"test for a printable character","pthread_rwlock_trywrlock":"write lock object for writing","gethostent":"network host database functions","ceilf":"ceiling value function","mq_setattr":"set message queue attributes (REALTIME)","lrintl":"round to nearest integer value using current rounding direction","isblank":"test for a blank character","erfl":"error functions","posix_spawn":"spawn a process (ADVANCED REALTIME)","FD_CLR":"synchronous I/O multiplexing","dbm_store":"database functions","vwprintf":"character formatted output of a stdarg argument list","csinf":"complex sine functions","expl":"exponential function","initstate":"random number functions","floorl":"floor function","abs":"return an integer absolute value","wcscoll":"character string comparison using collating information","twalk":"manage a binary search tree","fgetws":"character string from a stream","difftime":"compute the difference between two calendar time values","cacoshf":"complex arc hyperbolic cosine functions","acos":"arc cosine functions","linkat":"link one file to another file","pthread_rwlock_tryrdlock":"write lock object for reading","getnetbyname":"network database functions","fgetc":"get a byte from a stream","htons":"convert values between host and network byte order","crypt":"string encoding function (CRYPT)","dlclose":"close a symbol table handle","aio_error":"retrieve errors status for an asynchronous I/O operation","getpid":"get the process ID","getprotoent":"network protocol database functions","acoshf":"inverse hyperbolic cosine functions","rand_r":"random number generator","cacosl":"complex arc cosine functions","fdimf":"point numbers","lround":"round to nearest integer value","acosh":"inverse hyperbolic cosine functions","strcoll":"string comparison using collating information","pthread_attr_init":"destroy and initialize the thread attributes object","pthread_mutex_timedlock":"lock a mutex","pthread_setspecific":"specific data management","ccosf":"complex cosine functions","rewind":"reset the file position indicator in a stream","fmod":"point remainder value function","pthread_rwlock_wrlock":"write lock object for writing","fmin":"point numbers","truncl":"round to truncated integer value","unlinkat":"remove a directory entry","munlock":"lock or unlock a range of process address space (REALTIME)","read":"read from a file","getgid":"get the real group ID","pthread_spin_destroy":"destroy or initialize a spin lock object","pthread_attr_getstacksize":"get and set the stacksize attribute","lldiv":"compute quotient and remainder of a long division","ftrylockfile":"stdio locking functions","memcpy":"copy bytes in memory","posix_trace_attr_setmaxdatasize":"retrieve and set trace stream size attributes (TRACING)","acosf":"arc cosine functions","utime":"set file access and modification times","setutxent":"user accounting database functions","cbrtl":"cube root functions","getrlimit":"control maximum resource consumption","lstat":"get file status","isalpha":"test for an alphabetic character","islessequal":"test if x is less than or equal to y","sleep":"suspend execution for an interval of time","bind":"bind a name to a socket","ffs":"find first set bit","shm_unlink":"remove a shared memory object (REALTIME)","open_memstream":"open a dynamic memory buffer stream","toascii":"bit ASCII character","posix_trace_create":"trace stream initialization, flush, and shutdown from a process (TRACING)","strlen":"get length of fixed size string","isnan":"test for a NaN","readlinkat":"read the contents of a symbolic link","shmget":"get an XSI shared memory segment","readlink":"read the contents of a symbolic link","gets":"get a string from a stdin stream","srandom":"random number functions","cimagl":"complex imaginary functions","ccosl":"complex cosine functions","iswgraph_l":"character code","cosl":"cosine function","getdate_err":"convert user format date and time","toupper_l":"transliterate lowercase characters to uppercase","select":"synchronous I/O multiplexing","confstr":"get configurable variables","wcscmp":"character strings","qsort":"sort a table of data","acoshl":"inverse hyperbolic cosine functions","ctanhl":"complex hyperbolic tangent functions","fputs":"put a string on a stream","signgam":"log gamma function","posix_spawnattr_setpgroup":"pgroup attribute of a spawn attributes object (ADVANCED REALTIME)","getgrgid_r":"get group database entry for a group ID","pthread_attr_setscope":"get and set the contentionscope attribute (REALTIME THREADS)","unsetenv":"remove an environment variable","posix_fadvise":"file advisory information (ADVANCED REALTIME)","putmsg":"send a message on a STREAM (STREAMS)","nextafterf":"point number","tanh":"hyperbolic tangent functions","abort":"generate an abnormal process abort","getservent":"network services database functions","atoll":"convert a string to a long integer","ilogbl":"return an unbiased exponent","sched_getparam":"get scheduling parameters (REALTIME)","feof":"file indicator on a stream","inet_addr":"IPv4 address manipulation","posix_trace_attr_getlogsize":"retrieve and set trace stream size attributes (TRACING)","remainder":"remainder function","truncf":"round to truncated integer value","ungetwc":"character code back into the input stream","fmal":"add","memset":"set bytes in memory","scandir":"scan a directory","setgid":"ID","setpgid":"set process group ID for job control","mlockall":"lock/unlock the address space of a process (REALTIME)","stat":"get file status","jn":"Bessel functions of the first kind","posix_trace_eventtypelist_rewind":"iterate over a mapping of trace event types (TRACING)","wcstoimax":"character string to an integer type","isdigit_l":"test for a decimal digit","pthread_getschedparam":"dynamic thread scheduling parameters access (REALTIME THREADS)","timer_settime":"process timers","logb":"independent exponent","pthread_rwlock_rdlock":"write lock object for reading","raise":"send a signal to the executing process","fclose":"close a stream","strtoumax":"convert string to integer type","ctermid":"generate a pathname for the controlling terminal","wscanf":"character input","creal":"complex real functions","isnormal":"test for a normal value","setnetent":"network database functions","pthread_getcpuclockid":"time clock (ADVANCED REALTIME THREADS)","fmaxl":"point numbers","fputws":"character string on a stream","fwrite":"binary output","setregid":"set real and effective group IDs","pthread_mutex_destroy":"destroy and initialize a mutex","pthread_spin_unlock":"unlock a spin lock object","putchar":"put a byte on a stdout stream","nanl":"return quiet NaN","posix_trace_stop":"trace start and stop (TRACING)","fabsf":"absolute value function","dbm_firstkey":"database functions","getsockopt":"get the socket options","fpathconf":"get configurable pathname variables","strtol":"convert a string to a long integer","pthread_rwlockattr_setpshared":"write lock attributes object","getutxline":"user accounting database functions","remove":"remove a file","inet_ntop":"convert IPv4 and IPv6 addresses between binary and text form","atof":"precision number","flockfile":"stdio locking functions","signal":"signal management","fseek":"position indicator in a stream","llrintl":"round to the nearest integer value using current rounding direction","pthread_cond_destroy":"destroy and initialize condition variables","atanhl":"inverse hyperbolic tangent functions","erff":"error functions","wcscasecmp_l":"character string comparison","atan2f":"arc tangent functions","round":"point format","iswspace_l":"character code","sprintf":"print formatted output","labs":"return a long integer absolute value","vscanf":"format input of a stdarg argument list","chmod":"change mode of a file","tdelete":"manage a binary search tree","rintf":"nearest integral value","puts":"put a string on standard output","isfinite":"test for finite value","aio_write":"asynchronous write to a file","scalblnf":"compute exponent using FLT_RADIX","msgrcv":"XSI message receive operation","frexpl":"extract mantissa and exponent from a double precision number","aio_fsync":"asynchronous file synchronization","time":"get time","getc_unlocked":"stdio with explicit client locking","sigdelset":"delete a signal from a signal set","pselect":"synchronous I/O multiplexing","iscntrl":"test for a control character","wcpcpy":"character string, returning a pointer to its end","mknodat":"make directory, special file, or regular file","duplocale":"duplicate a locale object","wcstold":"precision number","isunordered":"test if arguments are unordered","wcpncpy":"character string, returning a pointer to its end","dirname":"report the parent directory name of a file pathname","wcswidth":"character string","lroundf":"round to nearest integer value","isalpha_l":"test for an alphabetic character","cprojf":"complex projection functions","wcstod":"precision number","sqrtf":"square root function","optopt":"command option parsing","ntohs":"convert values between host and network byte order","exp":"exponential function","fexecve":"execute a file","wcsncmp":"character strings","csinh":"complex hyperbolic sine functions","endnetent":"network database functions","cargf":"complex argument functions","optarg":"command option parsing","asinhl":"inverse hyperbolic sine functions","atanh":"inverse hyperbolic tangent functions","mkfifo":"make a FIFO special file","log2l":"compute base 2 logarithm functions","getchar":"get a byte from a stdin stream","fwprintf":"character output","fwscanf":"character input","posix_trace_getnext_event":"retrieve a trace event (TRACING)","clogl":"complex natural logarithm functions","posix_trace_attr_getinherited":"retrieve and set the behavior of a trace stream (TRACING)","pipe":"create an interprocess channel","floor":"floor function","getmsg":"receive next message from a STREAMS file (STREAMS)","free":"free allocated memory","feholdexcept":"point environment","pthread_mutex_trylock":"lock and unlock a mutex","seekdir":"set the position of a directory stream","rewinddir":"reset the position of a directory stream to the beginning of a directory","copysign":"number manipulation function","ctime":"convert a time value to a date and time string","tcsendbreak":"send a break for a specific duration","fprintf":"print formatted output","setpriority":"get and set the nice value","semctl":"XSI semaphore control operations","csinhf":"complex hyperbolic sine functions","wctomb":"character code to a character","msgctl":"XSI message control operations","log1pf":"compute a natural logarithm","stderr":"standard I/O streams","pthread_barrierattr_destroy":"destroy and initialize the barrier attributes object","sinl":"sine function","posix_typed_mem_get_info":"query typed memory information (ADVANCED REALTIME)","vfwprintf":"character formatted output of a stdarg argument list","execl":"execute a file","rename":"rename file","dprintf":"print formatted output","posix_trace_attr_setlogfullpolicy":"retrieve and set the behavior of a trace stream (TRACING)","sigaltstack":"set and get signal alternate stack context","catgets":"read a program message","mkfifoat":"make a FIFO special file","nextafter":"point number","setjmp":"local goto","isless":"test if x is less than y","strspn":"get length of a substring","setlocale":"set program locale","casinf":"complex arc sine functions","fputc":"put a byte on a stream","wctype_l":"define character class","towctrans":"character transliteration","asinhf":"inverse hyperbolic sine functions","strtold":"precision number","nexttowardl":"point number","pthread_mutexattr_getprotocol":"get and set the protocol attribute of the mutex attributes object (REALTIME THREADS)","wcstoumax":"character string to an integer type","openat":"open file","fmtmsg":"display a message in the specified format on standard error and/or a system console","log":"natural logarithm function","lseek":"move the read/write file offset","alarm":"schedule an alarm signal","modf":"point number","log2f":"compute base 2 logarithm functions","logl":"natural logarithm function","isxdigit_l":"test for a hexadecimal digit","ferror":"test error indicator on a stream","setvbuf":"assign buffering to a stream","posix_trace_eventset_del":"manipulate trace event type sets (TRACING)","catanhf":"complex arc hyperbolic tangent functions","sinhf":"hyperbolic sine functions","daylight":"set timezone conversion information","clogf":"complex natural logarithm functions","imaxdiv":"return quotient and remainder","waitid":"wait for a child process to change state","execve":"execute a file","setservent":"network services database functions","gai_strerror":"address and name information error description","fstatat":"get file status","pause":"suspend the thread until a signal is received","pthread_spin_trylock":"lock a spin lock object","fegetenv":"point environment","towlower_l":"character code to lowercase","lrintf":"round to nearest integer value using current rounding direction","strtok_r":"split string into tokens","isastream":"test a file descriptor (STREAMS)","munmap":"unmap pages of memory","timer_getoverrun":"process timers","fdopen":"associate a stream with a file descriptor","sigwaitinfo":"wait for queued signals","pthread_cond_signal":"broadcast or signal a condition","islessgreater":"test if x is less than or greater than y","pthread_detach":"detach a thread","fsetpos":"set current file position","log10":"base 10 logarithm function","mq_close":"close a message queue (REALTIME)","logbl":"independent exponent","fstat":"get file status","setlogmask":"control system log","asinf":"arc sine function","getsid":"get the process group ID of a session leader","cabsf":"return a complex absolute value","pthread_condattr_getclock":"get and set the clock selection condition variable attribute","getpwuid":"search user database for a user ID","getppid":"get the parent process ID","strxfrm_l":"string transformation","hcreate":"manage hash search table","jrand48":"random numbers","pathconf":"get configurable pathname variables","pthread_mutex_init":"destroy and initialize a mutex","asin":"arc sine function","tanl":"tangent function","wcwidth":"character code","pthread_attr_destroy":"destroy and initialize the thread attributes object","if_freenameindex":"free memory allocated by if_nameindex","basename":"return the last component of a pathname","freelocale":"free resources allocated for a locale object","closedir":"close a directory stream","wmemset":"set wide characters in memory","setreuid":"set real and effective user IDs","coshf":"hyperbolic cosine functions","cfgetispeed":"get input baud rate","logf":"natural logarithm function","imaxabs":"return absolute value","execvp":"execute a file","pthread_setschedparam":"dynamic thread scheduling parameters access (REALTIME THREADS)","timer_delete":"process timer","tcdrain":"wait for transmission of output","mq_notify":"notify process that a message is available (REALTIME)","acosl":"arc cosine functions","fetestexcept":"point exception flags","endpwent":"user database functions","pthread_condattr_setclock":"get and set the clock selection condition variable attribute","cfsetispeed":"set input baud rate","cbrt":"cube root functions","sendto":"send a message on a socket","semop":"XSI semaphore operations","pthread_setcanceltype":"set cancelability state","pututxline":"user accounting database functions","pthread_getspecific":"specific data management","pthread_attr_getschedparam":"get and set the schedparam attribute","iswgraph":"character code","environ":"execute a file","cabs":"return a complex absolute value","wctrans":"define character mapping","wcsspn":"get the length of a wide substring","lockf":"record locking on files","ftruncate":"truncate a file to a specified length","scalbnl":"compute exponent using FLT_RADIX","pthread_barrier_init":"destroy and initialize a barrier object","asinl":"arc sine function","dbm_delete":"database functions","pthread_testcancel":"set cancelability state","towctrans_l":"character transliteration","a64l":"64 ASCII string","tzname":"set timezone conversion information","vsnprintf":"format output of a stdarg argument list","aio_suspend":"wait for an asynchronous I/O request","strcpy":"copy a string and return a pointer to the end of the result","strcasecmp":"insensitive string comparisons","chdir":"change working directory","pthread_attr_setguardsize":"get and set the thread guardsize attribute","strfmon_l":"convert monetary value to a string","_longjmp":"local goto","popen":"initiate pipe streams to or from a process","wcstoul":"character string to an unsigned long","posix_spawnattr_setsigmask":"sigmask attribute of a spawn attributes object (ADVANCED REALTIME)","pthread_mutexattr_setpshared":"shared attribute","atanl":"arc tangent function","mblen":"get number of bytes in a character","freopen":"open a stream","sem_close":"close a named semaphore","getnetent":"network database functions","strfmon":"convert monetary value to a string","strxfrm":"string transformation","wait":"wait for a child process to stop or terminate","endutxent":"user accounting database functions","posix_trace_get_filter":"retrieve and set the filter of an initialized trace stream (TRACING)","gethostname":"get name of current host","_exit":"terminate a process","fpclassify":"classify real floating type","dlopen":"open a symbol table handle","fmaxf":"point numbers","getegid":"get the effective group ID","setegid":"set the effective group ID","strtof":"precision number","ispunct_l":"test for a punctuation character","cargl":"complex argument functions","powl":"power function","nearbyint":"point rounding functions","sscanf":"convert formatted input","gmtime":"down UTC time","sem_trywait":"lock a semaphore","globfree":"generate pathnames matching a pattern","putc":"put a byte on a stream","mq_open":"open a message queue (REALTIME)","pthread_attr_setschedparam":"get and set the schedparam attribute","ldexpf":"point number","endservent":"network services database functions","regerror":"regular expression matching","pthread_spin_lock":"lock a spin lock object","dbm_open":"database functions","wcsrchr":"character string scanning operation","pread":"read from a file","catanh":"complex arc hyperbolic tangent functions","getcwd":"get the pathname of the current working directory","pthread_cleanup_pop":"establish cancellation handlers","posix_trace_attr_setstreamfullpolicy":"retrieve and set the behavior of a trace stream (TRACING)","wcscspn":"get the length of a complementary wide substring","iswlower_l":"character code","getnameinfo":"get name information","fabs":"absolute value function","iswupper":"character code","floorf":"floor function","strftime":"convert date and time to a string","strtoll":"convert a string to a long integer","atol":"convert a string to a long integer","mprotect":"set protection of memory mapping","nl_langinfo_l":"language information","yn":"Bessel functions of the second kind","getsockname":"get the socket name","fgets":"get a string from a stream","wcsxfrm":"character string transformation","ftell":"return a file offset in a stream","clock":"report CPU time used","pthread_condattr_setpshared":"shared condition variable attributes","pwrite":"write on a file","scalbn":"compute exponent using FLT_RADIX","fdetach":"based file descriptor (STREAMS)","sqrtl":"square root function","wcsnrtombs":"character string to a character string (restartable)","memcmp":"compare bytes in memory","fesetround":"get and set current rounding direction","feclearexcept":"point exception","wcsnlen":"character string","mbrtowc":"character code (restartable)","rmdir":"remove a directory","wctrans_l":"define character mapping","ftw":"traverse (walk) a file tree","cacos":"complex arc cosine functions","strsignal":"get name of signal","pthread_key_create":"specific data key creation","posix_spawnattr_init":"destroy and initialize spawn attributes object (ADVANCED REALTIME)","mbsrtowcs":"character string (restartable)","setpwent":"user database functions","pthread_cond_init":"destroy and initialize condition variables","hypotf":"Euclidean distance function","putwc":"put a wide character on a stream","tcflush":"read input data, or both","strcasecmp_l":"insensitive string comparisons","pthread_spin_init":"destroy or initialize a spin lock object","isalnum":"test for an alphanumeric character","siginterrupt":"allow signals to interrupt functions","system":"issue a command","getpriority":"get and set the nice value","carg":"complex argument functions","if_indextoname":"map a network interface index to its corresponding name","getwc":"get a wide character from a stream","truncate":"truncate a file to a specified length","strftime_l":"convert date and time to a string","copysignf":"number manipulation function","llroundl":"round to nearest integer value","log10l":"base 10 logarithm function","iswalnum":"character code","getpmsg":"receive next message from a STREAMS file (STREAMS)","assert":"insert program diagnostics","fminl":"point numbers","clog":"complex natural logarithm functions","tcflow":"suspend or restart the transmission or reception of data","tolower_l":"transliterate uppercase characters to lowercase","tzset":"set timezone conversion information","catan":"complex arc tangent functions","psiginfo":"write signal information to standard error","putenv":"change or add a value to an environment","posix_trace_attr_init":"destroy and initialize the trace stream attributes object (TRACING)","remquo":"remainder functions","strstr":"find a substring","setuid":"set user ID","socket":"create an endpoint for communication","posix_trace_set_filter":"retrieve and set the filter of an initialized trace stream (TRACING)","sinf":"sine function","iswctype_l":"test character for a specified class","send":"send a message on a socket","tmpfile":"create a temporary file","erand48":"random numbers","dbm_clearerr":"database functions","erf":"error functions","regcomp":"regular expression matching","clock_settime":"clock and timer functions","nexttowardf":"point number","seed48":"random numbers","getpwent":"user database functions","cfgetospeed":"get output baud rate","fattach":"based file descriptor to a file in the file system name space (STREAMS)","feraiseexcept":"point exception","ctanhf":"complex hyperbolic tangent functions","socketpair":"create a pair of connected sockets","posix_spawnattr_destroy":"destroy and initialize spawn attributes object (ADVANCED REALTIME)","iswdigit":"character code","atan":"arc tangent function","sched_getscheduler":"get scheduling policy (REALTIME)","mknod":"make directory, special file, or regular file","swprintf":"character output","csqrt":"complex square root functions","swab":"swap bytes","fseeko":"position indicator in a stream","pthread_cond_wait":"wait on a condition","atexit":"register a function to run at process termination","msync":"synchronize memory with physical storage","pthread_mutexattr_getpshared":"shared attribute","timezone":"set timezone conversion information","cpow":"complex power functions","wcsdup":"character string","pthread_condattr_init":"destroy and initialize the condition variable attributes object","sqrt":"square root function","towlower":"character code to lowercase","encrypt":"encoding function (CRYPT)","erfcl":"complementary error functions","modff":"point number","fmaf":"add","pthread_rwlockattr_getpshared":"write lock attributes object","wmemcmp":"compare wide characters in memory","dbm_fetch":"database functions","execv":"execute a file","pthread_mutex_unlock":"lock and unlock a mutex","posix_trace_attr_setlogsize":"retrieve and set trace stream size attributes (TRACING)","erfc":"complementary error functions","mmap":"map pages of memory","localtime_r":"down local time","exp2":"exponential base 2 functions","posix_trace_shutdown":"trace stream initialization, flush, and shutdown from a process (TRACING)","posix_trace_rewind":"trace log management (TRACING)","cacosf":"complex arc cosine functions","wprintf":"character output","scanf":"convert formatted input","if_nametoindex":"map a network interface name to its corresponding index","pthread_rwlock_timedwrlock":"write lock for writing","atan2":"arc tangent functions","perror":"write error messages to standard error","pthread_join":"wait for thread termination","pthread_attr_getscope":"get and set the contentionscope attribute (REALTIME THREADS)","pthread_attr_setstacksize":"get and set the stacksize attribute","cacosh":"complex arc hyperbolic cosine functions","aio_read":"asynchronous read from a file","write":"write on a file","pthread_mutexattr_getrobust":"get and set the mutex robust attribute","ftello":"return a file offset in a stream","tanhl":"hyperbolic tangent functions","isprint_l":"test for a printable character","posix_trace_eventid_open":"trace functions for instrumenting application code (TRACING)","iswprint":"character code","tgamma":"compute gamma() function","stdin":"standard I/O streams","remquol":"remainder functions","wcsncasecmp_l":"character string comparison","asctime":"convert date and time to a string","signbit":"test sign","iswalpha":"character code","nanosleep":"high resolution sleep","times":"for child process times","recvfrom":"receive a message from a socket","llabs":"return a long integer absolute value","swscanf":"character input","pthread_rwlockattr_destroy":"write lock attributes object","timer_create":"process timer","wcscat":"character strings","sem_destroy":"destroy an unnamed semaphore","getchar_unlocked":"stdio with explicit client locking","localeconv":"specific information","wcstoull":"character string to an unsigned long","towupper_l":"character code to uppercase","shmdt":"XSI shared memory detach operation","nearbyintl":"point rounding functions","conj":"complex conjugate functions","posix_trace_attr_setname":"retrieve and set information about a trace stream (TRACING)","pthread_setcancelstate":"set cancelability state","posix_spawn_file_actions_addopen":"add close or open action to spawn file actions object (ADVANCED REALTIME)","cimagf":"complex imaginary functions","closelog":"control system log","vprintf":"format output of a stdarg argument list","printf":"print formatted output","hsearch":"manage hash search table","bsearch":"binary search a sorted table","cacoshl":"complex arc hyperbolic cosine functions","kill":"send a signal to a process or a group of processes","semget":"get set of XSI semaphores","sem_init":"initialize an unnamed semaphore","srand":"random number generator","log1p":"compute a natural logarithm","FD_ISSET":"synchronous I/O multiplexing","lgammal":"log gamma function","trunc":"round to truncated integer value","ftok":"generate an IPC key","sinh":"hyperbolic sine functions","getsubopt":"parse suboption arguments from a string","l64a":"64 ASCII string","ldiv":"compute quotient and remainder of a long division","pthread_attr_getschedpolicy":"get and set the schedpolicy attribute (REALTIME THREADS)","posix_trace_event":"trace functions for instrumenting application code (TRACING)","wcstoll":"character string to a long integer","casinhl":"complex arc hyperbolic sine functions","pthread_mutexattr_init":"destroy and initialize the mutex attributes object","copysignl":"number manipulation function","strndup":"duplicate a specific number of bytes from a string","conjf":"complex conjugate functions","remque":"insert or remove an element in a queue","ttyname_r":"find the pathname of a terminal","iswalpha_l":"character code","pthread_exit":"thread termination","poll":"input/output multiplexing","catopen":"open a message catalog","posix_trace_attr_getgenversion":"retrieve and set information about a trace stream (TRACING)","nextafterl":"point number","pthread_equal":"compare thread IDs","setprotoent":"network protocol database functions","waitpid":"wait for a child process to stop or terminate","shmat":"XSI shared memory attach operation","stpcpy":"copy a string and return a pointer to the end of the result","fmemopen":"open a memory buffer stream","getc":"get a byte from a stream","pthread_attr_getguardsize":"get and set the thread guardsize attribute","posix_trace_eventset_fill":"manipulate trace event type sets (TRACING)","putc_unlocked":"stdio with explicit client locking","posix_spawn_file_actions_init":"destroy and initialize spawn file actions object (ADVANCED REALTIME)","pthread_key_delete":"specific data key deletion","catclose":"close a message catalog descriptor","j0":"Bessel functions of the first kind","iswalnum_l":"character code","posix_mem_offset":"find offset and length of a mapped typed memory block (ADVANCED REALTIME)","pthread_barrierattr_getpshared":"shared attribute of the barrier attributes object","dlsym":"get the address of a symbol from a symbol table handle","wcscpy":"character string, returning a pointer to its end","vswprintf":"character formatted output of a stdarg argument list","malloc":"a memory allocator","posix_trace_open":"trace log management (TRACING)","clock_gettime":"clock and timer functions","scalbln":"compute exponent using FLT_RADIX","cpowf":"complex power functions","pthread_once":"dynamic package initialization","sem_wait":"lock a semaphore","mkstemp":"create a unique directory or file","ceill":"ceiling value function","fscanf":"convert formatted input","sockatmark":"band mark","statvfs":"get file system information","stdout":"standard I/O streams","sigismember":"test for a signal in a signal set","posix_trace_attr_setstreamsize":"retrieve and set trace stream size attributes (TRACING)","wcscasecmp":"character string comparison","nearbyintf":"point rounding functions","wcschr":"character string scanning operation","pclose":"close a pipe stream to or from a process","if_nameindex":"return all network interface names and indexes","asctime_r":"convert date and time to a string","va_end":"handle variable argument list","ilogbf":"return an unbiased exponent","isgreater":"test if x greater than y","endhostent":"network host database functions","ispunct":"test for a punctuation character","mbrlen":"get number of bytes in a character (restartable)","inet_ntoa":"IPv4 address manipulation","getgrent":"group database entry functions","getgrnam_r":"search group database for a name","pthread_attr_getstack":"get and set stack attributes","getutxent":"user accounting database functions","grantpt":"terminal device","sched_yield":"yield the processor","ioctl":"control a STREAMS device (STREAMS)","getgroups":"get supplementary group IDs","setrlimit":"control maximum resource consumption","strcat":"concatenate two strings","ldexpl":"point number","ctanl":"complex tangent functions","strcmp":"compare two strings","pthread_rwlock_timedrdlock":"write lock for reading","_tolower":"transliterate uppercase characters to lowercase","pthread_mutexattr_setprioceiling":"get and set the prioceiling attribute of the mutex attributes object (REALTIME THREADS)","creall":"complex real functions","mq_unlink":"remove a message queue (REALTIME)","vswscanf":"character formatted input of a stdarg argument list","access":"determine accessibility of a file descriptor","ptsname":"terminal device","uselocale":"use locale in current thread","freeaddrinfo":"get address information","isspace":"space character","shmctl":"XSI shared memory control operations","sysconf":"get configurable system variables","sched_setparam":"set scheduling parameters (REALTIME)","isgraph_l":"test for a visible character","tfind":"manage a binary search tree","syslog":"control system log","tanhf":"hyperbolic tangent functions","pthread_condattr_getpshared":"shared condition variable attributes","pthread_barrierattr_setpshared":"shared attribute of the barrier attributes object","getpeername":"get the name of the peer socket","getnetbyaddr":"network database functions","fdatasync":"synchronize the data of a file (REALTIME)","fsync":"synchronize changes to a file","insque":"insert or remove an element in a queue","errno":"error return value","tcgetpgrp":"get the foreground process group ID","strpbrk":"scan a string for a byte","posix_trace_attr_getcreatetime":"retrieve and set information about a trace stream (TRACING)","ccoshf":"complex hyperbolic cosine functions","tcsetattr":"set the parameters associated with the terminal","mq_getattr":"get message queue attributes (REALTIME)","feupdateenv":"point environment","sched_setscheduler":"set scheduling policy and parameters (REALTIME)","wcsncasecmp":"character string comparison","calloc":"a memory allocator","fputwc":"character code on a stream","pthread_setschedprio":"dynamic thread scheduling parameters access (REALTIME THREADS)","iswpunct_l":"character code","csqrtf":"complex square root functions","wcsxfrm_l":"character string transformation","posix_trace_close":"trace log management (TRACING)","lio_listio":"list directed I/O","iswdigit_l":"character code","llround":"round to nearest integer value","pthread_barrierattr_init":"destroy and initialize the barrier attributes object","iswprint_l":"character code","posix_spawnattr_setschedparam":"schedparam attribute of a spawn attributes object (ADVANCED REALTIME)","ceil":"ceiling value function","pthread_attr_setdetachstate":"get and set the detachstate attribute","casinhf":"complex arc hyperbolic sine functions","aio_return":"retrieve return status of an asynchronous I/O operation","mlock":"lock or unlock a range of process address space (REALTIME)","endgrent":"group database entry functions","tmpnam":"create a name for a temporary file","rand":"random number generator","posix_spawnp":"spawn a process (ADVANCED REALTIME)","posix_trace_attr_getstreamsize":"retrieve and set trace stream size attributes (TRACING)","cimag":"complex imaginary functions","llrintf":"round to the nearest integer value using current rounding direction","y0":"Bessel functions of the second kind","fnmatch":"match a filename string or a pathname","sigignore":"signal management","posix_spawn_file_actions_adddup2":"add dup2 action to spawn file actions object (ADVANCED REALTIME)","vsscanf":"format input of a stdarg argument list","va_arg":"handle variable argument list","iswspace":"character code","powf":"power function","nftw":"walk a file tree","setitimer":"get and set value of interval timer","msgget":"get the XSI message queue identifier","nrand48":"random numbers","recvmsg":"receive a message from a socket","expm1l":"compute exponential functions","rint":"nearest integral value","wcsstr":"character substring","fmax":"point numbers","_setjmp":"local goto","pthread_cond_timedwait":"wait on a condition","pthread_mutex_lock":"lock and unlock a mutex","csinhl":"complex hyperbolic sine functions","posix_trace_attr_getmaxdatasize":"retrieve and set trace stream size attributes (TRACING)","getservbyport":"network services database functions","clock_getres":"clock and timer functions","utimensat":"set file access and modification times","posix_trace_attr_getlogfullpolicy":"retrieve and set the behavior of a trace stream (TRACING)","inet_pton":"convert IPv4 and IPv6 addresses between binary and text form","pthread_atfork":"register fork handlers","roundf":"point format","sched_get_priority_min":"get priority limits (REALTIME)","posix_trace_attr_destroy":"destroy and initialize the trace stream attributes object (TRACING)","drand48":"random numbers","ccoshl":"complex hyperbolic cosine functions","strncmp":"compare part of two strings","sendmsg":"send a message on a socket using a message structure","crealf":"complex real functions","getpgid":"get the process group ID for a process","pthread_cancel":"cancel execution of a thread","posix_memalign":"aligned memory allocation (ADVANCED REALTIME)","getservbyname":"network services database functions","open_wmemstream":"open a dynamic memory buffer stream","strrchr":"string scanning operation","strcspn":"get the length of a complementary substring","writev":"write a vector","strncasecmp_l":"insensitive string comparisons","isalnum_l":"test for an alphanumeric character","hypot":"Euclidean distance function","wcsftime":"character string","nanf":"return quiet NaN","posix_trace_trid_eventid_open":"manipulate the trace event type identifier (TRACING)","atoi":"convert a string to an integer","frexpf":"extract mantissa and exponent from a double precision number","ccosh":"complex hyperbolic cosine functions","vdprintf":"format output of a stdarg argument list","fstatvfs":"get file system information","shutdown":"shut down socket send and receive operations","posix_trace_create_withlog":"trace stream initialization, flush, and shutdown from a process (TRACING)","killpg":"send a signal to a process group","pthread_rwlock_init":"write lock object","longjmp":"local goto","symlink":"make a symbolic link","getrusage":"get information about resource utilization","clock_getcpuclockid":"time clock (ADVANCED REALTIME)","sem_unlink":"remove a named semaphore","isascii":"ASCII character","creat":"create a new file or rewrite an existing one","mktime":"down time into time since the Epoch","iswlower":"character code","regexec":"regular expression matching","mq_timedsend":"send a message to a message queue (REALTIME)","posix_trace_start":"trace start and stop (TRACING)","localtime":"down local time","clearerr":"clear indicators on a stream","ungetc":"push byte back into input stream","fchown":"change owner and group of a file","sigsetjmp":"local goto","srand48":"random numbers","lrint":"round to nearest integer value using current rounding direction","posix_spawnattr_getpgroup":"pgroup attribute of a spawn attributes object (ADVANCED REALTIME)","wcsrtombs":"character string to a character string (restartable)","cexpl":"complex exponential functions","ldexp":"point number","fchownat":"change owner and group of a file","posix_spawnattr_getschedpolicy":"schedpolicy attribute of a spawn attributes object (ADVANCED REALTIME)","posix_trace_eventset_add":"manipulate trace event type sets (TRACING)","dbm_error":"database functions","fegetround":"get and set current rounding direction","posix_spawnattr_getschedparam":"schedparam attribute of a spawn attributes object (ADVANCED REALTIME)","pthread_mutex_consistent":"mark state protected by robust mutex as consistent","setsid":"create session and set process group ID","wcspbrk":"character code","pthread_attr_setschedpolicy":"get and set the schedpolicy attribute (REALTIME THREADS)","fcntl":"file control","listen":"listen for socket connections and limit the queue of incoming connections","strtoull":"convert a string to an unsigned long","setenv":"add or change environment variable","atanhf":"inverse hyperbolic tangent functions","unlink":"remove a directory entry","tgammal":"compute gamma() function","aio_cancel":"cancel an asynchronous I/O request","getenv":"get value of an environment variable","geteuid":"get the effective user ID","endprotoent":"network protocol database functions","siglongjmp":"local goto with signal handling","pthread_self":"get the calling thread ID","tcgetsid":"get the process group ID for the session leader for the controlling terminal","isupper":"test for an uppercase letter","towupper":"character code to uppercase","strerror_r":"get error message string","sync":"schedule file system updates","fchdir":"change working directory","atanf":"arc tangent function","posix_spawnattr_getflags":"flags attribute of a spawn attributes object (ADVANCED REALTIME)","conjl":"complex conjugate functions","lsearch":"linear search and update","fchmodat":"change mode of a file","posix_spawnattr_setschedpolicy":"schedpolicy attribute of a spawn attributes object (ADVANCED REALTIME)","posix_trace_get_attr":"retrieve the trace attributes or trace status (TRACING)","strerror_l":"get error message string","sigtimedwait":"wait for queued signals","wcsncat":"character string with part of another","va_start":"handle variable argument list","pthread_mutex_setprioceiling":"get and set the priority ceiling of a mutex (REALTIME THREADS)","isxdigit":"test for a hexadecimal digit","getgrnam":"search group database for a name","ctanf":"complex tangent functions","sigrelse":"signal management","fma":"add","iscntrl_l":"test for a control character","tcgetattr":"get the parameters associated with the terminal","y1":"Bessel functions of the second kind","funlockfile":"stdio locking functions","iconv":"codeset conversion function","catanhl":"complex arc hyperbolic tangent functions","log10f":"base 10 logarithm function","getdate":"convert user format date and time","posix_trace_flush":"trace stream initialization, flush, and shutdown from a process (TRACING)","realpath":"resolve a pathname","wctype":"define character class","fabsl":"absolute value function","ntohl":"convert values between host and network byte order","wcstok":"character string into tokens","wcscoll_l":"character string comparison using collating information","sigfillset":"initialize and fill a signal set","FD_ZERO":"synchronous I/O multiplexing","log1pl":"compute a natural logarithm","strtoul":"convert a string to an unsigned long","sigpause":"signal management","wcrtomb":"character code to a character (restartable)","getgrgid":"get group database entry for a group ID","fork":"create a new process","setkey":"set encoding key (CRYPT)","isupper_l":"test for an uppercase letter","vfwscanf":"character formatted input of a stdarg argument list","nan":"return quiet NaN","cprojl":"complex projection functions","casinl":"complex arc sine functions","unlockpt":"terminal master/slave pair","lchown":"change the owner and group of a symbolic link","strnlen":"get length of fixed size string","setsockopt":"set the socket options","j1":"Bessel functions of the first kind","chown":"change owner and group of a file","setpgrp":"set the process group ID","posix_spawn_file_actions_destroy":"destroy and initialize spawn file actions object (ADVANCED REALTIME)","div":"compute the quotient and remainder of an integer division","llrint":"round to the nearest integer value using current rounding direction","getpwnam":"search user database for a name","random":"random number functions","psignal":"write signal information to standard error","posix_trace_get_status":"retrieve the trace attributes or trace status (TRACING)","sem_getvalue":"get the value of a semaphore","pthread_cond_broadcast":"broadcast or signal a condition","setbuf":"assign buffering to a stream","dirfd":"extract the file descriptor used by a DIR stream","cexpf":"complex exponential functions","wcslen":"character string","mbsinit":"determine conversion object status","iconv_close":"codeset conversion deallocation function","sinhl":"hyperbolic sine functions","pthread_mutex_getprioceiling":"get and set the priority ceiling of a mutex (REALTIME THREADS)","cbrtf":"cube root functions","mbtowc":"character code","connect":"connect a socket","fgetpos":"get current file position information","isatty":"test for a terminal device","strncat":"concatenate a string with part of another","fdopendir":"open directory associated with file descriptor","pthread_mutexattr_setprotocol":"get and set the protocol attribute of the mutex attributes object (REALTIME THREADS)","catanl":"complex arc tangent functions","timer_gettime":"process timers","fread":"binary input","sem_timedwait":"lock a semaphore","ttyname":"find the pathname of a terminal","sigemptyset":"initialize and empty a signal set","fdiml":"point numbers","fesetenv":"point environment","ctan":"complex tangent functions","wcstol":"character string to a long integer","btowc":"single byte to wide character conversion","getuid":"get a real user ID","lgamma":"log gamma function","tempnam":"create a name for a temporary file","cfsetospeed":"set output baud rate","wcstof":"precision number","pthread_rwlockattr_init":"write lock attributes object","mrand48":"random numbers","lgammaf":"log gamma function","renameat":"rename file","fegetexceptflag":"point status flags","fmodf":"point remainder value function","iswxdigit_l":"character code","posix_openpt":"terminal device","cabsl":"return a complex absolute value","gethostid":"get an identifier for the current host","pthread_mutexattr_getprioceiling":"get and set the prioceiling attribute of the mutex attributes object (REALTIME THREADS)","htonl":"convert values between host and network byte order","pthread_barrier_wait":"synchronize at a barrier","umask":"set and get the file mode creation mask","va_copy":"handle variable argument list","posix_fallocate":"file space control (ADVANCED REALTIME)","strptime":"date and time conversion","cosf":"cosine function","casinh":"complex arc hyperbolic sine functions","sigwait":"wait for queued signals","getopt":"command option parsing","dup2":"duplicate an open file descriptor","tanf":"tangent function","mbstowcs":"character string","exp2f":"exponential base 2 functions","remainderf":"remainder function","strtod":"precision number","nl_langinfo":"language information","munlockall":"lock/unlock the address space of a process (REALTIME)","posix_trace_attr_getmaxusereventsize":"retrieve and set trace stream size attributes (TRACING)","pthread_barrier_destroy":"destroy and initialize a barrier object","expm1":"compute exponential functions","mq_send":"send a message to a message queue (REALTIME)","islower_l":"test for a lowercase letter","lroundl":"round to nearest integer value","mkdir":"make a directory","posix_spawnattr_getsigdefault":"sigdefault attribute of a spawn attributes object (ADVANCED REALTIME)","dbm_close":"database functions","csqrtl":"complex square root functions","tsearch":"manage a binary search tree","posix_spawnattr_setsigdefault":"sigdefault attribute of a spawn attributes object (ADVANCED REALTIME)","tolower":"transliterate uppercase characters to lowercase","strtok":"split string into tokens","symlinkat":"make a symbolic link","futimens":"set file access and modification times","pthread_attr_setinheritsched":"get and set the inheritsched attribute (REALTIME THREADS)","sigpending":"examine pending signals","posix_madvise":"memory advisory information and alignment control (ADVANCED REALTIME)","posix_trace_eventset_ismember":"manipulate trace event type sets (TRACING)","memchr":"find byte in memory","exp2l":"exponential base 2 functions","ctanh":"complex hyperbolic tangent functions","getline":"read a delimited record from stream","recv":"receive a message from a connected socket","fgetwc":"character code from a stream","strncpy":"copy fixed length string, returning a pointer to the array end","tcsetpgrp":"set the foreground process group ID","pthread_create":"thread creation","iswcntrl":"character code","putchar_unlocked":"stdio with explicit client locking","posix_spawnattr_setflags":"flags attribute of a spawn attributes object (ADVANCED REALTIME)","dlerror":"get diagnostic information","asinh":"inverse hyperbolic sine functions","csin":"complex sine functions","pthread_cleanup_push":"establish cancellation handlers","sched_get_priority_max":"get priority limits (REALTIME)","getlogin":"get login name","strcoll_l":"string comparison using collating information","open":"open file","wmemcpy":"copy wide characters in memory","toupper":"transliterate lowercase characters to uppercase","vwscanf":"character formatted input of a stdarg argument list","fopen":"open a stream","expf":"exponential function","newlocale":"create or modify a locale object","isgreaterequal":"test if x is greater than or equal to y","wctob":"byte conversion","_toupper":"transliterate lowercase characters to uppercase","sigprocmask":"examine and change blocked signals","sigsuspend":"wait for a signal","wcsncpy":"character string, returning a pointer to its end","csinl":"complex sine functions","sigset":"signal management","posix_trace_timedgetnext_event":"retrieve a trace event (TRACING)","_Exit":"terminate a process","posix_trace_attr_getstreamfullpolicy":"retrieve and set the behavior of a trace stream (TRACING)","cpowl":"complex power functions","remquof":"remainder functions","sin":"sine function","pthread_mutexattr_gettype":"get and set the mutex type attribute","erfcf":"complementary error functions","shm_open":"open a shared memory object (REALTIME)","getaddrinfo":"get address information","wmemchr":"find a wide character in memory","pthread_mutexattr_setrobust":"get and set the mutex robust attribute","pthread_kill":"send a signal to a thread","snprintf":"print formatted output","close":"close a file descriptor","sched_rr_get_interval":"get execution time limits (REALTIME)","getprotobyname":"network protocol database functions","pthread_rwlock_unlock":"write lock object","posix_trace_eventid_equal":"manipulate the trace event type identifier (TRACING)","nice":"change the nice value of a process","hypotl":"Euclidean distance function","sethostent":"network host database functions","iswupper_l":"character code","casin":"complex arc sine functions","posix_trace_trygetnext_event":"retrieve a trace event (TRACING)","faccessat":"determine accessibility of a file descriptor","log2":"compute base 2 logarithm functions","readdir_r":"read a directory","posix_trace_eventid_get_name":"manipulate the trace event type identifier (TRACING)","posix_trace_eventtypelist_getnext_id":"iterate over a mapping of trace event types (TRACING)","dup":"duplicate an open file descriptor","nexttoward":"point number","uname":"get the name of the current system","scalblnl":"compute exponent using FLT_RADIX","strdup":"duplicate a specific number of bytes from a string","mq_timedreceive":"receive a message from a message queue (REALTIME)","mkdtemp":"create a unique directory or file","fmodl":"point remainder value function","link":"link one file to another file","catanf":"complex arc tangent functions","posix_spawnattr_getsigmask":"sigmask attribute of a spawn attributes object (ADVANCED REALTIME)","hdestroy":"manage hash search table"};
--------------------------------------------------------------------------------
/extension/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huhu/cpp-search-extension/565821eec89cc4dcf519ce9052b18dcb2c433ef2/extension/logo.png
--------------------------------------------------------------------------------
/extension/main.js:
--------------------------------------------------------------------------------
1 | const c = new Compat();
2 | (async () => {
3 | // All dynamic setting items. Those items will been updated
4 | // in chrome.storage.onchange listener callback.
5 | let language = await settings.language;
6 | let isOfflineMode = await settings.isOfflineMode;
7 | let offlineDocPath = await settings.offlineDocPath;
8 | const cppSearcher = new StdSearcher(searchIndex);
9 | const commandManager = new CommandManager(
10 | new HelpCommand(),
11 | new HeaderCommand(headersIndex),
12 | new PosixCommand(posixIndex),
13 | new HistoryCommand(),
14 | );
15 |
16 | const defaultSuggestion = `The ultimate search extension for C/C++!`;
17 | const omnibox = new Omnibox(defaultSuggestion, c.omniboxPageSize());
18 |
19 | omnibox.bootstrap({
20 | onSearch: (query) => {
21 | return cppSearcher.search(query);
22 | },
23 | onFormat: (index, doc) => {
24 | return {
25 | content: isOfflineMode && offlineDocPath ? `${offlineDocPath}${doc.path}.html` : `https://${language}.cppreference.com/w/${doc.path}`,
26 | description: `[${doc.path.startsWith("cpp") ? "C++" : "C"}] ${c.match(c.escape(doc.name))} - ${c.dim(c.escape(doc.description))}`,
27 | }
28 | },
29 | onAppend: (query) => {
30 | return [{
31 | content: `https://${language}.cppreference.com/mwiki/index.php?search=${query}`,
32 | description: `Search C/C++ docs ${c.match(c.escape(query))} on cppreference.com`,
33 | }];
34 | },
35 | afterNavigated: async (query, result) => {
36 | // Ignore the command history
37 | if (query && query.startsWith(":")) return;
38 |
39 | await HistoryCommand.record(query, result);
40 | }
41 | });
42 |
43 | omnibox.addPrefixQueryEvent(":", {
44 | onSearch: (query) => {
45 | return commandManager.execute(query);
46 | }
47 | });
48 |
49 | omnibox.addNoCacheQueries(":");
50 |
51 | chrome.storage.onChanged.addListener(changes => {
52 | if (changes['language']) {
53 | language = changes['language'].newValue;
54 | }
55 | if (changes['offline-mode']) {
56 | isOfflineMode = changes['offline-mode'].newValue;
57 | }
58 | if (changes['offline-path']) {
59 | offlineDocPath = changes['offline-path'].newValue;
60 | }
61 | });
62 | })();
63 |
64 | const chromeAction = chrome.action || chrome.browserAction;
65 | chromeAction.onClicked.addListener(() => {
66 | let managePage = chrome.runtime.getURL("popup/index.html");
67 | chrome.tabs.create({ url: managePage });
68 | });
--------------------------------------------------------------------------------
/extension/popup/index.css:
--------------------------------------------------------------------------------
1 | .main {
2 | padding: 1rem 2rem;
3 | }
4 |
5 | .toast {
6 | width: 100%;
7 | position: fixed;
8 | bottom: 0;
9 | z-index: 9;
10 | text-align: center;
11 | padding: 8px;
12 | display: none;
13 | }
14 |
15 | .title {
16 | font-family: "Google Sans", sans-serif;
17 | font-weight: 500;
18 | padding: 10px 0;
19 | font-size: 22px;
20 | }
21 |
22 | .logo {
23 | width: 150px;
24 | }
25 |
26 | .disable {
27 | pointer-events: none;
28 | opacity: 0.3;
29 | }
30 |
31 | .flex-vertical {
32 | display: flex;
33 | flex-direction: column;
34 | align-items: start;
35 | }
36 |
37 | .offline-doc-path {
38 | width: 100%;
39 | margin: 5px 0;
40 | }
41 |
42 | .toggle {
43 | position: relative;
44 | display: inline-block;
45 | width: 26px;
46 | height: 15px;
47 | vertical-align: middle;
48 | }
49 |
50 | .toggle input {
51 | display: none;
52 | }
53 |
54 | .slider {
55 | position: absolute;
56 | cursor: pointer;
57 | top: 0;
58 | left: 0;
59 | right: 0;
60 | bottom: 0;
61 | background-color: #ccc;
62 | -webkit-transition: .3s;
63 | transition: .3s;
64 | }
65 |
66 | .slider:before {
67 | position: absolute;
68 | content: "";
69 | height: 11px;
70 | width: 11px;
71 | left: 3px;
72 | bottom: 2px;
73 | background-color: white;
74 | -webkit-transition: .3s;
75 | transition: .3s;
76 | }
77 |
78 | input:checked + .slider {
79 | background-color: #333;
80 | }
81 |
82 | input:focus + .slider {
83 | box-shadow: 0 0 1px #333;
84 | }
85 |
86 | input:checked + .slider:before {
87 | -webkit-transform: translateX(10px);
88 | -ms-transform: translateX(10px);
89 | transform: translateX(10px);
90 | }
--------------------------------------------------------------------------------
/extension/popup/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
C/C++ Search Extension
35 |
36 |
37 | Language:
38 |
39 |
40 |
41 |
52 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/extension/popup/index.js:
--------------------------------------------------------------------------------
1 | const toast = new Toast(".toast");
2 | const compat = new Compat();
3 |
4 | const LANGUAGES = {
5 | "en": "English",
6 | "de": "Deutsch",
7 | "es": "Español",
8 | "fr": "Français",
9 | "it": "Italiano",
10 | "ja": "日本語",
11 | "pt": "Português",
12 | "ru": "Русский",
13 | "zh": "中文"
14 | };
15 |
16 | document.addEventListener('DOMContentLoaded', async function () {
17 | const languageSelect = document.getElementById('language');
18 | Object.entries(LANGUAGES).forEach(([value, lang]) => {
19 | let opt = document.createElement('option');
20 | opt.value = value;
21 | opt.innerHTML = lang;
22 | languageSelect.appendChild(opt);
23 | });
24 | languageSelect.value = await settings.language;
25 | languageSelect.onchange = (event) => {
26 | settings.language = event.target.value;
27 | };
28 |
29 | // Offline mode checkbox
30 | if (!(await settings.offlineDocPath)) {
31 | // If the offline doc path not exists, turn off the offline mode.
32 | settings.isOfflineMode = false;
33 | }
34 | const offlineModeCheckbox = document.getElementById('offline-mode');
35 | const checkedState = await settings.isOfflineMode;
36 | offlineModeCheckbox.checked = checkedState;
37 | toggleOfflinePathEnableState(checkedState);
38 | offlineModeCheckbox.onchange = function (event) {
39 | const checked = event.target.checked;
40 | settings.isOfflineMode = checked;
41 | toggleOfflinePathEnableState(checked);
42 | };
43 |
44 | // Offline doc path
45 | const offlineDocPath = document.querySelector('.offline-doc-path');
46 | offlineDocPath.value = await settings.offlineDocPath;
47 | offlineDocPath.onchange = function (event) {
48 | let path = event.target.value;
49 | if (compat.browserType() === 'firefox' && (path.startsWith('/') || path.startsWith('file://'))) {
50 | toast.error("Sorry, Firfox doesn't support `file://` Proto, you can use http server instead.")
51 | toast.dismiss(5000);
52 | return;
53 | }
54 |
55 | // Don't validate the doc path. Let the user decide it!
56 | settings.offlineDocPath = path;
57 | toast.success("Great! Your local doc path is valid!");
58 | toast.dismiss(3000);
59 | };
60 | }, false);
61 |
62 |
63 | function toggleOfflinePathEnableState(enable) {
64 | const offlineDocPath = document.querySelector('.offline-doc-path');
65 | if (enable) {
66 | offlineDocPath.classList.remove('disable');
67 | offlineDocPath.classList.add('enable');
68 | } else {
69 | offlineDocPath.classList.remove('enable');
70 | offlineDocPath.classList.add('disable');
71 | }
72 | }
--------------------------------------------------------------------------------
/extension/search/std.js:
--------------------------------------------------------------------------------
1 | function StdSearcher(rawIndex) {
2 | this.index = rawIndex;
3 | this.docs = Object.keys(this.index);
4 | }
5 |
6 | StdSearcher.prototype.search = function (keyword) {
7 | keyword = keyword.toLowerCase();
8 | let result = [];
9 | for (let doc of this.docs) {
10 | if (doc.length < keyword.length) continue;
11 |
12 | let index = doc.toLowerCase().indexOf(keyword);
13 | if (index !== -1) {
14 | result.push({
15 | name: doc,
16 | matchIndex: index,
17 | })
18 | }
19 | }
20 |
21 | // Sort the result, the lower matchIndex, the shorter length, the higher rank.
22 | return result.sort((a, b) => {
23 | if (a.matchIndex === b.matchIndex) {
24 | return a.name.length - b.name.length;
25 | }
26 | return a.matchIndex - b.matchIndex;
27 | }).map(item => {
28 | let [path, description] = this.index[item.name];
29 | return {
30 | name: item.name,
31 | path,
32 | description,
33 | }
34 | });
35 | };
--------------------------------------------------------------------------------
/extension/service-worker.js:
--------------------------------------------------------------------------------
1 | importScripts(
2 | 'core/compat.js',
3 | 'core/omnibox.js',
4 | 'core/query-event.js',
5 | 'core/storage.js',
6 | 'core/command/base.js',
7 | 'core/command/history.js',
8 | 'core/command/manager.js',
9 | 'core/command/open.js',
10 | 'core/command/simple.js',
11 | "command/header.js",
12 | "command/help.js",
13 | "command/posix.js",
14 | "index/headers.js",
15 | "index/posix.js",
16 | "index/std.js",
17 | "search/std.js",
18 | "settings.js",
19 | 'main.js',
20 | );
21 |
--------------------------------------------------------------------------------
/extension/settings.js:
--------------------------------------------------------------------------------
1 | const settings = {
2 | get language() {
3 | return (async () => {
4 | return await storage.getItem('language') || 'en';
5 | })();
6 | },
7 | set language(value) {
8 | storage.setItem('language', value);
9 | },
10 | get isOfflineMode() {
11 | return (async () => {
12 | return await storage.getItem('offline-mode') || false;
13 | })();
14 | },
15 | set isOfflineMode(mode) {
16 | storage.setItem('offline-mode', mode);
17 | },
18 | get offlineDocPath() {
19 | return (async () => {
20 | return await storage.getItem('offline-path');
21 | })();
22 | },
23 | set offlineDocPath(path) {
24 | if (path.startsWith('/')) {
25 | path = `file://${path}`;
26 | }
27 |
28 | storage.setItem('offline-path', path);
29 | },
30 | };
--------------------------------------------------------------------------------
/manifest.jsonnet:
--------------------------------------------------------------------------------
1 | local utils = import 'core/utils.libsonnet';
2 | local icons() = {
3 | [size]: 'logo.png'
4 | for size in ['16', '48', '128']
5 | };
6 |
7 | local name = 'C/C++ Search Extension';
8 | local version = '0.4.0';
9 | local keyword = 'cc';
10 | local description = 'The ultimate search extension for C/C++';
11 |
12 | local browser = std.extVar('browser');
13 | local json = if std.member(['chrome', 'edge'], browser) then
14 | local manifest_v3 = import 'core/manifest_v3.libsonnet';
15 | manifest_v3.new(name, keyword, description, version, service_worker='service-worker.js')
16 | else
17 | local manifest_v2 = import 'core/manifest.libsonnet';
18 | manifest_v2.new(name, keyword, description, version)
19 | .addBackgroundScripts(utils.js_files('command', ['help', 'header', 'posix']))
20 | .addBackgroundScripts(utils.js_files('index', ['std', 'headers', 'posix']))
21 | .addBackgroundScripts(utils.js_files('search', ['std']))
22 | .addBackgroundScripts(['settings.js', 'main.js']);
23 |
24 | json
25 | .addIcons(icons())
26 | .setOptionsUi('popup/index.html')
27 | .addPermissions(['storage', 'unlimitedStorage'])
28 |
--------------------------------------------------------------------------------
/tools/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 | members = [
3 | "std",
4 | "posix",
5 | ]
--------------------------------------------------------------------------------
/tools/headers.js:
--------------------------------------------------------------------------------
1 | // https://en.cppreference.com/w/cpp/header
2 | let headers = [];
3 | for (let node of document.querySelectorAll(".t-dsc-begin .t-dsc")) {
4 | if (node.querySelectorAll("td").length === 2) {
5 | let header = {};
6 | let td = node.querySelectorAll("td")[0];
7 | let a = td.querySelector("a");
8 | if (a && !a.title.includes("page does not exist")) {
9 | header.name = a.text;
10 | header.path = a.title;
11 | header.description = node.querySelectorAll("td")[1].textContent.trim();
12 | headers.push(header);
13 | }
14 | }
15 | }
16 | console.log(JSON.stringify(headers));
--------------------------------------------------------------------------------
/tools/posix/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "posix"
3 | version = "0.1.0"
4 | authors = ["Folyd "]
5 | edition = "2018"
6 | publish = false
7 |
8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
9 |
10 | [dependencies]
11 | select = "0.5.0"
12 | serde_json = "1.0.61"
13 |
--------------------------------------------------------------------------------
/tools/posix/src/main.rs:
--------------------------------------------------------------------------------
1 | use std::collections::HashMap;
2 | use std::error::Error;
3 | use std::path::Path;
4 | use std::{env, fs};
5 |
6 | use select::document::Document;
7 | use select::node::Data;
8 | use select::predicate::{And, Attr, Name, Not};
9 |
10 | type Result = std::result::Result>;
11 |
12 | fn main() -> Result<()> {
13 | // A path such as: ~/Downloads/susv4-2018/idx
14 | // Download from: https://pubs.opengroup.org/onlinepubs/9799919799/download/index.html
15 | let dir = env::args().nth(1).unwrap();
16 | let mut map = HashMap::new();
17 | for entry in fs::read_dir(dir)? {
18 | let entry = entry?;
19 | if entry
20 | .file_name()
21 | .to_str()
22 | // Filter i[a-z].html files
23 | .filter(|p| p.starts_with('i'))
24 | .is_some()
25 | {
26 | let html = fs::read_to_string(entry.path())?;
27 | let document = Document::from(html.as_str());
28 | for node in document.find(And(Name("li"), Attr("type", "disc"))) {
29 | //
30 | // fabsf()
31 | // , fabs, fabsl - absolute value function
32 | //
33 | if let Some(anchor) = node
34 | .first_child()
35 | .filter(|n| {
36 | n.attr("href")
37 | .filter(|attr| attr.starts_with("../functions/"))
38 | .is_some()
39 | })
40 | .map(|n| n.text())
41 | {
42 | // turn:
43 | // "mlock(), munlock - lock or unlock a range of process address space (REALTIME)"
44 | // to:
45 | // "lock or unlock a range of process address space (REALTIME)",
46 | if let Some(text) = node
47 | .find(Not(Name("a")))
48 | // Only filter Data::Text types
49 | .filter(|n| matches!(n.data(), Data::Text(_)))
50 | .map(|n| n.text())
51 | .collect::()
52 | .split('-')
53 | .last()
54 | {
55 | map.insert(anchor.trim().replace("()", ""), text.trim().to_string());
56 | }
57 | }
58 | }
59 | }
60 | }
61 |
62 | let contents = serde_json::to_string(&map)?;
63 | let path = Path::new("posix.js");
64 | fs::write(path, format!("var posixIndex={};", contents))?;
65 | Ok(())
66 | }
67 |
--------------------------------------------------------------------------------
/tools/std/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "std"
3 | version = "0.1.0"
4 | authors = ["Folyd "]
5 | edition = "2018"
6 | publish = false
7 |
8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
9 |
10 | [dependencies]
11 | serde = "1.0"
12 | serde_json = "1.0"
13 | serde_derive = "1.0"
14 | select = "0.5.0"
--------------------------------------------------------------------------------
/tools/std/search-c:
--------------------------------------------------------------------------------
1 | size_t => c/types/size_t
2 | ptrdiff_t => c/types/ptrdiff_t
3 | NULL => c/types/NULL
4 | max_align_t => c/types/max_align_t
5 | offsetof => c/types/offsetof
6 | int8_t => c/types/integer
7 | int16_t => c/types/integer
8 | int32_t => c/types/integer
9 | int64_t => c/types/integer
10 | int_fast8_t => c/types/integer
11 | int_fast16_t => c/types/integer
12 | int_fast32_t => c/types/integer
13 | int_fast64_t => c/types/integer
14 | int_least8_t => c/types/integer
15 | int_least16_t => c/types/integer
16 | int_least32_t => c/types/integer
17 | int_least64_t => c/types/integer
18 | intmax_t => c/types/integer
19 | intptr_t => c/types/integer
20 | uint8_t => c/types/integer
21 | uint16_t => c/types/integer
22 | uint32_t => c/types/integer
23 | uint64_t => c/types/integer
24 | uint_fast8_t => c/types/integer
25 | uint_fast16_t => c/types/integer
26 | uint_fast32_t => c/types/integer
27 | uint_fast64_t => c/types/integer
28 | uint_least8_t => c/types/integer
29 | uint_least16_t => c/types/integer
30 | uint_least32_t => c/types/integer
31 | uint_least64_t => c/types/integer
32 | uintmax_t => c/types/integer
33 | uintptr_t => c/types/integer
34 | INT8_MIN => c/types/integer
35 | INT16_MIN => c/types/integer
36 | INT32_MIN => c/types/integer
37 | INT64_MIN => c/types/integer
38 | INT_FAST8_MIN => c/types/integer
39 | INT_FAST16_MIN => c/types/integer
40 | INT_FAST32_MIN => c/types/integer
41 | INT_FAST64_MIN => c/types/integer
42 | INT_LEAST8_MIN => c/types/integer
43 | INT_LEAST16_MIN => c/types/integer
44 | INT_LEAST32_MIN => c/types/integer
45 | INT_LEAST64_MIN => c/types/integer
46 | INTPTR_MIN => c/types/integer
47 | INTMAX_MIN => c/types/integer
48 | INT8_MAX => c/types/integer
49 | INT16_MAX => c/types/integer
50 | INT32_MAX => c/types/integer
51 | INT64_MAX => c/types/integer
52 | INT_FAST8_MAX => c/types/integer
53 | INT_FAST16_MAX => c/types/integer
54 | INT_FAST32_MAX => c/types/integer
55 | INT_FAST64_MAX => c/types/integer
56 | INT_LEAST8_MAX => c/types/integer
57 | INT_LEAST16_MAX => c/types/integer
58 | INT_LEAST32_MAX => c/types/integer
59 | INT_LEAST64_MAX => c/types/integer
60 | INTPTR_MAX => c/types/integer
61 | INTMAX_MAX => c/types/integer
62 | UINT8_MAX => c/types/integer
63 | UINT16_MAX => c/types/integer
64 | UINT32_MAX => c/types/integer
65 | UINT64_MAX => c/types/integer
66 | UINT_FAST8_MAX => c/types/integer
67 | UINT_FAST16_MAX => c/types/integer
68 | UINT_FAST32_MAX => c/types/integer
69 | UINT_FAST64_MAX => c/types/integer
70 | UINT_LEAST8_MAX => c/types/integer
71 | UINT_LEAST16_MAX => c/types/integer
72 | UINT_LEAST32_MAX => c/types/integer
73 | UINT_LEAST64_MAX => c/types/integer
74 | UINTPTR_MAX => c/types/integer
75 | UINTMAX_MAX => c/types/integer
76 | PRId8 => c/types/integer
77 | PRId16 => c/types/integer
78 | PRId32 => c/types/integer
79 | PRId64 => c/types/integer
80 | PRIdLEAST8 => c/types/integer
81 | PRIdLEAST16 => c/types/integer
82 | PRIdLEAST32 => c/types/integer
83 | PRIdLEAST64 => c/types/integer
84 | PRIdFAST8 => c/types/integer
85 | PRIdFAST16 => c/types/integer
86 | PRIdFAST32 => c/types/integer
87 | PRIdFAST64 => c/types/integer
88 | PRIdMAX => c/types/integer
89 | PRIdPTR => c/types/integer
90 | PRIi8 => c/types/integer
91 | PRIi16 => c/types/integer
92 | PRIi32 => c/types/integer
93 | PRIi64 => c/types/integer
94 | PRIiLEAST8 => c/types/integer
95 | PRIiLEAST16 => c/types/integer
96 | PRIiLEAST32 => c/types/integer
97 | PRIiLEAST64 => c/types/integer
98 | PRIiFAST8 => c/types/integer
99 | PRIiFAST16 => c/types/integer
100 | PRIiFAST32 => c/types/integer
101 | PRIiFAST64 => c/types/integer
102 | PRIiMAX => c/types/integer
103 | PRIiPTR => c/types/integer
104 | PRIu8 => c/types/integer
105 | PRIu16 => c/types/integer
106 | PRIu32 => c/types/integer
107 | PRIu64 => c/types/integer
108 | PRIuLEAST8 => c/types/integer
109 | PRIuLEAST16 => c/types/integer
110 | PRIuLEAST32 => c/types/integer
111 | PRIuLEAST64 => c/types/integer
112 | PRIuFAST8 => c/types/integer
113 | PRIuFAST16 => c/types/integer
114 | PRIuFAST32 => c/types/integer
115 | PRIuFAST64 => c/types/integer
116 | PRIuMAX => c/types/integer
117 | PRIuPTR => c/types/integer
118 | PRIo8 => c/types/integer
119 | PRIo16 => c/types/integer
120 | PRIo32 => c/types/integer
121 | PRIo64 => c/types/integer
122 | PRIoLEAST8 => c/types/integer
123 | PRIoLEAST16 => c/types/integer
124 | PRIoLEAST32 => c/types/integer
125 | PRIoLEAST64 => c/types/integer
126 | PRIoFAST8 => c/types/integer
127 | PRIoFAST16 => c/types/integer
128 | PRIoFAST32 => c/types/integer
129 | PRIoFAST64 => c/types/integer
130 | PRIoMAX => c/types/integer
131 | PRIoPTR => c/types/integer
132 | PRIx8 => c/types/integer
133 | PRIx16 => c/types/integer
134 | PRIx32 => c/types/integer
135 | PRIx64 => c/types/integer
136 | PRIxLEAST8 => c/types/integer
137 | PRIxLEAST16 => c/types/integer
138 | PRIxLEAST32 => c/types/integer
139 | PRIxLEAST64 => c/types/integer
140 | PRIxFAST8 => c/types/integer
141 | PRIxFAST16 => c/types/integer
142 | PRIxFAST32 => c/types/integer
143 | PRIxFAST64 => c/types/integer
144 | PRIxMAX => c/types/integer
145 | PRIxPTR => c/types/integer
146 | PRIX8 => c/types/integer
147 | PRIX16 => c/types/integer
148 | PRIX32 => c/types/integer
149 | PRIX64 => c/types/integer
150 | PRIXLEAST8 => c/types/integer
151 | PRIXLEAST16 => c/types/integer
152 | PRIXLEAST32 => c/types/integer
153 | PRIXLEAST64 => c/types/integer
154 | PRIXFAST8 => c/types/integer
155 | PRIXFAST16 => c/types/integer
156 | PRIXFAST32 => c/types/integer
157 | PRIXFAST64 => c/types/integer
158 | PRIXMAX => c/types/integer
159 | PRIXPTR => c/types/integer
160 | SCNd8 => c/types/integer
161 | SCNd16 => c/types/integer
162 | SCNd32 => c/types/integer
163 | SCNd64 => c/types/integer
164 | SCNdLEAST8 => c/types/integer
165 | SCNdLEAST16 => c/types/integer
166 | SCNdLEAST32 => c/types/integer
167 | SCNdLEAST64 => c/types/integer
168 | SCNdFAST8 => c/types/integer
169 | SCNdFAST16 => c/types/integer
170 | SCNdFAST32 => c/types/integer
171 | SCNdFAST64 => c/types/integer
172 | SCNdMAX => c/types/integer
173 | SCNdPTR => c/types/integer
174 | SCNi8 => c/types/integer
175 | SCNi16 => c/types/integer
176 | SCNi32 => c/types/integer
177 | SCNi64 => c/types/integer
178 | SCNiLEAST8 => c/types/integer
179 | SCNiLEAST16 => c/types/integer
180 | SCNiLEAST32 => c/types/integer
181 | SCNiLEAST64 => c/types/integer
182 | SCNiFAST8 => c/types/integer
183 | SCNiFAST16 => c/types/integer
184 | SCNiFAST32 => c/types/integer
185 | SCNiFAST64 => c/types/integer
186 | SCNiMAX => c/types/integer
187 | SCNiPTR => c/types/integer
188 | SCNu8 => c/types/integer
189 | SCNu16 => c/types/integer
190 | SCNu32 => c/types/integer
191 | SCNu64 => c/types/integer
192 | SCNuLEAST8 => c/types/integer
193 | SCNuLEAST16 => c/types/integer
194 | SCNuLEAST32 => c/types/integer
195 | SCNuLEAST64 => c/types/integer
196 | SCNuFAST8 => c/types/integer
197 | SCNuFAST16 => c/types/integer
198 | SCNuFAST32 => c/types/integer
199 | SCNuFAST64 => c/types/integer
200 | SCNuMAX => c/types/integer
201 | SCNuPTR => c/types/integer
202 | SCNo8 => c/types/integer
203 | SCNo16 => c/types/integer
204 | SCNo32 => c/types/integer
205 | SCNo64 => c/types/integer
206 | SCNoLEAST8 => c/types/integer
207 | SCNoLEAST16 => c/types/integer
208 | SCNoLEAST32 => c/types/integer
209 | SCNoLEAST64 => c/types/integer
210 | SCNoFAST8 => c/types/integer
211 | SCNoFAST16 => c/types/integer
212 | SCNoFAST32 => c/types/integer
213 | SCNoFAST64 => c/types/integer
214 | SCNoMAX => c/types/integer
215 | SCNoPTR => c/types/integer
216 | SCNx8 => c/types/integer
217 | SCNx16 => c/types/integer
218 | SCNx32 => c/types/integer
219 | SCNx64 => c/types/integer
220 | SCNxLEAST8 => c/types/integer
221 | SCNxLEAST16 => c/types/integer
222 | SCNxLEAST32 => c/types/integer
223 | SCNxLEAST64 => c/types/integer
224 | SCNxFAST8 => c/types/integer
225 | SCNxFAST16 => c/types/integer
226 | SCNxFAST32 => c/types/integer
227 | SCNxFAST64 => c/types/integer
228 | SCNxMAX => c/types/integer
229 | SCNxPTR => c/types/integer
230 | SCNX8 => c/types/integer
231 | SCNX16 => c/types/integer
232 | SCNX32 => c/types/integer
233 | SCNX64 => c/types/integer
234 | SCNXLEAST8 => c/types/integer
235 | SCNXLEAST16 => c/types/integer
236 | SCNXLEAST32 => c/types/integer
237 | SCNXLEAST64 => c/types/integer
238 | SCNXFAST8 => c/types/integer
239 | SCNXFAST16 => c/types/integer
240 | SCNXFAST32 => c/types/integer
241 | SCNXFAST64 => c/types/integer
242 | SCNXMAX => c/types/integer
243 | SCNXPTR => c/types/integer
244 | PTRDIFF_MIN => c/types/limits
245 | PTRDIFF_MAX => c/types/limits
246 | SIZE_MAX => c/types/limits
247 | SIG_ATOMIC_MIN => c/types/limits
248 | SIG_ATOMIC_MAX => c/types/limits
249 | WCHAR_MIN => c/types/limits
250 | WCHAR_MAX => c/types/limits
251 | WINT_MIN => c/types/limits
252 | WINT_MAX => c/types/limits
253 | CHAR_BIT => c/types/limits
254 | MB_LEN_MAX => c/types/limits
255 | CHAR_MIN => c/types/limits
256 | CHAR_MAX => c/types/limits
257 | SCHAR_MIN => c/types/limits
258 | SHRT_MIN => c/types/limits
259 | INT_MIN => c/types/limits
260 | LONG_MIN => c/types/limits
261 | LLONG_MIN => c/types/limits
262 | SCHAR_MAX => c/types/limits
263 | SHRT_MAX => c/types/limits
264 | INT_MAX => c/types/limits
265 | LONG_MAX => c/types/limits
266 | LLONG_MAX => c/types/limits
267 | UCHAR_MAX => c/types/limits
268 | USHRT_MAX => c/types/limits
269 | UINT_MAX => c/types/limits
270 | ULONG_MAX => c/types/limits
271 | ULLONG_MAX => c/types/limits
272 | FLT_RADIX => c/types/limits
273 | DECIMAL_DIG => c/types/limits
274 | FLT_MIN => c/types/limits
275 | DBL_MIN => c/types/limits
276 | LDBL_MIN => c/types/limits
277 | FLT_MAX => c/types/limits
278 | DBL_MAX => c/types/limits
279 | LDBL_MAX => c/types/limits
280 | FLT_EPSILON => c/types/limits
281 | DBL_EPSILON => c/types/limits
282 | LDBL_EPSILON => c/types/limits
283 | FLT_DIG => c/types/limits
284 | DBL_DIG => c/types/limits
285 | LDBL_DIG => c/types/limits
286 | FLT_MANT_DIG => c/types/limits
287 | DBL_MANT_DIG => c/types/limits
288 | LDBL_MANT_DIG => c/types/limits
289 | FLT_MIN_EXP => c/types/limits
290 | DBL_MIN_EXP => c/types/limits
291 | LDBL_MIN_EXP => c/types/limits
292 | FLT_MIN_10_EXP => c/types/limits
293 | DBL_MIN_10_EXP => c/types/limits
294 | LDBL_MIN_10_EXP => c/types/limits
295 | FLT_MAX_EXP => c/types/limits
296 | DBL_MAX_EXP => c/types/limits
297 | LDBL_MAX_EXP => c/types/limits
298 | FLT_MAX_10_EXP => c/types/limits
299 | DBL_MAX_10_EXP => c/types/limits
300 | LDBL_MAX_10_EXP => c/types/limits
301 | FLT_ROUNDS => c/types/limits/FLT_ROUNDS
302 | FLT_EVAL_METHOD => c/types/limits/FLT_EVAL_METHOD
303 | malloc => c/memory/malloc
304 | calloc => c/memory/calloc
305 | realloc => c/memory/realloc
306 | free => c/memory/free
307 | assert => c/error/assert
308 | errno => c/error/errno
309 | E2BIG => c/error/errno_macros
310 | EACCESS => c/error/errno_macros
311 | EADDRINUSE => c/error/errno_macros
312 | EADDRNOTAVAIL => c/error/errno_macros
313 | EAFNOSUPPORT => c/error/errno_macros
314 | EAGAIN => c/error/errno_macros
315 | EALREADY => c/error/errno_macros
316 | EBADF => c/error/errno_macros
317 | EBADMSG => c/error/errno_macros
318 | EBUSY => c/error/errno_macros
319 | ECANCELED => c/error/errno_macros
320 | ECHILD => c/error/errno_macros
321 | ECONNABORTED => c/error/errno_macros
322 | ECONNREFUSED => c/error/errno_macros
323 | ECONNRESET => c/error/errno_macros
324 | EDEADLK => c/error/errno_macros
325 | EDESTADDRREQ => c/error/errno_macros
326 | EDOM => c/error/errno_macros
327 | EEXIST => c/error/errno_macros
328 | EFAULT => c/error/errno_macros
329 | EFBIG => c/error/errno_macros
330 | EHOSTUNREACH => c/error/errno_macros
331 | EIDRM => c/error/errno_macros
332 | EILSEQ => c/error/errno_macros
333 | EINPROGRESS => c/error/errno_macros
334 | EINTR => c/error/errno_macros
335 | EINVAL => c/error/errno_macros
336 | EIO => c/error/errno_macros
337 | EISCONN => c/error/errno_macros
338 | EISDIR => c/error/errno_macros
339 | ELOOP => c/error/errno_macros
340 | EMFILE => c/error/errno_macros
341 | EMLINK => c/error/errno_macros
342 | EMSGSIZE => c/error/errno_macros
343 | ENAMETOOLONG => c/error/errno_macros
344 | ENETDOWN => c/error/errno_macros
345 | ENETRESET => c/error/errno_macros
346 | ENETUNREACH => c/error/errno_macros
347 | ENFILE => c/error/errno_macros
348 | ENOBUFS => c/error/errno_macros
349 | ENODATA => c/error/errno_macros
350 | ENODEV => c/error/errno_macros
351 | ENOENT => c/error/errno_macros
352 | ENOEXEC => c/error/errno_macros
353 | ENOLCK => c/error/errno_macros
354 | ENOLINK => c/error/errno_macros
355 | ENOMEM => c/error/errno_macros
356 | ENOMSG => c/error/errno_macros
357 | ENOPROTOOPT => c/error/errno_macros
358 | ENOSPC => c/error/errno_macros
359 | ENOSR => c/error/errno_macros
360 | ENOSTR => c/error/errno_macros
361 | ENOSYS => c/error/errno_macros
362 | ENOTCONN => c/error/errno_macros
363 | ENOTDIR => c/error/errno_macros
364 | ENOTEMPTY => c/error/errno_macros
365 | ENOTRECOVERABLE => c/error/errno_macros
366 | ENOTSOCK => c/error/errno_macros
367 | ENOTSUP => c/error/errno_macros
368 | ENOTTY => c/error/errno_macros
369 | ENXIO => c/error/errno_macros
370 | EOPNOTSUPP => c/error/errno_macros
371 | EOVERFLOW => c/error/errno_macros
372 | EOWNERDEAD => c/error/errno_macros
373 | EPERM => c/error/errno_macros
374 | EPIPE => c/error/errno_macros
375 | EPROTO => c/error/errno_macros
376 | EPROTONOSUPPORT => c/error/errno_macros
377 | EPROTOTYPE => c/error/errno_macros
378 | ERANGE => c/error/errno_macros
379 | EROFS => c/error/errno_macros
380 | ESPIPE => c/error/errno_macros
381 | ESRCH => c/error/errno_macros
382 | ETIME => c/error/errno_macros
383 | ETIMEDOUT => c/error/errno_macros
384 | ETXTBSY => c/error/errno_macros
385 | EWOULDBLOCK => c/error/errno_macros
386 | EXDEV => c/error/errno_macros
387 | abort => c/program/abort
388 | exit => c/program/exit
389 | quick_exit => c/program/quick_exit
390 | _Exit => c/program/_Exit
391 | atexit => c/program/atexit
392 | at_quick_exit => c/program/at_quick_exit
393 | EXIT_SUCCESS => c/program/EXIT_status
394 | EXIT_FAILURE => c/program/EXIT_status
395 | system => c/program/system
396 | getenv => c/program/getenv
397 | signal => c/program/signal
398 | raise => c/program/raise
399 | sig_atomic_t => c/program/sig_atomic_t
400 | SIG_DFL => c/program/SIG_strategies
401 | SIG_IGN => c/program/SIG_strategies
402 | SIG_ERR => c/program/SIG_ERR
403 | SIGABRT => c/program/SIG_types
404 | SIGFPE => c/program/SIG_types
405 | SIGILL => c/program/SIG_types
406 | SIGINT => c/program/SIG_types
407 | SIGSEGV => c/program/SIG_types
408 | SIGTERM => c/program/SIG_types
409 | longjmp => c/program/longjmp
410 | setjmp => c/program/setjmp
411 | jmp_buf => c/program/jmp_buf
412 | difftime => c/chrono/difftime
413 | time => c/chrono/time
414 | clock => c/chrono/clock
415 | asctime => c/chrono/asctime
416 | ctime => c/chrono/ctime
417 | strftime => c/chrono/strftime
418 | wcsftime => c/chrono/wcsftime
419 | gmtime => c/chrono/gmtime
420 | localtime => c/chrono/localtime
421 | mktime => c/chrono/mktime
422 | CLOCKS_PER_SEC => c/chrono/CLOCKS_PER_SEC
423 | tm => c/chrono/tm
424 | time_t => c/chrono/time_t
425 | clock_t => c/chrono/clock_t
426 | timespec => c/chrono/timespec
427 | isalnum => c/string/byte/isalnum
428 | isalpha => c/string/byte/isalpha
429 | islower => c/string/byte/islower
430 | isupper => c/string/byte/isupper
431 | isdigit => c/string/byte/isdigit
432 | isxdigit => c/string/byte/isxdigit
433 | iscntrl => c/string/byte/iscntrl
434 | isgraph => c/string/byte/isgraph
435 | isspace => c/string/byte/isspace
436 | isblank => c/string/byte/isblank
437 | isprint => c/string/byte/isprint
438 | ispunct => c/string/byte/ispunct
439 | tolower => c/string/byte/tolower
440 | toupper => c/string/byte/toupper
441 | atof => c/string/byte/atof
442 | atoi => c/string/byte/atoi
443 | atol => c/string/byte/atoi
444 | atoll => c/string/byte/atoi
445 | strtol => c/string/byte/strtol
446 | strtoll => c/string/byte/strtol
447 | strtoul => c/string/byte/strtoul
448 | strtoull => c/string/byte/strtoul
449 | strtof => c/string/byte/strtof
450 | strtod => c/string/byte/strtof
451 | strtold => c/string/byte/strtof
452 | strtoimax => c/string/byte/strtoimax
453 | strtoumax => c/string/byte/strtoimax
454 | strcpy => c/string/byte/strcpy
455 | strncpy => c/string/byte/strncpy
456 | strcat => c/string/byte/strcat
457 | strncat => c/string/byte/strncat
458 | strxfrm => c/string/byte/strxfrm
459 | strlen => c/string/byte/strlen
460 | strcmp => c/string/byte/strcmp
461 | strncmp => c/string/byte/strncmp
462 | strcoll => c/string/byte/strcoll
463 | strchr => c/string/byte/strchr
464 | strrchr => c/string/byte/strrchr
465 | strspn => c/string/byte/strspn
466 | strcspn => c/string/byte/strcspn
467 | strpbrk => c/string/byte/strpbrk
468 | strstr => c/string/byte/strstr
469 | strtok => c/string/byte/strtok
470 | memchr => c/string/byte/memchr
471 | memcmp => c/string/byte/memcmp
472 | memset => c/string/byte/memset
473 | memcpy => c/string/byte/memcpy
474 | memmove => c/string/byte/memmove
475 | strerror => c/string/byte/strerror
476 | mblen => c/string/multibyte/mblen
477 | mbtowc => c/string/multibyte/mbtowc
478 | wctomb => c/string/multibyte/wctomb
479 | mbstowcs => c/string/multibyte/mbstowcs
480 | wcstombs => c/string/multibyte/wcstombs
481 | mbsinit => c/string/multibyte/mbsinit
482 | btowc => c/string/multibyte/btowc
483 | wctob => c/string/multibyte/wctob
484 | mbrlen => c/string/multibyte/mbrlen
485 | mbrtowc => c/string/multibyte/mbrtowc
486 | wcrtomb => c/string/multibyte/wcrtomb
487 | mbsrtowcs => c/string/multibyte/mbsrtowcs
488 | wcsrtombs => c/string/multibyte/wcsrtombs
489 | mbrtoc16 => c/string/multibyte/mbrtoc16
490 | c16rtomb => c/string/multibyte/c16rtomb
491 | mbrtoc32 => c/string/multibyte/mbrtoc32
492 | c32rtomb => c/string/multibyte/c32rtomb
493 | mbstate_t => c/string/multibyte/mbstate_t
494 | iswalnum => c/string/wide/iswalnum
495 | iswalpha => c/string/wide/iswalpha
496 | iswlower => c/string/wide/iswlower
497 | iswupper => c/string/wide/iswupper
498 | iswdigit => c/string/wide/iswdigit
499 | iswxdigit => c/string/wide/iswxdigit
500 | iswcntrl => c/string/wide/iswcntrl
501 | iswgraph => c/string/wide/iswgraph
502 | iswspace => c/string/wide/iswspace
503 | iswblank => c/string/wide/iswblank
504 | iswprint => c/string/wide/iswprint
505 | iswpunct => c/string/wide/iswpunct
506 | iswctype => c/string/wide/iswctype
507 | wctype => c/string/wide/wctype
508 | towlower => c/string/wide/towlower
509 | towupper => c/string/wide/towupper
510 | towctrans => c/string/wide/towctrans
511 | wctrans => c/string/wide/wctrans
512 | wcstof => c/string/wide/wcstof
513 | wcstod => c/string/wide/wcstof
514 | wcstold => c/string/wide/wcstof
515 | wcstol => c/string/wide/wcstol
516 | wcstoll => c/string/wide/wcstol
517 | wcstoul => c/string/wide/wcstoul
518 | wcstoull => c/string/wide/wcstoul
519 | wcstoimax => c/string/wide/wcstoimax
520 | wcstoumax => c/string/wide/wcstoimax
521 | wcscpy => c/string/wide/wcscpy
522 | wcsncpy => c/string/wide/wcsncpy
523 | wcscat => c/string/wide/wcscat
524 | wcsncat => c/string/wide/wcsncat
525 | wcsxfrm => c/string/wide/wcsxfrm
526 | wcslen => c/string/wide/wcslen
527 | wcscmp => c/string/wide/wcscmp
528 | wcsncmp => c/string/wide/wcsncmp
529 | wcscoll => c/string/wide/wcscoll
530 | wcschr => c/string/wide/wcschr
531 | wcsrchr => c/string/wide/wcsrchr
532 | wcsspn => c/string/wide/wcsspn
533 | wcscspn => c/string/wide/wcscspn
534 | wcspbrk => c/string/wide/wcspbrk
535 | wcsstr => c/string/wide/wcsstr
536 | wcstok => c/string/wide/wcstok
537 | wmemchr => c/string/wide/wmemchr
538 | wmemcmp => c/string/wide/wmemcmp
539 | wmemset => c/string/wide/wmemset
540 | wmemcpy => c/string/wide/wmemcpy
541 | wmemmove => c/string/wide/wmemmove
542 | abs => c/numeric/math/abs
543 | labs => c/numeric/math/abs
544 | llabs => c/numeric/math/abs
545 | fabs => c/numeric/math/fabs
546 | div => c/numeric/math/div
547 | ldiv => c/numeric/math/div
548 | fmod => c/numeric/math/fmod
549 | remainder => c/numeric/math/remainder
550 | remquo => c/numeric/math/remquo
551 | fma => c/numeric/math/fma
552 | fmax => c/numeric/math/fmax
553 | fmin => c/numeric/math/fmin
554 | fdim => c/numeric/math/fdim
555 | nan => c/numeric/math/nan
556 | nanf => c/numeric/math/nan
557 | nanl => c/numeric/math/nan
558 | exp => c/numeric/math/exp
559 | exp2 => c/numeric/math/exp2
560 | expm1 => c/numeric/math/expm1
561 | log => c/numeric/math/log
562 | log10 => c/numeric/math/log10
563 | log1p => c/numeric/math/log1p
564 | ilogb => c/numeric/math/ilogb
565 | logb => c/numeric/math/logb
566 | sqrt => c/numeric/math/sqrt
567 | cbrt => c/numeric/math/cbrt
568 | hypot => c/numeric/math/hypot
569 | pow => c/numeric/math/pow
570 | sin => c/numeric/math/sin
571 | cos => c/numeric/math/cos
572 | tan => c/numeric/math/tan
573 | asin => c/numeric/math/asin
574 | acos => c/numeric/math/acos
575 | atan => c/numeric/math/atan
576 | atan2 => c/numeric/math/atan2
577 | sinh => c/numeric/math/sinh
578 | cosh => c/numeric/math/cosh
579 | tanh => c/numeric/math/tanh
580 | asinh => c/numeric/math/asinh
581 | acosh => c/numeric/math/acosh
582 | atanh => c/numeric/math/atanh
583 | erf => c/numeric/math/erf
584 | erfc => c/numeric/math/erfc
585 | lgamma => c/numeric/math/lgamma
586 | tgamma => c/numeric/math/tgamma
587 | ceil => c/numeric/math/ceil
588 | floor => c/numeric/math/floor
589 | trunc => c/numeric/math/trunc
590 | round => c/numeric/math/round
591 | lround => c/numeric/math/round
592 | llround => c/numeric/math/round
593 | nearbyint => c/numeric/math/nearbyint
594 | rint => c/numeric/math/rint
595 | lrint => c/numeric/math/rint
596 | llrint => c/numeric/math/rint
597 | frexp => c/numeric/math/frexp
598 | ldexp => c/numeric/math/ldexp
599 | modf => c/numeric/math/modf
600 | scalbn => c/numeric/math/scalbn
601 | scalbln => c/numeric/math/scalbn
602 | nextafter => c/numeric/math/nextafter
603 | nexttoward => c/numeric/math/nextafter
604 | copysign => c/numeric/math/copysign
605 | fpclassify => c/numeric/math/fpclassify
606 | isfinite => c/numeric/math/isfinite
607 | isinf => c/numeric/math/isinf
608 | isnan => c/numeric/math/isnan
609 | isnormal => c/numeric/math/isnormal
610 | signbit => c/numeric/math/signbit
611 | HUGE_VAL => c/numeric/math/HUGE_VAL
612 | HUGE_VALF => c/numeric/math/HUGE_VAL
613 | HUGE_VALL => c/numeric/math/HUGE_VAL
614 | FP_INFINITE => c/numeric/math/FP_categories
615 | FP_NAN => c/numeric/math/FP_categories
616 | FP_NORMAL => c/numeric/math/FP_categories
617 | FP_SUBNORMAL => c/numeric/math/FP_categories
618 | FP_ZERO => c/numeric/math/FP_categories
619 | feclearexcept => c/numeric/fenv/feclearexcept
620 | fetestexcept => c/numeric/fenv/fetestexcept
621 | feraiseexcept => c/numeric/fenv/feraiseexcept
622 | fegetexceptflag => c/numeric/fenv/feexceptflag
623 | fesetexceptflag => c/numeric/fenv/feexceptflag
624 | fegetround => c/numeric/fenv/feround
625 | fesetround => c/numeric/fenv/feround
626 | fegetenv => c/numeric/fenv/feenv
627 | fesetenv => c/numeric/fenv/feenv
628 | feholdexcept => c/numeric/fenv/feholdexcept
629 | feupdateenv => c/numeric/fenv/feupdateenv
630 | FE_ALL_EXCEPT => c/numeric/fenv/FE_exceptions
631 | FE_DIVBYZERO => c/numeric/fenv/FE_exceptions
632 | FE_INEXACT => c/numeric/fenv/FE_exceptions
633 | FE_INVALID => c/numeric/fenv/FE_exceptions
634 | FE_OVERFLOW => c/numeric/fenv/FE_exceptions
635 | FE_UNDERFLOW => c/numeric/fenv/FE_exceptions
636 | FE_DOWNWARD => c/numeric/fenv/FE_round
637 | FE_TONEAREST => c/numeric/fenv/FE_round
638 | FE_TOWARDZERO => c/numeric/fenv/FE_round
639 | FE_UPWARD => c/numeric/fenv/FE_round
640 | FE_DFL_ENV => c/numeric/fenv/FE_DFL_ENV
641 | srand => c/numeric/random/srand
642 | rand => c/numeric/random/rand
643 | RAND_MAX => c/numeric/random/RAND_MAX
644 | complex => c/numeric/complex/complex
645 | _Complex_I => c/numeric/complex/Complex_I
646 | imaginary => c/numeric/complex/imaginary
647 | _Imaginary_I => c/numeric/complex/Imaginary_I
648 | _I => c/numeric/complex/I
649 | CMPLX => c/numeric/complex/CMPLX
650 | CMPLXF => c/numeric/complex/CMPLX
651 | CMPLXL => c/numeric/complex/CMPLX
652 | cimag => c/numeric/complex/cimag
653 | cimagf => c/numeric/complex/cimag
654 | cimagl => c/numeric/complex/cimag
655 | creal => c/numeric/complex/creal
656 | crealf => c/numeric/complex/creal
657 | creall => c/numeric/complex/creal
658 | carg => c/numeric/complex/carg
659 | cargf => c/numeric/complex/carg
660 | cargl => c/numeric/complex/carg
661 | conj => c/numeric/complex/conj
662 | conjf => c/numeric/complex/conj
663 | conjl => c/numeric/complex/conj
664 | cproj => c/numeric/complex/cproj
665 | cprojf => c/numeric/complex/cproj
666 | cprojl => c/numeric/complex/cproj
667 | cabs => c/numeric/complex/cabs
668 | cabsf => c/numeric/complex/cabs
669 | cabsl => c/numeric/complex/cabs
670 | cexp => c/numeric/complex/cexp
671 | cexpf => c/numeric/complex/cexp
672 | cexpl => c/numeric/complex/cexp
673 | clog => c/numeric/complex/clog
674 | clogf => c/numeric/complex/clog
675 | clogl => c/numeric/complex/clog
676 | cpow => c/numeric/complex/cpow
677 | cpowf => c/numeric/complex/cpow
678 | cpowl => c/numeric/complex/cpow
679 | csqrt => c/numeric/complex/csqrt
680 | csqrtf => c/numeric/complex/csqrt
681 | csqrtl => c/numeric/complex/csqrt
682 | cacos => c/numeric/complex/cacos
683 | cacosf => c/numeric/complex/cacos
684 | cacosl => c/numeric/complex/cacos
685 | casin => c/numeric/complex/casin
686 | casinf => c/numeric/complex/casin
687 | casinl => c/numeric/complex/casin
688 | catan => c/numeric/complex/catan
689 | catanf => c/numeric/complex/catan
690 | catanl => c/numeric/complex/catan
691 | ccos => c/numeric/complex/ccos
692 | ccosf => c/numeric/complex/ccos
693 | ccosl => c/numeric/complex/ccos
694 | csin => c/numeric/complex/csin
695 | csinf => c/numeric/complex/csin
696 | csinl => c/numeric/complex/csin
697 | ctan => c/numeric/complex/ctan
698 | ctanf => c/numeric/complex/ctan
699 | ctanl => c/numeric/complex/ctan
700 | cacosh => c/numeric/complex/cacosh
701 | cacoshf => c/numeric/complex/cacosh
702 | cacoshl => c/numeric/complex/cacosh
703 | casinh => c/numeric/complex/casinh
704 | casinhf => c/numeric/complex/casinh
705 | casinhl => c/numeric/complex/casinh
706 | catanh => c/numeric/complex/catanh
707 | catanhf => c/numeric/complex/catanh
708 | catanhl => c/numeric/complex/catanh
709 | ccosh => c/numeric/complex/ccosh
710 | ccoshf => c/numeric/complex/ccosh
711 | ccoshl => c/numeric/complex/ccosh
712 | csinh => c/numeric/complex/csinh
713 | csinhf => c/numeric/complex/csinh
714 | csinhl => c/numeric/complex/csinh
715 | ctanh => c/numeric/complex/ctanh
716 | ctanhf => c/numeric/complex/ctanh
717 | ctanhl => c/numeric/complex/ctanh
718 | qsort => c/algorithm/qsort
719 | bsearch => c/algorithm/bsearch
720 | fopen => c/io/fopen
721 | freopen => c/io/freopen
722 | fflush => c/io/fflush
723 | fclose => c/io/fclose
724 | setbuf => c/io/setbuf
725 | setvbuf => c/io/setvbuf
726 | fread => c/io/fread
727 | fwrite => c/io/fwrite
728 | fgetc => c/io/fgetc
729 | getc => c/io/fgetc
730 | fgets => c/io/fgets
731 | fputc => c/io/fputc
732 | putc => c/io/fputc
733 | fputs => c/io/fputs
734 | getchar => c/io/getchar
735 | gets => c/io/gets
736 | putchar => c/io/putchar
737 | puts => c/io/puts
738 | ungetc => c/io/ungetc
739 | fgetwc => c/io/fgetwc
740 | fgetss => c/io/fgetws
741 | fputwc => c/io/fputwc
742 | fputws => c/io/fputws
743 | getwchar => c/io/getwchar
744 | putwchar => c/io/putwchar
745 | ungetwc => c/io/ungetwc
746 | scanf => c/io/fscanf
747 | fscanf => c/io/fscanf
748 | sscanf => c/io/fscanf
749 | vscanf => c/io/vfscanf
750 | vfscanf => c/io/vfscanf
751 | vsscanf => c/io/vfscanf
752 | printf => c/io/fprintf
753 | fprintf => c/io/fprintf
754 | sprintf => c/io/fprintf
755 | snprintf => c/io/fprintf
756 | vprintf => c/io/vfprintf
757 | vfprintf => c/io/vfprintf
758 | vsprintf => c/io/vfprintf
759 | vsnprintf => c/io/vfprintf
760 | wscanf => c/io/fwscanf
761 | fwscanf => c/io/fwscanf
762 | swscanf => c/io/fwscanf
763 | vwscanf => c/io/vfwscanf
764 | vfwscanf => c/io/vfwscanf
765 | vswscanf => c/io/vfwscanf
766 | wprintf => c/io/fwprintf
767 | fwprintf => c/io/fwprintf
768 | swprintf => c/io/fwprintf
769 | vwprintf => c/io/vfwprintf
770 | vfwprintf => c/io/vfwprintf
771 | vswprintf => c/io/vfwprintf
772 | ftell => c/io/ftell
773 | fgetpos => c/io/fgetpos
774 | fseek => c/io/fseek
775 | fsetpos => c/io/fsetpos
776 | rewind => c/io/rewind
777 | clearerr => c/io/clearerr
778 | feof => c/io/feof
779 | ferror => c/io/ferror
780 | perror => c/io/perror
781 | remove => c/io/remove
782 | rename => c/io/rename
783 | tmpfile => c/io/tmpfile
784 | tmpnam => c/io/tmpnam
785 | FILE => c/io
786 | fpos_t => c/io
787 | stdin => c/io
788 | stdout => c/io
789 | stderr => c/io
790 | EOF => c/io
791 | FOPEN_MAX => c/io
792 | FILENAME_MAX => c/io
793 | BUFSIZ => c/io
794 | _IOFBF => c/io
795 | _IOLBF => c/io
796 | _IONBF => c/io
797 | SEEK_SET => c/io
798 | SEEK_CUR => c/io
799 | SEEK_END => c/io
800 | TMP_MAX => c/io
801 | L_tmpnam => c/io
802 | setlocale => c/locale/setlocale
803 | localeconv => c/locale/localeconv
804 | lconv => c/locale/lconv
805 | LC_ALL => c/locale/LC_categories
806 | LC_COLLATE => c/locale/LC_categories
807 | LC_CTYPE => c/locale/LC_categories
808 | LC_MONETARY => c/locale/LC_categories
809 | LC_NUMERIC => c/locale/LC_categories
810 | LC_TIME => c/locale/LC_categories
811 | memory_order => c/atomic/memory_order
812 | memory_order_relaxed => c/atomic/memory_order
813 | memory_order_consume => c/atomic/memory_order
814 | memory_order_acquire => c/atomic/memory_order
815 | memory_order_release => c/atomic/memory_order
816 | memory_order_acq_rel => c/atomic/memory_order
817 | memory_order_seq_cst => c/atomic/memory_order
818 | atomic_flag => c/atomic/atomic_flag
819 | ATOMIC_BOOL_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
820 | ATOMIC_CHAR_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
821 | ATOMIC_CHAR16_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
822 | ATOMIC_CHAR32_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
823 | ATOMIC_WCHAR_T_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
824 | ATOMIC_SHORT_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
825 | ATOMIC_INT_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
826 | ATOMIC_LONG_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
827 | ATOMIC_LLONG_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
828 | ATOMIC_POINTER_LOCK_FREE => c/atomic/ATOMIC_LOCK_FREE_consts
829 | ATOMIC_FLAG_INIT => c/atomic/ATOMIC_FLAG_INIT
830 | ATOMIC_VAR_INIT => c/atomic/ATOMIC_VAR_INIT
831 | kill_dependency => c/atomic/kill_dependency
832 | atomic_flag_test_and_set => c/atomic/atomic_flag_test_and_set
833 | atomic_flag_test_and_set_explicit => c/atomic/atomic_flag_test_and_set
834 | atomic_flag_clear => c/atomic/atomic_flag_clear
835 | atomic_flag_clear_explicit => c/atomic/atomic_flag_clear
836 | atomic_init => c/atomic/atomic_init
837 | atomic_is_lock_free => c/atomic/atomic_is_lock_free
838 | atomic_store => c/atomic/atomic_store
839 | atomic_store_explicit => c/atomic/atomic_store
840 | atomic_load => c/atomic/atomic_load
841 | atomic_load_explicit => c/atomic/atomic_load
842 | atomic_exchange => c/atomic/atomic_exchange
843 | atomic_exchange_explicit => c/atomic/atomic_exchange
844 | atomic_compare_exchange_weak => c/atomic/atomic_compare_exchange
845 | atomic_compare_exchange_weak_explicit => c/atomic/atomic_compare_exchange
846 | atomic_compare_exchange_strong => c/atomic/atomic_compare_exchange
847 | atomic_compare_exchange_strong_explicit => c/atomic/atomic_compare_exchange
848 | atomic_fetch_add => c/atomic/atomic_fetch_add
849 | atomic_fetch_add_explicit => c/atomic/atomic_fetch_add
850 | atomic_fetch_sub => c/atomic/atomic_fetch_sub
851 | atomic_fetch_sub_explicit => c/atomic/atomic_fetch_sub
852 | atomic_fetch_or => c/atomic/atomic_fetch_or
853 | atomic_fetch_or_explicit => c/atomic/atomic_fetch_or
854 | atomic_fetch_xor => c/atomic/atomic_fetch_xor
855 | atomic_fetch_xor_explicit => c/atomic/atomic_fetch_xor
856 | atomic_fetch_and => c/atomic/atomic_fetch_and
857 | atomic_fetch_and_explicit => c/atomic/atomic_fetch_and
858 | atomic_thread_fence => c/atomic/atomic_thread_fence
859 | atomic_signal_fence => c/atomic/atomic_signal_fence
860 | atomic_bool => c/atomic
861 | atomic_char => c/atomic
862 | atomic_schar => c/atomic
863 | atomic_uchar => c/atomic
864 | atomic_short => c/atomic
865 | atomic_ushort => c/atomic
866 | atomic_int => c/atomic
867 | atomic_uint => c/atomic
868 | atomic_long => c/atomic
869 | atomic_ulong => c/atomic
870 | atomic_llong => c/atomic
871 | atomic_ullong => c/atomic
872 | atomic_char16_t => c/atomic
873 | atomic_char32_t => c/atomic
874 | atomic_wchar_t => c/atomic
875 | atomic_int_least8_t => c/atomic
876 | atomic_uint_least8_t => c/atomic
877 | atomic_int_least16_t => c/atomic
878 | atomic_uint_least16_t => c/atomic
879 | atomic_int_least32_t => c/atomic
880 | atomic_uint_least32_t => c/atomic
881 | atomic_int_least64_t => c/atomic
882 | atomic_uint_least64_t => c/atomic
883 | atomic_int_fast8_t => c/atomic
884 | atomic_uint_fast8_t => c/atomic
885 | atomic_int_fast16_t => c/atomic
886 | atomic_uint_fast16_t => c/atomic
887 | atomic_int_fast32_t => c/atomic
888 | atomic_uint_fast32_t => c/atomic
889 | atomic_int_fast64_t => c/atomic
890 | atomic_uint_fast64_t => c/atomic
891 | atomic_intprt_t => c/atomic
892 | atomic_uintprt_t => c/atomic
893 | atomic_size_t => c/atomic
894 | atomic_ptrdiff_t => c/atomic
895 | atomic_intmax_t => c/atomic
896 | atomic_uintmax_t => c/atomic
897 | thrd_t => c/thread
898 | thrd_create => c/thread/thrd_create
899 | thrd_equal => c/thread/thrd_equal
900 | thrd_current => c/thread/thrd_current
901 | thrd_sleep => c/thread/thrd_sleep
902 | thrd_yield => c/thread/thrd_yield
903 | thrd_exit => c/thread/thrd_exit
904 | thrd_detach => c/thread/thrd_detach
905 | thrd_join => c/thread/thrd_join
906 | thrd_success => c/thread/thrd_errors
907 | thrd_timeout => c/thread/thrd_errors
908 | thrd_busy => c/thread/thrd_errors
909 | thrd_nomem => c/thread/thrd_errors
910 | thrd_error => c/thread/thrd_errors
911 | thrd_start_t => c/thread
912 | mtx_t => c/thread
913 | mtx_init => c/thread/mtx_init
914 | mtx_lock => c/thread/mtx_lock
915 | mtx_timedlock => c/thread/mtx_timedlock
916 | mtx_trylock => c/thread/mtx_trylock
917 | mtx_unlock => c/thread/mtx_unlock
918 | mtx_destroy => c/thread/mtx_destroy
919 | mtx_plain => c/thread/mtx_types
920 | mtx_recursive => c/thread/mtx_types
921 | mtx_timed => c/thread/mtx_types
922 | thrd_start_t => c/thread
923 | once_flag => c/thread/call_once
924 | ONCE_FLAG_INIT => c/thread/call_once
925 | call_once => c/thread/call_once
926 | cnd_t => c/thread
927 | cnd_init => c/thread/cnd_init
928 | cnd_signal => c/thread/cnd_signal
929 | cnd_broadcast => c/thread/cnd_broadcast
930 | cnd_wait => c/thread/cnd_wait
931 | cnd_timedwait => c/thread/cnd_timedwait
932 | cnd_destroy => c/thread/cnd_destroy
933 | thread_local => c/thread/thread_local
934 | TSS_DTOR_ITERATIONS => c/thread/TSS_DTOR_ITERATIONS
935 | tss_t => c/thread
936 | tss_dtor_t => c/thread
937 | tss_create => c/thread/tss_create
938 | tss_get => c/thread/tss_get
939 | tss_set => c/thread/tss_set
940 | tss_delete => c/thread/tss_delete
941 |
--------------------------------------------------------------------------------
/tools/std/src/main.rs:
--------------------------------------------------------------------------------
1 | use std::cell::RefCell;
2 | use std::collections::HashMap;
3 | use std::error::Error;
4 | use std::fs::{DirEntry, File};
5 | use std::io::{BufRead, BufReader};
6 | use std::path::Path;
7 | use std::rc::Rc;
8 | use std::{fs, io};
9 |
10 | use select::document::Document;
11 | use select::predicate::{Class, Name, Predicate};
12 |
13 | type Result = std::result::Result>;
14 |
15 | type DocPath = String;
16 | type DocIdentifier = String;
17 | type DocDescription = String;
18 |
19 | fn main() -> Result<()> {
20 | // The cppreference.com offline docs path
21 | let docs_path = std::env::args().nth(1).expect("docs_path is required");
22 | let raw_search_index = generate_index(&["search-cpp", "search-c"])?;
23 | println!("Raw search index length: {}", raw_search_index.len());
24 | let search_index = parse_docs(&docs_path, raw_search_index)?;
25 | println!("Search index length: {}", search_index.len());
26 | let contents = serde_json::to_string(&search_index)?;
27 | let path = Path::new("../../extension/index/std.js");
28 | fs::write(path, format!("var searchIndex={};", contents))?;
29 | Ok(())
30 | }
31 |
32 | fn generate_index(files: &[&str]) -> Result> {
33 | let mut map = HashMap::new();
34 | for file_name in files {
35 | let file = File::open(file_name)?;
36 | let br = BufReader::new(file);
37 | for line in br.lines() {
38 | let line = line?;
39 | let mut pair: Vec = line.split(" => ").map(String::from).collect();
40 | map.insert(pair.remove(0), pair.remove(0));
41 | }
42 | }
43 | Ok(map)
44 | }
45 |
46 | fn parse_docs(
47 | path: &str,
48 | raw_search_index: HashMap,
49 | ) -> Result)>> {
50 | let pair_map = Rc::new(RefCell::new(HashMap::::new()));
51 | visit_dirs(Path::new(path), &|entry| {
52 | if let Ok(html) = fs::read_to_string(entry.path()) {
53 | let document = Document::from(html.as_str());
54 | for node in document.find(Class("t-dsc-begin").descendant(Class("t-dsc"))) {
55 | if node.find(Name("td")).count() == 2 {
56 | if let Some(Some(title)) = node
57 | .find(Class("t-dsc-member-div").descendant(Name("a")))
58 | .map(|n| {
59 | n.attr("title")
60 | .filter(|title| !title.contains("page does not exist"))
61 | })
62 | .next()
63 | {
64 | let path = title.replace(' ', "_");
65 |
66 | if let Some(dt) = node.last_child() {
67 | let description = dt.text().trim().to_string();
68 | pair_map.borrow_mut().insert(path, description);
69 | }
70 | }
71 | }
72 | }
73 | }
74 | })?;
75 | let search_index = raw_search_index
76 | .into_iter()
77 | .map(|(doc_identifier, doc_path)| {
78 | let description = pair_map.borrow().get(&doc_path).map(|d| d.to_owned());
79 | (doc_identifier, (doc_path, description))
80 | })
81 | .collect();
82 | Ok(search_index)
83 | }
84 |
85 | fn visit_dirs(dir: &Path, cb: &dyn Fn(&DirEntry)) -> io::Result<()> {
86 | if dir.is_dir() {
87 | for entry in fs::read_dir(dir)? {
88 | let entry = entry?;
89 | let path = entry.path();
90 | if path.is_dir() {
91 | visit_dirs(&path, cb)?;
92 | } else {
93 | cb(&entry);
94 | }
95 | }
96 | }
97 | Ok(())
98 | }
99 |
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "github": {
3 | "silent": true
4 | }
5 | }
--------------------------------------------------------------------------------