-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowser.pd
77 lines (47 loc) · 1.19 KB
/
browser.pd
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
our $VERSION = '0.001';
pp_setversion($VERSION);
pp_addpm({At=>'Top'},<<'EOD');
=head1 NAME
PDL::IO::Browser -- 2D data browser for PDL
=head1 DESCRIPTION
cursor terminal browser for ndarrays.
=head1 SYNOPSIS
use PDL::IO::Browser;
browse sequence 3,2;
=cut
use strict;
use warnings;
EOD
use strict;
use warnings;
use PDL::Types;
pp_addhdr('void browse(int type, int nc, int nr, void *in);');
pp_def(
'browse',
Pars => 'a(n,m);',
Code => "
browse(\$TBSULQFD(0,1,2,3,4,5,6),
\$SIZE(n),\$SIZE(m),\$P(a));
",
GenericTypes => [qw(B S U L Q F D)],
Doc=><<'EOD');
=head2 browse
=for ref
browse a 2D array using terminal cursor keys
=for usage
browse $data
This uses the CURSES library to allow one to scroll
around a PDL array using the cursor keys.
=cut
EOD
pp_addpm({At=>'Bot'},<<'EOD');
=head1 AUTHOR
Copyright (C) Robin Williams 1997 ([email protected]).
All rights reserved. There is no warranty. You are allowed
to redistribute this software / documentation under certain
conditions. For details, see the file COPYING in the PDL
distribution. If this file is separated from the PDL distribution,
the copyright notice should be included in the file.
=cut
EOD
pp_done();