Ignore:
Timestamp:
Nov 10, 2005, 9:41:13 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • absolute shitloads of 64 bit fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/pcxread.cpp

    r2 r17  
    1818  if (!fread(&PCX_header.encoding,1,1,fp)) return 0; 
    1919  if (!fread(&PCX_header.bits_per_pixel,1,1,fp)) return 0; 
    20   PCX_header.xmin=read_short(fp);
    21   PCX_header.ymin=read_short(fp); 
    22   PCX_header.xmax=read_short(fp);
    23   PCX_header.ymax=read_short(fp);
    24   PCX_header.hres=read_short(fp);
    25   PCX_header.vres=read_short(fp);
     20  PCX_header.xmin=read_uint16(fp);
     21  PCX_header.ymin=read_uint16(fp); 
     22  PCX_header.xmax=read_uint16(fp);
     23  PCX_header.ymax=read_uint16(fp);
     24  PCX_header.hres=read_uint16(fp);
     25  PCX_header.vres=read_uint16(fp);
    2626  if (!fread(PCX_header.palette,1,48,fp)) return 0;
    2727  if (!fread(&PCX_header.reserved,1,1,fp)) return 0;
    2828  if (!fread(&PCX_header.color_planes,1,1,fp)) return 0;
    29   PCX_header.bytes_per_line=read_short(fp);
    30   PCX_header.palette_type=read_short(fp);
     29  PCX_header.bytes_per_line=read_uint16(fp);
     30  PCX_header.palette_type=read_uint16(fp);
    3131  if (!fread(PCX_header.filter,1,58,fp)) return 0;
    3232  return 1;
     
    3939  if (!fwrite(&PCX_header.encoding,1,1,fp)) return 0; 
    4040  if (!fwrite(&PCX_header.bits_per_pixel,1,1,fp)) return 0; 
    41   write_short(fp,PCX_header.xmin);
    42   write_short(fp,PCX_header.ymin); 
    43   write_short(fp,PCX_header.xmax);
    44   write_short(fp,PCX_header.ymax);
    45   write_short(fp,PCX_header.hres);
    46   write_short(fp,PCX_header.vres);
     41  write_uint16(fp,PCX_header.xmin);
     42  write_uint16(fp,PCX_header.ymin); 
     43  write_uint16(fp,PCX_header.xmax);
     44  write_uint16(fp,PCX_header.ymax);
     45  write_uint16(fp,PCX_header.hres);
     46  write_uint16(fp,PCX_header.vres);
    4747  if (!fwrite(PCX_header.palette,1,48,fp)) return 0;
    4848  if (!fwrite(&PCX_header.reserved,1,1,fp)) return 0;
    4949  if (!fwrite(&PCX_header.color_planes,1,1,fp)) return 0;
    50   write_short(fp,PCX_header.bytes_per_line);
    51   write_short(fp,PCX_header.palette_type);
     50  write_uint16(fp,PCX_header.bytes_per_line);
     51  write_uint16(fp,PCX_header.palette_type);
    5252  if (!fwrite(PCX_header.filter,1,58,fp)) return 0;
    5353  return 1;
Note: See TracChangeset for help on using the changeset viewer.