X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b63b07a809f9a3d22596d4971ef5c8971153823a..3903f408241aedc3b2f5e24349d0ac939ba9164c:/utils/tex2rtf/src/bmputils.h?ds=sidebyside diff --git a/utils/tex2rtf/src/bmputils.h b/utils/tex2rtf/src/bmputils.h index 11d30eacaa..f283af196a 100644 --- a/utils/tex2rtf/src/bmputils.h +++ b/utils/tex2rtf/src/bmputils.h @@ -22,7 +22,7 @@ void DecToHex(int dec, wxChar *buf) buf[1] = hexArray[secondDigit]; buf[2] = 0; } - + static unsigned int getshort(FILE *fp) { int c, c1; @@ -35,29 +35,29 @@ static unsigned long getint(FILE *fp) int c, c1, c2, c3; c = getc(fp); c1 = getc(fp); c2 = getc(fp); c3 = getc(fp); return (long)((long) c) + - (((long) c1) << 8) + - (((long) c2) << 16) + - (((long) c3) << 24); + (((long) c1) << 8) + + (((long) c2) << 16) + + (((long) c3) << 24); } bool GetBMPHeader(FILE *fp, int *Width, int *Height, int *Planes, int *BitsPerPixel) { // Remember about all fields but store only important ones unsigned long /* - bfSize, - bfOffBits, - biSize, - */ - biWidth, - biHeight, + bfSize, + bfOffBits, + biSize, + */ + biWidth, + biHeight, biPlanes, biBitCount /* , biCompression, - biSizeImage, - biXPelsPerMeter, - biYPelsPerMeter, - biClrUsed, + biSizeImage, + biXPelsPerMeter, + biYPelsPerMeter, + biClrUsed, biClrImportant */ ; @@ -149,19 +149,19 @@ bool OutputBitmapData(FILE *fd) #ifdef __WXMSW__ struct mfPLACEABLEHEADER { - DWORD key; - HANDLE hmf; - RECT bbox; - WORD inch; - DWORD reserved; - WORD checksum; + DWORD key; + HANDLE hmf; + RECT bbox; + WORD inch; + DWORD reserved; + WORD checksum; }; // Returns size in TWIPS bool GetMetafileHeader(FILE *handle, int *width, int *height) { char buffer[40]; - mfPLACEABLEHEADER *theHeader = (mfPLACEABLEHEADER *)&buffer; + mfPLACEABLEHEADER *theHeader = (mfPLACEABLEHEADER *)&buffer[0]; fread((void *)theHeader, sizeof(char), sizeof(mfPLACEABLEHEADER), handle); if (theHeader->key != 0x9AC6CDD7) { @@ -223,7 +223,7 @@ bool OutputMetafileData(FILE *handle) int ch; do { - ch = getc(handle); + ch = getc(handle); if (bytesSoFar == scanLineWidth) { bytesSoFar = 0;