mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Compare commits
	
		
			66 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					c7bab11ebe | ||
| 
						 | 
					6995fc28b6 | ||
| 
						 | 
					102f14d0e9 | ||
| 
						 | 
					aac168402b | ||
| 
						 | 
					152d49513f | ||
| 
						 | 
					d5564c808d | ||
| 
						 | 
					82410e07b2 | ||
| 
						 | 
					94d90b30b5 | ||
| 
						 | 
					06997f0da2 | ||
| 
						 | 
					55aafa416d | ||
| 
						 | 
					5fcdf6adc2 | ||
| 
						 | 
					6a565a849b | ||
| 
						 | 
					66fc67e34c | ||
| 
						 | 
					7cf140940e | ||
| 
						 | 
					60e90bab23 | ||
| 
						 | 
					4f58258186 | ||
| 
						 | 
					03e2904ebf | ||
| 
						 | 
					bea90b256e | ||
| 
						 | 
					8eb37ba956 | ||
| 
						 | 
					8d20c1fb59 | ||
| 
						 | 
					9a1abf0c49 | ||
| 
						 | 
					5aae7a4000 | ||
| 
						 | 
					d9509a1750 | ||
| 
						 | 
					978c448fb8 | ||
| 
						 | 
					997c0fca10 | ||
| 
						 | 
					3ae6e68492 | ||
| 
						 | 
					851c93a1f7 | ||
| 
						 | 
					a5f7355e16 | ||
| 
						 | 
					18ffdbaa65 | ||
| 
						 | 
					c089222bc6 | ||
| 
						 | 
					37f9535d27 | ||
| 
						 | 
					4650368bc2 | ||
| 
						 | 
					88b14ed455 | ||
| 
						 | 
					54a2a47bc0 | ||
| 
						 | 
					ffcc970140 | ||
| 
						 | 
					7a811e39e0 | ||
| 
						 | 
					11f158cbb3 | ||
| 
						 | 
					5d5550c48b | ||
| 
						 | 
					fd570d906a | ||
| 
						 | 
					deab0662f9 | ||
| 
						 | 
					7238f50a6b | ||
| 
						 | 
					499fcd1f3f | ||
| 
						 | 
					dc0ddc82d6 | ||
| 
						 | 
					436fc34cb9 | ||
| 
						 | 
					f072cd96e3 | ||
| 
						 | 
					3441a001c7 | ||
| 
						 | 
					bc747844ea | ||
| 
						 | 
					a887f58bcc | ||
| 
						 | 
					f42afef6e0 | ||
| 
						 | 
					18eaf22cb9 | ||
| 
						 | 
					d94f427e12 | ||
| 
						 | 
					b94eb42db6 | ||
| 
						 | 
					d2297f5516 | ||
| 
						 | 
					ef6f58b828 | ||
| 
						 | 
					eb0bf16cce | ||
| 
						 | 
					bc8d65e7d3 | ||
| 
						 | 
					3180c5d554 | ||
| 
						 | 
					03369b8a6c | ||
| 
						 | 
					3b2ddb1a18 | ||
| 
						 | 
					1e20b12241 | ||
| 
						 | 
					81c41df15c | ||
| 
						 | 
					8b736189e0 | ||
| 
						 | 
					188d2367df | ||
| 
						 | 
					5aeac500da | ||
| 
						 | 
					5730ab28ab | ||
| 
						 | 
					1c56b03a28 | 
							
								
								
									
										6
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							@@ -668,3 +668,9 @@
 | 
			
		||||
[submodule "vendor/grammars/vue-syntax-highlight"]
 | 
			
		||||
	path = vendor/grammars/vue-syntax-highlight
 | 
			
		||||
	url = https://github.com/vuejs/vue-syntax-highlight
 | 
			
		||||
[submodule "vendor/grammars/st2-zonefile"]
 | 
			
		||||
	path = vendor/grammars/st2-zonefile
 | 
			
		||||
	url = https://github.com/sixty4k/st2-zonefile
 | 
			
		||||
[submodule "vendor/grammars/sublime-aspectj"]
 | 
			
		||||
	path = vendor/grammars/sublime-aspectj
 | 
			
		||||
	url = https://github.com/pchaigno/sublime-aspectj
 | 
			
		||||
 
 | 
			
		||||
@@ -331,6 +331,7 @@ vendor/grammars/language-hy:
 | 
			
		||||
vendor/grammars/language-javascript:
 | 
			
		||||
- source.js
 | 
			
		||||
- source.js.regexp
 | 
			
		||||
- source.js.regexp.replacement
 | 
			
		||||
vendor/grammars/language-jsoniq/:
 | 
			
		||||
- source.jq
 | 
			
		||||
- source.xq
 | 
			
		||||
@@ -470,6 +471,8 @@ vendor/grammars/smalltalk-tmbundle:
 | 
			
		||||
- source.smalltalk
 | 
			
		||||
vendor/grammars/sql.tmbundle:
 | 
			
		||||
- source.sql
 | 
			
		||||
vendor/grammars/st2-zonefile:
 | 
			
		||||
- text.zone_file
 | 
			
		||||
vendor/grammars/standard-ml.tmbundle:
 | 
			
		||||
- source.cm
 | 
			
		||||
- source.ml
 | 
			
		||||
@@ -477,6 +480,8 @@ vendor/grammars/sublime-MuPAD:
 | 
			
		||||
- source.mupad
 | 
			
		||||
vendor/grammars/sublime-apl/:
 | 
			
		||||
- source.apl
 | 
			
		||||
vendor/grammars/sublime-aspectj/:
 | 
			
		||||
- source.aspectj
 | 
			
		||||
vendor/grammars/sublime-befunge:
 | 
			
		||||
- source.befunge
 | 
			
		||||
vendor/grammars/sublime-better-typescript:
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@
 | 
			
		||||
- (^|/)[Dd]ocumentation/
 | 
			
		||||
- (^|/)javadoc/
 | 
			
		||||
- ^man/
 | 
			
		||||
- ^[Ee]xamples/
 | 
			
		||||
 | 
			
		||||
## Documentation files ##
 | 
			
		||||
 | 
			
		||||
@@ -21,4 +22,9 @@
 | 
			
		||||
- (^|/)COPYING(\.|$)
 | 
			
		||||
- (^|/)INSTALL(\.|$)
 | 
			
		||||
- (^|/)LICEN[CS]E(\.|$)
 | 
			
		||||
- (^|/)[Ll]icen[cs]e(\.|$)
 | 
			
		||||
- (^|/)README(\.|$)
 | 
			
		||||
- (^|/)[Rr]eadme(\.|$)
 | 
			
		||||
 | 
			
		||||
# Samples folders
 | 
			
		||||
- ^[Ss]amples/
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ module Linguist
 | 
			
		||||
 | 
			
		||||
    # Internal: Check if this heuristic matches the candidate languages.
 | 
			
		||||
    def matches?(filename)
 | 
			
		||||
      @extensions.any? { |ext| filename.end_with?(ext) }
 | 
			
		||||
      @extensions.any? { |ext| filename.downcase.end_with?(ext) }
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Internal: Perform the heuristic
 | 
			
		||||
@@ -351,7 +351,7 @@ module Linguist
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    disambiguate ".r", ".R" do |data|
 | 
			
		||||
    disambiguate ".r" do |data|
 | 
			
		||||
      if /\bRebol\b/i.match(data)
 | 
			
		||||
        Language["Rebol"]
 | 
			
		||||
      elsif data.include?("<-")
 | 
			
		||||
 
 | 
			
		||||
@@ -150,7 +150,8 @@ module Linguist
 | 
			
		||||
    #
 | 
			
		||||
    # Returns the Language or nil if none was found.
 | 
			
		||||
    def self.find_by_name(name)
 | 
			
		||||
      name && @name_index[name.downcase]
 | 
			
		||||
      return nil if name.to_s.empty?
 | 
			
		||||
      name && (@name_index[name.downcase] || @name_index[name.split(',').first.downcase])
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Public: Look up Language by one of its aliases.
 | 
			
		||||
@@ -164,7 +165,8 @@ module Linguist
 | 
			
		||||
    #
 | 
			
		||||
    # Returns the Language or nil if none was found.
 | 
			
		||||
    def self.find_by_alias(name)
 | 
			
		||||
      name && @alias_index[name.downcase]
 | 
			
		||||
      return nil if name.to_s.empty?
 | 
			
		||||
      name && (@alias_index[name.downcase] || @alias_index[name.split(',').first.downcase])
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Public: Look up Languages by filename.
 | 
			
		||||
@@ -240,7 +242,8 @@ module Linguist
 | 
			
		||||
    #
 | 
			
		||||
    # Returns the Language or nil if none was found.
 | 
			
		||||
    def self.[](name)
 | 
			
		||||
      name && @index[name.downcase]
 | 
			
		||||
      return nil if name.to_s.empty?
 | 
			
		||||
      name && (@index[name.downcase] || @index[name.split(',').first.downcase])
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Public: A List of popular languages
 | 
			
		||||
 
 | 
			
		||||
@@ -214,7 +214,7 @@ AspectJ:
 | 
			
		||||
  color: "#a957b0"
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .aj
 | 
			
		||||
  tm_scope: none
 | 
			
		||||
  tm_scope: source.aspectj
 | 
			
		||||
  ace_mode: text
 | 
			
		||||
 | 
			
		||||
Assembly:
 | 
			
		||||
@@ -616,6 +616,7 @@ Common Lisp:
 | 
			
		||||
  - .lsp
 | 
			
		||||
  - .ny
 | 
			
		||||
  - .podsl
 | 
			
		||||
  - .sexp
 | 
			
		||||
  interpreters:
 | 
			
		||||
  - lisp
 | 
			
		||||
  - sbcl
 | 
			
		||||
@@ -750,6 +751,14 @@ DM:
 | 
			
		||||
  tm_scope: source.c++
 | 
			
		||||
  ace_mode: c_cpp
 | 
			
		||||
 | 
			
		||||
DNS Zone:
 | 
			
		||||
  type: data
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .zone
 | 
			
		||||
  - .arpa
 | 
			
		||||
  tm_scope: text.zone_file
 | 
			
		||||
  ace_mode: text
 | 
			
		||||
 | 
			
		||||
DTrace:
 | 
			
		||||
  type: programming
 | 
			
		||||
  aliases:
 | 
			
		||||
@@ -1710,8 +1719,8 @@ LabVIEW:
 | 
			
		||||
  type: programming
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .lvproj
 | 
			
		||||
  tm_scope: none
 | 
			
		||||
  ace_mode: text
 | 
			
		||||
  tm_scope: text.xml
 | 
			
		||||
  ace_mode: xml
 | 
			
		||||
 | 
			
		||||
Lasso:
 | 
			
		||||
  type: programming
 | 
			
		||||
@@ -1933,6 +1942,7 @@ Makefile:
 | 
			
		||||
  - GNUmakefile
 | 
			
		||||
  - Kbuild
 | 
			
		||||
  - Makefile
 | 
			
		||||
  - Makefile.inc
 | 
			
		||||
  - makefile
 | 
			
		||||
  interpreters:
 | 
			
		||||
  - make
 | 
			
		||||
@@ -2653,7 +2663,7 @@ Public Key:
 | 
			
		||||
 | 
			
		||||
Puppet:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#332A77"
 | 
			
		||||
  color: "#302B6D"
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .pp
 | 
			
		||||
  filenames:
 | 
			
		||||
@@ -2933,6 +2943,7 @@ Ruby:
 | 
			
		||||
  - .pryrc
 | 
			
		||||
  - Appraisals
 | 
			
		||||
  - Berksfile
 | 
			
		||||
  - Brewfile
 | 
			
		||||
  - Buildfile
 | 
			
		||||
  - Deliverfile
 | 
			
		||||
  - Fastfile
 | 
			
		||||
@@ -3181,6 +3192,7 @@ Slim:
 | 
			
		||||
  color: "#ff8f77"
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .slim
 | 
			
		||||
  tm_scope: text.slim
 | 
			
		||||
  ace_mode: text
 | 
			
		||||
 | 
			
		||||
Smali:
 | 
			
		||||
@@ -3716,7 +3728,9 @@ YAML:
 | 
			
		||||
  - .yml
 | 
			
		||||
  - .reek
 | 
			
		||||
  - .rviz
 | 
			
		||||
  - .syntax
 | 
			
		||||
  - .yaml
 | 
			
		||||
  - .yaml-tmlanguage
 | 
			
		||||
  ace_mode: yaml
 | 
			
		||||
 | 
			
		||||
Yacc:
 | 
			
		||||
@@ -3821,8 +3835,13 @@ wisp:
 | 
			
		||||
xBase:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#403a40"
 | 
			
		||||
  aliases:
 | 
			
		||||
  - advpl
 | 
			
		||||
  - clipper
 | 
			
		||||
  - foxpro
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .prg
 | 
			
		||||
  - .ch
 | 
			
		||||
  - .prw
 | 
			
		||||
  tm_scope: source.harbour
 | 
			
		||||
  ace_mode: text
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ module Linguist
 | 
			
		||||
  module Strategy
 | 
			
		||||
    class Modeline
 | 
			
		||||
      EmacsModeline = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i
 | 
			
		||||
      VimModeline = /vim:\s*set\s*(?:ft|filetype)=(\w+):/i
 | 
			
		||||
      VimModeline = /vim:\s*set.*\s(?:ft|filetype)=(\w+)\s?.*:/i
 | 
			
		||||
 | 
			
		||||
      # Public: Detects language based on Vim and Emacs modelines
 | 
			
		||||
      #
 | 
			
		||||
 
 | 
			
		||||
@@ -122,7 +122,7 @@
 | 
			
		||||
- (^|/)Chart\.js$
 | 
			
		||||
 | 
			
		||||
# Codemirror
 | 
			
		||||
- (^|/)[Cc]ode[Mm]irror/(lib|mode|theme|addon|keymap)
 | 
			
		||||
- (^|/)[Cc]ode[Mm]irror/(lib|mode|theme|addon|keymap|demo)
 | 
			
		||||
 | 
			
		||||
# SyntaxHighlighter - http://alexgorbatchev.com/
 | 
			
		||||
- (^|/)shBrush([^.]*)\.js$
 | 
			
		||||
@@ -179,6 +179,10 @@
 | 
			
		||||
# Fabric
 | 
			
		||||
- Fabric.framework/
 | 
			
		||||
 | 
			
		||||
# git config files
 | 
			
		||||
- gitattributes$
 | 
			
		||||
- gitignore$
 | 
			
		||||
- gitmodules$
 | 
			
		||||
 | 
			
		||||
## Groovy ##
 | 
			
		||||
 | 
			
		||||
@@ -224,19 +228,6 @@
 | 
			
		||||
# Html5shiv
 | 
			
		||||
- (^|/)html5shiv\.js$
 | 
			
		||||
 | 
			
		||||
# Samples folders
 | 
			
		||||
- ^[Ss]amples/
 | 
			
		||||
 | 
			
		||||
# LICENSE, README, git config files
 | 
			
		||||
- ^COPYING$
 | 
			
		||||
- LICENSE$
 | 
			
		||||
- License$
 | 
			
		||||
- gitattributes$
 | 
			
		||||
- gitignore$
 | 
			
		||||
- gitmodules$
 | 
			
		||||
- ^README$
 | 
			
		||||
- ^readme$
 | 
			
		||||
 | 
			
		||||
# Test fixtures
 | 
			
		||||
- ^[Tt]ests?/fixtures/
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
module Linguist
 | 
			
		||||
  VERSION = "4.5.11"
 | 
			
		||||
  VERSION = "4.5.14"
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								samples/Common Lisp/config.sexp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								samples/Common Lisp/config.sexp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
((exe_name hello)
 | 
			
		||||
 (link_order (world hello)))
 | 
			
		||||
							
								
								
									
										103
									
								
								samples/Common Lisp/rss.sexp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								samples/Common Lisp/rss.sexp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,103 @@
 | 
			
		||||
 | 
			
		||||
(:TURTLE
 | 
			
		||||
 | 
			
		||||
 (:@PREFIX "rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>")
 | 
			
		||||
 (:@PREFIX "owl:" "<http://www.w3.org/2002/07/owl#>")
 | 
			
		||||
 (:@PREFIX "dc:" "<http://purl.org/dc/elements/1.1/>")
 | 
			
		||||
 (:@PREFIX "xsd:" "<http://www.w3.org/2001/XMLSchema#>")
 | 
			
		||||
 (:@PREFIX "rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")
 | 
			
		||||
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/channel>")
 | 
			
		||||
 
 | 
			
		||||
   (:PREDICATE-OBJECT-LIST
 | 
			
		||||
     (:URIREF #1="<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>")
 | 
			
		||||
     (:OBJECTS
 | 
			
		||||
       (:QNAME "rdfs:Class")))
 | 
			
		||||
       
 | 
			
		||||
   (:PREDICATE-OBJECT-LIST
 | 
			
		||||
     (:QNAME "rdfs:comment")
 | 
			
		||||
     (:OBJECTS
 | 
			
		||||
       (:STRING "An RSS information channel.")))
 | 
			
		||||
       
 | 
			
		||||
   (:PREDICATE-OBJECT-LIST
 | 
			
		||||
     (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
     (:OBJECTS
 | 
			
		||||
       (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
       
 | 
			
		||||
   (:PREDICATE-OBJECT-LIST
 | 
			
		||||
     (:QNAME "rdfs:label")
 | 
			
		||||
     (:OBJECTS
 | 
			
		||||
       (:STRING "Channel"))))
 | 
			
		||||
       
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/description>")
 | 
			
		||||
  
 | 
			
		||||
   (:PREDICATE-OBJECT-LIST
 | 
			
		||||
     (:URIREF #1#)
 | 
			
		||||
     (:OBJECTS
 | 
			
		||||
       (:QNAME "rdf:Property")))
 | 
			
		||||
      
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
 | 
			
		||||
   (:OBJECTS (:STRING "A short text description of the subject.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Description")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:description"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/image>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdfs:Class")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment") (:OBJECTS (:STRING "An RSS image.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Image"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/item>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdfs:Class")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment") (:OBJECTS (:STRING "An RSS item.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Item"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/items>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
 | 
			
		||||
   (:OBJECTS
 | 
			
		||||
    (:STRING "Points to a list of rss:item elements that are members of the subject channel.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Items"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/link>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
 | 
			
		||||
   (:OBJECTS (:STRING "The URL to which an HTML rendering of the subject will link.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Link")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:identifier"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/name>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
 | 
			
		||||
   (:OBJECTS (:STRING "The text input field's (variable) name.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Name"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/textinput>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdfs:Class")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment") (:OBJECTS (:STRING "An RSS text input.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Text Input"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/title>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
 | 
			
		||||
   (:OBJECTS (:STRING "A descriptive title for the channel.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Title")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:title"))))
 | 
			
		||||
 (:TRIPLES (:URIREF "<http://purl.org/rss/1.0/url>")
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
 | 
			
		||||
   (:OBJECTS
 | 
			
		||||
    (:STRING
 | 
			
		||||
     "The URL of the image to used in the 'src' attribute of the channel's image tag when rendered as HTML.")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
 | 
			
		||||
   (:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "URL")))
 | 
			
		||||
  (:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:identifier")))))
 | 
			
		||||
							
								
								
									
										13
									
								
								samples/DNS Zone/sample.arpa
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								samples/DNS Zone/sample.arpa
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
$ORIGIN 0.0.0.c.2.1.0.3.0.0.2.1.e.f.f.3.ip6.arpa.
 | 
			
		||||
$TTL     60
 | 
			
		||||
@ 	 IN SOA ns root (
 | 
			
		||||
	     2002042901 ; SERIAL
 | 
			
		||||
	     7200       ; REFRESH
 | 
			
		||||
	     600        ; RETRY
 | 
			
		||||
	     36000000   ; EXPIRE
 | 
			
		||||
	     120        ; MINIMUM
 | 
			
		||||
	     )
 | 
			
		||||
 | 
			
		||||
	    NS	 ns.example.com.
 | 
			
		||||
 | 
			
		||||
c.a.7.e.d.7.e.f.f.f.0.2.8.0.a.0 PTR  sip01.example.com.
 | 
			
		||||
							
								
								
									
										12
									
								
								samples/DNS Zone/sneaky.net.zone
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								samples/DNS Zone/sneaky.net.zone
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
$TTL 3d
 | 
			
		||||
@ IN SOA root.localhost. root.sneaky.net. (
 | 
			
		||||
    2015042907 ; serial
 | 
			
		||||
    3d         ; refresh
 | 
			
		||||
    1h         ; retry
 | 
			
		||||
    12d        ; expire
 | 
			
		||||
    2h         ; negative response TTL
 | 
			
		||||
  )
 | 
			
		||||
  IN NS root.localhost.
 | 
			
		||||
  IN NS localhost. ; secondary name server is preferably externally maintained
 | 
			
		||||
 | 
			
		||||
www IN A 3.141.59.26
 | 
			
		||||
							
								
								
									
										31
									
								
								samples/Makefile/filenames/Makefile.inc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								samples/Makefile/filenames/Makefile.inc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
#	$OpenBSD: Makefile.inc,v 1.2 2003/11/14 20:09:20 drahn Exp $
 | 
			
		||||
#	$NetBSD: Makefile.inc,v 1.1 1996/09/30 16:34:59 ws Exp $
 | 
			
		||||
 | 
			
		||||
.if !defined(__stand_makefile_inc)
 | 
			
		||||
__stand_makefile_inc=1
 | 
			
		||||
 | 
			
		||||
KERN_AS=	library
 | 
			
		||||
 | 
			
		||||
S=$(.CURDIR)/../../../$(R)
 | 
			
		||||
 | 
			
		||||
.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) && !defined(NOMACHINE)
 | 
			
		||||
.BEGIN:
 | 
			
		||||
	@([ -h machine ] || ln -s $(S)/arch/$(MACHINE)/include machine)
 | 
			
		||||
.endif
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
EXTRACFLAGS=	-msoft-float
 | 
			
		||||
REAL_VIRT?=	-v
 | 
			
		||||
ENTRY?=	_start
 | 
			
		||||
 | 
			
		||||
INCLUDES+=	-I. -I$(.OBJDIR) -I$(.CURDIR)/.. -I$(S)/arch -I$(S)
 | 
			
		||||
INCLUDES+=	-I$(S)/lib/libsa
 | 
			
		||||
DEFS+=		-DSTANDALONE
 | 
			
		||||
CFLAGS+=	$(INCLUDES) $(DEFS) $(EXTRACFLAGS)
 | 
			
		||||
CFLAGS+=	-fno-stack-protector
 | 
			
		||||
LDFLAGS?=	-X -N -Ttext $(RELOC) -e $(ENTRY)
 | 
			
		||||
 | 
			
		||||
cleandir:
 | 
			
		||||
	rm -rf lib machine
 | 
			
		||||
 | 
			
		||||
.endif
 | 
			
		||||
							
								
								
									
										1
									
								
								samples/Puppet/hiera_include.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								samples/Puppet/hiera_include.pp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
hiera_include('classes')
 | 
			
		||||
							
								
								
									
										9
									
								
								samples/Ruby/filenames/Brewfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								samples/Ruby/filenames/Brewfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
tap 'caskroom/cask'
 | 
			
		||||
tap 'telemachus/brew', 'https://telemachus@bitbucket.org/telemachus/brew.git'
 | 
			
		||||
brew 'emacs', args: ['with-cocoa', 'with-gnutls']
 | 
			
		||||
brew 'redis', restart_service: true
 | 
			
		||||
brew 'mongodb'
 | 
			
		||||
brew 'sphinx'
 | 
			
		||||
brew 'imagemagick'
 | 
			
		||||
brew 'mysql'
 | 
			
		||||
cask 'google-chrome'
 | 
			
		||||
							
								
								
									
										2324
									
								
								samples/Rust/hashmap.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2324
									
								
								samples/Rust/hashmap.rs
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										12
									
								
								samples/Rust/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								samples/Rust/main.rs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
extern crate foo;
 | 
			
		||||
extern crate bar;
 | 
			
		||||
 | 
			
		||||
use foo::{self, quix};
 | 
			
		||||
use bar::car::*;
 | 
			
		||||
use bar;
 | 
			
		||||
 | 
			
		||||
fn main() {
 | 
			
		||||
    println!("Hello {}", "World");
 | 
			
		||||
 | 
			
		||||
    panic!("Goodbye")
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										38
									
								
								samples/YAML/Ansible.YAML-tmLanguage
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								samples/YAML/Ansible.YAML-tmLanguage
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
# [PackageDev] target_format: plist, ext: tmLanguage
 | 
			
		||||
---
 | 
			
		||||
name: Ansible
 | 
			
		||||
scopeName: source.ansible
 | 
			
		||||
fileTypes: []
 | 
			
		||||
uuid: 787ae642-b4ae-48b1-94e9-f935bec43a8f
 | 
			
		||||
 | 
			
		||||
patterns:
 | 
			
		||||
- name: comment.line.number-sign.ansible
 | 
			
		||||
  match: (?:^ *|\G *)((#).*)
 | 
			
		||||
  captures:
 | 
			
		||||
    '1': {name: comment.line.number-sign.ansible}
 | 
			
		||||
    '2': {name: punctuation.definition.comment.line.ansible}
 | 
			
		||||
 | 
			
		||||
- name: storage.type.ansible
 | 
			
		||||
  match: (\{\{ *[^\{\}]+ *\}\})|(\$\{[^\{\}]+\})
 | 
			
		||||
 | 
			
		||||
- name: keyword.other.ansible
 | 
			
		||||
  match: \- (name\:|include\:) (.*)|(^(- |\s*)\w+\:)
 | 
			
		||||
  captures:
 | 
			
		||||
    '2': {name: string.quoted.double.ansible}
 | 
			
		||||
 | 
			
		||||
- name: variable.complex.ansible
 | 
			
		||||
  contentName: string.other.ansible
 | 
			
		||||
  begin: (\w+)(=)\"?
 | 
			
		||||
  beginCaptures:
 | 
			
		||||
    '1': {name: entity.other.attribute-name.ansible}
 | 
			
		||||
    '2': {name: text}
 | 
			
		||||
  end: \"?\s
 | 
			
		||||
  patterns:
 | 
			
		||||
    - include: $self
 | 
			
		||||
    - name: constant.other.ansible
 | 
			
		||||
      match: .
 | 
			
		||||
 | 
			
		||||
- name: string.quoted.double.ansible
 | 
			
		||||
  match: ^(\[[0-9a-zA-Z_-]+(((\:)children)*)\])
 | 
			
		||||
  captures:
 | 
			
		||||
    '2': {name: variable.parameter.ansible}
 | 
			
		||||
							
								
								
									
										16
									
								
								samples/YAML/source.r-console.syntax
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								samples/YAML/source.r-console.syntax
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
--- 
 | 
			
		||||
name: R Console
 | 
			
		||||
fileTypes: []
 | 
			
		||||
 | 
			
		||||
scopeName: source.r-console
 | 
			
		||||
uuid: F629C7F3-823B-4A4C-8EEE-9971490C5710
 | 
			
		||||
patterns: 
 | 
			
		||||
- name: source.r.embedded.r-console
 | 
			
		||||
  begin: "^> "
 | 
			
		||||
  beginCaptures: 
 | 
			
		||||
    "0": 
 | 
			
		||||
      name: punctuation.section.embedded.r-console
 | 
			
		||||
  end: \n|\z
 | 
			
		||||
  patterns: 
 | 
			
		||||
  - include: source.r
 | 
			
		||||
keyEquivalent: ^~R
 | 
			
		||||
							
								
								
									
										512
									
								
								samples/xBase/sample.prw
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										512
									
								
								samples/xBase/sample.prw
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,512 @@
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This is a sample file for Linguist.
 | 
			
		||||
 * It's written in AdvPL, a xBase Language.
 | 
			
		||||
 *
 | 
			
		||||
 * Author: Arthur Helfstein Fragoso
 | 
			
		||||
 *
 | 
			
		||||
 * This script has the specific use of integrating between a financial institution
 | 
			
		||||
 * and other two companies in the process of creating Installment Bills for
 | 
			
		||||
 * customers.
 | 
			
		||||
 *
 | 
			
		||||
 * The functions are called from the ERP Protheus TOTVS.
 | 
			
		||||
 *
 | 
			
		||||
 **/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#Include "TOPCONN.ch"
 | 
			
		||||
#include "tbiconn.ch"
 | 
			
		||||
#Include "Protheus.ch"
 | 
			
		||||
#Include "rwmake.ch"
 | 
			
		||||
#Include "FileIO.ch"
 | 
			
		||||
#Include "json.ch"
 | 
			
		||||
#Include "utils.ch"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
////////////////////////
 | 
			
		||||
// Faturando (Reparcelando)
 | 
			
		||||
// FA280
 | 
			
		||||
// FA280_01
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
User Function FA280()
 | 
			
		||||
 | 
			
		||||
	//Executado uma vez para cada parcela
 | 
			
		||||
 | 
			
		||||
	If cEmpAnt == '06'
 | 
			
		||||
 | 
			
		||||
		SE5->(dbSelectArea("SE5"))
 | 
			
		||||
 | 
			
		||||
		cSet3Filter := "SE5->E5_FATURA == SE1->E1_NUM"
 | 
			
		||||
 | 
			
		||||
		SE5->(dbSetFilter( {|| &cSet3Filter }, cSet3Filter ))
 | 
			
		||||
		SE5->(dbGoTOP())
 | 
			
		||||
 | 
			
		||||
		aOrig06Tit := {} // = Todos os Titulos que ser<65>o reparcelados
 | 
			
		||||
		nTotal := 0
 | 
			
		||||
 | 
			
		||||
		While SE5->(!EOF())
 | 
			
		||||
			AADD(aOrig06Tit, {SE5->E5_PREFIXO, SE5->E5_NUMERO, SE5->E5_VALOR})
 | 
			
		||||
			nTotal += SE5->E5_VALOR
 | 
			
		||||
			SE5->(dbSkip())
 | 
			
		||||
		End
 | 
			
		||||
 | 
			
		||||
		aNovoTitulo:= {;//{"E1_FILIAL"   ,SE1ORIG->E1_FILIAL ,Nil},;
 | 
			
		||||
		              ;//{"E1_PREFIXO"  ,SE1->E1_PREFIXO    ,Nil},;
 | 
			
		||||
		              {"E1_NUM"      ,SE1->E1_NUM        ,Nil},;
 | 
			
		||||
		              {"E1_TIPO"     ,SE1->E1_TIPO       ,Nil},;
 | 
			
		||||
		              {"E1_PARCELA"  ,SE1->E1_PARCELA    ,Nil},;
 | 
			
		||||
		              {"E1_NATUREZ"  ,SE1->E1_NATUREZ    ,Nil},;
 | 
			
		||||
		              {"E1_CLIENTE"  ,SE1->E1_CLIENTE    ,Nil},;
 | 
			
		||||
		              {"E1_LOJA"     ,SE1->E1_LOJA       ,Nil},;
 | 
			
		||||
		              {"E1_NRDOC"    ,SE1->E1_NRDOC      ,Nil},;
 | 
			
		||||
		              ;//{"E1_X_COD"    ,SE1->E1_NATUREZ    ,Nil},;
 | 
			
		||||
		              {"E1_EMISSAO"  ,SE1->E1_EMISSAO    ,Nil},;
 | 
			
		||||
		              {"E1_VENCTO"   ,SE1->E1_VENCTO     ,Nil},;
 | 
			
		||||
		              {"E1_VENCREA"  ,SE1->E1_VENCREA    ,Nil},;
 | 
			
		||||
		              ;//{"E1_VALOR"    ,SE1->E1_VALOR      ,Nil},;
 | 
			
		||||
		              ;//{"E1_SALDO"    ,SE1->E1_SALDO      ,Nil},;
 | 
			
		||||
		              ;//{"E1_VLCRUZ"   ,SE1->E1_VLCRUZ     ,Nil},;
 | 
			
		||||
		              {"E1_PORTADO"  ,SE1->E1_PORTADO    ,Nil},;
 | 
			
		||||
		              {"E1_FATURA"   ,SE1->E1_FATURA     ,Nil},;
 | 
			
		||||
		              {"E1_X_DTPAV"  ,SE1->E1_X_DTPAV    ,Nil},;
 | 
			
		||||
		              {"E1_X_DTSAV"  ,SE1->E1_X_DTSAV    ,Nil},;
 | 
			
		||||
		              {"E1_X_DTTAV"  ,SE1->E1_X_DTTAV    ,Nil},;
 | 
			
		||||
		              {"E1_X_DTSPC"  ,SE1->E1_X_DTSPC    ,Nil},;
 | 
			
		||||
		              {"E1_X_DTPRO"  ,SE1->E1_X_DTPRO    ,Nil},;
 | 
			
		||||
		              {"E1_NUMBCO"   ,SE1->E1_NUMBCO     ,Nil},;
 | 
			
		||||
		              {"E1_X_DUDME"  ,SE1->E1_X_DUDME    ,Nil},;
 | 
			
		||||
		              {"E1_X_TIPOP"  ,SE1->E1_X_TIPOP    ,Nil},;
 | 
			
		||||
		              {"E1_X_DTCAN"  ,SE1->E1_X_DTCAN    ,Nil},;
 | 
			
		||||
		              {"E1_X_MOTIV"  ,SE1->E1_X_MOTIV    ,Nil},;
 | 
			
		||||
		              {"E1_X_DESPC"  ,SE1->E1_X_DESPC    ,Nil},;
 | 
			
		||||
		              {"E1_NUMNOTA"  ,SE1->E1_NUMNOTA    ,Nil},;
 | 
			
		||||
		              {"E1_SERIE"    ,SE1->E1_SERIE      ,Nil},;
 | 
			
		||||
		              {"E1_X_DEPRO"  ,SE1->E1_X_DEPRO    ,Nil},;
 | 
			
		||||
		              {"E1_X_TPPAI"  ,SE1->E1_X_TPPAI    ,Nil},;
 | 
			
		||||
		              {"E1_X_CGC"    ,SE1->E1_X_CGC      ,Nil},;
 | 
			
		||||
		              {"E1_XTPEMP"   ,SE1->E1_XTPEMP     ,Nil},;
 | 
			
		||||
		              {"E1_X_CTRIM"  ,SE1->E1_X_CTRIM    ,Nil}}
 | 
			
		||||
 | 
			
		||||
		StartJob("U_FA280_01",getenvserver(),.T., SE1->E1_PREFIXO ,SE1->E1_NUM, SE1->E1_TIPO, SE1->E1_VALOR, aOrig06Tit, nTotal, SE1->E1_PARCELA, aNovoTitulo)
 | 
			
		||||
 | 
			
		||||
		SE5->(dbClearFilter())
 | 
			
		||||
 | 
			
		||||
	EndIf
 | 
			
		||||
 | 
			
		||||
Return nil
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
User Function FA280_01(cE1PREFIXO, cE1NUM, cE1TIPO, nE1Valor, aOrig06Tit, nTotal, cE1PARCELA, aNovoTitulo)
 | 
			
		||||
	Local nValPar := nil
 | 
			
		||||
	Local aTit05 := {}
 | 
			
		||||
 | 
			
		||||
	RpcSetType(3) // Nao consome licensa
 | 
			
		||||
 | 
			
		||||
	//Prepare Environment Empresa "01" Filial '0102'
 | 
			
		||||
	// Muda de empresa
 | 
			
		||||
	While !RpcSetEnv('01', '0102',,,,GetEnvServer(),{})
 | 
			
		||||
		Sleep(400)
 | 
			
		||||
	End
 | 
			
		||||
 | 
			
		||||
		nFileLog := u_OpenLog("\Logs\FA280_"+dToS(dDataBase)+".log")
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"----- FA280 -----"+CRLF)
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,cE1NUM+CRLF)
 | 
			
		||||
 | 
			
		||||
		nParcelas := round(nTotal/nE1Valor, 0)
 | 
			
		||||
 | 
			
		||||
		cUltima := '0'+ chr(64+nParcelas)
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"valor das parcelas: "+ cvaltochar(nE1Valor) +CRLF)
 | 
			
		||||
		fWrite(nFileLog,"parcelas: "+ cvaltochar(nParcelas) +CRLF)
 | 
			
		||||
		fWrite(nFileLog,"parcela atual: "+ cE1PARCELA +CRLF)
 | 
			
		||||
		fWrite(nFileLog,"ultima parcela: "+ cUltima +CRLF)
 | 
			
		||||
 | 
			
		||||
		n0102total := 0
 | 
			
		||||
		n0105total := 0
 | 
			
		||||
 | 
			
		||||
		//Loop entre todos os Titulos que serão Reparcelados
 | 
			
		||||
 | 
			
		||||
		For nI := 1 To len(aOrig06Tit)
 | 
			
		||||
 | 
			
		||||
			fWrite(nFileLog,"E5_NUMERO: "+aOrig06Tit[nI][2] +CRLF)
 | 
			
		||||
 | 
			
		||||
			cQuery := "select * from SE1010 where E1_PREFIXO = '"+ aOrig06Tit[nI][1] +"' and E1_NUM = '"+ aOrig06Tit[nI][2] +"' and  E1_TIPO = 'FAT' and D_E_L_E_T_ <> '*'"
 | 
			
		||||
 | 
			
		||||
			fWrite(nFileLog,cQuery +CRLF)
 | 
			
		||||
 | 
			
		||||
			If select("SE1ORIG") > 0
 | 
			
		||||
				SE1ORIG->(DbCloseArea())
 | 
			
		||||
			endif
 | 
			
		||||
			TcQuery cQuery New Alias 'SE1ORIG'
 | 
			
		||||
			dbSelectArea("SE1ORIG")
 | 
			
		||||
			SE1ORIG->(DBGOTOP())
 | 
			
		||||
 | 
			
		||||
			While SE1ORIG->(!EOF()) //Loop entre as duas filiais: 0102, 0105
 | 
			
		||||
				fWrite(nFileLog,"SE1ORIG loop: "+SE1ORIG->E1_FILIAL +CRLF)
 | 
			
		||||
				cFilAnt := SE1ORIG->E1_FILIAL
 | 
			
		||||
 | 
			
		||||
				//Faz a baixa
 | 
			
		||||
				if alltrim(SE1ORIG->E1_STATUS) == 'A'
 | 
			
		||||
					fWrite(nFileLog, SE1ORIG->E1_FILIAL+" : Fazendo baixa" +CRLF)
 | 
			
		||||
 | 
			
		||||
					aBaixa	:= {{"E1_FILIAL"   ,SE1ORIG->E1_FILIAL   ,Nil},;
 | 
			
		||||
					            {"E1_PREFIXO"  ,SE1ORIG->E1_PREFIXO  ,Nil},;
 | 
			
		||||
					            {"E1_NUM"      ,SE1ORIG->E1_NUM      ,Nil},;
 | 
			
		||||
					            {"E1_TIPO"     ,SE1ORIG->E1_TIPO     ,Nil},;
 | 
			
		||||
					            {"E1_PARCELA"  ,SE1ORIG->E1_PARCELA  ,Nil},;
 | 
			
		||||
					            {"E1_DESCONT"  ,SE1ORIG->E1_DESCONT  ,Nil},;
 | 
			
		||||
					            {"E1_JUROS"    ,SE1ORIG->E1_JUROS    ,Nil},;
 | 
			
		||||
					            {"E1_MULTA"    ,SE1ORIG->E1_MULTA    ,Nil},;
 | 
			
		||||
					            {"E1_VLRREAL"  ,SE1ORIG->E1_VLRREAL  ,Nil},;
 | 
			
		||||
					            {"AUTMOTBX"    ,"FAT"                ,Nil},;
 | 
			
		||||
					            {"AUTDTBAIXA"  ,date()               ,Nil},;
 | 
			
		||||
					            {"AUTDTCREDITO",date()               ,Nil},;
 | 
			
		||||
					            {"AUTHIST"     ,"Bx.Emis.Fat."+cE1NUM,Nil},;
 | 
			
		||||
					            {"AUTVALREC"   ,SE1ORIG->E1_VALOR    ,Nil}}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
					lMsErroAuto:=.F. //reseta lMsErroAuto
 | 
			
		||||
					MSExecAuto ({|x,y| FINA070(x,y)},aBaixa, 3)
 | 
			
		||||
 | 
			
		||||
					If lMsErroAuto
 | 
			
		||||
 | 
			
		||||
						fWrite(nFileLog,SE1ORIG->E1_FILIAL+" : Não foi efetuada a baixa do titulo : "+CRLF+ MSErroString()+ CRLF + tojson(aBaixa) + CRLF)
 | 
			
		||||
						return
 | 
			
		||||
					else
 | 
			
		||||
 | 
			
		||||
						RECLOCK('SE5',.F.)
 | 
			
		||||
							E5_FATURA := cE1NUM
 | 
			
		||||
							E5_FATPREF:= cE1PREFIXO
 | 
			
		||||
							//E5_LA = S
 | 
			
		||||
							//E5_MOEDA = ''
 | 
			
		||||
							//E5_TXMOEDA = 1
 | 
			
		||||
						MSUNLOCK()
 | 
			
		||||
						RECLOCK('SE1',.F.)
 | 
			
		||||
							E1_FATURA := cE1NUM
 | 
			
		||||
							E1_FATPREF:= cE1PREFIXO
 | 
			
		||||
							E1_TIPOFAT:= cE1TIPO
 | 
			
		||||
							E1_FLAGFAT:= 'S'
 | 
			
		||||
							E1_DTFATUR:= dDataBase
 | 
			
		||||
						MSUNLOCK()
 | 
			
		||||
 | 
			
		||||
						fWrite(nFileLog,SE1ORIG->E1_FILIAL+" : baixa feita" +CRLF)
 | 
			
		||||
					endif
 | 
			
		||||
 | 
			
		||||
				endif
 | 
			
		||||
 | 
			
		||||
				//calcula valor total de cada filial para poder calcular a Fatura
 | 
			
		||||
 | 
			
		||||
				if SE1ORIG->E1_FILIAL == '0102'
 | 
			
		||||
					n0102total += SE1ORIG->E1_VALOR
 | 
			
		||||
				elseif SE1ORIG->E1_FILIAL == '0105'
 | 
			
		||||
					n0105total += SE1ORIG->E1_VALOR
 | 
			
		||||
				else
 | 
			
		||||
					fWrite(nFileLog,"Programa nao preparado para a filial "+SE1ORIG->E1_FILIAL +CRLF)
 | 
			
		||||
				endif
 | 
			
		||||
 | 
			
		||||
				SE1ORIG->(dbskip())
 | 
			
		||||
 | 
			
		||||
			End
 | 
			
		||||
 | 
			
		||||
		Next nI
 | 
			
		||||
 | 
			
		||||
		cFilAnt := '0102'
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"Total 0102: "+cvaltochar(n0102total) +CRLF)
 | 
			
		||||
		fWrite(nFileLog,"Total 0105: "+cvaltochar(n0105total) +CRLF)
 | 
			
		||||
 | 
			
		||||
		n0102val := round(nE1Valor * n0102total/nTotal, 2)
 | 
			
		||||
		n0105val := nE1Valor - n0102val
 | 
			
		||||
 | 
			
		||||
		aFili := {}
 | 
			
		||||
 | 
			
		||||
		if n0102total > 0
 | 
			
		||||
			AADD(aFili,'0102')
 | 
			
		||||
		endif
 | 
			
		||||
 | 
			
		||||
		if n0105total > 0
 | 
			
		||||
			AADD(aFili,'0105')
 | 
			
		||||
		endif
 | 
			
		||||
 | 
			
		||||
		For nI := 1 To len(aFili)
 | 
			
		||||
 | 
			
		||||
			cQuery := "select COUNT(*) as QUANT, SUM(E1_VALOR) as TOTALINC from SE1010  where E1_NUM = '"+ cE1NUM +"'  and E1_FILIAL='"+ aFili[nI] +"' and E1_PREFIXO = '"+ cE1PREFIXO +"' and D_E_L_E_T_ <> '*'"
 | 
			
		||||
 | 
			
		||||
			If select("PARC") > 0
 | 
			
		||||
				PARC->(DbCloseArea())
 | 
			
		||||
			endif
 | 
			
		||||
			TcQuery cQuery New Alias 'PARC'
 | 
			
		||||
			dbSelectArea("PARC")
 | 
			
		||||
 | 
			
		||||
			//verificamos se estamos na ultima parcela
 | 
			
		||||
			if PARC->QUANT == nParcelas -1 //QUANT = quantidade de parcelas incluida
 | 
			
		||||
				fWrite(nFileLog,"Ultima Parcela"+CRLF)
 | 
			
		||||
				//o valor desta será o valor que resta
 | 
			
		||||
				nValPar := SE1ORIG->E1_VALOR - PARC->TOTALINC
 | 
			
		||||
 | 
			
		||||
				if aFili[nI] == '0102'
 | 
			
		||||
					n0102val := n0102total - PARC->TOTALINC
 | 
			
		||||
				elseif aFili[nI] == '0105'
 | 
			
		||||
					n0105val := n0105total - PARC->TOTALINC
 | 
			
		||||
				endif
 | 
			
		||||
			endif
 | 
			
		||||
 | 
			
		||||
		Next nI
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"Total 0102: "+cvaltochar(n0102total) + "  -> Parcela de: "+cvaltochar(n0102val) +CRLF)
 | 
			
		||||
		fWrite(nFileLog,"Total 0105: "+cvaltochar(n0105total) + "  -> Parcela de: "+cvaltochar(n0105val) +CRLF)
 | 
			
		||||
 | 
			
		||||
		/////////////////
 | 
			
		||||
 | 
			
		||||
		For nI := 1 To len(aFili)
 | 
			
		||||
 | 
			
		||||
			if aFili[nI] == '0102'
 | 
			
		||||
				nValPar := n0102val
 | 
			
		||||
			elseif aFili[nI] == '0105'
 | 
			
		||||
				nValPar := n0105val
 | 
			
		||||
			endif
 | 
			
		||||
 | 
			
		||||
			aTitulo := ACLONE(aNovoTitulo)
 | 
			
		||||
 | 
			
		||||
			AADD(aTitulo, {"E1_PREFIXO" ,cE1PREFIXO          ,Nil})
 | 
			
		||||
			AADD(aTitulo, {"E1_FILIAL"  ,aFili[nI]           ,Nil})
 | 
			
		||||
			AADD(aTitulo, {"E1_VALOR"   ,nValPar             ,Nil})
 | 
			
		||||
			AADD(aTitulo, {"E1_SALDO"   ,nValPar             ,Nil})
 | 
			
		||||
			AADD(aTitulo, {"E1_VLCRUZ"  ,nValPar             ,Nil})
 | 
			
		||||
 | 
			
		||||
			lMsErroAuto := .F.
 | 
			
		||||
 | 
			
		||||
			if aFili[nI] == '0102'
 | 
			
		||||
 | 
			
		||||
				MSExecAuto({|x,y| FINA040(x,y)},aTitulo,3) //Inclusao
 | 
			
		||||
 | 
			
		||||
				If lMsErroAuto
 | 
			
		||||
					fWrite(nFileLog,"Erro " + CRLF)
 | 
			
		||||
					fWrite(nFileLog,"Erro ao incluir titulo: "+CRLF+ MSErroString()+ CRLF + tojson(aTitulo) + CRLF)
 | 
			
		||||
					return
 | 
			
		||||
				else
 | 
			
		||||
					fWrite(nFileLog,"Sucesso "+ CRLF)
 | 
			
		||||
					fWrite(nFileLog,"Titulo incluido: "+ aFili[nI] +" : " + cValToChar(nValPar) +CRLF)
 | 
			
		||||
				endif
 | 
			
		||||
 | 
			
		||||
			elseif aFili[nI] == '0105'
 | 
			
		||||
				fWrite(nFileLog,"Salvando titulos 05 para o final "+aFili[nI]+CRLF)
 | 
			
		||||
				//StartJob("U_JOBF040",getenvserver(),.T., SE1ORIG->E1_FILIAL, aTitulo)
 | 
			
		||||
				AADD(aTit05, aTitulo)
 | 
			
		||||
				//fWrite(nFileLog,"passou pela thread "+CRLF)
 | 
			
		||||
			else
 | 
			
		||||
				fWrite(nFileLog,"Erro, filial nao tratada "+aFili[nI]+CRLF)
 | 
			
		||||
			endif
 | 
			
		||||
 | 
			
		||||
		Next nI
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	Reset Environment
 | 
			
		||||
 | 
			
		||||
	While !RpcSetEnv('01', '0105',,,,GetEnvServer(),{})
 | 
			
		||||
		Sleep(400)
 | 
			
		||||
	End
 | 
			
		||||
 | 
			
		||||
		For nI := 1 To len(aTit05)
 | 
			
		||||
 | 
			
		||||
			lMsErroAuto := .F.
 | 
			
		||||
 | 
			
		||||
			MSExecAuto({|x,y| FINA040(x,y)},aTit05[nI],3) //Inclusao
 | 
			
		||||
 | 
			
		||||
			If lMsErroAuto
 | 
			
		||||
				fWrite(nFileLog,"Erro " + CRLF)
 | 
			
		||||
				fWrite(nFileLog,"Erro ao incluir titulo: "+CRLF+ MSErroString()+ CRLF + tojson(aTit05[nI]) + CRLF)
 | 
			
		||||
				return
 | 
			
		||||
			else
 | 
			
		||||
				fWrite(nFileLog,"Sucesso "+ CRLF)
 | 
			
		||||
				fWrite(nFileLog,"Titulo incluido: "+CRLF)
 | 
			
		||||
			endif
 | 
			
		||||
 | 
			
		||||
		Next nI
 | 
			
		||||
 | 
			
		||||
	Reset Environment
 | 
			
		||||
 | 
			
		||||
	fClose(nFileLog)
 | 
			
		||||
 | 
			
		||||
Return
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
////////////////////////
 | 
			
		||||
// Cancelamento da Fatura (Cancelamento do Reparcelamento)
 | 
			
		||||
// F280PCAN
 | 
			
		||||
// JOBF280C
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
User Function F280PCAN()
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * cFatCan  - numero da fatura
 | 
			
		||||
	 * cPrefCan - prefixo
 | 
			
		||||
	 * cTipoCan - tipo
 | 
			
		||||
	 **/
 | 
			
		||||
 | 
			
		||||
	If cEmpAnt == '06'
 | 
			
		||||
 | 
			
		||||
		StartJob("U_JOBF280C",getenvserver(),.T., cPrefCan, cFatCan, cTipoCan)
 | 
			
		||||
 | 
			
		||||
	EndIf
 | 
			
		||||
 | 
			
		||||
Return .T.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
User Function JOBF280C(cPrefCan, cFatCan, cTipoCan)
 | 
			
		||||
 | 
			
		||||
	RpcSetType(3) // Nao consome licensa
 | 
			
		||||
 | 
			
		||||
	While !RpcSetEnv('01', '0102',,,,GetEnvServer(),{})
 | 
			
		||||
		Sleep(400)
 | 
			
		||||
	End
 | 
			
		||||
 | 
			
		||||
		nFileLog := u_OpenLog("\Logs\F280PCAN_"+dToS(dDataBase)+".log")
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"----- F280PCAN -----"+CRLF)
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"E1_PREFIXO = '"+ cPrefCan +"' and E1_NUM = '"+ cFatCan +"' and  E1_TIPO = '"+ cTipoCan +"'"+CRLF)
 | 
			
		||||
 | 
			
		||||
		cQuery := "select * from SE1010 where E1_PREFIXO = '"+ cPrefCan +"' and E1_NUM = '"+ cFatCan +"' and  E1_TIPO = '"+ cTipoCan +"' and D_E_L_E_T_ <> '*'"
 | 
			
		||||
 | 
			
		||||
		If select("SE1ORIG") > 0
 | 
			
		||||
			SE1ORIG->(DbCloseArea())
 | 
			
		||||
		endif
 | 
			
		||||
		TcQuery cQuery New Alias 'SE1ORIG'
 | 
			
		||||
		dbSelectArea("SE1ORIG")
 | 
			
		||||
		SE1ORIG->(DBGOTOP())
 | 
			
		||||
 | 
			
		||||
		While SE1ORIG->(!EOF()) //Loop entre todas as parcelas e filiais
 | 
			
		||||
 | 
			
		||||
			SE1->(dbselectarea("SE1"))
 | 
			
		||||
			SE1->(dbSetOrder(1))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			fWrite(nFileLog,"dbseek" + CRLF)
 | 
			
		||||
			if ! SE1->(dbSeek(SE1ORIG->E1_FILIAL+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO))
 | 
			
		||||
				fWrite(nFileLog,"Erro dbseek" + CRLF)
 | 
			
		||||
				Alert("Erro. Verificar F280PCAN() - dbseek")
 | 
			
		||||
				fWrite(nFileLog,"Erro dbseek("+SE1ORIG->E1_FILIAL+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO+")" + CRLF)
 | 
			
		||||
				return .F.
 | 
			
		||||
			endif
 | 
			
		||||
 | 
			
		||||
			cFilAnt := SE1ORIG->E1_FILIAL
 | 
			
		||||
 | 
			
		||||
			aFatura:= {{"E1_FILIAL"  ,SE1ORIG->E1_FILIAL         ,Nil},;
 | 
			
		||||
			           {"E1_PREFIXO" ,SE1ORIG->E1_PREFIXO        ,Nil},;
 | 
			
		||||
			           {"E1_NUM"     ,SE1ORIG->E1_NUM            ,Nil},;
 | 
			
		||||
			           {"E1_PARCELA" ,SE1ORIG->E1_PARCELA        ,Nil},;
 | 
			
		||||
			           {"E1_TIPO"    ,SE1ORIG->E1_TIPO           ,Nil}}
 | 
			
		||||
 | 
			
		||||
			lMsErroAuto := .F.
 | 
			
		||||
 | 
			
		||||
			MSExecAuto({|x,y| FINA040(x,y)},aFatura,5) //Exclus<75>o
 | 
			
		||||
 | 
			
		||||
			If lMsErroAuto
 | 
			
		||||
				fWrite(nFileLog,"Erro " + CRLF)
 | 
			
		||||
				fWrite(nFileLog,"Erro ao remover o titulo: "+CRLF+ MSErroString()+ CRLF + tojson(aFatura) + CRLF)
 | 
			
		||||
				Alert("Erro ao remover o titulo. Verificar F280PCAN()")
 | 
			
		||||
				return .F.
 | 
			
		||||
			else
 | 
			
		||||
				fWrite(nFileLog,"Sucesso "+ CRLF)
 | 
			
		||||
				fWrite(nFileLog,"Titulo removido" +CRLF)
 | 
			
		||||
			endif
 | 
			
		||||
 | 
			
		||||
			SE1ORIG->(dbskip())
 | 
			
		||||
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		/////////////////////////////////////////////
 | 
			
		||||
		///////  Cancela as baixas
 | 
			
		||||
		///
 | 
			
		||||
 | 
			
		||||
		fWrite(nFileLog,"- cancela baixas" + CRLF)
 | 
			
		||||
 | 
			
		||||
		cQuery := "select * from SE1060 where  E1_FATURA = '"+ cFatCan +"' and D_E_L_E_T_ <> '*'"
 | 
			
		||||
 | 
			
		||||
		If select("SE1ORIG") > 0
 | 
			
		||||
			SE1ORIG->(DbCloseArea())
 | 
			
		||||
		endif
 | 
			
		||||
		TcQuery cQuery New Alias 'SE1ORIG'
 | 
			
		||||
		dbSelectArea("SE1ORIG")
 | 
			
		||||
		SE1ORIG->(DBGOTOP())
 | 
			
		||||
 | 
			
		||||
		aFili := {"0102", "0105"}
 | 
			
		||||
 | 
			
		||||
		While SE1ORIG->(!EOF()) //Loop entre todas as parcelas e filiais
 | 
			
		||||
 | 
			
		||||
			SE1->(dbselectarea("SE1"))
 | 
			
		||||
			SE1->(dbSetOrder(1))
 | 
			
		||||
 | 
			
		||||
			For nI := 1 To len(aFili)
 | 
			
		||||
 | 
			
		||||
				cFilAnt := aFili[nI]
 | 
			
		||||
 | 
			
		||||
				fWrite(nFileLog,"dbseek" + CRLF)
 | 
			
		||||
				if ! SE1->(dbSeek(aFili[nI]+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO))
 | 
			
		||||
					fWrite(nFileLog,"dbseek nao encontrou titulo para filial "+aFili[nI] + CRLF)
 | 
			
		||||
					fWrite(nFileLog,"dbseek('"+aFili[nI]+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO+"')" + CRLF)
 | 
			
		||||
					LOOP
 | 
			
		||||
				endif
 | 
			
		||||
 | 
			
		||||
				nSE5Recno := u_RetSQLOne("select R_E_C_N_O_ from SE5010 where E5_FILIAL = '"+SE1->E1_FILIAL+"' and E5_PREFIXO = '"+SE1->E1_PREFIXO+"' and E5_TIPO = '"+SE1->E1_TIPO+"' and E5_NUMERO = '"+SE1->E1_NUM+"' "+;
 | 
			
		||||
				                         " and E5_FATURA = '"+SE1->E1_FATURA+"' and E5_FATPREF='"+SE1->E1_FATPREF+"' and D_E_L_E_T_ <> '*' ", "R_E_C_N_O_")
 | 
			
		||||
 | 
			
		||||
				//Removemos os Flags de Fatura para conseguirmos cancelar a baixa pelo FINA070
 | 
			
		||||
				RECLOCK('SE1',.F.)
 | 
			
		||||
					E1_FATURA := ''
 | 
			
		||||
					E1_FATPREF:= ''
 | 
			
		||||
					E1_TIPOFAT:= ''
 | 
			
		||||
					E1_FLAGFAT:= ''
 | 
			
		||||
					E1_DTFATUR:= StoD('')
 | 
			
		||||
			    MSUNLOCK()
 | 
			
		||||
 | 
			
		||||
			    SE5->(DbGoTo(nSE5Recno))
 | 
			
		||||
				RECLOCK('SE5',.F.)
 | 
			
		||||
					E5_MOTBX  := 'NOR'
 | 
			
		||||
					//E5_FATURA := ''
 | 
			
		||||
					//E5_FATPREF:= ''
 | 
			
		||||
				MSUNLOCK()
 | 
			
		||||
 | 
			
		||||
				aBaixa := {{"E1_FILIAL"   ,SE1->E1_FILIAL  ,Nil},;
 | 
			
		||||
				           {"E1_PREFIXO"  ,SE1->E1_PREFIXO ,Nil},;
 | 
			
		||||
				           {"E1_NUM"      ,SE1->E1_NUM     ,Nil},;
 | 
			
		||||
				           {"E1_TIPO"     ,SE1->E1_TIPO    ,Nil},;
 | 
			
		||||
				           {"E1_PARCELA"  ,SE1->E1_PARCELA ,Nil},;
 | 
			
		||||
				           {"E1_DESCONT"  ,SE1->E1_DESCONT ,Nil},;
 | 
			
		||||
				           {"E1_JUROS"    ,SE1->E1_JUROS   ,Nil},;
 | 
			
		||||
				           {"E1_MULTA"    ,SE1->E1_MULTA   ,Nil},;
 | 
			
		||||
				           {"E1_VLRREAL"  ,SE1->E1_VLRREAL ,Nil},;
 | 
			
		||||
				           {"AUTMOTBX"    ,"NOR"           ,Nil},;
 | 
			
		||||
				           {"AUTDTBAIXA"  ,date()          ,Nil},;
 | 
			
		||||
				           {"AUTDTCREDITO",date()          ,Nil},;
 | 
			
		||||
				           {"AUTHIST"     ,""              ,Nil},;
 | 
			
		||||
				           {"AUTVALREC"   ,SE1->E1_VALOR   ,Nil}}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				lMsErroAuto:=.F. //reseta lMsErroAuto
 | 
			
		||||
				MSExecAuto ({|x,y| FINA070(x,y)},aBaixa, 5)
 | 
			
		||||
 | 
			
		||||
				If lMsErroAuto
 | 
			
		||||
					fWrite(nFileLog,SE1->E1_FILIAL+" : Não foi efetuada o cancelamento de baixa : "+CRLF+ MSErroString()+ CRLF + tojson(aBaixa) + CRLF)
 | 
			
		||||
					return
 | 
			
		||||
				else
 | 
			
		||||
					fWrite(nFileLog,SE1->E1_FILIAL+" : cancelamento de baixa feito" +CRLF)
 | 
			
		||||
				endif
 | 
			
		||||
 | 
			
		||||
			Next nI
 | 
			
		||||
 | 
			
		||||
			SE1ORIG->(dbskip())
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
	Reset Environment
 | 
			
		||||
 | 
			
		||||
Return
 | 
			
		||||
							
								
								
									
										3
									
								
								test/fixtures/Data/Modelines/ruby2
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								test/fixtures/Data/Modelines/ruby2
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
/* vim: set ts=8 sw=4 filetype=ruby tw=0: */
 | 
			
		||||
 | 
			
		||||
# Please help how do I into setting vim modlines
 | 
			
		||||
							
								
								
									
										3
									
								
								test/fixtures/Data/Modelines/ruby3
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								test/fixtures/Data/Modelines/ruby3
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
/* vim: set ft=ruby ts=8 sw=4 tw=0: */
 | 
			
		||||
 | 
			
		||||
# I am not good at humor
 | 
			
		||||
@@ -308,6 +308,12 @@ class TestBlob < Minitest::Test
 | 
			
		||||
    # 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?
 | 
			
		||||
 | 
			
		||||
    # Minified JavaScript and CSS
 | 
			
		||||
    assert sample_blob("foo.min.js").vendored?
 | 
			
		||||
    assert sample_blob("foo.min.css").vendored?
 | 
			
		||||
@@ -326,9 +332,6 @@ class TestBlob < Minitest::Test
 | 
			
		||||
    assert sample_blob("public/javascripts/controls.js").vendored?
 | 
			
		||||
    assert sample_blob("public/javascripts/dragdrop.js").vendored?
 | 
			
		||||
 | 
			
		||||
    # Samples
 | 
			
		||||
    assert sample_blob("Samples/Ruby/foo.rb").vendored?
 | 
			
		||||
 | 
			
		||||
    # jQuery
 | 
			
		||||
    assert sample_blob("jquery.js").vendored?
 | 
			
		||||
    assert sample_blob("public/javascripts/jquery.js").vendored?
 | 
			
		||||
@@ -511,13 +514,15 @@ class TestBlob < Minitest::Test
 | 
			
		||||
    assert_predicate fixture_blob("README"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("README.md"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("README.txt"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("Readme"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("readme"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("foo/README"), :documentation?
 | 
			
		||||
 | 
			
		||||
    assert_predicate fixture_blob("CHANGE"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CHANGE.md"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CHANGE.txt"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("foo/CHANGE"), :documentation?
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    assert_predicate fixture_blob("CHANGELOG"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CHANGELOG.md"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CHANGELOG.txt"), :documentation?
 | 
			
		||||
@@ -526,15 +531,19 @@ class TestBlob < Minitest::Test
 | 
			
		||||
    assert_predicate fixture_blob("CHANGES"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CHANGES.md"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CHANGES.txt"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("foo/CHANGES"), :documentation?    
 | 
			
		||||
    
 | 
			
		||||
    assert_predicate fixture_blob("foo/CHANGES"), :documentation?
 | 
			
		||||
 | 
			
		||||
    assert_predicate fixture_blob("CONTRIBUTING"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CONTRIBUTING.md"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("CONTRIBUTING.txt"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("foo/CONTRIBUTING"), :documentation?
 | 
			
		||||
 | 
			
		||||
    assert_predicate fixture_blob("examples/some-file.pl"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("Examples/some-example-file.rb"), :documentation?
 | 
			
		||||
 | 
			
		||||
    assert_predicate fixture_blob("LICENSE"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("LICENCE.md"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("License.txt"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("LICENSE.txt"), :documentation?
 | 
			
		||||
    assert_predicate fixture_blob("foo/LICENSE"), :documentation?
 | 
			
		||||
 | 
			
		||||
@@ -549,6 +558,11 @@ class TestBlob < Minitest::Test
 | 
			
		||||
    assert_predicate fixture_blob("foo/INSTALL"), :documentation?
 | 
			
		||||
 | 
			
		||||
    refute_predicate fixture_blob("foo.md"), :documentation?
 | 
			
		||||
 | 
			
		||||
    # Samples
 | 
			
		||||
    assert sample_blob("Samples/Ruby/foo.rb").documentation?
 | 
			
		||||
 | 
			
		||||
    assert_predicate fixture_blob("INSTALL.txt"), :documentation?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_language
 | 
			
		||||
 
 | 
			
		||||
@@ -263,6 +263,24 @@ class TestLanguage < Minitest::Test
 | 
			
		||||
    assert_equal 'AGS Script', Language.find_by_alias('AGS').name
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_find_ignores_comma
 | 
			
		||||
    assert_equal 'Rust', Language['rust,no_run'].name
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_find_by_name_ignores_comma
 | 
			
		||||
    assert_equal Language['Rust'], Language.find_by_name('rust,no_run')
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_find_by_alias_ignores_comma
 | 
			
		||||
    assert_equal Language['Rust'], Language.find_by_alias('rust,no_run')
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_doesnt_blow_up_with_blank_lookup
 | 
			
		||||
    assert_equal nil, Language.find_by_alias('')
 | 
			
		||||
    assert_equal nil, Language.find_by_name(nil)
 | 
			
		||||
    assert_equal nil, Language[""]
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_name
 | 
			
		||||
    assert_equal 'Perl',   Language['Perl'].name
 | 
			
		||||
    assert_equal 'Python', Language['Python'].name
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,8 @@ class TestModelines < Minitest::Test
 | 
			
		||||
 | 
			
		||||
  def test_modeline_strategy
 | 
			
		||||
    assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby")
 | 
			
		||||
    assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby2")
 | 
			
		||||
    assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby3")
 | 
			
		||||
    assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplus")
 | 
			
		||||
    assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs1")
 | 
			
		||||
    assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs2")
 | 
			
		||||
@@ -27,6 +29,8 @@ class TestModelines < Minitest::Test
 | 
			
		||||
 | 
			
		||||
  def test_modeline_languages
 | 
			
		||||
    assert_equal Language["Ruby"], fixture_blob("Data/Modelines/ruby").language
 | 
			
		||||
    assert_equal Language["Ruby"], fixture_blob("Data/Modelines/ruby2").language
 | 
			
		||||
    assert_equal Language["Ruby"], fixture_blob("Data/Modelines/ruby3").language
 | 
			
		||||
    assert_equal Language["C++"], fixture_blob("Data/Modelines/seeplusplus").language
 | 
			
		||||
    assert_equal Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs1").language
 | 
			
		||||
    assert_equal Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs2").language
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/grammars/Elm.tmLanguage
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/Elm.tmLanguage
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/Elm.tmLanguage updated: 8137f5a48c...f17b1914dd
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/InnoSetup
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/InnoSetup
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/InnoSetup updated: e7ca1ee0dd...3906a8d2fb
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/Lean.tmbundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/Lean.tmbundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/Lean.tmbundle updated: fb1151547a...dd3e30f058
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/NimLime
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/NimLime
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/NimLime updated: b0c92d3fae...50d7344f9b
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/SublimePapyrus
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/SublimePapyrus
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/SublimePapyrus updated: 5180768711...2451bac8ef
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/abap.tmbundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/abap.tmbundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/abap.tmbundle updated: 5973e78c60...08d6db92d0
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/atom-fsharp
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/atom-fsharp
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/atom-fsharp updated: 121ff71b30...e7a4159fbf
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/factor
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/factor
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/factor updated: abb8bd74b9...ac5da311f7
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/haxe-sublime-bundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/haxe-sublime-bundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/haxe-sublime-bundle updated: c1ef469bf3...102acf66b9
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/language-crystal
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/language-crystal
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/language-crystal updated: 754623023b...932646913b
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/language-gfm
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/language-gfm
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/language-gfm updated: c8158a6d4b...9b95c2ad7c
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/language-javascript
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/language-javascript
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/language-javascript updated: 2766ff3052...39fd6989f7
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/language-xbase
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/language-xbase
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/language-xbase updated: 3f77776e98...ae860b3b02
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/latex.tmbundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/latex.tmbundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/latex.tmbundle updated: 2cae820272...23e6223498
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/llvm.tmbundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/llvm.tmbundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/llvm.tmbundle updated: 9e3705a6e2...203c955af9
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/php.tmbundle
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/php.tmbundle
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/php.tmbundle updated: 1cba1ac4a9...baad875878
									
								
							
							
								
								
									
										1
									
								
								vendor/grammars/st2-zonefile
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/grammars/st2-zonefile
									
									
									
									
										vendored
									
									
										Submodule
									
								
							 Submodule vendor/grammars/st2-zonefile added at 0d943fefb8
									
								
							
							
								
								
									
										1
									
								
								vendor/grammars/sublime-aspectj
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/grammars/sublime-aspectj
									
									
									
									
										vendored
									
									
										Submodule
									
								
							 Submodule vendor/grammars/sublime-aspectj added at 888fefdd2f
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/sublime-better-typescript
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/sublime-better-typescript
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/sublime-better-typescript updated: 8c0bd800d9...8266c06aab
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/vue-syntax-highlight
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/vue-syntax-highlight
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/vue-syntax-highlight updated: b98484e787...7d35a53e7e
									
								
							
		Reference in New Issue
	
	Block a user