~ubuntu-branches/ubuntu/lucid/pdl/lucid

« back to all changes in this revision

Viewing changes to Basic/Core/pdlsimple.h.PL

  • Committer: Bazaar Package Importer
  • Author(s): Ben Gertzfield
  • Date: 2002-04-08 18:47:16 UTC
  • Revision ID: james.westby@ubuntu.com-20020408184716-0hf64dc96kin3htp
Tags: upstream-2.3.2
ImportĀ upstreamĀ versionĀ 2.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/perl
 
2
 
 
3
use Config;
 
4
use File::Basename qw(&basename &dirname);
 
5
 
 
6
require "pdl_hfiles.p";
 
7
 
 
8
# List explicitly here the variables you want Configure to
 
9
# generate.  Metaconfig only looks for shell variables, so you
 
10
# have to mention them as if they were shell variables, not
 
11
# %Config entries.  Thus you write
 
12
#  $startperl
 
13
# to ensure Configure will look for $Config{startperl}.
 
14
 
 
15
# This forces PL files to create target in same directory as PL file.
 
16
# This is so that make depend always knows where to find PL derivatives.
 
17
chdir(dirname($0));
 
18
my $file;
 
19
($file = basename($0)) =~ s/\.PL$//;
 
20
$file =~ s/\.pl$//
 
21
        if ($Config{'osname'} eq 'VMS' or
 
22
            $Config{'osname'} eq 'OS2');  # "case-forgiving"
 
23
open OUT,">$file" or die "Can't create $file: $!";
 
24
 
 
25
print "Extracting $file (with variable substitutions)\n";
 
26
 
 
27
# In this section, perl variables will be expanded during extraction.
 
28
# You can use $Config{...} to use Configure variables.
 
29
 
 
30
print OUT <<"!GROK!THIS!";
 
31
 
 
32
#ifndef __PDL_H
 
33
 
 
34
/* These are kept automaticallu in sync with pdl.h during perl build */
 
35
 
 
36
$PDL_DATATYPES
 
37
 
 
38
#endif
 
39
 
 
40
/*
 
41
   Define a simple pdl C data structure which maps onto passed
 
42
   piddles for passing with callext().
 
43
 
 
44
   Note it is up to the user at the perl level to get the datatype
 
45
   right. Anything more sophisticated probably ought to go through
 
46
   PP anyway (which is fairly trivial).
 
47
*/
 
48
 
 
49
struct pdlsimple {
 
50
   int    datatype;  /* whether byte/int/float etc. */
 
51
   void  *data;      /* Generic pointer to the data block */
 
52
   int    nvals;     /* Number of data values */
 
53
   PDL_Long   *dims; /* Array of data dimensions */
 
54
   int    ndims;     /* Number of data dimensions */
 
55
};
 
56
 
 
57
typedef struct pdlsimple pdlsimple;
 
58
 
 
59
!GROK!THIS!