home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / Examples / p2-619 < prev    next >
Encoding:
Text File  |  1994-03-24  |  697 b   |  31 lines

  1. #include "econet.h"
  2. #include "os.h"
  3.  
  4. os_error *tx (void)
  5.  
  6. {  byte buf [20];
  7.    int status;
  8.    os_error *error = NULL;
  9.    char text [50], *end;
  10.  
  11.    if ((error = xeconet_do_transmit (NONE, 99, 7, 0, buf, sizeof buf,
  12.          6, 100, &status, NULL)) != NULL)
  13.       goto finish;
  14.  
  15.    if (status != econet_STATUS_TRANSMITTED)
  16.    {  if ((error = xos_convert_cardinal1 (status, text, sizeof text, &end))
  17.             != NULL)
  18.          goto finish;
  19.  
  20.       if ((error = xeconet_convert_status_to_string (status, end,
  21.                sizeof text - (end - text), 99, 7, NULL)) != NULL)
  22.          goto finish;
  23.  
  24.       if ((error = xos_write0 (text)) != NULL)
  25.          goto finish;
  26.    }
  27.  
  28. finish:
  29.    return error;
  30. }
  31.