PinInPy 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pininpy-1.0.0/.editorconfig +9 -0
- pininpy-1.0.0/.github/workflows/python-publish.yml +109 -0
- pininpy-1.0.0/.gitignore +1 -0
- pininpy-1.0.0/.gitmodules +3 -0
- pininpy-1.0.0/CMakeLists.txt +48 -0
- pininpy-1.0.0/LICENSE +21 -0
- pininpy-1.0.0/PKG-INFO +90 -0
- pininpy-1.0.0/PinIn4Cpp/.editorconfig +70 -0
- pininpy-1.0.0/PinIn4Cpp/.gitattributes +63 -0
- pininpy-1.0.0/PinIn4Cpp/.gitignore +361 -0
- pininpy-1.0.0/PinIn4Cpp/CMakeLists.txt +134 -0
- pininpy-1.0.0/PinIn4Cpp/CMakeSettings.json +120 -0
- pininpy-1.0.0/PinIn4Cpp/FFIExample/PinInLua.lua +537 -0
- pininpy-1.0.0/PinIn4Cpp/LICENSE +21 -0
- pininpy-1.0.0/PinIn4Cpp/README.md +109 -0
- pininpy-1.0.0/PinIn4Cpp/cmake/PinIn4CppConfig.cmake.in +4 -0
- pininpy-1.0.0/PinIn4Cpp/example/PinyinTest.cpp +115 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/Keyboard.h +139 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/ParallelSearch.h +215 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/PinIn.h +405 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/PinInCAPI.h +123 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/PinyinFormat.h +12 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/TreeSearcher.h +475 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/Accelerator.h +69 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/AdaptiveContainers.h +585 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/BinUtils.h +56 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/IndexSet.h +117 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/ObjectPool.h +231 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/StringPool.h +65 -0
- pininpy-1.0.0/PinIn4Cpp/include/PinIn4Cpp/detail/StringUtils.h +97 -0
- pininpy-1.0.0/PinIn4Cpp/licenses/PinIn.txt +21 -0
- pininpy-1.0.0/PinIn4Cpp/licenses/pinyin-data.txt +21 -0
- pininpy-1.0.0/PinIn4Cpp/src/Keyboard.cpp +398 -0
- pininpy-1.0.0/PinIn4Cpp/src/PinIn.cpp +678 -0
- pininpy-1.0.0/PinIn4Cpp/src/PinInCAPI.cpp +311 -0
- pininpy-1.0.0/PinIn4Cpp/src/PinyinFormat.cpp +132 -0
- pininpy-1.0.0/PinIn4Cpp/src/TreeSearcher.cpp +392 -0
- pininpy-1.0.0/PinIn4Cpp/src/utils/Accelerator.cpp +98 -0
- pininpy-1.0.0/PinIn4Cpp/src/utils/BinUtils.cpp +149 -0
- pininpy-1.0.0/PinIn4Cpp/src/utils/IndexSet.cpp +9 -0
- pininpy-1.0.0/PinIn4Cpp/src/utils/StringPool.cpp +146 -0
- pininpy-1.0.0/PinIn4Cpp/src/utils/StringUtils.cpp +87 -0
- pininpy-1.0.0/PinIn4Cpp/test_data/large.txt +1000000 -0
- pininpy-1.0.0/PinIn4Cpp/test_data/pinyin.txt +41925 -0
- pininpy-1.0.0/PinIn4Cpp/test_data/small.txt +37452 -0
- pininpy-1.0.0/README.md +59 -0
- pininpy-1.0.0/build_cffi.py +123 -0
- pininpy-1.0.0/package/__init__.py +379 -0
- pininpy-1.0.0/pyproject.toml +49 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release-build:
|
|
20
|
+
name: Build wheels on ${{ matrix.os }}
|
|
21
|
+
runs-on: ${{ matrix.os }}
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
# scikit-build-core 完美支持这三大平台
|
|
26
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
submodules: recursive
|
|
32
|
+
|
|
33
|
+
- uses: actions/setup-python@v6
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.x"
|
|
36
|
+
|
|
37
|
+
- name: Install generic dependencies
|
|
38
|
+
run: pip install cmake ninja
|
|
39
|
+
|
|
40
|
+
- name: Build wheels
|
|
41
|
+
uses: pypa/cibuildwheel@v3.3.0
|
|
42
|
+
env:
|
|
43
|
+
CIBW_BUILD_VERBOSITY: "TRUE"
|
|
44
|
+
-DBUILD_SHARED_LIBS=ON: "ON"
|
|
45
|
+
|
|
46
|
+
- uses: actions/upload-artifact@v6
|
|
47
|
+
with:
|
|
48
|
+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
49
|
+
path: ./wheelhouse/*.whl
|
|
50
|
+
|
|
51
|
+
build_sdist:
|
|
52
|
+
name: Build source distribution
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v6.0.1
|
|
56
|
+
with:
|
|
57
|
+
submodules: recursive
|
|
58
|
+
|
|
59
|
+
- name: Set up Python
|
|
60
|
+
uses: actions/setup-python@v6
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.x"
|
|
63
|
+
|
|
64
|
+
- name: Install build dependencies
|
|
65
|
+
run: python -m pip install build
|
|
66
|
+
|
|
67
|
+
- name: Build sdist
|
|
68
|
+
run: python -m build --sdist
|
|
69
|
+
|
|
70
|
+
# 【关键步骤 1B】: 上传源码包
|
|
71
|
+
- name: Upload sdist
|
|
72
|
+
uses: actions/upload-artifact@v6
|
|
73
|
+
with:
|
|
74
|
+
name: sdist
|
|
75
|
+
path: dist/*.tar.gz
|
|
76
|
+
|
|
77
|
+
publish_to_pypi:
|
|
78
|
+
name: Publish package to PyPI
|
|
79
|
+
# 必须等待所有构建任务成功完成
|
|
80
|
+
needs: [build_sdist]
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
permissions:
|
|
83
|
+
id-token: write # 这是必须的,允许 workflow 向 PyPI 进行身份验证
|
|
84
|
+
contents: read
|
|
85
|
+
|
|
86
|
+
steps:
|
|
87
|
+
# 【关键步骤 2】: 下载所有之前上传的工件
|
|
88
|
+
# 首先下载所有 wheel 文件到一个临时目录
|
|
89
|
+
- name: Download all wheels
|
|
90
|
+
uses: actions/download-artifact@v6
|
|
91
|
+
with:
|
|
92
|
+
# 使用通配符匹配所有以 cibw-wheels- 开头的工件
|
|
93
|
+
pattern: cibw-wheels-*
|
|
94
|
+
# 将它们合并到同一个目录下
|
|
95
|
+
merge-multiple: true
|
|
96
|
+
# 指定下载到 dist 目录
|
|
97
|
+
path: dist/
|
|
98
|
+
|
|
99
|
+
# 接着下载源码包
|
|
100
|
+
- name: Download sdist
|
|
101
|
+
uses: actions/download-artifact@v6
|
|
102
|
+
with:
|
|
103
|
+
name: sdist
|
|
104
|
+
path: dist/
|
|
105
|
+
|
|
106
|
+
# 现在,dist/ 目录里已经包含了所有的 .whl 和 .tar.gz 文件
|
|
107
|
+
# 最后执行发布
|
|
108
|
+
- name: Publish package distributions to PyPI
|
|
109
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
pininpy-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
build/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.15)
|
|
2
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
3
|
+
project(PinInPy LANGUAGES C CXX)
|
|
4
|
+
|
|
5
|
+
if(MSVC)
|
|
6
|
+
add_compile_options(/utf-8)
|
|
7
|
+
endif()
|
|
8
|
+
|
|
9
|
+
set(PININ4CPP_INSTALL OFF CACHE INTERNAL "")
|
|
10
|
+
add_subdirectory("PinIn4Cpp")
|
|
11
|
+
|
|
12
|
+
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
|
|
13
|
+
if(MSVC)
|
|
14
|
+
#之前测试的时候发现win会找不到python3.lib,这个可以强制指定他找libs文件夹,里面有对应的python3.lib
|
|
15
|
+
if(Python_LIBRARIES)
|
|
16
|
+
get_filename_component(PYTHON_LIB_DIR "${Python_LIBRARIES}" DIRECTORY)
|
|
17
|
+
|
|
18
|
+
link_directories(${PYTHON_LIB_DIR})
|
|
19
|
+
message(STATUS "Python Library Dir: ${PYTHON_LIB_DIR}")
|
|
20
|
+
endif()
|
|
21
|
+
endif()
|
|
22
|
+
|
|
23
|
+
message(STATUS "Python Library: ${Python_LIBRARIES}")
|
|
24
|
+
message(STATUS "Python Include: ${Python_INCLUDE_DIRS}")
|
|
25
|
+
|
|
26
|
+
set(PY_BINDING_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
27
|
+
|
|
28
|
+
# 生成 CFFI 胶水代码 (.c)
|
|
29
|
+
set(GENERATED_C "${CMAKE_CURRENT_BINARY_DIR}/_pinin4cpp_cffi.c")
|
|
30
|
+
|
|
31
|
+
add_custom_command(
|
|
32
|
+
OUTPUT ${GENERATED_C}
|
|
33
|
+
COMMAND "${Python3_EXECUTABLE}" "${PY_BINDING_DIR}/build_cffi.py"
|
|
34
|
+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
35
|
+
DEPENDS "${PY_BINDING_DIR}/build_cffi.py"
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Python编译模块
|
|
39
|
+
python_add_library(_pinin4cpp_cffi MODULE ${GENERATED_C})
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
target_link_libraries(_pinin4cpp_cffi PRIVATE PinIn4Cpp::PinIn4Cpp)
|
|
43
|
+
target_link_libraries(_pinin4cpp_cffi PRIVATE Python::Module)
|
|
44
|
+
|
|
45
|
+
install(TARGETS _pinin4cpp_cffi DESTINATION PinInPy)
|
|
46
|
+
install(FILES PinIn4Cpp/LICENSE DESTINATION PinInPy/PinIn4Cpp)
|
|
47
|
+
install(DIRECTORY PinIn4Cpp/licenses/ DESTINATION PinInPy/PinIn4Cpp/licenses)
|
|
48
|
+
install(DIRECTORY package/ DESTINATION PinInPy)
|
pininpy-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 KagiyamaHina
|
|
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.
|
pininpy-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: PinInPy
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Python library for Pinyin searching
|
|
5
|
+
Keywords: PinIn,pinyin match,pinyin,cffi
|
|
6
|
+
Author-Email: SajoYukimi <kagiyamahino@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: C++
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Natural Language :: Chinese (Simplified)
|
|
24
|
+
Classifier: Natural Language :: Chinese (Traditional)
|
|
25
|
+
Project-URL: Homepage, https://github.com/KagiamamaHIna/PinInPy
|
|
26
|
+
Project-URL: Bug Tracker, https://github.com/KagiamamaHIna/PinInPy/issues
|
|
27
|
+
Project-URL: Source, https://github.com/KagiamamaHIna/PinInPy
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Requires-Dist: cffi
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
[](https://github.com/KagiamamaHIna/PinInPy/actions/workflows/python-publish.yml)
|
|
33
|
+

|
|
34
|
+

|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
# PinIn Python
|
|
38
|
+
基于[PinIn4Cpp](https://github.com/KagiamamaHIna/PinIn4Cpp)的Python封装,提供C++的性能的同时用python的方式使用PinIn4Cpp
|
|
39
|
+
|
|
40
|
+
## 特性
|
|
41
|
+
完全基于PinIn4Cpp的C API,因此相比C++版本功能略有减少
|
|
42
|
+
- 提供Pythonic的封装,而不必调用原始的C API
|
|
43
|
+
- 高效的构建和即时搜索性能
|
|
44
|
+
- 可配置的预设键位方案和模糊音方案
|
|
45
|
+
|
|
46
|
+
## 安装
|
|
47
|
+
```
|
|
48
|
+
pip install PinInPy
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 示例
|
|
52
|
+
**注意**:拼音字典文件(pinyin.txt),需要自行准备,也可以从[pinyin-data](https://github.com/mozillazg/pinyin-data)中下载直接使用
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import PinInPy
|
|
56
|
+
# BEGIN是前缀匹配,也就是根据字符串开头开始匹配
|
|
57
|
+
tree = PinInPy.TreeSearcher(PinInPy.Logic.BEGIN, "pinyin.txt")
|
|
58
|
+
tree.put_string("佐城雪美")
|
|
59
|
+
tree.put_string("游佐梢")
|
|
60
|
+
tree.put_string("市原仁奈")
|
|
61
|
+
|
|
62
|
+
print(tree.execute_search("zcxm"))#根据zcxm搜索 打印: ["佐城雪美"]
|
|
63
|
+
print(tree.execute_search("zchenxm"))#测试无模糊音时 打印: []
|
|
64
|
+
|
|
65
|
+
pinin = tree.get_pinin()# 获取PinIn对象,可以用于配置依赖PinIn对象的TreeSearcher
|
|
66
|
+
pinin.get_config().set_fEng2En(True).commit()# 设置eng -> en的模糊音
|
|
67
|
+
# 这时候en == eng
|
|
68
|
+
print(tree.execute_search("zchenxm"))# 打印: ["佐城雪美"]
|
|
69
|
+
|
|
70
|
+
pinin.get_config().set_keyboard(PinInPy.Keyboard.MICROSOFT).commit()# 设置键位为微软双拼
|
|
71
|
+
# y b(ou) z o(uo) u(sh) k(ao) == you zuo shao
|
|
72
|
+
print(tree.execute_search("ybzouk"))# 打印: ["游佐梢"]
|
|
73
|
+
|
|
74
|
+
# 可以根据已有的PinIn对象去构造新的搜索树,PinIn上的配置是会被共享的 CONTAIN是部分匹配,部分匹配则是可以从任意位置开始匹配
|
|
75
|
+
# 通常部分匹配的性能更差
|
|
76
|
+
tree2 = PinInPy.TreeSearcher(PinInPy.Logic.CONTAIN, pinin)
|
|
77
|
+
tree2.put_string("佐城雪美")
|
|
78
|
+
tree2.put_string("游佐梢")
|
|
79
|
+
tree2.put_string("市原仁奈")
|
|
80
|
+
tree2.put_string("serika")
|
|
81
|
+
# r f(en) n l(ai) == ren nai
|
|
82
|
+
print(tree2.execute_search("rfnl"))# 因为是部分匹配,所以后面会被匹配仁奈 打印: ["市原仁奈"]
|
|
83
|
+
# 注意! 双拼是成对匹配的,如果只有奇数个拼音音素输入则不会匹配任何中文
|
|
84
|
+
print(tree2.execute_search("r"))# 打印: ["serika"]
|
|
85
|
+
```
|
|
86
|
+
## 注意事项
|
|
87
|
+
不包含PinIn4Cpp中的ParallelSearch,拼音格式化功能,Keyboard自定义(只能使用预设),从内存中加载字典文件,从内存中加载二进制序列化文件的功能
|
|
88
|
+
PinIn类也不暴露拼音获取功能
|
|
89
|
+
|
|
90
|
+
理论上是平台无关的,但是GitHub Actions只构建了Linux,Windows,MacOS的Wheel包,如果你的目标平台不是其中之一的话可以自行尝试下载源代码,配置CMake,配置C/C++编译器,用```pip install .```安装
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
|
|
4
|
+
|
|
5
|
+
indent_style = tab
|
|
6
|
+
tab_width = 4
|
|
7
|
+
charset = utf-8
|
|
8
|
+
end_of_line = lf
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
|
|
11
|
+
cpp_generate_documentation_comments = xml
|
|
12
|
+
|
|
13
|
+
cpp_indent_braces = false
|
|
14
|
+
cpp_indent_multi_line_relative_to = innermost_parenthesis
|
|
15
|
+
cpp_indent_within_parentheses = indent
|
|
16
|
+
cpp_indent_preserve_within_parentheses = true
|
|
17
|
+
cpp_indent_case_contents = true
|
|
18
|
+
cpp_indent_case_labels = false
|
|
19
|
+
cpp_indent_case_contents_when_block = false
|
|
20
|
+
cpp_indent_lambda_braces_when_parameter = true
|
|
21
|
+
cpp_indent_goto_labels = one_left
|
|
22
|
+
cpp_indent_preprocessor = leftmost_column
|
|
23
|
+
cpp_indent_access_specifiers = false
|
|
24
|
+
cpp_indent_namespace_contents = true
|
|
25
|
+
cpp_indent_preserve_comments = false
|
|
26
|
+
cpp_new_line_before_open_brace_namespace = ignore
|
|
27
|
+
cpp_new_line_before_open_brace_type = ignore
|
|
28
|
+
cpp_new_line_before_open_brace_function = ignore
|
|
29
|
+
cpp_new_line_before_open_brace_block = ignore
|
|
30
|
+
cpp_new_line_before_open_brace_lambda = ignore
|
|
31
|
+
cpp_new_line_scope_braces_on_separate_lines = false
|
|
32
|
+
cpp_new_line_close_brace_same_line_empty_type = false
|
|
33
|
+
cpp_new_line_close_brace_same_line_empty_function = false
|
|
34
|
+
cpp_new_line_before_catch = true
|
|
35
|
+
cpp_new_line_before_else = true
|
|
36
|
+
cpp_new_line_before_while_in_do_while = false
|
|
37
|
+
cpp_space_before_function_open_parenthesis = remove
|
|
38
|
+
cpp_space_within_parameter_list_parentheses = false
|
|
39
|
+
cpp_space_between_empty_parameter_list_parentheses = false
|
|
40
|
+
cpp_space_after_keywords_in_control_flow_statements = true
|
|
41
|
+
cpp_space_within_control_flow_statement_parentheses = false
|
|
42
|
+
cpp_space_before_lambda_open_parenthesis = false
|
|
43
|
+
cpp_space_within_cast_parentheses = false
|
|
44
|
+
cpp_space_after_cast_close_parenthesis = false
|
|
45
|
+
cpp_space_within_expression_parentheses = false
|
|
46
|
+
cpp_space_before_block_open_brace = true
|
|
47
|
+
cpp_space_between_empty_braces = false
|
|
48
|
+
cpp_space_before_initializer_list_open_brace = false
|
|
49
|
+
cpp_space_within_initializer_list_braces = true
|
|
50
|
+
cpp_space_preserve_in_initializer_list = true
|
|
51
|
+
cpp_space_before_open_square_bracket = false
|
|
52
|
+
cpp_space_within_square_brackets = false
|
|
53
|
+
cpp_space_before_empty_square_brackets = false
|
|
54
|
+
cpp_space_between_empty_square_brackets = false
|
|
55
|
+
cpp_space_group_square_brackets = true
|
|
56
|
+
cpp_space_within_lambda_brackets = false
|
|
57
|
+
cpp_space_between_empty_lambda_brackets = false
|
|
58
|
+
cpp_space_before_comma = false
|
|
59
|
+
cpp_space_after_comma = true
|
|
60
|
+
cpp_space_remove_around_member_operators = true
|
|
61
|
+
cpp_space_before_inheritance_colon = true
|
|
62
|
+
cpp_space_before_constructor_colon = true
|
|
63
|
+
cpp_space_remove_before_semicolon = true
|
|
64
|
+
cpp_space_after_semicolon = true
|
|
65
|
+
cpp_space_remove_around_unary_operator = true
|
|
66
|
+
cpp_space_around_binary_operator = insert
|
|
67
|
+
cpp_space_around_assignment_operator = insert
|
|
68
|
+
cpp_space_pointer_reference_alignment = left
|
|
69
|
+
cpp_space_around_ternary_operator = insert
|
|
70
|
+
cpp_wrap_preserve_blocks = one_liners
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# Set default behavior to automatically normalize line endings.
|
|
3
|
+
###############################################################################
|
|
4
|
+
* text=auto
|
|
5
|
+
|
|
6
|
+
###############################################################################
|
|
7
|
+
# Set default behavior for command prompt diff.
|
|
8
|
+
#
|
|
9
|
+
# This is need for earlier builds of msysgit that does not have it on by
|
|
10
|
+
# default for csharp files.
|
|
11
|
+
# Note: This is only used by command line
|
|
12
|
+
###############################################################################
|
|
13
|
+
#*.cs diff=csharp
|
|
14
|
+
|
|
15
|
+
###############################################################################
|
|
16
|
+
# Set the merge driver for project and solution files
|
|
17
|
+
#
|
|
18
|
+
# Merging from the command prompt will add diff markers to the files if there
|
|
19
|
+
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
|
20
|
+
# the diff markers are never inserted). Diff markers may cause the following
|
|
21
|
+
# file extensions to fail to load in VS. An alternative would be to treat
|
|
22
|
+
# these files as binary and thus will always conflict and require user
|
|
23
|
+
# intervention with every merge. To do so, just uncomment the entries below
|
|
24
|
+
###############################################################################
|
|
25
|
+
#*.sln merge=binary
|
|
26
|
+
#*.csproj merge=binary
|
|
27
|
+
#*.vbproj merge=binary
|
|
28
|
+
#*.vcxproj merge=binary
|
|
29
|
+
#*.vcproj merge=binary
|
|
30
|
+
#*.dbproj merge=binary
|
|
31
|
+
#*.fsproj merge=binary
|
|
32
|
+
#*.lsproj merge=binary
|
|
33
|
+
#*.wixproj merge=binary
|
|
34
|
+
#*.modelproj merge=binary
|
|
35
|
+
#*.sqlproj merge=binary
|
|
36
|
+
#*.wwaproj merge=binary
|
|
37
|
+
|
|
38
|
+
###############################################################################
|
|
39
|
+
# behavior for image files
|
|
40
|
+
#
|
|
41
|
+
# image files are treated as binary by default.
|
|
42
|
+
###############################################################################
|
|
43
|
+
#*.jpg binary
|
|
44
|
+
#*.png binary
|
|
45
|
+
#*.gif binary
|
|
46
|
+
|
|
47
|
+
###############################################################################
|
|
48
|
+
# diff behavior for common document formats
|
|
49
|
+
#
|
|
50
|
+
# Convert binary document formats to text before diffing them. This feature
|
|
51
|
+
# is only available from the command line. Turn it on by uncommenting the
|
|
52
|
+
# entries below.
|
|
53
|
+
###############################################################################
|
|
54
|
+
#*.doc diff=astextplain
|
|
55
|
+
#*.DOC diff=astextplain
|
|
56
|
+
#*.docx diff=astextplain
|
|
57
|
+
#*.DOCX diff=astextplain
|
|
58
|
+
#*.dot diff=astextplain
|
|
59
|
+
#*.DOT diff=astextplain
|
|
60
|
+
#*.pdf diff=astextplain
|
|
61
|
+
#*.PDF diff=astextplain
|
|
62
|
+
#*.rtf diff=astextplain
|
|
63
|
+
#*.RTF diff=astextplain
|