antoine-source/appleworksgs/Spell/Src/BYTREAD.C

1 line
1010 B
C++
Raw Normal View History

2023-03-04 02:45:20 +00:00
/***********************************************************************\ Filename: bytread.c \***********************************************************************/ #include <memory.h> #include "proxio.h" #include "proxerr.h" #include "spdef.h" char *SPJumpLoc[1]; unsigned _SPErrNum[1]; unsigned _THErrNum[1]; unsigned _SPTHID[1]; unsigned _SPActive[] = { 0 }; /* Fucking C compiler won't let me use */ unsigned _THActive[] = { 0 }; /* long references any other way. */ int *toolErr[1]; abytread(pptr, len, file) char **pptr; unsigned len; HANDLE file; { char *ptr; *pptr = ptr = (char *) zalloc(_SPTHID[0], len); if (!ptr) return (ERROR); if (bytread(ptr, len, file) == ERROR) { *pptr = 0; nzfree(ptr); return (ERROR); } return (OKAY); } bytread(ptr, len, file) char *ptr; unsigned len; HANDLE file; { unsigned x; if ((x = stdread((char *) ptr, len, file)) != len) return (ERROR); return (OKAY); }