Code:
PGL2PSrgba = ^GL2PSrgba;

function gl2PSBeginPage(const title: PAnsiChar; const producer: PAnsiChar;
            viewport: array[0..3] of GLint;                 //array of 4 glint elements
            format,sort,options,colormode,colorsize: GLInt;
            colormap : PGL2PSrgba;                // pointer to colormap information
            nr, ng, nb, buffersize: GLInt;
            stream : TStream;                   // this may be wrong, but should be a file stream pointer
            const filename: PAnsiChar): GLInt;
            stdcall; external 'gl2ps.dll';