EMILE/libmacos/SerGetBuf.c
Laurent Vivier 9bd9755dbb Update email address
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
2013-09-05 14:45:27 +02:00

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)&param);
*count = param.csParamLong;
return res;
}