Publish VCC Plus OSS source distribution for 3.6.2 build 60

This commit is contained in:
Brian Holman committed 2026-11-13 00:14:03 -07:00
commit c652a5276d
1192 files changed
+272368

No files matched your search

@@ -0,0 +1,24 @@
#!/usr/bin/env perl
# SPDX-License-Identifier: GPL-3.0-or-later
use strict;
use warnings;
@ARGV == 3 or die "Usage: build-data.pl words.txt generated.c WORDS.DAT\n";
my ($input, $source, $disk_data) = @ARGV;
open my $in, '<', $input or die "$input: $!\n";
my @words;
while (<$in>) {
s/\r?\n\z//;
next if $_ eq '';
/\A[A-Z]+\z/ or die "Words must contain uppercase A-Z only\n";
push @words, $_;
}
close $in;
@words <= 255 or die "Too many words\n";
my $bytes = join("\r", @words) . "\r\0";
length($bytes) <= 256 or die "Example data must fit one disk sector\n";
open my $c, '>', $source or die "$source: $!\n";
print {$c} "/* Generated from assets/words.txt. */\n#include <cmoc.h>\nconst unsigned char generatedWordCount = " . scalar(@words) . ";\n";
close $c or die "$source: $!\n";
open my $data, '>:raw', $disk_data or die "$disk_data: $!\n";
print {$data} $bytes . ("\0" x (256 - length($bytes)));
close $data or die "$disk_data: $!\n";