Hello,

I am trying to convert a C header file to Pascal to use the dll (gl2ps) in my application. I have a 3 little problems with it. Maybe any of you can help me with this.

The C header file is:
Code:
typedef GLfloat GL2PSrgba[4];

GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, 
                 GLint viewport[4], GLint format, GLint sort,
                 GLint options, GLint colormode,
                 GLint colorsize, GL2PSrgba *colormap, 
                 GLint nr, GLint ng, GLint nb, GLint buffersize,
                 FILE *stream, const char *filename);
My current conversion is:
Code:
GL2PSrgba = array[0..3] of GLfloat;

function gl2PSBeginPage(const title: PAnsiChar; const producer: PAnsiChar;
            GLint viewport[4];                 // <--- PROBLEM 1
            format,sort,options,colormode,colorsize: GLInt;
            GL2PSrgba *colormap;                // <--- PROBLEM 2
            nr, ng, nb, buffersize: GLInt;
            FILE *stream;                   // <--- PROBLEM 3
            const filename: PAnsiChar): GLInt;
            stdcall; external 'gl2ps.dll';
My 3 problems are:

1) How to pass an array[4] of type GLInt?
2) How to pass *var as GL2PSrgba?
3) What is a compareable type in Pascal with FILE?