Compare commits

..

51 Commits

Author SHA1 Message Date
Arfon Smith
8845cd9c58 Merge pull request #3034 from github/3020-local
Add support for Wavefront OBJ/MTL files: part deux
2016-06-02 11:00:04 -06:00
Arfon Smith
090f765c7e Merge pull request #3001 from snh/lock-not-json
Remove .lock from JSON extentions
2016-06-02 10:59:06 -06:00
Arfon Smith
b58c0e8f3e Merge branch 'master' into 3020-local 2016-06-02 10:55:46 -06:00
Arfon Smith
b4ff170603 Merge pull request #3033 from github/change-elm-grammar
Change Elm grammar to community version
2016-06-02 10:35:08 -06:00
Arfon Smith
3bc540a283 Removing un-used grammar reference 2016-06-02 10:29:57 -06:00
Arfon Smith
25b761b506 Moving to Elm community grammar 2016-06-02 10:20:33 -06:00
Arfon Smith
1e502808c9 Removing old Elm grammar 2016-06-02 10:17:12 -06:00
John Gardner
27e0c8f78a Fix a misspelt Cpp-ObjDump alias (#3028) 2016-06-01 12:06:54 -06:00
John Gardner
897218678e Add interpreters for APL and J (#3029)
* Add APL interpreters

* Add J interpreter

* Add test fixtures for APL/J interpreters
2016-06-01 10:41:22 -06:00
John Gardner
4eb33fe3be Use a dedicated grammar for highlighting Nu syntax (#3030) 2016-06-01 10:40:31 -06:00
Alhadis
0614055efd Merge remote-tracking branch 'upstream/master' into wavefront
Resolves conflicts:
	.gitmodules
2016-05-29 15:54:46 +10:00
Nate Whetsell
e70f3f595a Add Csound languages (#3005)
* Add Csound languages

* Remove Csound Document alias

* Remove Csound Score alias

* Replace sample files

* Update language-csound grammar

* Update language-csound

* Update language-csound

* Add Makefile.sco to Makefile filenames

* Add makefile.sco sample

* Fix case of filename makefile.sco
2016-05-28 20:43:59 -05:00
Vasily Korytov
28af996bf9 allow .pug to be threated as jade (#3019)
see https://github.com/pugjs/pug/issues/2184 for more details
2016-05-28 20:40:04 -05:00
Alhadis
8bd8f0960c Add sample OBJ/MTL files 2016-05-27 21:05:43 +10:00
Alhadis
255db77f1f Add support for Wavefront OBJ/MTL files 2016-05-27 21:02:39 +10:00
John Gardner
8b0b14c9a6 Add support for the COLLADA file format (#3009) 2016-05-23 09:49:15 -05:00
John Gardner
95e83311b6 Add "README.1ST" to recognised text-file names (#3010)
* Add "README.1ST" as a recognised readme name

* Add a fixture for ".1st" readme files
2016-05-22 09:03:21 -05:00
Steven Honson
1968f8193c Remove .lock from JSON extentions 2016-05-11 16:38:24 +10:00
Arfon Smith
5155ad89e8 Adding back Creole grammar (#2999) 2016-05-09 20:55:49 -06:00
Arfon Smith
c2505e8b7b Update CONTRIBUTING.md 2016-05-09 20:41:43 -06:00
Arfon Smith
b38f4b786b Update languages.yml (#2998) 2016-05-09 08:57:33 -07:00
Kepler Sticka-Jones
1a04c79738 Add ECR (Embedded Crystal) (#2996)
* Add ECR entry from language-crystal

* Add HTML+ECR to Languages.

* Create greeting.erb sample

From the ECR documentation: http://crystal-lang.org/api/ECR.html

* Rename greeting.erb to greeting.ecr

* Rename samples/HTML-ERB/greeting.ecr to samples/HTML-ECR/greeting.ecr

* Update Crystal submodule.

This contains the ECR highlighting.

* Proper named HTML+ECR folder.

The GitHub website just wouldn't do the folder right.

* Add .ecr file extension to ECR
2016-05-09 08:42:09 -07:00
Arfon Smith
a464c234b8 Update languages.yml (#2995) 2016-05-06 18:01:59 -06:00
Arfon Smith
aa2319a052 Cut release v4.8.5 (#2994)
* Grammar update

* Bumping to v4.8.5
2016-05-06 17:14:25 -06:00
Arfon Smith
f22181f47d EJS support (#2993)
* Added EJS Language Support

* Added the submodule reference for ejs-tmbundle

* Adding EJS license
2016-05-06 15:58:53 -06:00
Arfon Smith
3191ff498d 2945 local (#2992)
* Added Django environment folder in exclusion

Django projects have env/ folder in which dependencies of the project like Django, Pillow, and other libraries are installed from the requirements.txt file. It would be best if this folder of dependencies is ignored from the language statistics.

* Corrected Errors

Corrected the misplaced code and put removed the start character as the environment folder may not always be in the root.

* Adding test for env folder
2016-05-06 15:36:07 -06:00
Paul Chaignon
91ea482ea6 Add grammar for CLIPS back (#2991) 2016-05-06 15:33:05 -06:00
Jan Olaf Krems
905d87a112 Detect .js files with source maps as generated (#2984)
* Fix .min.js test

* Detect .js files with source maps as generated
2016-05-06 15:20:42 -06:00
Jakub Jirutka
8eae4e56ef Add support for Alpine Abuild (APKBUILD) (#2934)
APKBUILD is a file containing "recipes" on how something should be
built/compiled. It's used by APK, the Alpine Linux package manager.
2016-05-06 14:55:33 -06:00
Jakub Jirutka
5466fcfd2f Add support for OpenRC runscripts (#2935) 2016-05-06 14:39:42 -06:00
Arfon Smith
176a0e9926 TLA revisited (#2990)
* Add the TLA+ language

This patch adds support for the TLA+ specification language.

https://github.com/search?utf8=%E2%9C%93&q=MODULE+extension%3Atla&type=Code&ref=searchresults

* Update TLA grammar license

Attribution is given in the license since the grammar is based off of the TLA+ language developed by Microsoft and HP.

* Sort languages.yml alphabetically

* Removing duplicate entry
2016-05-06 13:19:44 -06:00
John Gardner
aa049b4677 Add support for BSDmakefile, .arcconfig, and .JSON-tmLanguage files (#2986)
* Add support for .arcconfig files

* Add .JSON-tmLanguage to recognised JSON extensions

* Add BSDmakefile to recognised Makefile filenames

* Silence Travis
2016-05-06 12:49:58 -06:00
Paul Chaignon
5c19f1f546 Limit scope of modeline search (#2967)
Only matches the first and last 5 lines against the modeline regular expressions
2016-05-05 09:33:40 -06:00
John Gardner
9ae19a1f94 Add support for World of Warcraft .toc files
* Add language rule and heuristic for WoW Addon data

* Add test fixtures for the .toc extension

* Add grammar for syntax highlighting

* Define colour of WoW .toc files

* Refine heuristic to include a commonly-used keyword

* Check whitespace in WoW-token heuristic

* Include additional TeX keywords in .toc heuristic

* Update grammar submodules

* Cache license for WoW-toc grammar

* Reverting sourcepawn update
2016-05-04 15:07:01 -06:00
Paul Chaignon
8cf3b7ad51 Heuristic for .inc PHP files (#2980) 2016-05-03 21:15:20 -06:00
Paul Chaignon
03d16835aa Remove Terra from Lua group (#2976)
Terra and Lua are two separate languages, although closely related
2016-05-02 19:33:38 -06:00
Arfon Smith
7174130e46 Bumping to v4.8.4 (#2973) 2016-04-29 14:26:54 -06:00
Arfon Smith
59f64c47b1 grammar update 2016-04-29 13:14:40 -06:00
Stephen Whipple
f3655e8a1e Add .app.src as Erlang extension. (#2964)
* Add .app.src as Erlang extension.

* Add .app.src sample.
2016-04-29 12:45:43 -06:00
Paul Chaignon
f97d796f90 Add new step required when adding a grammar (#2966)
Grammar licenses are now cached locally
Therefore, it is required to update the local cache when adding a new grammar
2016-04-29 12:43:55 -06:00
Peter Jas
d342aa4841 Classify builds, pkgproj, resx and sfproj as XML (#2954)
* Classify builds, pkgproj, resx and sfproj as XML

* Disambiguate .builds for XML and Text
2016-04-27 11:11:07 -06:00
Paul Chaignon
5c655e3b20 Grammar for AutoIt from Sublime Text package (#2961) 2016-04-27 11:09:36 -06:00
Paul Chaignon
9a0ac4a477 Makefile.frag as a Makefile filename (#2969) 2016-04-26 08:39:53 -06:00
Brandon Keepers
8ea9632ccf Merge pull request #2955 from github/verify-licenses
Verify licenses on CI
2016-04-16 10:46:23 -04:00
Brandon Keepers
03ef4f30e8 Remove licenses from removed grammars 2016-04-16 10:35:57 -04:00
Brandon Keepers
12228fb525 Proper exit status for script/licensed 2016-04-16 10:25:34 -04:00
Brandon Keepers
92897046ed Remove licenses from Rubygems licenses
We are still solidifying patterns around how licenses should be managed, but given the Gemfile.lock file is ignored, I don't think it makes sense for linguist to track licenses for Ruby dependencies. A consumer of this gem could end up with a different version of a dependency that has a different license.

In general, I think libraries should only track licenses for code that they vendor. Since linguist vendors the grammars, it makes sense for it to track the licenses for them.
2016-04-16 10:21:50 -04:00
Brandon Keepers
91aa843a4e Verify licenses with travis 2016-04-16 10:12:45 -04:00
Kepler Sticka-Jones
c3145d3c08 Add Forge Mod Loader Mod Info file as JSON (#2941)
* Add Forge Mod Loader Mod Info file as JSON

* Add Forge Mod Loader Mod Info File

* Rename samples/JSON/mcmod.info to samples/JSON/filenames/mcmod.info
2016-04-15 11:16:50 -07:00
Michael Zhou
1ad2123896 Add gradlew and a few other filenames to Shell (#2910) 2016-04-15 11:14:57 -07:00
Bruce
9b9a256c60 Added GLSL extensions .vsh & .fsh (#2951) 2016-04-15 08:06:11 -07:00
114 changed files with 4729 additions and 252 deletions

33
.gitmodules vendored
View File

@@ -446,9 +446,6 @@
[submodule "vendor/grammars/Scalate.tmbundle"]
path = vendor/grammars/Scalate.tmbundle
url = https://github.com/scalate/Scalate.tmbundle
[submodule "vendor/grammars/Elm.tmLanguage"]
path = vendor/grammars/Elm.tmLanguage
url = https://github.com/deadfoxygrandpa/Elm.tmLanguage
[submodule "vendor/grammars/sublime-bsv"]
path = vendor/grammars/sublime-bsv
url = https://github.com/thotypous/sublime-bsv
@@ -695,6 +692,9 @@
[submodule "vendor/grammars/grace"]
path = vendor/grammars/grace
url = https://github.com/zmthy/grace-tmbundle
[submodule "vendor/grammars/ejs-tmbundle"]
path = vendor/grammars/ejs-tmbundle
url = https://github.com/gregory-m/ejs-tmbundle
[submodule "vendor/grammars/nix"]
path = vendor/grammars/nix
url = https://github.com/wmertens/sublime-nix
@@ -710,3 +710,30 @@
[submodule "vendor/grammars/language-graphql"]
path = vendor/grammars/language-graphql
url = https://github.com/rmosolgo/language-graphql
[submodule "vendor/grammars/language-toc-wow"]
path = vendor/grammars/language-toc-wow
url = https://github.com/nebularg/language-toc-wow
[submodule "vendor/grammars/sublime-autoit"]
path = vendor/grammars/sublime-autoit
url = https://github.com/AutoIt/SublimeAutoItScript
[submodule "vendor/grammars/TLA"]
path = vendor/grammars/TLA
url = https://github.com/agentultra/TLAGrammar
[submodule "vendor/grammars/sublime-clips"]
path = vendor/grammars/sublime-clips
url = https://github.com/psicomante/CLIPS-sublime
[submodule "vendor/grammars/creole"]
path = vendor/grammars/creole
url = https://github.com/Siddley/Creole
[submodule "vendor/grammars/language-csound"]
path = vendor/grammars/language-csound
url = https://github.com/nwhetsell/language-csound
[submodule "vendor/grammars/language-wavefront"]
path = vendor/grammars/language-wavefront
url = https://github.com/Alhadis/language-wavefront
[submodule "vendor/grammars/nu.tmbundle"]
path = vendor/grammars/nu.tmbundle
url = https://github.com/jsallis/nu.tmbundle
[submodule "vendor/grammars/Elm"]
path = vendor/grammars/Elm
url = https://github.com/elm-community/Elm.tmLanguage

View File

@@ -6,6 +6,9 @@ addons:
- libicu-dev
- libicu48
before_install: script/travis/before_install
script:
- bundle exec rake
- script/licensed verify
rvm:
- 2.0.0
- 2.1

View File

@@ -1,8 +1,6 @@
# Contributing
[code-of-conduct]: http://todogroup.org/opencodeofconduct/#Linguist/opensource@github.com
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. This project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to uphold this code.
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. This project adheres to the [Contributor Covenant Code of Conduct](http://contributor-covenant.org/). By participating, you are expected to uphold this code.
The majority of contributions won't need to touch any Ruby code at all.
@@ -33,6 +31,7 @@ To add support for a new language:
0. Add a grammar for your language. Please only add grammars that have a license that permits redistribution.
0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`.
0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`.
0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well.
0. Add samples for your language to the [samples directory][samples] in the correct subdirectory.
0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage.

View File

@@ -36,7 +36,7 @@ vendor/grammars/ColdFusion:
- text.html.cfm
vendor/grammars/Docker.tmbundle:
- source.dockerfile
vendor/grammars/Elm.tmLanguage:
vendor/grammars/Elm/:
- source.elm
vendor/grammars/FreeMarker.tmbundle:
- text.html.ftl
@@ -129,6 +129,8 @@ vendor/grammars/SublimePuppet/:
- source.puppet
vendor/grammars/SublimeXtend:
- source.xtend
vendor/grammars/TLA:
- source.tla
vendor/grammars/TXL/:
- source.txl
vendor/grammars/Textmate-Gosu-Bundle:
@@ -217,6 +219,8 @@ vendor/grammars/cool-tmbundle:
vendor/grammars/cpp-qt.tmbundle:
- source.c++.qt
- source.qmake
vendor/grammars/creole/:
- text.html.creole
vendor/grammars/css.tmbundle:
- source.css
vendor/grammars/cucumber-tmbundle:
@@ -243,6 +247,8 @@ vendor/grammars/ec.tmbundle/:
- source.c.ec
vendor/grammars/eiffel.tmbundle:
- source.eiffel
vendor/grammars/ejs-tmbundle:
- text.html.js
vendor/grammars/elixir-tmbundle:
- source.elixir
- text.elixir
@@ -333,11 +339,16 @@ vendor/grammars/language-coffee-script:
- source.litcoffee
vendor/grammars/language-crystal:
- source.crystal
- text.html.ecr
vendor/grammars/language-csharp:
- source.cake
- source.cs
- source.csx
- source.nant-build
vendor/grammars/language-csound:
- source.csound
- source.csound-document
- source.csound-score
vendor/grammars/language-gfm:
- source.gfm
vendor/grammars/language-graphql:
@@ -371,6 +382,11 @@ vendor/grammars/language-shellscript:
- text.shell-session
vendor/grammars/language-supercollider:
- source.supercollider
vendor/grammars/language-toc-wow:
- source.toc
vendor/grammars/language-wavefront:
- source.wavefront.mtl
- source.wavefront.obj
vendor/grammars/language-xbase:
- source.harbour
vendor/grammars/language-yaml:
@@ -425,6 +441,8 @@ vendor/grammars/ninja.tmbundle:
- source.ninja
vendor/grammars/nix:
- source.nix
vendor/grammars/nu.tmbundle:
- source.nu
vendor/grammars/objective-c.tmbundle:
- source.objc
- source.objc++
@@ -512,12 +530,16 @@ vendor/grammars/sublime-MuPAD:
- source.mupad
vendor/grammars/sublime-aspectj/:
- source.aspectj
vendor/grammars/sublime-autoit/:
- source.autoit
vendor/grammars/sublime-befunge:
- source.befunge
vendor/grammars/sublime-bsv:
- source.bsv
vendor/grammars/sublime-cirru:
- source.cirru
vendor/grammars/sublime-clips/:
- source.clips
vendor/grammars/sublime-glsl:
- source.essl
- source.glsl

View File

@@ -59,6 +59,7 @@ module Linguist
godeps? ||
generated_by_zephir? ||
minified_files? ||
has_source_map? ||
source_map? ||
compiled_coffeescript? ||
generated_parser? ||
@@ -104,6 +105,21 @@ module Linguist
end
end
# Internal: Does the blob contain a source map reference?
#
# We assume that if one of the last 2 lines starts with a source map
# reference, then the current file was generated from other files.
#
# We use the last 2 lines because the last line might be empty.
#
# We only handle JavaScript, no CSS support yet.
#
# Returns true or false.
def has_source_map?
return false unless extname.downcase == '.js'
lines.last(2).any? { |line| line.start_with?('//# sourceMappingURL') }
end
# Internal: Is the blob a generated source map?
#
# Source Maps usually have .css.map or .js.map extensions. In case they

View File

@@ -86,6 +86,14 @@ module Linguist
end
end
disambiguate ".builds" do |data|
if /^(\s*)(<Project|<Import|<Property|<?xml|xmlns)/i.match(data)
Language["XML"]
else
Language["Text"]
end
end
disambiguate ".ch" do |data|
if /^\s*#\s*(if|ifdef|ifndef|define|command|xcommand|translate|xtranslate|include|pragma|undef)\b/i.match(data)
Language["xBase"]
@@ -179,6 +187,12 @@ module Linguist
end
end
disambiguate ".inc" do |data|
if /^<\?(?:php)?/.match(data)
Language["PHP"]
end
end
disambiguate ".l" do |data|
if /\(def(un|macro)\s/.match(data)
Language["Common Lisp"]
@@ -376,6 +390,14 @@ module Linguist
Language["SQL"]
end
end
disambiguate ".toc" do |data|
if /^## |@no-lib-strip@/.match(data)
Language["World of Warcraft Addon Data"]
elsif /^\\(contentsline|defcounter|beamer|boolfalse)/.match(data)
Language["TeX"]
end
end
disambiguate ".ts" do |data|
if data.include?("<TS ")

View File

@@ -75,6 +75,10 @@ APL:
extensions:
- .apl
- .dyalog
interpreters:
- apl
- aplx
- dyalog
tm_scope: source.apl
ace_mode: text
@@ -147,6 +151,17 @@ Alloy:
- .als
ace_mode: text
Alpine Abuild:
type: programming
group: Shell
aliases:
- abuild
- apkbuild
filenames:
- APKBUILD
tm_scope: source.shell
ace_mode: sh
Ant Build System:
type: data
tm_scope: text.xml.ant
@@ -260,7 +275,7 @@ AutoIt:
- AutoItScript
extensions:
- .au3
tm_scope: none
tm_scope: source.autoit
ace_mode: autohotkey
Awk:
@@ -446,7 +461,7 @@ CLIPS:
type: programming
extensions:
- .clp
tm_scope: none
tm_scope: source.clips
ace_mode: text
CMake:
@@ -468,6 +483,13 @@ COBOL:
- .cpy
ace_mode: cobol
COLLADA:
type: data
extensions:
- .dae
tm_scope: text.xml
ace_mode: xml
CSS:
type: markup
tm_scope: source.css
@@ -683,7 +705,7 @@ Cpp-ObjDump:
- .cxx-objdump
tm_scope: objdump.x86asm
aliases:
- c++-objdumb
- c++-objdump
ace_mode: assembly_x86
Creole:
@@ -691,7 +713,7 @@ Creole:
wrap: true
extensions:
- .creole
tm_scope: none
tm_scope: text.html.creole
ace_mode: text
Crystal:
@@ -704,6 +726,34 @@ Crystal:
interpreters:
- crystal
Csound:
type: programming
aliases:
- csound-orc
extensions:
- .orc
- .udo
tm_scope: source.csound
ace_mode: text
Csound Document:
type: programming
aliases:
- csound-csd
extensions:
- .csd
tm_scope: source.csound-document
ace_mode: text
Csound Score:
type: programming
aliases:
- csound-sco
extensions:
- .sco
tm_scope: source.csound-score
ace_mode: text
Cucumber:
type: programming
extensions:
@@ -874,6 +924,15 @@ ECLiPSe:
tm_scope: source.prolog.eclipse
ace_mode: prolog
EJS:
type: markup
color: "#a91e50"
group: HTML
extensions:
- .ejs
tm_scope: text.html.js
ace_mode: ejs
Eagle:
type: markup
color: "#814C05"
@@ -948,6 +1007,7 @@ Erlang:
color: "#B83998"
extensions:
- .erl
- .app.src
- .es
- .escript
- .hrl
@@ -1107,7 +1167,7 @@ GAS:
extensions:
- .s
- .ms
tm_scope: none
tm_scope: source.assembly
ace_mode: assembly_x86
GDScript:
@@ -1125,6 +1185,7 @@ GLSL:
- .frag
- .frg
- .fs
- .fsh
- .fshader
- .geo
- .geom
@@ -1133,6 +1194,7 @@ GLSL:
- .shader
- .vert
- .vrx
- .vsh
- .vshader
ace_mode: glsl
@@ -1381,6 +1443,16 @@ HTML+Django:
- html+jinja
- htmldjango
ace_mode: django
HTML+ECR:
type: markup
tm_scope: text.html.ecr
group: HTML
aliases:
- ecr
extensions:
- .ecr
ace_mode: text
HTML+EEX:
type: markup
@@ -1598,6 +1670,8 @@ J:
color: "#9EEDFF"
extensions:
- .ijs
interpreters:
- jconsole
tm_scope: source.j
ace_mode: text
@@ -1620,11 +1694,13 @@ JSON:
extensions:
- .json
- .geojson
- .lock
- .JSON-tmLanguage
- .topojson
filenames:
- .arcconfig
- .jshintrc
- composer.lock
- mcmod.info
JSON5:
type: data
@@ -1662,6 +1738,7 @@ Jade:
type: markup
extensions:
- .jade
- .pug
tm_scope: text.jade
ace_mode: jade
@@ -2078,13 +2155,16 @@ Makefile:
- .mk
- .mkfile
filenames:
- BSDmakefile
- GNUmakefile
- Kbuild
- Makefile
- Makefile.am
- Makefile.frag
- Makefile.in
- Makefile.inc
- makefile
- makefile.sco
- mkfile
interpreters:
- make
@@ -2396,7 +2476,7 @@ Nu:
- .nu
filenames:
- Nukefile
tm_scope: source.scheme
tm_scope: source.nu
ace_mode: scheme
interpreters:
- nush
@@ -2517,6 +2597,16 @@ OpenEdge ABL:
tm_scope: source.abl
ace_mode: text
OpenRC runscript:
type: programming
group: Shell
aliases:
- openrc
interpreters:
- openrc-run
tm_scope: source.shell
ace_mode: sh
OpenSCAD:
type: programming
extensions:
@@ -3361,6 +3451,13 @@ Shell:
- .tmux
- .tool
- .zsh
filenames:
- .bash_history
- .bash_logout
- .bash_profile
- .bashrc
- PKGBUILD
- gradlew
interpreters:
- bash
- rc
@@ -3516,6 +3613,13 @@ SystemVerilog:
- .vh
ace_mode: verilog
TLA:
type: programming
extensions:
- .tla
tm_scope: source.tla
ace_mode: text
TOML:
type: data
extensions:
@@ -3588,7 +3692,6 @@ Terra:
- .t
color: "#00004c"
ace_mode: lua
group: Lua
interpreters:
- lua
@@ -3608,6 +3711,7 @@ Text:
- INSTALL
- LICENSE
- NEWS
- README.1ST
- README.me
- click.me
- delete.me
@@ -3804,6 +3908,20 @@ Vue:
tm_scope: text.html.vue
ace_mode: html
Wavefront Material:
type: data
extensions:
- .mtl
tm_scope: source.wavefront.mtl
ace_mode: text
Wavefront Object:
type: data
extensions:
- .obj
tm_scope: source.wavefront.obj
ace_mode: text
Web Ontology Language:
type: markup
color: "#9cc9dd"
@@ -3819,6 +3937,14 @@ WebIDL:
tm_scope: source.webidl
ace_mode: text
World of Warcraft Addon Data:
type: data
color: "#e0b330"
extensions:
- .toc
tm_scope: source.toc
ace_mode: text
X10:
type: programming
aliases:
@@ -3848,6 +3974,7 @@ XML:
- .xml
- .ant
- .axml
- .builds
- .ccxml
- .clixml
- .cproject
@@ -3879,6 +4006,7 @@ XML:
- .nuspec
- .odd
- .osm
- .pkgproj
- .plist
- .pluginspec
- .props
@@ -3886,8 +4014,10 @@ XML:
- .psc1
- .pt
- .rdf
- .resx
- .rss
- .scxml
- .sfproj
- .srdf
- .storyboard
- .stTheme
@@ -4079,6 +4209,8 @@ edn:
fish:
type: programming
group: Shell
interpreters:
- fish
extensions:
- .fish
tm_scope: source.fish

View File

@@ -15,6 +15,10 @@ module Linguist
MODELINES = [EMACS_MODELINE, VIM_MODELINE_1, VIM_MODELINE_2]
# Scope of the search for modelines
# Number of lines to check at the beginning and at the end of the file
SEARCH_SCOPE = 5
# Public: Detects language based on Vim and Emacs modelines
#
# blob - An object that quacks like a blob.
@@ -26,7 +30,9 @@ module Linguist
# Returns an Array with one Language if the blob has a Vim or Emacs modeline
# that matches a Language name or alias. Returns an empty array if no match.
def self.call(blob, _ = nil)
Array(Language.find_by_alias(modeline(blob.data)))
header = blob.lines.first(SEARCH_SCOPE).join("\n")
footer = blob.lines.last(SEARCH_SCOPE).join("\n")
Array(Language.find_by_alias(modeline(header + footer)))
end
# Public: Get the modeline from the first n-lines of the file

View File

@@ -190,6 +190,7 @@
# django
- (^|/)admin_media/
- (^|/)env/
# Fabric
- ^fabfile\.py$

View File

@@ -1,3 +1,3 @@
module Linguist
VERSION = "4.8.3"
VERSION = "4.8.5"
end

7
samples/APL/hashbang Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/local/bin/apl --script
NEWLINE ← ⎕UCS 10
HEADERS ← 'Content-Type: text/plain', NEWLINE
HEADERS
⍝ ⎕←HEADERS
⍝ ⍕⎕TS
)OFF

View File

@@ -0,0 +1,70 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=2.27.0
_ver=${pkgver%_git*}
pkgrel=0
pkgdesc="Script to build Alpine Packages"
url="http://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL2"
depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils
attr tar pkgconf patch"
if [ "$CBUILD" = "$CHOST" ]; then
depends="$depends curl"
fi
makedepends_build="pkgconfig"
makedepends_host="openssl-dev"
makedepends="$makedepends_host $makedepends_build"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="apkbuild-cpan:cpan apkbuild-gem-resolver:gems"
options="suid"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
"
_builddir="$srcdir/$pkgname-$_ver"
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || return 1
;;
esac
done
sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf
}
build() {
cd "$_builddir"
make || return 1
}
package() {
cd "$_builddir"
make install DESTDIR="$pkgdir" || return 1
install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf || return 1
install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles || return 1
}
cpan() {
pkgdesc="Script to generate perl APKBUILD from CPAN"
depends="perl perl-libwww perl-json"
arch="noarch"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/
}
gems() {
pkgdesc="APKBUILD dependency resolver for RubyGems"
depends="ruby ruby-augeas"
arch="noarch"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/
}
md5sums="c67e4c971c54b4d550e16db3ba331f96 abuild-2.27.0.tar.xz"
sha256sums="c8db017e3dd168edb20ceeb91971535cf66b8c95f29d3288f88ac755bffc60e5 abuild-2.27.0.tar.xz"
sha512sums="98e1da4e47f3ab68700b3bc992c83e103f770f3196e433788ee74145f57cd33e5239c87f0a7a15f7266840d5bad893fc8c0d4c826d663df53deaee2678c56984 abuild-2.27.0.tar.xz"

397
samples/C/main.c Normal file
View File

@@ -0,0 +1,397 @@
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/runtime/runtime-utils.h"
#include "src/arguments.h"
#include "src/compiler.h"
#include "src/deoptimizer.h"
#include "src/frames-inl.h"
#include "src/full-codegen/full-codegen.h"
#include "src/isolate-inl.h"
#include "src/messages.h"
#include "src/v8threads.h"
#include "src/vm-state-inl.h"
namespace v8 {
namespace internal {
RUNTIME_FUNCTION(Runtime_CompileLazy) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
#ifdef DEBUG
if (FLAG_trace_lazy && !function->shared()->is_compiled()) {
PrintF("[unoptimized: ");
function->PrintName();
PrintF("]\n");
}
#endif
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
if (!Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) {
return isolate->heap()->exception();
}
DCHECK(function->is_compiled());
return function->code();
}
RUNTIME_FUNCTION(Runtime_CompileBaseline) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
if (!Compiler::CompileBaseline(function)) {
return isolate->heap()->exception();
}
DCHECK(function->is_compiled());
return function->code();
}
RUNTIME_FUNCTION(Runtime_CompileOptimized_Concurrent) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
if (!Compiler::CompileOptimized(function, Compiler::CONCURRENT)) {
return isolate->heap()->exception();
}
DCHECK(function->is_compiled());
return function->code();
}
RUNTIME_FUNCTION(Runtime_CompileOptimized_NotConcurrent) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
StackLimitCheck check(isolate);
if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
if (!Compiler::CompileOptimized(function, Compiler::NOT_CONCURRENT)) {
return isolate->heap()->exception();
}
DCHECK(function->is_compiled());
return function->code();
}
RUNTIME_FUNCTION(Runtime_NotifyStubFailure) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
DCHECK(AllowHeapAllocation::IsAllowed());
delete deoptimizer;
return isolate->heap()->undefined_value();
}
class ActivationsFinder : public ThreadVisitor {
public:
Code* code_;
bool has_code_activations_;
explicit ActivationsFinder(Code* code)
: code_(code), has_code_activations_(false) {}
void VisitThread(Isolate* isolate, ThreadLocalTop* top) {
JavaScriptFrameIterator it(isolate, top);
VisitFrames(&it);
}
void VisitFrames(JavaScriptFrameIterator* it) {
for (; !it->done(); it->Advance()) {
JavaScriptFrame* frame = it->frame();
if (code_->contains(frame->pc())) has_code_activations_ = true;
}
}
};
RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_SMI_ARG_CHECKED(type_arg, 0);
Deoptimizer::BailoutType type =
static_cast<Deoptimizer::BailoutType>(type_arg);
Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
DCHECK(AllowHeapAllocation::IsAllowed());
TimerEventScope<TimerEventDeoptimizeCode> timer(isolate);
TRACE_EVENT0("v8", "V8.DeoptimizeCode");
Handle<JSFunction> function = deoptimizer->function();
Handle<Code> optimized_code = deoptimizer->compiled_code();
DCHECK(optimized_code->kind() == Code::OPTIMIZED_FUNCTION);
DCHECK(type == deoptimizer->bailout_type());
// Make sure to materialize objects before causing any allocation.
JavaScriptFrameIterator it(isolate);
deoptimizer->MaterializeHeapObjects(&it);
delete deoptimizer;
// Ensure the context register is updated for materialized objects.
JavaScriptFrameIterator top_it(isolate);
JavaScriptFrame* top_frame = top_it.frame();
isolate->set_context(Context::cast(top_frame->context()));
if (type == Deoptimizer::LAZY) {
return isolate->heap()->undefined_value();
}
// Search for other activations of the same optimized code.
// At this point {it} is at the topmost frame of all the frames materialized
// by the deoptimizer. Note that this frame does not necessarily represent
// an activation of {function} because of potential inlined tail-calls.
ActivationsFinder activations_finder(*optimized_code);
activations_finder.VisitFrames(&it);
isolate->thread_manager()->IterateArchivedThreads(&activations_finder);
if (!activations_finder.has_code_activations_) {
if (function->code() == *optimized_code) {
if (FLAG_trace_deopt) {
PrintF("[removing optimized code for: ");
function->PrintName();
PrintF("]\n");
}
function->ReplaceCode(function->shared()->code());
}
// Evict optimized code for this function from the cache so that it
// doesn't get used for new closures.
function->shared()->EvictFromOptimizedCodeMap(*optimized_code, "notify deoptimized");
} else {
// TODO(titzer): we should probably do DeoptimizeCodeList(code)
// unconditionally if the code is not already marked for deoptimization.
// If there is an index by shared function info, all the better.
Deoptimizer::DeoptimizeFunction(*function);
}
return isolate->heap()->undefined_value();
}
static bool IsSuitableForOnStackReplacement(
Isolate* isolate,
Handle<JSFunction> function
) {
// Keep track of whether we've succeeded in optimizing.
if (function->shared()->optimization_disabled()) return false;
// If we are trying to do OSR when there are already optimized
// activations of the function, it means (a) the function is directly or
// indirectly recursive and (b) an optimized invocation has been
// deoptimized so that we are currently in an unoptimized activation.
// Check for optimized activations of this function.
for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) {
JavaScriptFrame* frame = it.frame();
if (frame->is_optimized() && frame->function() == *function) return false;
}
return true;
}
RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
Handle<Code> caller_code(function->shared()->code());
// We're not prepared to handle a function with arguments object.
DCHECK(!function->shared()->uses_arguments());
RUNTIME_ASSERT(FLAG_use_osr);
// Passing the PC in the javascript frame from the caller directly is
// not GC safe, so we walk the stack to get it.
JavaScriptFrameIterator it(isolate);
JavaScriptFrame* frame = it.frame();
if (!caller_code->contains(frame->pc())) {
// Code on the stack may not be the code object referenced by the shared
// function info. It may have been replaced to include deoptimization data.
caller_code = Handle<Code>(frame->LookupCode());
}
uint32_t pc_offset =
static_cast<uint32_t>(frame->pc() - caller_code->instruction_start());
#ifdef DEBUG
DCHECK_EQ(frame->function(), *function);
DCHECK_EQ(frame->LookupCode(), *caller_code);
DCHECK(caller_code->contains(frame->pc()));
#endif // DEBUG
BailoutId ast_id = caller_code->TranslatePcOffsetToAstId(pc_offset);
DCHECK(!ast_id.IsNone());
MaybeHandle<Code> maybe_result;
if (IsSuitableForOnStackReplacement(isolate, function)) {
if (FLAG_trace_osr) {
PrintF("[OSR - Compiling: ");
function->PrintName();
PrintF(" at -*- scheme -*- %d]\n", ast_id.ToInt());
}
maybe_result = Compiler::GetOptimizedCodeForOSR(function, ast_id, frame);
}
// Revert the patched back edge table, regardless of whether OSR succeeds.
BackEdgeTable::Revert(isolate, *caller_code);
// Check whether we ended up with usable optimized code.
Handle<Code> result;
if (maybe_result.ToHandle(&result)
&& result->kind() == Code::OPTIMIZED_FUNCTION) {
DeoptimizationInputData* data =
DeoptimizationInputData::cast(result->deoptimization_data());
if (data->OsrPcOffset()->value() >= 0) {
DCHECK(BailoutId(data->OsrAstId()->value()) == ast_id);
if (FLAG_trace_osr) {
PrintF("[OSR - Entry at AST id %d, offset %d in optimized code]\n",
ast_id.ToInt(), data->OsrPcOffset()->value());
}
// TODO(titzer): this is a massive hack to make the deopt counts
// match. Fix heuristics for reenabling optimizations!
function->shared()->increment_deopt_count();
if (result->is_turbofanned()) {
// TurboFanned OSR code cannot be installed into the function.
// But the function is obviously hot, so optimize it next time.
function->ReplaceCode(
isolate->builtins()->builtin(Builtins::kCompileOptimized));
} else {
// Crankshafted OSR code can be installed into the function.
function->ReplaceCode(*result);
}
return *result;
}
}
// Failed.
if (FLAG_trace_osr) {
PrintF("[OSR - Failed: ");
function->PrintName();
PrintF(" at AST id %d]\n", ast_id.ToInt());
}
if (!function->IsOptimized()) {
function->ReplaceCode(function->shared()->code());
}
return NULL;
}
RUNTIME_FUNCTION(Runtime_TryInstallOptimizedCode) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
// First check if this is a real stack overflow.
StackLimitCheck check(isolate);
if (check.JsHasOverflowed()) {
SealHandleScope shs(isolate);
return isolate->StackOverflow();
}
isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions();
return (function->IsOptimized())
? function->code()
: function->shared()->code();
}
bool CodeGenerationFromStringsAllowed(
Isolate* isolate,
Handle<Context> context
){
DCHECK(context->allow_code_gen_from_strings()->IsFalse());
// Check with callback if set.
AllowCodeGenerationFromStringsCallback callback =
isolate->allow_code_gen_callback();
if (callback == NULL) {
// No callback set and code generation disallowed.
return false;
} else {
// Callback set. Let it decide if code generation is allowed.
VMState<EXTERNAL> state(isolate);
return callback(v8::Utils::ToLocal(context));
}
}
static Object* CompileGlobalEval(
Isolate* isolate,
Handle<String> source,
Handle<SharedFunctionInfo> outer_info,
LanguageMode language_mode,
int eval_scope_position,
int eval_position
){
Handle<Context> context = Handle<Context>(isolate->context());
Handle<Context> native_context = Handle<Context>(context->native_context());
// Check if native context allows code generation from
// strings. Throw an exception if it doesn't.
if (native_context->allow_code_gen_from_strings()->IsFalse() &&
!CodeGenerationFromStringsAllowed(isolate, native_context)) {
Handle<Object> error_message =
native_context->ErrorMessageForCodeGenerationFromStrings();
Handle<Object> error;
MaybeHandle<Object> maybe_error = isolate->factory()->NewEvalError(
MessageTemplate::kCodeGenFromStrings, error_message);
if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
return isolate->heap()->exception();
}
// Deal with a normal eval call with a string argument. Compile it
// and return the compiled function bound in the local context.
static const ParseRestriction restriction = NO_PARSE_RESTRICTION;
Handle<JSFunction> compiled;
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
isolate, compiled,
Compiler::GetFunctionFromEval(
source, outer_info, context, language_mode,
restriction, eval_scope_position, eval_position
),
isolate->heap()->exception()
);
return *compiled;
}
RUNTIME_FUNCTION(Runtime_ResolvePossiblyDirectEval) {
HandleScope scope(isolate);
DCHECK(args.length() == 6);
Handle<Object> callee = args.at<Object>(0);
// If "eval" didn't refer to the original GlobalEval, it's not a
// direct call to eval.
// (And even if it is, but the first argument isn't a string, just let
// execution default to an indirect call to eval, which will also return
// the first argument without doing anything).
if (*callee != isolate->native_context()->global_eval_fun() || !args[1]->IsString()) {
return *callee;
}
DCHECK(args[3]->IsSmi());
DCHECK(is_valid_language_mode(args.smi_at(3)));
LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3));
DCHECK(args[4]->IsSmi());
Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), isolate);
return CompileGlobalEval(
isolate,
args.at<String>(1),
outer_info,
language_mode,
args.smi_at(4),
args.smi_at(5)
);
}
} // namespace internal
} // namespace v8
/* vim: set shiftwidth=4 softtabstop=0 cindent cinoptions={1s: */

View File

@@ -0,0 +1,21 @@
<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 44100
ksmps = 1
nchnls = 2
; pvanal -n 512 -w 8 allglass1-L.wav allglass1-L.pvc
; pvanal -n 512 -w 8 allglass1-R.wav allglass1-R.pvc
instr 1
ktime line 0, p3, 17.5018
arL pvoc ktime, 1, "allglass1-L.pvc"
arR pvoc ktime, 1, "allglass1-R.pvc"
out arL, arR
endin
</CsInstruments>
<CsScore>
i 1 0 70.0073
e
</CsScore>
</CsoundSynthesizer>

View File

@@ -0,0 +1,34 @@
<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 44100
ksmps = 1
nchnls = 2
; pvanal -n 1024 -w 2 partA-L.wav partA-L.pvc
; pvanal -n 1024 -w 2 partA-R.wav partA-R.pvc
; pvanal -n 1024 -w 2 partB.wav partB.pvc
instr 1
iscale = 1
ktimpnt1 line 0, iscale*(82196/44100), 82196/44100
ktimpnt2 linseg 0, iscale*1.25, 0, iscale*(103518/44100), 103518/44100
kfreqscale linseg 1, iscale*0.5, 1, iscale*1.6, 0.8
kfreqinterpL linseg 0, iscale*0.25, 0, iscale*1.6, 1
kampinterpL linseg 0, iscale*0.25, 0, iscale*1.6, 1
kfreqinterpR linseg 0, iscale*0.5, 0, iscale*1.2, 1
kampinterpR linseg 0, iscale*0.5, 0, iscale*1.2, 1
pvbufread ktimpnt1, "partB.pvc"
apvcL pvinterp ktimpnt2, 1, "partA-L.pvc", kfreqscale, 1, 1, 1, 1-kfreqinterpL, 1-kampinterpL
pvbufread ktimpnt1, "partB.pvc"
apvcR pvinterp ktimpnt2, 1, "partA-R.pvc", kfreqscale, 1, 1, 1, 1-kfreqinterpR, 1-kampinterpR
outs apvcL*0.8, apvcR*0.8
endin
</CsInstruments>
<CsScore>
i 1 0 7
e
</CsScore>
</CsoundSynthesizer>

View File

@@ -0,0 +1,253 @@
<CsoundSynthesizer>
<CsInstruments>
// Csound single-line comments can be preceded by a pair of forward slashes...
; ...or a semicolon.
/* Block comments begin with /* and end with */
// Orchestras begin with a header of audio parameters.
nchnls = 1
nchnls_i = 1
sr = 44100
0dbfs = 1
ksmps = 10
// The control rate kr = sr / ksmps can be omitted when the number of audio
// samples in a control period (ksmps) is set, but kr may appear in older
// orchestras.
kr = 4410
// Orchestras contain instruments. These begin with the keyword instr followed
// by a comma-separated list of numbers or names of the instrument. Instruments
// end at the endin keyword and cannot be nested.
instr 1, N_a_M_e_, +Name
// Instruments contain statements. Here is a typical statement:
aSignal oscil 0dbfs, 440, 1
// Statements are terminated with a newline (possibly preceded by a comment).
// To write a statement on several lines, precede the newline with a
// backslash.
prints \
"hello, world\n";comment
// Csound 6 introduced function syntax for opcodes with one or zero outputs.
// The oscil statement above is the same as
aSignal = oscil(0dbfs, 440, 1)
// Instruments can contain control structures.
kNote = p3
if (kNote == 0) then
kFrequency = 220
elseif kNote == 1 then // Parentheses around binary expressions are optional.
kFrequency = 440
endif
// Csound 6 introduced looping structures.
iIndex = 0
while iIndex < 5 do
print iIndex
iIndex += 1
od
iIndex = 0
until iIndex >= 5 do
print iIndex
iIndex += 1
enduntil
// Both kinds of loops can be terminated by either od or enduntil.
// Single-line strings are enclosed in double-quotes.
prints "string\\\r\n\t\""
// Multi-line strings are enclosed in pairs of curly braces.
prints {{
hello,
world
}}
// Instruments often end with a statement containing an output opcode.
outc aSignal
endin
// Orchestras can also contain user-defined opcodes (UDOs). Here is an
// oscillator with one audio-rate output and two control-rate inputs:
opcode anOscillator, a, kk
kAmplitude, kFrequency xin
aSignal vco2 kAmplitude, kFrequency
xout aSignal
endop
instr TestOscillator
outc(anOscillator(0dbfs, 110))
endin
// Python can be executed in Csound
// <https://csound.github.io/docs/manual/pyrun.html>. So can Lua
// <https://csound.github.io/docs/manual/lua.html>.
pyruni {{
import random
pool = [(1 + i / 10.0) ** 1.2 for i in range(100)]
def get_number_from_pool(n, p):
if random.random() < p:
i = int(random.random() * len(pool))
pool[i] = n;
return random.choice(pool)
}}
// The Csound preprocessor supports conditional compilation and including files.
#ifdef DEBUG
#undef DEBUG
#include "filename.orc"
#endif
// The preprocessor also supports object- and function-like macros. This is an
// object-like macro that defines a number:
#define A_HZ #440#
// This is a function-like macro:
#define OSCIL_MACRO(VOLUME'FREQUENCY'TABLE) #oscil $VOLUME, $FREQUENCY, $TABLE#
// Bodies of macros are enclosed in # and can contain newlines. The arguments of
// function-like macros are separated by single-quotes. Uses of macros are
// prefixed with a dollar sign.
instr TestMacro
aSignal $OSCIL_MACRO(1'$A_HZ'1)
// Not unlike PHP, macros expand in double-quoted strings.
prints "The frequency of the oscillator is $A_HZ Hz.\n"
out aSignal
endin
// Here are other things to note about Csound.
// There are two bitwise NOT operators, ~ and ¬ (U+00AC). The latter is common
// on keyboards in the United Kingdom
// <https://en.wikipedia.org/wiki/British_and_American_keyboards>.
instr TestBitwiseNOT
print ~42
print ¬42
endin
// Csound uses # for bitwise XOR, which the Csound manual calls bitwise
// non-equivalence <https://csound.github.io/docs/manual/opnonequiv.html>.
instr TestBitwiseXOR
print 0 # 0
print 0 # 1
print 1 # 0
print 1 # 1
endin
// Loops and if-then statements are relatively recent additions to Csound. There
// are many flow-control opcodes that involve goto and labels.
instr TestGoto
// This...
if p3 > 0 goto if_label
goto else_label
if_label:
prints "if branch\n"
goto endif_label
else_label:
prints "else branch\n"
endif_label:
// ...is the same as this.
if p3 > 0 then
prints "if branch\n"
else
prints "else branch\n"
endif
// This...
iIndex = 0
loop_label:
print iIndex
iIndex += 1
if iIndex < 10 goto loop_label
// ...is the same as this...
iIndex = 0
loop_lt_label:
print iIndex
loop_lt iIndex, 1, 10, loop_lt_label
// ...and this.
iIndex = 0
while iIndex < 10 do
print iIndex
iIndex += 1
od
endin
// The prints and printks opcodes
// <https://github.com/csound/csound/blob/develop/OOps/ugrw1.c#L831>, arguably
// the primary methods of logging output, treat certain sequences of characters
// different from printf in C.
instr TestPrints
// ^ prints an ESCAPE character (U+001B), not a CIRCUMFLEX ACCENT character
// (U+005E). ^^ prints a CIRCUMFLEX ACCENT.
prints "^^\n"
// ~ prints an ESCAPE character (U+001B) followed by a [, not a TILDE
// character (U+007E). ~~ prints a TILDE.
prints "~~\n"
// \A, \B, \N, \R, and \T correspond to the escaped lowercase characters (that
// is, BELL (U+0007), BACKSPACE (U+0008), new line (U+000A), CARRIAGE RETURN
// (U+000D), and tab (U+0009)).
prints "\T\R\N"
// %n, %r, and %t are the same as \n, \r, and \t, as are %N, %R, and %T.
prints "%t%r%n"
// %! prints a semicolon. This is a hold-over from old versions of Csound that
// allowed comments to begin in strings.
prints "; %!\n"
endin
// The arguments of function-like macros can be separated by # instead of '.
// These two lines define the same macro.
#define OSCIL_MACRO(VOLUME'FREQUENCY'TABLE) #oscil $VOLUME, $FREQUENCY, $TABLE#
#define OSCIL_MACRO(VOLUME#FREQUENCY#TABLE) #oscil $VOLUME, $FREQUENCY, $TABLE#
// Uses of macros can optionally be suffixed with a period.
instr TestMacroPeriodSuffix
aSignal $OSCIL_MACRO.(1'$A_HZ'1)
prints "The frequency of the oscillator is $A_HZ.Hz.\n"
out aSignal
endin
// Csound has @ and @@ operator-like macros that, when followed by a literal
// non-negative integer, expand to the next power of 2 and the next power of 2
// plus 1:
// @x = 2^(ceil(log2(x + 1))), x >= 0
// @@0 = 2
// @@x = 2^(ceil(log2(x))) + 1, x > 0
instr TestAt
prints "%d %2d %2d\n", 0, @0, @@0
prints "%d %2d %2d\n", 1, @1, @@1
prints "%d %2d %2d\n", 2, @2, @@2
prints "%d %2d %2d\n", 3, @3, @@3
prints "%d %2d %2d\n", 4, @4, @@4
prints "%d %2d %2d\n", 5, @5, @@5
prints "%d %2d %2d\n", 6, @6, @@6
prints "%d %2d %2d\n", 7, @7, @@7
prints "%d %2d %2d\n", 8, @8, @@8
prints "%d %2d %2d\n", 9, @9, @@9
endin
// Including newlines in macros can lead to confusing code.
instr MacroAbuse
if 1 == 1 then
prints "on\n"
#define FOO#
BAR
#endif // This ends the if block. It is not a preprocessor directive.
endin
</CsInstruments>
<CsScore>
f 1 0 16384 10 1
i "N_a_M_e_" 0 2
i "TestOscillator" 2 2
i "TestBitwiseNOT" 0 1
i "TestBitwiseXOR" 0 1
i "TestGoto" 0 1
i "TestMacroPeriodSuffix" 4 1
i "TestAt" 0 1
i "MacroAbuse" 0 1
e
</CsScore>
</CsoundSynthesizer>

View File

@@ -0,0 +1,2 @@
i 1 0 70.0073
e

View File

@@ -0,0 +1,2 @@
i 1 0 7
e

View File

@@ -0,0 +1,10 @@
f 1 0 16384 10 1
i "N_a_M_e_" 0 2
i "TestOscillator" 2 2
i "TestBitwiseNOT" 0 1
i "TestBitwiseXOR" 0 1
i "TestGoto" 0 1
i "TestMacroPeriodSuffix" 4 1
i "TestAt" 0 1
i "MacroAbuse" 0 1
e

13
samples/Csound/allglass.orc Executable file
View File

@@ -0,0 +1,13 @@
sr = 44100
kr = 44100
ksmps = 1
nchnls = 2
; pvanal -n 512 -w 8 allglass1-L.wav allglass1-L.pvc
; pvanal -n 512 -w 8 allglass1-R.wav allglass1-R.pvc
instr 1
ktime line 0, p3, 17.5018
arL pvoc ktime, 1, "allglass1-L.pvc"
arR pvoc ktime, 1, "allglass1-R.pvc"
out arL, arR
endin

26
samples/Csound/interp.orc Executable file
View File

@@ -0,0 +1,26 @@
sr = 44100
kr = 44100
ksmps = 1
nchnls = 2
; pvanal -n 1024 -w 2 partA-L.wav partA-L.pvc
; pvanal -n 1024 -w 2 partA-R.wav partA-R.pvc
; pvanal -n 1024 -w 2 partB.wav partB.pvc
instr 1
iscale = 1
ktimpnt1 line 0, iscale*(82196/44100), 82196/44100
ktimpnt2 linseg 0, iscale*1.25, 0, iscale*(103518/44100), 103518/44100
kfreqscale linseg 1, iscale*0.5, 1, iscale*1.6, 0.8
kfreqinterpL linseg 0, iscale*0.25, 0, iscale*1.6, 1
kampinterpL linseg 0, iscale*0.25, 0, iscale*1.6, 1
kfreqinterpR linseg 0, iscale*0.5, 0, iscale*1.2, 1
kampinterpR linseg 0, iscale*0.5, 0, iscale*1.2, 1
pvbufread ktimpnt1, "partB.pvc"
apvcL pvinterp ktimpnt2, 1, "partA-L.pvc", kfreqscale, 1, 1, 1, 1-kfreqinterpL, 1-kampinterpL
pvbufread ktimpnt1, "partB.pvc"
apvcR pvinterp ktimpnt2, 1, "partA-R.pvc", kfreqscale, 1, 1, 1, 1-kfreqinterpR, 1-kampinterpR
outs apvcL*0.8, apvcR*0.8
endin

250
samples/Csound/test.orc Normal file
View File

@@ -0,0 +1,250 @@
// Csound single-line comments can be preceded by a pair of forward slashes...
; ...or a semicolon.
/* Block comments begin with /* and end with */
// Orchestras begin with a header of audio parameters.
nchnls = 1
nchnls_i = 1
sr = 44100
0dbfs = 1
ksmps = 10
// The control rate kr = sr / ksmps can be omitted when the number of audio
// samples in a control period (ksmps) is set, but kr may appear in older
// orchestras.
kr = 4410
// Orchestras contain instruments. These begin with the keyword instr followed
// by a comma-separated list of numbers or names of the instrument. Instruments
// end at the endin keyword and cannot be nested.
instr 1, N_a_M_e_, +Name
// Instruments contain statements. Here is a typical statement:
aSignal oscil 0dbfs, 440, 1
// Statements are terminated with a newline (possibly preceded by a comment).
// To write a statement on several lines, precede the newline with a
// backslash.
prints \
"hello, world\n";comment
// Csound 6 introduced function syntax for opcodes with one or zero outputs.
// The oscil statement above is the same as
aSignal = oscil(0dbfs, 440, 1)
// Instruments can contain control structures.
kNote = p3
if (kNote == 0) then
kFrequency = 220
elseif kNote == 1 then // Parentheses around binary expressions are optional.
kFrequency = 440
endif
// Csound 6 introduced looping structures.
iIndex = 0
while iIndex < 5 do
print iIndex
iIndex += 1
od
iIndex = 0
until iIndex >= 5 do
print iIndex
iIndex += 1
enduntil
// Both kinds of loops can be terminated by either od or enduntil.
// Single-line strings are enclosed in double-quotes.
prints "string\\\r\n\t\""
// Multi-line strings are enclosed in pairs of curly braces.
prints {{
hello,
world
}}
// Instruments often end with a statement containing an output opcode.
outc aSignal
endin
// Orchestras can also contain user-defined opcodes (UDOs). Here is an
// oscillator with one audio-rate output and two control-rate inputs:
opcode anOscillator, a, kk
kAmplitude, kFrequency xin
aSignal vco2 kAmplitude, kFrequency
xout aSignal
endop
instr TestOscillator
outc(anOscillator(0dbfs, 110))
endin
// Python can be executed in Csound
// <https://csound.github.io/docs/manual/pyrun.html>. So can Lua
// <https://csound.github.io/docs/manual/lua.html>.
pyruni {{
import random
pool = [(1 + i / 10.0) ** 1.2 for i in range(100)]
def get_number_from_pool(n, p):
if random.random() < p:
i = int(random.random() * len(pool))
pool[i] = n;
return random.choice(pool)
}}
// The Csound preprocessor supports conditional compilation and including files.
#ifdef DEBUG
#undef DEBUG
#include "filename.orc"
#endif
// The preprocessor also supports object- and function-like macros. This is an
// object-like macro that defines a number:
#define A_HZ #440#
// This is a function-like macro:
#define OSCIL_MACRO(VOLUME'FREQUENCY'TABLE) #oscil $VOLUME, $FREQUENCY, $TABLE#
// Bodies of macros are enclosed in # and can contain newlines. The arguments of
// function-like macros are separated by single-quotes. Uses of macros are
// prefixed with a dollar sign.
instr TestMacro
aSignal $OSCIL_MACRO(1'$A_HZ'1)
// Not unlike PHP, macros expand in double-quoted strings.
prints "The frequency of the oscillator is $A_HZ Hz.\n"
out aSignal
endin
// Here are other things to note about Csound.
// There are two bitwise NOT operators, ~ and ¬ (U+00AC). The latter is common
// on keyboards in the United Kingdom
// <https://en.wikipedia.org/wiki/British_and_American_keyboards>.
instr TestBitwiseNOT
print ~42
print ¬42
endin
// Csound uses # for bitwise XOR, which the Csound manual calls bitwise
// non-equivalence <https://csound.github.io/docs/manual/opnonequiv.html>.
instr TestBitwiseXOR
print 0 # 0
print 0 # 1
print 1 # 0
print 1 # 1
endin
// Loops and if-then statements are relatively recent additions to Csound. There
// are many flow-control opcodes that involve goto and labels.
instr TestGoto
// This...
if p3 > 0 goto if_label
goto else_label
if_label:
prints "if branch\n"
goto endif_label
else_label:
prints "else branch\n"
endif_label:
// ...is the same as this.
if p3 > 0 then
prints "if branch\n"
else
prints "else branch\n"
endif
// This...
iIndex = 0
loop_label:
print iIndex
iIndex += 1
if iIndex < 10 goto loop_label
// ...is the same as this...
iIndex = 0
loop_lt_label:
print iIndex
loop_lt iIndex, 1, 10, loop_lt_label
// ...and this.
iIndex = 0
while iIndex < 10 do
print iIndex
iIndex += 1
od
endin
// The prints and printks opcodes
// <https://github.com/csound/csound/blob/develop/OOps/ugrw1.c#L831>, arguably
// the primary methods of logging output, treat certain sequences of characters
// different from printf in C.
instr TestPrints
// ^ prints an ESCAPE character (U+001B), not a CIRCUMFLEX ACCENT character
// (U+005E). ^^ prints a CIRCUMFLEX ACCENT.
prints "^^\n"
// ~ prints an ESCAPE character (U+001B) followed by a [, not a TILDE
// character (U+007E). ~~ prints a TILDE.
prints "~~\n"
// \A, \B, \N, \R, and \T correspond to the escaped lowercase characters (that
// is, BELL (U+0007), BACKSPACE (U+0008), new line (U+000A), CARRIAGE RETURN
// (U+000D), and tab (U+0009)).
prints "\T\R\N"
// %n, %r, and %t are the same as \n, \r, and \t, as are %N, %R, and %T.
prints "%t%r%n"
// %! prints a semicolon. This is a hold-over from old versions of Csound that
// allowed comments to begin in strings.
prints "; %!\n"
endin
// The arguments of function-like macros can be separated by # instead of '.
// These two lines define the same macro.
#define OSCIL_MACRO(VOLUME'FREQUENCY'TABLE) #oscil $VOLUME, $FREQUENCY, $TABLE#
#define OSCIL_MACRO(VOLUME#FREQUENCY#TABLE) #oscil $VOLUME, $FREQUENCY, $TABLE#
// Uses of macros can optionally be suffixed with a period.
instr TestMacroPeriodSuffix
aSignal $OSCIL_MACRO.(1'$A_HZ'1)
prints "The frequency of the oscillator is $A_HZ.Hz.\n"
out aSignal
endin
// Csound has @ and @@ operator-like macros that, when followed by a literal
// non-negative integer, expand to the next power of 2 and the next power of 2
// plus 1:
// @x = 2^(ceil(log2(x + 1))), x >= 0
// @@0 = 2
// @@x = 2^(ceil(log2(x))) + 1, x > 0
instr TestAt
prints "%d %2d %2d\n", 0, @0, @@0
prints "%d %2d %2d\n", 1, @1, @@1
prints "%d %2d %2d\n", 2, @2, @@2
prints "%d %2d %2d\n", 3, @3, @@3
prints "%d %2d %2d\n", 4, @4, @@4
prints "%d %2d %2d\n", 5, @5, @@5
prints "%d %2d %2d\n", 6, @6, @@6
prints "%d %2d %2d\n", 7, @7, @@7
prints "%d %2d %2d\n", 8, @8, @@8
prints "%d %2d %2d\n", 9, @9, @@9
endin
// Including newlines in macros can lead to confusing code.
instr MacroAbuse
if 1 == 1 then
prints "on\n"
#define FOO#
BAR
#endif // This ends the if block. It is not a preprocessor directive.
endin
scoreline_i {{
f 1 0 16384 10 1
i "N_a_M_e_" 0 2
i "TestOscillator" 2 2
i "TestBitwiseNOT" 0 1
i "TestBitwiseXOR" 0 1
i "TestGoto" 0 1
i "TestMacroPeriodSuffix" 4 1
i "TestAt" 0 1
i "MacroAbuse" 0 1
e
}}

13
samples/EJS/dash.ejs Normal file
View File

@@ -0,0 +1,13 @@
<% include parts/depend %>
<div class="row">
<% if (user.primaryAccount == "teacher") { %>
<% include teacher/sidebar %>
<% include teacher/dashboard %>
<% } else if (user.primaryAccount == "student") { %>
<% include student/sidebar %>
<% include student/dashboard %>
<% } else { %>
<center><h2>There seems to be a problem</h2></center>
<% } %>
</div>

102
samples/EJS/page.ejs Normal file
View File

@@ -0,0 +1,102 @@
<% include ../parts/depend %>
<div class="row">
<% include sidebar %>
<div class="col-lg-offset-3 col-lg-9 main-content">
<div class="page-title">
<h1>Pieces</h1>
<% if (pieces.length == 1) { %>
<p>You have
<strong>1</strong>
piece to practice</p>
<% } else { %>
<p>You have
<strong><%= pieces.length %></strong>
pieces to practice</p>
<% } %>
</div>
<div class="row">
<% if (pieces == undefined || pieces.length == 0) { %>
<div class="error-main">
<h1>No Pieces</h1>
<p>You have no
<strong>Pieces</strong>
assigned.</p>
</div>
<% } else { %>
<div class="col-lg-12 section-title">
<div style="margin-top: 10px; margin-bottom: 10px;" class="btn-group" role="group">
<button id="inProgressButton" type="button" class="btn btn-md btn-super-round btn-focus-off btn-primary btn-primary-active">In Progress</button>
<button id="completedButton" type="button" class="btn btn-md btn-super-round btn-focus-off btn-purple">Completed</button>
</div>
</div>
<div id="inProgressPieces">
<% if (inProgressPieces == undefined || inProgressPieces.length == 0) { %>
<center>
<h2>No Pieces in Progress</h2>
</center>
<% } else { %>
<% for (var i = 0; i < inProgressPieces.length; i++) { %>
<div class="col-lg-6">
<div class="box">
<div class="title">
<h1>
<a href="/pieces/practice/<%= inProgressPieces[i].id %>"><%= inProgressPieces[i].title %></a>
</h1>
<p>By
<strong><%= inProgressPieces[i].author %></strong>
</p>
<p>
Teacher:
<strong><%= inProgressPieces[i].teacherName %></strong>
</p>
<p>Average Practice Time:
<strong><%= inProgressPieces[i].averagePracticeTime %>
mins</strong>
</p>
<a href="/pieces/practice/<%= inProgressPieces[i].id %>" class="btn btn-success btn-block">Practice
<%= inProgressPieces[i].title %></a>
</div>
</div>
</div>
<% } %>
<% } %>
</div>
<div id="completedPieces" style="display: none;">
<% if (completedPieces == undefined || completedPieces.length == 0) { %>
<center>
<h2>No Completed Pieces</h2>
</center>
<% } else { %>
<% for (var i = 0; i < completedPieces.length; i++) { %>
<div class="col-lg-6">
<div class="box">
<div class="title">
<h1>
<a href="/pieces/practice/<%= completedPieces[i].id %>"><%= completedPieces[i].title %></a>
</h1>
<p>By
<strong><%= completedPieces[i].author %></strong>
</p>
<p>
Teacher:
<strong><%= completedPieces[i].teacherName %></strong>
</p>
<p>Average Practice Time:
<strong><%= completedPieces[i].averagePracticeTime %>
mins</strong>
</p>
<a href="/pieces/practice/<%= completedPieces[i].id %>" class="btn btn-success btn-block">Practice
<%= completedPieces[i].title %></a>
</div>
</div>
</div>
<% } %>
<% } %>
</div>
<% } %>
</div>
</div>
</div>

View File

@@ -0,0 +1,8 @@
{application, sample,
[{description, "sample app"},
{vsn, "1.0.0"},
{registered, []},
{mod, {sample_app, []}},
{applications, [kernel, stdlib]},
{env, []},
{modules, []}]}.

View File

@@ -0,0 +1,20 @@
#version 120
uniform sampler2D texture;
varying vec3 color;
varying vec2 texcoord;
vec4 GetDiffuse() {
vec4 diffuse = vec4(color.rgb, 1.0);
diffuse *= texture2D(texture, texcoord);
return diffuse;
}
void main() {
vec4 diffuse = GetDiffuse();
gl_FragData[0] = diffuse;
}

View File

@@ -0,0 +1,11 @@
#version 120
varying vec3 color;
varying vec2 texcoord;
void main() {
color = gl_Color.rgb;
texcoord = gl_MultiTexCoord0.st;
gl_Position = ftransform();
}

View File

@@ -0,0 +1,5 @@
<% if @name %>
Greeting, <%= @name %>!
<% else %>
Greeting!
<% end %>

3
samples/J/hashbang Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/jconsole
echo 'Hello, GitHub!'
exit ''

View File

@@ -0,0 +1,123 @@
{
"name": "Git Commit Message",
"scopeName": "text.git-commit",
"fileTypes": [
"COMMIT_EDITMSG"
],
"patterns": [
{
"name": "comment.line.number-sign.git-commit-message",
"begin": "^#",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.git-commit-message"
}
},
"end": "$",
"patterns": [
{
"name": "comment.line.on-branch.git-commit-message",
"match": "(?:On branch )([^ ]+)",
"captures": {
"1": {
"name": "support.function.branch.git-commit-message"
}
}
},
{
"name": "comment.line.on-branch.git-commit-message",
"match": "Your branch .* '([^ ']+)'",
"captures": {
"1": {
"name": "support.function.branch.git-commit-message"
}
}
},
{
"name": "comment.line.untracked.git-commit-message",
"begin": " Untracked files:",
"beginCaptures": {
"0": {
"name": "entity.definition.untracked.git-commit-message"
}
},
"end": "^#$",
"patterns": [
{
"name": "comment.line.untracked-file.git-commit-message",
"match": "\t(.*)$",
"captures": {
"1": {
"name": "support.function.file-status.git-commit-message"
},
"2": {
"name": "constant.character.branch.git-commit-message"
}
}
}
]
},
{
"name": "comment.line.discarded.git-commit-message",
"begin": " Change(?:s not staged for commit|d but not updated):",
"beginCaptures": {
"0": {
"name": "entity.definition.discarded.git-commit-message"
}
},
"end": "^#$",
"patterns": [
{
"name": "comment.line.discarded.git-commit-message",
"match": "\t([^:]+):(.*)$",
"captures": {
"1": {
"name": "support.function.file-status.git-commit-message"
},
"2": {
"name": "constant.character.branch.git-commit-message"
}
}
}
]
},
{
"name": "comment.line.selected.git-commit-message",
"begin": " Changes to be committed:",
"beginCaptures": {
"0": {
"name": "entity.definition.selected.git-commit-message"
}
},
"end": "^#$",
"patterns": [
{
"name": "comment.line.selected.git-commit-message",
"match": "\t([^:]+):(.*)$",
"captures": {
"1": {
"name": "support.function.file-status.git-commit-message"
},
"2": {
"name": "constant.character.branch.git-commit-message"
}
}
}
]
}
]
},
{
"name": "meta.diff.git-commit",
"comment": "diff at the end of the commit message when using commit -v, or viewing a log. End pattern is just something to be never matched so that the meta continues untill the end of the file.",
"begin": "diff\\ \\-\\-git",
"end": "(?=xxxxxx)123457",
"patterns": [
{
"include": "source.diff"
}
]
}
],
"uuid": "de3fb2fc-e564-4a31-9813-5ee26967c5c8"
}

View File

@@ -0,0 +1,8 @@
{
"project_id": "example",
"conduit_uri": "https://ex.am.pl/",
"copyright_holder": "Apache Software Foundation",
"arcanist_configuration": "ArcJIRAConfiguration",
"phabricator.uri": "https://phabricator.example.com/",
"load": ["libs/src"]
}

View File

@@ -0,0 +1,16 @@
[
{
"modid": "examplemod",
"name": "Example Mod",
"description": "Example placeholder mod.",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",
"authorList": ["ExampleDude"],
"credits": "The Forge and FML guys, for making this example",
"logoFile": "",
"screenshots": [],
"dependencies": []
}
]

9
samples/Jade/hello.pug Normal file
View File

@@ -0,0 +1,9 @@
doctype html
html
head
meta(charset='utf-8')
link(rel='stylesheet', type='text/css', href='main.css')
title Hello Pug
body
#text
include page

View File

@@ -0,0 +1,11 @@
# pmake might add -J (private)
FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W}
all: .DEFAULT
.DEFAULT:
@which gmake > /dev/null 2>&1 ||\
(echo "GMake is required for node.js to build.\
Install and try again" && exit 1)
@gmake ${.FLAGS} ${.TARGETS}
.PHONY: test

View File

@@ -0,0 +1,77 @@
all: link-php-objects index-php-objects $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo
generate-php-objects:
@echo "Generating PHP objects in $(PHP_DIR)"
@for f in `ls $(PHP_DIR)/*.php`; do \
objcopy --input binary --output elf64-x86-64 --binary-architecture i386 $$f $$f.o; \
done;
link-php-objects: generate-php-objects
@echo "Linking PHP objects in $(PHP_DIR)"
@for f in `ls $(PHP_DIR)/*.php`; do \
ar rcs $(PHP_DIR)/lib$(PHP_LIB).a $$f.o; \
done;
index-php-objects: link-php-objects
@echo "Indexing PHP objects in $(PHP_DIR)"
@echo "#ifndef HAVE_PHP_$(PHP_LIB)_H" > $(PHP_DIR)/$(PHP_LIB).h
@echo "#define HAVE_PHP_$(PHP_LIB)_H" >> $(PHP_DIR)/$(PHP_LIB).h
@echo "/* I AM GENERATED | DO NOT EDIT | I AM GENERATED */" >> $(PHP_DIR)/$(PHP_LIB).h
@for f in `ls $(PHP_DIR)/*.php`; do \
name=`echo $$f | sed 's/[^a-z]/_/g'`; \
echo "extern char _binary_"$$name"_start;" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "static inline char* php_index_$(PHP_LIB)_"$$name"() {" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo " return (char*) &_binary_"$$name"_start;" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "}" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "extern char _binary_"$$name"_end;" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "static inline char* php_index_$(PHP_LIB)_"$$name"_end() {" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo " return (char*) &_binary_"$$name"_end;" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "}" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "static inline size_t php_index_$(PHP_LIB)_"$$name"_size() {" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo " return (size_t) (php_index_$(PHP_LIB)_"$$name"_end() - php_index_$(PHP_LIB)_"$$name"());" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo "}" >> $(PHP_DIR)/$(PHP_LIB).h; \
done;
@echo "static inline php_$(PHP_LIB)_init(HashTable *index, HashTable *includes) {" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zval val;" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_hash_init(index, 8, NULL, ZVAL_PTR_DTOR, 0);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_hash_init(includes, 8, NULL, NULL, 0);" >> $(PHP_DIR)/$(PHP_LIB).h
@for f in `ls $(PHP_DIR)/*.php`; do \
name=`echo $$f | sed 's/[^a-z]/_/g'`; \
echo " ZVAL_NEW_STR(&val, zend_string_init(\
php_index_$(PHP_LIB)_"$$name"(), \
php_index_$(PHP_LIB)_"$$name"_size(), 0));" >> $(PHP_DIR)/$(PHP_LIB).h; \
echo " zend_hash_str_add(index, \""$$f"\", sizeof(\""$$f"\")-1, &val);" >> $(PHP_DIR)/$(PHP_LIB).h; \
done;
@echo "}" >> $(PHP_DIR)/$(PHP_LIB).h
@echo "static inline void php_$(PHP_LIB)_include(HashTable *index, HashTable *includes, \
char *path, size_t len, zval *retval) {" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_string *key = zend_string_init(path, len, 0);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zval *code = zend_hash_find(index, key);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " if (code && !zend_hash_exists(includes, key)) {" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_string *prepared = zend_string_alloc(Z_STRLEN_P(code) + (sizeof(\";\")-1), 0);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo >> $(PHP_DIR)/$(PHP_LIB).h
@echo " memcpy(&ZSTR_VAL(prepared)[0], \";\", sizeof(\";\")-1);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " if (Z_STRLEN_P(code) > (sizeof(\"<?php\") -1) && " >> $(PHP_DIR)/$(PHP_LIB).h
@echo " memcmp(Z_STRVAL_P(code), \"<?php\", sizeof(\"<?php\")-1) == SUCCESS) {" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " memcpy(&ZSTR_VAL(prepared)[1], &Z_STRVAL_P(code)[5], \
Z_STRLEN_P(code) - (sizeof(\"<?php\") - 1));" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " ZSTR_LEN(prepared) -= (sizeof(\"<?php\") - 1);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " ZSTR_VAL(prepared)[ZSTR_LEN(prepared)] = 0;" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " } else {" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " memcpy(&ZSTR_VAL(prepared)[1], Z_STRVAL_P(code), Z_STRLEN_P(code));" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " }" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_eval_stringl(ZSTR_VAL(prepared), ZSTR_LEN(prepared), retval, path);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_hash_add_empty_element(includes, key);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_string_release(prepared);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " }" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_string_release(key);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo "}" >> $(PHP_DIR)/$(PHP_LIB).h
@echo "static inline void php_$(PHP_LIB)_shutdown(HashTable *index, HashTable *includes) {" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_hash_destroy(index);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo " zend_hash_destroy(includes);" >> $(PHP_DIR)/$(PHP_LIB).h
@echo "}" >> $(PHP_DIR)/$(PHP_LIB).h
@echo "#endif" >> $(PHP_DIR)/$(PHP_LIB).h

View File

@@ -0,0 +1,226 @@
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOREL=$(LIBSOMAJ).$(RELEASE)
OLDSO=libpng.so
# Utilities:
CC=cc
AR_RC=ar rc
MKDIR_P=mkdir
LN_SF=ln -f -s
RANLIB=echo
CP=cp
RM_F=/bin/rm -f
# where make install puts libpng.a, $(OLDSO)*, and png.h
prefix=/usr/local
exec_prefix=$(prefix)
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
ZLIBLIB=../zlib
ZLIBINC=../zlib
CPPFLAGS=-I$(ZLIBINC)
CFLAGS= -dy -belf -O3
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
MANPATH=$(prefix)/man
BINPATH=$(exec_prefix)/bin
# override DESTDIR= on the make install command line to easily support
# installing into a temporary location. Example:
#
# make install DESTDIR=/tmp/build/libpng
#
# If you're going to install into a temporary location
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
# you execute make install.
DESTDIR=
DB=$(DESTDIR)$(BINPATH)
DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
libpng.pc:
cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
-e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo ccopts=\"-belf\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo libs=\"-lpng16 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
$(LIBSOMAJ): $(OBJSDLL)
$(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \
$(OBJSDLL)
pngtest: pngtest.o $(LIBSO)
LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install-headers: png.h pngconf.h pnglibconf.h
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
-@$(RM_F) $(DI)/png.h
-@$(RM_F) $(DI)/pngconf.h
-@$(RM_F) $(DI)/pnglibconf.h
cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
-@$(RM_F) $(DI)/libpng
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
install-static: install-headers libpng.a
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
cp libpng.a $(DL)/$(LIBNAME).a
chmod 644 $(DL)/$(LIBNAME).a
-@$(RM_F) $(DL)/libpng.a
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBSOMAJ) libpng.pc
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
-@$(RM_F) $(DL)/$(LIBSO)
-@$(RM_F) $(DL)/$(LIBSOREL)
-@$(RM_F) $(DL)/$(OLDSO)
cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
chmod 755 $(DL)/$(LIBSOREL)
(cd $(DL); \
$(LN_SF) $(LIBSOREL) $(LIBSO); \
$(LN_SF) $(LIBSO) $(OLDSO))
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
-@$(RM_F) $(DM)/man3/libpng.3
-@$(RM_F) $(DM)/man3/libpngpf.3
cp libpng.3 $(DM)/man3
cp libpngpf.3 $(DM)/man3
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
-@$(RM_F) $(DM)/man5/png.5
cp png.5 $(DM)/man5
install-config: libpng-config
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
-@$(RM_F) $(DB)/libpng-config
-@$(RM_F) $(DB)/$(LIBNAME)-config
cp libpng-config $(DB)/$(LIBNAME)-config
chmod 755 $(DB)/$(LIBNAME)-config
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
# If you installed in $(DESTDIR), test-installed won't work until you
# move the library to its final location. Use test-dd to test it
# before then.
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CPPFLAGS) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtesti pngtest.png
clean:
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
pnglibconf.h libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:
chmod a-w *.[ch35] $(DOCS) scripts/*
# DO NOT DELETE THIS LINE -- make depend depends on it.
png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtest.o: png.h pngconf.h pnglibconf.h

View File

@@ -0,0 +1,19 @@
#!/sbin/openrc-run
description="Daemon for Advanced Configuration and Power Interface"
extra_started_commands="reload"
command="/usr/sbin/acpid"
command_args="$ACPID_ARGS"
start_stop_daemon_args="--quiet"
depend() {
need localmount
use logger
}
reload() {
ebegin "Reloading acpid configuration"
start-stop-daemon --exec $command --signal HUP
eend $?
}

161
samples/Shell/filenames/gradlew vendored Normal file
View File

@@ -0,0 +1,161 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

View File

@@ -0,0 +1,26 @@
--------------------------- MODULE AsyncInterface ---------------------------
EXTENDS Naturals
CONSTANT Data
VARIABLE chan
Values == <<"foo", "bar", "baz">>
TypeInvariant == chan \in [val: Data, rdy: {0,1}, ack: {0,1}]
Init == /\ TypeInvariant
/\ chan.ack = chan.rdy
Send(d) == /\ chan.rdy = chan.ack
/\ chan' = [chan EXCEPT !.val = d, !.rdy = 1 - @]
Rcv == /\ chan.rdy # chan.ack
/\ chan' = [chan EXCEPT !.ack = 1 - @]
Next == (\E d \in Data : Send(d)) \/ Rcv
Spec == Init /\ [][Next]_chan
THEOREM Spec => []TypeInvariant
=============================================================================

47
samples/TLA/fifo.tla Normal file
View File

@@ -0,0 +1,47 @@
-------------------------------- MODULE fifo --------------------------------
EXTENDS Naturals, Sequences
CONSTANT Message
VARIABLES in, out, q
InChan == INSTANCE AsyncInterface WITH Data <- Message, chan <- in
OutChan == INSTANCE AsyncInterface WITH Data <- Message, chan <- out
-----------------------------------------------------------------------------
Init == /\ InChan!Init
/\ OutChan!Init
/\ q = <<>>
TypeInvariant == /\ InChan!TypeInvariant
/\ OutChan!TypeInvariant
/\ q \in Seq(Message)
/\ Len(q) <= 10
SSend(msg) == /\ InChan!Send(msg) \* Send msg on channel in
/\ UNCHANGED <<out, q>>
BufRcv == /\ InChan!Rcv
/\ Len(q) < 10
/\ q' = Append(q, in.val)
/\ UNCHANGED out
BufSend == /\ q # <<>>
/\ OutChan!Send(Head(q))
/\ q' = Tail(q)
/\ UNCHANGED in
RRcv == /\ OutChan!Rcv
/\ UNCHANGED <<in, q>>
Next == \/ \E msg \in Message : SSend(msg)
\/ BufRcv
\/ BufSend
\/ RRcv
Spec == Init /\ [][Next]_<<in, out, q>>
-----------------------------------------------------------------------------
THEOREM Spec => []TypeInvariant
=============================================================================

9
samples/TeX/beispiel.toc Normal file
View File

@@ -0,0 +1,9 @@
\beamer@endinputifotherversion {3.07pt}
\select@language {german}
\beamer@sectionintoc {1}{Geschichte}{3}{0}{1}
\beamer@sectionintoc {2}{Merkmale}{4}{0}{2}
\beamer@sectionintoc {3}{Kritikpunkte}{5}{0}{3}
\beamer@sectionintoc {4}{Perl-Kultur und Spa{\ss}}{6}{0}{4}
\beamer@sectionintoc {5}{Siehe auch}{7}{0}{5}
\beamer@sectionintoc {6}{Einzelnachweise}{8}{0}{6}
\beamer@sectionintoc {7}{Bedingte Ausf\"{u}hrung}{12}{0}{7}

19
samples/TeX/perl.toc Normal file
View File

@@ -0,0 +1,19 @@
\contentsline {section}{\numberline {1}History}{3}
\contentsline {subsection}{\numberline {1.1}Early versions}{3}
\contentsline {subsection}{\numberline {1.2}Early Perl 5}{3}
\contentsline {subsection}{\numberline {1.3}2000-present}{3}
\contentsline {subsection}{\numberline {1.4}Name}{3}
\contentsline {subsection}{\numberline {1.5}Camel symbol}{3}
\contentsline {subsection}{\numberline {1.6}Onion symbol}{3}
\contentsline {section}{\numberline {2}Overview}{3}
\contentsline {subsection}{\numberline {2.1}Features}{3}
\contentsline {subsection}{\numberline {2.2}Design}{3}
\contentsline {subsection}{\numberline {2.3}Applications}{3}
\contentsline {subsection}{\numberline {2.4}Implementation}{3}
\contentsline {section}{\numberline {3}Database interfaces}{3}
\contentsline {section}{\numberline {4}Distribution}{4}
\contentsline {subsection}{\numberline {4.1}Availability}{4}
\contentsline {subsubsection}{\numberline {4.3.1}Windows}{5}
\contentsline {subsubsection}{\numberline {4.3.2}Mac OS X}{6}
\contentsline {subsubsection}{\numberline {4.3.3}OpenBSD}{6}
\contentsline {subsubsection}{\numberline {4.3.4}FreeBSD}{6}

View File

@@ -0,0 +1,42 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt
volutpat metus, non accumsan tortor convallis id. Headline un oreiller.
Il est recommandé que la boîte en carton. Micro-ondes et sollicitudin bien.
---------------------------------------------
Pellentesque sodales lectus ac lorem tempus, non placerat blandit de nisi.
Phasellus Cursus, eros, et parfois, il est arcu diam mollis felis, ac tempor
nisl elit quis felis. Morbi nca nisi vel ligula interdum pas l'auteur de, ni
peur. Mécène voix améliorée. Besoin de tirer gratuitement. Suspendisse
fermentum convallis metus non blandit. Ac turpis quis de molestie de Mécène.
Gluten. Donec urna leo, aliquet quis urna et, congue est plein. Pellentesque
ut pretium erat, rutrum neque tincidunt. Donec hendrerit massa sed sapien
dapibus ultrices.
==============================================
Et le porche des Mécène, le prix de la société n'a pas, lacinia justo.
Pellentesque habitant morbi tristique senectus et Netus et Malesuada fames
egestas ac turpis. Ut leo mi, feugiat sagittis un ac id Mauris, posuere
lobortis neque. Non, il n'y avait pas de varius tincidunt pretium.
En effet, nca pur hendrerit pellentesque sapien enim sagittis ipsum, aliquam
tempor est récolté dans le jeu. Ut sempre egestas ultrices lorem à risus.
Même arcu dolor, ipsum, ma vie, il a été dit fringilla odio.
- Lorem ipsum eu commodo imperdiet sem
- ligula arcu placerat turpis, une
- importante lorem nisi eget urna.
Curabitur aliquam accumsan nulla blandit mollis. Celtics à la succession!
Id ou pas d'alcool. A iaculis Duis consectetur vitae enim. Et magnis dis
parturiente montes Cras iaculis justo eu libero. Thermal non sapien quis
nisi Pellentesque placerat. Praesent fringilla diam nisl, nca dignissim
sem lobortis feugiat. Vivre beaucoup de pauvreté.
Morbi non justo eleifend!
Lacinia lacus fringilla, il fut un temps. Sed dans nunc à une chanson des
Beatles ou pour décorer. Aeneas de basket-ball de diamètre. Fusce felis à
partir, pas de pellentesque eget, le stress thermique pulvinar. Etiam
porta odio sed nibh accumsan tristique. Mécène tincidunt quis justo eget
porttitor. Jusqu'à ce que l'élément de temps ciblé.

View File

@@ -0,0 +1,18 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 18:10:49
newmtl Dice
Ns 9.99999905
Ni 1.50000000
d 1.00000000
Tr 0.00000000
Tf 1.00000000 1.00000000 1.00000000
illum 2
Ka 0.58823532 0.58823532 0.58823532
Kd 0.58823532 0.58823532 0.58823532
Ks 0.44999999 0.44999999 0.44999999
Ke 0.00000000 0.00000000 0.00000000
map_Ka C:\Users\johng\Desktop\dice.png
map_Kd C:\Users\johng\Desktop\dice.png
map_bump C:\Users\johng\Desktop\dice.png
bump C:\Users\johng\Desktop\dice.png

View File

@@ -0,0 +1,12 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 16:25:06
newmtl wire_061135006
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.23921570 0.52941179 0.02352941
Kd 0.23921570 0.52941179 0.02352941
Ks 0.34999999 0.34999999 0.34999999

View File

@@ -0,0 +1,38 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 16:20:17
newmtl Material__41
Ns 10.00000000
Ni 1.50000000
d 1.00000000
Tr 0.00000000
Tf 1.00000000 1.00000000 1.00000000
illum 2
Ka 0.58800000 0.58800000 0.58800000
Kd 1.00000000 0.00000000 0.00000000
Ks 0.00000000 0.00000000 0.00000000
Ke 0.00000000 0.00000000 0.00000000
newmtl Material__42
Ns 10.00000000
Ni 1.50000000
d 1.00000000
Tr 0.00000000
Tf 1.00000000 1.00000000 1.00000000
illum 2
Ka 0.00000000 0.00000000 1.00000000
Kd 0.00000000 0.00000000 1.00000000
Ks 0.00000000 0.00000000 0.00000000
Ke 0.00000000 0.00000000 0.00000000
newmtl Material__43
Ns 10.00000000
Ni 1.50000000
d 1.00000000
Tr 0.00000000
Tf 1.00000000 1.00000000 1.00000000
illum 2
Ka 0.35294119 0.35294119 0.35294119
Kd 0.50196081 0.50588238 0.23529413
Ks 0.00000000 0.00000000 0.00000000
Ke 0.00000000 0.00000000 0.00000000

View File

@@ -0,0 +1,12 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 16:27:25
newmtl wire_088177027
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.34509805 0.69411767 0.10588236
Kd 0.34509805 0.69411767 0.10588236
Ks 0.34999999 0.34999999 0.34999999

View File

@@ -0,0 +1,68 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 18:10:49
mtllib dice.mtl
#
# object Dice
#
v -30.00000000 0.00000000 30.00000000
v -30.00000000 0.00000000 -30.00000000
v 30.00000000 0.00000000 -30.00000000
v 30.00000000 0.00000000 30.00000000
v -30.00000000 60.00000000 30.00000000
v 30.00000000 60.00000000 30.00000000
v 30.00000000 60.00000000 -30.00000000
v -30.00000000 60.00000000 -30.00000000
# 8 vertices
vn 0.00000000 -1.00000000 -0.00000000
vn 0.00000000 1.00000000 -0.00000000
vn 0.00000000 0.00000000 1.00000000
vn 1.00000000 0.00000000 -0.00000000
vn 0.00000000 0.00000000 -1.00000000
vn -1.00000000 0.00000000 -0.00000000
# 6 vertex normals
vt 1.00183499 -0.01224804 60.49999619
vt 1.00183487 0.48775199 60.49999619
vt 0.66850162 0.48775196 60.50000381
vt 0.66850162 -0.01224804 60.50000381
vt -0.00046772 0.49891680 0.50000000
vt 0.33286563 0.49891669 0.50000000
vt 0.33286572 0.99891669 0.50000000
vt -0.00046766 0.99891680 0.50000000
vt -0.00046772 0.00000006 0.62999344
vt 0.33286560 0.00000003 0.63000107
vt 0.33286566 0.50000000 0.62999916
vt -0.00046772 0.50000012 0.62999153
vt 0.66447806 0.49891663 -29.58417892
vt 0.66447806 0.99891663 -29.58417130
vt 0.33114472 0.99891663 -29.58417320
vt 0.33114466 0.49891669 -29.58418083
vt 0.99669039 1.00000000 60.36999512
vt 0.66335702 1.00000000 60.37000275
vt 0.66335702 0.50000000 60.36999893
vt 0.99669039 0.49999994 60.36999130
vt 0.33280861 0.00000006 90.58419037
vt 0.66614199 0.00000006 90.58418274
vt 0.66614199 0.50000000 90.58417511
vt 0.33280861 0.50000000 90.58419037
# 24 texture coords
g Dice
usemtl Dice
s 2
f 1/1/1 2/2/1 3/3/1 4/4/1
s 4
f 5/5/2 6/6/2 7/7/2 8/8/2
s 8
f 1/9/3 4/10/3 6/11/3 5/12/3
s 16
f 4/13/4 3/14/4 7/15/4 6/16/4
s 32
f 3/17/5 2/18/5 8/19/5 7/20/5
s 64
f 2/21/6 1/22/6 5/23/6 8/24/6
# 6 polygons

View File

@@ -0,0 +1,63 @@
cstype bmatrix
deg 3 3
step 3 3
bmat u 1 -3 3 -1 \
0 3 -6 3 \
0 0 3 -3 \
0 0 0 1
bmat v 1 -3 -3 2 \
2 2 2 3 \
0 0 0 -2 \
0 0 0 2
# Special point and space curve data
vp 0.500
vp 0.700
vp 1.100
vp 0.200 0.950
v 0.300 1.500 0.100
v 0.000 0.000 0.000
v 1.000 1.000 0.000
v 2.000 1.000 0.000
v 3.000 0.000 0.000
cstype bezier
deg 3
curv 0.2 0.9 -4 -3 -2 -1
sp 1
parm u 0.00 1.00
end
# Trimming curve
vp -0.675 1.850 3.000
vp 0.915 1.930
vp 2.485 0.470 2.000
vp 2.485 -1.030
vp 1.605 -1.890 10.700
vp -0.745 -0.654 0.500
cstype rat bezier
curv2 -6 -5 -4 -3 -2 -1 -6
parm u 0.00 1.00 2.00
sp 2 3
end
# Surface
v -1.350 -1.030 0.000
v 0.130 -1.030 0.432 7.600
v 1.480 -1.030 0.000 2.300
v -1.460 0.060 0.201
v 0.120 0.060 0.915 0.500
v 1.380 0.060 0.454 1.500
v -1.480 1.030 0.000 2.300
v 0.120 1.030 0.394 6.100
v 1.170 1.030 0.000 3.300
cstype rat bspline
deg 2 2
surf -1.0 2.5 -2.0 2.0 -9 -8 -7 -6 -5 -4 -3 -2 -1
parm u -1.00 -1.00 -1.00 2.50 2.50 2.50
parm v -2.00 -2.00 -2.00 2.00 2.00 2.00
trim 0.0 2.0 1 2.2 2.2 3
sp 4
con 1 2.0 2.0 1 2 4.0 3.0 1
end

View File

@@ -0,0 +1,211 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 16:25:06
mtllib ripple.mtl
#
# object Plane001
#
v -50.94465637 46.62910461 25.64281845
v -37.48844147 24.20991898 16.95789337
v -50.94465637 41.79552460 16.95789337
v -37.48844147 27.38044548 25.64281845
v -37.48844147 20.64456940 8.27297115
v -50.94465637 36.20748138 8.27297115
v -24.03222656 14.00123024 8.27297115
v -24.03222656 17.55510902 25.64281845
v -37.48844147 16.93638992 -0.41195297
v -50.94465637 30.29615402 -0.41195297
v -37.48844147 13.33736229 -9.09687710
v -50.94465637 24.49272728 -9.09687710
v -24.03222656 12.37120342 -0.41195297
v -24.03222656 10.91310787 -9.09687710
v -10.57601166 13.59048653 8.27297115
v -10.57601166 14.55468178 25.64281845
v 2.88020325 16.72536278 8.27297115
v 2.88020325 15.78074646 25.64281845
v -10.57601166 13.76694107 -0.41195297
v -10.57601166 14.20676041 -9.09687710
v 2.88020325 20.20512009 -9.09687710
v -37.48844147 10.09947586 -17.78180122
v -50.94465637 19.22837830 -17.78180122
v -37.48844147 7.47471571 -26.46672440
v -50.94465637 14.93428612 -26.46672440
v -24.03222656 9.68243504 -17.78180122
v -24.03222656 8.73467827 -26.46672440
v -50.94465637 12.04163361 -35.15164948
v -37.48844147 5.07252359 -43.83657455
v -50.94465637 10.98159790 -43.83657455
v -24.03222656 7.90988255 -43.83657455
v -10.57601166 14.77819061 -17.78180122
v -10.57601166 15.34947777 -26.46672440
v 2.88020325 23.95441628 -26.46672440
v -10.57601166 15.96461296 -43.83657455
v 2.88020325 25.70764923 -43.83657455
v 16.33641815 20.71888542 8.27297115
v 16.33641815 18.63488770 25.64281845
v 29.79263306 22.88408279 8.27297115
v 29.79263306 20.51868629 25.64281845
v 16.33641815 25.89498520 -9.09687710
v 29.79263306 28.26315308 -9.09687710
v 43.24884796 20.53397751 8.27297115
v 43.24884796 18.83372879 25.64281845
v 56.70506287 10.98159790 8.27297115
v 56.70506287 10.98159790 25.64281845
v 43.24884796 24.29642487 -9.09687710
v 56.70506287 10.98159790 -9.09687710
v 16.33641815 31.18479538 -26.46672440
v 29.79263306 33.67591858 -26.46672440
v 16.33641815 33.60993195 -43.83657455
v 29.79263306 36.14238739 -43.83657455
v 43.24884796 28.06308365 -26.46672440
v 56.70506287 10.98159790 -26.46672440
v 43.24884796 29.77596664 -43.83657455
v 56.70506287 10.98159790 -43.83657455
# 56 vertices
vn 0.76763725 0.57240576 -0.28824410
vn 0.65690964 0.70898795 -0.25652644
vn 0.74131417 0.58485949 -0.32923040
vn 0.71128774 0.66027904 -0.24104214
vn 0.57668960 0.75674146 -0.30784976
vn 0.68667018 0.61596304 -0.38610050
vn 0.23177305 0.95558769 -0.18202589
vn 0.35748628 0.91861695 -0.16836406
vn 0.49003005 0.80710864 -0.32931164
vn 0.62462389 0.65700555 -0.42212400
vn 0.39033067 0.86003071 -0.32861704
vn 0.55869663 0.70821345 -0.43161529
vn 0.10668588 0.97925276 -0.17228496
vn -0.02931032 0.98739797 -0.15551880
vn -0.07901792 0.99610978 -0.03900582
vn 0.03497402 0.99911118 -0.02352911
vn -0.26840743 0.95793903 0.10153976
vn -0.16543458 0.98361683 0.07161918
vn -0.19281031 0.98029876 0.04287769
vn -0.30288765 0.95234644 0.03599080
vn -0.40211844 0.89890224 0.17399880
vn 0.28773862 0.90962982 -0.29963326
vn 0.49455851 0.76858509 -0.40581867
vn 0.17960025 0.95868921 -0.22058737
vn 0.45494452 0.82066798 -0.34573048
vn -0.15761316 0.97898537 -0.12940517
vn -0.26093873 0.96179539 -0.08282847
vn 0.42190838 0.88920695 -0.17693035
vn 0.09655062 0.98630100 -0.13374706
vn 0.39958632 0.90994275 -0.11106271
vn -0.33997789 0.93774927 -0.07100248
vn -0.39676505 0.91563439 0.06473898
vn -0.48332906 0.87461358 0.03800077
vn -0.49581528 0.85854882 0.13061842
vn -0.53545648 0.84449571 0.01064764
vn -0.53323698 0.84293228 0.07157855
vn -0.21215707 0.95821202 0.19188292
vn -0.17650788 0.97674274 0.12173164
vn 0.02109022 0.97897238 0.20289963
vn 0.00300862 0.99226630 0.12409085
vn -0.26396522 0.92647272 0.26827350
vn 0.06819490 0.95697868 0.28203061
vn 0.40214399 0.90704513 0.12469723
vn 0.34466815 0.93620455 0.06873771
vn 0.56171304 0.82705635 0.02136020
vn 0.50399899 0.86370426 -0.00000000
vn 0.50896263 0.84233069 0.17730212
vn 0.67437875 0.73730576 0.03991853
vn -0.31544915 0.92877936 0.19457826
vn 0.10895393 0.97185022 0.20889288
vn -0.33574972 0.93407321 0.12157062
vn 0.12362437 0.98257226 0.13881217
vn 0.59271014 0.79456633 0.13175353
vn 0.76462281 0.64369327 0.03179539
vn 0.62271041 0.77744496 0.08838002
vn 0.79732174 0.60305154 0.02463558
# 56 vertex normals
g Plane001
usemtl wire_061135006
s 1
f 1//1 2//2 3//3
f 1//1 4//4 2//2
f 3//3 5//5 6//6
f 3//3 2//2 5//5
f 2//2 7//7 5//5
f 2//2 8//8 7//7
f 2//2 4//4 8//8
f 6//6 9//9 10//10
f 6//6 5//5 9//9
f 10//10 11//11 12//12
f 10//10 9//9 11//11
f 5//5 13//13 9//9
f 5//5 7//7 13//13
f 9//9 14//14 11//11
f 9//9 13//13 14//14
f 8//8 15//15 7//7
f 8//8 16//16 15//15
f 16//16 17//17 15//15
f 16//16 18//18 17//17
f 7//7 19//19 13//13
f 7//7 15//15 19//19
f 13//13 20//20 14//14
f 13//13 19//19 20//20
f 19//19 21//21 20//20
f 19//19 17//17 21//21
f 19//19 15//15 17//17
f 22//22 12//12 11//11
f 23//23 12//12 22//22
f 24//24 23//23 22//22
f 25//25 23//23 24//24
f 11//11 26//26 22//22
f 11//11 14//14 26//26
f 22//22 27//27 24//24
f 22//22 26//26 27//27
f 28//28 29//29 30//30
f 28//28 24//24 29//29
f 28//28 25//25 24//24
f 24//24 31//31 29//29
f 24//24 27//27 31//31
f 14//14 32//32 26//26
f 14//14 20//20 32//32
f 26//26 33//33 27//27
f 26//26 32//32 33//33
f 32//32 34//34 33//33
f 32//32 21//21 34//34
f 32//32 20//20 21//21
f 27//27 35//35 31//31
f 27//27 33//33 35//35
f 33//33 36//36 35//35
f 33//33 34//34 36//36
f 18//18 37//37 17//17
f 18//18 38//38 37//37
f 38//38 39//39 37//37
f 38//38 40//40 39//39
f 17//17 41//41 21//21
f 17//17 37//37 41//41
f 37//37 42//42 41//41
f 37//37 39//39 42//42
f 40//40 43//43 39//39
f 40//40 44//44 43//43
f 44//44 45//45 43//43
f 44//44 46//46 45//45
f 39//39 47//47 42//42
f 39//39 43//43 47//47
f 43//43 48//48 47//47
f 43//43 45//45 48//48
f 21//21 49//49 34//34
f 21//21 41//41 49//49
f 41//41 50//50 49//49
f 41//41 42//42 50//50
f 34//34 51//51 36//36
f 34//34 49//49 51//51
f 49//49 52//52 51//51
f 49//49 50//50 52//52
f 42//42 53//53 50//50
f 42//42 47//47 53//53
f 47//47 54//54 53//53
f 47//47 48//48 54//54
f 50//50 55//55 52//52
f 50//50 53//53 55//55
f 53//53 56//56 55//55
f 53//53 54//54 56//56
# 0 polygons - 82 triangles

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 27.05.2016 16:27:25
mtllib spline.mtl
#
# shape Line001
#
v 71.96043396 50.40676880 7.76218033
v 68.00450134 49.56087112 9.62696075
v 58.35432816 47.37934113 12.77519226
v 45.49077225 44.39643097 15.20822144
v 31.89469528 41.14640045 14.92743301
v 20.04695511 38.16349030 9.93418884
v 12.42840576 35.98196030 -1.77015114
v 11.51990128 35.13606262 -22.18419647
v 11.96961975 32.52806473 -45.35875702
v 7.61955643 26.33384705 -63.90428543
v -0.25867081 18.99807358 -77.65885162
v -10.39344025 12.96540833 -86.46051788
v -21.51314926 10.68051147 -90.14735413
v -32.34618759 14.58804321 -88.55743408
v -41.62093735 27.13267326 -81.52883148
v -45.51561356 42.52115250 -66.96699524
v -43.02957153 53.76282501 -45.02964783
v -37.12292480 61.50623322 -18.93314743
v -30.75580597 66.39993286 8.10605431
v -26.88832855 69.09246826 32.87157822
v -28.48061752 70.23239136 52.14703751
v -38.49278641 70.46823883 62.71599197
v -53.13377380 68.93627167 62.32793045
v -66.29364777 64.98539734 52.53622818
v -77.45420837 59.58318329 35.83026123
v -86.09729004 53.69718933 14.69950485
v -91.70471191 48.29497528 -8.36663914
v -93.75828552 44.34410095 -30.87874222
v -91.73982239 42.81213379 -50.34735489
v -89.87214661 43.91723251 -66.58690643
v -92.01886749 46.76722717 -80.05120850
v -97.12301636 50.66415787 -89.21000671
v -104.12763977 54.91006470 -92.53303528
v -111.97578430 58.80699158 -88.49005127
v -119.61050415 61.65698624 -75.55078125
v -125.97479248 62.76208496 -52.18497467
# 36 vertices
g Line001
usemtl wire_088177027
l 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

View File

@@ -0,0 +1,6 @@
## Interface: 60200
## Title: Vahevian Lotus Vane
## Notes: "Critical Threat Range"
## Version: 4.2
Vahevia.xml
Lotus_Vane.lua

View File

@@ -0,0 +1,11 @@
# Internationalisation example
## Title: Test
## Title-esES: Pruebas
## Title-huHU: Próba
## Notes: "Testing this shit"
## Notes-esES: "Probando la mierda esta"
## Notes-huHU: "Kipróbálom ezt a szart"
Tests.xml
Elk.lua

View File

@@ -0,0 +1,24 @@
# Addon manifest file
## Interface: 60200
## Title: Linguist
## Notes: "Language savant"
## RequiredDeps: charlockHolmes, escapeUtils, mimeTypes, rugged
## LoadOnDemand: 1
## Version: 4.9
# This is a comment
## SavedVariables: foo, bar
## SavedVariablesPerCharacter: fewburt
Languages.xml
Heuristics.xml
h-counter.lua
ruby-isnt.lua
#
# It is possible for addons to query values of any tags with a "X-" prefix.
# Some possibilities include:
#
## X-Date: "2016-04-28"
## X-Website: "https://github.com/"

23
samples/XML/Demo.sfproj Normal file
View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>93d81507-bccc-43d6-8667-2d42473f0c32</ProjectGuid>
<ProjectVersion>1.0</ProjectVersion>
</PropertyGroup>
<ItemGroup>
<None Include="Scripts\Deploy-FabricApplication.ps1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ChaosTest.ChaosService\ChaosTest.ChaosService.csproj" />
<ProjectReference Include="..\ChaosTest.WebService\ChaosTest.WebService.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="ApplicationPackageRoot\ApplicationManifest.xml" />
<Content Include="ApplicationParameters\Cloud.xml" />
<Content Include="ApplicationParameters\Local.xml" />
<Content Include="PublishProfiles\Cloud.xml" />
<Content Include="PublishProfiles\Local.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets" />
</Project>

104
samples/XML/Strings.resx Normal file
View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Argument_InvalidPathChars" xml:space="preserve">
<value>Illegal characters in path.</value>
</data>
</root>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<ProjectReference Include="..\src\System.Buffers.builds">
<SupportedFramework>net45;netcore45;netstandardapp1.5;wpa81</SupportedFramework>
</ProjectReference>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

8
samples/XML/src.builds Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="*\src\*.builds" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

View File

@@ -36,8 +36,11 @@ source = Licensed::Source::Filesystem.new("vendor/grammars/*/", type: "grammar")
config = Licensed::Configuration.new
config.sources << source
if ARGV[0] == "verify"
Licensed::Command::Verify.new(config).run
command = if ARGV[0] == "verify"
Licensed::Command::Verify.new(config)
else
Licensed::Command::Cache.new(config).run(force: true)
Licensed::Command::Cache.new(config)
end
command.run
exit command.success?

View File

@@ -166,7 +166,7 @@ class TestBlob < Minitest::Test
assert sample_blob_memory("JavaScript/jquery-1.4.2.min.js").generated?
# Composer generated composer.lock file
assert sample_blob_memory("JSON/composer.lock").generated?
assert sample_blob_memory("JSON/filenames/composer.lock").generated?
# PEG.js-generated parsers
assert sample_blob_memory("JavaScript/parser.js").generated?

View File

@@ -19,7 +19,7 @@ class TestFileBlob < Minitest::Test
blob.instance_variable_set(:@name, 'script')
blob
end
def test_extensions
assert_equal [".gitignore"], Linguist::FileBlob.new(".gitignore").extensions
assert_equal [".xml"], Linguist::FileBlob.new("build.xml").extensions
@@ -312,11 +312,13 @@ class TestFileBlob < Minitest::Test
# Debian packaging
assert sample_blob("debian/cron.d").vendored?
# Django env
assert sample_blob("env/foo.py").vendored?
# Erlang
assert sample_blob("rebar").vendored?
# git config files
assert_predicate fixture_blob("some/path/.gitattributes"), :vendored?
assert_predicate fixture_blob(".gitignore"), :vendored?
assert_predicate fixture_blob("special/path/.gitmodules"), :vendored?

View File

@@ -17,6 +17,7 @@ class TestGenerated < Minitest::Test
assert_raises(DataLoadedError, "Data wasn't loaded when calling generated? on #{blob}") do
Generated.generated?(blob, lambda { raise DataLoadedError.new })
end
assert Generated.generated?(blob, lambda { IO.read(blob) }), "#{blob} was not recognized as a generated file"
end
def generated_fixture_without_loading_data(name)
@@ -35,7 +36,7 @@ class TestGenerated < Minitest::Test
generated_loading_data(File.join(samples_path, name))
end
def test_check_generated
def test_check_generated
# Xcode project files
generated_sample_without_loading_data("Binary/MainMenu.nib")
generated_sample_without_loading_data("Dummy/foo.xcworkspacedata")
@@ -62,6 +63,9 @@ class TestGenerated < Minitest::Test
# Minified files
generated_sample_loading_data("JavaScript/jquery-1.6.1.min.js")
# JS files with source map reference
generated_sample_loading_data("JavaScript/namespace.js")
# Source Map
generated_fixture_without_loading_data("Data/bootstrap.css.map")
generated_fixture_loading_data("Data/sourcemap.v3.map")

View File

@@ -122,6 +122,12 @@ class TestHeuristcs < Minitest::Test
})
end
def test_inc_by_heuristics
assert_heuristics({
"PHP" => all_fixtures("PHP", "*.inc")
})
end
def test_ls_by_heuristics
assert_heuristics({
"LiveScript" => all_fixtures("LiveScript", "*.ls"),

View File

@@ -31,6 +31,7 @@ class TestModelines < Minitest::Test
assert_modeline Language["Prolog"], fixture_blob("Data/Modelines/not_perl.pl")
assert_modeline Language["Smalltalk"], fixture_blob("Data/Modelines/example_smalltalk.md")
assert_modeline Language["PHP"], fixture_blob("Data/Modelines/iamphp.inc")
assert_modeline nil, sample_blob("C/main.c")
end
def test_modeline_languages

1
vendor/grammars/Elm vendored Submodule

Submodule vendor/grammars/Elm added at 227327e33e

1
vendor/grammars/TLA vendored Submodule

Submodule vendor/grammars/TLA added at 7e351a9cdf

1
vendor/grammars/creole vendored Submodule

Submodule vendor/grammars/creole added at cdc8adc306

1
vendor/grammars/ejs-tmbundle vendored Submodule

1
vendor/grammars/nu.tmbundle vendored Submodule

View File

@@ -24,4 +24,4 @@ reviewed:
sources:
npm: false
rubygem: true
rubygem: false

View File

@@ -1,6 +1,6 @@
---
type: grammar
name: Elm.tmLanguage
name: Elm
license: mit
---
The MIT License (MIT)

View File

@@ -1,11 +1,11 @@
---
type: grammar
name: sublime-apl
name: TLA
license: mit
---
The MIT License (MIT)
Copyright (c) 2014 John Haugeland
Copyright (c) 2013 Microsoft and HP
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -23,4 +23,4 @@ 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.
SOFTWARE.

19
vendor/licenses/grammar/creole.txt vendored Normal file
View File

@@ -0,0 +1,19 @@
---
type: grammar
name: creole
license: mit
---
The MIT License (MIT)
Copyright (c) 2012 Siddley
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.

Some files were not shown because too many files have changed in this diff Show More