Main Page | Modules | Data Structures | Directories | File List | Data Fields | Examples

astro.h

00001 /*
00002  *  This library is free software; you can redistribute it and/or
00003  *  modify it under the terms of the GNU Lesser General Public
00004  *  License as published by the Free Software Foundation; either
00005  *  version 2 of the License, or (at your option) any later version.
00006  *
00007  *  This library is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00010  *  Lesser General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00015  *  
00016  *  Copyright (C) 2005 Liam Girdwood, Radu Corlan  
00017  */
00018 
00019 #ifndef __LNC_ASTRO_OBJECT_H
00020 #define __LNC_ASTRO_OBJECT_H
00021 
00022 #include <stdio.h>
00023 
00024 #include <libncat/libncat.h>
00025 #include <libncat/object.h>
00026 
00027 #define soffset(x,y) (int)(&((x*)0)->y)                 /* offset in struct */
00028 #define ssizeof(x,y) sizeof(((x*)0)->y)                 /* size in struct */
00029 #define asize(x) (sizeof(x)/sizeof(x[0]))               /* array size */
00030 
00031 typedef struct {
00032         char name[32];          
00033         char symbol[8];         
00034         int s_offset;           
00035         int l_offset;           
00036         int s_size;                     
00037         int l_size;                     
00038         lnc_ctype type;         
00039         char units[16];         
00040         int g_offset;           
00041     int g_posn;         
00042 } lnc_dset_index;
00043 
00044 extern lnc_dset_index astro_fields[];
00045 
00049 int append_astro_field (lnc_dset_index* base, char* field);
00050 
00051 int get_astro_field_offset (char* field);
00052 
00053 #endif

Generated on Tue Jul 5 14:34:14 2005 for libncat by  doxygen 1.4.2