home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / User / h / basictrans < prev    next >
Encoding:
Text File  |  1995-06-22  |  2.8 KB  |  108 lines

  1. #ifndef basictrans_H
  2. #define basictrans_H
  3.  
  4. /* C header file for BASICTrans
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 22 12:17:04 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  BASICTrans_HELP
  21. #define BASICTrans_HELP                         0x42C80
  22. #undef  XBASICTrans_HELP
  23. #define XBASICTrans_HELP                        0x62C80
  24. #undef  BASICTrans_Error
  25. #define BASICTrans_Error                        0x42C81
  26. #undef  XBASICTrans_Error
  27. #define XBASICTrans_Error                       0x62C81
  28. #undef  BASICTrans_Message
  29. #define BASICTrans_Message                      0x42C82
  30. #undef  XBASICTrans_Message
  31. #define XBASICTrans_Message                     0x62C82
  32.  
  33. /*************************
  34.  * Function declarations *
  35.  *************************/
  36.  
  37. #ifdef __cplusplus
  38.    extern "C" {
  39. #endif
  40.  
  41. /* ------------------------------------------------------------------------
  42.  * Function:      basictrans_help()
  43.  *
  44.  * Description:   Interpret, translate if required, and print HELP messages
  45.  *
  46.  * Input:         help_text - value of R0 on entry
  47.  *                prog_name - value of R1 on entry
  48.  *                lexical_table - value of R2 on entry
  49.  *
  50.  * Output:        unclaimed - value of R1 on exit (X version only)
  51.  *
  52.  * Returns:       R1 (non-X version only)
  53.  *
  54.  * Other notes:   Calls SWI 0x42C80.
  55.  */
  56.  
  57. extern os_error *xbasictrans_help (char const *help_text,
  58.       char const *prog_name,
  59.       byte const *lexical_table,
  60.       bool *unclaimed);
  61. extern bool basictrans_help (char const *help_text,
  62.       char const *prog_name,
  63.       byte const *lexical_table);
  64.  
  65. /* ------------------------------------------------------------------------
  66.  * Function:      basictrans_error()
  67.  *
  68.  * Description:   Copy translated error string to buffer
  69.  *
  70.  * Input:         error_no - value of R0 on entry
  71.  *                error_buffer - value of R1 on entry
  72.  *
  73.  * Other notes:   Calls SWI 0x42C81.
  74.  */
  75.  
  76. extern os_error *xbasictrans_error (int error_no,
  77.       os_error *error_buffer);
  78. __swi (0x42C81) void basictrans_error (int error_no,
  79.       os_error *error_buffer);
  80.  
  81. /* ------------------------------------------------------------------------
  82.  * Function:      basictrans_message()
  83.  *
  84.  * Description:   Translate and print miscellaneous message
  85.  *
  86.  * Input:         message_no - value of R0 on entry
  87.  *                arg0 - value of R1 on entry
  88.  *                arg1 - value of R2 on entry
  89.  *                arg2 - value of R3 on entry
  90.  *
  91.  * Other notes:   Calls SWI 0x42C82.
  92.  */
  93.  
  94. extern os_error *xbasictrans_message (int message_no,
  95.       int arg0,
  96.       int arg1,
  97.       int arg2);
  98. __swi (0x42C82) void basictrans_message (int message_no,
  99.       int arg0,
  100.       int arg1,
  101.       int arg2);
  102.  
  103. #ifdef __cplusplus
  104.    }
  105. #endif
  106.  
  107. #endif
  108.