windows-nt/Source/XPSP1/NT/multimedia/opengl/pmesh/fileio.cxx
2020-09-26 16:20:57 +08:00

38 lines
569 B
C++

#include "precomp.h"
#pragma hdrstop
#include "fileio.h"
#include <string.h>
void read_float(istream& is, float& v)
{
is.read((char*)&v,sizeof(float));
}
void read_DWORD(istream& is, DWORD& v)
{
is.read((char*)&v,sizeof(DWORD));
}
void read_WORD(istream& is, WORD& v)
{
is.read((char*)&v,sizeof(WORD));
}
void skip_bytes(istream&is, DWORD i)
{
is.seekg(i,ios::cur);
}
#ifndef __DUMP_DATA
void write_string(ostream& os, char *str)
{
int n = strlen(str);
os << str;
//os.write((char*)&str,sizeof(unsigned));
}
#endif //__DUMP_DATA