Does the BlockRead below:
type
TRGBQuad = record
rgbBlue: GLubyte;
rgbGreen: GLubyte;
rgbRed: GLubyte;
rgbReserved: GLubyte;
end;...
var
FileHandle: File;
BytesRead: GLuint;
FColorPalette: PRGBQuad;
NumberOfColours: GLuint;...
BlockRead(FileHandle,FColorPalette^,SizeOf(TRQBQuad)*NumberOfColours,BytesRead);corresponds to this C code:
typedef struct tagRGBQuad {
char rgbBlue;
char rgbGreen;
char rgbRed;
char rgbReserved;
} RGBQuad;...
RGBQuad *colours;
FILE *in;
int numColours;...
fread(colours,sizeof(RGBQuad),numColours,in);?
View this message in context: http://old.nabble.com/Help-converting-C-code-tp27431041p27431041.html
Sent from the Free Pascal - General mailing list .
