=pod

=head1 NAME



B<FunColumnLookup - lookup a Funtools column>


=head1 SYNOPSIS





  #include <funtools.h>

  int FunColumnLookup(Fun fun, char *s, int which,
                      char **name, int *type, int *mode,
                      int *offset, int *n, int *width)





=head1 DESCRIPTION




The B<FunColumnLookup()> routine returns information about a named
(or indexed) column.  The first argument is the Fun handle associated
with this set of columns. The second argument is the name of the
column to look up.  If the name argument is NULL, the argument that
follows is the zero-based index into the column array of the column
for which information should be returned.  The next argument is a
pointer to a char *, which will contain the name of the column. The
arguments that follow are the addresses of int values into which
the following information will be returned:


=over 4




=item *

B<type>: data type of column:


=over 4




=item *

A: ASCII characters


=item *

B: unsigned 8-bit char


=item *

I: signed 16-bit int


=item *

U: unsigned 16-bit int (not standard FITS)


=item *

J: signed 32-bit int


=item *

V: unsigned 32-bit int (not standard FITS)


=item *

E: 32-bit float


=item *

D: 64-bit float


=back




=item *

B<mode>: bit flag status of column, including:


=over 4




=item *

COL_ACTIVE      1 is column activated?


=item *

COL_IBUF        2 is column in the raw input data?


=item *

COL_PTR         4 is column a pointer to an array?


=item *

COL_READ      010 is read mode selected?


=item *

COL_WRITE     020 is write mode selected?


=item *

COL_REPLACEME 040 is this column being replaced by user data?


=back




=item *

B<offset>: byte offset in struct


=item *

B<n>: number of elements (i.e. size of vector) in this column


=item *

B<width>: size in bytes of this column


=back


If the named column exists, the routine returns a positive integer,
otherwise zero is returned. (The positive integer is the index+1 into
the column array where this column was located.)

If NULL is passed as the return address of one (or more) of these
values, no data is passed back for that information.  For
example:

  if( !FunColumnLookup(fun, "phas", 0, NULL NULL, NULL, NULL, &npha, NULL) )
    gerror(stderr, "can't find phas column\n");

only returns information about the size of the phas vector.




=head1 SEE ALSO



See funtools(n) for a list of Funtools help pages


=cut
