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

  1. #include "econet.h"
  2. #include "messagetrans.h"
  3. #include "os.h"
  4.  
  5. static os_error Error_No_Econet = {error_ECONET_NO_ECONET, "NoEco"};
  6.  
  7. os_error *has_econet (void)
  8.  
  9.    /*Return an error if no econet*/
  10.  
  11. {  os_error *error = NULL, *error1;
  12.  
  13.    if ((error1 = xeconet_set_protection (NONE, ALL, NULL)) != NULL &&
  14.          error1->errnum == error_NO_SUCH_SWI)
  15.    {  error = xmessagetrans_error_lookup (&Error_No_Econet, NULL, NULL, 0,
  16.             0, 0, 0, 0);
  17.       goto finish;
  18.    }
  19.  
  20. finish:
  21.    return error;
  22. }
  23.