Compare commits
2 Commits
master
...
CJH-branch
Author | SHA1 | Date |
---|---|---|
|
1cff408240 | 1 year ago |
|
9d2054b156 | 1 year ago |
@ -1,13 +0,0 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
@ -1,203 +0,0 @@
|
||||
name: CI_build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_configuration: [Release, Debug]
|
||||
build_platform: [x64, Win32, ARM64]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: MSBuild of n++ exe
|
||||
working-directory: PowerEditor\visual.net\
|
||||
run: msbuild notepadPlus.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"
|
||||
|
||||
- name: Archive artifacts for x64 / Release
|
||||
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\bin64\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for Win32 / Release
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\bin\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for ARM64 / Release
|
||||
if: matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\binarm64\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for ARM64|x64 / Debug
|
||||
if: (matrix.build_platform == 'ARM64' || matrix.build_platform == 'x64') && matrix.build_configuration == 'Debug'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\visual.net\${{ matrix.build_platform}}\${{ matrix.build_configuration}}\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for Win32 / Debug
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\visual.net\${{ matrix.build_configuration}}\Notepad++.exe
|
||||
|
||||
- name: Run xml validation test for Win32 / Debug only
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug'
|
||||
working-directory: .\
|
||||
run: |
|
||||
python -m pip install requests rfc3987 pywin32 lxml
|
||||
python PowerEditor\Test\xmlValidator\validator_xml.py
|
||||
|
||||
|
||||
- name: Run FunctionList and UrlDetection Tests for Win32 / Debug only
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug'
|
||||
working-directory: .\
|
||||
run: |
|
||||
Copy-Item "PowerEditor\visual.net\Debug\Notepad++.exe" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\langs.model.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\stylers.model.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\shortcuts.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\contextMenu.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\installer\functionList" -Destination "PowerEditor\bin" -Recurse
|
||||
|
||||
Copy-Item "PowerEditor\installer\filesForTesting\regexGlobalTest.xml" -Destination "PowerEditor\bin\functionList"
|
||||
Copy-Item "PowerEditor\installer\filesForTesting\overrideMap.xml" -Destination "PowerEditor\bin\functionList"
|
||||
|
||||
cd .\PowerEditor\Test\FunctionList\
|
||||
.\unitTestLauncher.ps1
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
cd ..\UrlDetection
|
||||
.\verifyUrlDetection.ps1
|
||||
|
||||
|
||||
# build_windows_clang:
|
||||
|
||||
# runs-on: windows-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# build_configuration: [Release]
|
||||
# build_platform: [x64]
|
||||
|
||||
# steps:
|
||||
# - name: Checkout repo
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: Add msbuild to PATH
|
||||
# uses: microsoft/setup-msbuild@v1
|
||||
|
||||
# - name: MSBuild of n++ exe
|
||||
# working-directory: PowerEditor\visual.net\
|
||||
# run: msbuild notepadPlus.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="ClangCL"
|
||||
|
||||
|
||||
build_windows_cmake:
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- build_configuration: Release
|
||||
build_platform: x64
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Add nmake to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
- name: build scintilla
|
||||
working-directory: scintilla/win32/
|
||||
run: |
|
||||
nmake -f scintilla.mak
|
||||
|
||||
- name: build lexilla
|
||||
working-directory: lexilla/src/
|
||||
run: |
|
||||
nmake -f lexilla.mak
|
||||
|
||||
- name: generate cmake
|
||||
working-directory: PowerEditor/src
|
||||
run: |
|
||||
mkdir _build
|
||||
cd _build
|
||||
cmake -G "Visual Studio 17 2022" -A ${{ matrix.build_platform }} -T "v143" ..
|
||||
|
||||
- name: build cmake
|
||||
working-directory: PowerEditor/src
|
||||
run: |
|
||||
cd _build
|
||||
cmake --build . --config ${{ matrix.build_configuration }}
|
||||
|
||||
build_windows_msys2:
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_configuration: [Release, Debug]
|
||||
build_platform: [x86_64, i686]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Make n++ exe
|
||||
working-directory: .\
|
||||
run: |
|
||||
Write-host "${{ matrix.build_platform }}"
|
||||
Write-host "${{ matrix.build_configuration }}"
|
||||
$Env:Path = 'C:\msys64\usr\bin' + [IO.Path]::PathSeparator + $Env:Path
|
||||
if ( $${{ matrix.build_platform == 'i686'}} ) {$Env:MSYSTEM = 'MINGW32'}
|
||||
if ( $${{ matrix.build_platform == 'i686'}} ) {$Env:Path = 'C:\msys64\mingw32\bin' + [IO.Path]::PathSeparator + $Env:Path}
|
||||
if ( $${{ matrix.build_platform == 'x86_64'}} ) {$Env:MSYSTEM = 'MINGW64'}
|
||||
if ( $${{ matrix.build_platform == 'x86_64'}} ) {$Env:Path = 'C:\msys64\mingw64\bin' + [IO.Path]::PathSeparator + $Env:Path}
|
||||
if ( $${{ matrix.build_configuration == 'Debug'}} ) {$Env:DEBUG = '1'}
|
||||
Write-Output "Tools version:"
|
||||
Write-Output (((gcc --version) | select-object -first 1) + " " + (gcc -dumpmachine))
|
||||
Write-Output (make --version) | select-object -first 1
|
||||
Write-Output (sh --version) | select-object -first 1
|
||||
Write-Output ""
|
||||
bash -lc "pacman --noconfirm -Syuu"
|
||||
bash -lc "pacman --noconfirm -Syuu"
|
||||
if ( $${{ matrix.build_platform == 'i686'}} ) {bash -lc "pacman --noconfirm -S mingw-w64-i686-gcc mingw-w64-i686-make"}
|
||||
if ( $${{ matrix.build_platform == 'x86_64'}} ) {bash -lc "pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make"}
|
||||
make -f PowerEditor\gcc\makefile
|
||||
|
||||
- name: Archive artifacts for ${{ matrix.build_platform}} / Release
|
||||
if: matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.GCC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: bin.${{ matrix.build_platform}}\notepad++.exe
|
||||
|
||||
- name: Archive artifacts for ${{ matrix.build_platform}} / Debug
|
||||
if: matrix.build_configuration == 'Debug'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.GCC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: bin.${{ matrix.build_platform}}-debug\notepad++.exe
|
@ -1,166 +0,0 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# VisualStudio
|
||||
|
||||
#-- User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
#-- Build results
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
x86/
|
||||
#[Bb]in/
|
||||
[Oo]bj/
|
||||
*.pdb
|
||||
|
||||
#-- Visual C++ cache files
|
||||
.vs/
|
||||
.vscode/
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
#-- Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
#-- Others
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.exe
|
||||
*.obj
|
||||
*.pch
|
||||
#*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
.builds
|
||||
*.pidb
|
||||
*.vcxproj.filters
|
||||
*.bak
|
||||
|
||||
PowerEditor/bin/notepad++.exe
|
||||
PowerEditor/bin/Notepad++.exp
|
||||
PowerEditor/bin/Notepad++.lib
|
||||
PowerEditor/bin/NppShell.x86.dll
|
||||
PowerEditor/bin/config.xml
|
||||
PowerEditor/bin/stylers.xml
|
||||
PowerEditor/bin/langs.xml
|
||||
PowerEditor/bin/config.model.xml
|
||||
PowerEditor/bin/stylers.model.xml
|
||||
PowerEditor/bin/langs.model.xml
|
||||
PowerEditor/bin/contextMenu.xml
|
||||
PowerEditor/bin/nativeLang.xml
|
||||
PowerEditor/bin/session.xml
|
||||
PowerEditor/bin/functionList.xml
|
||||
PowerEditor/bin/shortcuts.xml
|
||||
PowerEditor/bin/backup/
|
||||
PowerEditor/bin/localization/
|
||||
PowerEditor/bin/plugins/
|
||||
PowerEditor/bin/updater/
|
||||
PowerEditor/bin/functionList/
|
||||
PowerEditor/bin64/
|
||||
PowerEditor/binarm64/
|
||||
PowerEditor/bin/themes/
|
||||
PowerEditor/installer/bin/wingup/
|
||||
PowerEditor/installer/build/
|
||||
PowerEditor/installer/minimalist/
|
||||
PowerEditor/installer/minimalist64/
|
||||
PowerEditor/installer/minimalistArm64/
|
||||
PowerEditor/installer/zipped.package.release/
|
||||
PowerEditor/installer/zipped.package.release64/
|
||||
PowerEditor/installer/zipped.package.releaseArm64/
|
||||
PowerEditor/visual.net/Unicode Debug/
|
||||
PowerEditor/visual.net/Unicode Release/
|
||||
PowerEditor/visual.net/Debug/
|
||||
PowerEditor/visual.net/Release/
|
||||
PowerEditor/visual.net/notepadPlus.sln
|
||||
PowerEditor/visual.net/notepadPlus.vcxproj.filters
|
||||
PowerEditor/visual.net/x64/Unicode Debug/
|
||||
PowerEditor/visual.net/x64/Unicode Release/
|
||||
PowerEditor/visual.net/x64/Debug/
|
||||
PowerEditor/visual.net/x64/Release/
|
||||
PowerEditor/visual.net/ARM64
|
||||
PowerEditor/src/tools/NppShell/build_ARM64
|
||||
PowerEditor/src/tools/NppShell/build_Win32
|
||||
PowerEditor/src/tools/NppShell/build_x64
|
||||
|
||||
# scintilla - generated files
|
||||
scintilla/bin/SciLexer.*
|
||||
scintilla/bin/Scintilla.*
|
||||
scintilla/bin/libscintilla.lib
|
||||
scintilla/win32/*.lib
|
||||
scintilla/win32/ScintRes.res
|
||||
scintilla/win32/ARM64
|
||||
scintilla/win32/Unicode Release/
|
||||
scintilla/win32/Unicode Debug/
|
||||
scintilla/win32/Release/
|
||||
scintilla/win32/Debug/
|
||||
scintilla/boostregex/bin
|
||||
scintilla/boostregex/boostpath.mak
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Windows
|
||||
|
||||
#-- image file cache
|
||||
Thumbs.db
|
||||
|
||||
#-- Folder config file
|
||||
Desktop.ini
|
||||
folder-*.ico
|
||||
|
||||
#-- Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Mac
|
||||
|
||||
*~
|
||||
*.lock
|
||||
*.DS_Store
|
||||
*.swp
|
||||
*.out
|
||||
scintilla/.hgeol
|
||||
scintilla/.hgtags
|
||||
scintilla/cppcheck.suppress
|
||||
scintilla/.hg_archival.txt
|
||||
scintilla/.hgignore
|
||||
scintilla/bin/__init__.py
|
||||
PowerEditor/bin/NppShell64_06.dll
|
||||
PowerEditor/bin/NppShell_06.dll
|
||||
|
||||
PowerEditor/bin/SourceCodePro-Bold.ttf
|
||||
PowerEditor/bin/SourceCodePro-BoldIt.ttf
|
||||
PowerEditor/bin/SourceCodePro-It.ttf
|
||||
PowerEditor/bin/SourceCodePro-Regular.ttf
|
||||
*.zip
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# MinGW-w64 GCC
|
||||
|
||||
bin.*
|
||||
scintilla/win32/*.o
|
||||
|
||||
|
||||
PowerEditor/src/MISC/md5/RCa06792
|
||||
*.db
|
||||
*.sln
|
||||
*.opendb
|
@ -1,72 +0,0 @@
|
||||
# Building Notepad++
|
||||
|
||||
## Microsoft Visual Studio
|
||||
|
||||
**Pre-requisites:**
|
||||
|
||||
- Microsoft Visual Studio 2022 version 17.5 (C/C++ Compiler, v143 toolset for win32, x64, arm64)
|
||||
|
||||
There are three components which are built from one visual studio solution:
|
||||
|
||||
- `notepad++.exe`: (contains `libSciLexer.lib`)
|
||||
- `libScintilla.lib` : static library based on [Scintilla](https://www.scintilla.org/)
|
||||
- `libLexilla.lib` : static library based on [Lexilla](https://www.scintilla.org/Lexilla.html)
|
||||
|
||||
Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla.
|
||||
|
||||
### Build `notepad++.exe`
|
||||
|
||||
1. Open [`PowerEditor\visual.net\notepadPlus.sln`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/visual.net/notepadPlus.sln)
|
||||
2. Select a solution configuration (Debug or Release) and a solution platform (x64 or Win32 or ARM64)
|
||||
3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects.
|
||||
|
||||
### Build `libScintilla.lib` and `libLexilla.lib`
|
||||
|
||||
As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this.
|
||||
|
||||
#### Build `libScintilla.lib` with boost and `libLexilla.lib` via nmake
|
||||
|
||||
This is not necessary any more and just here for completeness as this option is still available.
|
||||
Boost is taken from [boost 1.80.0](https://www.boost.org/users/history/version_1_80_0.html) and stripped down to the project needs available at [boost](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/boostregex/boost) in this repo.
|
||||
|
||||
1. Open the Developer Command Prompt for Visual Studio
|
||||
2. Go into the [`scintilla\win32\`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/win32/)
|
||||
3. Build the same configuration as notepad++:
|
||||
- Release: `nmake -f scintilla.mak`
|
||||
- Debug: `nmake DEBUG=1 -f scintilla.mak`
|
||||
- Example:
|
||||
`nmake -f scintilla.mak`
|
||||
4. Go into the [`lexilla\src\`](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/lexilla/src/)
|
||||
5. Build the same configuration as notepad++:
|
||||
- Release: `nmake -f lexilla.mak`
|
||||
- Debug: `nmake DEBUG=1 -f lexilla.mak`
|
||||
|
||||
### History
|
||||
|
||||
More about the previous build process: <https://community.notepad-plus-plus.org/topic/13959/building-notepad-with-visual-studio-2015-2017>
|
||||
|
||||
Since `Notepad++` version 6.0 - 7.9.5, the build of dynamic linked `SciLexer.dll` that is distributed
|
||||
uses features from Boost's `Boost.Regex` library.
|
||||
|
||||
## GCC
|
||||
|
||||
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/).
|
||||
|
||||
Building Notepad++ is regularly tested on a Windows system by using [MSYS2](https://www.msys2.org/) project. Current versions of tools used to building (such as GCC, Make or Bash) can be checked by looking at some logs from the finished building (for example in the [current-build page](https://ci.appveyor.com/project/donho/notepad-plus-plus)). Other versions may also work but are untested.
|
||||
|
||||
**Note:** Before building make sure that the system `PATH` environment variable contains `$MinGW-root$\bin` directory. Otherwise you have to set this directory yourself in Windows settings. You can also use a command like `set PATH=$MinGW-root$\bin;%PATH%` each time `cmd` is launched. But beware that if `PATH` contains several versions of MinGW-w64 GCC, only the first one will be usable.
|
||||
|
||||
### Compiling Notepad++ binary
|
||||
|
||||
1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary.
|
||||
2. `cd` into `notepad-plus-plus\PowerEditor\gcc`.
|
||||
3. Run `mingw32-make`.
|
||||
4. The 32-bit or 64-bit `notepad++.exe` will be generated either in `bin.i686` or in `bin.x86_64` directory respectively, depending on the target CPU of the compiler — look for the full path to the resulting binary at the end of the build process.
|
||||
|
||||
#### Some additional information
|
||||
|
||||
- The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start.
|
||||
- To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
|
||||
- To see commands being executed add `VERBOSE=1` to the same command.
|
||||
- When a project is built outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first.
|
||||
- When a project is built through MinGW-w64 with multilib support, a specific target can be forced by passing `TARGET_CPU` variable with `x86_64` or `i686` as value.
|
@ -1,449 +0,0 @@
|
||||
# Contributing
|
||||
|
||||
***Ask not what Notepad++ can do for you - ask what you can do for Notepad++***
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
Bug reports are appreciated. Following a few guidelines listed below will help speed up the process of getting them fixed.
|
||||
|
||||
1. Search the issue tracker to see if it has already been reported.
|
||||
2. Disable your plugins to see if one of them is the problem. You can do this by renaming your `plugins` folder to something else.
|
||||
3. Only report an issue with a plugin if it is one of the standard plugins included in the Notepad++ installation. Any other plugin issue should be reported to its respective issue tracker (see e.g. [plugin_list_x86.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x86.md) or [plugin_list_x64.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x64.md) to find the homepage with further information on that for a plugins). The standard plugins include (for v7.9.5):
|
||||
* NppExport
|
||||
* Converter
|
||||
* mimeTools
|
||||
4. Fill the complete information: a template will be shown when you create an issue. Please fill the complete information in the template. To fill the field **Debug Information** you can get it from your Notepad++ via menu `?>Debug Info...`. Please take your time to fill these information. If you don't bother to complete the information we need to help you, we won't bother to solve your problem either.
|
||||
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Your pull requests are welcome; however, they may not be accepted for various reasons. If you want to make some GUI enhancement like renaming some graphic items or fixing typos, please create the issue instead of the pull requests. All Pull Requests, except for translations and user documentation, need to be attached to a issue on GitHub. For Pull Requests regarding enhancements and questions, the issue must first be approved by one of project's administrators before being merged into the project. An approved issue will have the label `Accepted`. For issues that have not been accepted, you may request to be assigned to that issue.
|
||||
|
||||
Opening an issue beforehand allows the administrators and the community to discuss bugs and enhancements before work begins, preventing wasted effort.
|
||||
|
||||
### Guidelines for pull requests
|
||||
|
||||
1. Respect existing Notepad++ coding style. Observe the code near your intended change, and attempt to preserve the style of that code with the changes you make.
|
||||
2. Create a new branch for each PR. **Make sure your branch name wasn't used before** - you can add date (for example `patch3_20200528`) to ensure its uniqueness.
|
||||
3. Single feature or bug-fix per PR.
|
||||
4. Create a PR with a single commit to make the review process easier.
|
||||
5. Make your modification compact - don't reformat source code in your request. It makes code review more difficult.
|
||||
6. PR of reformatting (changing of ws/TAB, line endings or coding style) of source code won't be accepted. Use issue trackers for your request instead.
|
||||
7. Typo fixing and code refactoring won't be accepted - please create issues with title started with `TYPO` to request the changing.
|
||||
8. Address the review change requests by pushing new commits to the same PR. Avoid amending a commit and then force pushing it. All the PR commits are squashed before merging to the main branch.
|
||||
9. When creating new PR, try to base it on latest master.
|
||||
10. Don't merge `upstream/master` (using git or via github sync), if your PR is based on older `upstream/master`. If you need to base it on latest `master` (e.g. to check and fix merge conflict), use commands `git fetch upstream` to get latest `master` and then `git rebase upstream/master` to rebase it onto this latest `upstream/master`.
|
||||
11. Finally, please test your pull requests, at least once.
|
||||
|
||||
In short: The easier the code review is, the better the chance your pull request will get accepted.
|
||||
|
||||
### Coding style
|
||||
|
||||
![stay clean](https://notepad-plus-plus.org/assets/images/good-bad-practice.jpg)
|
||||
|
||||
#### GENERAL
|
||||
|
||||
1. Do not use Java-like braces
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
void MyClass::method1()
|
||||
{
|
||||
if (aCondition)
|
||||
{
|
||||
// Do something
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
void MyClass::method1() {
|
||||
if (aCondition) {
|
||||
// Do something
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
However, the method definition could be defined in a header file (.h), if there's one line code only. In this case, Java-like braces should be used.
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
class MyClass
|
||||
{
|
||||
public:
|
||||
void method1();
|
||||
int method2() {
|
||||
return _x; // only one line code can be placed in .h as method definition
|
||||
};
|
||||
|
||||
private:
|
||||
int _x;
|
||||
}
|
||||
```
|
||||
|
||||
2. Use tabs instead of white-spaces (we usually set our editors to 4 white-spaces for 1 tab, but the choice is up to you)
|
||||
|
||||
3. Always leave one space before and after binary and ternary operators
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (a == 10 && b == 42)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (a==10&&b==42)
|
||||
```
|
||||
|
||||
4. Only leave one space after semi-colons in "for" statements
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
for (int i = 0; i != 10; ++i)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
for(int i=0;i<10;++i)
|
||||
```
|
||||
|
||||
5. Function names are not separated from the first parenthesis
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
foo();
|
||||
myObject.foo(24);
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
foo ();
|
||||
```
|
||||
|
||||
6. Keywords are separated from the first parenthesis by one space
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (true)
|
||||
while (true)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if(myCondition)
|
||||
```
|
||||
|
||||
7. Switch
|
||||
|
||||
* Use the following indenting for "switch" statements:
|
||||
|
||||
```cpp
|
||||
switch (test)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
// Do something
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Do something else
|
||||
} // No semi-colon here
|
||||
```
|
||||
|
||||
* If possible use `default` statement, and prefer using it as last case.
|
||||
* When using switch with enum or known range, try to cover all values if not using `default`.
|
||||
|
||||
```cpp
|
||||
enum class Test {val1, val2, val3}
|
||||
|
||||
switch (Test)
|
||||
{
|
||||
case Test::val1:
|
||||
{
|
||||
// Do something
|
||||
break;
|
||||
}
|
||||
|
||||
//case Test::val2:
|
||||
//case Test::val3:
|
||||
default:
|
||||
// Do something else
|
||||
} // No semi-colon here
|
||||
```
|
||||
|
||||
When using `default` adding uncovered values as comments can help to convey intention.
|
||||
|
||||
* Use `[[fallthrough]]` if fall through is intended.
|
||||
|
||||
```cpp
|
||||
switch (test)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
// Do something
|
||||
}
|
||||
// I want fall through // adding comment can help to convey intention
|
||||
[[fallthrough]];
|
||||
|
||||
case 2:
|
||||
{
|
||||
// Do something
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// Do something else
|
||||
} // No semi-colon here
|
||||
```
|
||||
|
||||
8. Avoid magic numbers
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (foo == I_CAN_PUSH_ON_THE_RED_BUTTON)
|
||||
startTheNuclearWar();
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
while (lifeTheUniverseAndEverything != 42)
|
||||
lifeTheUniverseAndEverything = buildMorePowerfulComputerForTheAnswer();
|
||||
```
|
||||
|
||||
9. Prefer enums for integer constants
|
||||
|
||||
10. Use initialization with curly braces
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
MyClass instance{10.4};
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
MyClass instance(10.4);
|
||||
```
|
||||
|
||||
11. Always use `empty()` for testing if a string is empty or not
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (!string.empty())
|
||||
...
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (string != "")
|
||||
...
|
||||
```
|
||||
|
||||
12. Always use `C++ conversion` instead of `C-Style cast`
|
||||
|
||||
* Generally, all the conversion among types should be avoided. If you have no choice, use C++ conversion.
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
char aChar = static_cast<char>(_pEditView->execute(SCI_GETCHARAT, j));
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
char aChar = (char)_pEditView->execute(SCI_GETCHARAT, j);
|
||||
```
|
||||
|
||||
13. Use `!` instead of `not`, `&&` instead of `and`, `||` instead of `or`
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (!::PathFileExists(dir2Search))
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (not ::PathFileExists(dir2Search))
|
||||
```
|
||||
|
||||
14. Always initialize local and global variables
|
||||
|
||||
* For primitive types and enum prefer initialization with `=`.
|
||||
* For other prefer `{}`-initializer syntax.
|
||||
* For "numerical" variables using literal suffix can help to convey intention.
|
||||
|
||||
```cpp
|
||||
constexpr float g_globalVariable = 0.0F;
|
||||
|
||||
void test()
|
||||
{
|
||||
constexpr UINT strLen = 1024U;
|
||||
wchar_t myString[strLen]{};
|
||||
}
|
||||
```
|
||||
|
||||
#### NAMING CONVENTIONS
|
||||
|
||||
1. Classes uses Pascal Case
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
class IAmAClass
|
||||
{};
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
class iAmAClass
|
||||
{};
|
||||
class I_am_a_class
|
||||
{};
|
||||
```
|
||||
|
||||
2. Methods & method parameters
|
||||
|
||||
* Use camel Case
|
||||
|
||||
```cpp
|
||||
void myMethod(uint myVeryLongParameter);
|
||||
```
|
||||
|
||||
3. Member variables
|
||||
|
||||
* Any member variable name of class/struct should be preceded by an underscore.
|
||||
|
||||
```cpp
|
||||
public:
|
||||
int _publicAttribute;
|
||||
private:
|
||||
int _pPrivateAttribute;
|
||||
float _pAccount;
|
||||
```
|
||||
|
||||
4. Always prefer a variable name that describes what the variable is used for
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (hours < 24 && minutes < 60 && seconds < 60)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (a < 24 && b < 60 && c < 60)
|
||||
```
|
||||
|
||||
#### COMMENTS
|
||||
|
||||
1. Use C++ comment line style rather than C comment style
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
// Two lines comment
|
||||
// Use still C++ comment line style
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
/*
|
||||
Please don't piss me off with that
|
||||
*/
|
||||
```
|
||||
|
||||
#### BEST PRACTICES
|
||||
|
||||
1. Use C++11/14/17/20 whenever it is possible.
|
||||
|
||||
2. Use C++11 member initialization feature whenever it is possible.
|
||||
|
||||
```cpp
|
||||
class Foo
|
||||
{
|
||||
int value = 0;
|
||||
};
|
||||
```
|
||||
|
||||
3. Incrementing
|
||||
* Prefer Pre-increment
|
||||
|
||||
```cpp
|
||||
++i
|
||||
```
|
||||
|
||||
* Over Post-increment
|
||||
|
||||
```cpp
|
||||
i++
|
||||
```
|
||||
|
||||
(It does not change anything for built-in types but it would bring consistency)
|
||||
|
||||
4. Avoid using pointers. References are preferred instead. You might need the variable to be assigned a `NULL` value: in this case the `NULL` value has semantics and must be checked. Wherever possible, use a SmartPtr instead of old-school pointers.
|
||||
|
||||
5. Avoid using new if you can use automatic variable. However, avoid `shared_ptr` as much as possible. Prefer `unique_ptr` instead.
|
||||
|
||||
6. Don't place any "using namespace" directives in headers.
|
||||
|
||||
7. Compile time is without incidence. Increasing compile time to reduce execution time is encouraged.
|
||||
|
||||
8. Code legibility and length is less important than easy and fast end-user experience.
|
||||
|
||||
9. Prefer `constexpr` over `const` if value can be evaluated at compile time.
|
||||
|
||||
10. Check if there are helper functions in headers or lambda functions to reuse them instead of writing new code.
|
||||
|
||||
* Example
|
||||
|
||||
```cpp
|
||||
// in StaticDialog.h
|
||||
isCheckedOrNot();
|
||||
setChecked();
|
||||
|
||||
// in Parameters.cpp
|
||||
parseYesNoBoolAttribute();
|
||||
```
|
||||
|
||||
11. Check if there are already defined global variables, and reuse them instead of defining new ones.
|
||||
|
||||
12. Avoid "Yoda conditions".
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (iAmYourFather == true)
|
||||
...
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (true == iAmYourFather)
|
||||
...
|
||||
```
|
||||
|
||||
13. Check [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md) for additional guidelines.
|
@ -1,26 +0,0 @@
|
||||
<!--- This is a generic template and may not be applicable in all cases. -->
|
||||
<!--- Try to follow it where possible. -->
|
||||
|
||||
### Description of the Issue
|
||||
<!--- Provide a more detailed description to the issue itself -->
|
||||
|
||||
### Steps to Reproduce the Issue
|
||||
<!--- Set of steps to reproduce this issue -->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected Behavior
|
||||
<!--- What did you expect to happen -->
|
||||
|
||||
### Actual Behavior
|
||||
<!--- What actually happened -->
|
||||
|
||||
### Debug Information
|
||||
<!--- In your Notepad++, click on the "?" menu (found to the right of "Window" in the menu bar) -->
|
||||
<!--- In the menu that drops down, choose "Debug Info..." -->
|
||||
<!--- A message box will open detailing specifics about your Notepad++ version, plugins, etc. -->
|
||||
<!--- CLICK ON THE BLUE LINK with the text "Copy debug info into clipboard" -->
|
||||
<!--- Do a PASTE HERE -->
|
||||
|
||||
<!--- Feel free to include any other info, such as screenshots, etc -->
|
@ -1,231 +0,0 @@
|
||||
COPYING -- Describes the terms under which Notepad++ is distributed.
|
||||
A copy of the GNU GPL is appended to this file.
|
||||
|
||||
IMPORTANT NOTEPAD++ LICENSE TERMS
|
||||
|
||||
Copyright (C)2021 Don HO <don.h@free.fr>. This program is free software; you may redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; Version 3 with the clarifications and exceptions described below. This guarantees your right to use, modify, and redistribute this software under certain conditions.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
******************************************************************
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
0. Definitions.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
|
||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
|
@ -1 +0,0 @@
|
||||
{"leaves":["BiSeqOut"],"root":"unitTest"}
|
@ -1,43 +0,0 @@
|
||||
-- Chapter 24 - Program 1 from https://perso.telecom-paristech.fr/pautet/Ada95/e_c24_p1.ada
|
||||
with Ada.Text_IO;
|
||||
use Ada.Text_IO;
|
||||
with Ada.Sequential_IO;
|
||||
|
||||
procedure BiSeqOut is
|
||||
|
||||
type MY_REC is
|
||||
record
|
||||
Age : INTEGER;
|
||||
Sex : CHARACTER;
|
||||
Initial : CHARACTER;
|
||||
end record;
|
||||
|
||||
package Seq_IO is new Ada.Sequential_IO(MY_REC);
|
||||
use Seq_IO;
|
||||
|
||||
Myself : MY_REC;
|
||||
My_Out_File : Seq_IO.FILE_TYPE;
|
||||
|
||||
begin
|
||||
|
||||
Create(My_Out_File, Out_File, "NAMEFILE.TXT");
|
||||
|
||||
Myself.Sex := 'M';
|
||||
Myself.Initial := 'X';
|
||||
|
||||
for Index in 1..100 loop
|
||||
Myself.Age := Index;
|
||||
Write(My_Out_File, Myself);
|
||||
end loop;
|
||||
|
||||
Close(My_Out_File);
|
||||
|
||||
end BiSeqOut;
|
||||
|
||||
|
||||
|
||||
|
||||
-- Result of Execution
|
||||
|
||||
-- (The only output is a binary file named NAMEFILE.TXT)
|
||||
|
@ -1,231 +0,0 @@
|
||||
page ,132
|
||||
title strcat - concatenate (append) one string to another
|
||||
;***
|
||||
;strcat.asm - contains strcat() and strcpy() routines
|
||||
;
|
||||
; Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
;
|
||||
;Purpose:
|
||||
; STRCAT concatenates (appends) a copy of the source string to the
|
||||
; end of the destination string, returning the destination string.
|
||||
;
|
||||
;*******************************************************************************
|
||||
|
||||
.xlist
|
||||
include cruntime.inc
|
||||
.list
|
||||
|
||||
|
||||
page
|
||||
;***
|
||||
;char *strcat(dst, src) - concatenate (append) one string to another
|
||||
;
|
||||
;Purpose:
|
||||
; Concatenates src onto the end of dest. Assumes enough
|
||||
; space in dest.
|
||||
;
|
||||
; Algorithm:
|
||||
; char * strcat (char * dst, char * src)
|
||||
; {
|
||||
; char * cp = dst;
|
||||
;
|
||||
; while( *cp )
|
||||
; ++cp; /* Find end of dst */
|
||||
; while( *cp++ = *src++ )
|
||||
; ; /* Copy src to end of dst */
|
||||
; return( dst );
|
||||
; }
|
||||
;
|
||||
;Entry:
|
||||
; char *dst - string to which "src" is to be appended
|
||||
; const char *src - string to be appended to the end of "dst"
|
||||
;
|
||||
;Exit:
|
||||
; The address of "dst" in EAX
|
||||
;
|
||||
;Uses:
|
||||
; EAX, ECX
|
||||
;
|
||||
;Exceptions:
|
||||
;
|
||||
;*******************************************************************************
|
||||
|
||||
page
|
||||
;***
|
||||
;char *strcpy(dst, src) - copy one string over another
|
||||
;
|
||||
;Purpose:
|
||||
; Copies the string src into the spot specified by
|
||||
; dest; assumes enough room.
|
||||
;
|
||||
; Algorithm:
|
||||
; char * strcpy (char * dst, char * src)
|
||||
; {
|
||||
; char * cp = dst;
|
||||
;
|
||||
; while( *cp++ = *src++ )
|
||||
; ; /* Copy src over dst */
|
||||
; return( dst );
|
||||
; }
|
||||
;
|
||||
;Entry:
|
||||
; char * dst - string over which "src" is to be copied
|
||||
; const char * src - string to be copied over "dst"
|
||||
;
|
||||
;Exit:
|
||||
; The address of "dst" in EAX
|
||||
;
|
||||
;Uses:
|
||||
; EAX, ECX
|
||||
;
|
||||
;Exceptions:
|
||||
;*******************************************************************************
|
||||
|
||||
|
||||
CODESEG
|
||||
|
||||
% public strcat, strcpy ; make both functions available
|
||||
strcpy proc \
|
||||
dst:ptr byte, \
|
||||
src:ptr byte
|
||||
|
||||
OPTION PROLOGUE:NONE, EPILOGUE:NONE
|
||||
|
||||
push edi ; preserve edi
|
||||
mov edi,[esp+8] ; edi points to dest string
|
||||
jmp short copy_start
|
||||
|
||||
strcpy endp
|
||||
|
||||
align 16
|
||||
|
||||
strcat proc \
|
||||
dst:ptr byte, \
|
||||
src:ptr byte
|
||||
|
||||
OPTION PROLOGUE:NONE, EPILOGUE:NONE
|
||||
|
||||
.FPO ( 0, 2, 0, 0, 0, 0 )
|
||||
|
||||
mov ecx,[esp+4] ; ecx -> dest string
|
||||
push edi ; preserve edi
|
||||
test ecx,3 ; test if string is aligned on 32 bits
|
||||
je short find_end_of_dest_string_loop
|
||||
|
||||
dest_misaligned: ; simple byte loop until string is aligned
|
||||
mov al,byte ptr [ecx]
|
||||
add ecx,1
|
||||
test al,al
|
||||
je short start_byte_3
|
||||
test ecx,3
|
||||
jne short dest_misaligned
|
||||
|
||||
align 4
|
||||
|
||||
find_end_of_dest_string_loop:
|
||||
mov eax,dword ptr [ecx] ; read 4 bytes
|
||||
mov edx,7efefeffh
|
||||
add edx,eax
|
||||
xor eax,-1
|
||||
xor eax,edx
|
||||
add ecx,4
|
||||
test eax,81010100h
|
||||
je short find_end_of_dest_string_loop
|
||||
; found zero byte in the loop
|
||||
mov eax,[ecx - 4]
|
||||
test al,al ; is it byte 0
|
||||
je short start_byte_0
|
||||
test ah,ah ; is it byte 1
|
||||
je short start_byte_1
|
||||
test eax,00ff0000h ; is it byte 2
|
||||
je short start_byte_2
|
||||
test eax,0ff000000h ; is it byte 3
|
||||
je short start_byte_3
|
||||
jmp short find_end_of_dest_string_loop
|
||||
; taken if bits 24-30 are clear and bit
|
||||
; 31 is set
|
||||
start_byte_3:
|
||||
lea edi,[ecx - 1]
|
||||
jmp short copy_start
|
||||
start_byte_2:
|
||||
lea edi,[ecx - 2]
|
||||
jmp short copy_start
|
||||
start_byte_1:
|
||||
lea edi,[ecx - 3]
|
||||
jmp short copy_start
|
||||
start_byte_0:
|
||||
lea edi,[ecx - 4]
|
||||
; jmp short copy_start
|
||||
|
||||
; edi points to the end of dest string.
|
||||
copy_start::
|
||||
mov ecx,[esp+0ch] ; ecx -> sorc string
|
||||
test ecx,3 ; test if string is aligned on 32 bits
|
||||
je short main_loop_entrance
|
||||
|
||||
src_misaligned: ; simple byte loop until string is aligned
|
||||
mov dl,byte ptr [ecx]
|
||||
add ecx,1
|
||||
test dl,dl
|
||||
je short byte_0
|
||||
mov [edi],dl
|
||||
add edi,1
|
||||
test ecx,3
|
||||
jne short src_misaligned
|
||||
jmp short main_loop_entrance
|
||||
|
||||
main_loop: ; edx contains first dword of sorc string
|
||||
mov [edi],edx ; store one more dword
|
||||
add edi,4 ; kick dest pointer
|
||||
main_loop_entrance:
|
||||
mov edx,7efefeffh
|
||||
mov eax,dword ptr [ecx] ; read 4 bytes
|
||||
|
||||
add edx,eax
|
||||
xor eax,-1
|
||||
|
||||
xor eax,edx
|
||||
mov edx,[ecx] ; it's in cache now
|
||||
|
||||
add ecx,4 ; kick dest pointer
|
||||
test eax,81010100h
|
||||
|
||||
je short main_loop
|
||||
; found zero byte in the loop
|
||||
; main_loop_end:
|
||||
test dl,dl ; is it byte 0
|
||||
je short byte_0
|
||||
test dh,dh ; is it byte 1
|
||||
je short byte_1
|
||||
test edx,00ff0000h ; is it byte 2
|
||||
je short byte_2
|
||||
test edx,0ff000000h ; is it byte 3
|
||||
je short byte_3
|
||||
jmp short main_loop ; taken if bits 24-30 are clear and bit
|
||||
; 31 is set
|
||||
byte_3:
|
||||
mov [edi],edx
|
||||
mov eax,[esp+8] ; return in eax pointer to dest string
|
||||
pop edi
|
||||
ret
|
||||
byte_2:
|
||||
mov [edi],dx
|
||||
mov eax,[esp+8] ; return in eax pointer to dest string
|
||||
mov byte ptr [edi+2],0
|
||||
pop edi
|
||||
ret
|
||||
byte_1:
|
||||
mov [edi],dx
|
||||
mov eax,[esp+8] ; return in eax pointer to dest string
|
||||
pop edi
|
||||
ret
|
||||
byte_0:
|
||||
mov [edi],dl
|
||||
mov eax,[esp+8] ; return in eax pointer to dest string
|
||||
pop edi
|
||||
ret
|
||||
|
||||
strcat endp
|
||||
|
||||
end
|
||||
|
@ -1 +0,0 @@
|
||||
{"leaves":["dst","src","dst","src","dest_misaligned","find_end_of_dest_string_loop","start_byte_3","start_byte_2","start_byte_1","start_byte_0","copy_start","src_misaligned","main_loop","main_loop_entrance","byte_3","byte_2","byte_1","byte_0"],"root":"unitTest"}
|
@ -1,53 +0,0 @@
|
||||
; Script Name : logoff.au3
|
||||
; Author : Craig Richards
|
||||
; Created : 6th February 2012
|
||||
; Last Modified :
|
||||
; Version : 1.0
|
||||
|
||||
; Modifications :
|
||||
|
||||
; Description : This is a simple splash screen to wrap around my logoff.bat incase someone presses my logoff button by mistake (New Microsoft Keyboard)
|
||||
|
||||
#Include <GuiConstants.au3> ; Include the GuiConstants Header File
|
||||
#Include <StaticConstants.au3> ; Include the StaticConstants Header File
|
||||
|
||||
Opt('GuiOnEventMode', 1) ; Set the Option, and enable GuiOnEventMode
|
||||
GUICreate ("Logoff Warning", 750, 750) ; Create a simple window
|
||||
;GUISetIcon("icon.ico") ; Give it an icon
|
||||
GUISetOnEvent($GUI_EVENT_CLOSE, 'GUIExit') ; Close the Window if the program is quit
|
||||
GUICtrlCreatePic("1280.jpg",0,0,750,680) ; Put a picture in the background of the splash screen
|
||||
GUICtrlCreateLabel("Please Choose an Option Below:", 220, 680, 300, 15, $SS_CENTER) ; A simple label on the screen
|
||||
GUICtrlSetColor(-1,0xFF0000); ; Text of the label will be Red
|
||||
GUICtrlCreateButton("Logoff", 170, 700, 200, 30) ; Create a simple button to run the logoff script
|
||||
GUICTrlSetOnEvent(-1, 'logoff') ; If pressed run the logoff function
|
||||
GUICtrlCreateButton("Cancel", 375, 700, 200, 30) ; Create a simple button to quit the program
|
||||
GUICTrlSetOnEvent(-1, 'cancel') ; If pressed run the cancel function
|
||||
|
||||
Func logoff() ; Start of the logoff function
|
||||
GUISetState(@SW_HIDE) ; Hide the Window
|
||||
Run("u:\logoff.bat") ; Run the logoff batch file
|
||||
Exit ; Quit the program
|
||||
EndFunc ; End of the logoff Function
|
||||
|
||||
#CS
|
||||
Func logoff()
|
||||
GUISetState(@SW_HIDE)
|
||||
Run("u:\logoff.bat")
|
||||
Exit
|
||||
EndFunc
|
||||
#CE
|
||||
|
||||
Func cancel() ; Start of the cancel function
|
||||
GUISetState(@SW_HIDE) ; Hide the Window
|
||||
Exit ; Quit the program
|
||||
EndFunc ; End of the cancel Function
|
||||
|
||||
GUISetState(@SW_SHOW) ; Show the application Windows
|
||||
|
||||
While 1 ; A simple while loop
|
||||
Sleep(500) ; Sleep to keep the window running
|
||||
WEnd ; End of the While loop
|
||||
|
||||
Func GUIExit() ; Start of the GUIExit function
|
||||
Exit ; Quit the program
|
||||
EndFunc
|
@ -1 +0,0 @@
|
||||
{"leaves":["logoff","cancel","GUIExit"],"root":"unitTest"}
|
@ -1,259 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# bash parser should be fixed so we can use the content of "unitTest.expected.result.correct".
|
||||
# Check the bug here:
|
||||
# https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9019
|
||||
|
||||
setenv()
|
||||
|
||||
{
|
||||
# Define and export.
|
||||
|
||||
eval ${1}="${2}"
|
||||
export ${1}
|
||||
}
|
||||
|
||||
|
||||
case "${SCRIPTDIR}" in
|
||||
/*) ;;
|
||||
*) SCRIPTDIR="`pwd`/${SCRIPTDIR}"
|
||||
esac
|
||||
|
||||
while true
|
||||
do case "${SCRIPTDIR}" in
|
||||
*/.) SCRIPTDIR="${SCRIPTDIR%/.}";;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
# The script directory is supposed to be in $TOPDIR/packages/os400.
|
||||
|
||||
TOPDIR=`dirname "${SCRIPTDIR}"`
|
||||
TOPDIR=`dirname "${TOPDIR}"`
|
||||
export SCRIPTDIR TOPDIR
|
||||
|
||||
# Extract the SONAME from the library makefile.
|
||||
|
||||
SONAME=`sed -e '/^VERSIONINFO=/!d' -e 's/^.* \([0-9]*\):.*$/\1/' -e 'q' \
|
||||
< "${TOPDIR}/lib/Makefile.am"`
|
||||
export SONAME
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Tunable configuration parameters.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
setenv TARGETLIB 'CURL' # Target OS/400 program library.
|
||||
setenv STATBNDDIR 'CURL_A' # Static binding directory.
|
||||
setenv DYNBNDDIR 'CURL' # Dynamic binding directory.
|
||||
setenv SRVPGM "CURL.${SONAME}" # Service program.
|
||||
setenv TGTCCSID '500' # Target CCSID of objects.
|
||||
setenv DEBUG '*ALL' # Debug level.
|
||||
setenv OPTIMIZE '10' # Optimisation level
|
||||
setenv OUTPUT '*NONE' # Compilation output option.
|
||||
setenv TGTRLS 'V6R1M0' # Target OS release.
|
||||
setenv IFSDIR '/curl' # Installation IFS directory.
|
||||
|
||||
# Define ZLIB availability and locations.
|
||||
|
||||
setenv WITH_ZLIB 0 # Define to 1 to enable.
|
||||
setenv ZLIB_INCLUDE '/zlib/include' # ZLIB include IFS directory.
|
||||
setenv ZLIB_LIB 'ZLIB' # ZLIB library.
|
||||
setenv ZLIB_BNDDIR 'ZLIB_A' # ZLIB binding directory.
|
||||
|
||||
# Define LIBSSH2 availability and locations.
|
||||
|
||||
setenv WITH_LIBSSH2 0 # Define to 1 to enable.
|
||||
setenv LIBSSH2_INCLUDE '/libssh2/include' # LIBSSH2 include IFS directory.
|
||||
setenv LIBSSH2_LIB 'LIBSSH2' # LIBSSH2 library.
|
||||
setenv LIBSSH2_BNDDIR 'LIBSSH2_A' # LIBSSH2 binding directory.
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
# Need to get the version definitions.
|
||||
|
||||
LIBCURL_VERSION=`grep '^#define *LIBCURL_VERSION ' \
|
||||
"${TOPDIR}/include/curl/curlver.h" |
|
||||
sed 's/.*"\(.*\)".*/\1/'`
|
||||
LIBCURL_VERSION_MAJOR=`grep '^#define *LIBCURL_VERSION_MAJOR ' \
|
||||
"${TOPDIR}/include/curl/curlver.h" |
|
||||
sed 's/^#define *LIBCURL_VERSION_MAJOR *\([^ ]*\).*/\1/'`
|
||||
LIBCURL_VERSION_MINOR=`grep '^#define *LIBCURL_VERSION_MINOR ' \
|
||||
"${TOPDIR}/include/curl/curlver.h" |
|
||||
sed 's/^#define *LIBCURL_VERSION_MINOR *\([^ ]*\).*/\1/'`
|
||||
LIBCURL_VERSION_PATCH=`grep '^#define *LIBCURL_VERSION_PATCH ' \
|
||||
"${TOPDIR}/include/curl/curlver.h" |
|
||||
sed 's/^#define *LIBCURL_VERSION_PATCH *\([^ ]*\).*/\1/'`
|
||||
LIBCURL_VERSION_NUM=`grep '^#define *LIBCURL_VERSION_NUM ' \
|
||||
"${TOPDIR}/include/curl/curlver.h" |
|
||||
sed 's/^#define *LIBCURL_VERSION_NUM *0x\([^ ]*\).*/\1/'`
|
||||
LIBCURL_TIMESTAMP=`grep '^#define *LIBCURL_TIMESTAMP ' \
|
||||
"${TOPDIR}/include/curl/curlver.h" |
|
||||
sed 's/.*"\(.*\)".*/\1/'`
|
||||
export LIBCURL_VERSION
|
||||
export LIBCURL_VERSION_MAJOR LIBCURL_VERSION_MINOR LIBCURL_VERSION_PATCH
|
||||
export LIBCURL_VERSION_NUM LIBCURL_TIMESTAMP
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# OS/400 specific definitions.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBIFSNAME="/QSYS.LIB/${TARGETLIB}.LIB"
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Procedures.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# action_needed dest [src]
|
||||
#
|
||||
# dest is an object to build
|
||||
# if specified, src is an object on which dest depends.
|
||||
#
|
||||
# exit 0 (succeeds) if some action has to be taken, else 1.
|
||||
|
||||
action_needed()
|
||||
{
|
||||
[ ! -e "${1}" ] && return 0
|
||||
[ "${2}" ] || return 1
|
||||
[ "${1}" -ot "${2}" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
# canonicalize_path path
|
||||
#
|
||||
# Return canonicalized path as:
|
||||
# - Absolute
|
||||
# - No . or .. component.
|
||||
|
||||
canonicalize_path(){
|
||||
if expr "${1}" : '^/' > /dev/null
|
||||
then P="${1}"
|
||||
else P="`pwd`/${1}"
|
||||
fi
|
||||
|
||||
R=
|
||||
IFSSAVE="${IFS}"
|
||||
IFS="/"
|
||||
|
||||
for C in ${P}
|
||||
do IFS="${IFSSAVE}"
|
||||
case "${C}" in
|
||||
.) ;;
|
||||
..) R=`expr "${R}" : '^\(.*/\)..*'`
|
||||
;;
|
||||
?*) R="${R}${C}/"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
IFS="${IFSSAVE}"
|
||||
echo "/`expr "${R}" : '^\(.*\)/'`"
|
||||
}
|
||||
|
||||
|
||||
# make_module module_name source_name [additional_definitions]
|
||||
#
|
||||
# Compile source name into ASCII module if needed.
|
||||
# As side effect, append the module name to variable MODULES.
|
||||
# Set LINK to "YES" if the module has been compiled.
|
||||
|
||||
make_module() {
|
||||
MODULES="${MODULES} ${1}"
|
||||
MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
|
||||
action_needed "${MODIFSNAME}" "${2}" || return 0;
|
||||
SRCDIR=`dirname \`canonicalize_path "${2}"\``
|
||||
|
||||
# #pragma convert has to be in the source file itself, i.e.
|
||||
# putting it in an include file makes it only active
|
||||
# for that include file.
|
||||
# Thus we build a temporary file with the pragma prepended to
|
||||
# the source file and we compile that themporary file.
|
||||
|
||||
echo "#line 1 \"${2}\"" > __tmpsrcf.c
|
||||
echo "#pragma convert(819)" >> __tmpsrcf.c
|
||||
echo "#line 1" >> __tmpsrcf.c
|
||||
cat "${2}" >> __tmpsrcf.c
|
||||
CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('__tmpsrcf.c')"
|
||||
# CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST *SHOWINC *SHOWSYS)"
|
||||
CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)"
|
||||
CMD="${CMD} LOCALETYPE(*LOCALE) FLAG(10)"
|
||||
CMD="${CMD} INCDIR('/qibm/proddata/qadrt/include'"
|
||||
CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include' '${SRCDIR}'"
|
||||
CMD="${CMD} '${TOPDIR}/packages/OS400'"
|
||||
|
||||
if [ "${WITH_ZLIB}" != "0" ]
|
||||
then CMD="${CMD} '${ZLIB_INCLUDE}'"
|
||||
fi
|
||||
|
||||
if [ "${WITH_LIBSSH2}" != "0" ]
|
||||
then CMD="${CMD} '${LIBSSH2_INCLUDE}'"
|
||||
fi
|
||||
|
||||
CMD="${CMD} ${INCLUDES})"
|
||||
CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
|
||||
CMD="${CMD} OUTPUT(${OUTPUT})"
|
||||
CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
|
||||
CMD="${CMD} DBGVIEW(${DEBUG})"
|
||||
|
||||
DEFINES="${3} BUILDING_LIBCURL"
|
||||
|
||||
if [ "${WITH_ZLIB}" != "0" ]
|
||||
then DEFINES="${DEFINES} HAVE_LIBZ HAVE_ZLIB_H"
|
||||
fi
|
||||
|
||||
if [ "${WITH_LIBSSH2}" != "0" ]
|
||||
then DEFINES="${DEFINES} USE_LIBSSH2 HAVE_LIBSSH2_H"
|
||||
fi
|
||||
|
||||
if [ "${DEFINES}" ]
|
||||
then CMD="${CMD} DEFINE(${DEFINES})"
|
||||
fi
|
||||
|
||||
system "${CMD}"
|
||||
rm -f __tmpsrcf.c
|
||||
LINK=YES
|
||||
}
|
||||
|
||||
|
||||
# Determine DB2 object name from IFS name.
|
||||
|
||||
db2_name()
|
||||
|
||||
{
|
||||
if [ "${2}" = 'nomangle' ]
|
||||
then basename "${1}" |
|
||||
tr 'a-z-' 'A-Z_' |
|
||||
sed -e 's/\..*//' \
|
||||
-e 's/^\(.\).*\(.........\)$/\1\2/'
|
||||
else basename "${1}" |
|
||||
tr 'a-z-' 'A-Z_' |
|
||||
sed -e 's/\..*//' \
|
||||
-e 's/^CURL_*/C/' \
|
||||
-e 's/^\(.\).*\(.........\)$/\1\2/'
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Copy IFS file replacing version info.
|
||||
|
||||
versioned_copy()
|
||||
|
||||
{
|
||||
sed -e "s/@LIBCURL_VERSION@/${LIBCURL_VERSION}/g" \
|
||||
-e "s/@LIBCURL_VERSION_MAJOR@/${LIBCURL_VERSION_MAJOR}/g" \
|
||||
-e "s/@LIBCURL_VERSION_MINOR@/${LIBCURL_VERSION_MINOR}/g" \
|
||||
-e "s/@LIBCURL_VERSION_PATCH@/${LIBCURL_VERSION_PATCH}/g" \
|
||||
-e "s/@LIBCURL_VERSION_NUM@/${LIBCURL_VERSION_NUM}/g" \
|
||||
-e "s/@LIBCURL_TIMESTAMP@/${LIBCURL_TIMESTAMP}/g" \
|
||||
< "${1}" > "${2}"
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"leaves":["setenv","action_needed","canonicalize_path","make_module","db2_name","versioned_copy"],"root":"unitTest"}
|
@ -1,115 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem Inno Setup
|
||||
rem Copyright (C) 1997-2012 Jordan Russell
|
||||
rem Portions by Martijn Laan
|
||||
rem For conditions of distribution and use, see LICENSE.TXT.
|
||||
rem
|
||||
rem Batch file to compile all projects with Unicode support
|
||||
|
||||
setlocal
|
||||
|
||||
if exist compilesettings.bat goto compilesettingsfound
|
||||
:compilesettingserror
|
||||
echo compilesettings.bat is missing or incomplete. It needs to be created
|
||||
echo with either of the following lines, adjusted for your system:
|
||||
echo.
|
||||
echo set DELPHI2009ROOT=C:\Program Files\CodeGear\RAD Studio\6.0 [Path to Delphi 2009 (or 2010)]
|
||||
echo or
|
||||
echo set DELPHIXEROOT=C:\Program Files\Embarcadero\RAD Studio\8.0 [Path to Delphi XE (or later)]
|
||||
goto failed2
|
||||
|
||||
:compilesettingsfound
|
||||
set DELPHI2009ROOT=
|
||||
set DELPHIXEROOT=
|
||||
call .\compilesettings.bat
|
||||
if "%DELPHI2009ROOT%"=="" if "%DELPHIXEROOT%"=="" goto compilesettingserror
|
||||
if not "%DELPHI2009ROOT%"=="" if not "%DELPHIXEROOT%"=="" goto compilesettingserror
|
||||
|
||||
rem -------------------------------------------------------------------------
|
||||
|
||||
rem Compile each project separately because it seems Delphi
|
||||
rem carries some settings (e.g. $APPTYPE) between projects
|
||||
rem if multiple projects are specified on the command line.
|
||||
rem Note:
|
||||
rem Command line parameter "--peflags:1" below equals the
|
||||
rem {$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED} directive.
|
||||
rem This causes the Delphi compiler to not just set the flag
|
||||
rem but also it actually strips relocations. Used instead of
|
||||
rem calling StripReloc like compile.bat does.
|
||||
|
||||
cd Projects
|
||||
if errorlevel 1 goto exit
|
||||
|
||||
cd ISPP
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo - ISPP.dpr
|
||||
if "%DELPHIXEROOT%"=="" (
|
||||
"%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib" -E..\..\Files ISPP.dpr
|
||||
) else (
|
||||
"%DELPHIXEROOT%\bin\dcc32.exe" --no-config -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release" -E..\..\Files ISPP.dpr
|
||||
)
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
cd ..
|
||||
|
||||
echo - Compil32.dpr
|
||||
if "%DELPHIXEROOT%"=="" (
|
||||
"%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Compil32.dpr
|
||||
) else (
|
||||
"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi;vcl -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Compil32.dpr
|
||||
)
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo - ISCC.dpr
|
||||
if "%DELPHIXEROOT%"=="" (
|
||||
"%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCC.dpr
|
||||
) else (
|
||||
"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCC.dpr
|
||||
)
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo - ISCmplr.dpr
|
||||
if "%DELPHIXEROOT%"=="" (
|
||||
"%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCmplr.dpr
|
||||
) else (
|
||||
"%DELPHIXEROOT%\bin\dcc32.exe" --no-config -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS ISCmplr.dpr
|
||||
)
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo - SetupLdr.dpr
|
||||
if "%DELPHIXEROOT%"=="" (
|
||||
"%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components" -E..\Files SetupLdr.dpr
|
||||
) else (
|
||||
"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components" -E..\Files SetupLdr.dpr
|
||||
)
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo - Setup.dpr
|
||||
if "%DELPHIXEROOT%"=="" (
|
||||
"%DELPHI2009ROOT%\bin\dcc32.exe" --no-config --peflags:1 --string-checks:off -Q -B -H -W %1 -U"%DELPHI2009ROOT%\lib;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Setup.dpr
|
||||
) else (
|
||||
"%DELPHIXEROOT%\bin\dcc32.exe" --no-config --peflags:1 -NSsystem;system.win;winapi;vcl -Q -B -H -W %1 -U"%DELPHIXEROOT%\lib\win32\release;..\Components;..\Components\UniPs\Source" -E..\Files -DPS_MINIVCL;PS_NOGRAPHCONST;PS_PANSICHAR;PS_NOINTERFACEGUIDBRACKETS Setup.dpr
|
||||
)
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo - Renaming files
|
||||
cd ..\Files
|
||||
if errorlevel 1 goto failed
|
||||
move SetupLdr.exe SetupLdr.e32
|
||||
if errorlevel 1 goto failed
|
||||
move Setup.exe Setup.e32
|
||||
if errorlevel 1 goto failed
|
||||
|
||||
echo Success!
|
||||
cd ..
|
||||
goto exit
|
||||
|
||||
:failed
|
||||
echo *** FAILED ***
|
||||
cd ..
|
||||
:failed2
|
||||
exit /b 1
|
||||
|
||||
:exit
|
@ -1 +0,0 @@
|
||||
{"leaves":["compilesettingserror","compilesettingsfound","failed","failed2"],"root":"unitTest"}
|
@ -1,138 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Functions related to 3D quaternions and Euler angles.
|
||||
* @author Krishna Vedala
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef __arm__ // if compiling for ARM-Cortex processors
|
||||
#define LIBQUAT_ARM
|
||||
#include <arm_math.h>
|
||||
#else
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include "geometry_datatypes.h"
|
||||
|
||||
/**
|
||||
* @addtogroup quats 3D Quaternion operations
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function to convert given Euler angles to a quaternion.
|
||||
* \f{eqnarray*}{
|
||||
* q_{0} & =
|
||||
* &\cos\left(\frac{\phi}{2}\right)\cos\left(\frac{\theta}{2}\right)\cos\left(\frac{\psi}{2}\right)
|
||||
* +
|
||||
* \sin\left(\frac{\phi}{2}\right)\sin\left(\frac{\theta}{2}\right)\sin\left(\frac{\psi}{2}\right)\\
|
||||
* q_{1} & =
|
||||
* &\sin\left(\frac{\phi}{2}\right)\cos\left(\frac{\theta}{2}\right)\cos\left(\frac{\psi}{2}\right)
|
||||
* -
|
||||
* \cos\left(\frac{\phi}{2}\right)\sin\left(\frac{\theta}{2}\right)\sin\left(\frac{\psi}{2}\right)\\
|
||||
* q_{2} & =
|
||||
* &\cos\left(\frac{\phi}{2}\right)\sin\left(\frac{\theta}{2}\right)\cos\left(\frac{\psi}{2}\right)
|
||||
* +
|
||||
* \sin\left(\frac{\phi}{2}\right)\cos\left(\frac{\theta}{2}\right)\sin\left(\frac{\psi}{2}\right)\\
|
||||
* q_{3} & =
|
||||
* &\cos\left(\frac{\phi}{2}\right)\cos\left(\frac{\theta}{2}\right)\sin\left(\frac{\psi}{2}\right)
|
||||
* -
|
||||
* \sin\left(\frac{\phi}{2}\right)\sin\left(\frac{\theta}{2}\right)\cos\left(\frac{\psi}{2}\right)\\
|
||||
* \f}
|
||||
*
|
||||
* @param [in] in_euler input Euler angles instance
|
||||
* @returns converted quaternion
|
||||
*/
|
||||
quaternion quat_from_euler(const euler *in_euler)
|
||||
{
|
||||
quaternion out_quat;
|
||||
|
||||
if (!in_euler) // if null
|
||||
{
|
||||
fprintf(stderr, "%s: Invalid input.", __func__);
|
||||
return out_quat;
|
||||
}
|
||||
|
||||
quaternion temp;
|
||||
|
||||
float cy = cosf(in_euler->yaw * 0.5f);
|
||||
float sy = sinf(in_euler->yaw * 0.5f);
|
||||
float cp = cosf(in_euler->pitch * 0.5f);
|
||||
float sp = sinf(in_euler->pitch * 0.5f);
|
||||
float cr = cosf(in_euler->roll * 0.5f);
|
||||
float sr = sinf(in_euler->roll * 0.5f);
|
||||
|
||||
temp.w = cr * cp * cy + sr * sp * sy;
|
||||
temp.q1 = sr * cp * cy - cr * sp * sy;
|
||||
temp.q2 = cr * sp * cy + sr * cp * sy;
|
||||
temp.q3 = cr * cp * sy - sr * sp * cy;
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to convert given quaternion to Euler angles.
|
||||
* \f{eqnarray*}{
|
||||
* \phi & = &
|
||||
* \tan^{-1}\left[\frac{2\left(q_0q_1+q_2q_3\right)}{1-2\left(q_1^2+q_2^2\right)}\right]\\
|
||||
* \theta & =
|
||||
* &-\sin^{-1}\left[2\left(q_0q_2-q_3q_1\right)\right]\\
|
||||
* \psi & = &
|
||||
* \tan^{-1}\left[\frac{2\left(q_0q_3+q_1q_2\right)}{1-2\left(q_2^2+q_3^2\right)}\right]\\
|
||||
* \f}
|
||||
*
|
||||
* @param [in] in_quat input quaternion instance
|
||||
* @returns converted euler angles
|
||||
*/
|
||||
euler euler_from_quat(const quaternion *in_quat)
|
||||
{
|
||||
euler out_euler;
|
||||
if (!in_quat) // if null
|
||||
{
|
||||
fprintf(stderr, "%s: Invalid input.", __func__);
|
||||
return out_euler;
|
||||
}
|
||||
|
||||
out_euler.roll = atan2f(
|
||||
2.f * (in_quat->w * in_quat->q1 + in_quat->q2 * in_quat->q3),
|
||||
1.f - 2.f * (in_quat->q1 * in_quat->q1 + in_quat->q2 * in_quat->q2));
|
||||
out_euler.pitch =
|
||||
asinf(2.f * (in_quat->w * in_quat->q2 + in_quat->q1 * in_quat->q3));
|
||||
out_euler.yaw = atan2f(
|
||||
2.f * (in_quat->w * in_quat->q3 + in_quat->q1 * in_quat->q2),
|
||||
1.f - 2.f * (in_quat->q2 * in_quat->q2 + in_quat->q3 * in_quat->q3));
|
||||
|
||||
return out_euler;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
static void test()
|
||||
{
|
||||
quaternion quat = {0.7071f, 0.7071f, 0.f, 0.f};
|
||||
euler eul = euler_from_quat(&quat);
|
||||
printf("Euler: %.4g, %.4g, %.4g\n", eul.pitch, eul.roll, eul.yaw);
|
||||
|
||||
quaternion test_quat = quat_from_euler(&eul);
|
||||
printf("Quaternion: %.4g %+.4g %+.4g %+.4g\n", test_quat.w,
|
||||
test_quat.dual.x, test_quat.dual.y, test_quat.dual.z);
|
||||
|
||||
assert(fabsf(test_quat.w - quat.w) < .01);
|
||||
assert(fabsf(test_quat.q1 - quat.q1) < .01);
|
||||
assert(fabsf(test_quat.q2 - quat.q2) < .01);
|
||||
assert(fabsf(test_quat.q3 - quat.q3) < .01);
|
||||
}
|
||||
|
||||
/*
|
||||
void commented_func()
|
||||
{
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
int main()
|
||||
{
|
||||
test();
|
||||
return 0;
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"leaves":["quat_from_euler(const euler *in_euler)","euler_from_quat(const quaternion *in_quat)","test()","main()"],"root":"unitTest"}
|
@ -1,840 +0,0 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
/* -------------------- Namespaces -------------------- */
|
||||
|
||||
namespace test {
|
||||
typedef const int type;
|
||||
static constexpr type n = 0;
|
||||
|
||||
//Template functions
|
||||
template <typename LType, typename RType> constexpr LType coalesce(const LType &left, const RType &right);
|
||||
#if __cplusplus >= 201103L
|
||||
template <typename LType, typename RType, typename ...Args>
|
||||
constexpr LType coalesce(const LType &left, const RType &right, const Args &...args);
|
||||
#endif
|
||||
template <typename LType, typename RType> constexpr test::type compare(const LType &left, const RType &right);
|
||||
template <typename Type> constexpr Type divide(const Type &left, const Type &right);
|
||||
template <typename LType, typename RType> constexpr bool equals(const LType &left, const RType &right);
|
||||
template <typename Return, typename Type> constexpr Return cast(const Type &val);
|
||||
template <typename Type> constexpr Type minus(const Type &left, const Type &right);
|
||||
template <typename Type> constexpr Type modulus(const Type &left, const Type &right);
|
||||
template <typename Type> constexpr Type multiply(const Type &left, const Type &right);
|
||||
template <typename Type> constexpr Type negate(const Type &val);
|
||||
template <typename Type> constexpr bool isnot(const Type &val);
|
||||
template <typename Type> constexpr bool isnull(const Type &val);
|
||||
template <typename Type> constexpr Type plus(const Type &left, const Type &right);
|
||||
template <typename Type> void print(const Type &val);
|
||||
|
||||
//Classes
|
||||
class TestA2;
|
||||
class TestA12;
|
||||
template <class Type> struct TestB3;
|
||||
struct TestD3;
|
||||
class TestH3;
|
||||
}
|
||||
using test::coalesce;
|
||||
|
||||
/* -------------------- Template functions -------------------- */
|
||||
|
||||
template <typename LType, typename RType> constexpr LType test::coalesce(const LType &left, const RType &right){
|
||||
return (left)? left : right;
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
template <typename LType, typename RType, typename ...Args> constexpr LType test::coalesce(const LType &left, const RType &right, const Args &...args){
|
||||
return (left)? left : coalesce<LType>(right,args...);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename LType, typename RType> constexpr test::type test::compare(const LType &left, const RType &right){
|
||||
return (left<right)? -1 : (right<left)? 1 : 0;
|
||||
}
|
||||
|
||||
template <typename Type> constexpr Type test::divide(const Type &left, const Type &right){ return left/right; }
|
||||
|
||||
template <typename LType, typename RType> constexpr bool test::equals(const LType &left, const RType &right){ return (left==right); }
|
||||
|
||||
template <typename Return, typename Type> constexpr Return test::cast(const Type &val){ return (Return)val; }
|
||||
|
||||
template <typename Type> constexpr Type test::minus(const Type &left, const Type &right){ return left-right; }
|
||||
|
||||
template <typename Type> constexpr Type test::modulus(const Type &left, const Type &right){ return left%right; }
|
||||
|
||||
template <typename Type> constexpr Type test::multiply(const Type &left, const Type &right){ return left*right; }
|
||||
|
||||
template <typename Type> constexpr Type test::negate(const Type &val){ return -val; }
|
||||
|
||||
template <typename Type> constexpr bool test::isnot(const Type &val){ return !val; }
|
||||
|
||||
template <typename Type> constexpr bool test::isnull(const Type &val){ return (val==NULL); }
|
||||
|
||||
template <typename Type> constexpr Type test::plus(const Type &left, const Type &right){ return left+right; }
|
||||
|
||||
template <typename Type> void test::print(const Type &val){ std::cout << val << std::endl; }
|
||||
|
||||
template <typename Type = test::type, Type N = 42> constexpr Type test42() noexcept { return coalesce(N,42); }
|
||||
|
||||
/* -------------------- Classes -------------------- */
|
||||
|
||||
struct TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class test::TestA2 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct TestA3 : TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class TestA4 : private TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct TestA5 : protected TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class TestA6 : public TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct TestA7 final : virtual TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class TestA8 : public virtual TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct TestA9 final : virtual public TestA1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class TestA10 : TestA1, test::TestA2, TestA3 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct TestA11 : private TestA1, protected test::TestA2, public TestA3 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class test::TestA12 : TestA1, protected test::TestA2, public virtual TestA3 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct TestA13 final : public virtual TestA1, protected test::TestA2, TestA3 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
/* -------------------- Template classes -------------------- */
|
||||
|
||||
template <typename Type> struct TestB1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <typename Type> class TestB2 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <class Type> struct test::TestB3 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <class Type> class TestB4 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <typename Type = int> struct TestB5 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <int N = coalesce(test::n,42)> struct TestB6 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <class Type = std::pair<int,double> > struct TestB7 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <class Type1, typename Type2, int N> class TestB8 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <typename Type1 = int, class Type2 = double, int N = 42> struct TestB9 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <template <typename> typename Type> class TestB10 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <template <typename,typename> class Type> struct TestB11 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <template <class,class> typename Type = std::pair> class TestB12 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <template <typename> class Type1, template <class,class> typename Type2 = std::pair> struct TestB13 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
/* -------------------- Template class specialization -------------------- */
|
||||
|
||||
template <typename Type> struct TestC1 {
|
||||
int test1(){ return 42; }
|
||||
};
|
||||
|
||||
template <> struct TestC1<int> {
|
||||
int test2(){ return 42; }
|
||||
};
|
||||
|
||||
template <> struct TestC1< std::pair<int,double> > {
|
||||
int test3(){ return 42; }
|
||||
};
|
||||
|
||||
template <class Type1, typename Type2, int N> class TestC2 {
|
||||
int test1(){ return 42; }
|
||||
};
|
||||
|
||||
template <> class TestC2<int,double,42> {
|
||||
int test2(){ return 42; }
|
||||
};
|
||||
|
||||
template <typename Type> class TestC2<Type,double,42> {
|
||||
int test3(){ return 42; }
|
||||
};
|
||||
|
||||
template <typename Type1, class Type2> class TestC2<Type1,Type2,42> {
|
||||
int test4(){ return 42; }
|
||||
};
|
||||
|
||||
template <template <typename,typename> class Type, int N = 42> struct TestC3 {
|
||||
int test1(){ return 42; }
|
||||
};
|
||||
|
||||
template <> struct TestC3<std::pair,coalesce(test::n,42)> {
|
||||
int test2(){ return 42; }
|
||||
};
|
||||
|
||||
/* -------------------- Template class inheritance -------------------- */
|
||||
|
||||
template <typename Type> struct TestD1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <typename Type> class TestD2 : public TestD1<Type> {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct test::TestD3 : public TestD1<int>, private TestD2< std::pair<int,double> > {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
template <template <typename> class Type, int N = 42> class TestD4 final : public virtual TestD1<int>, private TestD2< Type<int> > {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
/* -------------------- Class method inline definitions -------------------- */
|
||||
|
||||
struct TestE1 {
|
||||
int n;
|
||||
|
||||
//Constructors
|
||||
constexpr TestE1() noexcept : n(0) {}
|
||||
|
||||
constexpr TestE1(int n) noexcept : n(n) {}
|
||||
|
||||
explicit constexpr TestE1(double n) noexcept : n((int)n) {}
|
||||
|
||||
explicit constexpr TestE1(int a, int b) noexcept : n(a+b) {}
|
||||
|
||||
//Conversion operators
|
||||
explicit constexpr operator bool() const noexcept { return !!n; }
|
||||
|
||||
explicit constexpr operator double() const noexcept { return n; }
|
||||
|
||||
explicit constexpr operator unsigned int() const noexcept { return (n<0)? -n : n; }
|
||||
|
||||
//Assignment operators
|
||||
friend void swap(TestE1 &left, TestE1 &right) noexcept {
|
||||
using std::swap;
|
||||
swap(left.n,right.n);
|
||||
}
|
||||
|
||||
TestE1& operator=(TestE1 test) noexcept {
|
||||
swap(*this,test);
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator+=(TestE1 test) noexcept {
|
||||
n += test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator-=(TestE1 test) noexcept {
|
||||
n -= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator*=(TestE1 test) noexcept {
|
||||
n *= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator/=(TestE1 test) noexcept {
|
||||
n /= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator%=(TestE1 test) noexcept {
|
||||
n %= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator^=(TestE1 test) noexcept {
|
||||
n ^= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator&=(TestE1 test) noexcept {
|
||||
n &= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator|=(TestE1 test) noexcept {
|
||||
n |= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator<<=(TestE1 test) noexcept {
|
||||
n <<= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1& operator>>=(TestE1 test) noexcept {
|
||||
n >>= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//Increment & decrement operators
|
||||
TestE1& operator++() noexcept {
|
||||
n++;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1 operator++(int) noexcept {
|
||||
TestE1 temp = *this;
|
||||
n++;
|
||||
return temp;
|
||||
}
|
||||
|
||||
TestE1& operator--() noexcept {
|
||||
n--;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestE1 operator--(int) noexcept {
|
||||
TestE1 temp = *this;
|
||||
n--;
|
||||
return temp;
|
||||
}
|
||||
|
||||
//Arithmetic operators
|
||||
friend constexpr TestE1 operator+(const TestE1 &test) noexcept { return +(test.n); }
|
||||
|
||||
friend constexpr TestE1 operator-(const TestE1 &test) noexcept { return -(test.n); }
|
||||
|
||||
friend constexpr TestE1 operator!(const TestE1 &test) noexcept { return !(test.n); }
|
||||
|
||||
friend constexpr TestE1 operator~(const TestE1 &test) noexcept { return ~(test.n); }
|
||||
|
||||
friend constexpr TestE1 operator+(const TestE1 &left, const TestE1 &right) noexcept { return (left.n + right.n); }
|
||||
|
||||
friend constexpr TestE1 operator-(const TestE1 &left, const TestE1 &right) noexcept { return (left.n - right.n); }
|
||||
|
||||
friend constexpr TestE1 operator*(const TestE1 &left, const TestE1 &right) noexcept { return (left.n * right.n); }
|
||||
|
||||
friend constexpr TestE1 operator/(const TestE1 &left, const TestE1 &right) noexcept { return (left.n / right.n); }
|
||||
|
||||
friend constexpr TestE1 operator%(const TestE1 &left, const TestE1 &right) noexcept { return (left.n % right.n); }
|
||||
|
||||
friend constexpr TestE1 operator^(const TestE1 &left, const TestE1 &right) noexcept { return (left.n ^ right.n); }
|
||||
|
||||
friend constexpr TestE1 operator&(const TestE1 &left, const TestE1 &right) noexcept { return (left.n & right.n); }
|
||||
|
||||
friend constexpr TestE1 operator|(const TestE1 &left, const TestE1 &right) noexcept { return (left.n | right.n); }
|
||||
|
||||
friend constexpr TestE1 operator<<(const TestE1 &left, const TestE1 &right) noexcept { return (left.n << right.n); }
|
||||
|
||||
friend constexpr TestE1 operator>>(const TestE1 &left, const TestE1 &right) noexcept { return (left.n >> right.n); }
|
||||
|
||||
friend constexpr TestE1 operator&&(const TestE1 &left, const TestE1 &right) noexcept { return (left.n && right.n); }
|
||||
|
||||
friend constexpr TestE1 operator||(const TestE1 &left, const TestE1 &right) noexcept { return (left.n || right.n); }
|
||||
|
||||
//Comparison operators
|
||||
#if __cplusplus >= 202003L
|
||||
friend constexpr bool operator<=>(const TestE1 &left, const TestE1 &right) noexcept {
|
||||
return (left.n<right.n)? -1 : (right.n<left.n)? 1 : 0);
|
||||
}
|
||||
#else
|
||||
friend constexpr bool operator==(const TestE1 &left, const TestE1 &right) noexcept { return (left.n == right.n); }
|
||||
|
||||
friend constexpr bool operator!=(const TestE1 &left, const TestE1 &right) noexcept { return (left.n != right.n); }
|
||||
|
||||
friend constexpr bool operator<(const TestE1 &left, const TestE1 &right) noexcept { return (left.n < right.n); }
|
||||
|
||||
friend constexpr bool operator<=(const TestE1 &left, const TestE1 &right) noexcept { return (left.n <= right.n); }
|
||||
|
||||
friend constexpr bool operator>(const TestE1 &left, const TestE1 &right) noexcept { return (left.n > right.n); }
|
||||
|
||||
friend constexpr bool operator>=(const TestE1 &left, const TestE1 &right) noexcept { return (left.n >= right.n); }
|
||||
#endif
|
||||
|
||||
//Access operators
|
||||
friend std::ostream& operator<<(std::ostream &out, const TestE1 &test){ return out << test.n; }
|
||||
|
||||
friend std::istream& operator>>(std::istream &in, TestE1 &test){ return in >> test.n; }
|
||||
|
||||
int& operator[](int) noexcept { return n; }
|
||||
|
||||
const int& operator[](int) const noexcept { return n; }
|
||||
|
||||
constexpr int operator()() const noexcept { return n; }
|
||||
|
||||
int& operator*() noexcept { return n; }
|
||||
|
||||
int* operator->() noexcept { return &n; }
|
||||
|
||||
//Methods
|
||||
inline constexpr const volatile long int test1() const volatile noexcept { return 42; }
|
||||
|
||||
static inline constexpr const volatile long int test2() noexcept { return 42; }
|
||||
|
||||
virtual int test3() const volatile noexcept { return coalesce(n,42); }
|
||||
|
||||
virtual int test4() const volatile noexcept final { return coalesce(n,42); }
|
||||
};
|
||||
|
||||
class TestE2 : public TestE1 {
|
||||
virtual int test3() const volatile noexcept override final { return coalesce(n,42); }
|
||||
};
|
||||
|
||||
/* -------------------- Class method outside definitions -------------------- */
|
||||
|
||||
struct TestF1 {
|
||||
int n;
|
||||
|
||||
//Constructors
|
||||
constexpr TestF1() noexcept;
|
||||
|
||||
constexpr TestF1(int n) noexcept;
|
||||
|
||||
explicit constexpr TestF1(double n) noexcept;
|
||||
|
||||
explicit constexpr TestF1(int a, int b) noexcept;
|
||||
|
||||
//Conversion operators
|
||||
explicit constexpr operator bool() const noexcept;
|
||||
|
||||
explicit constexpr operator double() const noexcept;
|
||||
|
||||
explicit constexpr operator unsigned int() const noexcept;
|
||||
|
||||
//Assignment operators
|
||||
friend void swap(TestF1 &left, TestF1 &right) noexcept;
|
||||
|
||||
TestF1& operator=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator+=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator-=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator*=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator/=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator%=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator^=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator&=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator|=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator<<=(TestF1 test) noexcept;
|
||||
|
||||
TestF1& operator>>=(TestF1 test) noexcept;
|
||||
|
||||
//Increment & decrement operators
|
||||
TestF1& operator++() noexcept;
|
||||
|
||||
TestF1 operator++(int) noexcept;
|
||||
|
||||
TestF1& operator--() noexcept;
|
||||
|
||||
TestF1 operator--(int) noexcept;
|
||||
|
||||
//Arithmetic operators
|
||||
friend constexpr TestF1 operator+(const TestF1 &test) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator-(const TestF1 &test) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator!(const TestF1 &test) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator~(const TestF1 &test) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator+(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator-(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator*(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator/(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator%(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator^(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator&(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator|(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator<<(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator>>(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator&&(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr TestF1 operator||(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
//Comparison operators
|
||||
#if __cplusplus >= 202003L
|
||||
friend constexpr bool operator<=>(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
#else
|
||||
friend constexpr bool operator==(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr bool operator!=(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr bool operator<(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr bool operator<=(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr bool operator>(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
|
||||
friend constexpr bool operator>=(const TestF1 &left, const TestF1 &right) noexcept;
|
||||
#endif
|
||||
|
||||
//Access operators
|
||||
friend std::ostream& operator<<(std::ostream &out, const TestF1 &test);
|
||||
|
||||
friend std::istream& operator>>(std::istream &in, TestF1 &test);
|
||||
|
||||
int& operator[](int) noexcept;
|
||||
|
||||
const int& operator[](int) const noexcept;
|
||||
|
||||
constexpr int operator()() const noexcept;
|
||||
|
||||
int& operator*() noexcept;
|
||||
|
||||
int* operator->() noexcept;
|
||||
|
||||
//Methods
|
||||
inline constexpr const volatile long int test1() const volatile noexcept;
|
||||
|
||||
static inline constexpr const volatile long int test2() noexcept;
|
||||
|
||||
virtual int test3() const volatile noexcept;
|
||||
|
||||
virtual int test4() const volatile noexcept final;
|
||||
};
|
||||
|
||||
//Constructors
|
||||
constexpr TestF1::TestF1() noexcept : n(0) {}
|
||||
|
||||
constexpr TestF1::TestF1(int n) noexcept : n(n) {}
|
||||
|
||||
constexpr TestF1::TestF1(double n) noexcept : n((int)n) {}
|
||||
|
||||
constexpr TestF1::TestF1(int a, int b) noexcept : n(a+b) {}
|
||||
|
||||
//Conversion operators
|
||||
constexpr TestF1::operator bool() const noexcept { return !!n; }
|
||||
|
||||
constexpr TestF1::operator double() const noexcept { return n; }
|
||||
|
||||
constexpr TestF1::operator unsigned int() const noexcept { return (n<0)? -n : n; }
|
||||
|
||||
//Assignment operators
|
||||
void swap(TestF1 &left, TestF1 &right) noexcept {
|
||||
using std::swap;
|
||||
swap(left.n,right.n);
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator=(TestF1 test) noexcept {
|
||||
swap(*this,test);
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator+=(TestF1 test) noexcept {
|
||||
n += test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator-=(TestF1 test) noexcept {
|
||||
n -= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator*=(TestF1 test) noexcept {
|
||||
n *= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator/=(TestF1 test) noexcept {
|
||||
n /= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator%=(TestF1 test) noexcept {
|
||||
n %= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator^=(TestF1 test) noexcept {
|
||||
n ^= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator&=(TestF1 test) noexcept {
|
||||
n &= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator|=(TestF1 test) noexcept {
|
||||
n |= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator<<=(TestF1 test) noexcept {
|
||||
n <<= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator>>=(TestF1 test) noexcept {
|
||||
n >>= test.n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//Increment & decrement operators
|
||||
TestF1& TestF1::operator++() noexcept {
|
||||
n++;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1 TestF1::operator++(int) noexcept {
|
||||
TestF1 temp = *this;
|
||||
n++;
|
||||
return temp;
|
||||
}
|
||||
|
||||
TestF1& TestF1::operator--() noexcept {
|
||||
n--;
|
||||
return *this;
|
||||
}
|
||||
|
||||
TestF1 TestF1::operator--(int) noexcept {
|
||||
TestF1 temp = *this;
|
||||
n--;
|
||||
return temp;
|
||||
}
|
||||
|
||||
//Arithmetic operators
|
||||
constexpr TestF1 operator+(const TestF1 &test) noexcept { return +(test.n); }
|
||||
|
||||
constexpr TestF1 operator-(const TestF1 &test) noexcept { return -(test.n); }
|
||||
|
||||
constexpr TestF1 operator!(const TestF1 &test) noexcept { return !(test.n); }
|
||||
|
||||
constexpr TestF1 operator~(const TestF1 &test) noexcept { return ~(test.n); }
|
||||
|
||||
constexpr TestF1 operator+(const TestF1 &left, const TestF1 &right) noexcept { return (left.n + right.n); }
|
||||
|
||||
constexpr TestF1 operator-(const TestF1 &left, const TestF1 &right) noexcept { return (left.n - right.n); }
|
||||
|
||||
constexpr TestF1 operator*(const TestF1 &left, const TestF1 &right) noexcept { return (left.n * right.n); }
|
||||
|
||||
constexpr TestF1 operator/(const TestF1 &left, const TestF1 &right) noexcept { return (left.n / right.n); }
|
||||
|
||||
constexpr TestF1 operator%(const TestF1 &left, const TestF1 &right) noexcept { return (left.n % right.n); }
|
||||
|
||||
constexpr TestF1 operator^(const TestF1 &left, const TestF1 &right) noexcept { return (left.n ^ right.n); }
|
||||
|
||||
constexpr TestF1 operator&(const TestF1 &left, const TestF1 &right) noexcept { return (left.n & right.n); }
|
||||
|
||||
constexpr TestF1 operator|(const TestF1 &left, const TestF1 &right) noexcept { return (left.n | right.n); }
|
||||
|
||||
constexpr TestF1 operator<<(const TestF1 &left, const TestF1 &right) noexcept { return (left.n << right.n); }
|
||||
|
||||
constexpr TestF1 operator>>(const TestF1 &left, const TestF1 &right) noexcept { return (left.n >> right.n); }
|
||||
|
||||
constexpr TestF1 operator&&(const TestF1 &left, const TestF1 &right) noexcept { return (left.n && right.n); }
|
||||
|
||||
constexpr TestF1 operator||(const TestF1 &left, const TestF1 &right) noexcept { return (left.n || right.n); }
|
||||
|
||||
//Comparison operators
|
||||
#if __cplusplus >= 202003L
|
||||
constexpr bool operator<=>(const TestF1 &left, const TestF1 &right) noexcept {
|
||||
return (left.n<right.n)? -1 : (right.n<left.n)? 1 : 0);
|
||||
}
|
||||
#else
|
||||
constexpr bool operator==(const TestF1 &left, const TestF1 &right) noexcept { return (left.n == right.n); }
|
||||
|
||||
constexpr bool operator!=(const TestF1 &left, const TestF1 &right) noexcept { return (left.n != right.n); }
|
||||
|
||||
constexpr bool operator<(const TestF1 &left, const TestF1 &right) noexcept { return (left.n < right.n); }
|
||||
|
||||
constexpr bool operator<=(const TestF1 &left, const TestF1 &right) noexcept { return (left.n <= right.n); }
|
||||
|
||||
constexpr bool operator>(const TestF1 &left, const TestF1 &right) noexcept { return (left.n > right.n); }
|
||||
|
||||
constexpr bool operator>=(const TestF1 &left, const TestF1 &right) noexcept { return (left.n >= right.n); }
|
||||
#endif
|
||||
|
||||
//Access operators
|
||||
std::ostream& operator<<(std::ostream &out, const TestF1 &test){ return out << test.n; }
|
||||
|
||||
std::istream& operator>>(std::istream &in, TestF1 &test){ return in >> test.n; }
|
||||
|
||||
int& TestF1::operator[](int) noexcept { return n; }
|
||||
|
||||
const int& TestF1::operator[](int) const noexcept { return n; }
|
||||
|
||||
constexpr int TestF1::operator()() const noexcept { return n; }
|
||||
|
||||
int& TestF1::operator*() noexcept { return n; }
|
||||
|
||||
int* TestF1::operator->() noexcept { return &n; }
|
||||
|
||||
//Methods
|
||||
inline constexpr const volatile long int TestF1::test1() const volatile noexcept { return 42; }
|
||||
|
||||
inline constexpr const volatile long int TestF1::test2() noexcept { return 42; }
|
||||
|
||||
int TestF1::test3() const volatile noexcept { return coalesce(n,42); }
|
||||
|
||||
int TestF1::test4() const volatile noexcept { return coalesce(n,42); }
|
||||
|
||||
/* -------------------- Template class method outside definitions -------------------- */
|
||||
|
||||
template <typename Type> class TestG1 {
|
||||
Type n;
|
||||
|
||||
//Constructors
|
||||
constexpr TestG1() noexcept;
|
||||
|
||||
constexpr TestG1(Type n) noexcept;
|
||||
|
||||
explicit constexpr TestG1(Type a, Type b) noexcept;
|
||||
|
||||
//Conversion operators
|
||||
explicit constexpr operator bool() const noexcept;
|
||||
|
||||
explicit constexpr operator unsigned int() const noexcept;
|
||||
|
||||
explicit constexpr operator Type() const noexcept;
|
||||
|
||||
//Assignment operators
|
||||
friend void swap<Type>(TestG1 &left, TestG1 &right) noexcept;
|
||||
|
||||
TestG1& operator=(TestG1 test) noexcept;
|
||||
|
||||
//Methods
|
||||
inline constexpr const volatile Type test1() const volatile noexcept;
|
||||
|
||||
static inline constexpr const volatile Type test2() noexcept;
|
||||
|
||||
virtual Type test3() const volatile noexcept;
|
||||
|
||||
virtual Type test4() const volatile noexcept final;
|
||||
};
|
||||
|
||||
//Constructors
|
||||
template <typename Type> constexpr TestG1<Type>::TestG1() noexcept : n(0) {}
|
||||
|
||||
template <typename Type> constexpr TestG1<Type>::TestG1(Type n) noexcept : n(n) {}
|
||||
|
||||
template <typename Type> constexpr TestG1<Type>::TestG1(Type a, Type b) noexcept : n(a+b) {}
|
||||
|
||||
//Conversion operators
|
||||
template <typename Type> constexpr TestG1<Type>::operator bool() const noexcept { return !!n; }
|
||||
|
||||
template <typename Type> constexpr TestG1<Type>::operator unsigned int() const noexcept { return (n<0)? -n : n; }
|
||||
|
||||
template <typename Type> constexpr TestG1<Type>::operator Type() const noexcept { return n; }
|
||||
|
||||
//Assignment operators
|
||||
template <typename Type> void swap(TestG1<Type> &left, TestG1<Type> &right) noexcept {
|
||||
using std::swap;
|
||||
swap(left.n,right.n);
|
||||
}
|
||||
|
||||
template <typename Type> TestG1<Type>& TestG1<Type>::operator=(TestG1<Type> test) noexcept {
|
||||
swap(*this,test);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//Methods
|
||||
template <typename Type> inline constexpr const volatile Type TestG1<Type>::test1() const volatile noexcept { return 42; }
|
||||
|
||||
template <typename Type> inline constexpr const volatile Type TestG1<Type>::test2() noexcept { return 42; }
|
||||
|
||||
template <typename Type> Type TestG1<Type>::test3() const volatile noexcept { return coalesce(n,42); }
|
||||
|
||||
template <typename Type> Type TestG1<Type>::test4() const volatile noexcept { return coalesce(n,42); }
|
||||
|
||||
/* -------------------- Type attributes -------------------- */
|
||||
|
||||
#define DEPRECATED __attribute__((deprecated))
|
||||
class DEPRECATED TestH1 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
struct [[deprecated]] TestH2 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class [[gnu::warn_unused]] test::TestH3 : TestH2 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
struct [[deprecated("[DEPRECATED]")]] [[gnu::warn_unused]] TestH4 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
|
||||
class [[deprecated("[DEPRECATED]"), gnu::warn_unused]] TestH5 : TestH4 {
|
||||
int test(){ return 42; }
|
||||
};
|
||||
#endif
|
||||
|
||||
/* -------------------- Functors as parameter -------------------- */
|
||||
|
||||
static inline constexpr const unsigned int test_with_functor(void (*functor)(unsigned int&, double)) noexcept {
|
||||
unsigned int n = 42;
|
||||
functor(n,3.14);
|
||||
return n;
|
||||
}
|
||||
|
||||
/* -------------------- Main -------------------- */
|
||||
|
||||
int main(){
|
||||
cout << "Hello World !" << endl;
|
||||
cout << test42() << endl;
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"leaves":["test42","swap","operator+","operator-","operator!","operator~","operator+","operator-","operator*","operator%","operator^","operator&","operator|","operator<<","operator>>","operator&&","operator||","operator<=>","operator==","operator!=","operator<","operator<=","operator>","operator>=","operator<<","operator>>","swap","test_with_functor","main"],"nodes":[{"leaves":["test"],"name":"TestA1"},{"leaves":["test"],"name":"test::TestA2"},{"leaves":["test"],"name":"TestA3"},{"leaves":["test"],"name":"TestA4"},{"leaves":["test"],"name":"TestA5"},{"leaves":["test"],"name":"TestA6"},{"leaves":["test"],"name":"TestA7"},{"leaves":["test"],"name":"TestA8"},{"leaves":["test"],"name":"TestA9"},{"leaves":["test"],"name":"TestA10"},{"leaves":["test"],"name":"TestA11"},{"leaves":["test"],"name":"test::TestA12"},{"leaves":["test"],"name":"TestA13"},{"leaves":["test"],"name":"TestB1"},{"leaves":["test"],"name":"TestB2"},{"leaves":["test"],"name":"test::TestB3"},{"leaves":["test"],"name":"TestB4"},{"leaves":["test"],"name":"TestB5"},{"leaves":["test"],"name":"TestB6"},{"leaves":["test"],"name":"TestB7"},{"leaves":["test"],"name":"TestB8"},{"leaves":["test"],"name":"TestB9"},{"leaves":["test"],"name":"TestB10"},{"leaves":["test"],"name":"TestB11"},{"leaves":["test"],"name":"TestB12"},{"leaves":["test"],"name":"TestB13"},{"leaves":["test1","test2","test3"],"name":"TestC1"},{"leaves":["test1","test2","test3","test4"],"name":"TestC2"},{"leaves":["test1","test2"],"name":"TestC3"},{"leaves":["test"],"name":"TestD1"},{"leaves":["test"],"name":"TestD2"},{"leaves":["test"],"name":"test::TestD3"},{"leaves":["test"],"name":"TestD4"},{"leaves":["operator bool","operator double","operator unsigned int","swap","operator=","operator+=","operator-=","operator*=","operator%=","operator^=","operator&=","operator|=","operator<<=","operator>>=","operator++","operator++","operator--","operator--","operator+","operator-","operator!","operator~","operator+","operator-","operator*","operator%","operator^","operator&","operator|","operator<<","operator>>","operator&&","operator||","operator<=>","operator==","operator!=","operator<","operator<=","operator>","operator>=","operator<<","operator>>","operator[]","operator[]","operator()","operator*","operator->","test1","test2","test3","test4"],"name":"TestE1"},{"leaves":["test3"],"name":"TestE2"},{"leaves":["test"],"name":"TestH1"},{"leaves":["test"],"name":"TestH2"},{"leaves":["test"],"name":"test::TestH3"},{"leaves":["test"],"name":"TestH4"},{"leaves":["test"],"name":"TestH5"},{"leaves":["coalesce","coalesce","compare","divide","equals","cast","minus","modulus","multiply","negate","isnot","isnull","plus","print"],"name":"test"},{"leaves":["operator bool","operator double","operator unsigned int","operator=","operator+=","operator-=","operator*=","operator%=","operator^=","operator&=","operator|=","operator<<=","operator>>=","operator++","operator++","operator--","operator--","operator[]","operator[]","operator()","operator*","operator->","test1","test2","test3","test4"],"name":"TestF1"},{"leaves":["operator bool","operator unsigned int","operator Type","operator=","test1","test2","test3","test4"],"name":"TestG1"}],"root":"unitTest"}
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
{"leaves":["strVal","decStrVal","hexStrVal","getKwClassFromName","getAsciiLenFromBase64Len","base64ToAscii","cutString","RGB2int","convertIntToFormatType"],"nodes":[{"leaves":["getLangFromXmlFileName","getXmlFilePathFromLangName","addLanguageFromXml","switchToLang"],"name":"LocalizationSwitcher"},{"leaves":["getThemeFromXmlFileName"],"name":"ThemeSwitcher"},{"leaves":["getWindowsVersion","reloadStylers","reloadLang","getSpecialFolderLocation","getSettingsFolder","load","destroyInstance","saveConfig_xml","setWorkSpaceFilePath","removeTransparent","SetTransparent","isExistingExternalLangName","getUserDefinedLangNameFromExt","getExternalLangIndexFromName","getULCFromName","getCurLineHilitingColour","setCurLineHilitingColour","setFontList","isInFontList","getLangKeywordsFromXmlTree","getExternalLexerFromXmlTree","addExternalLangToEnd","getUserStylersFromXmlTree","getUserParametersFromXmlTree","getUserDefineLangsFromXmlTree","getShortcutsFromXmlTree","getMacrosFromXmlTree","getUserCmdsFromXmlTree","getPluginCmdsFromXmlTree","getScintKeysFromXmlTree","getBlackListFromXmlTree","initMenuKeys","initScintillaKeys","reloadContextMenuFromXmlTree","getCmdIdFromMenuEntryItemName","getPluginCmdIdFromMenuEntryItemName","getContextMenuFromXmlTree","setWorkingDir","loadSession","getSessionFromXmlTree","feedFileListParameters","feedProjectPanelsParameters","feedFileBrowserParameters","feedFindHistoryParameters","feedShortcut","feedMacros","getActions","feedUserCmds","feedPluginCustomizedCmds","feedScintKeys","feedBlacklist","getShortcuts","feedUserLang","importUDLFromFile","exportUDLToFile","getLangFromExt","setCloudChoice","removeCloudChoice","isCloudPathChanged","writeSettingsFilesOnCloudForThe1stTime","writeUserDefinedLang","insertCmd","insertMacro","insertUserCmd","insertPluginCmd","insertScintKey","writeSession","writeShortcuts","addUserLangToEnd","removeUserLang","feedUserSettings","feedUserKeywordList","feedUserStyles","feedStylerArray","writeRecentFileHistorySettings","writeProjectPanelsSettings","writeFileBrowserSettings","writeHistory","getChildElementByAttribut","getLangIDFromStr","getLocPathFromStr","feedKeyWordsParameters","feedGUIParameters","feedScintillaParam","feedDockingManager","writeScintillaParams","createXmlTreeFromGUIParams","writeFindHistory","insertDockingParamNode","writePrintSetting","writeExcludedLangList","insertGUIConfigBoolNode","langTypeToCommandID","getWinVersionStr","getWinVerBitStr","writeStyles","insertTabInfo","writeStyle2Element","insertUserLang2Tree","stylerStrOp","addUserModifiedIndex","addPluginModifiedIndex","addScintillaModifiedIndex","safeWow64EnableWow64FsRedirection"],"name":"NppParameters"},{"leaves":["addLexerStyler","eraseAll"],"name":"LexerStylerArray"},{"leaves":["addStyler"],"name":"StyleArray"},{"leaves":["now"],"name":"Date"}],"root":"unitTest"}
|
@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Owin;
|
||||
using Microsoft.Owin.Security;
|
||||
using Microsoft.Owin.Security.Cookies;
|
||||
using Microsoft.Owin.Security.OpenIdConnect;
|
||||
|
||||
namespace $OwinNamespace$
|
||||
{
|
||||
public partial class $OwinClass$
|
||||
{
|
||||
private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"];
|
||||
private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"];
|
||||
private static string tenantId = ConfigurationManager.AppSettings["ida:TenantId"];
|
||||
private static string postLogoutRedirectUri = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"];
|
||||
private static string authority = aadInstance + tenantId;
|
||||
|
||||
public void ConfigureAuth(IAppBuilder app)
|
||||
{
|
||||
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
|
||||
|
||||
app.UseCookieAuthentication(new CookieAuthenticationOptions());
|
||||
|
||||
app.UseOpenIdConnectAuthentication(
|
||||
new OpenIdConnectAuthenticationOptions
|
||||
{
|
||||
ClientId = clientId,
|
||||
Authority = authority,
|
||||
PostLogoutRedirectUri = postLogoutRedirectUri
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"leaves":["ConfigureAuth"],"root":"unitTest"}
|
@ -1 +0,0 @@
|
||||
{"leaves":["setTime","getTime","printTime","PredictTime","PrintTimeSecondsHoursDays"],"root":"unitTest"}
|
@ -1,152 +0,0 @@
|
||||
! Fortran Time Module
|
||||
!
|
||||
! To Use:
|
||||
! 1) declare a ClockTime variable: type (ClockTime) :: Timer
|
||||
! 2) Set a beginning Time: call set(Timer)
|
||||
! 3a) Print Elapsed Time: printTime(Timer)
|
||||
! 3b) Print Remaining Time: printRemainingTime(Timer,ratio)
|
||||
! 3c) Predict Completion Time: predict(Timer,ratio)
|
||||
!
|
||||
! Copyright (c) 2008 Charles O'Neill
|
||||
!
|
||||
! Permission is hereby granted, free of charge, to any person
|
||||
! obtaining a copy of this software and associated documentation
|
||||
! files (the "Software"), to deal in the Software without
|
||||
! restriction, including without limitation the rights to use,
|
||||
! copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
! copies of the Software, and to permit persons to whom the
|
||||
! Software is furnished to do so, subject to the following
|
||||
! conditions:
|
||||
!
|
||||
! The above copyright notice and this permission notice shall be
|
||||
! included in all copies or substantial portions of the Software.
|
||||
!
|
||||
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
! EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
! OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
! NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
! HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
! WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
! FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
! OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
module ClockTiming
|
||||
implicit none
|
||||
|
||||
! Integer Precision
|
||||
integer, parameter :: IS = 2
|
||||
! Real Single Precision
|
||||
integer, parameter :: SP = 4 ! 4 gives 32 bits
|
||||
! Real Double Precision
|
||||
integer, parameter :: DP = 8 ! 4 gives 32 bits, 8 gives 64 bits (double)
|
||||
|
||||
type ClockTime
|
||||
private
|
||||
real(SP) :: time_begin
|
||||
end type
|
||||
|
||||
! Time Constants
|
||||
real(SP),parameter :: SecondsPerMinutes = 60.0
|
||||
real(SP),parameter :: MinutesPerHour = 60.0
|
||||
real(SP),parameter :: HoursPerDay = 24.0
|
||||
|
||||
real(SP),parameter :: PrintMaxSeconds = 90.0d0
|
||||
real(SP),parameter :: PrintMaxMinutes = SecondsPerMinutes*MinutesPerHour
|
||||
real(SP),parameter :: PrintMaxHours = SecondsPerMinutes*MinutesPerHour*HoursPerDay
|
||||
|
||||
!.................................
|
||||
! Public Interfaces to ClockTime Data
|
||||
|
||||
! Resets timer to zero
|
||||
interface set
|
||||
module procedure setTime
|
||||
end interface
|
||||
|
||||
! Returns elapsed time
|
||||
interface get
|
||||
module procedure getTime
|
||||
end interface
|
||||
|
||||
! Prints total elapsed time
|
||||
interface printTime
|
||||
module procedure printTime
|
||||
end interface
|
||||
|
||||
! Prints total remaining time
|
||||
interface printRemainingTime
|
||||
module procedure PrintTimeSecondsHoursDays
|
||||
end interface
|
||||
|
||||
! Predicts total elapsed time
|
||||
interface predict
|
||||
module procedure PredictTime
|
||||
end interface
|
||||
|
||||
private :: setTime, getTime, PredictTime, PrintTimeSecondsHoursDays
|
||||
|
||||
contains
|
||||
|
||||
! Resets timer to zero
|
||||
subroutine setTime(this)
|
||||
implicit none
|
||||
type (ClockTime) :: this
|
||||
! CPU_TIME is the system's clock time function
|
||||
CALL CPU_TIME ( this%time_begin )
|
||||
end subroutine setTime
|
||||
|
||||
! Returns elapsed time
|
||||
function getTime(this)
|
||||
implicit none
|
||||
real(SP) :: getTime, time_end
|
||||
type (ClockTime) :: this
|
||||
CALL CPU_TIME ( time_end )
|
||||
getTime=time_end - this%time_begin
|
||||
end function getTime
|
||||
|
||||
! Prints total elapsed time
|
||||
subroutine printTime(this)
|
||||
implicit none
|
||||
type (ClockTime) :: this
|
||||
write(*,'(/ '' Operation time '', f8.3, '' seconds.'')') getTime(this)
|
||||
end subroutine printTime
|
||||
|
||||
! Predicts remaining time before completion
|
||||
function PredictTime(this,CompletionRatio)
|
||||
implicit none
|
||||
real(SP) :: PredictTime
|
||||
type (ClockTime) :: this
|
||||
real(SP) :: CompletionRatio
|
||||
! Definitions:
|
||||
! CompletionRatio = Ratio of Completed Tasks to Total Tasks
|
||||
! Time_Remaining = Time_TotalPredicted - Time_elapsed
|
||||
! = Time_elapsed/CompletionRatio*(1-CompletionRatio)
|
||||
PredictTime = getTime(this)*(1-CompletionRatio)/CompletionRatio
|
||||
end function PredictTime
|
||||
|
||||
! Pretty Prints remaining time
|
||||
subroutine PrintTimeSecondsHoursDays(this, PredictionRatio)
|
||||
! Choose to output either seconds, hours or days depending on magnitude
|
||||
implicit none
|
||||
type (ClockTime) :: this
|
||||
real(SP) :: PredictionRatio
|
||||
real(SP) :: Seconds
|
||||
|
||||
Seconds = PredictTime(this,PredictionRatio)
|
||||
|
||||
if(Seconds<PrintMaxSeconds)then
|
||||
! Seconds
|
||||
write(*,'( f5.1 , '' seconds'')',advance='no') Seconds
|
||||
elseif(Seconds<PrintMaxMinutes)then
|
||||
! Minutes
|
||||
write(*,'( f5.1 , '' minutes'')',advance='no') Seconds/SecondsPerMinutes
|
||||
elseif(Seconds<PrintMaxHours)then
|
||||
! Hours
|
||||
write(*,'( f5.1 , '' hours'')',advance='no') Seconds/SecondsPerMinutes/MinutesPerHour
|
||||
else
|
||||
! Days
|
||||
write(*,'( f5.1 , '' days'')',advance='no') Seconds/SecondsPerMinutes/MinutesPerHour/HoursPerDay
|
||||
endif
|
||||
|
||||
end subroutine
|
||||
|
||||
end module
|
@ -1 +0,0 @@
|
||||
{"leaves":["printtext"],"root":"unitTest"}
|
@ -1,17 +0,0 @@
|
||||
program hello_world3
|
||||
implicit none
|
||||
character*32 text
|
||||
c
|
||||
text = 'Hello World'
|
||||
c
|
||||
call printtext(text)
|
||||
|
||||
end
|
||||
|
||||
subroutine printtext(tekst)
|
||||
implicit none
|
||||
character*32 tekst
|
||||
c
|
||||
write (*,*) tekst
|
||||
c
|
||||
end
|
@ -1,108 +0,0 @@
|
||||
|
||||
# Everything after "#" is a comment.
|
||||
# A file is a class!
|
||||
|
||||
# (optional) class definition:
|
||||
class_name MyClass
|
||||
|
||||
# Inheritance:
|
||||
extends BaseClass
|
||||
|
||||
# Member variables.
|
||||
var a = 5
|
||||
var s = "Hello"
|
||||
var arr = [1, 2, 3]
|
||||
var dict = {"key": "value", 2: 3}
|
||||
var other_dict = {key = "value", other_key = 2}
|
||||
var typed_var: int
|
||||
var inferred_type := "String"
|
||||
|
||||
|
||||
var ss = '''
|
||||
func invalid_single_quote():
|
||||
pass
|
||||
'''
|
||||
|
||||
var sd = """
|
||||
func invalid_func_double_quote():
|
||||
pass
|
||||
"""
|
||||
|
||||
# Constants.
|
||||
const ANSWER = 42
|
||||
const THE_NAME = "Charly"
|
||||
|
||||
# Enums.
|
||||
enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALLY}
|
||||
enum Named {THING_1, THING_2, ANOTHER_THING = -1}
|
||||
|
||||
# Built-in vector types.
|
||||
var v2 = Vector2(1, 2)
|
||||
var v3 = Vector3(1, 2, 3)
|
||||
|
||||
|
||||
# Functions.
|
||||
func my_func(arg1 : int = sin(1), arg2 : String = "") -> void:
|
||||
return
|
||||
|
||||
func some_function(param1, param2, param3):
|
||||
if param1 < local_const:
|
||||
print(param1)
|
||||
elif param2 > 5:
|
||||
print(param2)
|
||||
else:
|
||||
print("Fail!")
|
||||
|
||||
for i in range(20):
|
||||
print(i)
|
||||
|
||||
while param2 != 0:
|
||||
param2 -= 1
|
||||
|
||||
match param3:
|
||||
3:
|
||||
print("param3 is 3!")
|
||||
_:
|
||||
print("param3 is not 3!")
|
||||
|
||||
var local_var = param1 + 3
|
||||
return local_var
|
||||
|
||||
|
||||
# Functions override functions with the same name on the base/super class.
|
||||
# If you still want to call them, use "super":
|
||||
func something(p1, p2):
|
||||
super(p1, p2)
|
||||
|
||||
|
||||
# It's also possible to call another function in the super class:
|
||||
func other_something(p1, p2):
|
||||
super.something(p1, p2)
|
||||
|
||||
|
||||
# Inner class
|
||||
class Something:
|
||||
var a = 10
|
||||
|
||||
func inner_function():
|
||||
return
|
||||
|
||||
func my_func(arg1 : int = sin(1), arg2 : String = "") -> void:
|
||||
return
|
||||
|
||||
|
||||
# Inner class with inheritance
|
||||
class fish extends Node2D:
|
||||
|
||||
func _init():
|
||||
_randomize()
|
||||
|
||||
func _randomize():
|
||||
randomize()
|
||||
_size = rand_range(0.75,2.0)
|
||||
|
||||
# Constructor
|
||||
func _init():
|
||||
print("Constructed!")
|
||||
var lv = Something.new()
|
||||
print(lv.a)
|
@ -1 +0,0 @@
|
||||
{"leaves":["my_func(arg1 : int = sin(1), arg2 : String = \"\") -> void","some_function(param1, param2, param3)","something(p1, p2)","other_something(p1, p2)","_init()"],"nodes":[{"leaves":["inner_function()","my_func(arg1 : int = sin(1), arg2 : String = \"\") -> void"],"name":"Something"},{"leaves":["_init()","_randomize()"],"name":"fish"}],"root":"unitTest"}
|
@ -1 +0,0 @@
|
||||
{"leaves":["main","getAllUsernames","getAllUserIds","getUsernameById","sql"],"root":"unitTest"}
|
@ -1,116 +0,0 @@
|
||||
-- Necessary:
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE StandaloneDeriving #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
||||
-- Incidental:
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE TypeSynonymInstances #-}
|
||||
|
||||
module Main where
|
||||
|
||||
import Control.Monad
|
||||
import Data.Hashable
|
||||
import Data.List
|
||||
import Data.Text (Text)
|
||||
import Data.Traversable (for)
|
||||
import Data.Typeable
|
||||
import Haxl.Core
|
||||
import System.Random
|
||||
|
||||
import qualified Data.Text as Text
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
let stateStore = stateSet UserState{} stateEmpty
|
||||
env0 <- initEnv stateStore ()
|
||||
names <- runHaxl env0 getAllUsernames
|
||||
print names
|
||||
|
||||
-- Data source API.
|
||||
|
||||
getAllUsernames :: Haxl [Name]
|
||||
getAllUsernames = do
|
||||
userIds <- getAllUserIds
|
||||
for userIds $ \userId -> do
|
||||
getUsernameById userId
|
||||
|
||||
getAllUserIds :: Haxl [Id]
|
||||
getAllUserIds = dataFetch GetAllIds
|
||||
|
||||
getUsernameById :: Id -> Haxl Name
|
||||
getUsernameById userId = dataFetch (GetNameById userId)
|
||||
|
||||
-- Aliases.
|
||||
|
||||
type Haxl = GenHaxl () ()
|
||||
type Id = Int
|
||||
type Name = Text
|
||||
|
||||
-- Data source implementation.
|
||||
|
||||
data UserReq a where
|
||||
GetAllIds :: UserReq [Id]
|
||||
GetNameById :: Id -> UserReq Name
|
||||
deriving (Typeable)
|
||||
|
||||
deriving instance Eq (UserReq a)
|
||||
instance Hashable (UserReq a) where
|
||||
hashWithSalt s GetAllIds = hashWithSalt s (0::Int)
|
||||
hashWithSalt s (GetNameById a) = hashWithSalt s (1::Int, a)
|
||||
|
||||
deriving instance Show (UserReq a)
|
||||
instance ShowP UserReq where showp = show
|
||||
|
||||
instance StateKey UserReq where
|
||||
data State UserReq = UserState {}
|
||||
|
||||
instance DataSourceName UserReq where
|
||||
dataSourceName _ = "UserDataSource"
|
||||
|
||||
instance DataSource u UserReq where
|
||||
fetch _state _flags _userEnv = SyncFetch $ \blockedFetches -> do
|
||||
let
|
||||
allIdVars :: [ResultVar [Id]]
|
||||
allIdVars = [r | BlockedFetch GetAllIds r <- blockedFetches]
|
||||
|
||||
idStrings :: [String]
|
||||
idStrings = map show ids
|
||||
|
||||
ids :: [Id]
|
||||
vars :: [ResultVar Name]
|
||||
(ids, vars) = unzip
|
||||
[(userId, r) | BlockedFetch (GetNameById userId) r <- blockedFetches]
|
||||
|
||||
unless (null allIdVars) $ do
|
||||
allIds <- sql "select id from ids"
|
||||
mapM_ (\r -> putSuccess r allIds) allIdVars
|
||||
|
||||
unless (null ids) $ do
|
||||
names <- sql $ unwords
|
||||
[ "select name from names where"
|
||||
, intercalate " or " $ map ("id = " ++) idStrings
|
||||
, "order by find_in_set(id, '" ++ intercalate "," idStrings ++ "')"
|
||||
]
|
||||
mapM_ (uncurry putSuccess) (zip vars names)
|
||||
|
||||
-- Mock SQL API.
|
||||
|
||||
class SQLResult a where
|
||||
mockResult :: IO a
|
||||
|
||||
instance SQLResult a => SQLResult [a] where
|
||||
mockResult = replicateM 10 mockResult
|
||||
|
||||
instance SQLResult Name where
|
||||
-- An infinite number of employees, all named Jim.
|
||||
mockResult = ("Jim" `Text.append`) . Text.pack . show <$> randomRIO (1::Int, 100)
|
||||
|
||||
instance SQLResult Id where
|
||||
mockResult = randomRIO (1, 100)
|
||||
|
||||
sql :: SQLResult a => String -> IO a
|
||||
sql query = print query >> mockResult
|
@ -1,258 +0,0 @@
|
||||
/****************************************************************
|
||||
** **
|
||||
** Name: AsyncFX **
|
||||
** Author: Andreas Falkenhahn **
|
||||
** Version: 1.2 **
|
||||
** Date: 17.01.19 **
|
||||
** Interpreter: Hollywood 8.0 **
|
||||
** Licence: Sample program for Hollywood **
|
||||
** Function: Demonstrates asynchronous transition effects **
|
||||
** **
|
||||
** History: **
|
||||
** **
|
||||
** 1.2: (07.01.19) **
|
||||
** **
|
||||
** - uses the new @DIRECTORY preprocessor command now which **
|
||||
** will automatically link all pics when compiling **
|
||||
** **
|
||||
** 1.1: (29.03.13) **
|
||||
** **
|
||||
** - added BeginRefresh()/EndRefresh() section for optimized **
|
||||
** drawing on supported systems **
|
||||
** **
|
||||
** 1.0: (17.09.08) **
|
||||
** **
|
||||
** - initial release **
|
||||
** **
|
||||
****************************************************************/
|
||||
|
||||
/*
|
||||
** Important! Check if the used Hollywood version is at least
|
||||
** version 8.0!
|
||||
*/
|
||||
@VERSION 8,0
|
||||
|
||||
@DIRECTORY 1, "pics"
|
||||
|
||||
@SPRITE 1, "buttons.png", {Frames = 2, Width = 137, Height = 24, Transparency = $ff0000}
|
||||
|
||||
/*
|
||||
** Initial display dimensions
|
||||
*/
|
||||
@DISPLAY {Width = 800, Height = 600}
|
||||
|
||||
/* check if a picture is already on screen */
|
||||
Function p_CheckPic(x)
|
||||
|
||||
For Local k = 0 To 15
|
||||
If p[k].brush = x Then Return(True)
|
||||
Next
|
||||
|
||||
Return(False)
|
||||
|
||||
EndFunction
|
||||
|
||||
/* select a random effect */
|
||||
Function p_ChooseFX(use_globfx)
|
||||
|
||||
Local found = False
|
||||
Local type
|
||||
|
||||
; do we want a global effect or a new effect for every object?
|
||||
If (use_globfx = True) And (bstate = 2) Then Return(globfx)
|
||||
|
||||
While found = False
|
||||
|
||||
type = GetRandomFX(True)
|
||||
|
||||
; no #SCROLL effects please! They'd corrupt the display because we aren't using layers!
|
||||
Switch type
|
||||
Case #SCROLLWEST
|
||||
Case #SCROLLEAST
|
||||
Case #SCROLLNORTH
|
||||
Case #SCROLLSOUTH
|
||||
Case #SCROLLNORTHEAST
|
||||
Case #SCROLLSOUTHEAST
|
||||
Case #SCROLLSOUTHWEST
|
||||
Case #SCROLLNORTHWEST
|
||||
Default
|
||||
found = True
|
||||
EndSwitch
|
||||
|
||||
Wend
|
||||
|
||||
Return(type)
|
||||
|
||||
EndFunction
|
||||
|
||||
/* start new transition effect */
|
||||
Function p_TOFunc(msg)
|
||||
|
||||
Local t
|
||||
Local k = msg.userdata
|
||||
|
||||
; choose a new global effect if we're in static mode!
|
||||
If (k = 0) And (bstate = 2) Then globfx = p_ChooseFX(False)
|
||||
|
||||
; randomly choose a new picture but it must not be on screen!
|
||||
Repeat
|
||||
t = Rnd(num)
|
||||
Until p_CheckPic(t) = False
|
||||
|
||||
; remember picture
|
||||
p[k].brush = t
|
||||
|
||||
; go!
|
||||
p[k].drawfunc = DisplayBrushFX(p[k].brush + 1, p[k].x * 200, p[k].y * 150, {Async = True, Type = p_ChooseFX(True), Parameter = #WHITE})
|
||||
p[k].active = True
|
||||
|
||||
EndFunction
|
||||
|
||||
Function p_SyncedRestart()
|
||||
|
||||
For Local k = 0 To 15 Do p_TOFunc({userdata = k})
|
||||
|
||||
EndFunction
|
||||
|
||||
/* our main loop */
|
||||
Function p_MainLoop()
|
||||
|
||||
BeginRefresh
|
||||
|
||||
For Local k = 0 To 15
|
||||
|
||||
If p[k].active = True
|
||||
|
||||
If AsyncDrawFrame(p[k].drawfunc) = True
|
||||
|
||||
p[k].active = False
|
||||
|
||||
If bstate = 2
|
||||
|
||||
; We're in static mode --> make sure our FX are absolutely sync'ed
|
||||
|
||||
If k = 15 Then SetTimeout(Nil, p_SyncedRestart, 1000)
|
||||
|
||||
p[k].cleartimeout = False
|
||||
|
||||
Else
|
||||
|
||||
; FX has finished!
|
||||
; --> wait 1 second and then display next pic
|
||||
; note that we have to use SetTimeout() because we are in a callback and must
|
||||
; not call functions that block the system (e.g. do not use Wait() in a callback!)
|
||||
|
||||
p[k].timeout = SetTimeout(Nil, p_TOFunc, 1000, k)
|
||||
p[k].cleartimeout = True
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
Next
|
||||
|
||||
EndRefresh
|
||||
|
||||
EndFunction
|
||||
|
||||
/* start all effects */
|
||||
Function p_Start16FX()
|
||||
|
||||
; start from new!
|
||||
For Local k = 0 To 15
|
||||
p[k].drawfunc = DisplayBrushFX(p[k].brush + 1, p[k].x * 200, p[k].y * 150, {Async = True, Type = p_ChooseFX(True), Parameter = #WHITE})
|
||||
p[k].active = True
|
||||
Next
|
||||
|
||||
EndFunction
|
||||
|
||||
/* scan files and start the transition effects */
|
||||
Function p_Init()
|
||||
|
||||
Local t
|
||||
|
||||
; count files
|
||||
num = CountDirectoryEntries(1)
|
||||
|
||||
; load brushes
|
||||
For Local k = 1 to num Do LoadBrush(k, GetDirectoryEntry(1, PadNum(k, 2) .. ".jpg"))
|
||||
|
||||
p = {}
|
||||
|
||||
For Local k = 0 To 15 Do p[k] = {brush = -1}
|
||||
|
||||
; generate initial picture layout
|
||||
For Local k = 0 To 15
|
||||
Repeat
|
||||
t = Rnd(num)
|
||||
Until p_CheckPic(t) = False
|
||||
p[k].brush = t
|
||||
Next
|
||||
|
||||
Local k = 0
|
||||
|
||||
; generate x & y coordinates for our FX
|
||||
For Local y = 0 To 3
|
||||
|
||||
For Local x = 0 To 3
|
||||
|
||||
p[k].x = x
|
||||
p[k].y = y
|
||||
|
||||
k = k + 1
|
||||
Next
|
||||
Next
|
||||
|
||||
; start all FX at once
|
||||
p_Start16FX()
|
||||
|
||||
EndFunction
|
||||
|
||||
/* this function gets called when the user presses a button */
|
||||
Function p_EventFunc(msg)
|
||||
|
||||
If msg.id = bstate Then Return
|
||||
|
||||
bstate = msg.id
|
||||
|
||||
; update button state
|
||||
DisplaySprite(1, 654, 570, bstate)
|
||||
|
||||
; cancel all async drawings or clear timeouts
|
||||
For Local k = 0 To 15
|
||||
|
||||
If p[k].active = True
|
||||
CancelAsyncDraw(p[k].drawfunc)
|
||||
p[k].active = False
|
||||
Else
|
||||
If p[k].cleartimeout = True Then ClearTimeout(p[k].timeout)
|
||||
EndIf
|
||||
Next
|
||||
|
||||
; clear screen
|
||||
Box(0, 0, 800, 600, #BLACK)
|
||||
|
||||
; choose a new global effect if we're in static mode
|
||||
If bstate = 2 Then globfx = p_ChooseFX(False)
|
||||
|
||||
p_Start16FX()
|
||||
|
||||
EndFunction
|
||||
|
||||
p_Init()
|
||||
|
||||
SetFillStyle(#FILLCOLOR)
|
||||
|
||||
SetInterval(Nil, p_MainLoop, 1000 \ 50) ; 50 fps
|
||||
|
||||
bstate = 1
|
||||
|
||||
MakeButton(1, #SIMPLEBUTTON, 654, 570, 64, 24, {OnMouseUp = p_EventFunc})
|
||||
MakeButton(2, #SIMPLEBUTTON, 727, 570, 64, 24, {OnMouseUp = p_EventFunc})
|
||||
|
||||
DisplaySprite(1, 654, 570)
|
||||
|
||||
EscapeQuit(True)
|
||||
|
||||
Repeat
|
||||
WaitEvent
|
||||
Forever
|
||||
|
@ -1 +0,0 @@
|
||||
{"leaves":["p_CheckPic","p_ChooseFX","p_TOFunc","p_SyncedRestart","p_MainLoop","p_Start16FX","p_Init","p_EventFunc"],"root":"unitTest"}
|
@ -1,28 +0,0 @@
|
||||
[Flow]
|
||||
CurrentPhase=OOBEBoot,Start
|
||||
CurrentOperation=132,end
|
||||
OperationResult=0
|
||||
[BootEntries]
|
||||
DownlevelCurrent={B92EB69E-B2DB-11E7-934D-C49DED11D19D}
|
||||
DownlevelDefault={B92EB69E-B2DB-11E7-934D-C49DED11D19D}
|
||||
NewOS={541947F5-B2DC-11E7-BA3E-C49DED11D19E}
|
||||
Rollback={7254A080-1510-4E85-AC0F-E7FB3D444736}
|
||||
RollbackExternal=No
|
||||
[BootManager]
|
||||
Timeout=0
|
||||
[OldOS]
|
||||
ConnectedStandby=Yes
|
||||
[RecoveryPartition]
|
||||
Backup=Yes
|
||||
[Quarantine.WinOld]
|
||||
0=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Windows.old
|
||||
[Quarantine.NewPaths]
|
||||
0=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,PerfLogs
|
||||
1=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Program Files
|
||||
2=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Program Files (x86)
|
||||
3=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,ProgramData
|
||||
4=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Users
|
||||
5=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Windows
|
||||
[Profiles]
|
||||
S-1-5-21-1753568369-220679467-1382890926-1001.Profile.Old=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Users\Don Ho
|
||||
S-1-5-21-1753568369-220679467-1382890926-1001.Profile.New=GlobalPath,{826A734A-88FA-4773-AF09-B90072E096D3},0,407896064,2727568020,Users\Don Ho
|
@ -1 +0,0 @@
|
||||
{"leaves":["Flow","BootEntries","BootManager","OldOS","RecoveryPartition","Quarantine.WinOld","Quarantine.NewPaths","Profiles"],"root":"unitTest"}
|
@ -1,394 +0,0 @@
|
||||
;contribute: http://github.com/stfx/innodependencyinstaller
|
||||
;original article: http://codeproject.com/Articles/20868/NET-Framework-1-1-2-0-3-5-Installer-for-InnoSetup
|
||||
|
||||
;comment out product defines to disable installing them
|
||||
;#define use_iis
|
||||
#define use_kb835732
|
||||
|
||||
#define use_msi20
|
||||
#define use_msi31
|
||||
#define use_msi45
|
||||
|
||||
#define use_ie6
|
||||
|
||||
#define use_dotnetfx11
|
||||
#define use_dotnetfx11lp
|
||||
|
||||
#define use_dotnetfx20
|
||||
#define use_dotnetfx20lp
|
||||
|
||||
#define use_dotnetfx35
|
||||
#define use_dotnetfx35lp
|
||||
|
||||
#define use_dotnetfx40
|
||||
#define use_wic
|
||||
|
||||
#define use_dotnetfx45
|
||||
#define use_dotnetfx46
|
||||
#define use_dotnetfx47
|
||||
|
||||
#define use_msiproduct
|
||||
#define use_vc2005
|
||||
#define use_vc2008
|
||||
#define use_vc2010
|
||||
#define use_vc2012
|
||||
#define use_vc2013
|
||||
#define use_vc2015
|
||||
#define use_vc2017
|
||||
|
||||
;requires dxwebsetup.exe in src dir
|
||||
;#define use_directxruntime
|
||||
|
||||
#define use_mdac28
|
||||
#define use_jet4sp8
|
||||
|
||||
#define use_sqlcompact35sp2
|
||||
|
||||
#define use_sql2005express
|
||||
#define use_sql2008express
|
||||
|
||||
#define MyAppSetupName 'MyProgram'
|
||||
#define MyAppVersion '6.0'
|
||||
|
||||
[Setup]
|
||||
AppName={#MyAppSetupName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVerName={#MyAppSetupName} {#MyAppVersion}
|
||||
AppCopyright=Copyright © 2007-2017 stfx
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
VersionInfoCompany=stfx
|
||||
AppPublisher=stfx
|
||||
;AppPublisherURL=http://...
|
||||
;AppSupportURL=http://...
|
||||
;AppUpdatesURL=http://...
|
||||
OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}
|
||||
DefaultGroupName={#MyAppSetupName}
|
||||
DefaultDirName={pf}\{#MyAppSetupName}
|
||||
UninstallDisplayIcon={app}\MyProgram.exe
|
||||
OutputDir=bin
|
||||
SourceDir=.
|
||||
AllowNoIcons=yes
|
||||
;SetupIconFile=MyProgramIcon
|
||||
SolidCompression=yes
|
||||
|
||||
;MinVersion default value: "0,5.0 (Windows 2000+) if Unicode Inno Setup, else 4.0,4.0 (Windows 95+)"
|
||||
;MinVersion=0,5.0
|
||||
PrivilegesRequired=admin
|
||||
ArchitecturesAllowed=x86 x64 ia64
|
||||
ArchitecturesInstallIn64BitMode=x64 ia64
|
||||
|
||||
; downloading and installing dependencies will only work if the memo/ready page is enabled (default and current behaviour)
|
||||
DisableReadyPage=no
|
||||
DisableReadyMemo=no
|
||||
|
||||
; supported languages
|
||||
#include "scripts\lang\english.iss"
|
||||
#include "scripts\lang\german.iss"
|
||||
#include "scripts\lang\french.iss"
|
||||
#include "scripts\lang\italian.iss"
|
||||
#include "scripts\lang\dutch.iss"
|
||||
|
||||
#ifdef UNICODE
|
||||
#include "scripts\lang\chinese.iss"
|
||||
#include "scripts\lang\polish.iss"
|
||||
#include "scripts\lang\russian.iss"
|
||||
#include "scripts\lang\japanese.iss"
|
||||
#endif
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
|
||||
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "src\MyProgram-x64.exe"; DestDir: "{app}"; DestName: "MyProgram.exe"; Check: IsX64
|
||||
Source: "src\MyProgram-IA64.exe"; DestDir: "{app}"; DestName: "MyProgram.exe"; Check: IsIA64
|
||||
Source: "src\MyProgram.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#MyAppSetupName}"; Filename: "{app}\MyProgram.exe"
|
||||
Name: "{group}\{cm:UninstallProgram,{#MyAppSetupName}}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\{#MyAppSetupName}"; Filename: "{app}\MyProgram.exe"; Tasks: desktopicon
|
||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppSetupName}"; Filename: "{app}\MyProgram.exe"; Tasks: quicklaunchicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\MyProgram.exe"; Description: "{cm:LaunchProgram,{#MyAppSetupName}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[CustomMessages]
|
||||
DependenciesDir=MyProgramDependencies
|
||||
WindowsServicePack=Windows %1 Service Pack %2
|
||||
|
||||
; shared code for installing the products
|
||||
#include "scripts\products.iss"
|
||||
|
||||
; helper functions
|
||||
#include "scripts\products\stringversion.iss"
|
||||
#include "scripts\products\winversion.iss"
|
||||
#include "scripts\products\fileversion.iss"
|
||||
#include "scripts\products\dotnetfxversion.iss"
|
||||
|
||||
; actual products
|
||||
#ifdef use_iis
|
||||
#include "scripts\products\iis.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_kb835732
|
||||
#include "scripts\products\kb835732.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_msi20
|
||||
#include "scripts\products\msi20.iss"
|
||||
#endif
|
||||
#ifdef use_msi31
|
||||
#include "scripts\products\msi31.iss"
|
||||
#endif
|
||||
#ifdef use_msi45
|
||||
#include "scripts\products\msi45.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_ie6
|
||||
#include "scripts\products\ie6.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx11
|
||||
#include "scripts\products\dotnetfx11.iss"
|
||||
#include "scripts\products\dotnetfx11sp1.iss"
|
||||
#ifdef use_dotnetfx11lp
|
||||
#include "scripts\products\dotnetfx11lp.iss"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx20
|
||||
#include "scripts\products\dotnetfx20.iss"
|
||||
#include "scripts\products\dotnetfx20sp1.iss"
|
||||
#include "scripts\products\dotnetfx20sp2.iss"
|
||||
#ifdef use_dotnetfx20lp
|
||||
#include "scripts\products\dotnetfx20lp.iss"
|
||||
#include "scripts\products\dotnetfx20sp1lp.iss"
|
||||
#include "scripts\products\dotnetfx20sp2lp.iss"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx35
|
||||
;#include "scripts\products\dotnetfx35.iss"
|
||||
#include "scripts\products\dotnetfx35sp1.iss"
|
||||
#ifdef use_dotnetfx35lp
|
||||
;#include "scripts\products\dotnetfx35lp.iss"
|
||||
#include "scripts\products\dotnetfx35sp1lp.iss"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx40
|
||||
#include "scripts\products\dotnetfx40client.iss"
|
||||
#include "scripts\products\dotnetfx40full.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx45
|
||||
#include "scripts\products\dotnetfx45.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx46
|
||||
#include "scripts\products\dotnetfx46.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx47
|
||||
#include "scripts\products\dotnetfx47.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_wic
|
||||
#include "scripts\products\wic.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_msiproduct
|
||||
#include "scripts\products\msiproduct.iss"
|
||||
#endif
|
||||
#ifdef use_vc2005
|
||||
#include "scripts\products\vcredist2005.iss"
|
||||
#endif
|
||||
#ifdef use_vc2008
|
||||
#include "scripts\products\vcredist2008.iss"
|
||||
#endif
|
||||
#ifdef use_vc2010
|
||||
#include "scripts\products\vcredist2010.iss"
|
||||
#endif
|
||||
#ifdef use_vc2012
|
||||
#include "scripts\products\vcredist2012.iss"
|
||||
#endif
|
||||
#ifdef use_vc2013
|
||||
#include "scripts\products\vcredist2013.iss"
|
||||
#endif
|
||||
#ifdef use_vc2015
|
||||
#include "scripts\products\vcredist2015.iss"
|
||||
#endif
|
||||
#ifdef use_vc2017
|
||||
#include "scripts\products\vcredist2017.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_directxruntime
|
||||
#include "scripts\products\directxruntime.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_mdac28
|
||||
#include "scripts\products\mdac28.iss"
|
||||
#endif
|
||||
#ifdef use_jet4sp8
|
||||
#include "scripts\products\jet4sp8.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_sqlcompact35sp2
|
||||
#include "scripts\products\sqlcompact35sp2.iss"
|
||||
#endif
|
||||
|
||||
#ifdef use_sql2005express
|
||||
#include "scripts\products\sql2005express.iss"
|
||||
#endif
|
||||
#ifdef use_sql2008express
|
||||
#include "scripts\products\sql2008express.iss"
|
||||
#endif
|
||||
|
||||
[Code]
|
||||
function InitializeSetup(): boolean;
|
||||
begin
|
||||
// initialize windows version
|
||||
initwinversion();
|
||||
|
||||
#ifdef use_iis
|
||||
if (not iis()) then exit;
|
||||
#endif
|
||||
|
||||
#ifdef use_msi20
|
||||
msi20('2.0'); // min allowed version is 2.0
|
||||
#endif
|
||||
#ifdef use_msi31
|
||||
msi31('3.1'); // min allowed version is 3.1
|
||||
#endif
|
||||
#ifdef use_msi45
|
||||
msi45('4.5'); // min allowed version is 4.5
|
||||
#endif
|
||||
#ifdef use_ie6
|
||||
ie6('5.0.2919'); // min allowed version is 5.0.2919
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx11
|
||||
dotnetfx11();
|
||||
#ifdef use_dotnetfx11lp
|
||||
dotnetfx11lp();
|
||||
#endif
|
||||
dotnetfx11sp1();
|
||||
#endif
|
||||
|
||||
// install .netfx 2.0 sp2 if possible; if not sp1 if possible; if not .netfx 2.0
|
||||
#ifdef use_dotnetfx20
|
||||
// check if .netfx 2.0 can be installed on this OS
|
||||
if not minwinspversion(5, 0, 3) then begin
|
||||
MsgBox(FmtMessage(CustomMessage('depinstall_missing'), [FmtMessage(CustomMessage('WindowsServicePack'), ['2000', '3'])]), mbError, MB_OK);
|
||||
exit;
|
||||
end;
|
||||
if not minwinspversion(5, 1, 2) then begin
|
||||
MsgBox(FmtMessage(CustomMessage('depinstall_missing'), [FmtMessage(CustomMessage('WindowsServicePack'), ['XP', '2'])]), mbError, MB_OK);
|
||||
exit;
|
||||
end;
|
||||
|
||||
if minwinversion(5, 1) then begin
|
||||
dotnetfx20sp2();
|
||||
#ifdef use_dotnetfx20lp
|
||||
dotnetfx20sp2lp();
|
||||
#endif
|
||||
end else begin
|
||||
if minwinversion(5, 0) and minwinspversion(5, 0, 4) then begin
|
||||
#ifdef use_kb835732
|
||||
kb835732();
|
||||
#endif
|
||||
dotnetfx20sp1();
|
||||
#ifdef use_dotnetfx20lp
|
||||
dotnetfx20sp1lp();
|
||||
#endif
|
||||
end else begin
|
||||
dotnetfx20();
|
||||
#ifdef use_dotnetfx20lp
|
||||
dotnetfx20lp();
|
||||
#endif
|
||||
end;
|
||||
end;
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx35
|
||||
//dotnetfx35();
|
||||
dotnetfx35sp1();
|
||||
#ifdef use_dotnetfx35lp
|
||||
//dotnetfx35lp();
|
||||
dotnetfx35sp1lp();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef use_wic
|
||||
wic();
|
||||
#endif
|
||||
|
||||
// if no .netfx 4.0 is found, install the client (smallest)
|
||||
#ifdef use_dotnetfx40
|
||||
if (not netfxinstalled(NetFx40Client, '') and not netfxinstalled(NetFx40Full, '')) then
|
||||
dotnetfx40client();
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx45
|
||||
dotnetfx45(50); // min allowed version is 4.5.0
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx46
|
||||
dotnetfx46(50); // min allowed version is 4.5.0
|
||||
#endif
|
||||
|
||||
#ifdef use_dotnetfx47
|
||||
dotnetfx47(50); // min allowed version is 4.5.0
|
||||
#endif
|
||||
|
||||
#ifdef use_vc2005
|
||||
vcredist2005('6'); // min allowed version is 6.0
|
||||
#endif
|
||||
#ifdef use_vc2008
|
||||
vcredist2008('9'); // min allowed version is 9.0
|
||||
#endif
|
||||
#ifdef use_vc2010
|
||||
vcredist2010('10'); // min allowed version is 10.0
|
||||
#endif
|
||||
#ifdef use_vc2012
|
||||
vcredist2012('11'); // min allowed version is 11.0
|
||||
#endif
|
||||
#ifdef use_vc2013
|
||||
//SetForceX86(true); // force 32-bit install of next products
|
||||
vcredist2013('12'); // min allowed version is 12.0
|
||||
//SetForceX86(false); // disable forced 32-bit install again
|
||||
#endif
|
||||
#ifdef use_vc2015
|
||||
vcredist2015('14'); // min allowed version is 14.0
|
||||
#endif
|
||||
#ifdef use_vc2017
|
||||
vcredist2017('14'); // min allowed version is 14.0
|
||||
#endif
|
||||
|
||||
#ifdef use_directxruntime
|
||||
// extracts included setup file to temp folder so that we don't need to download it
|
||||
// and always runs directxruntime installer as we don't know how to check if it is required
|
||||
directxruntime();
|
||||
#endif
|
||||
|
||||
#ifdef use_mdac28
|
||||
mdac28('2.7'); // min allowed version is 2.7
|
||||
#endif
|
||||
#ifdef use_jet4sp8
|
||||
jet4sp8('4.0.8015'); // min allowed version is 4.0.8015
|
||||
#endif
|
||||
|
||||
#ifdef use_sqlcompact35sp2
|
||||
sqlcompact35sp2();
|
||||
#endif
|
||||
|
||||
#ifdef use_sql2005express
|
||||
sql2005express();
|
||||
#endif
|
||||
#ifdef use_sql2008express
|
||||
sql2008express();
|
||||
#endif
|
||||
|
||||
Result := true;
|
||||
end;
|
@ -1 +0,0 @@
|
||||
{"leaves":["Setup","Tasks","Files","Icons","Run","CustomMessages"],"root":"unitTest"}
|
@ -1,77 +0,0 @@
|
||||
// This file is part of Notepad++ project
|
||||
// Copyright (C)2021 Don HO <don.h@free.fr>
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// at your option any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import java.util.zip.*;
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
|
||||
class zipB64 {
|
||||
|
||||
protected static String encodeMessage(String messageStr) {
|
||||
try {
|
||||
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
|
||||
Deflater deflater = new Deflater(Deflater.DEFLATED);
|
||||
DeflaterOutputStream deflaterStream = new DeflaterOutputStream(bytesOut, deflater);
|
||||
deflaterStream.write(messageStr.getBytes("UTF-8"));
|
||||
deflaterStream.finish();
|
||||
|
||||
Base64 b = new Base64(-1);
|
||||
return new String(b.encode(bytesOut.toByteArray()));
|
||||
} catch (Exception e) {
|
||||
return "crotte";
|
||||
}
|
||||
}
|
||||
|
||||
protected static String decodeMessage(String encodedMessage) {
|
||||
try {
|
||||
Base64 b = new Base64();
|
||||
byte[] decodedBase64 = b.decode(encodedMessage.getBytes());
|
||||
|
||||
// Decompress the bytes
|
||||
|
||||
ByteArrayInputStream bytesIn = new ByteArrayInputStream(decodedBase64);
|
||||
InflaterInputStream inflater = new InflaterInputStream(bytesIn);
|
||||
|
||||
int nbRead = 0;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (nbRead >= 0) {
|
||||
byte[] result = new byte[500];
|
||||
nbRead = inflater.read(result,0,result.length);
|
||||
if (nbRead > 0) {
|
||||
sb.append(new String(result, 0, nbRead, "UTF-8"));
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (Exception e) {
|
||||
return "zut";
|
||||
}
|
||||
}
|
||||
|
||||
public static void main (String args[]) {
|
||||
if (args.length != 2 || (args[0].compareTo("-zip") != 0 && args[0].compareTo("-unzip") != 0))
|
||||
{
|
||||
System.out.println("java zipB64 <-zip|-unzip> \"message\"");
|
||||
return;
|
||||
}
|
||||
boolean doZip = args[0].compareTo("-zip") == 0;
|
||||
if (doZip)
|
||||
System.out.println(encodeMessage(args[1]));
|
||||
else
|
||||
System.out.println(decodeMessage(args[1]));
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"nodes":[{"leaves":["encodeMessage","decodeMessage"],"name":"zipB64"}],"root":"unitTest"}
|
@ -1,369 +0,0 @@
|
||||
var crypto = require('crypto'),
|
||||
Friends,
|
||||
User,
|
||||
Post,
|
||||
WallPost,
|
||||
Comment,
|
||||
LoginToken;
|
||||
|
||||
function extractKeywords(text) {
|
||||
if (!text) return [];
|
||||
|
||||
return text.
|
||||
split(/\s+/).
|
||||
filter(function(v) { return v.length > 2; }).
|
||||
filter(function(v, i, a) { return a.lastIndexOf(v) === i; });
|
||||
}
|
||||
|
||||
/*
|
||||
function commentedFunc() {
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
function convertBasicMarkup(input, allowHtml) {
|
||||
var strongRe = /[*]{2}([^*]+)[*]{2}/gm;
|
||||
var emRe = /[*]{1}([^*]+)[*]{1}/gm;
|
||||
var linkRe = /\[([^\]]*)\]\(([^\)]*?)\)/gm;
|
||||
var nlRe = /\r\n/gm;
|
||||
var crRe = /\r/gm;
|
||||
|
||||
// special re's to revert linebreaks from <br />
|
||||
var codeRe = /(<code\b[^>]*>(.*?)<\/code>)/gm;
|
||||
|
||||
// cleanup newlines
|
||||
input = input.replace(nlRe, "\n");
|
||||
input = input.replace(crRe, "\n");
|
||||
|
||||
// strip existing html before inserting breaks/markup
|
||||
if (!allowHtml) {
|
||||
// strip html
|
||||
input = input
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
// convert newlines to breaks
|
||||
input = input.replace(/\n/gm, '<br />');
|
||||
|
||||
// replace basic markup
|
||||
input = input.replace(strongRe, function(whole, m1, m2, m3) {
|
||||
return '<strong>' + m1 + '</strong>';
|
||||
});
|
||||
|
||||
input = input.replace(emRe, function(whole, m1, m2, m3) {
|
||||
return '<em>' + m1 + '</em>';
|
||||
});
|
||||
|
||||
input = input.replace(linkRe, function(whole, m1, m2) {
|
||||
// fix up protocol
|
||||
if (!m2.match(/(http(s?)|ftp(s?)):\/\//gm))
|
||||
// prepend http as default
|
||||
m2 = 'http://' + m2;
|
||||
return '<a href=\"' + m2 + '\" target=\"_blank\">' + m1 + '</a>';
|
||||
});
|
||||
|
||||
// revert code blocks
|
||||
input = input.replace(codeRe, function(whole, m1) {
|
||||
return m1.replace(/<br \/>/gm, '\n');
|
||||
});
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function defineModels(mongoose, fn) {
|
||||
var Schema = mongoose.Schema,
|
||||
ObjectId = Schema.ObjectId;
|
||||
|
||||
|
||||
/**
|
||||
* Comment model
|
||||
*
|
||||
* Used for persisting user comments
|
||||
*/
|
||||
var Comment = new Schema({
|
||||
user_id: ObjectId,
|
||||
//photo:String,
|
||||
date: Date,
|
||||
body: String,
|
||||
post_id:ObjectId,
|
||||
});
|
||||
|
||||
// register virtual members
|
||||
Comment.virtual('readableday')
|
||||
.get(function() {
|
||||
var day = this.date.getDate();
|
||||
return (day < 10 ? '0' + day : day);
|
||||
});
|
||||
|
||||
Comment.virtual('readablemonth')
|
||||
.get(function() {
|
||||
return monthNamesShort[this.date.getMonth()];
|
||||
});
|
||||
|
||||
Comment.virtual('readabletime')
|
||||
.get(function() {
|
||||
var hour = this.date.getHours();
|
||||
var minute = this.date.getMinutes();
|
||||
return (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
||||
});
|
||||
|
||||
Comment.virtual('bodyParsed')
|
||||
.get(function() {
|
||||
return convertBasicMarkup(this.body, false);
|
||||
});
|
||||
|
||||
// register validators
|
||||
/*Comment.path('author').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'AUTHOR_MISSING');*/
|
||||
|
||||
Comment.path('body').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'BODY_MISSING');
|
||||
|
||||
|
||||
/**
|
||||
* Model: WallPost
|
||||
*/
|
||||
|
||||
|
||||
var WallPost = new Schema({
|
||||
friend_id: String,
|
||||
preview: String,
|
||||
body: String,
|
||||
//rsstext: String,
|
||||
slug: String,
|
||||
created: Date,
|
||||
modified: Date,
|
||||
//tags: [String],
|
||||
user_id:ObjectId,
|
||||
posted_on_user_id : ObjectId,
|
||||
//comments: [Comment]
|
||||
});
|
||||
|
||||
var monthNames = [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli',
|
||||
'August', 'September', 'Oktober', 'November', 'Dezember' ];
|
||||
var monthNamesShort = [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul',
|
||||
'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ];
|
||||
|
||||
// define virtual getter method for id (readable string)
|
||||
WallPost.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
WallPost.virtual('url')
|
||||
.get(function() {
|
||||
// build url for current post
|
||||
var year = this.created.getFullYear();
|
||||
var month = this.created.getMonth() + 1;
|
||||
var day = this.created.getDate();
|
||||
return '/' + year + '/' + (month < 10 ? '0' + month : month) + '/' + (day < 10 ? '0' + day : day) + '/' + this.slug + '/';
|
||||
});
|
||||
|
||||
WallPost.virtual('rfc822created')
|
||||
.get(function() {
|
||||
return this.created.toGMTString();
|
||||
});
|
||||
|
||||
WallPost.virtual('readabledate')
|
||||
.get(function() {
|
||||
var year = this.created.getFullYear();
|
||||
var month = monthNames[this.created.getMonth()];
|
||||
var day = this.created.getDate();
|
||||
return (day < 10 ? '0' + day : day) + '. ' + month + ' ' + year;
|
||||
});
|
||||
|
||||
WallPost.virtual('readableday')
|
||||
.get(function() {
|
||||
var day = this.created.getDate();
|
||||
return (day < 10 ? '0' + day : day);
|
||||
});
|
||||
|
||||
WallPost.virtual('readablemonth')
|
||||
.get(function() {
|
||||
return monthNamesShort[this.created.getMonth()];
|
||||
});
|
||||
|
||||
WallPost.virtual('previewParsed')
|
||||
.get(function() {
|
||||
return convertBasicMarkup(this.preview, true);
|
||||
});
|
||||
|
||||
WallPost.virtual('bodyParsed')
|
||||
.get(function() {
|
||||
return convertBasicMarkup(this.body, true);
|
||||
});
|
||||
|
||||
// register validators
|
||||
/*WallPost.path('title').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'TITLE_MISSING');
|
||||
|
||||
WallPost.path('preview').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'PREVIEW_MISSING');
|
||||
|
||||
WallPost.path('rsstext').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'RSSTEXT_MISSING');*/
|
||||
|
||||
WallPost.path('body').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'BODY_MISSING');
|
||||
|
||||
// generate a proper slug value for Wallpost
|
||||
function slugGenerator (options){
|
||||
options = options || {};
|
||||
var key = options.key || 'body';
|
||||
return function slugGenerator(schema){
|
||||
schema.path(key).set(function(v){
|
||||
this.slug = v.toLowerCase().replace(/[^a-z0-9]/g, '-').replace(/\++/g, '');
|
||||
return v;
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// attach slugGenerator plugin to Wallpost schema
|
||||
WallPost.plugin(slugGenerator());
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Model: User
|
||||
*/
|
||||
function validatePresenceOf(value) {
|
||||
return value && value.length;
|
||||
}
|
||||
var User = new Schema({
|
||||
'first_name': { type: String, validate: /[a-z]/ },
|
||||
'last_name':{ type: String, validate: /[a-z]/ },
|
||||
'age':Number,
|
||||
'sex':{ type: String},
|
||||
'photo':String,
|
||||
'location':{ type: String, validate: /[a-z]/ },
|
||||
'latitude' : String,
|
||||
'longitude' : String,
|
||||
'keywords': [String],
|
||||
'username':String,
|
||||
'email': { type: String, validate: [validatePresenceOf, 'an email is required'], index: { unique: true }, required:true },
|
||||
'hashed_password': { type: String},
|
||||
'salt': String,
|
||||
});
|
||||
|
||||
User.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
User.virtual('password')
|
||||
.set(function(password) {
|
||||
this._password = password;
|
||||
this.salt = this.makeSalt();
|
||||
this.hashed_password = this.encryptPassword(password);
|
||||
})
|
||||
.get(function() { return this._password; });
|
||||
|
||||
User.method('authenticate', function(plainText) {
|
||||
return this.encryptPassword(plainText) === this.hashed_password;
|
||||
});
|
||||
|
||||
User.method('makeSalt', function() {
|
||||
return Math.round((new Date().valueOf() * Math.random())) + '';
|
||||
});
|
||||
|
||||
User.method('encryptPassword', function(password) {
|
||||
return crypto.createHmac('sha1', this.salt).update(password).digest('hex');
|
||||
});
|
||||
|
||||
User.pre('save', function(next) {
|
||||
this.keywords = extractKeywords(this.first_name);
|
||||
next();
|
||||
if (!validatePresenceOf(this.password)) {
|
||||
next(new Error('Invalid password'));
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
var Friends = new Schema({
|
||||
requestor : String
|
||||
, acceptor : String
|
||||
, date_requested : Date
|
||||
, status:Number
|
||||
});
|
||||
|
||||
Friends.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
var Post = new Schema({
|
||||
filename : { type: String, index: true }
|
||||
, file : String
|
||||
, created_at : Date
|
||||
, user_id: ObjectId
|
||||
});
|
||||
|
||||
Post.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
/**
|
||||
* Model: LoginToken
|
||||
*
|
||||
* Used for session persistence.
|
||||
*/
|
||||
var LoginToken = new Schema({
|
||||
email: { type: String, index: true },
|
||||
series: { type: String, index: true },
|
||||
token: { type: String, index: true }
|
||||
});
|
||||
|
||||
LoginToken.method('randomToken', function() {
|
||||
return Math.round((new Date().valueOf() * Math.random())) + '';
|
||||
});
|
||||
|
||||
LoginToken.pre('save', function(next) {
|
||||
// Automatically create the tokens
|
||||
this.token = this.randomToken();
|
||||
|
||||
if (this.isNew)
|
||||
this.series = this.randomToken();
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
LoginToken.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
LoginToken.virtual('cookieValue')
|
||||
.get(function() {
|
||||
return JSON.stringify({ email: this.email, token: this.token, series: this.series });
|
||||
});
|
||||
|
||||
|
||||
|
||||
mongoose.model('User', User);
|
||||
mongoose.model('Post', Post);
|
||||
mongoose.model('Friends', Friends);
|
||||
mongoose.model('LoginToken', LoginToken);
|
||||
mongoose.model('WallPost', WallPost);
|
||||
mongoose.model('Comment', Comment);
|
||||
fn();
|
||||
}
|
||||
|
||||
exports.defineModels = defineModels;
|
||||
|
@ -1 +0,0 @@
|
||||
{"leaves":["extractKeywords","convertBasicMarkup","function","function","function","function","defineModels","slugGenerator","slugGenerator","validatePresenceOf","function","function","function","function","function","function"],"root":"unitTest"}
|
@ -1,8 +0,0 @@
|
||||
$testRoot = ".\"
|
||||
$PowerEditor = "$testRoot\..\..\"
|
||||
|
||||
Copy-Item "$PowerEditor\installer\functionList" -Destination "$PowerEditor\bin" -Recurse -Force
|
||||
Copy-Item "$PowerEditor\installer\filesForTesting\regexGlobalTest.xml" -Destination "$PowerEditor\bin\functionList" -Force
|
||||
Copy-Item "$PowerEditor\installer\filesForTesting\overrideMap.xml" -Destination "$PowerEditor\bin\functionList" -Force
|
||||
|
||||
& ".\unitTestLauncher.ps1"
|
@ -1,27 +0,0 @@
|
||||
-- Create a file named by_ip/''ip_addess''.cap with all ip traffic of each ip host. (tshark only?)
|
||||
-- Dump files are created for both source and destination hosts
|
||||
function createDir (dirname)
|
||||
-- this will print out an error if the directory already exists, but that's fine
|
||||
os.execute("mkdir " .. dirname)
|
||||
end
|
||||
|
||||
local dir = "by_ip"
|
||||
createDir(dir)
|
||||
|
||||
-- create a table to hold the dumper objects/file handles
|
||||
local dumpers = {}
|
||||
|
||||
local tap = Listener.new("ip")
|
||||
|
||||
-- we will be called once for every IP Header.
|
||||
-- If there's more than one IP header in a given packet we'll dump the packet once per every header
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local ip_src, ip_dst = tostring(ip.ip_src), tostring(ip.ip_dst)
|
||||
local src_dmp, dst_dmp
|
||||
end
|
||||
|
||||
function tap.draw()
|
||||
for ip_addr,dumper in pairs(dumpers) do
|
||||
dumper:flush()
|
||||
end
|
||||
end
|
@ -1 +0,0 @@
|
||||
{"leaves":["createDir"],"nodes":[{"leaves":["packet","draw"],"name":"tap"}],"root":"unitTest"}
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
{"leaves":["GetWindowsVersion","GetWindowsVersion OUTPUT_VALUE","LaunchNpp","ExtraOptions","OnChange_NoUserDataCheckBox","OnChange_PluginLoadFromUserDataCheckBox","OnChange_ShortcutCheckBox","OnChange_OldIconCheckBox",".onInit",".onInstSuccess","-\"Notepad++\" mainSection","\"Context Menu Entry\" explorerContextMenu","\"Auto-Updater\" AutoUpdater","-FinishSection","un.htmlViewer","un.AutoUpdater","un.explorerContextMenu","un.UnregisterFileExt","un.UserManual","Uninstall","un.onInit"],"nodes":[{"leaves":["\"C\" C","\"C++\" C++","\"Java\" Java","\"C","\"HTML\" HTML","\"RC\" RC","\"SQL\" SQL","\"PHP\" PHP","\"CSS\" CSS","\"VB\" VB","\"Perl\" Perl","\"JavaScript\" JavaScript","\"Python\" Python","\"ActionScript\" ActionScript","\"LISP\" LISP","\"VHDL\" VHDL","\"TeX\" TeX","\"DocBook\" DocBook","\"NSIS\" NSIS","\"CMAKE\" CMAKE"],"name":"Auto-completion Files"},{"leaves":["\"NppExport\" NppExport","\"Plugin Manager\" PluginManager","\"Mime Tools\" MimeTools","\"Converter\" Converter"],"name":"Plugins"},{"leaves":["\"Black Board\" BlackBoard","\"Choco\" Choco","\"Hello Kitty\" HelloKitty","\"Mono Industrial\" MonoIndustrial","\"Monokai\" Monokai","\"Obsidian\" Obsidian","\"Plastic Code Wrap\" PlasticCodeWrap","\"Ruby Blue\" RubyBlue","\"Twilight\" Twilight","\"Vibrant Ink\" VibrantInk","\"Deep Black\" DeepBlack","\"vim Dark Blue\" vimDarkBlue","\"Bespin\" Bespin","\"Zenburn\" Zenburn","\"Solarized\" Solarized","\"Solarized Light\" Solarized-light","\"Hot Fudge Sundae\" HotFudgeSundae","\"khaki\" khaki","\"Mossy Lawn\" MossyLawn","\"Navajo\" Navajo"],"name":"Themes"},{"leaves":["un.PHP","un.CSS","un.HTML","un.SQL","un.RC","un.VB","un.Perl","un.C","un.C++","un.Java","un.C","un.JavaScript","un.Python","un.ActionScript","un.LISP","un.VHDL","un.TeX","un.DocBook","un.NSIS","un.AWK","un.CMAKE"],"name":"un.autoCompletionComponent"},{"leaves":["un.NPPTextFX","un.NppAutoIndent","un.MIMETools","un.FTP_synchronize","un.NppFTP","un.NppExport","un.SelectNLaunch","un.DocMonitor","un.LightExplorer","un.HexEditor","un.ConvertExt","un.SpellChecker","un.DSpellCheck","un.NppExec","un.QuickText","un.ComparePlugin","un.Converter","un.MimeTools","un.PluginManager","un.ChangeMarkers"],"name":"un.Plugins"},{"leaves":["un.BlackBoard","un.Choco","un.HelloKitty","un.MonoIndustrial","un.Monokai","un.Obsidian","un.PlasticCodeWrap","un.RubyBlue","un.Twilight","un.VibrantInk","un.DeepBlack","un.vimDarkBlue","un.Bespin","un.Zenburn","un.Solarized","un.Solarized-light","un.HotFudgeSundae","un.khaki","un.MossyLawn","un.Navajo"],"name":"un.Themes"},{"leaves":["un.afrikaans","un.albanian","un.arabic","un.aragonese","un.aranese","un.azerbaijani","un.basque","un.belarusian","un.bengali","un.bosnian","un.brazilian_portuguese","un.bulgarian","un.catalan","un.chineseTraditional","un.chineseSimplified","un.croatian","un.czech","un.danish","un.dutch","un.english_customizable","un.esperanto","un.estonian","un.extremaduran","un.farsi","un.finnish","un.friulian","un.french","un.galician","un.georgian","un.german","un.greek","un.gujarati","un.hebrew","un.hungarian","un.hungarianA","un.indonesian","un.italian","un.japanese","un.kazakh","un.korean","un.kyrgyz","un.latvian","un.ligurian","un.lithuanian","un.luxembourgish","un.macedonian","un.malay","un.marathi","un.mongolian","un.norwegian","un.nynorsk","un.occitan","un.polish","un.kannada","un.portuguese","un.punjabi","un.romanian","un.russian","un.samogitian","un.sardinian","un.serbian","un.serbianCyrillic","un.sinhala","un.slovak","un.slovakA","un.slovenian","un.spanish","un.spanish_ar","un.swedish","un.tagalog","un.tajik","un.tamil","un.tatar","un.telugu","un.thai","un.turkish","un.ukrainian","un.urdu","un.uyghur","un.uzbek","un.uzbekCyrillic","un.vietnamese","un.welsh"],"name":"un.localization"}],"root":"unitTest"}
|
@ -1,562 +0,0 @@
|
||||
unit unitTest;
|
||||
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.SysUtils, System.Types, System.Classes;
|
||||
|
||||
|
||||
{ Free function 1, declaration }
|
||||
|
||||
function FreeFunc1(const Param: integer): integer;
|
||||
|
||||
|
||||
type
|
||||
// -----------------------------------------------------------------------------
|
||||
// TStdClass
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
TStdClass = class(TObject)
|
||||
private type
|
||||
TStdInternalClass = class(TObject)
|
||||
private
|
||||
FName: string;
|
||||
FId: integer;
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure CopyTo(Dest: TStdInternalClass);
|
||||
|
||||
property Name: string read FName write FName;
|
||||
property Id: integer read FId write FId;
|
||||
end;
|
||||
|
||||
private
|
||||
FId: integer;
|
||||
FValue: string;
|
||||
|
||||
class var FInstCnt: integer;
|
||||
|
||||
class function Init(Cnt: integer): boolean;
|
||||
class function DeInit(Cnt: integer): boolean;
|
||||
class function ToType<X: class, constructor>(const Value: string): X;
|
||||
|
||||
procedure SetValue(const Value: string);
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
function Convert<X: class, constructor>(const Value: string): X;
|
||||
|
||||
class property InstCnt: integer read FInstCnt;
|
||||
|
||||
property PropId: integer read FId write FId;
|
||||
property PropValue: string read FValue write SetValue;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TGenericClass<T>
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
TGenericClass<T> = class(TObject)
|
||||
private type
|
||||
TGenericInternalClass<I, K> = class(TObject)
|
||||
strict private
|
||||
FName: string;
|
||||
FId: I;
|
||||
FValue: K;
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure CopyTo<J>(Dest: TGenericInternalClass<I, K>);
|
||||
|
||||
property Name: string read FName write FName;
|
||||
property Id: I read FId write FId;
|
||||
property Value: K read FValue write FValue;
|
||||
end;
|
||||
|
||||
strict private
|
||||
FId: integer;
|
||||
FValue: T;
|
||||
|
||||
class var FInstCnt: integer;
|
||||
|
||||
class function Init<I>(Cnt: integer): boolean;
|
||||
class function DeInit(Cnt: integer): boolean;
|
||||
|
||||
procedure SetValue(const Value: T);
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
class property InstCnt: integer read FInstCnt;
|
||||
|
||||
property PropId: integer read FId write FId;
|
||||
property PropValue: T read FValue write SetValue;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
||||
type
|
||||
// -----------------------------------------------------------------------------
|
||||
// TEnum
|
||||
// -----------------------------------------------------------------------------
|
||||
TEnum = (enMember1, enMember2, enMember3);
|
||||
|
||||
TEnumHelper = record helper for TEnum
|
||||
public
|
||||
function ToString: string;
|
||||
class function FromString(const AString: string): TEnum; static;
|
||||
end;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TStdClassHelper
|
||||
// -----------------------------------------------------------------------------
|
||||
TStdClassHelper = class helper for TStdClass
|
||||
public
|
||||
function AsString: string;
|
||||
class function FromString(const AString: string): TStdClass; static;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Free routines declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
procedure FreeProc1(AParam: integer);
|
||||
|
||||
function FreeFunc2(const AParam: string): integer; inline;
|
||||
procedure FreeProc2(AParam: integer);
|
||||
|
||||
{function UnusedFreeFunc1(ANum: double): cardinal;}
|
||||
|
||||
procedure FreeProc3(AParam: integer); overload; inline;
|
||||
procedure FreeProc3(AParam: string); overload; inline;
|
||||
|
||||
(*
|
||||
function UnusedFreeFunc2(ANum: double): cardinal;
|
||||
function UnusedFreeFunc3(ANum: double): cardinal;
|
||||
*)
|
||||
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{R *.dfm}
|
||||
|
||||
|
||||
type
|
||||
// -----------------------------------------------------------------------------
|
||||
// Internal classes
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
TInternalClass = class(TObject)
|
||||
public
|
||||
function Init(Cnt: integer): boolean;
|
||||
procedure SetValue(Cnt: integer);
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Free routines
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
{ Free function 3, forward declaration}
|
||||
|
||||
function FreeFunc3(const Param: integer): integer; forward;
|
||||
|
||||
|
||||
|
||||
{ Free function 1, definition }
|
||||
|
||||
function FreeFunc1(const Param: integer): integer;
|
||||
begin
|
||||
//
|
||||
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Free procedure 1, definition }
|
||||
|
||||
procedure FreeProc1(AParam: integer);
|
||||
begin
|
||||
// Do something
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Free function 2, definition }
|
||||
|
||||
function FreeFunc2(const AParam: string): integer;
|
||||
begin
|
||||
// Do something
|
||||
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
// Unused free function 1, definition
|
||||
|
||||
function UnusedFreeFunc1(ANum: double): cardinal;
|
||||
begin
|
||||
// Do something
|
||||
|
||||
Result := 0;
|
||||
end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
{ Free procedure 2, definition }
|
||||
procedure FreeProc2(AParam: integer);
|
||||
begin
|
||||
// Do something
|
||||
end;
|
||||
|
||||
|
||||
|
||||
(*
|
||||
// Unused free function 2, definition
|
||||
|
||||
function UnusedFreeFunc2(ANum: double): cardinal;
|
||||
begin
|
||||
// Do something
|
||||
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Unused free function 3, definition }
|
||||
|
||||
function UnusedFreeFunc3(ANum: double): cardinal;
|
||||
begin
|
||||
// Do something
|
||||
|
||||
Result := 0;
|
||||
end;
|
||||
*)
|
||||
|
||||
|
||||
|
||||
{ Free procedure 3 (overloaded), definition }
|
||||
|
||||
procedure FreeProc3(AParam: integer);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure FreeProc3(AParam: string);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Free procedure 4, forward declaration}
|
||||
|
||||
procedure FreeProc4(const Param: integer); forward;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TStdClass
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
constructor TStdClass.Create;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
Init(Succ(InstCnt));
|
||||
end;
|
||||
|
||||
|
||||
destructor TStdClass.Destroy;
|
||||
begin
|
||||
DeInit(Pred(InstCnt));
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
class function TStdClass.Init(Cnt: integer): boolean;
|
||||
begin
|
||||
FInstCnt := Cnt;
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
||||
class function TStdClass.DeInit(Cnt: integer): boolean;
|
||||
begin
|
||||
FInstCnt := Cnt;
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
||||
class function TStdClass.ToType<X>(const Value: string): X;
|
||||
begin
|
||||
Result := X.Create;
|
||||
end;
|
||||
|
||||
|
||||
procedure TStdClass.SetValue(const Value: string);
|
||||
begin
|
||||
FValue := Value;
|
||||
end;
|
||||
|
||||
|
||||
function TStdClass.Convert<X>(const Value: string): X;
|
||||
begin
|
||||
Result := ToType<X>(Value);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TStdClass.TStdInternalClass
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
constructor TStdClass.TStdInternalClass.Create;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
destructor TStdClass.TStdInternalClass.Destroy;
|
||||
begin
|
||||
//
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TStdClass.TStdInternalClass.CopyTo(Dest: TStdInternalClass);
|
||||
begin
|
||||
Dest.Name := Name;
|
||||
Dest.Id := Id;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Free routines
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
{ Free function 3 with internal procedure, definition }
|
||||
|
||||
function FreeFunc3(const Param: integer): integer;
|
||||
|
||||
procedure InternalProc1(const Param: integer);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
begin
|
||||
//
|
||||
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Free procedure 4 with internal function, definition }
|
||||
|
||||
procedure FreeProc4(const Param: integer);
|
||||
|
||||
function InternalFunc1(const Param: integer): string;
|
||||
begin
|
||||
//
|
||||
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Free procedure 5 with internal procedure preceeded by a comment, declaration & definition }
|
||||
|
||||
procedure FreeProc5;
|
||||
|
||||
// Internal routine
|
||||
procedure InternalProc2;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ Free procedure 6 (inline), declaration & definition }
|
||||
|
||||
procedure FreeProc6; inline;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TGenericClass<T>
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
constructor TGenericClass<T>.Create;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
Init<string>(Succ(InstCnt));
|
||||
end;
|
||||
|
||||
|
||||
destructor TGenericClass<T>.Destroy;
|
||||
begin
|
||||
DeInit(Pred(InstCnt));
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
// This is a class function
|
||||
class function TGenericClass<T>.Init<I>(Cnt: integer): boolean;
|
||||
begin
|
||||
FInstCnt := Cnt;
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
||||
// This is a class function
|
||||
class function TGenericClass<T>.DeInit(Cnt: integer): boolean;
|
||||
begin
|
||||
FInstCnt := Cnt;
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
||||
procedure TGenericClass<T>.SetValue(const Value: T);
|
||||
begin
|
||||
FValue := Value;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TGenericClass<T>.TGenericInternalClass<I, K>
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
constructor TGenericClass<T>.TGenericInternalClass<I, K>.Create;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
FName := '';
|
||||
FId := Default(I);
|
||||
FValue := Default(K);
|
||||
end;
|
||||
|
||||
|
||||
destructor TGenericClass<T>.TGenericInternalClass<I, K>.Destroy;
|
||||
begin
|
||||
//
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TGenericClass<T>.TGenericInternalClass<I, K>.CopyTo<J>(Dest: TGenericInternalClass<I, K>);
|
||||
begin
|
||||
Dest.Name := Name;
|
||||
Dest.Id := Id;
|
||||
Dest.Value := Value;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TInternalClass
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function TInternalClass.Init(Cnt: integer): boolean;
|
||||
begin
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
||||
procedure TInternalClass.SetValue(Cnt: integer);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TEnumHelper
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function TEnumHelper.ToString: string;
|
||||
begin
|
||||
case Self of
|
||||
enMember2: Result := 'Member 2';
|
||||
enMember3: Result := 'Member 3';
|
||||
else Result := 'Unknown';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
class function TEnumHelper.FromString(const AString: string): TEnum;
|
||||
begin
|
||||
if SameText(AString, 'Member 2') then
|
||||
Result := enMember2
|
||||
|
||||
else if SameText(AString, 'Member 3') then
|
||||
Result := enMember3
|
||||
|
||||
else
|
||||
Result := enMember1;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// TStdClassHelper
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function TStdClassHelper.AsString: string;
|
||||
begin
|
||||
Result := 'TStdClass instance';
|
||||
end;
|
||||
|
||||
|
||||
class function TStdClassHelper.FromString(const AString: string): TStdClass;
|
||||
begin
|
||||
Result := TStdClass.Create.Convert<TStdClass>(AString);
|
||||
end;
|
||||
|
||||
|
||||
end.
|
@ -1 +0,0 @@
|
||||
{"leaves":["FreeFunc1","FreeProc1","FreeFunc2","FreeProc2","FreeProc3","FreeProc3","FreeFunc3","InternalProc1","FreeProc4","InternalFunc1","FreeProc5","InternalProc2","FreeProc6"],"nodes":[{"leaves":["Create","Destroy","Init","DeInit","ToType<X>","SetValue","Convert<X>"],"name":"TStdClass"},{"leaves":["Create","Destroy","CopyTo"],"name":"TStdClass.TStdInternalClass"},{"leaves":["Create","Destroy","Init<I>","DeInit","SetValue"],"name":"TGenericClass<T>"},{"leaves":["Create","Destroy","CopyTo<J>"],"name":"TGenericClass<T>.TGenericInternalClass<I, K>"},{"leaves":["Init","SetValue"],"name":"TInternalClass"},{"leaves":["ToString","FromString"],"name":"TEnumHelper"},{"leaves":["AsString","FromString"],"name":"TStdClassHelper"}],"root":"unitTest"}
|
@ -1,304 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# pltags - create a tags file for Perl code, for use by vi(m)
|
||||
#
|
||||
# Distributed with Vim <http://www.vim.org/>, latest version always available
|
||||
# at <http://www.mscha.com/mscha.html?pltags#tools>
|
||||
#
|
||||
# Version 2.3, 28 February 2002
|
||||
#
|
||||
# Written by Michael Schaap <pltags@mscha.com>. Suggestions for improvement
|
||||
# are very welcome!
|
||||
#
|
||||
# This script will not work with Perl 4 or below!
|
||||
#
|
||||
# Revision history:
|
||||
# 1.0 1997? Original version, quickly hacked together
|
||||
# 2.0 1999? Completely rewritten, better structured and documented,
|
||||
# support for variables, packages, Exuberant Ctags extensions
|
||||
# 2.1 Jun 2000 Fixed critical bug (typo in comment) ;-)
|
||||
# Support multiple level packages (e.g. Archive::Zip::Member)
|
||||
# 2.2 Jul 2001 'Glob' wildcards - especially useful under Windows
|
||||
# (thanks to Serge Sivkov and Jason King)
|
||||
# Bug fix: reset package name for each file
|
||||
# 2.21 Jul 2001 Oops... bug in variable detection (/local../ -> /^local.../)
|
||||
# 2.3 Feb 2002 Support variables declared with "our"
|
||||
# (thanks to Lutz Mende)
|
||||
|
||||
# Complain about undeclared variables
|
||||
use strict;
|
||||
|
||||
# Used modules
|
||||
use Getopt::Long;
|
||||
|
||||
# Options with their defaults
|
||||
my $do_subs = 1; # --subs, --nosubs include subs in tags file?
|
||||
my $do_vars = 1; # --vars, --novars include variables in tags file?
|
||||
my $do_pkgs = 1; # --pkgs, --nopkgs include packages in tags file?
|
||||
my $do_exts = 1; # --extensions, --noextensions
|
||||
# include Exuberant Ctags extensions
|
||||
|
||||
# Global variables
|
||||
my $VERSION = "2.21"; # pltags version
|
||||
my $status = 0; # GetOptions return value
|
||||
my $file = ""; # File being processed
|
||||
my @tags = (); # List of produced tags
|
||||
my $is_pkg = 0; # Are we tagging a package?
|
||||
my $has_subs = 0; # Has this file any subs yet?
|
||||
my $package_name = ""; # Name of current package
|
||||
my $var_continues = 0; # Variable declaration continues on last line
|
||||
my $line = ""; # Current line in file
|
||||
my $stmt = ""; # Current Perl statement
|
||||
my @vars = (); # List of variables in declaration
|
||||
my $var = ""; # Variable in declaration
|
||||
my $tagline = ""; # Tag file line
|
||||
|
||||
# Create a tag file line and push it on the list of found tags
|
||||
sub MakeTag($$$$$)
|
||||
{
|
||||
my ($tag, # Tag name
|
||||
$type, # Type of tag
|
||||
$is_static, # Is this a static tag?
|
||||
$file, # File in which tag appears
|
||||
$line) = @_; # Line in which tag appears
|
||||
|
||||
my $tagline = ""; # Created tag line
|
||||
|
||||
# Only process tag if not empty
|
||||
if ($tag)
|
||||
{
|
||||
# Get rid of \n, and escape / and \ in line
|
||||
chomp $line;
|
||||
$line =~ s/\\/\\\\/g;
|
||||
$line =~ s/\//\\\//g;
|
||||
|
||||
# Create a tag line
|
||||
$tagline = "$tag\t$file\t/^$line\$/";
|
||||
|
||||
# If we're told to do so, add extensions
|
||||
if ($do_exts)
|
||||
{
|
||||
$tagline .= ";\"\t$type"
|
||||
. ($is_static ? "\tfile:" : "")
|
||||
. ($package_name ? "\tclass:$package_name" : "");
|
||||
}
|
||||
|
||||
# Push it on the stack
|
||||
push (@tags, $tagline);
|
||||
}
|
||||
}
|
||||
|
||||
# Parse package name from statement
|
||||
sub PackageName($)
|
||||
{
|
||||
my ($stmt) = @_; # Statement
|
||||
|
||||
# Look for the argument to "package". Return it if found, else return ""
|
||||
if ($stmt =~ /^package\s+([\w:]+)/)
|
||||
{
|
||||
my $pkgname = $1;
|
||||
|
||||
# Remove any parent package name(s)
|
||||
$pkgname =~ s/.*://;
|
||||
return $pkgname;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
# Parse sub name from statement
|
||||
sub SubName($)
|
||||
{
|
||||
my ($stmt) = @_; # Statement
|
||||
|
||||
# Look for the argument to "sub". Return it if found, else return ""
|
||||
if ($stmt =~ /^sub\s+([\w:]+)/)
|
||||
{
|
||||
my $subname = $1;
|
||||
|
||||
# Remove any parent package name(s)
|
||||
$subname =~ s/.*://;
|
||||
return $subname;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
# Parse all variable names from statement
|
||||
sub VarNames($)
|
||||
{
|
||||
my ($stmt) = @_;
|
||||
|
||||
# Remove my or local from statement, if present
|
||||
$stmt =~ s/^(my|our|local)\s+//;
|
||||
|
||||
# Remove any assignment piece
|
||||
$stmt =~ s/\s*=.*//;
|
||||
|
||||
# Now find all variable names, i.e. "words" preceded by $, @ or %
|
||||
@vars = ($stmt =~ /[\$\@\%]([\w:]+)\b/g);
|
||||
|
||||
# Remove any parent package name(s)
|
||||
map(s/.*://, @vars);
|
||||
|
||||
return (@vars);
|
||||
}
|
||||
|
||||
sub functionNoParentheses {
|
||||
return 1
|
||||
}
|
||||
|
||||
############### Start ###############
|
||||
|
||||
print "\npltags $VERSION by Michael Schaap <mscha\@mscha.com>\n\n";
|
||||
|
||||
# Get options
|
||||
$status = GetOptions("subs!" => \$do_subs,
|
||||
"vars!" => \$do_vars,
|
||||
"pkgs!" => \$do_pkgs,
|
||||
"extensions!" => \$do_exts);
|
||||
|
||||
# Usage if error in options or no arguments given
|
||||
unless ($status && @ARGV)
|
||||
{
|
||||
print "\n" unless ($status);
|
||||
print " Usage: $0 [options] filename ...\n\n";
|
||||
print " Where options can be:\n";
|
||||
print " --subs (--nosubs) (don't) include sub declarations in tag file\n";
|
||||
print " --vars (--novars) (don't) include variable declarations in tag file\n";
|
||||
print " --pkgs (--nopkgs) (don't) include package declarations in tag file\n";
|
||||
print " --extensions (--noextensions)\n";
|
||||
print " (don't) include Exuberant Ctags / Vim style\n";
|
||||
print " extensions in tag file\n\n";
|
||||
print " Default options: ";
|
||||
print ($do_subs ? "--subs " : "--nosubs ");
|
||||
print ($do_vars ? "--vars " : "--novars ");
|
||||
print ($do_pkgs ? "--pkgs " : "--nopkgs ");
|
||||
print ($do_exts ? "--extensions\n\n" : "--noextensions\n\n");
|
||||
print " Example: $0 *.pl *.pm ../shared/*.pm\n\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
# Loop through files on command line - 'glob' any wildcards, since Windows
|
||||
# doesn't do this for us
|
||||
foreach $file (map { glob } @ARGV)
|
||||
{
|
||||
# Skip if this is not a file we can open. Also skip tags files and backup
|
||||
# files
|
||||
next unless ((-f $file) && (-r $file) && ($file !~ /tags$/)
|
||||
&& ($file !~ /~$/));
|
||||
|
||||
print "Tagging file $file...\n";
|
||||
|
||||
$is_pkg = 0;
|
||||
$package_name = "";
|
||||
$has_subs = 0;
|
||||
$var_continues = 0;
|
||||
|
||||
open (IN, $file) or die "Can't open file '$file': $!";
|
||||
|
||||
# Loop through file
|
||||
foreach $line (<IN>)
|
||||
{
|
||||
# Statement is line with comments and whitespace trimmed
|
||||
($stmt = $line) =~ s/#.*//;
|
||||
$stmt =~ s/^\s*//;
|
||||
$stmt =~ s/\s*$//;
|
||||
|
||||
# Nothing left? Never mind.
|
||||
next unless ($stmt);
|
||||
|
||||
# This is a variable declaration if one was started on the previous
|
||||
# line, or if this line starts with my or local
|
||||
if ($var_continues or ($stmt =~/^my\b/)
|
||||
or ($stmt =~/^our\b/) or ($stmt =~/^local\b/))
|
||||
{
|
||||
# The declaration continues if the line does not end with ;
|
||||
$var_continues = ($stmt !~ /;$/);
|
||||
|
||||
# Loop through all variable names in the declaration
|
||||
foreach $var (VarNames($stmt))
|
||||
{
|
||||
# Make a tag for this variable unless we're told not to. We
|
||||
# assume that a variable is always static, unless it appears
|
||||
# in a package before any sub. (Not necessarily true, but
|
||||
# it's ok for most purposes and Vim works fine even if it is
|
||||
# incorrect)
|
||||
if ($do_vars)
|
||||
{
|
||||
MakeTag($var, "v", (!$is_pkg or $has_subs), $file, $line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# This is a package declaration if the line starts with package
|
||||
elsif ($stmt =~/^package\b/)
|
||||
{
|
||||
# Get name of the package
|
||||
$package_name = PackageName($stmt);
|
||||
|
||||
if ($package_name)
|
||||
{
|
||||
# Remember that we're doing a package
|
||||
$is_pkg = 1;
|
||||
|
||||
# Make a tag for this package unless we're told not to. A
|
||||
# package is never static.
|
||||
if ($do_pkgs)
|
||||
{
|
||||
MakeTag($package_name, "p", 0, $file, $line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# This is a sub declaration if the line starts with sub
|
||||
elsif ($stmt =~/^sub\b/)
|
||||
{
|
||||
# Remember that this file has subs
|
||||
$has_subs = 1;
|
||||
|
||||
# Make a tag for this sub unless we're told not to. We assume
|
||||
# that a sub is static, unless it appears in a package. (Not
|
||||
# necessarily true, but it's ok for most purposes and Vim works
|
||||
# fine even if it is incorrect)
|
||||
if ($do_subs)
|
||||
{
|
||||
MakeTag(SubName($stmt), "s", (!$is_pkg), $file, $line);
|
||||
}
|
||||
}
|
||||
}
|
||||
close (IN);
|
||||
}
|
||||
|
||||
# Do we have any tags? If so, write them to the tags file
|
||||
if (@tags)
|
||||
{
|
||||
# Add some tag file extensions if we're told to
|
||||
if ($do_exts)
|
||||
{
|
||||
push (@tags, "!_TAG_FILE_FORMAT\t2\t/extended format/");
|
||||
push (@tags, "!_TAG_FILE_SORTED\t1\t/0=unsorted, 1=sorted/");
|
||||
push (@tags, "!_TAG_PROGRAM_AUTHOR\tMichael Schaap\t/mscha\@mscha.com/");
|
||||
push (@tags, "!_TAG_PROGRAM_NAME\tpltags\t//");
|
||||
push (@tags, "!_TAG_PROGRAM_VERSION\t$VERSION\t/supports multiple tags and extended format/");
|
||||
}
|
||||
|
||||
print "\nWriting tags file.\n";
|
||||
|
||||
open (OUT, ">tags") or die "Can't open tags file: $!";
|
||||
|
||||
foreach $tagline (sort @tags)
|
||||
{
|
||||
print OUT "$tagline\n";
|
||||
}
|
||||
|
||||
close (OUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
print "\nNo tags found.\n";
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"leaves":["MakeTag","PackageName","SubName","VarNames","functionNoParentheses"],"root":"unitTest"}
|
@ -1,125 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
************************************************************************
|
||||
Copyright [2014] [PagSeguro Internet Ltda.]
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
************************************************************************
|
||||
*/
|
||||
require_once "../PagSeguroLibrary/PagSeguroLibrary.php";
|
||||
|
||||
function for123(){
|
||||
alert 'nothing';
|
||||
}
|
||||
|
||||
abstract class PageGrille extends PageMotsBleus{
|
||||
abstract function GetTypeGrille() ; // blabla blabla
|
||||
abstract function GetGrilleJSON($p_grilleId); // Retourn JSON
|
||||
|
||||
function CleanStr($pStr){
|
||||
return str_replace ( "\\" , "" , $pStr);
|
||||
}
|
||||
|
||||
function GetJavascriptMajax() { /* a block comment */
|
||||
return "ABC";
|
||||
}
|
||||
/*
|
||||
function commentedFunc1() {
|
||||
return "commented 1";
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function stringContainAsterisk_test1(){
|
||||
$target = '/path/to/files/*';
|
||||
}
|
||||
|
||||
/*function commentedFunc2(){
|
||||
return "commented 2";
|
||||
}*/
|
||||
|
||||
function stringContainAsterisk_test2(){
|
||||
$target = '/path/to/files/*.jpg';
|
||||
}
|
||||
|
||||
class NotificationListener
|
||||
{
|
||||
public static function main()
|
||||
{
|
||||
$code = (isset($_POST['notificationCode']) && trim($_POST['notificationCode']) !== "" ?
|
||||
trim($_POST['notificationCode']) : null);
|
||||
$type = (isset($_POST['notificationType']) && trim($_POST['notificationType']) !== "" ?
|
||||
trim($_POST['notificationType']) : null);
|
||||
if ($code && $type) {
|
||||
$notificationType = new PagSeguroNotificationType($type);
|
||||
$strType = $notificationType->getTypeFromValue();
|
||||
switch ($strType) {
|
||||
case 'TRANSACTION':
|
||||
self::transactionNotification($code);
|
||||
break;
|
||||
case 'APPLICATION_AUTHORIZATION':
|
||||
self::authorizationNotification($code);
|
||||
break;
|
||||
case 'PRE_APPROVAL':
|
||||
self::preApprovalNotification($code);
|
||||
break;
|
||||
default:
|
||||
LogPagSeguro::error("Unknown notification type [" . $notificationType->getValue() . "]");
|
||||
}
|
||||
self::printLog($strType);
|
||||
} else {
|
||||
LogPagSeguro::error("Invalid notification parameters.");
|
||||
self::printLog();
|
||||
}
|
||||
}
|
||||
private static function transactionNotification($notificationCode)
|
||||
{
|
||||
$credentials = PagSeguroConfig::getAccountCredentials();
|
||||
try {
|
||||
$transaction = PagSeguroNotificationService::checkTransaction($credentials, $notificationCode);
|
||||
// Do something with $transaction
|
||||
} catch (PagSeguroServiceException $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
}
|
||||
private static function authorizationNotification($notificationCode)
|
||||
{
|
||||
$credentials = PagSeguroConfig::getApplicationCredentials();
|
||||
try {
|
||||
$authorization = PagSeguroNotificationService::checkAuthorization($credentials, $notificationCode);
|
||||
// Do something with $authorization
|
||||
} catch (PagSeguroServiceException $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
}
|
||||
private static function preApprovalNotification($preApprovalCode)
|
||||
{
|
||||
$credentials = PagSeguroConfig::getAccountCredentials();
|
||||
try {
|
||||
$preApproval = PagSeguroNotificationService::checkPreApproval($credentials, $preApprovalCode);
|
||||
// Do something with $preApproval
|
||||
|
||||
} catch (PagSeguroServiceException $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
}
|
||||
private static function printLog($strType = null)
|
||||
{
|
||||
$count = 4;
|
||||
echo "<h2>Receive notifications</h2>";
|
||||
if ($strType) {
|
||||
echo "<h4>notifcationType: $strType</h4>";
|
||||
}
|
||||
echo "<p>Last <strong>$count</strong> items in <strong>log file:</strong></p><hr>";
|
||||
echo LogPagSeguro::getHtml($count);
|
||||
}
|
||||
}
|
||||
|
||||
NotificationListener::main();
|
@ -1 +0,0 @@
|
||||
{"leaves":["for123()","stringContainAsterisk_test1()","stringContainAsterisk_test2()"],"nodes":[{"leaves":["GetTypeGrille","GetGrilleJSON","CleanStr","GetJavascriptMajax"],"name":"PageGrille"},{"leaves":["main","transactionNotification","authorizationNotification","preApprovalNotification","printLog"],"name":"NotificationListener"}],"root":"unitTest"}
|
@ -1,328 +0,0 @@
|
||||
#
|
||||
# PowerConsole profile
|
||||
#
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Clear the host content.
|
||||
|
||||
.DESCRIPTION
|
||||
This function replaces the standard Clear-Host and is aliased by "cls".
|
||||
#>
|
||||
function Clear-Host
|
||||
{
|
||||
$host.PrivateData.ClearHost()
|
||||
}
|
||||
|
||||
<#
|
||||
function Commented-Func
|
||||
{
|
||||
return $s
|
||||
}
|
||||
#>
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Simple path completion function for PowerConsole.
|
||||
#>
|
||||
function _TabExpansionPath($line)
|
||||
{
|
||||
function UnquoteString($s) {
|
||||
if ($s.StartsWith('"') -or $s.StartsWith("'")) {
|
||||
$s = $s.Substring(1)
|
||||
}
|
||||
if ($s.EndsWith('"') -or $s.EndsWith("'")) {
|
||||
$s = $s.Substring(0, $s.Length - 1)
|
||||
}
|
||||
return $s
|
||||
}
|
||||
|
||||
$e = $null
|
||||
$tokens = @([System.Management.Automation.PSParser]::Tokenize($line, [ref]$e))
|
||||
$lastToken = $tokens | Select-Object -Last 1
|
||||
|
||||
$replaceStart = -1
|
||||
$lastWord = $null
|
||||
|
||||
if ($lastToken -and ($lastToken.EndColumn -gt $line.Length)) {
|
||||
#Last token is terminated
|
||||
|
||||
if ($tokens.Length -gt 1) {
|
||||
$prevToken = $tokens[$tokens.Length - 2]
|
||||
if ($prevToken.EndColumn -eq $lastToken.StartColumn) {
|
||||
$replaceStart = $prevToken.StartColumn - 1
|
||||
$lastWord = (UnquoteString $prevToken.Content) + (UnquoteString $lastToken.Content)
|
||||
}
|
||||
}
|
||||
|
||||
if ($replaceStart -lt 0) {
|
||||
$replaceStart = $lastToken.StartColumn - 1
|
||||
$lastWord = UnquoteString $lastToken.Content
|
||||
}
|
||||
} else {
|
||||
#There is unrecognized/unterminated words
|
||||
|
||||
if(!$lastToken) {
|
||||
$lastWord = $line
|
||||
} else {
|
||||
$lastWord = $line.Substring($lastToken.EndColumn - 1).TrimStart()
|
||||
}
|
||||
$replaceStart = $line.Length - $lastWord.Length
|
||||
$lastWord = UnquoteString $lastWord
|
||||
}
|
||||
|
||||
# If previously unquoted, put back quote in results
|
||||
$unquoted = ($replaceStart -lt ($line.Length - $lastWord.Length))
|
||||
$relative = !(($lastWord.IndexOf(':') -ge 0) -or $lastWord.StartsWith('/') -or $lastWord.StartsWith('\'))
|
||||
|
||||
$result = "" | select ReplaceStart, Paths
|
||||
$result.ReplaceStart = $replaceStart
|
||||
$result.Paths = @(Resolve-Path ${lastWord}* -ErrorAction SilentlyContinue -Relative:$relative | %{
|
||||
|
||||
# Resolve-Path may return PathInfo or String (e.g. when passing different -Relative)
|
||||
$path = $_.ToString()
|
||||
|
||||
if ($unquoted -or ($path.IndexOf(' ') -ge 0)) {
|
||||
"'$path'"
|
||||
} else {
|
||||
$path
|
||||
}
|
||||
})
|
||||
|
||||
$result
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Get an explict interface on an object so that you can invoke the interface members.
|
||||
|
||||
.DESCRIPTION
|
||||
PowerShell object adapter does not provide explict interface members. For COM objects
|
||||
it only makes IDispatch members available.
|
||||
|
||||
This function helps access interface members on an object through reflection. A new
|
||||
object is returned with the interface members as ScriptProperties and ScriptMethods.
|
||||
|
||||
.EXAMPLE
|
||||
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
|
||||
#>
|
||||
function Get-Interface
|
||||
{
|
||||
Param(
|
||||
$Object,
|
||||
[type]$InterfaceType
|
||||
)
|
||||
|
||||
[NuGetConsole.Host.PowerShell.Implementation.PSTypeWrapper]::GetInterface($Object, $InterfaceType)
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Get a VS service.
|
||||
|
||||
.EXAMPLE
|
||||
Get-VSService ([Microsoft.VisualStudio.Shell.Interop.SVsShell]) ([Microsoft.VisualStudio.Shell.Interop.IVsShell])
|
||||
#>
|
||||
function Get-VSService
|
||||
{
|
||||
Param(
|
||||
[type]$ServiceType,
|
||||
[type]$InterfaceType
|
||||
)
|
||||
|
||||
$service = [Microsoft.VisualStudio.Shell.Package]::GetGlobalService($ServiceType)
|
||||
if ($service -and $InterfaceType) {
|
||||
$service = Get-Interface $service $InterfaceType
|
||||
}
|
||||
|
||||
$service
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Get VS IComponentModel service to access VS MEF hosting.
|
||||
#>
|
||||
function Get-VSComponentModel
|
||||
{
|
||||
Get-VSService ([Microsoft.VisualStudio.ComponentModelHost.SComponentModel]) ([Microsoft.VisualStudio.ComponentModelHost.IComponentModel])
|
||||
}
|
||||
|
||||
# Set initial directory
|
||||
Set-Location "$env:USERPROFILE"
|
||||
|
||||
# For PowerShell v2, we need to create a reference to the default TabExpansion function
|
||||
# so we can delegate back to it in our custom function. This isn't needed in PowerShell v3,
|
||||
# as omitting output in a custom TabExpansion function signals to TabExpansion2 that it
|
||||
# should use its own completion list.
|
||||
if ((Test-Path Function:\DefaultTabExpansion) -eq $false -and (Test-Path Function:\TabExpansion)) {
|
||||
Rename-Item Function:\TabExpansion DefaultTabExpansion
|
||||
}
|
||||
|
||||
function TabExpansion([string]$line, [string]$lastWord) {
|
||||
$nugetSuggestions = & (Get-Module NuGet) NuGetTabExpansion $line $lastWord
|
||||
|
||||
if ($nugetSuggestions.NoResult) {
|
||||
# We only want to delegate back to the default tab completion in PowerShell v2.
|
||||
# PowerShell v3's TabExpansion2 will use its own command completion list if the
|
||||
# custom TabExpansion doesn't return anything.
|
||||
if (Test-Path Function:\DefaultTabExpansion) {
|
||||
$line = $line.ToUpperInvariant()
|
||||
$lastWord = $lastWord.ToUpperInvariant()
|
||||
return DefaultTabExpansion $line $lastWord
|
||||
}
|
||||
}
|
||||
else {
|
||||
return $nugetSuggestions
|
||||
}
|
||||
}
|
||||
|
||||
# default prompt
|
||||
function prompt {
|
||||
"PM>"
|
||||
}
|
||||
|
||||
# SIG # Begin signature block
|
||||
# MIIavQYJKoZIhvcNAQcCoIIarjCCGqoCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
|
||||
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
|
||||
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUzrybryeGjFQ1ndAZPspjCdvf
|
||||
# ahSgghWCMIIEwzCCA6ugAwIBAgITMwAAAG9lLVhtBxFGKAAAAAAAbzANBgkqhkiG
|
||||
# 9w0BAQUFADB3MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4G
|
||||
# A1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEw
|
||||
# HwYDVQQDExhNaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTUwMzIwMTczMjAy
|
||||
# WhcNMTYwNjIwMTczMjAyWjCBszELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp
|
||||
# bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
|
||||
# b3JhdGlvbjENMAsGA1UECxMETU9QUjEnMCUGA1UECxMebkNpcGhlciBEU0UgRVNO
|
||||
# OkMwRjQtMzA4Ni1ERUY4MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT
|
||||
# ZXJ2aWNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+ZtzcEqza6o
|
||||
# XtiVTy0DQ0dzO7hC0tBXmt32UzZ31YhFJGrIq9Bm6YvFqg+e8oNGtirJ2DbG9KD/
|
||||
# EW9m8F4UGbKxZ/jxXpSGqo4lr/g1E/2CL8c4XlPAdhzF03k7sGPrT5OaBfCiF3Hc
|
||||
# xgyW0wAFLkxtWLN/tCwkcHuWaSxsingJbUmZjjo+ZpWPT394G2B7V8lR9EttUcM0
|
||||
# t/g6CtYR38M6pR6gONzrrar4Q8SDmo2XNAM0BBrvrVQ2pNQaLP3DbvB45ynxuUTA
|
||||
# cbQvxBCLDPc2Ynn9B1d96gV8TJ9OMD8nUDhmBrtdqD7FkNvfPHZWrZUgNFNy7WlZ
|
||||
# bvBUH0DVOQIDAQABo4IBCTCCAQUwHQYDVR0OBBYEFPKmSSl4fFdwUmLP7ay3eyA0
|
||||
# R9z9MB8GA1UdIwQYMBaAFCM0+NlSRnAK7UD7dvuzK7DDNbMPMFQGA1UdHwRNMEsw
|
||||
# SaBHoEWGQ2h0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3Rz
|
||||
# L01pY3Jvc29mdFRpbWVTdGFtcFBDQS5jcmwwWAYIKwYBBQUHAQEETDBKMEgGCCsG
|
||||
# AQUFBzAChjxodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY3Jv
|
||||
# c29mdFRpbWVTdGFtcFBDQS5jcnQwEwYDVR0lBAwwCgYIKwYBBQUHAwgwDQYJKoZI
|
||||
# hvcNAQEFBQADggEBAI2zTLbY7A2Hhhle5ADnl7jVz0wKPL33VdP08KCvVXKcI5e5
|
||||
# girHFgrFJxNZ0NowK4hCulID5l7JJWgnJ41kp235t5pqqz6sQtAeJCbMVK/2kIFr
|
||||
# Hq1Dnxt7EFdqMjYxokRoAZhaKxK0iTH2TAyuFTy3JCRdu/98U0yExA3NRnd+Kcqf
|
||||
# skZigrQ0x/USaVytec0x7ulHjvj8U/PkApBRa876neOFv1mAWRDVZ6NMpvLkoLTY
|
||||
# wTqhakimiM5w9qmc3vNTkz1wcQD/vut8/P8IYw9LUVmrFRmQdB7/u72qNZs9nvMQ
|
||||
# FNV69h/W4nXzknQNrRbZEs+hm63SEuoAOyMVDM8wggTsMIID1KADAgECAhMzAAAB
|
||||
# Cix5rtd5e6asAAEAAAEKMA0GCSqGSIb3DQEBBQUAMHkxCzAJBgNVBAYTAlVTMRMw
|
||||
# EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN
|
||||
# aWNyb3NvZnQgQ29ycG9yYXRpb24xIzAhBgNVBAMTGk1pY3Jvc29mdCBDb2RlIFNp
|
||||
# Z25pbmcgUENBMB4XDTE1MDYwNDE3NDI0NVoXDTE2MDkwNDE3NDI0NVowgYMxCzAJ
|
||||
# BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25k
|
||||
# MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xDTALBgNVBAsTBE1PUFIx
|
||||
# HjAcBgNVBAMTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjCCASIwDQYJKoZIhvcNAQEB
|
||||
# BQADggEPADCCAQoCggEBAJL8bza74QO5KNZG0aJhuqVG+2MWPi75R9LH7O3HmbEm
|
||||
# UXW92swPBhQRpGwZnsBfTVSJ5E1Q2I3NoWGldxOaHKftDXT3p1Z56Cj3U9KxemPg
|
||||
# 9ZSXt+zZR/hsPfMliLO8CsUEp458hUh2HGFGqhnEemKLwcI1qvtYb8VjC5NJMIEb
|
||||
# e99/fE+0R21feByvtveWE1LvudFNOeVz3khOPBSqlw05zItR4VzRO/COZ+owYKlN
|
||||
# Wp1DvdsjusAP10sQnZxN8FGihKrknKc91qPvChhIqPqxTqWYDku/8BTzAMiwSNZb
|
||||
# /jjXiREtBbpDAk8iAJYlrX01boRoqyAYOCj+HKIQsaUCAwEAAaOCAWAwggFcMBMG
|
||||
# A1UdJQQMMAoGCCsGAQUFBwMDMB0GA1UdDgQWBBSJ/gox6ibN5m3HkZG5lIyiGGE3
|
||||
# NDBRBgNVHREESjBIpEYwRDENMAsGA1UECxMETU9QUjEzMDEGA1UEBRMqMzE1OTUr
|
||||
# MDQwNzkzNTAtMTZmYS00YzYwLWI2YmYtOWQyYjFjZDA1OTg0MB8GA1UdIwQYMBaA
|
||||
# FMsR6MrStBZYAck3LjMWFrlMmgofMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9j
|
||||
# cmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY0NvZFNpZ1BDQV8w
|
||||
# OC0zMS0yMDEwLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6
|
||||
# Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljQ29kU2lnUENBXzA4LTMx
|
||||
# LTIwMTAuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQCmqFOR3zsB/mFdBlrrZvAM2PfZ
|
||||
# hNMAUQ4Q0aTRFyjnjDM4K9hDxgOLdeszkvSp4mf9AtulHU5DRV0bSePgTxbwfo/w
|
||||
# iBHKgq2k+6apX/WXYMh7xL98m2ntH4LB8c2OeEti9dcNHNdTEtaWUu81vRmOoECT
|
||||
# oQqlLRacwkZ0COvb9NilSTZUEhFVA7N7FvtH/vto/MBFXOI/Enkzou+Cxd5AGQfu
|
||||
# FcUKm1kFQanQl56BngNb/ErjGi4FrFBHL4z6edgeIPgF+ylrGBT6cgS3C6eaZOwR
|
||||
# XU9FSY0pGi370LYJU180lOAWxLnqczXoV+/h6xbDGMcGszvPYYTitkSJlKOGMIIF
|
||||
# vDCCA6SgAwIBAgIKYTMmGgAAAAAAMTANBgkqhkiG9w0BAQUFADBfMRMwEQYKCZIm
|
||||
# iZPyLGQBGRYDY29tMRkwFwYKCZImiZPyLGQBGRYJbWljcm9zb2Z0MS0wKwYDVQQD
|
||||
# EyRNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTAwODMx
|
||||
# MjIxOTMyWhcNMjAwODMxMjIyOTMyWjB5MQswCQYDVQQGEwJVUzETMBEGA1UECBMK
|
||||
# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
|
||||
# IENvcnBvcmF0aW9uMSMwIQYDVQQDExpNaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBD
|
||||
# QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJyWVwZMGS/HZpgICBC
|
||||
# mXZTbD4b1m/My/Hqa/6XFhDg3zp0gxq3L6Ay7P/ewkJOI9VyANs1VwqJyq4gSfTw
|
||||
# aKxNS42lvXlLcZtHB9r9Jd+ddYjPqnNEf9eB2/O98jakyVxF3K+tPeAoaJcap6Vy
|
||||
# c1bxF5Tk/TWUcqDWdl8ed0WDhTgW0HNbBbpnUo2lsmkv2hkL/pJ0KeJ2L1TdFDBZ
|
||||
# +NKNYv3LyV9GMVC5JxPkQDDPcikQKCLHN049oDI9kM2hOAaFXE5WgigqBTK3S9dP
|
||||
# Y+fSLWLxRT3nrAgA9kahntFbjCZT6HqqSvJGzzc8OJ60d1ylF56NyxGPVjzBrAlf
|
||||
# A9MCAwEAAaOCAV4wggFaMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMsR6MrS
|
||||
# tBZYAck3LjMWFrlMmgofMAsGA1UdDwQEAwIBhjASBgkrBgEEAYI3FQEEBQIDAQAB
|
||||
# MCMGCSsGAQQBgjcVAgQWBBT90TFO0yaKleGYYDuoMW+mPLzYLTAZBgkrBgEEAYI3
|
||||
# FAIEDB4KAFMAdQBiAEMAQTAfBgNVHSMEGDAWgBQOrIJgQFYnl+UlE/wq4QpTlVnk
|
||||
# pDBQBgNVHR8ESTBHMEWgQ6BBhj9odHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtp
|
||||
# L2NybC9wcm9kdWN0cy9taWNyb3NvZnRyb290Y2VydC5jcmwwVAYIKwYBBQUHAQEE
|
||||
# SDBGMEQGCCsGAQUFBzAChjhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL2Nl
|
||||
# cnRzL01pY3Jvc29mdFJvb3RDZXJ0LmNydDANBgkqhkiG9w0BAQUFAAOCAgEAWTk+
|
||||
# fyZGr+tvQLEytWrrDi9uqEn361917Uw7LddDrQv+y+ktMaMjzHxQmIAhXaw9L0y6
|
||||
# oqhWnONwu7i0+Hm1SXL3PupBf8rhDBdpy6WcIC36C1DEVs0t40rSvHDnqA2iA6VW
|
||||
# 4LiKS1fylUKc8fPv7uOGHzQ8uFaa8FMjhSqkghyT4pQHHfLiTviMocroE6WRTsgb
|
||||
# 0o9ylSpxbZsa+BzwU9ZnzCL/XB3Nooy9J7J5Y1ZEolHN+emjWFbdmwJFRC9f9Nqu
|
||||
# 1IIybvyklRPk62nnqaIsvsgrEA5ljpnb9aL6EiYJZTiU8XofSrvR4Vbo0HiWGFzJ
|
||||
# NRZf3ZMdSY4tvq00RBzuEBUaAF3dNVshzpjHCe6FDoxPbQ4TTj18KUicctHzbMrB
|
||||
# 7HCjV5JXfZSNoBtIA1r3z6NnCnSlNu0tLxfI5nI3EvRvsTxngvlSso0zFmUeDord
|
||||
# EN5k9G/ORtTTF+l5xAS00/ss3x+KnqwK+xMnQK3k+eGpf0a7B2BHZWBATrBC7E7t
|
||||
# s3Z52Ao0CW0cgDEf4g5U3eWh++VHEK1kmP9QFi58vwUheuKVQSdpw5OPlcmN2Jsh
|
||||
# rg1cnPCiroZogwxqLbt2awAdlq3yFnv2FoMkuYjPaqhHMS+a3ONxPdcAfmJH0c6I
|
||||
# ybgY+g5yjcGjPa8CQGr/aZuW4hCoELQ3UAjWwz0wggYHMIID76ADAgECAgphFmg0
|
||||
# AAAAAAAcMA0GCSqGSIb3DQEBBQUAMF8xEzARBgoJkiaJk/IsZAEZFgNjb20xGTAX
|
||||
# BgoJkiaJk/IsZAEZFgltaWNyb3NvZnQxLTArBgNVBAMTJE1pY3Jvc29mdCBSb290
|
||||
# IENlcnRpZmljYXRlIEF1dGhvcml0eTAeFw0wNzA0MDMxMjUzMDlaFw0yMTA0MDMx
|
||||
# MzAzMDlaMHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYD
|
||||
# VQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xITAf
|
||||
# BgNVBAMTGE1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQTCCASIwDQYJKoZIhvcNAQEB
|
||||
# BQADggEPADCCAQoCggEBAJ+hbLHf20iSKnxrLhnhveLjxZlRI1Ctzt0YTiQP7tGn
|
||||
# 0UytdDAgEesH1VSVFUmUG0KSrphcMCbaAGvoe73siQcP9w4EmPCJzB/LMySHnfL0
|
||||
# Zxws/HvniB3q506jocEjU8qN+kXPCdBer9CwQgSi+aZsk2fXKNxGU7CG0OUoRi4n
|
||||
# rIZPVVIM5AMs+2qQkDBuh/NZMJ36ftaXs+ghl3740hPzCLdTbVK0RZCfSABKR2YR
|
||||
# JylmqJfk0waBSqL5hKcRRxQJgp+E7VV4/gGaHVAIhQAQMEbtt94jRrvELVSfrx54
|
||||
# QTF3zJvfO4OToWECtR0Nsfz3m7IBziJLVP/5BcPCIAsCAwEAAaOCAaswggGnMA8G
|
||||
# A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFCM0+NlSRnAK7UD7dvuzK7DDNbMPMAsG
|
||||
# A1UdDwQEAwIBhjAQBgkrBgEEAYI3FQEEAwIBADCBmAYDVR0jBIGQMIGNgBQOrIJg
|
||||
# QFYnl+UlE/wq4QpTlVnkpKFjpGEwXzETMBEGCgmSJomT8ixkARkWA2NvbTEZMBcG
|
||||
# CgmSJomT8ixkARkWCW1pY3Jvc29mdDEtMCsGA1UEAxMkTWljcm9zb2Z0IFJvb3Qg
|
||||
# Q2VydGlmaWNhdGUgQXV0aG9yaXR5ghB5rRahSqClrUxzWPQHEy5lMFAGA1UdHwRJ
|
||||
# MEcwRaBDoEGGP2h0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1
|
||||
# Y3RzL21pY3Jvc29mdHJvb3RjZXJ0LmNybDBUBggrBgEFBQcBAQRIMEYwRAYIKwYB
|
||||
# BQUHMAKGOGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljcm9z
|
||||
# b2Z0Um9vdENlcnQuY3J0MBMGA1UdJQQMMAoGCCsGAQUFBwMIMA0GCSqGSIb3DQEB
|
||||
# BQUAA4ICAQAQl4rDXANENt3ptK132855UU0BsS50cVttDBOrzr57j7gu1BKijG1i
|
||||
# uFcCy04gE1CZ3XpA4le7r1iaHOEdAYasu3jyi9DsOwHu4r6PCgXIjUji8FMV3U+r
|
||||
# kuTnjWrVgMHmlPIGL4UD6ZEqJCJw+/b85HiZLg33B+JwvBhOnY5rCnKVuKE5nGct
|
||||
# xVEO6mJcPxaYiyA/4gcaMvnMMUp2MT0rcgvI6nA9/4UKE9/CCmGO8Ne4F+tOi3/F
|
||||
# NSteo7/rvH0LQnvUU3Ih7jDKu3hlXFsBFwoUDtLaFJj1PLlmWLMtL+f5hYbMUVbo
|
||||
# nXCUbKw5TNT2eb+qGHpiKe+imyk0BncaYsk9Hm0fgvALxyy7z0Oz5fnsfbXjpKh0
|
||||
# NbhOxXEjEiZ2CzxSjHFaRkMUvLOzsE1nyJ9C/4B5IYCeFTBm6EISXhrIniIh0EPp
|
||||
# K+m79EjMLNTYMoBMJipIJF9a6lbvpt6Znco6b72BJ3QGEe52Ib+bgsEnVLaxaj2J
|
||||
# oXZhtG6hE6a/qkfwEm/9ijJssv7fUciMI8lmvZ0dhxJkAj0tr1mPuOQh5bWwymO0
|
||||
# eFQF1EEuUKyUsKV4q7OglnUa2ZKHE3UiLzKoCG6gW4wlv6DvhMoh1useT8ma7kng
|
||||
# 9wFlb4kLfchpyOZu6qeXzjEp/w7FW1zYTRuh2Povnj8uVRZryROj/TGCBKUwggSh
|
||||
# AgEBMIGQMHkxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYD
|
||||
# VQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xIzAh
|
||||
# BgNVBAMTGk1pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBAhMzAAABCix5rtd5e6as
|
||||
# AAEAAAEKMAkGBSsOAwIaBQCggb4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw
|
||||
# HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFMuf
|
||||
# sd32QCBuLAAV0rkqW6bKVWYSMF4GCisGAQQBgjcCAQwxUDBOoDSAMgBNAGkAYwBy
|
||||
# AG8AcwBvAGYAdAAgAFAAYQBjAGsAYQBnAGUAIABNAGEAbgBhAGcAZQByoRaAFGh0
|
||||
# dHA6Ly93d3cuYXNwLm5ldC8gMA0GCSqGSIb3DQEBAQUABIIBAHRB+qXSplgnW2vY
|
||||
# I0FrM1HeCaNpmZW0Y8ogeq+udpcfvuY5ma2j7aCZEd7ZX8CrEsSWnfFMSBMg6ThO
|
||||
# oUxRbEDV46WIbWC3sm9IKFQyHZ+JOyTPlYPDHyCl8xldPE2Vm50ZWMFifP9lo3Cd
|
||||
# 05gM21MP5jsNnWlU0SpHMgEup+2y7kf/7vyqVQD/hJzAt0M8R3eeFbANCbnGtShK
|
||||
# xgXt5oZaL37x1QqBcrYGlUKZ/T3fVhMSq0Azsjz4MKgpsDyNt6dKHwuBHqrpeG5Q
|
||||
# 2zMlAU1KT4ychtzPoIEyg7mDZBXFSebYD3FRGNr40QQP5ssZNp4aYkPc+OBbhZVN
|
||||
# qECrNN6hggIoMIICJAYJKoZIhvcNAQkGMYICFTCCAhECAQEwgY4wdzELMAkGA1UE
|
||||
# BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc
|
||||
# BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEhMB8GA1UEAxMYTWljcm9zb2Z0
|
||||
# IFRpbWUtU3RhbXAgUENBAhMzAAAAb2UtWG0HEUYoAAAAAABvMAkGBSsOAwIaBQCg
|
||||
# XTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNTA2
|
||||
# MjQyMjUwNThaMCMGCSqGSIb3DQEJBDEWBBS3xuq3t+Yhu0yNOu+21zKtvYUE7DAN
|
||||
# BgkqhkiG9w0BAQUFAASCAQCMFelTEi4zOXfdU6BBbGdP9O3MhBsgOrzG7cTJuZnG
|
||||
# EYy9vvEafoyPg7hI07CXBRxkqOzo6YAYw3OiX7NuGYXb6wpfK38c6ub9UB2+MNay
|
||||
# 6BbOyNIkFCqdGycIpyfWZgGNGjLVtZ/uAx0pCis6dSVFor+e+rVemjkeDyS4r9Jd
|
||||
# XThMKXiuAljaQwWJGSRpwxHaBfa9bS4RV5PU0GvR6WGi+fEGZ9w8ujW2kW7/kH0e
|
||||
# i2Gxzsgjd9yxw04IDt6swr2/iXw7TTU1RU1Wwb/BPlVMfW4oxvzJtDQUAVI2KsBL
|
||||
# +dMO7jCcLk5rnY66+3WrxXsLmudCDm54BbOPn/mmZO1P
|
||||
# SIG # End signature block
|
@ -1 +0,0 @@
|
||||
{"leaves":["Clear-Host","_TabExpansionPath","UnquoteString","Get-Interface","Get-VSService","Get-VSComponentModel","TabExpansion","prompt"],"root":"unitTest"}
|
@ -1,25 +0,0 @@
|
||||
def invisible_function1(): # invisible because at file start
|
||||
pass
|
||||
|
||||
class VisibleClass1:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def invisible_function2(): # invisible because nothing but linebreaks between VisibleClass1 and invisible_function2
|
||||
pass
|
||||
|
||||
class VisibleClass2:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# visible because there is something between VisibleClass2 and visible_function
|
||||
def visible_function():
|
||||
pass
|
@ -1 +0,0 @@
|
||||
{"leaves":["invisible_function1()","invisible_function2()","visible_function()"],"nodes":[{"leaves":["__init__(self)"],"name":"VisibleClass1"},{"leaves":["__init__(self)"],"name":"VisibleClass2"}],"root":"unitTest"}
|
@ -1,305 +0,0 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
try:
|
||||
raw_input # Python 2
|
||||
except NameError:
|
||||
raw_input = input # Python 3
|
||||
|
||||
try:
|
||||
xrange # Python 2
|
||||
except NameError:
|
||||
xrange = range # Python 3
|
||||
|
||||
# Accept No. of Nodes and edges
|
||||
n, m = map(int, raw_input().split(" "))
|
||||
|
||||
# Initialising Dictionary of edges
|
||||
g = {}
|
||||
for i in xrange(n):
|
||||
g[i + 1] = []
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Accepting edges of Unweighted Directed Graphs
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
for _ in xrange(m):
|
||||
x, y = map(int, raw_input().split(" "))
|
||||
g[x].append(y)
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Accepting edges of Unweighted Undirected Graphs
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
for _ in xrange(m):
|
||||
x, y = map(int, raw_input().split(" "))
|
||||
g[x].append(y)
|
||||
g[y].append(x)
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Accepting edges of Weighted Undirected Graphs
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
for _ in xrange(m):
|
||||
x, y, r = map(int, raw_input().split(" "))
|
||||
g[x].append([y, r])
|
||||
g[y].append([x, r])
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Depth First Search.
|
||||
Args : G - Dictionary of edges
|
||||
s - Starting Node
|
||||
Vars : vis - Set of visited nodes
|
||||
S - Traversal Stack
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
ssdef = 20
|
||||
USER_DEF = 1000
|
||||
|
||||
def dfs(G, s):
|
||||
vis, S = set([s]), [s]
|
||||
print(s)
|
||||
while S:
|
||||
flag = 0
|
||||
for i in G[S[-1]]:
|
||||
if i not in vis:
|
||||
S.append(i)
|
||||
vis.add(i)
|
||||
flag = 1
|
||||
print(i)
|
||||
break
|
||||
if not flag:
|
||||
S.pop()
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Breadth First Search.
|
||||
Args : G - Dictionary of edges
|
||||
s - Starting Node
|
||||
Vars : vis - Set of visited nodes
|
||||
Q - Traveral Stack
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
from collections import deque
|
||||
|
||||
|
||||
def bfs(G, s):
|
||||
vis, Q = set([s]), deque([s])
|
||||
print(s)
|
||||
while Q:
|
||||
u = Q.popleft()
|
||||
for v in G[u]:
|
||||
if v not in vis:
|
||||
vis.add(v)
|
||||
Q.append(v)
|
||||
print(v)
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Dijkstra's shortest path Algorithm
|
||||
Args : G - Dictionary of edges
|
||||
s - Starting Node
|
||||
Vars : dist - Dictionary storing shortest distance from s to every other node
|
||||
known - Set of knows nodes
|
||||
path - Preceding node in path
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
def dijk(G, s):
|
||||
dist, known, path = {s: 0}, set(), {s: 0}
|
||||
while True:
|
||||
if len(known) == len(G) - 1:
|
||||
break
|
||||
mini = 100000
|
||||
for i in dist:
|
||||
if i not in known and dist[i] < mini:
|
||||
mini = dist[i]
|
||||
u = i
|
||||
known.add(u)
|
||||
for v in G[u]:
|
||||
if v[0] not in known:
|
||||
if dist[u] + v[1] < dist.get(v[0], 100000):
|
||||
dist[v[0]] = dist[u] + v[1]
|
||||
path[v[0]] = u
|
||||
for i in dist:
|
||||
if i != s:
|
||||
print(dist[i])
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Topological Sort
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
from collections import deque
|
||||
|
||||
|
||||
def topo(G, ind=None, Q=[1]):
|
||||
if ind == None:
|
||||
ind = [0] * (len(G) + 1) # SInce oth Index is ignored
|
||||
for u in G:
|
||||
for v in G[u]:
|
||||
ind[v] += 1
|
||||
Q = deque()
|
||||
for i in G:
|
||||
if ind[i] == 0:
|
||||
Q.append(i)
|
||||
if len(Q) == 0:
|
||||
return
|
||||
v = Q.popleft()
|
||||
print(v)
|
||||
for w in G[v]:
|
||||
ind[w] -= 1
|
||||
if ind[w] == 0:
|
||||
Q.append(w)
|
||||
topo(G, ind, Q)
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Reading an Adjacency matrix
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
def adjm():
|
||||
n, a = input(), []
|
||||
for i in xrange(n):
|
||||
a.append(map(int, raw_input().split()))
|
||||
return a, n
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Floyd Warshall's algorithm
|
||||
Args : G - Dictionary of edges
|
||||
s - Starting Node
|
||||
Vars : dist - Dictionary storing shortest distance from s to every other node
|
||||
known - Set of knows nodes
|
||||
path - Preceding node in path
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
def floy(A_and_n):
|
||||
(A, n) = A_and_n
|
||||
dist = list(A)
|
||||
path = [[0] * n for i in xrange(n)]
|
||||
for k in xrange(n):
|
||||
for i in xrange(n):
|
||||
for j in xrange(n):
|
||||
if dist[i][j] > dist[i][k] + dist[k][j]:
|
||||
dist[i][j] = dist[i][k] + dist[k][j]
|
||||
path[i][k] = k
|
||||
print(dist)
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Prim's MST Algorithm
|
||||
Args : G - Dictionary of edges
|
||||
s - Starting Node
|
||||
Vars : dist - Dictionary storing shortest distance from s to nearest node
|
||||
known - Set of knows nodes
|
||||
path - Preceding node in path
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
def prim(G, s):
|
||||
dist, known, path = {s: 0}, set(), {s: 0}
|
||||
while True:
|
||||
if len(known) == len(G) - 1:
|
||||
break
|
||||
mini = 100000
|
||||
for i in dist:
|
||||
if i not in known and dist[i] < mini:
|
||||
mini = dist[i]
|
||||
u = i
|
||||
known.add(u)
|
||||
for v in G[u]:
|
||||
if v[0] not in known:
|
||||
if v[1] < dist.get(v[0], 100000):
|
||||
dist[v[0]] = v[1]
|
||||
path[v[0]] = u
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Accepting Edge list
|
||||
Vars : n - Number of nodes
|
||||
m - Number of edges
|
||||
Returns : l - Edge list
|
||||
n - Number of Nodes
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
def edglist():
|
||||
n, m = map(int, raw_input().split(" "))
|
||||
l = []
|
||||
for i in xrange(m):
|
||||
l.append(map(int, raw_input().split(' ')))
|
||||
return l, n
|
||||
|
||||
|
||||
"""
|
||||
--------------------------------------------------------------------------------
|
||||
Kruskal's MST Algorithm
|
||||
Args : E - Edge list
|
||||
n - Number of Nodes
|
||||
Vars : s - Set of all nodes as unique disjoint sets (initially)
|
||||
--------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
def krusk(E_and_n):
|
||||
# Sort edges on the basis of distance
|
||||
(E, n) = E_and_n
|
||||
E.sort(reverse=True, key=lambda x: x[2])
|
||||
s = [set([i]) for i in range(1, n + 1)]
|
||||
while True:
|
||||
if len(s) == 1:
|
||||
break
|
||||
print(s)
|
||||
x = E.pop()
|
||||
for i in xrange(len(s)):
|
||||
if x[0] in s[i]:
|
||||
break
|
||||
for j in xrange(len(s)):
|
||||
if x[1] in s[j]:
|
||||
if i == j:
|
||||
break
|
||||
s[j].update(s[i])
|
||||
s.pop(i)
|
||||
break
|
||||
|
||||
|
||||
INPUT_FILE_NAME = "example.txt"
|
||||
|
||||
class SampleClassBad (object):
|
||||
# WrongClassName: this will appear in the function list
|
||||
|
||||
def __init__ (self, fileName):
|
||||
self.fileName = fileName
|
||||
|
||||
|
||||
class SampleClassGood(object):
|
||||
# this works as expected: notice the missing space between
|
||||
# the class name and the left parenthesis.
|
||||
|
||||
def __init__ (self, fileName):
|
||||
self.fileName = fileName
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
{"leaves":["dfs(G, s)","bfs(G, s)","dijk(G, s)","topo(G, ind=None, Q=[1])","adjm()","floy(A_and_n)","prim(G, s)","edglist()","krusk(E_and_n)"],"nodes":[{"leaves":["__init__ (self, fileName)"],"name":"SampleClassBad"},{"leaves":["__init__ (self, fileName)"],"name":"SampleClassGood"}],"root":"unitTest"}
|
@ -1,124 +0,0 @@
|
||||
#!/usr/local/bin/ruby
|
||||
#
|
||||
# biorhythm.rb -
|
||||
# $Release Version: $
|
||||
# $Revision$
|
||||
# by Yasuo OHBA(STAFS Development Room)
|
||||
#
|
||||
# --
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# probably based on:
|
||||
#
|
||||
# Newsgroups: comp.sources.misc,de.comp.sources.os9
|
||||
# From: fkk@stasys.sta.sub.org (Frank Kaefer)
|
||||
# Subject: v41i126: br - Biorhythm v3.0, Part01/01
|
||||
# Message-ID: <1994Feb1.070616.15982@sparky.sterling.com>
|
||||
# Sender: kent@sparky.sterling.com (Kent Landfield)
|
||||
# Organization: Sterling Software
|
||||
# Date: Tue, 1 Feb 1994 07:06:16 GMT
|
||||
#
|
||||
# Posting-number: Volume 41, Issue 126
|
||||
# Archive-name: br/part01
|
||||
# Environment: basic, dos, os9
|
||||
|
||||
include Math
|
||||
require "date.rb"
|
||||
require "optparse"
|
||||
require "optparse/date"
|
||||
|
||||
def print_header(y, m, d, p, w)
|
||||
print "\n>>> Biorhythm <<<\n"
|
||||
printf "The birthday %04d.%02d.%02d is a %s\n", y, m, d, w
|
||||
printf "Age in days: [%d]\n\n", p
|
||||
end
|
||||
|
||||
def get_position(z)
|
||||
pi = Math::PI
|
||||
z = Integer(z)
|
||||
phys = (50.0 * (1.0 + sin((z / 23.0 - (z / 23)) * 360.0 * pi / 180.0))).to_i
|
||||
emot = (50.0 * (1.0 + sin((z / 28.0 - (z / 28)) * 360.0 * pi / 180.0))).to_i
|
||||
geist =(50.0 * (1.0 + sin((z / 33.0 - (z / 33)) * 360.0 * pi / 180.0))).to_i
|
||||
return phys, emot, geist
|
||||
end
|
||||
|
||||
def prompt(msg)
|
||||
$stderr.print msg
|
||||
return gets.chomp
|
||||
end
|
||||
|
||||
#
|
||||
# main program
|
||||
#
|
||||
options = {
|
||||
:graph => true,
|
||||
:date => Date.today,
|
||||
:days => 9,
|
||||
}
|
||||
ARGV.options do |opts|
|
||||
opts.on("-b", "--birthday=DATE", Date, "specify your birthday"){|v|
|
||||
options[:birthday] = v
|
||||
}
|
||||
opts.on("--date=DATE", Date, "specify date to show"){|v|
|
||||
options[:date] = v
|
||||
}
|
||||
opts.on("-g", "--show-graph", TrueClass, "show graph (default)"){|v|
|
||||
options[:graph] = v
|
||||
}
|
||||
opts.on("-v", "--show-values", TrueClass, "show values"){|v|
|
||||
options[:graph] = !v
|
||||
}
|
||||
opts.on("--days=DAYS", Integer, "graph range (only in effect for graph)"){|v|
|
||||
options[:days] = v - 1
|
||||
}
|
||||
opts.on_tail("-h", "--help", "show this message"){puts opts; exit}
|
||||
begin
|
||||
opts.parse!
|
||||
rescue => ex
|
||||
puts "Error: #{ex.message}"
|
||||
puts opts
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
bd = options[:birthday] || Date.parse(prompt("Your birthday (YYYYMMDD): "))
|
||||
dd = options[:date] || Date.today
|
||||
ausgabeart = options[:graph] ? "g" : "v"
|
||||
display_period = options[:days]
|
||||
|
||||
if ausgabeart == "v"
|
||||
print_header(bd.year, bd.month, bd.day, dd - bd, bd.strftime("%a"))
|
||||
print "\n"
|
||||
|
||||
phys, emot, geist = get_position(dd - bd)
|
||||
printf "Biorhythm: %04d.%02d.%02d\n", dd.year, dd.month, dd.day
|
||||
printf "Physical: %d%%\n", phys
|
||||
printf "Emotional: %d%%\n", emot
|
||||
printf "Mental: %d%%\n", geist
|
||||
print "\n"
|
||||
else
|
||||
print_header(bd.year, bd.month, bd.day, dd - bd, bd.strftime("%a"))
|
||||
print " P=physical, E=emotional, M=mental\n"
|
||||
print " -------------------------+-------------------------\n"
|
||||
print " Bad Condition | Good Condition\n"
|
||||
print " -------------------------+-------------------------\n"
|
||||
|
||||
(dd - bd).step(dd - bd + display_period) do |z|
|
||||
phys, emot, geist = get_position(z)
|
||||
|
||||
printf "%04d.%02d.%02d : ", dd.year, dd.month, dd.day
|
||||
p = (phys / 2.0 + 0.5).to_i
|
||||
e = (emot / 2.0 + 0.5).to_i
|
||||
g = (geist / 2.0 + 0.5).to_i
|
||||
graph = "." * 51
|
||||
graph[25] = ?|
|
||||
graph[p] = ?P
|
||||
graph[e] = ?E
|
||||
graph[g] = ?M
|
||||
print graph, "\n"
|
||||
dd = dd + 1
|
||||
end
|
||||
print " -------------------------+-------------------------\n\n"
|
||||
end
|
@ -1 +0,0 @@
|
||||
{"leaves":["print_header","get_position","prompt"],"root":"unitTest"}
|
@ -1,85 +0,0 @@
|
||||
// Unlike C/C++, there's no restriction on the order of function definitions
|
||||
fn main() {
|
||||
// We can use this function here, and define it somewhere later
|
||||
fizzbuzz_to(100);
|
||||
}
|
||||
|
||||
// Function that returns a boolean value
|
||||
fn is_divisible_by(lhs: u32, rhs: u32) -> bool {
|
||||
// Corner case, early return
|
||||
if rhs == 0 {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is an expression, the `return` keyword is not necessary here
|
||||
lhs % rhs == 0
|
||||
}
|
||||
|
||||
// Functions that "don't" return a value, actually return the unit type `()`
|
||||
fn fizzbuzz(n: u32) -> () {
|
||||
if is_divisible_by(n, 15) {
|
||||
println!("fizzbuzz");
|
||||
} else if is_divisible_by(n, 3) {
|
||||
println!("fizz");
|
||||
} else if is_divisible_by(n, 5) {
|
||||
println!("buzz");
|
||||
} else {
|
||||
println!("{}", n);
|
||||
}
|
||||
}
|
||||
|
||||
// When a function returns `()`, the return type can be omitted from the
|
||||
// signature
|
||||
fn fizzbuzz_to(n: u32) {
|
||||
for n in 1..n + 1 {
|
||||
fizzbuzz(n);
|
||||
}
|
||||
}
|
||||
|
||||
async fn async_example(n: u32) {
|
||||
for n in 1..n + 1 {
|
||||
fizzbuzz(n);
|
||||
}
|
||||
}
|
||||
|
||||
const fn const_example(n: u32) {
|
||||
for n in 1..n + 1 {
|
||||
fizzbuzz(n);
|
||||
}
|
||||
}
|
||||
|
||||
extern "Rust" fn foo() {}
|
||||
|
||||
unsafe fn unsafe_example(n: u32) {
|
||||
for n in 1..n + 1 {
|
||||
fizzbuzz(n);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
unsafe fn commented_func(n: u32) {
|
||||
for n in 1..n + 1 {
|
||||
fizzbuzz(n);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Declares a function with the "C" ABI
|
||||
extern "C" fn new_i32() -> i32 { 0 }
|
||||
|
||||
// Declares a function with the "stdcall" ABI
|
||||
extern "stdcall" fn new_i32_stdcall() -> i32 { 0 }
|
||||
|
||||
async fn regular_example() { }
|
||||
async unsafe fn unsafe_example() { }
|
||||
|
||||
const fn generic_example<'a>(x: &'a str) -> impl Future<Output = usize> + 'a {
|
||||
async move { x.len() }
|
||||
}
|
||||
|
||||
fn generic_example2<const N: usize>(arr: [i32; N]) {
|
||||
// Used as a type within a function body.
|
||||
let x: [i32; N];
|
||||
// Used as an expression.
|
||||
println!("{}", N * 2);
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"leaves":["main","is_divisible_by","fizzbuzz","fizzbuzz_to","async_example","const_example","foo","unsafe_example","new_i32","new_i32_stdcall","regular_example","unsafe_example","generic_example","generic_example2"],"root":"unitTest"}
|
@ -1,154 +0,0 @@
|
||||
create package CheckFunctionList_pck
|
||||
as
|
||||
|
||||
function ctrlData(
|
||||
po_severity in out nocopy varchar2,
|
||||
po_err_code in out nocopy varchar2,
|
||||
po_err_message in out nocopy varchar2,
|
||||
p_Data in ind_work_data_r
|
||||
) return boolean;
|
||||
|
||||
procedure INIT_DECODE_RULES1 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules
|
||||
);
|
||||
|
||||
|
||||
|
||||
procedure INIT_DECODE_RULES2 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules);
|
||||
|
||||
function GetEsecId
|
||||
return tab1.esec_id%type;
|
||||
|
||||
procedure pippo;
|
||||
|
||||
|
||||
|
||||
procedure INIT_DECODE_RULES3 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_guid in guid_list_t := guid_list_t()
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules);
|
||||
|
||||
|
||||
procedure INIT_DECODE_RULES4 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_guid in guid_list_t := guid_list_t()
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules
|
||||
);
|
||||
|
||||
procedure INIT_DECODE_RULES5 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2 -- this is a comment with (brackets)
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules);
|
||||
|
||||
|
||||
procedure INIT_DECODE_RULES6 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2 -- this is a comment with (brackets)
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules
|
||||
);
|
||||
|
||||
end CheckFunctionList_pck;
|
||||
/
|
||||
|
||||
|
||||
|
||||
create package body CheckFunctionList_pck
|
||||
as
|
||||
|
||||
function ctrlData(
|
||||
po_severity in out nocopy varchar2,
|
||||
po_err_code in out nocopy varchar2,
|
||||
po_err_message in out nocopy varchar2,
|
||||
p_Data in ind_work_data_r
|
||||
) return boolean
|
||||
is
|
||||
begin
|
||||
return null;
|
||||
end ctrlData;
|
||||
|
||||
procedure INIT_DECODE_RULES1 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules
|
||||
)
|
||||
as
|
||||
begin
|
||||
null;
|
||||
end INIT_DECODE_RULES1;
|
||||
|
||||
|
||||
procedure INIT_DECODE_RULES2 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)
|
||||
as
|
||||
begin
|
||||
null;
|
||||
end INIT_DECODE_RULES2;
|
||||
|
||||
|
||||
function GetEsecId
|
||||
return tab1.esec_id%type
|
||||
is
|
||||
begin
|
||||
return null;
|
||||
end GetEsecId;
|
||||
|
||||
|
||||
procedure pippo
|
||||
is
|
||||
begin
|
||||
null;
|
||||
end pippo;
|
||||
|
||||
|
||||
procedure INIT_DECODE_RULES3 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_guid in guid_list_t := guid_list_t()
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)
|
||||
as
|
||||
begin
|
||||
null;
|
||||
end INIT_DECODE_RULES3;
|
||||
|
||||
procedure INIT_DECODE_RULES4 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2
|
||||
,po_guid in guid_list_t := guid_list_t()
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules
|
||||
)
|
||||
as
|
||||
begin
|
||||
null;
|
||||
end INIT_DECODE_RULES4;
|
||||
|
||||
procedure INIT_DECODE_RULES5 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2 -- this is a comment with (brackets)
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)
|
||||
as
|
||||
begin
|
||||
null;
|
||||
end INIT_DECODE_RULES5;
|
||||
|
||||
procedure INIT_DECODE_RULES6 (po_severity in out varchar2
|
||||
,po_err_code in out varchar2
|
||||
,po_err_message in out varchar2 -- this is a comment with (brackets)
|
||||
,po_tabDecRules out nocopy report_utl_pck.tTabDecRules
|
||||
)
|
||||
as
|
||||
begin
|
||||
null;
|
||||
end INIT_DECODE_RULES6;
|
||||
|
||||
end CheckFunctionList_pck;
|
||||
/
|
||||
|
@ -1 +0,0 @@
|
||||
{"leaves":["ctrlData(\r\n po_severity in out nocopy varchar2,\r\n po_err_code in out nocopy varchar2,\r\n po_err_message in out nocopy varchar2,\r\n p_Data in ind_work_data_r\r\n) return boolean","INIT_DECODE_RULES1 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules\r\n )","INIT_DECODE_RULES2 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)","GetEsecId\r\nreturn tab1.esec_id%type","pippo","INIT_DECODE_RULES3 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES4 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES5 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)","INIT_DECODE_RULES6 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)","ctrlData(\r\n po_severity in out nocopy varchar2,\r\n po_err_code in out nocopy varchar2,\r\n po_err_message in out nocopy varchar2,\r\n p_Data in ind_work_data_r\r\n) return boolean\r\nis\r\nbegin\r\n return null","INIT_DECODE_RULES1 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules\r\n )","INIT_DECODE_RULES2 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)","GetEsecId\r\nreturn tab1.esec_id%type\r\nis\r\nbegin\r\n return null","pippo","INIT_DECODE_RULES3 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES4 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES5 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)","INIT_DECODE_RULES6 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)"],"root":"unitTest"}
|
@ -1,90 +0,0 @@
|
||||
CREATE OR REPLACE PACKAGE BODY emp_mgmt AS
|
||||
tot_emps NUMBER;
|
||||
tot_depts NUMBER;
|
||||
FUNCTION hire
|
||||
(last_name VARCHAR2, job_id VARCHAR2,
|
||||
manager_id NUMBER, salary NUMBER,
|
||||
commission_pct NUMBER, department_id NUMBER)
|
||||
RETURN NUMBER IS new_empno NUMBER;
|
||||
BEGIN
|
||||
SELECT employees_seq.NEXTVAL
|
||||
INTO new_empno
|
||||
FROM DUAL;
|
||||
INSERT INTO employees
|
||||
VALUES (new_empno, 'First', 'Last','first.last@oracle.com',
|
||||
'(123)123-1234','18-JUN-02','IT_PROG',90000000,00,
|
||||
100,110);
|
||||
tot_emps := tot_emps + 1;
|
||||
RETURN(new_empno);
|
||||
END;
|
||||
FUNCTION create_dept(department_id NUMBER, location_id NUMBER)
|
||||
RETURN NUMBER IS
|
||||
new_deptno NUMBER;
|
||||
BEGIN
|
||||
SELECT departments_seq.NEXTVAL
|
||||
INTO new_deptno
|
||||
FROM dual;
|
||||
INSERT INTO departments
|
||||
VALUES (new_deptno, 'department name', 100, 1700);
|
||||
tot_depts := tot_depts + 1;
|
||||
RETURN(new_deptno);
|
||||
END;
|
||||
PROCEDURE remove_emp (employee_id NUMBER) IS
|
||||
BEGIN
|
||||
DELETE FROM employees
|
||||
WHERE employees.employee_id = remove_emp.employee_id;
|
||||
tot_emps := tot_emps - 1;
|
||||
END;
|
||||
PROCEDURE remove_dept(department_id NUMBER) IS
|
||||
BEGIN
|
||||
DELETE FROM departments
|
||||
WHERE departments.department_id = remove_dept.department_id;
|
||||
tot_depts := tot_depts - 1;
|
||||
SELECT COUNT(*) INTO tot_emps FROM employees;
|
||||
END;
|
||||
PROCEDURE increase_sal(employee_id NUMBER, salary_incr NUMBER) IS
|
||||
curr_sal NUMBER;
|
||||
BEGIN
|
||||
SELECT salary INTO curr_sal FROM employees
|
||||
WHERE employees.employee_id = increase_sal.employee_id;
|
||||
IF curr_sal IS NULL
|
||||
THEN RAISE no_sal;
|
||||
ELSE
|
||||
UPDATE employees
|
||||
SET salary = salary + salary_incr
|
||||
WHERE employee_id = employee_id;
|
||||
END IF;
|
||||
END;
|
||||
PROCEDURE increase_comm(employee_id NUMBER, comm_incr NUMBER) IS
|
||||
curr_comm NUMBER;
|
||||
BEGIN
|
||||
SELECT commission_pct
|
||||
INTO curr_comm
|
||||
FROM employees
|
||||
WHERE employees.employee_id = increase_comm.employee_id;
|
||||
IF curr_comm IS NULL
|
||||
THEN RAISE no_comm;
|
||||
ELSE
|
||||
UPDATE employees
|
||||
SET commission_pct = commission_pct + comm_incr;
|
||||
END IF;
|
||||
END;
|
||||
END emp_mgmt;
|
||||
/*
|
||||
PROCEDURE commented_func(employee_id NUMBER, comm_incr NUMBER) IS
|
||||
curr_comm NUMBER;
|
||||
BEGIN
|
||||
SELECT commission_pct
|
||||
INTO curr_comm
|
||||
FROM employees
|
||||
WHERE employees.employee_id = increase_comm.employee_id;
|
||||
IF curr_comm IS NULL
|
||||
THEN RAISE no_comm;
|
||||
ELSE
|
||||
UPDATE employees
|
||||
SET commission_pct = commission_pct + comm_incr;
|
||||
END IF;
|
||||
END;
|
||||
END emp_mgmt;
|
||||
*/
|
||||
/
|
@ -1 +0,0 @@
|
||||
{"leaves":["hire \r\n (last_name VARCHAR2, job_id VARCHAR2, \r\n manager_id NUMBER, salary NUMBER, \r\n commission_pct NUMBER, department_id NUMBER) \r\n RETURN NUMBER IS new_empno NUMBER","create_dept(department_id NUMBER, location_id NUMBER) \r\n RETURN NUMBER IS \r\n new_deptno NUMBER","remove_emp (employee_id NUMBER)","remove_dept(department_id NUMBER)","increase_sal(employee_id NUMBER, salary_incr NUMBER)","increase_comm(employee_id NUMBER, comm_incr NUMBER)"],"root":"unitTest"}
|
@ -1,374 +0,0 @@
|
||||
var crypto = require('crypto'),
|
||||
Friends,
|
||||
User,
|
||||
Post,
|
||||
WallPost,
|
||||
Comment,
|
||||
LoginToken;
|
||||
|
||||
function extractKeywords(text) {
|
||||
if (!text) return [];
|
||||
|
||||
return text.
|
||||
split(/\s+/).
|
||||
filter(function(v) { return v.length > 2; }).
|
||||
filter(function(v, i, a) { return a.lastIndexOf(v) === i; });
|
||||
}
|
||||
|
||||
/*
|
||||
function commentedFunc(text) {
|
||||
if (!text) return [];
|
||||
|
||||
return text.
|
||||
split(/\s+/).
|
||||
filter(function(v) { return v.length > 2; }).
|
||||
filter(function(v, i, a) { return a.lastIndexOf(v) === i; });
|
||||
}
|
||||
*/
|
||||
|
||||
function convertBasicMarkup(input, allowHtml) {
|
||||
var strongRe = /[*]{2}([^*]+)[*]{2}/gm;
|
||||
var emRe = /[*]{1}([^*]+)[*]{1}/gm;
|
||||
var linkRe = /\[([^\]]*)\]\(([^\)]*?)\)/gm;
|
||||
var nlRe = /\r\n/gm;
|
||||
var crRe = /\r/gm;
|
||||
|
||||
// special re's to revert linebreaks from <br />
|
||||
var codeRe = /(<code\b[^>]*>(.*?)<\/code>)/gm;
|
||||
|
||||
// cleanup newlines
|
||||
input = input.replace(nlRe, "\n");
|
||||
input = input.replace(crRe, "\n");
|
||||
|
||||
// strip existing html before inserting breaks/markup
|
||||
if (!allowHtml) {
|
||||
// strip html
|
||||
input = input
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
// convert newlines to breaks
|
||||
input = input.replace(/\n/gm, '<br />');
|
||||
|
||||
// replace basic markup
|
||||
input = input.replace(strongRe, function(whole, m1, m2, m3) {
|
||||
return '<strong>' + m1 + '</strong>';
|
||||
});
|
||||
|
||||
input = input.replace(emRe, function(whole, m1, m2, m3) {
|
||||
return '<em>' + m1 + '</em>';
|
||||
});
|
||||
|
||||
input = input.replace(linkRe, function(whole, m1, m2) {
|
||||
// fix up protocol
|
||||
if (!m2.match(/(http(s?)|ftp(s?)):\/\//gm))
|
||||
// prepend http as default
|
||||
m2 = 'http://' + m2;
|
||||
return '<a href=\"' + m2 + '\" target=\"_blank\">' + m1 + '</a>';
|
||||
});
|
||||
|
||||
// revert code blocks
|
||||
input = input.replace(codeRe, function(whole, m1) {
|
||||
return m1.replace(/<br \/>/gm, '\n');
|
||||
});
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function defineModels(mongoose, fn) {
|
||||
var Schema = mongoose.Schema,
|
||||
ObjectId = Schema.ObjectId;
|
||||
|
||||
|
||||
/**
|
||||
* Comment model
|
||||
*
|
||||
* Used for persisting user comments
|
||||
*/
|
||||
var Comment = new Schema({
|
||||
user_id: ObjectId,
|
||||
//photo:String,
|
||||
date: Date,
|
||||
body: String,
|
||||
post_id:ObjectId,
|
||||
});
|
||||
|
||||
// register virtual members
|
||||
Comment.virtual('readableday')
|
||||
.get(function() {
|
||||
var day = this.date.getDate();
|
||||
return (day < 10 ? '0' + day : day);
|
||||
});
|
||||
|
||||
Comment.virtual('readablemonth')
|
||||
.get(function() {
|
||||
return monthNamesShort[this.date.getMonth()];
|
||||
});
|
||||
|
||||
Comment.virtual('readabletime')
|
||||
.get(function() {
|
||||
var hour = this.date.getHours();
|
||||
var minute = this.date.getMinutes();
|
||||
return (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
||||
});
|
||||
|
||||
Comment.virtual('bodyParsed')
|
||||
.get(function() {
|
||||
return convertBasicMarkup(this.body, false);
|
||||
});
|
||||
|
||||
// register validators
|
||||
/*Comment.path('author').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'AUTHOR_MISSING');*/
|
||||
|
||||
Comment.path('body').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'BODY_MISSING');
|
||||
|
||||
|
||||
/**
|
||||
* Model: WallPost
|
||||
*/
|
||||
|
||||
|
||||
var WallPost = new Schema({
|
||||
friend_id: String,
|
||||
preview: String,
|
||||
body: String,
|
||||
//rsstext: String,
|
||||
slug: String,
|
||||
created: Date,
|
||||
modified: Date,
|
||||
//tags: [String],
|
||||
user_id:ObjectId,
|
||||
posted_on_user_id : ObjectId,
|
||||
//comments: [Comment]
|
||||
});
|
||||
|
||||
var monthNames = [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli',
|
||||
'August', 'September', 'Oktober', 'November', 'Dezember' ];
|
||||
var monthNamesShort = [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul',
|
||||
'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ];
|
||||
|
||||
// define virtual getter method for id (readable string)
|
||||
WallPost.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
WallPost.virtual('url')
|
||||
.get(function() {
|
||||
// build url for current post
|
||||
var year = this.created.getFullYear();
|
||||
var month = this.created.getMonth() + 1;
|
||||
var day = this.created.getDate();
|
||||
return '/' + year + '/' + (month < 10 ? '0' + month : month) + '/' + (day < 10 ? '0' + day : day) + '/' + this.slug + '/';
|
||||
});
|
||||
|
||||
WallPost.virtual('rfc822created')
|
||||
.get(function() {
|
||||
return this.created.toGMTString();
|
||||
});
|
||||
|
||||
WallPost.virtual('readabledate')
|
||||
.get(function() {
|
||||
var year = this.created.getFullYear();
|
||||
var month = monthNames[this.created.getMonth()];
|
||||
var day = this.created.getDate();
|
||||
return (day < 10 ? '0' + day : day) + '. ' + month + ' ' + year;
|
||||
});
|
||||
|
||||
WallPost.virtual('readableday')
|
||||
.get(function() {
|
||||
var day = this.created.getDate();
|
||||
return (day < 10 ? '0' + day : day);
|
||||
});
|
||||
|
||||
WallPost.virtual('readablemonth')
|
||||
.get(function() {
|
||||
return monthNamesShort[this.created.getMonth()];
|
||||
});
|
||||
|
||||
WallPost.virtual('previewParsed')
|
||||
.get(function() {
|
||||
return convertBasicMarkup(this.preview, true);
|
||||
});
|
||||
|
||||
WallPost.virtual('bodyParsed')
|
||||
.get(function() {
|
||||
return convertBasicMarkup(this.body, true);
|
||||
});
|
||||
|
||||
// register validators
|
||||
/*WallPost.path('title').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'TITLE_MISSING');
|
||||
|
||||
WallPost.path('preview').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'PREVIEW_MISSING');
|
||||
|
||||
WallPost.path('rsstext').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'RSSTEXT_MISSING');*/
|
||||
|
||||
WallPost.path('body').validate(function(val) {
|
||||
return val.length > 0;
|
||||
}, 'BODY_MISSING');
|
||||
|
||||
// generate a proper slug value for Wallpost
|
||||
function slugGenerator (options){
|
||||
options = options || {};
|
||||
var key = options.key || 'body';
|
||||
return function slugGenerator(schema){
|
||||
schema.path(key).set(function(v){
|
||||
this.slug = v.toLowerCase().replace(/[^a-z0-9]/g, '-').replace(/\++/g, '');
|
||||
return v;
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// attach slugGenerator plugin to Wallpost schema
|
||||
WallPost.plugin(slugGenerator());
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Model: User
|
||||
*/
|
||||
function validatePresenceOf(value) {
|
||||
return value && value.length;
|
||||
}
|
||||
var User = new Schema({
|
||||
'first_name': { type: String, validate: /[a-z]/ },
|
||||
'last_name':{ type: String, validate: /[a-z]/ },
|
||||
'age':Number,
|
||||
'sex':{ type: String},
|
||||
'photo':String,
|
||||
'location':{ type: String, validate: /[a-z]/ },
|
||||
'latitude' : String,
|
||||
'longitude' : String,
|
||||
'keywords': [String],
|
||||
'username':String,
|
||||
'email': { type: String, validate: [validatePresenceOf, 'an email is required'], index: { unique: true }, required:true },
|
||||
'hashed_password': { type: String},
|
||||
'salt': String,
|
||||
});
|
||||
|
||||
User.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
User.virtual('password')
|
||||
.set(function(password) {
|
||||
this._password = password;
|
||||
this.salt = this.makeSalt();
|
||||
this.hashed_password = this.encryptPassword(password);
|
||||
})
|
||||
.get(function() { return this._password; });
|
||||
|
||||
User.method('authenticate', function(plainText) {
|
||||
return this.encryptPassword(plainText) === this.hashed_password;
|
||||
});
|
||||
|
||||
User.method('makeSalt', function() {
|
||||
return Math.round((new Date().valueOf() * Math.random())) + '';
|
||||
});
|
||||
|
||||
User.method('encryptPassword', function(password) {
|
||||
return crypto.createHmac('sha1', this.salt).update(password).digest('hex');
|
||||
});
|
||||
|
||||
User.pre('save', function(next) {
|
||||
this.keywords = extractKeywords(this.first_name);
|
||||
next();
|
||||
if (!validatePresenceOf(this.password)) {
|
||||
next(new Error('Invalid password'));
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
var Friends = new Schema({
|
||||
requestor : String
|
||||
, acceptor : String
|
||||
, date_requested : Date
|
||||
, status:Number
|
||||
});
|
||||
|
||||
Friends.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
var Post = new Schema({
|
||||
filename : { type: String, index: true }
|
||||
, file : String
|
||||
, created_at : Date
|
||||
, user_id: ObjectId
|
||||
});
|
||||
|
||||
Post.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
/**
|
||||
* Model: LoginToken
|
||||
*
|
||||
* Used for session persistence.
|
||||
*/
|
||||
var LoginToken = new Schema({
|
||||
email: { type: String, index: true },
|
||||
series: { type: String, index: true },
|
||||
token: { type: String, index: true }
|
||||
});
|
||||
|
||||
LoginToken.method('randomToken', function() {
|
||||
return Math.round((new Date().valueOf() * Math.random())) + '';
|
||||
});
|
||||
|
||||
LoginToken.pre('save', function(next) {
|
||||
// Automatically create the tokens
|
||||
this.token = this.randomToken();
|
||||
|
||||
if (this.isNew)
|
||||
this.series = this.randomToken();
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
LoginToken.virtual('id')
|
||||
.get(function() {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
LoginToken.virtual('cookieValue')
|
||||
.get(function() {
|
||||
return JSON.stringify({ email: this.email, token: this.token, series: this.series });
|
||||
});
|
||||
|
||||
|
||||
|
||||
mongoose.model('User', User);
|
||||
mongoose.model('Post', Post);
|
||||
mongoose.model('Friends', Friends);
|
||||
mongoose.model('LoginToken', LoginToken);
|
||||
mongoose.model('WallPost', WallPost);
|
||||
mongoose.model('Comment', Comment);
|
||||
fn();
|
||||
}
|
||||
|
||||
exports.defineModels = defineModels;
|
||||
|
@ -1 +0,0 @@
|
||||
{"leaves":["extractKeywords","convertBasicMarkup","function","function","function","function","defineModels","slugGenerator","slugGenerator","validatePresenceOf","function","function","function","function","function","function"],"root":"unitTest"}
|
@ -1,194 +0,0 @@
|
||||
::StartupScript
|
||||
npp_console keep
|
||||
|
||||
npp_exec "SetSingleEdgeLine"
|
||||
|
||||
|
||||
|
||||
::MultipleSelectAddNext
|
||||
npp_console keep
|
||||
|
||||
sci_sendmsg SCI_SETSEARCHFLAGS SCFIND_WHOLEWORD
|
||||
sci_sendmsg SCI_TARGETWHOLEDOCUMENT
|
||||
sci_sendmsg SCI_MULTIPLESELECTADDNEXT
|
||||
|
||||
|
||||
|
||||
::MultipleSelectAddEach
|
||||
npp_console keep
|
||||
|
||||
sci_sendmsg SCI_SETSEARCHFLAGS SCFIND_WHOLEWORD
|
||||
sci_sendmsg SCI_TARGETWHOLEDOCUMENT
|
||||
|
||||
sci_sendmsg SCI_GETSELECTIONEMPTY
|
||||
|
||||
if $(MSG_RESULT) == 1 then
|
||||
sci_sendmsg SCI_MULTIPLESELECTADDNEXT
|
||||
endif
|
||||
|
||||
sci_sendmsg SCI_MULTIPLESELECTADDEACH
|
||||
|
||||
|
||||
|
||||
::SetSingleEdgeLine
|
||||
npp_console keep
|
||||
sci_sendmsg SCI_SETEDGECOLUMN 80
|
||||
sci_sendmsg SCI_SETEDGEMODE EDGE_LINE
|
||||
|
||||
|
||||
|
||||
::ConfigSingleEdgeLine
|
||||
npp_console keep
|
||||
sci_sendmsg SCI_GETEDGECOLUMN
|
||||
inputbox "Input edge column" : "Edge column" : $(MSG_RESULT)
|
||||
sci_sendmsg SCI_SETEDGECOLUMN $(INPUT)
|
||||
sci_sendmsg SCI_SETEDGEMODE EDGE_LINE
|
||||
|
||||
|
||||
|
||||
::SingleEdgeLineOn
|
||||
npp_console keep
|
||||
sci_sendmsg SCI_SETEDGEMODE EDGE_LINE
|
||||
|
||||
|
||||
|
||||
::MultipleEdgeLinesOn
|
||||
npp_console keep
|
||||
sci_sendmsg SCI_SETEDGEMODE EDGE_MULTILINE
|
||||
|
||||
|
||||
|
||||
::BackgroundEdgeOn
|
||||
npp_console keep
|
||||
sci_sendmsg SCI_SETEDGEMODE EDGE_BACKGROUND
|
||||
|
||||
|
||||
|
||||
::EdgesOff
|
||||
npp_console keep
|
||||
sci_sendmsg SCI_SETEDGEMODE EDGE_NONE
|
||||
|
||||
|
||||
|
||||
::WrapSelectedLinesAtEdge
|
||||
npp_console keep
|
||||
|
||||
sci_sendmsg SCI_GETEDGEMODE
|
||||
|
||||
if~ $(MSG_RESULT) != EDGE_LINE then
|
||||
set local $(LinePixelWidth) = 0
|
||||
goto :DoWrap
|
||||
endif
|
||||
|
||||
sci_sendmsg SCI_GETEDGECOLUMN
|
||||
set local $(LineCharWidth) ~ $(MSG_RESULT) + 1
|
||||
|
||||
set local $(TemplateStr) = W
|
||||
set local $(Cnt) = 2
|
||||
|
||||
:ForLoopStart
|
||||
if $(Cnt) > $(LineCharWidth) goto :ForLoopEnd
|
||||
set local $(TemplateStr) = $(TemplateStr)W
|
||||
set local $(Cnt) ~ $(Cnt) + 1
|
||||
goto :ForLoopStart
|
||||
|
||||
:ForLoopEnd
|
||||
sci_sendmsg SCI_TEXTWIDTH STYLE_DEFAULT "$(TemplateStr)"
|
||||
set local $(LinePixelWidth) = $(MSG_RESULT)
|
||||
|
||||
:DoWrap
|
||||
sci_sendmsg SCI_TARGETFROMSELECTION
|
||||
sci_sendmsg SCI_LINESSPLIT $(LinePixelWidth)
|
||||
|
||||
|
||||
|
||||
::DeleteLinesFrom2ndView
|
||||
npp_console keep
|
||||
npp_console disable
|
||||
npe_console -- m-
|
||||
|
||||
sci_sendmsg SCI_DOCUMENTSTART
|
||||
npp_sendmsg NPPM_MENUCOMMAND 0 IDM_VIEW_SWITCHTO_OTHER_VIEW
|
||||
sci_sendmsg SCI_DOCUMENTSTART
|
||||
|
||||
npp_sendmsg NPPM_GETCURRENTVIEW
|
||||
|
||||
if $(MSG_RESULT) == 0 then
|
||||
npp_sendmsg NPPM_MENUCOMMAND 0 IDM_VIEW_SWITCHTO_OTHER_VIEW
|
||||
endif
|
||||
|
||||
sci_sendmsg SCI_GETLINECOUNT
|
||||
set local $(LineCount) = $(MSG_RESULT)
|
||||
set local $(LineIdx) = 0
|
||||
|
||||
:ProcessSearchTerms
|
||||
if $(LineIdx) >= $(LineCount) goto :End
|
||||
sci_sendmsg SCI_GETLINE $(LineIdx) @""
|
||||
set local $(CurLine) = $(MSG_LPARAM)
|
||||
|
||||
if "$(CurLine)" == "" goto :AdvanceToNextLine
|
||||
|
||||
npp_sendmsg NPPM_MENUCOMMAND 0 IDM_VIEW_SWITCHTO_OTHER_VIEW
|
||||
|
||||
sci_sendmsg SCI_GETCURRENTPOS
|
||||
sci_sendmsg SCI_LINEFROMPOSITION $(MSG_RESULT)
|
||||
set local $(StartLineIdx) = $(MSG_RESULT)
|
||||
|
||||
set local $(Flags) ~ NPE_SF_SETPOS
|
||||
|
||||
:ReplaceLoop
|
||||
sci_find $(Flags) "$(CurLine)"
|
||||
if $(MSG_RESULT) == -1 goto :ReplaceLoopEnd
|
||||
|
||||
sci_sendmsg SCI_LINEFROMPOSITION $(MSG_RESULT)
|
||||
set local $(FoundLineIdx) = $(MSG_RESULT)
|
||||
|
||||
sci_sendmsg SCI_GETLINE $(FoundLineIdx) @""
|
||||
set local $(FoundLine) = $(MSG_LPARAM)
|
||||
|
||||
set local $(FoundLineLC) ~ strlower "$(FoundLine)"
|
||||
set local $(CurLineLC) ~ strlower "$(CurLine)"
|
||||
|
||||
if "$(FoundLineLC)" == "$(CurLineLC)" then
|
||||
sci_sendmsg SCI_GOTOLINE $(FoundLineIdx)
|
||||
sci_sendmsg SCI_LINEDELETE
|
||||
endif
|
||||
|
||||
set local $(Flags) ~ $(Flags) | NPE_SF_NEXT
|
||||
goto :ReplaceLoop
|
||||
|
||||
:ReplaceLoopEnd
|
||||
sci_sendmsg SCI_GOTOLINE $(StartLineIdx)
|
||||
npp_sendmsg NPPM_MENUCOMMAND 0 IDM_VIEW_SWITCHTO_OTHER_VIEW
|
||||
|
||||
:AdvanceToNextLine
|
||||
set local $(LineIdx) ~ $(LineIdx) + 1
|
||||
goto :ProcessSearchTerms
|
||||
|
||||
:End
|
||||
sci_sendmsg SCI_DOCUMENTSTART
|
||||
npp_sendmsg NPPM_MENUCOMMAND 0 IDM_VIEW_SWITCHTO_OTHER_VIEW
|
||||
sci_sendmsg SCI_DOCUMENTSTART
|
||||
|
||||
npp_sendmsg NPPM_GETCURRENTVIEW
|
||||
|
||||
if $(MSG_RESULT) == 1 then
|
||||
npp_sendmsg NPPM_MENUCOMMAND 0 IDM_VIEW_SWITCHTO_OTHER_VIEW
|
||||
endif
|
||||
|
||||
npp_console enable
|
||||
|
||||
|
||||
|
||||
::ReadLongText
|
||||
npp_console keep
|
||||
|
||||
npp_sendmsg WM_COMMAND IDM_VIEW_CLONE_TO_ANOTHER_VIEW
|
||||
sci_sendmsg SCI_PAGEDOWN
|
||||
npp_sendmsg WM_COMMAND IDM_VIEW_SYNSCROLLV
|
||||
|
||||
|
||||
|
||||
::TrimTrailingSpace
|
||||
npp_console keep
|
||||
npp_sendmsg WM_COMMAND IDM_EDIT_TRIMTRAILING
|
@ -1 +0,0 @@
|
||||
{"nodes":[{"leaves":["::StartupScript"],"name":"StartupScript"},{"leaves":["::MultipleSelectAddNext"],"name":"MultipleSelectAddNext"},{"leaves":["::MultipleSelectAddEach"],"name":"MultipleSelectAddEach"},{"leaves":["::SetSingleEdgeLine"],"name":"SetSingleEdgeLine"},{"leaves":["::ConfigSingleEdgeLine"],"name":"ConfigSingleEdgeLine"},{"leaves":["::SingleEdgeLineOn"],"name":"SingleEdgeLineOn"},{"leaves":["::MultipleEdgeLinesOn"],"name":"MultipleEdgeLinesOn"},{"leaves":["::BackgroundEdgeOn"],"name":"BackgroundEdgeOn"},{"leaves":["::EdgesOff"],"name":"EdgesOff"},{"leaves":["::WrapSelectedLinesAtEdge","ForLoopStart","ForLoopEnd","DoWrap"],"name":"WrapSelectedLinesAtEdge"},{"leaves":["::DeleteLinesFrom2ndView","ProcessSearchTerms","ReplaceLoop","ReplaceLoopEnd","AdvanceToNextLine","End"],"name":"DeleteLinesFrom2ndView"},{"leaves":["::ReadLongText"],"name":"ReadLongText"},{"leaves":["::TrimTrailingSpace"],"name":"TrimTrailingSpace"}],"root":"unitTest"}
|
@ -1,28 +0,0 @@
|
||||
+++
|
||||
title = "Make Your Business Card with Notepad++"
|
||||
description = ""
|
||||
date = "2011-12-25"
|
||||
menu = "main"
|
||||
+++
|
||||
|
||||
2011-12-25
|
||||
|
||||
Notepad++ is not just a text/code editor, you can use it to make your business card:
|
||||
|
||||
|
||||
![Business Card](/news/images/npp.businessCard.jpg)
|
||||
|
||||
Here are some tips/instructions to help you make your original business card with Notepad++:
|
||||
|
||||
1. Hide menu, tab bar and status bar (you probably want to hide tool bar if you have more content to show) via the General tab of Preferences dialog.
|
||||
2. Hide folder margin, bookmark margin, line number margin and current line highlighting via the Editing tab of Preference dialog.
|
||||
3. Check "Show only filename in title bar" via "MISC." tab of Preference Dialog, this removes the full path and keep only the file name on the caption bar.
|
||||
4. Resize Notepad++ to fit the size of your empty business card to print. (I made the Notepad++ size on screen just fit my card)
|
||||
5.Type the content of your business card with your favorite programming language (html, xml, php, c, c++, etc...) then set the language's syntax highlighting via menu Language (type "Alt" to show menu).
|
||||
6. Launch "Style Configurator" Dialog (via menu "Settings") to tune up the syntax highlighting of your language of choice (for the bg/fg colour, font style and font size). You can choose the theme (on the top) as well to have the different look & feel. Save & close it.
|
||||
7. Print your card - Do the screen capture by "Alt + Print Screen", Then paste it into Word to print.
|
||||
8. That's it. Enjoy making your geek business card!
|
||||
|
||||
The original idea came from [Albert Hwang's Notepad Business Card](https://www.albert-hwang.com/blog/2011/12/re-my-business-card).
|
||||
|
||||
Happy Isaac Newton's Birthday!
|
@ -1 +0,0 @@
|
||||
{"leaves":["(/news/images/npp.businessCard.jpg)","(you probably want to hide tool bar if you have more content to show)","(I made the Notepad++ size on screen just fit my card)","(html, xml, php, c, c++, etc...)","(type \"Alt\" to show menu)","(via menu \"Settings\")","(for the bg/fg colour, font style and font size)","(on the top)","(https://www.albert-hwang.com/blog/2011/12/re-my-business-card)"],"root":"unitTest"}
|
@ -1,57 +0,0 @@
|
||||
# This script does 1 unit-test on given relative dir path and on given language.
|
||||
# Here's its syntax:
|
||||
# .\unit-test.ps1 RELATIVE_PATH LANG
|
||||
# It return 0 if result is OK
|
||||
# -1 if result is KO
|
||||
# -2 if exception
|
||||
# 1 if unitTest file not found
|
||||
|
||||
|
||||
$testRoot = ".\"
|
||||
|
||||
$dirName=$args[0]
|
||||
$langName=$args[1]
|
||||
|
||||
Try {
|
||||
if ((Get-Item $testRoot$dirName) -is [System.IO.DirectoryInfo])
|
||||
{
|
||||
if (-Not (Test-Path $testRoot$dirName\unitTest))
|
||||
{
|
||||
return 1
|
||||
}
|
||||
if ($langName.StartsWith("udl-"))
|
||||
{
|
||||
$langName = $langName.Replace("udl-", "")
|
||||
..\..\bin\notepad++.exe -export=functionList -udl="$langName" $testRoot$dirName\unitTest | Out-Null
|
||||
}
|
||||
else
|
||||
{
|
||||
..\..\bin\notepad++.exe -export=functionList -l"$langName" $testRoot$dirName\unitTest | Out-Null
|
||||
}
|
||||
|
||||
$expectedRes = Get-Content $testRoot$dirName\unitTest.expected.result
|
||||
$generatedRes = Get-Content $testRoot$dirName\unitTest.result.json
|
||||
|
||||
# Some parser results contain CRLF or LF (\r\n or \n) dependent of file EOL format
|
||||
# In order to make tests pass in any environment, all the CRLF turning into LF (if any) in both strings
|
||||
$expectedRes = $expectedRes.replace('\r\n','\n')
|
||||
$generatedRes = $generatedRes.replace('\r\n','\n')
|
||||
|
||||
if ($generatedRes -eq $expectedRes)
|
||||
{
|
||||
Remove-Item $testRoot$dirName\unitTest.result.json
|
||||
return 0
|
||||
}
|
||||
else
|
||||
{
|
||||
$expectedRes
|
||||
"`nvs`n"
|
||||
$generatedRes
|
||||
return -1
|
||||
}
|
||||
}
|
||||
}
|
||||
Catch
|
||||
{
|
||||
return -2
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
$testRoot = ".\"
|
||||
|
||||
Get-ChildItem -Path $testRoot -Attribute Directory -Name |
|
||||
Foreach-Object {
|
||||
|
||||
$dirName = (Get-Item $testRoot$_).Name
|
||||
$langName = $dirName
|
||||
$sw = [Diagnostics.Stopwatch]::StartNew()
|
||||
$result = & ".\unitTest.ps1" $dirName $langName
|
||||
$sw.Stop()
|
||||
"Test: " + $sw.Elapsed.TotalMilliseconds + " ms"
|
||||
|
||||
|
||||
if ($result -eq 0)
|
||||
{
|
||||
"$dirName ... OK"
|
||||
}
|
||||
elseif ($result -eq 1)
|
||||
{
|
||||
"$dirName ... unitTest file not found. Test skipped."
|
||||
}
|
||||
elseif ($result -eq -1)
|
||||
{
|
||||
"$dirName ... KO"
|
||||
"result = $result"
|
||||
"There are some problems in your $dirName.xml"
|
||||
exit -1
|
||||
}
|
||||
elseif ($result -eq -2)
|
||||
{
|
||||
"Exception!"
|
||||
exit -1
|
||||
}
|
||||
else
|
||||
{
|
||||
"It should not happen - check your script."
|
||||
exit -1
|
||||
}
|
||||
|
||||
# Check all Sub-directories for other unit-tests
|
||||
Get-ChildItem -Path $testRoot\$dirName -Attribute Directory -Name |
|
||||
Foreach-Object {
|
||||
|
||||
$subDirName = (Get-Item $testRoot$dirName\$_).Name
|
||||
$sw = [Diagnostics.Stopwatch]::StartNew()
|
||||
$subResult = &.\unitTest.ps1 $langName\$subDirName $langName
|
||||
$sw.Stop()
|
||||
"Test:" + $sw.Elapsed.TotalMilliseconds + " ms"
|
||||
if ($subResult -eq 0)
|
||||
{
|
||||
"$dirName-$subDirName ... OK"
|
||||
}
|
||||
elseif ($subResult -eq 1)
|
||||
{
|
||||
"$dirName-$subDirName ... unitTest file not found. Test skipped."
|
||||
}
|
||||
else
|
||||
{
|
||||
"$dirName-$subDirName ... KO"
|
||||
""
|
||||
"There are some problems in your $dirName.xml"
|
||||
exit -1
|
||||
}
|
||||
}
|
||||
}
|
||||
""
|
||||
"All tests are passed."
|
||||
exit 0
|
@ -1,35 +0,0 @@
|
||||
entity ent1 is
|
||||
end entity ent1;
|
||||
|
||||
architecture rtl of ent1 is
|
||||
component compo1 is
|
||||
PORT ( Reset_s : out std_logic);
|
||||
end component compo1;
|
||||
|
||||
component reset_controller is -- comment
|
||||
PORT -- comment
|
||||
( Reset_s : out std_logic);
|
||||
end component reset_controller; -- comment
|
||||
|
||||
begin
|
||||
|
||||
compo1_inst : compo1
|
||||
PORT MAP ( Reset_s =>open);
|
||||
|
||||
rst_controller_inst : component reset_controller
|
||||
PORT MAP ( Reset_s => open); -- comment
|
||||
|
||||
|
||||
|
||||
proc1: process (reset_reset_n, clk_clk)
|
||||
begin
|
||||
end process;
|
||||
|
||||
block1: block is
|
||||
begin
|
||||
end block;
|
||||
|
||||
comp_per_entity : entity work.doing_so port map ( Reset_s => open
|
||||
);
|
||||
|
||||
end architecture rtl; -- of ent1
|
@ -1 +0,0 @@
|
||||
{"leaves":["entity ent1 is","architecture rtl of ent1 is","\tcomponent compo1 is"," component reset_controller is ","proc1: process (reset_reset_n, clk_clk)"," block1: block is","comp_per_entity : entity work.doing_so port map ( Reset_s "],"root":"unitTest"}
|
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252" ?>
|
||||
<NotepadPlus>
|
||||
<GUIConfigs>
|
||||
<!--
|
||||
<GUIConfig name="comment">comment</GUIConfig>
|
||||
-->
|
||||
<GUIConfig name="ToolBar" visible="yes">standard</GUIConfig>
|
||||
<GUIConfig name="StatusBar">show</GUIConfig>
|
||||
<GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="yes" doubleClick2Close="no" vertical="no" multiLine="no" hide="no" quitOnEmpty="no" />
|
||||
<GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
|
||||
<GUIConfig name="UserDefineDlg" position="undocked">hide</GUIConfig>
|
||||
<GUIConfig name="TabSetting" replaceBySpace="no" size="4" />
|
||||
<GUIConfig name="AppPosition" x="0" y="0" width="1100" height="700" isMaximized="no" />
|
||||
<GUIConfig name="noUpdate" intervalDays="15" nextUpdateDate="20180427">no</GUIConfig>
|
||||
<GUIConfig name="Auto-detection">yes</GUIConfig>
|
||||
<GUIConfig name="CheckHistoryFiles">no</GUIConfig>
|
||||
<GUIConfig name="TrayIcon">no</GUIConfig>
|
||||
<GUIConfig name="MaitainIndent">yes</GUIConfig>
|
||||
<GUIConfig name="TagsMatchHighLight" TagAttrHighLight="yes" HighLightNonHtmlZone="no">yes</GUIConfig>
|
||||
<GUIConfig name="RememberLastSession">yes</GUIConfig>
|
||||
<GUIConfig name="DetectEncoding">yes</GUIConfig>
|
||||
<GUIConfig name="NewDocDefaultSettings" format="0" encoding="4" lang="0" codepage="-1" openAnsiAsUTF8="yes" />
|
||||
<GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" gr8="0" gr9="0" gr10="0" gr11="0" gr12="0" langMenuCompact="yes" />
|
||||
<GUIConfig name="Print" lineNumber="yes" printOption="3" headerLeft="" headerMiddle="" headerRight="" footerLeft="" footerMiddle="" footerRight="" headerFontName="" headerFontStyle="0" headerFontSize="0" footerFontName="" footerFontStyle="0" footerFontSize="0" margeLeft="0" margeRight="0" margeTop="0" margeBottom="0" />
|
||||
<GUIConfig name="Backup" action="0" useCustumDir="no" dir="" isSnapshotMode="yes" snapshotBackupTiming="7000" />
|
||||
<GUIConfig name="TaskList">yes</GUIConfig>
|
||||
<GUIConfig name="MRU">yes</GUIConfig>
|
||||
<GUIConfig name="URL">2</GUIConfig>
|
||||
<GUIConfig name="globalOverride" fg="no" bg="no" font="no" fontSize="no" bold="no" italic="no" underline="no" />
|
||||
<GUIConfig name="auto-completion" autoCAction="3" triggerFromNbChar="1" autoCIgnoreNumbers="yes" funcParams="yes" />
|
||||
<GUIConfig name="auto-insert" parentheses="no" brackets="no" curlyBrackets="no" quotes="no" doubleQuotes="no" htmlXmlTag="no" />
|
||||
<GUIConfig name="sessionExt"></GUIConfig>
|
||||
<GUIConfig name="workspaceExt"></GUIConfig>
|
||||
<GUIConfig name="MenuBar">show</GUIConfig>
|
||||
<GUIConfig name="Caret" width="1" blinkRate="600" />
|
||||
<GUIConfig name="ScintillaGlobalSettings" enableMultiSelection="no" />
|
||||
<GUIConfig name="openSaveDir" value="0" defaultDirPath="" />
|
||||
<GUIConfig name="titleBar" short="no" />
|
||||
<GUIConfig name="stylerTheme" path="C:\sources\notepad-plus-plus\PowerEditor\bin\stylers.xml" />
|
||||
<GUIConfig name="wordCharList" useDefault="yes" charsAdded="" />
|
||||
<GUIConfig name="delimiterSelection" leftmostDelimiter="40" rightmostDelimiter="41" delimiterSelectionOnEntireDocument="no" />
|
||||
<GUIConfig name="multiInst" setting="0" />
|
||||
<GUIConfig name="MISC" fileSwitcherWithoutExtColumn="no" backSlashIsEscapeCharacterForSql="yes" newStyleSaveDlg="no" isFolderDroppedOpenFiles="no" docPeekOnTab="no" docPeekOnMap="no" />
|
||||
<GUIConfig name="searchEngine" searchEngineChoice="2" searchEngineCustom="" />
|
||||
<GUIConfig name="SmartHighLight" matchCase="no" wholeWordOnly="yes" useFindSettings="no" onAnotherView="no">yes</GUIConfig>
|
||||
<GUIConfig name="ScintillaPrimaryView" lineNumberMargin="show" bookMarkMargin="show" indentGuideLine="show" folderMarkStyle="box" lineWrapMethod="aligned" currentLineHilitingShow="show" scrollBeyondLastLine="no" disableAdvancedScrolling="no" wrapSymbolShow="hide" Wrap="no" borderEdge="yes" edge="no" edgeNbColumn="80" zoom="0" zoom2="0" whiteSpaceShow="hide" eolShow="hide" borderWidth="2" smoothFont="no" />
|
||||
<GUIConfig name="DockingManager" leftWidth="200" rightWidth="200" topHeight="200" bottomHeight="200">
|
||||
<ActiveTabs cont="0" activeTab="-1" />
|
||||
<ActiveTabs cont="1" activeTab="-1" />
|
||||
<ActiveTabs cont="2" activeTab="-1" />
|
||||
<ActiveTabs cont="3" activeTab="-1" />
|
||||
</GUIConfig>
|
||||
</GUIConfigs>
|
||||
<FindHistory nbMaxFindHistoryPath="10" nbMaxFindHistoryFilter="10" nbMaxFindHistoryFind="10" nbMaxFindHistoryReplace="10" matchWord="no" matchCase="no" wrap="yes" directionDown="yes" fifRecuisive="yes" fifInHiddenFolder="no" dlgAlwaysVisible="no" fifFilterFollowsDoc="no" fifFolderFollowsDoc="no" searchMode="0" transparencyMode="1" transparency="150" dotMatchesNewline="no" isSearch2ButtonsMode="no" />
|
||||
<History nbMaxFile="10" inSubMenu="no" customLength="-1" />
|
||||
<ProjectPanels>
|
||||
<ProjectPanel id="0" workSpaceFile="" />
|
||||
<ProjectPanel id="1" workSpaceFile="" />
|
||||
<ProjectPanel id="2" workSpaceFile="" />
|
||||
</ProjectPanels>
|
||||
</NotepadPlus>
|
@ -1 +0,0 @@
|
||||
{"leaves":["GUIConfig name=\"ToolBar\" visible=\"yes\"","GUIConfig name=\"StatusBar\"","GUIConfig name=\"TabBar\" dragAndDrop=\"yes\" drawTopBar=\"yes\" drawInactiveTab=\"yes\" reduce=\"yes\" closeButton=\"yes\" doubleClick2Close=\"no\" vertical=\"no\" multiLine=\"no\" hide=\"no\" quitOnEmpty=\"no\"","GUIConfig name=\"ScintillaViewsSplitter\"","GUIConfig name=\"UserDefineDlg\" position=\"undocked\"","GUIConfig name=\"TabSetting\" replaceBySpace=\"no\" size=\"4\"","GUIConfig name=\"AppPosition\" x=\"0\" y=\"0\" width=\"1100\" height=\"700\" isMaximized=\"no\"","GUIConfig name=\"noUpdate\" intervalDays=\"15\" nextUpdateDate=\"20180427\"","GUIConfig name=\"Auto-detection\"","GUIConfig name=\"CheckHistoryFiles\"","GUIConfig name=\"TrayIcon\"","GUIConfig name=\"MaitainIndent\"","GUIConfig name=\"TagsMatchHighLight\" TagAttrHighLight=\"yes\" HighLightNonHtmlZone=\"no\"","GUIConfig name=\"RememberLastSession\"","GUIConfig name=\"DetectEncoding\"","GUIConfig name=\"NewDocDefaultSettings\" format=\"0\" encoding=\"4\" lang=\"0\" codepage=\"-1\" openAnsiAsUTF8=\"yes\"","GUIConfig name=\"langsExcluded\" gr0=\"0\" gr1=\"0\" gr2=\"0\" gr3=\"0\" gr4=\"0\" gr5=\"0\" gr6=\"0\" gr7=\"0\" gr8=\"0\" gr9=\"0\" gr10=\"0\" gr11=\"0\" gr12=\"0\" langMenuCompact=\"yes\"","GUIConfig name=\"Print\" lineNumber=\"yes\" printOption=\"3\" headerLeft=\"\" headerMiddle=\"\" headerRight=\"\" footerLeft=\"\" footerMiddle=\"\" footerRight=\"\" headerFontName=\"\" headerFontStyle=\"0\" headerFontSize=\"0\" footerFontName=\"\" footerFontStyle=\"0\" footerFontSize=\"0\" margeLeft=\"0\" margeRight=\"0\" margeTop=\"0\" margeBottom=\"0\"","GUIConfig name=\"Backup\" action=\"0\" useCustumDir=\"no\" dir=\"\" isSnapshotMode=\"yes\" snapshotBackupTiming=\"7000\"","GUIConfig name=\"TaskList\"","GUIConfig name=\"MRU\"","GUIConfig name=\"URL\"","GUIConfig name=\"globalOverride\" fg=\"no\" bg=\"no\" font=\"no\" fontSize=\"no\" bold=\"no\" italic=\"no\" underline=\"no\"","GUIConfig name=\"auto-completion\" autoCAction=\"3\" triggerFromNbChar=\"1\" autoCIgnoreNumbers=\"yes\" funcParams=\"yes\"","GUIConfig name=\"auto-insert\" parentheses=\"no\" brackets=\"no\" curlyBrackets=\"no\" quotes=\"no\" doubleQuotes=\"no\" htmlXmlTag=\"no\"","GUIConfig name=\"sessionExt\"","GUIConfig name=\"workspaceExt\"","GUIConfig name=\"MenuBar\"","GUIConfig name=\"Caret\" width=\"1\" blinkRate=\"600\"","GUIConfig name=\"ScintillaGlobalSettings\" enableMultiSelection=\"no\"","GUIConfig name=\"openSaveDir\" value=\"0\" defaultDirPath=\"\"","GUIConfig name=\"titleBar\" short=\"no\"","GUIConfig name=\"stylerTheme\" path=\"C:\\sources\\notepad-plus-plus\\PowerEditor\\bin\\stylers.xml\"","GUIConfig name=\"wordCharList\" useDefault=\"yes\" charsAdded=\"\"","GUIConfig name=\"delimiterSelection\" leftmostDelimiter=\"40\" rightmostDelimiter=\"41\" delimiterSelectionOnEntireDocument=\"no\"","GUIConfig name=\"multiInst\" setting=\"0\"","GUIConfig name=\"MISC\" fileSwitcherWithoutExtColumn=\"no\" backSlashIsEscapeCharacterForSql=\"yes\" newStyleSaveDlg=\"no\" isFolderDroppedOpenFiles=\"no\" docPeekOnTab=\"no\" docPeekOnMap=\"no\"","GUIConfig name=\"searchEngine\" searchEngineChoice=\"2\" searchEngineCustom=\"\"","GUIConfig name=\"SmartHighLight\" matchCase=\"no\" wholeWordOnly=\"yes\" useFindSettings=\"no\" onAnotherView=\"no\"","GUIConfig name=\"ScintillaPrimaryView\" lineNumberMargin=\"show\" bookMarkMargin=\"show\" indentGuideLine=\"show\" folderMarkStyle=\"box\" lineWrapMethod=\"aligned\" currentLineHilitingShow=\"show\" scrollBeyondLastLine=\"no\" disableAdvancedScrolling=\"no\" wrapSymbolShow=\"hide\" Wrap=\"no\" borderEdge=\"yes\" edge=\"no\" edgeNbColumn=\"80\" zoom=\"0\" zoom2=\"0\" whiteSpaceShow=\"hide\" eolShow=\"hide\" borderWidth=\"2\" smoothFont=\"no\"","GUIConfig name=\"DockingManager\" leftWidth=\"200\" rightWidth=\"200\" topHeight=\"200\" bottomHeight=\"200\"","ActiveTabs cont=\"0\" activeTab=\"-1\"","ActiveTabs cont=\"1\" activeTab=\"-1\"","ActiveTabs cont=\"2\" activeTab=\"-1\"","ActiveTabs cont=\"3\" activeTab=\"-1\"","FindHistory nbMaxFindHistoryPath=\"10\" nbMaxFindHistoryFilter=\"10\" nbMaxFindHistoryFind=\"10\" nbMaxFindHistoryReplace=\"10\" matchWord=\"no\" matchCase=\"no\" wrap=\"yes\" directionDown=\"yes\" fifRecuisive=\"yes\" fifInHiddenFolder=\"no\" dlgAlwaysVisible=\"no\" fifFilterFollowsDoc=\"no\" fifFolderFollowsDoc=\"no\" searchMode=\"0\" transparencyMode=\"1\" transparency=\"150\" dotMatchesNewline=\"no\" isSearch2ButtonsMode=\"no\"","History nbMaxFile=\"10\" inSubMenu=\"no\" customLength=\"-1\"","ProjectPanel id=\"0\" workSpaceFile=\"\"","ProjectPanel id=\"1\" workSpaceFile=\"\"","ProjectPanel id=\"2\" workSpaceFile=\"\""],"root":"unitTest"}
|
@ -1,6 +0,0 @@
|
||||
-- Startup script for URL detection verification test
|
||||
endNppAfterUrlTest = 1
|
||||
local nppDir = npp:GetNppDirectory()
|
||||
local verifyUrlDetection = loadfile(nppDir .."\\" .. "..\\Test\\UrlDetection\\verifyUrlDetection.lua")
|
||||
pcall(verifyUrlDetection)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,70 +0,0 @@
|
||||
What is the URL detection test
|
||||
------------------------------
|
||||
|
||||
The URL detection test is designed to check,
|
||||
whether the clickable detection works as expected or not.
|
||||
|
||||
It uses text files as input. These text files contain a pair of
|
||||
lines for each URL to test. The first line contains the URL, the
|
||||
second line contains a sequence of characters, which are a mask,
|
||||
consisting of '0' or '1' characters, describing whether this
|
||||
position in the line should be detected as URL.
|
||||
|
||||
Example:
|
||||
|
||||
u http://dot.com u
|
||||
m 11111111111111 m
|
||||
|
||||
As can be seen, the URL is enclosed in "u " and " u", the mask
|
||||
is enclosed in "m " and " m". The mask line must follow the URL
|
||||
line immediately. A '1' in the mask line says, that this position
|
||||
should be detected as URL, a '0' says the opposite.
|
||||
|
||||
It is possible, to put arbitrary text between the pairs of test
|
||||
lines, to comment the test cases. Obviously, none of the comment
|
||||
lines should start and end with a single 'u' or 'm' character.
|
||||
|
||||
The test files can also be regarded as living document about what
|
||||
is currently detected as URL and what not.
|
||||
|
||||
|
||||
|
||||
How to conduct the URL detection test
|
||||
-------------------------------------
|
||||
|
||||
Since the URL detection only takes place in the visible part of
|
||||
the edit windows, the test can only be run from inside an opened
|
||||
Notepad++ with a visible edit window.
|
||||
|
||||
Since the test script is written in Lua, a prerequisite to conduct
|
||||
the test is, that the Lua plugin is installed. The plugin can be found
|
||||
at https://github.com/dail8859/LuaScript/releases.
|
||||
|
||||
To conduct the test:
|
||||
|
||||
1. Open the verifyUrlDetection.lua with Notepad++.
|
||||
2. Display the Lua console window (Plugins --> LuaScript --> Show Console)
|
||||
3. Execute the opened script file (Plugins --> LuaScript --> Execute Current File)
|
||||
|
||||
The test results will be displayed in the Lua console window.
|
||||
|
||||
!!! Please be aware, that there should NO keyboard or mouse or whatever
|
||||
input be applied to Notepad++ while this test is running.
|
||||
|
||||
|
||||
|
||||
|
||||
How to extend the URL detection test
|
||||
------------------------------------
|
||||
|
||||
It is possible to add test files to the URL detection test
|
||||
by copying the new files into this directory and include the filenames
|
||||
in the testFiles list at the beginning of verifyUrlDetection.lua.
|
||||
|
||||
|
||||
|
||||
Automated version of the URL detection test
|
||||
-------------------------------------------
|
||||
|
||||
An automated version of the test can be conducted by running verifyUrlDetection.ps1.
|
||||
This is mainly to run the test in Appveyor.
|
@ -1,194 +0,0 @@
|
||||
local testFiles = {"verifyUrlDetection_1a",
|
||||
"verifyUrlDetection_1b"}
|
||||
local URL_INDIC = 8
|
||||
local timerInterval = 10
|
||||
|
||||
local curPos = 0
|
||||
local task = -1
|
||||
local uFrom = 0
|
||||
local uTo = 0
|
||||
local mFrom = 0
|
||||
local mTo = 0
|
||||
local OKorKO = "OK"
|
||||
local nFile = 1
|
||||
local testResults = {}
|
||||
local outFile = nil
|
||||
|
||||
local function Summary()
|
||||
local resLine = ""
|
||||
local i = 1
|
||||
while testFiles[i] ~= nil do
|
||||
if testResults[i] == nil then
|
||||
testResults[i] = "KO"
|
||||
end
|
||||
print(testFiles[i] .. ": " .. testResults[i])
|
||||
i = i + 1
|
||||
end
|
||||
print(resLine)
|
||||
if endNppAfterUrlTest ~= nil then
|
||||
npp:MenuCommand(IDM_FILE_EXIT)
|
||||
end
|
||||
end
|
||||
|
||||
local function nextFile()
|
||||
local fileAvail = false
|
||||
if outFile ~= nil then
|
||||
io.close(outFile)
|
||||
end
|
||||
while (not fileAvail) and (testFiles[nFile] ~= nil) do
|
||||
local fileName = npp:GetNppDirectory() .. "\\..\\Test\\UrlDetection\\" .. testFiles[nFile]
|
||||
fileAvail = npp:SwitchToFile(fileName)
|
||||
if not fileAvail then
|
||||
local f = io.open(fileName,"r")
|
||||
if f~=nil then
|
||||
io.close(f)
|
||||
fileAvail = npp:DoOpen(fileName)
|
||||
end
|
||||
end
|
||||
-- print("Verifying " .. testFiles[nFile] .. " ...")
|
||||
print("Verifying " .. npp:GetFileName() .. " ...")
|
||||
if fileAvail then
|
||||
local outFileName = fileName .. ".result"
|
||||
outFile = io.open(outFileName,"w")
|
||||
if outFile == nil then
|
||||
testResults[nFile] = "KO"
|
||||
print("KO", "Cannot open output file \""..fileName.."\"")
|
||||
print()
|
||||
nFile = nFile + 1;
|
||||
end
|
||||
else
|
||||
testResults[nFile] = "KO"
|
||||
print("KO", "Cannot open file \""..fileName.."\"")
|
||||
print()
|
||||
nFile = nFile + 1;
|
||||
end
|
||||
end
|
||||
return fileAvail
|
||||
end
|
||||
|
||||
local function scrollToNextURL()
|
||||
editor.TargetStart = curPos
|
||||
editor.TargetEnd = editor.Length
|
||||
editor.SearchFlags = SCFIND_REGEXP
|
||||
local iRes = editor:SearchInTarget("^u .+ u$")
|
||||
if iRes >= 0 then
|
||||
uFrom = editor.TargetStart
|
||||
uTo = editor.TargetEnd
|
||||
editor.TargetStart = uFrom
|
||||
editor.TargetEnd = editor.Length
|
||||
iRes = editor:SearchInTarget("^m .+ m$")
|
||||
if iRes >= 0 then
|
||||
mFrom = editor.TargetStart
|
||||
mTo = editor.TargetEnd
|
||||
local ln1 = editor:LineFromPosition(uFrom)
|
||||
local ln2 = editor:LineFromPosition(mFrom)
|
||||
if (ln1+1) == ln2 then
|
||||
editor:ScrollRange(mTo, uFrom)
|
||||
return 1
|
||||
else
|
||||
editor:GotoPos(mFrom)
|
||||
OKorKO = "KO"
|
||||
print("KO", "Mask line not following immediately after URL line")
|
||||
return -1
|
||||
end
|
||||
else
|
||||
OKorKO = "KO"
|
||||
print ("KO", "Mask line not found")
|
||||
return -1
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
local function verifyURL()
|
||||
local mMsk = editor:textrange(mFrom, mTo)
|
||||
editor:GotoPos(uFrom + 2)
|
||||
local uMsk = "m "
|
||||
local limit = mTo - mFrom -- if something goes wrong, edit.CurrentPos may never reach (uTo - 2).
|
||||
while (editor.CurrentPos < uTo - 2) and (limit >= 0) do
|
||||
if editor:IndicatorValueAt(URL_INDIC, editor.CurrentPos) == 0 then
|
||||
uMsk = uMsk .. "0"
|
||||
else
|
||||
uMsk = uMsk .. "1"
|
||||
end
|
||||
editor:CharRight()
|
||||
limit = limit - 1
|
||||
end
|
||||
local Res = 0
|
||||
if limit >= 0 then
|
||||
if editor:textrange(editor.CurrentPos, editor.CurrentPos + 2) == " u" then
|
||||
uMsk = uMsk .. " m"
|
||||
if uMsk == mMsk then
|
||||
outFile:write("OK", "\t", editor:textrange(uFrom, uTo), "\n")
|
||||
Res = 1
|
||||
else
|
||||
outFile:write("KO", "\t", editor:textrange(uFrom, uTo), "\n")
|
||||
outFile:write("ok", "\t", mMsk, "\n")
|
||||
outFile:write("ko", "\t", uMsk, "\n")
|
||||
print("KO", "\t", editor:textrange(uFrom, uTo))
|
||||
print("ok", "\t", mMsk)
|
||||
print("ko", "\t", uMsk)
|
||||
OKorKO = "KO"
|
||||
Res = 1
|
||||
end
|
||||
end
|
||||
else
|
||||
outFile:write("KO", "\t", "internal error", "\n")
|
||||
OKorKO = "KO"
|
||||
end
|
||||
return Res
|
||||
end
|
||||
|
||||
local function goForward(timer)
|
||||
if task < 0 then
|
||||
task = task + 1
|
||||
if task == 0 then
|
||||
if not nextFile() then
|
||||
npp.StopTimer(timer)
|
||||
Summary()
|
||||
end
|
||||
end
|
||||
elseif task == 0 then
|
||||
local urlAvail = scrollToNextURL()
|
||||
if urlAvail == 1 then
|
||||
task = 1
|
||||
else
|
||||
npp.StopTimer(timer)
|
||||
print(OKorKO)
|
||||
print()
|
||||
testResults[nFile] = OKorKO
|
||||
if urlAvail == 0 then
|
||||
nFile = nFile + 1
|
||||
if nextFile() then
|
||||
task = 0
|
||||
curPos = 0
|
||||
OKorKO = "OK"
|
||||
npp.StartTimer(timerInterval, goForward)
|
||||
else
|
||||
Summary()
|
||||
end
|
||||
else
|
||||
Summary()
|
||||
end
|
||||
end
|
||||
elseif task == 1 then
|
||||
if verifyURL() == 0 then
|
||||
npp.StopTimer(timer)
|
||||
print()
|
||||
Summary()
|
||||
else
|
||||
curPos = mTo
|
||||
task = 0
|
||||
end
|
||||
else
|
||||
npp.stopTimer(timer)
|
||||
print("KO", "Internal impossibility")
|
||||
print()
|
||||
Summary()
|
||||
end
|
||||
end
|
||||
|
||||
npp.ClearConsole()
|
||||
npp.StartTimer(timerInterval, goForward)
|
||||
|
@ -1,61 +0,0 @@
|
||||
try {
|
||||
$binDir = '..\..\Bin'
|
||||
$pluginsDir = $binDir + '\plugins'
|
||||
$pluginsSaveDir = $binDir + '\plugins_save'
|
||||
|
||||
if (Test-Path -Path $pluginsDir -PathType Container)
|
||||
{
|
||||
if (Test-Path -Path $pluginsSaveDir -PathType Container)
|
||||
{
|
||||
"Backup for plugins directory already exists"
|
||||
exit -1
|
||||
}
|
||||
"Backing up plugin directory ..."
|
||||
Move-Item $pluginsDir $pluginsSaveDir
|
||||
}
|
||||
"Installing Lua plugin for testing ..."
|
||||
Copy-Item -Path .\plugins -Destination $binDir -Recurse
|
||||
|
||||
"Testing ..."
|
||||
Invoke-Expression ($binDir + "\notepad++.exe | Out-Null")
|
||||
|
||||
if (Test-Path -Path $pluginsSaveDir -PathType Container)
|
||||
{
|
||||
"Removing Lua plugin ..."
|
||||
Remove-Item -Path $pluginsDir -Recurse -Force
|
||||
"Restoring plugin directory ..."
|
||||
Move-Item $pluginsSaveDir $pluginsDir
|
||||
}
|
||||
|
||||
$expectedRes = Get-Content .\verifyUrlDetection_1a.expected.result
|
||||
$generatedRes = Get-Content .\verifyUrlDetection_1a.result
|
||||
|
||||
if (Compare-Object -ReferenceObject $expectedRes -DifferenceObject $generatedRes)
|
||||
{
|
||||
"Unexpected test results for verifyUrlDetection_1a"
|
||||
exit -1
|
||||
}
|
||||
else
|
||||
{
|
||||
Remove-Item .\verifyUrlDetection_1a.result
|
||||
$expectedRes = Get-Content .\verifyUrlDetection_1b.expected.result
|
||||
$generatedRes = Get-Content .\verifyUrlDetection_1b.result
|
||||
if (Compare-Object -ReferenceObject $expectedRes -DifferenceObject $generatedRes)
|
||||
{
|
||||
"Unexpected test results for verifyUrlDetection_1b"
|
||||
exit -1
|
||||
}
|
||||
else
|
||||
{
|
||||
Remove-Item .\verifyUrlDetection_1b.result
|
||||
"URL detection test OK"
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
"Unexpected behavior while URL detection test"
|
||||
exit -1
|
||||
}
|
||||
|
@ -1,507 +0,0 @@
|
||||
=== URLs which are handled OK so far ===
|
||||
|
||||
u http://test.com u
|
||||
m 111111111111111 m
|
||||
|
||||
u HTTP://UPCASE.UP u
|
||||
m 1111111111111111 m
|
||||
|
||||
u http: u
|
||||
m 00000 m
|
||||
|
||||
u mailto: u
|
||||
m 0000000 m
|
||||
|
||||
|
||||
|
||||
Preceding none-whitespace characters:
|
||||
|
||||
u !http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u "http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u #http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u $http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u %http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u &http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u 'http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u (http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u )http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u *http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u +http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ,http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u -http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u .http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u /http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u 1http://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u 9http://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u :http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ;http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u <http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u >http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ?http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u @http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u Ahttp://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u Zhttp://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u [http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u \http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ]http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ^http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u _http://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u `http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ahttp://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u zhttp://test.com u
|
||||
m 0000000000000000 m
|
||||
|
||||
u {http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u |http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u }http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
u ~http://test.com u
|
||||
m 0111111111111111 m
|
||||
|
||||
|
||||
|
||||
Query parsing:
|
||||
|
||||
u https://duckduckgo.com/?q=windows+delete+"GameBarPresenceWriter.exe" u
|
||||
m 11111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u "https://duckduckgo.com/?q=windows+delete+"GameBarPresenceWriter.exe"" u
|
||||
m 0111111111111111111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u "https://duckduckgo.com/?q=windows+delete+"GameBarPresenceWriter.exe" u
|
||||
m 011111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u "https://duckduckgo/com/?q=windows+delete+GameBarPresenceWriter.exe" u
|
||||
m 01111111111111111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u "https://duckduckgo.com/?q=windows+delete+""GameBarPresenceWriter.exe" u
|
||||
m 0111111111111111111111111111111111111111111100000000000000000000000000 m
|
||||
|
||||
u https://www.youtube.com/watch?v=VmcftreqQ6E&list=PnQIRE5O5JpiLL&index=xxx u
|
||||
m 1111111111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
|
||||
|
||||
Space detection:
|
||||
|
||||
u "http://github.com/notepad-plus-plus/notepad-plus-plus" u
|
||||
m 0111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u "https://github.com /notepad-plus-plus/notepad-plus-plus" u
|
||||
m 011111111111111111100000000000000000000000000000000000000 m
|
||||
|
||||
u "https://github.com/notepad plus plus/notepad-plus-plus" u
|
||||
m 01111111111111111111111111100000000000000000000000000000 m
|
||||
|
||||
|
||||
|
||||
Unwanted trailing character removal:
|
||||
|
||||
u (https://github.com/notepad-plus-plus/notepad-plus-plus) u
|
||||
m 01111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u [https://github.com/notepad-plus-plus/notepad-plus-plus] u
|
||||
m 01111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u https://github.com/notepad-plus-plus/notepad-plus-plus; u
|
||||
m 1111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u https://github.com/notepad-plus-plus/notepad-plus-plus? u
|
||||
m 1111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u https://github.com/notepad-plus-plus/notepad-plus-plus! u
|
||||
m 1111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u https://github.com/notepad-plus-plus/notepad-plus-plus# u
|
||||
m 1111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u http://github.com/notepad-plus-plus/notepad-plus-plus#fragment u
|
||||
m 11111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u (e.g., https://en.wikipedia.org/wiki/Saw_(2003_film))? u
|
||||
m 000000011111111111111111111111111111111111111111111100 m
|
||||
|
||||
u (https://en.wikipedia.org/wiki/Saw_(2003_film)) u
|
||||
m 01111111111111111111111111111111111111111111110 m
|
||||
|
||||
u (https://en.wikipedia.org/wiki/Saw_2003_film) u
|
||||
m 011111111111111111111111111111111111111111110 m
|
||||
|
||||
u [https://en.wikipedia.org/wiki/Saw_[2003_film]] u
|
||||
m 01111111111111111111111111111111111111111111110 m
|
||||
|
||||
|
||||
|
||||
International characters:
|
||||
|
||||
u https://apache-windows.ru/как-установить-сервер-apache-c-php-mysql-и-phpmyadmin-на-windows/ u
|
||||
m 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u https://www.rnids.rs/национални-домени/регистрација-националних-домена u
|
||||
m 1111111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u https://www.morfix.co.il/שלום u
|
||||
m 11111111111111111111111111111 m
|
||||
|
||||
u https://www.amazon.fr/GRÜNTEK-Ebrancheur-Cisailles-crémaillère-SATISFAIT/dp/B01COZUA4E/ u
|
||||
m 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u https://www.amazon.fr/Gardena-coupe-branches-TeleCut-520-670-télescopiques/dp/B07JLJ4N44/ u
|
||||
m 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
|
||||
|
||||
Instagram links:
|
||||
|
||||
u https://ig.com/?query=c761&vars={"id":"0815","first":100} u
|
||||
m 111111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u {https://ig.com/?query=c761&vars={"id":"0815","first":100}} u
|
||||
m 01111111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u [https://ig.com/?query=c761&vars={"id":"0815","first":100}] u
|
||||
m 01111111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
u "https://ig.com/?query=c761&vars={"id":"0815","first":100}" u
|
||||
m 01111111111111111111111111111111111111111111111111111111110 m
|
||||
|
||||
|
||||
|
||||
Links in LaTeX:
|
||||
|
||||
u \href{https://weblink.com/}{click me} u
|
||||
m 0000001111111111111111111100000000000 m
|
||||
|
||||
u \href{https://ig.com/?query=c761&vars={"id":"0815","first":100}}{click me} u
|
||||
m 00000011111111111111111111111111111111111111111111111111111111100000000000 m
|
||||
|
||||
========
|
||||
|
||||
Quotation mark
|
||||
- forbidden in name and path (delimiter)
|
||||
- parsed in query part as quoting character,
|
||||
overriding all other quoting characters
|
||||
|
||||
u http://xxx.xxx/xxx"xxx" u
|
||||
m 11111111111111111100000 m
|
||||
|
||||
u http://xxx.xxx/?q="A"+"B"" u
|
||||
m 11111111111111111111111110 m
|
||||
|
||||
u http://xxx.xxx/?q="A'+'B{}`'"" u
|
||||
m 111111111111111111111111111110 m
|
||||
|
||||
========
|
||||
|
||||
Apostrophe
|
||||
- allowed unrestricted in name and path
|
||||
- parsed in query part as quoting character,
|
||||
overriding all other quoting characters
|
||||
|
||||
u https://en.wikipedia.org/wiki/Murphy's_law u
|
||||
m 111111111111111111111111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/xxx'xxx' u
|
||||
m 11111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/xxx'xxx'' u
|
||||
m 111111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/?q='A'+'B'' u
|
||||
m 11111111111111111111111110 m
|
||||
|
||||
u http://xxx.xxx/?q='A'+'B'' u
|
||||
m 11111111111111111111111110 m
|
||||
|
||||
u http://xxx.xxx/?q='A'+'B"{}`'' u
|
||||
m 111111111111111111111111111110 m
|
||||
|
||||
========
|
||||
|
||||
Grave accent
|
||||
- allowed unrestricted in name and path
|
||||
- parsed in query part as quoting character,
|
||||
overriding all other quoting characters
|
||||
|
||||
u http://xxx.xxx/Tom`s_sisters u
|
||||
m 1111111111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/Tom`s%20sisters` u
|
||||
m 1111111111111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/Tom`s%20sisters`` u
|
||||
m 11111111111111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/?q=`A`+`B` u
|
||||
m 1111111111111111111111111 m
|
||||
|
||||
u http://xxx.xxx/?q=`A`+`B`` u
|
||||
m 11111111111111111111111110 m
|
||||
|
||||
u http://xxx.xxx/?q=`A"{}()'`` u
|
||||
m 1111111111111111111111111110 m
|
||||
|
||||
========
|
||||
|
||||
Parentheses
|
||||
- allowed in name and path
|
||||
- closing parenthesis at end of path is removed,
|
||||
if there are no other parentheses in path,
|
||||
except pairing parentheses
|
||||
- parsed in query part as quoting character,
|
||||
overriding all other quoting characters
|
||||
|
||||
- no other parentheses in path, remove last closing parenthesis
|
||||
u http://xxx.xxx/xxx) u
|
||||
m 1111111111111111110 m
|
||||
|
||||
- pairing parentheses in path: remove last closing unpaired parenthesis
|
||||
u http://xxx.xxx/xxx(xxx)) u
|
||||
m 111111111111111111111110 m
|
||||
|
||||
- pairing parentheses in path: remove last closing unpaired parenthesis
|
||||
u http://xxx.xxx/xxx((xxx))) u
|
||||
m 11111111111111111111111110 m
|
||||
|
||||
- pairing parenthesis in path: keep last closing paired parenthesis
|
||||
u http://xxx.xxx/xxx(xxx) u
|
||||
m 11111111111111111111111 m
|
||||
|
||||
- pairing parentheses in path: remove last closing unpaired parenthesis
|
||||
u http://xxx.xxx/xxx()xxx) u
|
||||
m 111111111111111111111110 m
|
||||
|
||||
- arbitrary parentheses in path: keep last closing parenthesis
|
||||
u http://xxx.xxx/xxx)) u
|
||||
m 11111111111111111111 m
|
||||
|
||||
- arbitrary parentheses in path: keep last closing parenthesis
|
||||
u http://xxx.xxx/xxx)(xxx) u
|
||||
m 111111111111111111111111 m
|
||||
|
||||
- arbitrary parentheses in path: keep last closing parenthesis
|
||||
u http://xxx.xxx/xxx)(xxx)) u
|
||||
m 1111111111111111111111111 m
|
||||
|
||||
- arbitrary parentheses in path: keep last closing parenthesis
|
||||
u http://xxx.xxx/xxx((xxx) u
|
||||
m 111111111111111111111111 m
|
||||
|
||||
- arbitrary parentheses in path: keep last closing parenthesis
|
||||
u http://xxx.xxx/xxx)((xxx) u
|
||||
m 1111111111111111111111111 m
|
||||
|
||||
- parentheses in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=(xxx)) u
|
||||
m 111111111111111111111111110 m
|
||||
|
||||
- parentheses in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=(xxx)( u
|
||||
m 111111111111111111111111110 m
|
||||
|
||||
- parentheses in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=(xxx)( u
|
||||
m 111111111111111111111111110 m
|
||||
|
||||
- parentheses in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=(xxx)&(xxx)( u
|
||||
m 111111111111111111111111111111110 m
|
||||
|
||||
========
|
||||
|
||||
Square brackets
|
||||
- allowed in name and path
|
||||
- closing square bracket at end of path is removed,
|
||||
if there are no other square brackets in path,
|
||||
except pairing square brackets
|
||||
- parsed in query part as quoting characters,
|
||||
overriding all other quoting characters
|
||||
|
||||
- no other square brackets in path, remove last closing square bracket
|
||||
u http://xxx.xxx/xxx] u
|
||||
m 1111111111111111110 m
|
||||
|
||||
- pairing square brackets in path: remove last closing unpaired square bracket
|
||||
u http://xxx.xxx/xxx[xxx]] u
|
||||
m 111111111111111111111110 m
|
||||
|
||||
- pairing square brackets in path: remove last closing unpaired square bracket
|
||||
u http://xxx.xxx/xxx[[xxx]]] u
|
||||
m 11111111111111111111111110 m
|
||||
|
||||
- pairing square brackets in path: keep last closing paired square bracket
|
||||
u http://xxx.xxx/xxx[xxx] u
|
||||
m 11111111111111111111111 m
|
||||
|
||||
- pairing square brackets in path: remove last closing unpaired square bracket
|
||||
u http://xxx.xxx/xxx[]xxx] u
|
||||
m 111111111111111111111110 m
|
||||
|
||||
- arbitrary square brackets in path: keep last closing square bracket
|
||||
u http://xxx.xxx/xxx]] u
|
||||
m 11111111111111111111 m
|
||||
|
||||
- arbitrary square brackets in path: keep last closing square bracket
|
||||
u http://xxx.xxx/xxx][xxx] u
|
||||
m 111111111111111111111111 m
|
||||
|
||||
- arbitrary square brackets in path: keep last closing square bracket
|
||||
u http://xxx.xxx/xxx][xxx]] u
|
||||
m 1111111111111111111111111 m
|
||||
|
||||
- arbitrary square brackets in path: keep last closing square bracket
|
||||
u http://xxx.xxx/xxx[[xxx] u
|
||||
m 111111111111111111111111 m
|
||||
|
||||
- arbitrary square brackets in path: keep last closing square bracket
|
||||
u http://xxx.xxx/xxx][[xxx] u
|
||||
m 1111111111111111111111111 m
|
||||
|
||||
- square brackets in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=[xxx]] u
|
||||
m 111111111111111111111111110 m
|
||||
|
||||
- square brackets in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=[xxx][ u
|
||||
m 111111111111111111111111110 m
|
||||
|
||||
- square brackets in query part: end after last closing quote of query part
|
||||
u )http://xxx.xxx/xxx?q=[xxx][ u
|
||||
m 0111111111111111111111111110 m
|
||||
|
||||
- square brackets in query part: end after last closing quote of query part
|
||||
u http://xxx.xxx/xxx?q=[xxx]&[xxx][ u
|
||||
m 111111111111111111111111111111110 m
|
||||
|
||||
========
|
||||
|
||||
Curly brackets
|
||||
- forbidden in name and path, because of LaTeX
|
||||
- parsed in query part as quoting characters,
|
||||
overriding all other quoting characters
|
||||
|
||||
u http://xxx.xxx/xxx{xxx}} u
|
||||
m 111111111111111111000000 m
|
||||
|
||||
u http://xxx.xxx/xxx{xxx} u
|
||||
m 11111111111111111100000 m
|
||||
|
||||
u http://xxx.xxx/xxx?q={xxx}} u
|
||||
m 111111111111111111111111110 m
|
||||
|
||||
u http://xxx.xxx/xxx?q={xxx};{"[]()''`}} u
|
||||
m 11111111111111111111111111111111111110 m
|
||||
|
||||
========
|
||||
|
||||
Mail:
|
||||
|
||||
u mailto:don.h@free.fr u
|
||||
m 11111111111111111111 m
|
||||
|
||||
u <don.h@free.fr> u
|
||||
m 000000000000000 m
|
||||
|
||||
u <mailto:don.h@free.fr> u
|
||||
m 0111111111111111111110 m
|
||||
|
||||
u http:don.h@free.fr u
|
||||
m 000000000000000000 m
|
||||
|
||||
|
||||
|
||||
FTP:
|
||||
|
||||
u <ftp://ds.internic.net/rfc/rfc977.txt> u
|
||||
m 01111111111111111111111111111111111110 m
|
||||
|
||||
u ftp://host:444/0a_gopher_selector%09%09some_gplus_stuff u
|
||||
m 1111111111111111111111111111111111111111111111111111111 m
|
||||
|
||||
u ftp://host:abc/0a_gopher_selector%09%09some_gplus_stuff u
|
||||
m 0000000000000000000000000000000000000000000000000000000 m
|
||||
|
||||
|
||||
|
||||
FILE:
|
||||
|
||||
u file://Hello%20world.txt u
|
||||
m 111111111111111111111111 m
|
||||
|
||||
u "file://Hello%20world.txt" u
|
||||
m 01111111111111111111111110 m
|
||||
|
||||
u "file://Hello world.txt" u
|
||||
m 011111111111100000000000 m
|
||||
|
||||
u file://127.0.0.1/c$/Tools\Npp%20Test%20Data/Test3/3812.pdf u
|
||||
m 1111111111111111111111111111111111111111111111111111111111 m
|
@ -1,128 +0,0 @@
|
||||
OK u http://test.com u
|
||||
OK u HTTP://UPCASE.UP u
|
||||
OK u http: u
|
||||
OK u mailto: u
|
||||
OK u !http://test.com u
|
||||
OK u "http://test.com u
|
||||
OK u #http://test.com u
|
||||
OK u $http://test.com u
|
||||
OK u %http://test.com u
|
||||
OK u &http://test.com u
|
||||
OK u 'http://test.com u
|
||||
OK u (http://test.com u
|
||||
OK u )http://test.com u
|
||||
OK u *http://test.com u
|
||||
OK u +http://test.com u
|
||||
OK u ,http://test.com u
|
||||
OK u -http://test.com u
|
||||
OK u .http://test.com u
|
||||
OK u /http://test.com u
|
||||
OK u 1http://test.com u
|
||||
OK u 9http://test.com u
|
||||
OK u :http://test.com u
|
||||
OK u ;http://test.com u
|
||||
OK u <http://test.com u
|
||||
OK u >http://test.com u
|
||||
OK u ?http://test.com u
|
||||
OK u @http://test.com u
|
||||
OK u Ahttp://test.com u
|
||||
OK u Zhttp://test.com u
|
||||
OK u [http://test.com u
|
||||
OK u \http://test.com u
|
||||
OK u ]http://test.com u
|
||||
OK u ^http://test.com u
|
||||
OK u _http://test.com u
|
||||
OK u `http://test.com u
|
||||
OK u ahttp://test.com u
|
||||
OK u zhttp://test.com u
|
||||
OK u {http://test.com u
|
||||
OK u |http://test.com u
|
||||
OK u }http://test.com u
|
||||
OK u ~http://test.com u
|
||||
OK u https://duckduckgo.com/?q=windows+delete+"GameBarPresenceWriter.exe" u
|
||||
OK u "https://duckduckgo.com/?q=windows+delete+"GameBarPresenceWriter.exe"" u
|
||||
OK u "https://duckduckgo.com/?q=windows+delete+"GameBarPresenceWriter.exe" u
|
||||
OK u "https://duckduckgo/com/?q=windows+delete+GameBarPresenceWriter.exe" u
|
||||
OK u "https://duckduckgo.com/?q=windows+delete+""GameBarPresenceWriter.exe" u
|
||||
OK u https://www.youtube.com/watch?v=VmcftreqQ6E&list=PnQIRE5O5JpiLL&index=xxx u
|
||||
OK u "http://github.com/notepad-plus-plus/notepad-plus-plus" u
|
||||
OK u "https://github.com /notepad-plus-plus/notepad-plus-plus" u
|
||||
OK u "https://github.com/notepad plus plus/notepad-plus-plus" u
|
||||
OK u (https://github.com/notepad-plus-plus/notepad-plus-plus) u
|
||||
OK u [https://github.com/notepad-plus-plus/notepad-plus-plus] u
|
||||
OK u https://github.com/notepad-plus-plus/notepad-plus-plus; u
|
||||
OK u https://github.com/notepad-plus-plus/notepad-plus-plus? u
|
||||
OK u https://github.com/notepad-plus-plus/notepad-plus-plus! u
|
||||
OK u https://github.com/notepad-plus-plus/notepad-plus-plus# u
|
||||
OK u http://github.com/notepad-plus-plus/notepad-plus-plus#fragment u
|
||||
OK u (e.g., https://en.wikipedia.org/wiki/Saw_(2003_film))? u
|
||||
OK u (https://en.wikipedia.org/wiki/Saw_(2003_film)) u
|
||||
OK u (https://en.wikipedia.org/wiki/Saw_2003_film) u
|
||||
OK u [https://en.wikipedia.org/wiki/Saw_[2003_film]] u
|
||||
OK u https://apache-windows.ru/как-установить-сервер-apache-c-php-mysql-и-phpmyadmin-на-windows/ u
|
||||
OK u https://www.rnids.rs/национални-домени/регистрација-националних-домена u
|
||||
OK u https://www.morfix.co.il/שלום u
|
||||
OK u https://www.amazon.fr/GRÜNTEK-Ebrancheur-Cisailles-crémaillère-SATISFAIT/dp/B01COZUA4E/ u
|
||||
OK u https://www.amazon.fr/Gardena-coupe-branches-TeleCut-520-670-télescopiques/dp/B07JLJ4N44/ u
|
||||
OK u https://ig.com/?query=c761&vars={"id":"0815","first":100} u
|
||||
OK u {https://ig.com/?query=c761&vars={"id":"0815","first":100}} u
|
||||
OK u [https://ig.com/?query=c761&vars={"id":"0815","first":100}] u
|
||||
OK u "https://ig.com/?query=c761&vars={"id":"0815","first":100}" u
|
||||
OK u \href{https://weblink.com/}{click me} u
|
||||
OK u \href{https://ig.com/?query=c761&vars={"id":"0815","first":100}}{click me} u
|
||||
OK u http://xxx.xxx/xxx"xxx" u
|
||||
OK u http://xxx.xxx/?q="A"+"B"" u
|
||||
OK u http://xxx.xxx/?q="A'+'B{}`'"" u
|
||||
OK u https://en.wikipedia.org/wiki/Murphy's_law u
|
||||
OK u http://xxx.xxx/xxx'xxx' u
|
||||
OK u http://xxx.xxx/xxx'xxx'' u
|
||||
OK u http://xxx.xxx/?q='A'+'B'' u
|
||||
OK u http://xxx.xxx/?q='A'+'B'' u
|
||||
OK u http://xxx.xxx/?q='A'+'B"{}`'' u
|
||||
OK u http://xxx.xxx/Tom`s_sisters u
|
||||
OK u http://xxx.xxx/Tom`s%20sisters` u
|
||||
OK u http://xxx.xxx/Tom`s%20sisters`` u
|
||||
OK u http://xxx.xxx/?q=`A`+`B` u
|
||||
OK u http://xxx.xxx/?q=`A`+`B`` u
|
||||
OK u http://xxx.xxx/?q=`A"{}()'`` u
|
||||
OK u http://xxx.xxx/xxx) u
|
||||
OK u http://xxx.xxx/xxx(xxx)) u
|
||||
OK u http://xxx.xxx/xxx(xxx) u
|
||||
OK u http://xxx.xxx/xxx()xxx) u
|
||||
OK u http://xxx.xxx/xxx)) u
|
||||
OK u http://xxx.xxx/xxx)(xxx) u
|
||||
OK u http://xxx.xxx/xxx)(xxx)) u
|
||||
OK u http://xxx.xxx/xxx((xxx) u
|
||||
OK u http://xxx.xxx/xxx)((xxx) u
|
||||
OK u http://xxx.xxx/xxx?q=(xxx)) u
|
||||
OK u http://xxx.xxx/xxx?q=(xxx)( u
|
||||
OK u http://xxx.xxx/xxx?q=(xxx)( u
|
||||
OK u http://xxx.xxx/xxx?q=(xxx)&(xxx)( u
|
||||
OK u http://xxx.xxx/xxx] u
|
||||
OK u http://xxx.xxx/xxx[xxx]] u
|
||||
OK u http://xxx.xxx/xxx[xxx] u
|
||||
OK u http://xxx.xxx/xxx[]xxx] u
|
||||
OK u http://xxx.xxx/xxx]] u
|
||||
OK u http://xxx.xxx/xxx][xxx] u
|
||||
OK u http://xxx.xxx/xxx][xxx]] u
|
||||
OK u http://xxx.xxx/xxx[[xxx] u
|
||||
OK u http://xxx.xxx/xxx][[xxx] u
|
||||
OK u http://xxx.xxx/xxx?q=[xxx]] u
|
||||
OK u http://xxx.xxx/xxx?q=[xxx][ u
|
||||
OK u )http://xxx.xxx/xxx?q=[xxx][ u
|
||||
OK u http://xxx.xxx/xxx?q=[xxx]&[xxx][ u
|
||||
OK u http://xxx.xxx/xxx{xxx}} u
|
||||
OK u http://xxx.xxx/xxx{xxx} u
|
||||
OK u http://xxx.xxx/xxx?q={xxx}} u
|
||||
OK u http://xxx.xxx/xxx?q={xxx};{"[]()''`}} u
|
||||
OK u mailto:don.h@free.fr u
|
||||
OK u <don.h@free.fr> u
|
||||
OK u <mailto:don.h@free.fr> u
|
||||
OK u http:don.h@free.fr u
|
||||
OK u <ftp://ds.internic.net/rfc/rfc977.txt> u
|
||||
OK u ftp://host:444/0a_gopher_selector%09%09some_gplus_stuff u
|
||||
OK u ftp://host:abc/0a_gopher_selector%09%09some_gplus_stuff u
|
||||
OK u file://Hello%20world.txt u
|
||||
OK u "file://Hello%20world.txt" u
|
||||
OK u "file://Hello world.txt" u
|
||||
OK u file://127.0.0.1/c$/Tools\Npp%20Test%20Data/Test3/3812.pdf u
|
@ -1,114 +0,0 @@
|
||||
#!/usr/local/bin/python3
|
||||
|
||||
import os
|
||||
import io
|
||||
import sys
|
||||
|
||||
import requests
|
||||
from hashlib import sha256
|
||||
from lxml import etree
|
||||
|
||||
api_url = os.environ.get('APPVEYOR_API_URL')
|
||||
has_error = False
|
||||
|
||||
|
||||
def post_error(message):
|
||||
global has_error
|
||||
|
||||
has_error = True
|
||||
|
||||
message = {
|
||||
"message": message,
|
||||
"category": "error",
|
||||
"details": ""
|
||||
}
|
||||
|
||||
if api_url:
|
||||
requests.post(api_url + "api/build/messages", json=message)
|
||||
else:
|
||||
from pprint import pprint
|
||||
pprint(message)
|
||||
|
||||
|
||||
def parse_xml_file(filename_xml):
|
||||
|
||||
# open and read schema file
|
||||
#with open(filename_xsd, 'r') as schema_file:
|
||||
#schema_to_check = schema_file.read()
|
||||
|
||||
# open and read xml file
|
||||
#with open(filename_xml, 'r') as xml_file:
|
||||
# xml_to_check = xml_file.read()
|
||||
|
||||
# parse xml
|
||||
try:
|
||||
doc = etree.parse(filename_xml)
|
||||
#print(f'{filename_xml} XML well formed, syntax ok.')
|
||||
|
||||
# check for file IO error
|
||||
except IOError:
|
||||
#print('Invalid File')
|
||||
post_error(f'{filename_xml}: IOError Invalid File')
|
||||
|
||||
|
||||
# check for XML syntax errors
|
||||
except etree.XMLSyntaxError as err:
|
||||
#print('XML Syntax Error, see error_syntax.log')
|
||||
post_error(f'{filename_xml}: {str(err.error_log)}: XMLSyntaxError Invalid File')
|
||||
|
||||
# check for general XML errors
|
||||
except etree.LxmlError as err:
|
||||
#print('XML Error, see error_syntax.log')
|
||||
post_error(f'{filename_xml}: {str(err.error_log)}: LxmlError Invalid File')
|
||||
|
||||
except:
|
||||
#print('Unknown error.')
|
||||
post_error(f'{filename_xml}: Unknown error. Maybe check that no xml version is in the first line.')
|
||||
|
||||
def parse_xml_files_from_APIs_dir():
|
||||
|
||||
for file in os.listdir("PowerEditor/installer/APIs"):
|
||||
if file.endswith(".xml"):
|
||||
#print(os.path.join("PowerEditor/installer/APIs", file))
|
||||
parse_xml_file(os.path.join("PowerEditor/installer/APIs", file))
|
||||
|
||||
def parse_xml_files_from_functionList_dir():
|
||||
|
||||
for file in os.listdir("PowerEditor/installer/functionList"):
|
||||
if file.endswith(".xml"):
|
||||
#print(os.path.join("PowerEditor/installer/functionList", file))
|
||||
parse_xml_file(os.path.join("PowerEditor/installer/functionList", file))
|
||||
|
||||
def parse_xml_files_from_nativeLang_dir():
|
||||
|
||||
for file in os.listdir("PowerEditor/installer/nativeLang"):
|
||||
if file.endswith(".xml"):
|
||||
#print(os.path.join("PowerEditor/installer/nativeLang", file))
|
||||
parse_xml_file(os.path.join("PowerEditor/installer/nativeLang", file))
|
||||
|
||||
def parse_xml_files_from_themes_dir():
|
||||
|
||||
for file in os.listdir("PowerEditor/installer/themes"):
|
||||
if file.endswith(".xml"):
|
||||
#print(os.path.join("PowerEditor/installer/themes", file))
|
||||
parse_xml_file(os.path.join("PowerEditor/installer/themes", file))
|
||||
|
||||
def parse_xml_files_from_src_dir():
|
||||
|
||||
for file in os.listdir("PowerEditor/src"):
|
||||
if file.endswith(".xml"):
|
||||
#print(os.path.join("PowerEditor/src", file))
|
||||
parse_xml_file(os.path.join("PowerEditor/src", file))
|
||||
|
||||
print('Start syntax check for xml files.')
|
||||
parse_xml_files_from_APIs_dir()
|
||||
parse_xml_files_from_functionList_dir()
|
||||
parse_xml_files_from_nativeLang_dir()
|
||||
parse_xml_files_from_themes_dir()
|
||||
parse_xml_files_from_src_dir()
|
||||
print('Done.')
|
||||
|
||||
if has_error:
|
||||
sys.exit(-2)
|
||||
else:
|
||||
sys.exit()
|
@ -1,42 +0,0 @@
|
||||
What is Notepad++?
|
||||
******************
|
||||
|
||||
Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement (https://npp-user-manual.org/docs/other-resources/#notepad-replacement) that supports several programming languages and natural languages. Running in the MS Windows environment, its use is governed by GPL (GNU General Public License).
|
||||
|
||||
|
||||
Why another source code editor?
|
||||
*******************************
|
||||
|
||||
The company I worked for used JEXT (another open source code editor in Java) as the production tool. Due to its poor performance, I began an investigation to find another solution (in C++ instead of in Java) in September 2003. I found Scintilla and built a prototype. This solution was not accepted. I removed the specific part and continued to develop it in my leisure time. On the 25th November 2003 it was made available on Sourceforge, hence the birth of Notepad++.
|
||||
|
||||
|
||||
How to install:
|
||||
***************
|
||||
|
||||
From the installer:
|
||||
Just follow the installation instructions.
|
||||
From the zip/7z package:
|
||||
Unzip all the files into a directory you want then launch "notepad++.exe".
|
||||
|
||||
|
||||
Web sites:
|
||||
***********
|
||||
|
||||
Notepad++ official site:
|
||||
https://notepad-plus-plus.org/
|
||||
|
||||
Notepad++ project site:
|
||||
https://github.com/notepad-plus-plus/notepad-plus-plus/
|
||||
|
||||
Notepad++ user manual:
|
||||
https://npp-user-manual.org/
|
||||
|
||||
Notepad++ forum:
|
||||
https://community.notepad-plus-plus.org/
|
||||
|
||||
|
||||
Author:
|
||||
*******
|
||||
|
||||
Don Ho <don.h@free.fr>
|
||||
https://notepad-plus-plus.org/author/
|
@ -1,79 +0,0 @@
|
||||
<!--//
|
||||
Markdown-plus-plus is a project to support Markdown syntax in Notepad++.
|
||||
All UDLs are carefully designed by human, rather than generated by machine.
|
||||
|
||||
Want an UDL for different theme?
|
||||
Want to change its preference?
|
||||
Want to create your own?
|
||||
Go get it: https://github.com/Edditoria/markdown-plus-plus
|
||||
|
||||
Please read the README file for details.
|
||||
Welcome issues and pull requests via the above link.
|
||||
|
||||
Copyright (c) Edditoria. Open source under the MIT license:
|
||||
https://github.com/Edditoria/markdown-plus-plus/blob/master/LICENSE.txt
|
||||
//-->
|
||||
<NotepadPlus>
|
||||
<UserLang name="Markdown (preinstalled)" ext="md markdown" udlVersion="2.1">
|
||||
<Settings>
|
||||
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
|
||||
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="yes" Keywords8="no" />
|
||||
</Settings>
|
||||
<KeywordLists>
|
||||
<Keywords name="Comments">00# 01 02((EOL)) 03<!-- 04--></Keywords>
|
||||
<Keywords name="Numbers, prefix1"></Keywords>
|
||||
<Keywords name="Numbers, prefix2"></Keywords>
|
||||
<Keywords name="Numbers, extras1"></Keywords>
|
||||
<Keywords name="Numbers, extras2"></Keywords>
|
||||
<Keywords name="Numbers, suffix1">.</Keywords>
|
||||
<Keywords name="Numbers, suffix2">.</Keywords>
|
||||
<Keywords name="Numbers, range"></Keywords>
|
||||
<Keywords name="Operators1">@ < > \< \> \\ \` \* \_ \{ \} \[ \] \( \) \# \+ \- \. \! \~ \| |:-: |:--: |:---: | :-: :--: :---: :|: |: :|</Keywords>
|
||||
<Keywords name="Operators2">- + :- :-- :--- :</Keywords>
|
||||
<Keywords name="Folders in code1, open"></Keywords>
|
||||
<Keywords name="Folders in code1, middle"></Keywords>
|
||||
<Keywords name="Folders in code1, close"></Keywords>
|
||||
<Keywords name="Folders in code2, open"></Keywords>
|
||||
<Keywords name="Folders in code2, middle"></Keywords>
|
||||
<Keywords name="Folders in code2, close"></Keywords>
|
||||
<Keywords name="Folders in comment, open"></Keywords>
|
||||
<Keywords name="Folders in comment, middle"></Keywords>
|
||||
<Keywords name="Folders in comment, close"></Keywords>
|
||||
<Keywords name="Keywords1">http:// (http:// https:// (https:// mailto: (mailto: ftp:// (ftp:// ftps:// (ftps:// (/ /</Keywords>
|
||||
<Keywords name="Keywords2">==== ----</Keywords>
|
||||
<Keywords name="Keywords3">*** ___</Keywords>
|
||||
<Keywords name="Keywords4">** __</Keywords>
|
||||
<Keywords name="Keywords5">* _</Keywords>
|
||||
<Keywords name="Keywords6">** __</Keywords>
|
||||
<Keywords name="Keywords7">* _</Keywords>
|
||||
<Keywords name="Keywords8"></Keywords>
|
||||
<Keywords name="Delimiters">00![ 00[ 01\ 02] 02] 03``` 03` 03~~~ 04\ 05``` 05((EOL `)) 05~~~ 06*** 07\ 08((EOL ***)) 09** 10\ 11((EOL **)) 12* 13\ 14((EOL *)) 15** 16\ 17((EOL **)) 18* 19\ 20((EOL *)) 21 22 23</Keywords>
|
||||
</KeywordLists>
|
||||
<Styles>
|
||||
<WordsStyle name="DEFAULT" fgColor="333333" bgColor="FFFFFF" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="COMMENTS" fgColor="808080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
|
||||
<WordsStyle name="LINE COMMENTS" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="NUMBERS" fgColor="0080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS1" fgColor="8000FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS2" fgColor="FF8000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS3" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS4" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS5" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS6" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS7" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS8" fgColor="333333" bgColor="FFFFFF" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="OPERATORS" fgColor="8080FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN CODE1" fgColor="333333" bgColor="FFFFFF" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN CODE2" fgColor="333333" bgColor="FFFFFF" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN COMMENT" fgColor="333333" bgColor="FFFFFF" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS1" fgColor="8000FF" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS2" fgColor="008000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS3" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS4" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="65600" />
|
||||
<WordsStyle name="DELIMITERS5" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="2" nesting="32800" />
|
||||
<WordsStyle name="DELIMITERS6" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS7" fgColor="000080" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS8" fgColor="333333" bgColor="FFFFFF" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
</Styles>
|
||||
</UserLang>
|
||||
</NotepadPlus>
|
@ -1,76 +0,0 @@
|
||||
<!--//
|
||||
Markdown-plus-plus is a project to support Markdown syntax in Notepad++.
|
||||
All UDLs are carefully designed by human, rather than generated by machine.
|
||||
Want an UDL for different theme?
|
||||
Want to change its preference?
|
||||
Want to create your own?
|
||||
Go get it: https://github.com/Edditoria/markdown-plus-plus
|
||||
Please read the README file for details.
|
||||
Welcome issues and pull requests via the above link.
|
||||
Copyright (c) Edditoria. Open source under the MIT license:
|
||||
https://github.com/Edditoria/markdown-plus-plus/blob/master/LICENSE.txt
|
||||
//-->
|
||||
<NotepadPlus>
|
||||
<UserLang name="Markdown (preinstalled dark mode)" ext="md markdown" darkModeTheme="yes" udlVersion="2.1">
|
||||
<Settings>
|
||||
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
|
||||
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="yes" Keywords8="no" />
|
||||
</Settings>
|
||||
<KeywordLists>
|
||||
<Keywords name="Comments">00# 01 02((EOL)) 03<!-- 04--></Keywords>
|
||||
<Keywords name="Numbers, prefix1"></Keywords>
|
||||
<Keywords name="Numbers, prefix2"></Keywords>
|
||||
<Keywords name="Numbers, extras1"></Keywords>
|
||||
<Keywords name="Numbers, extras2"></Keywords>
|
||||
<Keywords name="Numbers, suffix1">.</Keywords>
|
||||
<Keywords name="Numbers, suffix2">.</Keywords>
|
||||
<Keywords name="Numbers, range"></Keywords>
|
||||
<Keywords name="Operators1">@ < > \< \> \\ \` \* \_ \{ \} \[ \] \( \) \# \+ \- \. \! \~ \| |:-: |:--: |:---: | :-: :--: :---: :|: |: :|</Keywords>
|
||||
<Keywords name="Operators2">- + :- :-- :--- :</Keywords>
|
||||
<Keywords name="Folders in code1, open"></Keywords>
|
||||
<Keywords name="Folders in code1, middle"></Keywords>
|
||||
<Keywords name="Folders in code1, close"></Keywords>
|
||||
<Keywords name="Folders in code2, open"></Keywords>
|
||||
<Keywords name="Folders in code2, middle"></Keywords>
|
||||
<Keywords name="Folders in code2, close"></Keywords>
|
||||
<Keywords name="Folders in comment, open"></Keywords>
|
||||
<Keywords name="Folders in comment, middle"></Keywords>
|
||||
<Keywords name="Folders in comment, close"></Keywords>
|
||||
<Keywords name="Keywords1">../ (../ http:// (http:// https:// (https:// mailto: (mailto: ftp:// (ftp:// ftps:// (ftps:// (/ /</Keywords>
|
||||
<Keywords name="Keywords2">==== ----</Keywords>
|
||||
<Keywords name="Keywords3">*** ___</Keywords>
|
||||
<Keywords name="Keywords4">** __</Keywords>
|
||||
<Keywords name="Keywords5">* _</Keywords>
|
||||
<Keywords name="Keywords6">** __</Keywords>
|
||||
<Keywords name="Keywords7">* _</Keywords>
|
||||
<Keywords name="Keywords8"></Keywords>
|
||||
<Keywords name="Delimiters">00![ 00[ 01\ 02] 02] 03``` 03` 03~~~ 04\ 05``` 05((EOL `)) 05~~~ 06*** 07\ 08((EOL ***)) 09** 10\ 11((EOL **)) 12* 13\ 14((EOL *)) 15** 16\ 17((EOL **)) 18* 19\ 20((EOL *)) 21 22 23</Keywords>
|
||||
</KeywordLists>
|
||||
<Styles>
|
||||
<WordsStyle name="DEFAULT" fgColor="DCDCCC" bgColor="3F3F3F" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="COMMENTS" fgColor="7F9F7F" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
|
||||
<WordsStyle name="LINE COMMENTS" fgColor="FF8040" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="NUMBERS" fgColor="8CD0D3" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS1" fgColor="EDD6ED" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS2" fgColor="FF8040" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS3" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS4" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS5" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS6" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS7" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS8" fgColor="DCDCCC" bgColor="3F3F3F" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="OPERATORS" fgColor="DFC47D" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN CODE1" fgColor="DCDCCC" bgColor="3F3F3F" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN CODE2" fgColor="DCDCCC" bgColor="3F3F3F" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN COMMENT" fgColor="DCDCCC" bgColor="3F3F3F" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS1" fgColor="EDD6ED" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS2" fgColor="CEDF99" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS3" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS4" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="1" nesting="65600" />
|
||||
<WordsStyle name="DELIMITERS5" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="2" nesting="32800" />
|
||||
<WordsStyle name="DELIMITERS6" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS7" fgColor="E3CEAB" bgColor="3F3F3F" colorStyle="1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS8" fgColor="DCDCCC" bgColor="3F3F3F" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
|
||||
</Styles>
|
||||
</UserLang>
|
||||
</NotepadPlus>
|
@ -1,10 +0,0 @@
|
||||
// this file contains fixes needed for Notepad++ to be built by GCC
|
||||
// the makefile automatically includes this file
|
||||
|
||||
// __try and __except are unknown to GCC, so convert them to something eligible
|
||||
#define __try try
|
||||
#define __except(x) catch(...)
|
||||
|
||||
#ifndef PROCESSOR_ARCHITECTURE_ARM64
|
||||
#define PROCESSOR_ARCHITECTURE_ARM64 12
|
||||
#endif
|
@ -1,300 +0,0 @@
|
||||
# This file is part of Notepad++ project
|
||||
# Copyright (C)2021 Ivan U7n <jprofic@yandex.ru>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# at your option any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# definitions
|
||||
#
|
||||
|
||||
GCC_DIRECTORY := ../gcc
|
||||
GCC_EXCLUDE := $(GCC_DIRECTORY)/gcc-%
|
||||
SRC_DIRECTORY := ../src
|
||||
SRC_EXCLUDE := $(SRC_DIRECTORY)/tools/%
|
||||
BIN_DIRECTORY := ../bin
|
||||
INSTALLER_DIRECTORY := ../installer
|
||||
|
||||
TARGET_BINARY := notepad++.exe
|
||||
SRC_DATA := contextMenu.xml langs.model.xml shortcuts.xml stylers.model.xml tabContextMenu_example.xml toolbarIcons.xml
|
||||
BIN_DATA := change.log doLocalConf.xml nppLogNulContentCorruptionIssue.xml readme.txt userDefineLangs/
|
||||
INSTALLER_DATA := autoCompletion/ functionList/ localization/ themes/
|
||||
|
||||
SCINTILLA_DIRECTORY := ../../scintilla
|
||||
SCINTILLA_TARGET := libscintilla.a
|
||||
|
||||
LEXILLA_DIRECTORY := ../../lexilla
|
||||
LEXILLA_TARGET := liblexilla.a
|
||||
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
CXXFLAGS := -include $(GCC_DIRECTORY)/gcc-fixes.h -std=c++20
|
||||
RC := $(CROSS_COMPILE)windres
|
||||
RCFLAGS :=
|
||||
CPP_PATH := $(SCINTILLA_DIRECTORY)/include $(LEXILLA_DIRECTORY)/include
|
||||
CPP_DEFINE := UNICODE _UNICODE OEMRESOURCE NOMINMAX _WIN32_WINNT=_WIN32_WINNT_VISTA TIXML_USE_STL TIXMLA_USE_STL
|
||||
LD := $(CXX)
|
||||
LDFLAGS := -municode -mwindows
|
||||
LD_PATH :=
|
||||
LD_LINK := comctl32 crypt32 dbghelp ole32 sensapi shlwapi uuid uxtheme version wininet wintrust dwmapi
|
||||
LD_LINK += $(patsubst lib%.a,%,$(SCINTILLA_TARGET)) $(patsubst lib%.a,%,$(LEXILLA_TARGET)) imm32 msimg32 ole32 oleaut32
|
||||
SUBMAKEFLAGS := -O --no-print-directory
|
||||
|
||||
# detect a request for a debug build
|
||||
ifeq "$(filter-out 0,$(DEBUG))" ""
|
||||
BUILD_TYPE := release
|
||||
BUILD_SUFFIX :=
|
||||
CXXFLAGS += -O3 -Wno-alloc-size-larger-than -Wconversion
|
||||
CPP_DEFINE += NDEBUG
|
||||
LDFLAGS += -s
|
||||
else
|
||||
BUILD_TYPE := debug
|
||||
BUILD_SUFFIX := -debug
|
||||
CXXFLAGS += -Og -g -Wpedantic -Wall -Wextra -Wno-cast-function-type -Wno-overloaded-virtual -Wconversion
|
||||
CPP_DEFINE += DEBUG
|
||||
endif
|
||||
|
||||
#
|
||||
# preparations
|
||||
#
|
||||
|
||||
# detect Windows directory
|
||||
WIN_DIR := $(or $(windir),$(WINDIR))
|
||||
|
||||
# detect target CPU
|
||||
TARGET_CPU := $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine)))
|
||||
ifeq "$(TARGET_CPU)" ""
|
||||
$(error TARGET_CPU detection failed)
|
||||
endif
|
||||
ifneq "$(filter-out x86_64 i686,$(TARGET_CPU))" ""
|
||||
$(error $(TARGET_CPU) build is unsupported)
|
||||
endif
|
||||
ifeq "$(TARGET_CPU)" "i686"
|
||||
# for some reason i686 versions of MinGW-w64 GCC don't include a linking library for SensApi.dll
|
||||
# thus it is generated on the fly, but first check if the DLL is available
|
||||
ifeq "$(wildcard $(WIN_DIR)/system32/SensApi.dll)" ""
|
||||
$(error $(TARGET_CPU) build requires "%windir%/system32/SensApi.dll" to be present)
|
||||
endif
|
||||
# detect explicit definition of TARGET_CPU via command line to force a 32-bit build for MinGW-w64 with support multilib
|
||||
ifeq "$(origin TARGET_CPU)" "command line"
|
||||
export CXX += -m32
|
||||
export LD += -m32
|
||||
export RC += -Fpe-i386
|
||||
endif
|
||||
# detect explicit definition of TARGET_CPU via command line to force a 64-bit build for MinGW-w64 with support multilib
|
||||
else ifneq "$(and $(findstring x86_64,$(TARGET_CPU)),$(findstring command line,$(origin TARGET_CPU)))" ""
|
||||
export CXX += -m64
|
||||
export LD += -m64
|
||||
export RC += -Fpe-x86-64
|
||||
endif
|
||||
|
||||
# define target and build directories and update dependent variables
|
||||
TARGET_DIRECTORY := bin.$(TARGET_CPU)$(BUILD_SUFFIX)
|
||||
BUILD_DIRECTORY := $(TARGET_DIRECTORY).build
|
||||
|
||||
TARGET_BINARY := $(TARGET_DIRECTORY)/$(TARGET_BINARY)
|
||||
SRC_DATA := $(addprefix $(TARGET_DIRECTORY)/,$(SRC_DATA))
|
||||
BIN_DATA := $(addprefix $(TARGET_DIRECTORY)/,$(BIN_DATA))
|
||||
INSTALLER_DATA := $(addprefix $(TARGET_DIRECTORY)/,$(INSTALLER_DATA))
|
||||
|
||||
SCINTILLA_TARGET := $(BUILD_DIRECTORY)/$(SCINTILLA_TARGET)
|
||||
SCINTILLA_TARGET_PATH := ../../PowerEditor/gcc/$(SCINTILLA_TARGET)
|
||||
SCINTILLA_BUILD_DIRECTORY := $(BUILD_DIRECTORY)/_scintilla.build
|
||||
SCINTILLA_BUILD_PATH := ../../PowerEditor/gcc/$(SCINTILLA_BUILD_DIRECTORY)
|
||||
|
||||
LEXILLA_TARGET := $(BUILD_DIRECTORY)/$(LEXILLA_TARGET)
|
||||
LEXILLA_TARGET_PATH := ../../PowerEditor/gcc/$(LEXILLA_TARGET)
|
||||
LEXILLA_BUILD_DIRECTORY := $(BUILD_DIRECTORY)/_lexilla.build
|
||||
LEXILLA_BUILD_PATH := ../../PowerEditor/gcc/$(LEXILLA_BUILD_DIRECTORY)
|
||||
|
||||
LD_PATH += $(BUILD_DIRECTORY)
|
||||
|
||||
# detect a build outside of PowerEditor/gcc and update dependent variables
|
||||
SPACES_ERROR := "For outside build spaces in the project path are not supported! Please move the project files to the correct path."
|
||||
$(foreach makefile,$(MAKEFILE_LIST),$(if $(wildcard $(makefile)),,$(error $(SPACES_ERROR))))
|
||||
|
||||
MAKEFILE_DIRECTORY := $(patsubst %/,%,$(dir $(subst \,/,$(firstword $(MAKEFILE_LIST)))))
|
||||
ifneq "$(MAKEFILE_DIRECTORY)" "."
|
||||
MAKEFILE_PARENT := $(patsubst %/,%,$(dir $(MAKEFILE_DIRECTORY)))
|
||||
|
||||
BIN_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(BIN_DIRECTORY))
|
||||
GCC_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(GCC_DIRECTORY))
|
||||
GCC_EXCLUDE := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(GCC_EXCLUDE))
|
||||
SRC_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(SRC_DIRECTORY))
|
||||
SRC_EXCLUDE := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(SRC_EXCLUDE))
|
||||
INSTALLER_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(INSTALLER_DIRECTORY))
|
||||
|
||||
SCINTILLA_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(SCINTILLA_DIRECTORY))
|
||||
SCINTILLA_TARGET_PATH := $(CURDIR)/$(SCINTILLA_TARGET)
|
||||
SCINTILLA_BUILD_PATH := $(CURDIR)/$(SCINTILLA_BUILD_DIRECTORY)
|
||||
|
||||
LEXILLA_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(LEXILLA_DIRECTORY))
|
||||
LEXILLA_TARGET_PATH := $(CURDIR)/$(LEXILLA_TARGET)
|
||||
LEXILLA_BUILD_PATH := $(CURDIR)/$(LEXILLA_BUILD_DIRECTORY)
|
||||
|
||||
CXXFLAGS := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(CXXFLAGS))
|
||||
CPP_PATH := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(CPP_PATH))
|
||||
endif
|
||||
|
||||
# detect a request for a verbose output
|
||||
ifeq "$(filter-out 0,$(VERBOSE))" ""
|
||||
AT := @
|
||||
endif
|
||||
|
||||
# detect the current operating system
|
||||
ifeq "$(WIN_DIR)" ""
|
||||
# not a Windows system
|
||||
MKDIR := mkdir -p
|
||||
CPDIR := cp -r
|
||||
RMDIR := rm -rf
|
||||
CP := cp
|
||||
RM := rm -f
|
||||
normalize-path = $1
|
||||
else ifneq "$(wildcard $(dir $(SHELL))ls.exe)" ""
|
||||
# a Windows system with a proper shell
|
||||
NULL :=
|
||||
SPACE := $(NULL) $(NULL)
|
||||
SHELL_DIRECTORY := $(subst |,$(SPACE),$(dir $(subst $(SPACE),|,$(SHELL))))
|
||||
MKDIR := $(SHELL_DIRECTORY)mkdir.exe -p
|
||||
CPDIR := $(SHELL_DIRECTORY)cp.exe -r
|
||||
RMDIR := $(SHELL_DIRECTORY)rm.exe -rf
|
||||
CP := $(SHELL_DIRECTORY)cp.exe
|
||||
RM := $(SHELL_DIRECTORY)rm.exe -f
|
||||
normalize-path = $1
|
||||
else
|
||||
# a standard Windows system
|
||||
MKDIR := mkdir
|
||||
CPDIR := xcopy /q /e /i /y
|
||||
RMDIR := rmdir /q /s
|
||||
CP := copy /y
|
||||
RM := del /q
|
||||
normalize-path = $(subst /,\,$1)
|
||||
endif
|
||||
|
||||
# discover files
|
||||
list-subtree = $(foreach i,$(wildcard $1/*),$i $(call list-subtree,$i))
|
||||
|
||||
GCC_SUBTREE := $(patsubst $(GCC_DIRECTORY)/%,%,$(filter-out $(GCC_EXCLUDE),$(call list-subtree,$(GCC_DIRECTORY))))
|
||||
SRC_SUBTREE := $(patsubst $(SRC_DIRECTORY)/%,%,$(filter-out $(SRC_EXCLUDE),$(call list-subtree,$(SRC_DIRECTORY))))
|
||||
|
||||
CPP_PATH += $(addprefix $(GCC_DIRECTORY)/,$(sort $(patsubst %/,%,$(dir $(filter %.h %.hpp,$(GCC_SUBTREE))))))
|
||||
CPP_PATH += $(addprefix $(SRC_DIRECTORY)/,$(sort $(patsubst %/,%,$(dir $(filter %.h %.hpp,$(SRC_SUBTREE))))))
|
||||
|
||||
vpath %.cpp $(GCC_DIRECTORY) $(SRC_DIRECTORY)
|
||||
CXX_TARGETS := $(patsubst %.cpp,$(BUILD_DIRECTORY)/%.o,$(sort $(filter %.cpp,$(GCC_SUBTREE) $(SRC_SUBTREE))))
|
||||
|
||||
vpath %.rc $(GCC_DIRECTORY) $(SRC_DIRECTORY)
|
||||
RC_TARGETS := $(patsubst %.rc,$(BUILD_DIRECTORY)/%.res,$(sort $(filter %.rc,$(GCC_SUBTREE) $(SRC_SUBTREE))))
|
||||
|
||||
#
|
||||
# actions
|
||||
#
|
||||
|
||||
.PHONY: .force all binary data clean sciclean lexclean fullclean
|
||||
.force:
|
||||
|
||||
SUBMAKEFLAGS += $(if $(NUMBER_OF_PROCESSORS),-j$(NUMBER_OF_PROCESSORS),)
|
||||
|
||||
all: $(SCINTILLA_TARGET) $(LEXILLA_TARGET)
|
||||
$(AT)$(MAKE) -f $(firstword $(MAKEFILE_LIST)) $(SUBMAKEFLAGS) binary
|
||||
|
||||
$(BUILD_DIRECTORY):
|
||||
@echo + creating BUILD_DIRECTORY $@
|
||||
$(AT)$(MKDIR) $(call normalize-path,$(sort $@ $(patsubst %/,%,$(dir $(CXX_TARGETS) $(RC_TARGETS)))))
|
||||
|
||||
$(SCINTILLA_BUILD_DIRECTORY):
|
||||
@echo + creating SCINTILLA_BUILD_DIRECTORY $@
|
||||
$(AT)$(MKDIR) $(call normalize-path,$(SCINTILLA_BUILD_DIRECTORY))
|
||||
|
||||
$(LEXILLA_BUILD_DIRECTORY):
|
||||
@echo + creating LEXILLA_BUILD_DIRECTORY $@
|
||||
$(AT)$(MKDIR) $(call normalize-path,$(LEXILLA_BUILD_DIRECTORY))
|
||||
|
||||
ifeq "$(MAKELEVEL)" "0"
|
||||
$(SCINTILLA_TARGET): .force
|
||||
$(LEXILLA_TARGET): .force
|
||||
endif
|
||||
|
||||
$(SCINTILLA_TARGET): | $(BUILD_DIRECTORY) $(SCINTILLA_BUILD_DIRECTORY)
|
||||
$(AT)$(MAKE) $(SUBMAKEFLAGS) -C $(SCINTILLA_DIRECTORY)/win32 -f makefile -f ../../boostregex/nppSpecifics_mingw.mak DIR_O=$(SCINTILLA_BUILD_PATH) LIBSCI=$(SCINTILLA_TARGET_PATH) $(SCINTILLA_TARGET_PATH)
|
||||
|
||||
$(LEXILLA_TARGET): | $(BUILD_DIRECTORY) $(LEXILLA_BUILD_DIRECTORY)
|
||||
$(AT)$(MAKE) $(SUBMAKEFLAGS) -C $(LEXILLA_DIRECTORY)/src DIR_O=$(LEXILLA_BUILD_PATH) LIBLEXILLA=$(LEXILLA_TARGET_PATH) $(LEXILLA_TARGET_PATH)
|
||||
|
||||
binary: $(TARGET_BINARY) data
|
||||
@echo +++ $(TARGET_CPU) $(BUILD_TYPE) : $(CURDIR)/$(TARGET_BINARY) +++
|
||||
|
||||
$(CXX_TARGETS): $(BUILD_DIRECTORY)/%.o: %.cpp | $(BUILD_DIRECTORY)
|
||||
@echo + compiling $<
|
||||
$(AT)$(CXX) $(CXXFLAGS) $(addprefix -I,$(CPP_PATH)) $(addprefix -D,$(CPP_DEFINE)) -MMD -c -o $@ $<
|
||||
|
||||
$(RC_TARGETS): $(BUILD_DIRECTORY)/%.res: %.rc | $(BUILD_DIRECTORY)
|
||||
@echo + compiling $<
|
||||
$(AT)$(RC) $(RCFLAGS) $(addprefix -I,$(CPP_PATH)) $(addprefix -D,$(CPP_DEFINE)) -O coff -o $@ -i $<
|
||||
|
||||
ifeq "$(TARGET_CPU)" "i686"
|
||||
$(TARGET_BINARY): $(BUILD_DIRECTORY)/libsensapi.a
|
||||
$(BUILD_DIRECTORY)/libsensapi.a: | $(BUILD_DIRECTORY)
|
||||
@echo + generating $@
|
||||
$(AT)gendef $(call normalize-path,$(firstword $(wildcard $(WIN_DIR)/syswow64/SensApi.dll $(WIN_DIR)/system32/SensApi.dll)))
|
||||
$(AT)dlltool -mi386 -f--32 -d SensApi.def -k -l $(call normalize-path,$@)
|
||||
$(AT)$(RM) SensApi.def
|
||||
endif
|
||||
|
||||
$(TARGET_DIRECTORY):
|
||||
@echo + creating TARGET_DIRECTORY $@
|
||||
$(AT)$(MKDIR) $(call normalize-path,$@)
|
||||
|
||||
$(TARGET_BINARY): $(CXX_TARGETS) $(RC_TARGETS) $(SCINTILLA_TARGET) $(LEXILLA_TARGET) | $(TARGET_DIRECTORY)
|
||||
@echo + linking $@
|
||||
$(AT)$(LD) $(LDFLAGS) $(filter-out %.a,$^) $(addprefix -L,$(LD_PATH)) $(addprefix -l,$(LD_LINK)) -static -o $@
|
||||
|
||||
data: $(patsubst %/,%,$(SRC_DATA) $(BIN_DATA) $(INSTALLER_DATA))
|
||||
|
||||
$(patsubst %/,%,$(filter %/,$(SRC_DATA))): $(TARGET_DIRECTORY)/%: $(SRC_DIRECTORY)/% | $(TARGET_DIRECTORY)
|
||||
@echo + copying $@
|
||||
$(AT)$(CPDIR) $(call normalize-path,$< $@)
|
||||
$(filter-out %/,$(SRC_DATA)): $(TARGET_DIRECTORY)/%: $(SRC_DIRECTORY)/% | $(TARGET_DIRECTORY)
|
||||
@echo + copying $@
|
||||
$(AT)$(CP) $(call normalize-path,$< $@)
|
||||
|
||||
$(patsubst %/,%,$(filter %/,$(BIN_DATA))): $(TARGET_DIRECTORY)/%: $(BIN_DIRECTORY)/% | $(TARGET_DIRECTORY)
|
||||
@echo + copying $@
|
||||
$(AT)$(CPDIR) $(call normalize-path,$< $@)
|
||||
$(filter-out %/,$(BIN_DATA)): $(TARGET_DIRECTORY)/%: $(BIN_DIRECTORY)/% | $(TARGET_DIRECTORY)
|
||||
@echo + copying $@
|
||||
$(AT)$(CP) $(call normalize-path,$< $@)
|
||||
|
||||
$(TARGET_DIRECTORY)/autoCompletion: $(INSTALLER_DIRECTORY)/APIs
|
||||
$(TARGET_DIRECTORY)/functionList: $(INSTALLER_DIRECTORY)/functionList
|
||||
$(TARGET_DIRECTORY)/localization: $(INSTALLER_DIRECTORY)/nativeLang
|
||||
$(TARGET_DIRECTORY)/themes: $(INSTALLER_DIRECTORY)/themes
|
||||
$(patsubst %/,%,$(filter %/,$(INSTALLER_DATA))): | $(TARGET_DIRECTORY)
|
||||
@echo + copying $@
|
||||
$(AT)$(CPDIR) $(call normalize-path,$< $@)
|
||||
$(filter-out %/,$(INSTALLER_DATA)): | $(TARGET_DIRECTORY)
|
||||
@echo + copying $@
|
||||
$(AT)$(CP) $(call normalize-path,$< $@)
|
||||
|
||||
clean:
|
||||
-$(AT)$(RMDIR) $(call normalize-path,$(BUILD_DIRECTORY))
|
||||
|
||||
sciclean:
|
||||
-$(AT)$(RMDIR) $(call normalize-path,$(SCINTILLA_BUILD_DIRECTORY))
|
||||
|
||||
lexclean:
|
||||
-$(AT)$(RMDIR) $(call normalize-path,$(LEXILLA_BUILD_DIRECTORY))
|
||||
|
||||
fullclean: clean
|
||||
-$(AT)$(RMDIR) $(call normalize-path,$(TARGET_DIRECTORY))
|
||||
|
||||
-include $(CXX_TARGETS:%.o=%.d)
|
@ -1,3 +0,0 @@
|
||||
#include <windows.h>
|
||||
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "../src/notepad++.exe.manifest"
|
@ -1,542 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<NotepadPlus>
|
||||
<AutoComplete language="BaanC">
|
||||
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," additionalWordChar=".:$#" />
|
||||
<KeyWord name="#context_off" />
|
||||
<KeyWord name="#context_on" />
|
||||
<KeyWord name="#define" />
|
||||
<KeyWord name="#elif" />
|
||||
<KeyWord name="#else" />
|
||||
<KeyWord name="#endif" />
|
||||
<KeyWord name="#ident" />
|
||||
<KeyWord name="#if" />
|
||||
<KeyWord name="#ifdef" />
|
||||
<KeyWord name="#ifndef" />
|
||||
<KeyWord name="#include" />
|
||||
<KeyWord name="#pragma" />
|
||||
<KeyWord name="#undef" />
|
||||
<KeyWord name="actual.occ" />
|
||||
<KeyWord name="after.choice:" />
|
||||
<KeyWord name="after.delete:" />
|
||||
<KeyWord name="after.display:" />
|
||||
<KeyWord name="after.field:" />
|
||||
<KeyWord name="after.form.read:" />
|
||||
<KeyWord name="after.form:" />
|
||||
<KeyWord name="after.group:" />
|
||||
<KeyWord name="after.input:" />
|
||||
<KeyWord name="after.layout:" />
|
||||
<KeyWord name="after.program:" />
|
||||
<KeyWord name="after.read:" />
|
||||
<KeyWord name="after.receive.data:" />
|
||||
<KeyWord name="after.rewrite:" />
|
||||
<KeyWord name="after.skip.delete:" />
|
||||
<KeyWord name="after.skip.rewrite:" />
|
||||
<KeyWord name="after.skip.write:" />
|
||||
<KeyWord name="after.update.db.commit:" />
|
||||
<KeyWord name="after.write:" />
|
||||
<KeyWord name="after.zoom:" />
|
||||
<KeyWord name="alike" />
|
||||
<KeyWord name="all" />
|
||||
<KeyWord name="and" />
|
||||
<KeyWord name="api.mode" />
|
||||
<KeyWord name="array" />
|
||||
<KeyWord name="as" />
|
||||
<KeyWord name="asc" />
|
||||
<KeyWord name="at" />
|
||||
<KeyWord name="attr.adju" />
|
||||
<KeyWord name="attr.bitset.mask" />
|
||||
<KeyWord name="attr.changed" />
|
||||
<KeyWord name="attr.conv" />
|
||||
<KeyWord name="attr.currency$" />
|
||||
<KeyWord name="attr.currkey" />
|
||||
<KeyWord name="attr.dbase" />
|
||||
<KeyWord name="attr.dbmaxlen" />
|
||||
<KeyWord name="attr.deflt$" />
|
||||
<KeyWord name="attr.descr$" />
|
||||
<KeyWord name="attr.diga" />
|
||||
<KeyWord name="attr.digv" />
|
||||
<KeyWord name="attr.divf" />
|
||||
<KeyWord name="attr.domain$" />
|
||||
<KeyWord name="attr.domm$" />
|
||||
<KeyWord name="attr.dorp" />
|
||||
<KeyWord name="attr.echo" />
|
||||
<KeyWord name="attr.element" />
|
||||
<KeyWord name="attr.enum.mask$" />
|
||||
<KeyWord name="attr.format.addition$" />
|
||||
<KeyWord name="attr.helpfile$" />
|
||||
<KeyWord name="attr.ille$" />
|
||||
<KeyWord name="attr.imax" />
|
||||
<KeyWord name="attr.inpfld" />
|
||||
<KeyWord name="attr.input" />
|
||||
<KeyWord name="attr.lega$" />
|
||||
<KeyWord name="attr.mandatory" />
|
||||
<KeyWord name="attr.maxlen" />
|
||||
<KeyWord name="attr.message$" />
|
||||
<KeyWord name="attr.minlen" />
|
||||
<KeyWord name="attr.multioccur" />
|
||||
<KeyWord name="attr.nowait$" />
|
||||
<KeyWord name="attr.oformat$" />
|
||||
<KeyWord name="attr.permission" />
|
||||
<KeyWord name="attr.previous$" />
|
||||
<KeyWord name="attr.rang" />
|
||||
<KeyWord name="attr.rang$" />
|
||||
<KeyWord name="attr.reallen" />
|
||||
<KeyWord name="attr.refpath" />
|
||||
<KeyWord name="attr.rndm" />
|
||||
<KeyWord name="attr.rotate" />
|
||||
<KeyWord name="attr.sttp" />
|
||||
<KeyWord name="attr.textfield$" />
|
||||
<KeyWord name="attr.textgrp" />
|
||||
<KeyWord name="attr.textkw1$" />
|
||||
<KeyWord name="attr.textkw2$" />
|
||||
<KeyWord name="attr.textkw3$" />
|
||||
<KeyWord name="attr.textkw4$" />
|
||||
<KeyWord name="attr.textlang$" />
|
||||
<KeyWord name="attr.textmaxlines" />
|
||||
<KeyWord name="attr.textmode" />
|
||||
<KeyWord name="attr.textopt$" />
|
||||
<KeyWord name="attr.textstart" />
|
||||
<KeyWord name="attr.textzoomsession$" />
|
||||
<KeyWord name="attr.type" />
|
||||
<KeyWord name="attr.zoomcode" />
|
||||
<KeyWord name="attr.zoomindex" />
|
||||
<KeyWord name="attr.zoomreturn$" />
|
||||
<KeyWord name="attr.zoomsession$" />
|
||||
<KeyWord name="auto.nextform" />
|
||||
<KeyWord name="avg" />
|
||||
<KeyWord name="background" />
|
||||
<KeyWord name="base" />
|
||||
<KeyWord name="based" />
|
||||
<KeyWord name="before.checks:" />
|
||||
<KeyWord name="before.choice:" />
|
||||
<KeyWord name="before.delete:" />
|
||||
<KeyWord name="before.display.object:" />
|
||||
<KeyWord name="before.display:" />
|
||||
<KeyWord name="before.field:" />
|
||||
<KeyWord name="before.form:" />
|
||||
<KeyWord name="before.group:" />
|
||||
<KeyWord name="before.input:" />
|
||||
<KeyWord name="before.layout:" />
|
||||
<KeyWord name="before.new.object:" />
|
||||
<KeyWord name="before.print:" />
|
||||
<KeyWord name="before.program:" />
|
||||
<KeyWord name="before.read:" />
|
||||
<KeyWord name="before.rewrite:" />
|
||||
<KeyWord name="before.update.check" />
|
||||
<KeyWord name="before.write:" />
|
||||
<KeyWord name="before.zoom:" />
|
||||
<KeyWord name="between" />
|
||||
<KeyWord name="boolean" />
|
||||
<KeyWord name="both" />
|
||||
<KeyWord name="break" />
|
||||
<KeyWord name="break.view" />
|
||||
<KeyWord name="bset" />
|
||||
<KeyWord name="buffer" />
|
||||
<KeyWord name="by" />
|
||||
<KeyWord name="call" />
|
||||
<KeyWord name="case" />
|
||||
<KeyWord name="cast" />
|
||||
<KeyWord name="chart" />
|
||||
<KeyWord name="chartgrp" />
|
||||
<KeyWord name="check.input:" />
|
||||
<KeyWord name="chm.name" />
|
||||
<KeyWord name="chm.owner" />
|
||||
<KeyWord name="chm.title" />
|
||||
<KeyWord name="chm.user" />
|
||||
<KeyWord name="choice" />
|
||||
<KeyWord name="choice.abort.program:" />
|
||||
<KeyWord name="choice.abort.work:" />
|
||||
<KeyWord name="choice.add.set:" />
|
||||
<KeyWord name="choice.ask.helpinfo:" />
|
||||
<KeyWord name="choice.attachments:" />
|
||||
<KeyWord name="choice.bms:" />
|
||||
<KeyWord name="choice.calculator:" />
|
||||
<KeyWord name="choice.calender:" />
|
||||
<KeyWord name="choice.cancel.work:" />
|
||||
<KeyWord name="choice.change.frm:" />
|
||||
<KeyWord name="choice.change.order:" />
|
||||
<KeyWord name="choice.cmd.about.baan:" />
|
||||
<KeyWord name="choice.cmd.copy:" />
|
||||
<KeyWord name="choice.cmd.cut:" />
|
||||
<KeyWord name="choice.cmd.options:" />
|
||||
<KeyWord name="choice.cmd.paste:" />
|
||||
<KeyWord name="choice.cont.process:" />
|
||||
<KeyWord name="choice.create.job:" />
|
||||
<KeyWord name="choice.current.work:" />
|
||||
<KeyWord name="choice.cust.grid:" />
|
||||
<KeyWord name="choice.def.find:" />
|
||||
<KeyWord name="choice.display.set:" />
|
||||
<KeyWord name="choice.dupl.occur:" />
|
||||
<KeyWord name="choice.end.program:" />
|
||||
<KeyWord name="choice.field.browse:" />
|
||||
<KeyWord name="choice.field.help:" />
|
||||
<KeyWord name="choice.find.data:" />
|
||||
<KeyWord name="choice.first.frm:" />
|
||||
<KeyWord name="choice.first.set:" />
|
||||
<KeyWord name="choice.first.view:" />
|
||||
<KeyWord name="choice.freeze.columns:" />
|
||||
<KeyWord name="choice.get.defaults:" />
|
||||
<KeyWord name="choice.global.copy:" />
|
||||
<KeyWord name="choice.global.delete:" />
|
||||
<KeyWord name="choice.glossary:" />
|
||||
<KeyWord name="choice.help.index:" />
|
||||
<KeyWord name="choice.hide.fields:" />
|
||||
<KeyWord name="choice.interrupt:" />
|
||||
<KeyWord name="choice.last.frm:" />
|
||||
<KeyWord name="choice.last.set:" />
|
||||
<KeyWord name="choice.last.view:" />
|
||||
<KeyWord name="choice.mark.delete:" />
|
||||
<KeyWord name="choice.mark.occur:" />
|
||||
<KeyWord name="choice.modify.set:" />
|
||||
<KeyWord name="choice.next.frm:" />
|
||||
<KeyWord name="choice.next.set:" />
|
||||
<KeyWord name="choice.next.view:" />
|
||||
<KeyWord name="choice.next.work:" />
|
||||
<KeyWord name="choice.prev.frm:" />
|
||||
<KeyWord name="choice.prev.set:" />
|
||||
<KeyWord name="choice.prev.view:" />
|
||||
<KeyWord name="choice.print.data:" />
|
||||
<KeyWord name="choice.processes:" />
|
||||
<KeyWord name="choice.recover.set:" />
|
||||
<KeyWord name="choice.reference:" />
|
||||
<KeyWord name="choice.resize.frm:" />
|
||||
<KeyWord name="choice.rotate.curr:" />
|
||||
<KeyWord name="choice.run.job:" />
|
||||
<KeyWord name="choice.save.defaults:" />
|
||||
<KeyWord name="choice.select.all:" />
|
||||
<KeyWord name="choice.send.data:" />
|
||||
<KeyWord name="choice.sendto.desktop:" />
|
||||
<KeyWord name="choice.sendto.editor:" />
|
||||
<KeyWord name="choice.sendto.mail:" />
|
||||
<KeyWord name="choice.sendto.tasklst:" />
|
||||
<KeyWord name="choice.start.chart:" />
|
||||
<KeyWord name="choice.start.query:" />
|
||||
<KeyWord name="choice.start.set:" />
|
||||
<KeyWord name="choice.suspend.work:" />
|
||||
<KeyWord name="choice.switch.windows:" />
|
||||
<KeyWord name="choice.synchronize:" />
|
||||
<KeyWord name="choice.text.manager:" />
|
||||
<KeyWord name="choice.to.clipboard:" />
|
||||
<KeyWord name="choice.unfreeze.colum:" />
|
||||
<KeyWord name="choice.update.db:" />
|
||||
<KeyWord name="choice.user.0:" />
|
||||
<KeyWord name="choice.user.1:" />
|
||||
<KeyWord name="choice.user.2:" />
|
||||
<KeyWord name="choice.user.3:" />
|
||||
<KeyWord name="choice.user.4:" />
|
||||
<KeyWord name="choice.user.5:" />
|
||||
<KeyWord name="choice.user.6:" />
|
||||
<KeyWord name="choice.user.7:" />
|
||||
<KeyWord name="choice.user.8:" />
|
||||
<KeyWord name="choice.user.9:" />
|
||||
<KeyWord name="choice.using.help:" />
|
||||
<KeyWord name="choice.zoom:" />
|
||||
<KeyWord name="clear" />
|
||||
<KeyWord name="clearunref" />
|
||||
<KeyWord name="common" />
|
||||
<KeyWord name="const" />
|
||||
<KeyWord name="continue" />
|
||||
<KeyWord name="count" />
|
||||
<KeyWord name="cross" />
|
||||
<KeyWord name="curr.key" />
|
||||
<KeyWord name="curr.pacc$" />
|
||||
<KeyWord name="current_date" />
|
||||
<KeyWord name="current_timestamp" />
|
||||
<KeyWord name="dal.error.file" />
|
||||
<KeyWord name="dal.error.line" />
|
||||
<KeyWord name="date" />
|
||||
<KeyWord name="date$" />
|
||||
<KeyWord name="date.num" />
|
||||
<KeyWord name="date.to.num" />
|
||||
<KeyWord name="debug" />
|
||||
<KeyWord name="declaration:" />
|
||||
<KeyWord name="default" />
|
||||
<KeyWord name="delete" />
|
||||
<KeyWord name="deleteempty" />
|
||||
<KeyWord name="deleteerror" />
|
||||
<KeyWord name="desc" />
|
||||
<KeyWord name="dim" />
|
||||
<KeyWord name="dis.restarted" />
|
||||
<KeyWord name="distinct" />
|
||||
<KeyWord name="dll" />
|
||||
<KeyWord name="dllusage" />
|
||||
<KeyWord name="domain" />
|
||||
<KeyWord name="domain.error:" />
|
||||
<KeyWord name="double" />
|
||||
<KeyWord name="dynamic.index.switching" />
|
||||
<KeyWord name="e" />
|
||||
<KeyWord name="else" />
|
||||
<KeyWord name="empty" />
|
||||
<KeyWord name="end" />
|
||||
<KeyWord name="endcase" />
|
||||
<KeyWord name="enddelete" />
|
||||
<KeyWord name="enddllusage" />
|
||||
<KeyWord name="endfor" />
|
||||
<KeyWord name="endfunctionusage" />
|
||||
<KeyWord name="endif" />
|
||||
<KeyWord name="endselect" />
|
||||
<KeyWord name="endupdate" />
|
||||
<KeyWord name="endwhile" />
|
||||
<KeyWord name="enum_description" />
|
||||
<KeyWord name="eq" />
|
||||
<KeyWord name="error.bypass" />
|
||||
<KeyWord name="escape" />
|
||||
<KeyWord name="exists" />
|
||||
<KeyWord name="exit.val$" />
|
||||
<KeyWord name="extern" />
|
||||
<KeyWord name="false" />
|
||||
<KeyWord name="fatal" />
|
||||
<KeyWord name="fattr.currfld$" />
|
||||
<KeyWord name="fattr.descr$" />
|
||||
<KeyWord name="fattr.ftype" />
|
||||
<KeyWord name="fattr.helpfile$" />
|
||||
<KeyWord name="fattr.horizontal" />
|
||||
<KeyWord name="fattr.init" />
|
||||
<KeyWord name="fattr.nrtabs" />
|
||||
<KeyWord name="fattr.occurnr" />
|
||||
<KeyWord name="fattr.seqno" />
|
||||
<KeyWord name="fattr.toplines" />
|
||||
<KeyWord name="fattr.total.line" />
|
||||
<KeyWord name="fetching" />
|
||||
<KeyWord name="field" />
|
||||
<KeyWord name="field.all:" />
|
||||
<KeyWord name="field.other:" />
|
||||
<KeyWord name="filename$" />
|
||||
<KeyWord name="filled.occ" />
|
||||
<KeyWord name="first" />
|
||||
<KeyWord name="firstweek$" />
|
||||
<KeyWord name="fixed" />
|
||||
<KeyWord name="for" />
|
||||
<KeyWord name="form.all:" />
|
||||
<KeyWord name="form.curr" />
|
||||
<KeyWord name="form.next" />
|
||||
<KeyWord name="form.other:" />
|
||||
<KeyWord name="form.prev" />
|
||||
<KeyWord name="from" />
|
||||
<KeyWord name="full" />
|
||||
<KeyWord name="function" />
|
||||
<KeyWord name="functions:" />
|
||||
<KeyWord name="functionusage" />
|
||||
<KeyWord name="ge" />
|
||||
<KeyWord name="global" />
|
||||
<KeyWord name="goto" />
|
||||
<KeyWord name="graphical.mode" />
|
||||
<KeyWord name="group" />
|
||||
<KeyWord name="gt" />
|
||||
<KeyWord name="having" />
|
||||
<KeyWord name="hint" />
|
||||
<KeyWord name="hints" />
|
||||
<KeyWord name="if" />
|
||||
<KeyWord name="ignore.first.event" />
|
||||
<KeyWord name="in" />
|
||||
<KeyWord name="include" />
|
||||
<KeyWord name="index" />
|
||||
<KeyWord name="init.field:" />
|
||||
<KeyWord name="init.form:" />
|
||||
<KeyWord name="init.group:" />
|
||||
<KeyWord name="initiated.by.dal" />
|
||||
<KeyWord name="inner" />
|
||||
<KeyWord name="input" />
|
||||
<KeyWord name="inrange" />
|
||||
<KeyWord name="integer" />
|
||||
<KeyWord name="is" />
|
||||
<KeyWord name="job.change.data" />
|
||||
<KeyWord name="job.device" />
|
||||
<KeyWord name="job.device.requested" />
|
||||
<KeyWord name="job.process" />
|
||||
<KeyWord name="job.process.error" />
|
||||
<KeyWord name="job.report" />
|
||||
<KeyWord name="job.skip.date.question" />
|
||||
<KeyWord name="join" />
|
||||
<KeyWord name="label" />
|
||||
<KeyWord name="language$" />
|
||||
<KeyWord name="last" />
|
||||
<KeyWord name="lattr.autobefores" />
|
||||
<KeyWord name="lattr.autoreset" />
|
||||
<KeyWord name="lattr.break" />
|
||||
<KeyWord name="lattr.enddata" />
|
||||
<KeyWord name="lattr.header" />
|
||||
<KeyWord name="lattr.language$" />
|
||||
<KeyWord name="lattr.lineno" />
|
||||
<KeyWord name="lattr.multicol" />
|
||||
<KeyWord name="lattr.multicol.count" />
|
||||
<KeyWord name="lattr.multicol.repeat" />
|
||||
<KeyWord name="lattr.pageno" />
|
||||
<KeyWord name="lattr.print" />
|
||||
<KeyWord name="lattr.prline" />
|
||||
<KeyWord name="lattr.recordtimes" />
|
||||
<KeyWord name="lattr.textexpand" />
|
||||
<KeyWord name="lattr.textlang$" />
|
||||
<KeyWord name="lattr.textline" />
|
||||
<KeyWord name="lattr.textlineno" />
|
||||
<KeyWord name="lattr.textlines.max" />
|
||||
<KeyWord name="lattr.textlines.min" />
|
||||
<KeyWord name="le" />
|
||||
<KeyWord name="leading" />
|
||||
<KeyWord name="left" />
|
||||
<KeyWord name="like" />
|
||||
<KeyWord name="logname$" />
|
||||
<KeyWord name="long" />
|
||||
<KeyWord name="lt" />
|
||||
<KeyWord name="main.table$" />
|
||||
<KeyWord name="main.table.io:" />
|
||||
<KeyWord name="mark.table" />
|
||||
<KeyWord name="marked" />
|
||||
<KeyWord name="max" />
|
||||
<KeyWord name="max.formtabs" />
|
||||
<KeyWord name="maxdouble" />
|
||||
<KeyWord name="mb" />
|
||||
<KeyWord name="menu" />
|
||||
<KeyWord name="message" />
|
||||
<KeyWord name="min" />
|
||||
<KeyWord name="modify.prim.key" />
|
||||
<KeyWord name="multibyte" />
|
||||
<KeyWord name="ne" />
|
||||
<KeyWord name="no" />
|
||||
<KeyWord name="nodebug" />
|
||||
<KeyWord name="not" />
|
||||
<KeyWord name="notransactions" />
|
||||
<KeyWord name="nowarnings" />
|
||||
<KeyWord name="null" />
|
||||
<KeyWord name="number.forms" />
|
||||
<KeyWord name="number.of.marks" />
|
||||
<KeyWord name="on" />
|
||||
<KeyWord name="on.choice:" />
|
||||
<KeyWord name="on.display.total.line:" />
|
||||
<KeyWord name="on.entry:" />
|
||||
<KeyWord name="on.error:" />
|
||||
<KeyWord name="on.exit:" />
|
||||
<KeyWord name="on.input:" />
|
||||
<KeyWord name="or" />
|
||||
<KeyWord name="order" />
|
||||
<KeyWord name="ordered" />
|
||||
<KeyWord name="outer" />
|
||||
<KeyWord name="parent" />
|
||||
<KeyWord name="path" />
|
||||
<KeyWord name="pi" />
|
||||
<KeyWord name="pid" />
|
||||
<KeyWord name="prepared" />
|
||||
<KeyWord name="previous.choice" />
|
||||
<KeyWord name="print" />
|
||||
<KeyWord name="procesinfo$" />
|
||||
<KeyWord name="prog.name$" />
|
||||
<KeyWord name="prompt" />
|
||||
<KeyWord name="query.extension" />
|
||||
<KeyWord name="question" />
|
||||
<KeyWord name="raw" />
|
||||
<KeyWord name="read.view:" />
|
||||
<KeyWord name="real" />
|
||||
<KeyWord name="ref" />
|
||||
<KeyWord name="ref.display:" />
|
||||
<KeyWord name="ref.input:" />
|
||||
<KeyWord name="reference" />
|
||||
<KeyWord name="refers" />
|
||||
<KeyWord name="repeat" />
|
||||
<KeyWord name="report$" />
|
||||
<KeyWord name="reportgrp" />
|
||||
<KeyWord name="reportno" />
|
||||
<KeyWord name="retry" />
|
||||
<KeyWord name="return" />
|
||||
<KeyWord name="right" />
|
||||
<KeyWord name="row" />
|
||||
<KeyWord name="rows" />
|
||||
<KeyWord name="sattr.descr$" />
|
||||
<KeyWord name="select" />
|
||||
<KeyWord name="select.only.fields.on.form" />
|
||||
<KeyWord name="selectbind" />
|
||||
<KeyWord name="selectdo" />
|
||||
<KeyWord name="selectempty" />
|
||||
<KeyWord name="selecteos" />
|
||||
<KeyWord name="selecterror" />
|
||||
<KeyWord name="selection.filter:" />
|
||||
<KeyWord name="session" />
|
||||
<KeyWord name="session.nr.view.fields" />
|
||||
<KeyWord name="session.zoomindex" />
|
||||
<KeyWord name="set" />
|
||||
<KeyWord name="setunref" />
|
||||
<KeyWord name="shell.type" />
|
||||
<KeyWord name="size" />
|
||||
<KeyWord name="skip" />
|
||||
<KeyWord name="spool.crn" />
|
||||
<KeyWord name="spool.date" />
|
||||
<KeyWord name="spool.device" />
|
||||
<KeyWord name="spool.docman" />
|
||||
<KeyWord name="spool.fileout" />
|
||||
<KeyWord name="spool.fontnumber" />
|
||||
<KeyWord name="spool.id" />
|
||||
<KeyWord name="spool.left.mrg" />
|
||||
<KeyWord name="spool.orientation" />
|
||||
<KeyWord name="spool.paper.type" />
|
||||
<KeyWord name="spool.pg.length" />
|
||||
<KeyWord name="spool.pg.width" />
|
||||
<KeyWord name="spool.pr.copies" />
|
||||
<KeyWord name="spool.pr.from" />
|
||||
<KeyWord name="spool.pr.line" />
|
||||
<KeyWord name="spool.pr.to" />
|
||||
<KeyWord name="spool.preview" />
|
||||
<KeyWord name="spool.report" />
|
||||
<KeyWord name="spool.ssrs" />
|
||||
<KeyWord name="spool.time" />
|
||||
<KeyWord name="spool.view.rtl" />
|
||||
<KeyWord name="spool.xml" />
|
||||
<KeyWord name="ssi.export.running" />
|
||||
<KeyWord name="ssi.import.running" />
|
||||
<KeyWord name="start.by.wfc" />
|
||||
<KeyWord name="static" />
|
||||
<KeyWord name="step" />
|
||||
<KeyWord name="sticky" />
|
||||
<KeyWord name="stop" />
|
||||
<KeyWord name="stp.abort.error" />
|
||||
<KeyWord name="stp.check.input.error" />
|
||||
<KeyWord name="stp.skip.error" />
|
||||
<KeyWord name="strict_boolean" />
|
||||
<KeyWord name="string" />
|
||||
<KeyWord name="subdal" />
|
||||
<KeyWord name="subhint" />
|
||||
<KeyWord name="sum" />
|
||||
<KeyWord name="synchronized.reason" />
|
||||
<KeyWord name="table" />
|
||||
<KeyWord name="text.updated.in.edit" />
|
||||
<KeyWord name="text_content" />
|
||||
<KeyWord name="then" />
|
||||
<KeyWord name="timestamp" />
|
||||
<KeyWord name="to" />
|
||||
<KeyWord name="trailing" />
|
||||
<KeyWord name="trim" />
|
||||
<KeyWord name="true" />
|
||||
<KeyWord name="union" />
|
||||
<KeyWord name="unref" />
|
||||
<KeyWord name="until" />
|
||||
<KeyWord name="update" />
|
||||
<KeyWord name="update.status" />
|
||||
<KeyWord name="updateempty" />
|
||||
<KeyWord name="updateerror" />
|
||||
<KeyWord name="use" />
|
||||
<KeyWord name="used" />
|
||||
<KeyWord name="user.locale$" />
|
||||
<KeyWord name="user.timer" />
|
||||
<KeyWord name="user.type$" />
|
||||
<KeyWord name="void" />
|
||||
<KeyWord name="warning" />
|
||||
<KeyWord name="warnings" />
|
||||
<KeyWord name="when" />
|
||||
<KeyWord name="when.field.changes:" />
|
||||
<KeyWord name="where" />
|
||||
<KeyWord name="wherebind" />
|
||||
<KeyWord name="whereused" />
|
||||
<KeyWord name="while" />
|
||||
<KeyWord name="win.background" />
|
||||
<KeyWord name="win.border.width" />
|
||||
<KeyWord name="win.event.mask" />
|
||||
<KeyWord name="win.height" />
|
||||
<KeyWord name="win.parent" />
|
||||
<KeyWord name="win.width" />
|
||||
<KeyWord name="win.x" />
|
||||
<KeyWord name="win.y" />
|
||||
<KeyWord name="with" />
|
||||
<KeyWord name="zoom.from.all:" />
|
||||
<KeyWord name="zoom.from.other:" />
|
||||
<KeyWord name="zoomfield$" />
|
||||
<KeyWord name="zoomreturn$" />
|
||||
</AutoComplete>
|
||||
</NotepadPlus>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue