Skip to content

Commit

Permalink
Avoid using now obsolete AllocDosObject() in MorphOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilkka Lehtoranta committed Jan 1, 2009
1 parent 77f01e4 commit 7480076
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,31 @@ openIn(STRPTR name, int64 *size)
return file;
}

#elif defined(__MORPHOS__)
static BPTR
openIn(STRPTR name, ULONG * size)
{
struct FileInfoBlock fib;
BPTR file;

ENTER();

if((file = Open(name,MODE_OLDFILE)))
{
if(!ExamineFH(file,&fib))
{
Close(file);
file = 0;
}
else
{
*size = fib.fib_Size;
}
}

RETURN(file);
return file;
}
#else
static BPTR
openIn(STRPTR name, ULONG * size)
Expand Down

0 comments on commit 7480076

Please sign in to comment.