mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-21 18:30:20 +00:00
9bd9755dbb
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
28 lines
415 B
C
28 lines
415 B
C
/*
|
|
*
|
|
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
|
|
*
|
|
*/
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <macos/devices.h>
|
|
#include <macos/serial.h>
|
|
|
|
OSErr SerGetBuf(short refNum, long *count)
|
|
{
|
|
int res;
|
|
CntrlParam param;
|
|
|
|
param.ioCompletion = 0;
|
|
param.ioVRefNum = 0;
|
|
param.ioCRefNum = refNum;
|
|
param.csCode = kSERDInputCount;
|
|
|
|
res = PBStatusSync((ParmBlkPtr)¶m);
|
|
|
|
*count = param.csParamLong;
|
|
|
|
return res;
|
|
}
|