003 File Manager
Current Path:
/usr/src/contrib/less
usr
/
src
/
contrib
/
less
/
📁
..
📄
FREEBSD-upgrade
(1.06 KB)
📄
INSTALL
(7.71 KB)
📄
LICENSE
(1.24 KB)
📄
NEWS
(32.19 KB)
📄
README
(10.86 KB)
📄
brac.c
(2.18 KB)
📄
ch.c
(18.37 KB)
📄
charset.c
(17.3 KB)
📄
charset.h
(717 B)
📄
cmd.h
(4.42 KB)
📄
cmdbuf.c
(32.21 KB)
📄
command.c
(36.63 KB)
📄
compose.uni
(10.17 KB)
📄
cvt.c
(2.49 KB)
📄
decode.c
(20.81 KB)
📄
edit.c
(16.68 KB)
📄
filename.c
(19.65 KB)
📄
fmt.uni
(712 B)
📄
forwback.c
(9.77 KB)
📄
funcs.h
(17.56 KB)
📄
help.c
(49.78 KB)
📄
ifile.c
(7.39 KB)
📄
input.c
(8.82 KB)
📄
jump.c
(6.54 KB)
📄
less.h
(12.74 KB)
📄
less.hlp
(12.19 KB)
📄
less.nro
(69.08 KB)
📄
lessecho.c
(4.82 KB)
📄
lessecho.nro
(1.5 KB)
📄
lesskey.c
(17.99 KB)
📄
lesskey.h
(813 B)
📄
lesskey.nro
(9.15 KB)
📄
lglob.h
(2.98 KB)
📄
line.c
(28 KB)
📄
linenum.c
(10.36 KB)
📄
lsystem.c
(7.17 KB)
📄
main.c
(8.07 KB)
📄
mark.c
(8.28 KB)
📄
mkutable
(2.75 KB)
📄
optfunc.c
(13.61 KB)
📄
option.c
(13.89 KB)
📄
option.h
(2 KB)
📄
opttbl.c
(17.14 KB)
📄
os.c
(6.2 KB)
📄
output.c
(13 KB)
📄
pattern.c
(8.55 KB)
📄
pattern.h
(1.54 KB)
📄
pckeys.h
(898 B)
📄
position.c
(5.13 KB)
📄
position.h
(414 B)
📄
prompt.c
(11.98 KB)
📄
regexp.c
(27.74 KB)
📄
regexp.h
(973 B)
📄
screen.c
(53.03 KB)
📄
scrsize.c
(3.06 KB)
📄
search.c
(35.45 KB)
📄
signal.c
(4.63 KB)
📄
tags.c
(15.73 KB)
📄
ttyin.c
(4.12 KB)
📄
ubin.uni
(602 B)
📄
version.c
(46.22 KB)
📄
wide.uni
(3.52 KB)
Editing: mkutable
#! /usr/bin/perl use strict; my $USAGE = <<__EOF__; usage: mkutable [-n] [-f#] type... [--] [<] UnicodeData.txt -n = take non-matching types -f = zero-based type field (default 2) __EOF__ use Getopt::Std; use vars qw( $opt_f $opt_n ); my $type_field = 2; # Override Unicode tables for certain control chars # that are expected to be found in normal text files. my %force_space = ( 0x08 => 1, # backspace 0x09 => 1, # tab 0x0a => 1, # newline 0x0c => 1, # form feed 0x0d => 1, # carriage return ); # Hangul Jamo medial vowels and final consonants should be zero width. my @force_compose = ( [0x1160, 0x11ff], [0xd7b0, 0xd7c6], [0xd7cb, 0xd7fb] ); exit (main() ? 0 : 1); sub main { my $args = join ' ', @ARGV; die $USAGE if not getopts('f:n'); $type_field = $opt_f if $opt_f; my %types; my $arg; while ($arg = shift @ARGV) { last if $arg eq '--'; $types{$arg} = 1; } my %out = ( 'types' => \%types ); my %force_compose; foreach my $comp (@force_compose) { my ($lo,$hi) = @$comp; for (my $ch = $lo; $ch <= $hi; ++$ch) { $force_compose{$ch} = 1; } } my $date = `date`; chomp $date; print "/* Generated by \"$0 $args\" on $date */\n"; my $last_code = 0; while (<>) { chomp; s/#.*//; my @fields = split /;/; next if not @fields; my ($lo_code, $hi_code); my $codes = $fields[0]; if ($codes =~ /(\w+)\.\.(\w+)/) { $lo_code = hex $1; $hi_code = hex $2; } else { $lo_code = $hi_code = hex $codes; } my $type = $fields[$type_field]; $type =~ s/\s//g; for ($last_code = $lo_code; $last_code <= $hi_code; ++$last_code) { output(\%out, $last_code, $force_space{$last_code} ? 'Zs' : $force_compose{$last_code} ? 'Mn' : $type); } } output(\%out, $last_code); return 1; } sub output { my ($out, $code, $type) = @_; my $type_ok = ($type and ${${$out}{types}}{$type}); $type_ok = not $type_ok if $opt_n; my $prev_code = $$out{prev_code}; if (not $type_ok) { end_run($out, $prev_code); } elsif (not $$out{in_run} or $type ne $$out{run_type} or $code != $prev_code+1) { end_run($out, $prev_code); start_run($out, $code, $type); } $$out{prev_code} = $code; } sub start_run { my ($out, $code, $type) = @_; $$out{start_code} = $code; $$out{prev_code} = $code; $$out{run_type} = $type; $$out{in_run} = 1; } sub end_run { my ($out, $code) = @_; return if not $$out{in_run}; printf "\t{ 0x%04x, 0x%04x }, /* %s */\n", $$out{start_code}, $code, $$out{run_type}; $$out{in_run} = 0; }
Upload File
Create Folder