Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

point.h

Go to the documentation of this file.
00001  /*
00002   * plint/data/point.h : 2D points data structures
00003   * 
00004   * Time-stamp: <2002-10-07 06:40:54 gseba>
00005   * 
00006   * Copyright (C) Sebastian Glita, email: gseba@users.sourceforge.net
00007   * 
00008   * This file is part of plint.
00009   * 
00010   * plint is free software; you can  redistribute it and/or modify it under the
00011   * terms of the  GNU General Public License as published  by the Free Software
00012   * Foundation; either version 2, or (at your option) any later version.
00013   *
00014   * plint  is distributed  in the  hope  that it  will be  useful, but  WITHOUT
00015   * ANY  WARRANTY; without  even  the implied  warranty  of MERCHANTABILITY  or
00016   * FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU  General Public License for
00017   * more details.
00018   * 
00019   * You should  have received a  copy of the  GNU General Public  License along
00020   * with  plint; see  the file  COPYING.  If  not, write  to the  Free Software
00021   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA USA.
00022   *
00023   */
00024 
00025 #ifndef PLINT_DATA_TYPE_H
00026 #error Dont include me directly, but through data/type.h
00027 #endif
00028 
00043 struct _plint_pnt
00044 {
00045 
00046   int x;                                
00047   int y;                                
00049 #define PLINT_pnt_INIT(__x__, __y__) { x:(__x__), y:(__y__) }
00050 #define PLINT_pnt_INIT_NUL PLINT_pnt_INIT(0, 0)
00051 
00052 #define plint_pnt_x(__p__) (__p__).x
00053 #define plint_pnt_y(__p__) (__p__).y
00054 
00055 };
00056 
00057 __BEGIN_DECLS
00058 
00059 #define plint_pnt_cpy(__p__) (__p__)
00060 #define plint_pnt_dup plint_pnt_cpy
00061 #define plint_pnt_fre(__p__) 
00062 
00063 plint_pnt_t plint_pnt_new(plint_num_t X, plint_num_t Y);
00064 
00065 inline plint_pnt_t plint_ptr_pnt(plint_ptr_t VALUE);
00066 inline plint_ptr_t plint_pnt_ptr(plint_pnt_t POINT);
00067 inline plint_ptr_t plint_pnt_set(plint_ptr_t VALUE, plint_pnt_t POINT);
00068 
00069 __END_DECLS
00070 

Generated on Thu Jan 9 19:02:38 2003 for plint by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002