Skip to content

Commit 4ea63f4

Browse files
committed
adding userDefineLangs and experiment folders (replicated from assembla)
1 parent fb363e2 commit 4ea63f4

File tree

9 files changed

+593
-0
lines changed

9 files changed

+593
-0
lines changed

diffNppZips.pl

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env perl
2+
3+
use 5.012; # //, strict
4+
use warnings;
5+
6+
use Archive::Zip;
7+
use Text::Diff;
8+
use File::Spec::Functions qw/canonpath catfile/;
9+
10+
my $folder = canonpath($ARGV[0]||guessbase());
11+
my $fileold = catfile($folder, $ARGV[1] || 'npp.8.1.2.portable.x64.zip');
12+
my $filenew = catfile($folder, $ARGV[2] || 'npp.8.1.3.portable.x64.zip');
13+
14+
die "old version '$fileold' does not exist" unless -f $fileold;
15+
die "new version '$filenew' does not exist" unless -f $filenew;
16+
17+
print STDERR "old: $fileold\n";
18+
print STDERR "new: $filenew\n";
19+
20+
my $zold = Archive::Zip->new(); $zold->read($fileold);
21+
my $znew = Archive::Zip->new(); $znew->read($filenew);
22+
23+
#print "old => ", $zold->memberNames(), "\n\t", $zold->members(), "\n";
24+
#print "new => ", $znew->memberNames(), "\n\t", $znew->members(), "\n";
25+
26+
my %old; @old{ $zold->memberNames() } = ($zold->members());
27+
my %new; @new{ $znew->memberNames() } = ($znew->members());
28+
my %union = (%old, %new);
29+
my %seen = (localization => 0, functionList => 0);
30+
31+
for my $entry ( undef, sort keys %union ) {
32+
next unless defined $entry;
33+
print("'$entry' only found in old\n"), next unless exists $new{$entry};
34+
print("'$entry' only found in new\n"), next unless exists $old{$entry};
35+
print("comparing '$entry'\n");
36+
my $folder = undef;
37+
if( $entry =~ m{/$} ) {
38+
next; # entries that end in / are folders, and do not need diff run
39+
}
40+
elsif( $entry =~ m{\.(zip|exe|dll)$} ) {
41+
my ($oc,$nc) = map $_->{$entry}->crc32String(), \%old, \%new;
42+
printf "binary mismatch: crc %s vs %s\n", $oc, $nc unless $oc eq $nc;
43+
next;
44+
} elsif ( $entry =~ m{(localization|functionList)/} ) {
45+
++$seen{$folder = $1};
46+
}
47+
48+
my $cold = $zold->contents( $entry );
49+
my $cnew = $znew->contents( $entry );
50+
51+
if( !defined($cold) || !defined($cnew) ) {
52+
printf "\tWARN(%s)\n\tcold:%-15.15s\n\tcnew:%-15.15s\n", $entry, $cold//'<undef>', $cnew//'<undef>';
53+
} else {
54+
my $diff = diff \$cold, \$cnew;
55+
if(length($diff) && defined($folder) && ($seen{$folder}>1)) {
56+
print "comparing $folder ($seen{$folder})\n";
57+
} else {
58+
print $diff;
59+
}
60+
}
61+
62+
} continue {
63+
print "-"x40, "\n";
64+
}
65+
66+
exit;
67+
68+
sub guessbase {
69+
for my $base (
70+
'c:/usr/local/apps/npp/',
71+
'c:/usr/local/apps/other-npp/',
72+
'c:/usr/local/apps/npp-other/',
73+
'.',
74+
) {
75+
return $base if -d $base;
76+
}
77+
}
78+
79+
1;

experiment/readme

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Try to link in an external repo via svn, on a github-hosted repo:
2+
svn propedit svn:externals .
3+
https://github.com/pryrt/pyscFilteredViewer/trunk/pyscFilteredViewer pyscFilteredViewer
4+

userDefineLangs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
markdown._preinstalled.udl.xml
2+
markdown._preinstalled_DM.udl.xml

userDefineLangs/ti-basic-udl.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<NotepadPlus>
2+
<UserLang name="TI-Basic" ext="TIBAS" udlVersion="2.1">
3+
<Settings>
4+
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
5+
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
6+
</Settings>
7+
<KeywordLists>
8+
<Keywords name="Comments">00REM 00REMARK 01 02 03 04</Keywords>
9+
<Keywords name="Numbers, prefix1"></Keywords>
10+
<Keywords name="Numbers, prefix2"></Keywords>
11+
<Keywords name="Numbers, extras1"></Keywords>
12+
<Keywords name="Numbers, extras2"></Keywords>
13+
<Keywords name="Numbers, suffix1"></Keywords>
14+
<Keywords name="Numbers, suffix2"></Keywords>
15+
<Keywords name="Numbers, range"></Keywords>
16+
<Keywords name="Operators1">+ - * / ^ = &lt; &gt; &lt;&gt; &lt;= &gt;= &amp; ; ,</Keywords>
17+
<Keywords name="Operators2">AND OR NOT XOR</Keywords>
18+
<Keywords name="Folders in code1, open"></Keywords>
19+
<Keywords name="Folders in code1, middle"></Keywords>
20+
<Keywords name="Folders in code1, close"></Keywords>
21+
<Keywords name="Folders in code2, open">for sub</Keywords>
22+
<Keywords name="Folders in code2, middle"></Keywords>
23+
<Keywords name="Folders in code2, close">next subend</Keywords>
24+
<Keywords name="Folders in comment, open"></Keywords>
25+
<Keywords name="Folders in comment, middle"></Keywords>
26+
<Keywords name="Folders in comment, close"></Keywords>
27+
<Keywords name="Keywords1">NEW&#x000D;&#x000A; LIST&#x000D;&#x000A; RUN&#x000D;&#x000A; BYE&#x000D;&#x000A; NUMBER NUM&#x000D;&#x000A; RESEQUENCE RES&#x000D;&#x000A; BREAK&#x000D;&#x000A; UNBREAK&#x000D;&#x000A; CONTINUE CON&#x000D;&#x000A; TRACE&#x000D;&#x000A; UNTRACE&#x000D;&#x000A; EDIT&#x000D;&#x000A; SAVE&#x000D;&#x000A; OLD&#x000D;&#x000A; DELETE&#x000D;&#x000A;</Keywords>
28+
<Keywords name="Keywords2">MERGE SIZE</Keywords>
29+
<Keywords name="Keywords3">LET&#x000D;&#x000A; REMARK REM&#x000D;&#x000A; END&#x000D;&#x000A; STOP&#x000D;&#x000A; GOTO &quot;GO TO&quot;&#x000D;&#x000A; ON&#x000D;&#x000A; IF THEN ELSE&#x000D;&#x000A; FOR TO STEP NEXT&#x000D;&#x000A; INPUT&#x000D;&#x000A; READ&#x000D;&#x000A; DATA&#x000D;&#x000A; RESTORE&#x000D;&#x000A; PRINT&#x000D;&#x000A; DISPLAY&#x000D;&#x000A; GOSUB &quot;GO SUB&quot; RETURN&#x000D;&#x000A; OPEN CLOSE&#x000D;&#x000A;</Keywords>
30+
<Keywords name="Keywords4">LINPUT&#x000D;&#x000A; ACCEPT&#x000D;&#x000A; USING&#x000D;&#x000A;</Keywords>
31+
<Keywords name="Keywords5">ABS ATN COS EXP INT LOG RANDOMIZE RND SGN SIN SQR TAN&#x000D;&#x000A; ASC CHR$ LEN POS SEG$ STR$ VAL&#x000D;&#x000A; DEF DIM EOF&#x000D;&#x000A;</Keywords>
32+
<Keywords name="Keywords6">MAX MIN PI REC RPT$ TAB</Keywords>
33+
<Keywords name="Keywords7">&quot;CALL CLEAR&quot;&#x000D;&#x000A;&quot;CALL COLOR&quot;&#x000D;&#x000A;&quot;CALL SCREEN&quot;&#x000D;&#x000A;&quot;CALL CHAR&quot;&#x000D;&#x000A;&quot;CALL HCHAR&quot;&#x000D;&#x000A;&quot;CALL VCHAR&quot;&#x000D;&#x000A;&quot;CALL SOUND&quot;&#x000D;&#x000A;&quot;CALL GCHAR&quot;&#x000D;&#x000A;&quot;CALL KEY&quot;&#x000D;&#x000A;&quot;CALL JOYST&quot;&#x000D;&#x000A;&quot;OPTION BASE 0&quot;&#x000D;&#x000A;&quot;OPTION BASE 1&quot;&#x000D;&#x000A;</Keywords>
34+
<Keywords name="Keywords8">&quot;CALL CHARPAT&quot;&#x000D;&#x000A;&quot;CALL CHARSET&quot;&#x000D;&#x000A;&quot;CALL COINC&quot;&#x000D;&#x000A;&quot;CALL DELSPRITE&quot;&#x000D;&#x000A;&quot;CALL DISTANCE&quot;&#x000D;&#x000A;&quot;CALL ERROR&quot;&#x000D;&#x000A;&quot;CALL INIT&quot;&#x000D;&#x000A;&quot;CALL LINK&quot;&#x000D;&#x000A;&quot;CALL LOAD&quot;&#x000D;&#x000A;&quot;CALL LOCATE&quot;&#x000D;&#x000A;&quot;CALL MAGNIFY&quot;&#x000D;&#x000A;&quot;CALL MOTION&quot;&#x000D;&#x000A;&quot;CALL PATTERN&quot;&#x000D;&#x000A;&quot;CALL PEEK&quot;&#x000D;&#x000A;&quot;CALL POSITION&quot;&#x000D;&#x000A;&quot;CALL SAY&quot;&#x000D;&#x000A;&quot;CALL SPGET&quot;&#x000D;&#x000A;&quot;CALL SPRITE&quot;&#x000D;&#x000A;&quot;CALL VERSION&quot;&#x000D;&#x000A;SUB SUBEND&#x000D;&#x000A;</Keywords>
35+
<Keywords name="Delimiters">00&quot; 01 02&quot; 03( 04 05) 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
36+
</KeywordLists>
37+
<Styles>
38+
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
39+
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
40+
<WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
41+
<WordsStyle name="NUMBERS" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
42+
<WordsStyle name="KEYWORDS1" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
43+
<WordsStyle name="KEYWORDS2" fgColor="800000" bgColor="FFFF80" fontName="" fontStyle="1" nesting="0" />
44+
<WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
45+
<WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFF80" fontName="" fontStyle="0" nesting="0" />
46+
<WordsStyle name="KEYWORDS5" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
47+
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFF80" fontName="" fontStyle="0" nesting="0" />
48+
<WordsStyle name="KEYWORDS7" fgColor="0080C0" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
49+
<WordsStyle name="KEYWORDS8" fgColor="0080C0" bgColor="FFFF80" fontName="" fontStyle="1" nesting="0" />
50+
<WordsStyle name="OPERATORS" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
51+
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
52+
<WordsStyle name="FOLDER IN CODE2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
53+
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
54+
<WordsStyle name="DELIMITERS1" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
55+
<WordsStyle name="DELIMITERS2" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="117701887" />
56+
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
57+
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
58+
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
59+
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
60+
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
61+
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
62+
</Styles>
63+
</UserLang>
64+
</NotepadPlus>

0 commit comments

Comments
 (0)