On Fri, Dec 29, 2000 at 05:34:25PM -0800, Jon M. Taylor wrote:
> On Tue, 26 Dec 2000, Johannes Zellner wrote:
> 
> > Hi,
> > 
> > in <ggi/xmi.h>, there's 
> > 
> >     1) an unmatched ___BEGIN_DECLS (a missing ___END_DECLS)
> >     2) a pair __BEGIN_DECLS __END_DECLS which should probably
> >        be ___BEGIN_DECLS ___END_DECLS instead.
> 
>       Please send me patches, if you could.

attached is a patch which makes /all/
prototypes enclosed by 'extern "C" { ... }'

-- 
   Johannes
*** ./xmi.h.orig        Sat Dec 30 12:38:08 2000
--- ./xmi.h     Sat Dec 30 12:36:48 2000
***************
*** 121,126 ****
--- 121,128 ----
        } \
    }
  
+ ___BEGIN_DECLS
+ 
  /* miPaintedSet manipulation routines (other than public) */
  extern void XMI_stubs_addspanstopaintedset(ggi_visual_t vis, Spans *spans, 
miPaintedSet *paintedSet, miPixel pixel);
  extern void XMI_stubs_quicksortspansy(ggi_visual_t vis, miPoint *points, unsigned 
int *widths, int numSpans);
***************
*** 130,135 ****
--- 132,139 ----
  extern void miDeletePaintedSet(ggi_visual_t vis, miPaintedSet *paintedSet);
  extern void miClearPaintedSet(ggi_visual_t vis, miPaintedSet *paintedSet);
  
+ ___END_DECLS
+ 
  /* Blend stage
   * 
   * This is a generic three-operand pixel blending stage list element,
***************
*** 286,297 ****
--- 290,304 ----
        int numInBlendStageList;        /* Length of blend stage array */
  } miGC;
  
+ ___BEGIN_DECLS
  
  /* Constructor, destructor, and copy constructor for the miGC class */
  extern miGC *miNewGC(ggi_visual_t vis, int npixels, const miPixel *pixels, int 
nblendstages, const miBlendStage *blendstages); 
  extern void miDeleteGC(ggi_visual_t vis, miGC *pGC);
  extern miGC *miCopyGC(ggi_visual_t vis, const miGC *pGC);
  
+ ___END_DECLS
+ 
  /* Values for an miGC's miGCFillRule attribute (default=MI_EVEN_ODD_RULE) */
  enum { MI_EVEN_ODD_RULE, MI_WINDING_RULE };
  
***************
*** 314,319 ****
--- 321,328 ----
   * preceding, plus MI_GC_LINE_WIDTH */
  typedef enum { MI_GC_FILL_RULE, MI_GC_JOIN_STYLE, MI_GC_CAP_STYLE, MI_GC_LINE_STYLE, 
MI_GC_ARC_MODE, MI_GC_LINE_WIDTH } miGCAttribute;
  
+ ___BEGIN_DECLS
+ 
  /* A function that sets a single integer-valued miGC attribute.  `value'
   * must be one of the preceding enum's, except when
   * attribute = MI_GC_LINE_WIDTH, in which case value >=0 is required. */
***************
*** 329,334 ****
--- 338,345 ----
  extern void miSetGCPixels(ggi_visual_t vis, miGC *pGC, int npixels, const miPixel 
*pixels);
  extern void miSetGCBlendStages(ggi_visual_t vis, miGC *pGC, int nblendstages, const 
miBlendStage *blendstages);
  
+ ___END_DECLS
+ 
  /*********** DECLARATIONS OF PUBLIC DRAWING FUNCTIONS ******************/
  
  /* The semantics of these drawing functions is similar to that of the
***************
*** 374,379 ****
--- 385,392 ----
  extern void miDrawLines(ggi_visual_t vis, miPaintedSet *paintedSet, const miGC *pGC, 
miCoordMode mode, int npts, const miPoint *pPts);
  extern void miFillPolygon(ggi_visual_t vis, miPaintedSet *paintedSet, const miGC 
*pGC, miPolygonShape shape, miCoordMode mode, int npts, const miPoint *pPts);
  
+ ___END_DECLS
+ 
  /* Structure that defines a rectangle.  Upper left corner is [x,y] and
   * lower right corner is [x+width,y+height]. */
  typedef struct {
***************
*** 381,391 ****
--- 394,408 ----
        unsigned int width, height;     /* width >= 1 and height >= 1 */
  } miRectangle;
  
+ ___BEGIN_DECLS
+ 
  /* 2. Rectangle-related drawing functions. These draw and fill a specified 
   * number of rectangles, supplied as an array of miRectangles. */
  extern void miDrawRectangles(ggi_visual_t vis, miPaintedSet *paintedSet, const miGC 
*pGC, int nrects, const miRectangle *pRects);
  extern void miFillRectangles(ggi_visual_t vis, miPaintedSet *paintedSet, const miGC 
*pGC, int nrects, const miRectangle *pRects);
  
+ ___END_DECLS
+ 
  /* Structure that defines an `arc' (i.e. a segment of an ellipse whose
   * principal axes are aligned with the coordinate axes).  The upper left
   * corner of the bounding box is [x,y], and the lower right corner is
***************
*** 411,419 ****
--- 428,441 ----
   *
   * miFillArcs draws a sequence of filled arcs.  They are filled either as
   * chords or as pie slices, as specified by the graphics context. */
+ 
+ ___BEGIN_DECLS
+ 
  extern void miDrawArcs(ggi_visual_t vis, miPaintedSet *paintedSet, const miGC *pGC, 
int narcs, const miArc *parcs);
  extern void miFillArcs(ggi_visual_t vis, miPaintedSet *paintedSet, const miGC *pGC, 
int narcs, const miArc *parcs);
  
+ ___END_DECLS
+ 
  /* miPixmap
   * 
   * This is a generic untyped sub-bitmap representation, used as a source or
***************
*** 431,443 ****
        PIXMAP_VIS              /* ggi_visual is available      */
  } miPixmapFlags;
  
  extern miPixmap *miNewPixmap(uint w, uint h, ggi_graphtype type);
  extern void miDeletePixmap(ggi_visual_t vis, miPixmap *pPixmap);
  
  extern void miCopyPaintedSetToVisual(ggi_visual_t vis, const miGC *pGC, const 
miPaintedSet *paintedSet, miPoint offset);
  
- __BEGIN_DECLS
- 
  /* Extension management */
  int xmiInit(void);
  int xmiExit(void);
--- 453,465 ----
        PIXMAP_VIS              /* ggi_visual is available      */
  } miPixmapFlags;
  
+ ___BEGIN_DECLS
+ 
  extern miPixmap *miNewPixmap(uint w, uint h, ggi_graphtype type);
  extern void miDeletePixmap(ggi_visual_t vis, miPixmap *pPixmap);
  
  extern void miCopyPaintedSetToVisual(ggi_visual_t vis, const miGC *pGC, const 
miPaintedSet *paintedSet, miPoint offset);
  
  /* Extension management */
  int xmiInit(void);
  int xmiExit(void);
***************
*** 445,450 ****
  int xmiAttach(ggi_visual_t vis);
  int xmiDetach(ggi_visual_t vis);
  
! __END_DECLS
  
  #endif /* _GGI_XMI_H */
--- 467,472 ----
  int xmiAttach(ggi_visual_t vis);
  int xmiDetach(ggi_visual_t vis);
  
! ___END_DECLS
  
  #endif /* _GGI_XMI_H */

Reply via email to