Exemplo n.º 1
0
ssize_t		brl_write(unsigned char *str, size_t len)
{
  ssize_t res;

  alarm(20);
  res = brlapi_sendRaw(str, len);
  alarm(0);
  if (res < 0)
    {
      brlapi_perror("Error writing to the terminal");
      eutp_abort(E_WRITE);
      return 0;
    }
  return res;
}
Exemplo n.º 2
0
/* if something nasty occured, try to clean */
void transfer_abort(int exitnum) {
 brlapi_sendRaw(VB_RESET,strlen(VB_RESET));
 brlapi_leaveRaw();
 brlapi_closeConnection();
 exit(exitnum);
}