EMILE/libmacos/SerGetBuf.c

28 lines
415 B
C
Raw Normal View History

2005-11-08 02:02:16 +00:00
/*
*
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
2005-11-08 02:02:16 +00:00
*
*/
#include <sys/types.h>
2005-11-08 02:02:16 +00:00
#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;
2005-11-08 02:02:16 +00:00
return res;
}