home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / basictrans < prev    next >
Encoding:
Text File  |  1994-09-07  |  3.5 KB  |  121 lines

  1. #ifndef basictrans_H
  2. #define basictrans_H
  3.  
  4. /* C header file for BASICTrans
  5.  * written by DefMod (Sep  7 1994) on Wed Sep  7 21:25:48 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. /**********************************
  24.  * SWI names and SWI reason codes *
  25.  **********************************/
  26. #undef  BASICTrans_HELP
  27. #define BASICTrans_HELP                         0x42C80
  28. #undef  XBASICTrans_HELP
  29. #define XBASICTrans_HELP                        0x62C80
  30. #undef  BASICTrans_Error
  31. #define BASICTrans_Error                        0x42C81
  32. #undef  XBASICTrans_Error
  33. #define XBASICTrans_Error                       0x62C81
  34. #undef  BASICTrans_Message
  35. #define BASICTrans_Message                      0x42C82
  36. #undef  XBASICTrans_Message
  37. #define XBASICTrans_Message                     0x62C82
  38.  
  39. /*************************
  40.  * Function declarations *
  41.  *************************/
  42.  
  43. #ifdef __cplusplus
  44.    extern "C" {
  45. #endif
  46.  
  47. /*************************************************************
  48.  * NOTE: The following functions provide direct access to    *
  49.  *       the SWI's noted in the function description.        *
  50.  *       Please read the relevant PRM section for more       *
  51.  *       information on their input/output parameters.       *
  52.  *************************************************************/
  53.  
  54. /* ------------------------------------------------------------------------
  55.  * Function:      basictrans_help()
  56.  *
  57.  * Description:   Interpret, translate if required, and print HELP messages
  58.  *
  59.  * Input:         help_text - value of R0 on entry
  60.  *                prog_name - value of R1 on entry
  61.  *                lexical_table - value of R2 on entry
  62.  *
  63.  * Output:        unclaimed - value of R1 on exit (X version only)
  64.  *
  65.  * Returns:       R1 (non-X version only)
  66.  *
  67.  * Other notes:   Calls SWI 0x42C80.
  68.  */
  69.  
  70. extern os_error *xbasictrans_help (char *help_text,
  71.       char *prog_name,
  72.       byte *lexical_table,
  73.       bool *unclaimed);
  74. extern bool basictrans_help (char *help_text,
  75.       char *prog_name,
  76.       byte *lexical_table);
  77.  
  78. /* ------------------------------------------------------------------------
  79.  * Function:      basictrans_error()
  80.  *
  81.  * Description:   Copy translated error string to buffer
  82.  *
  83.  * Input:         error_no - value of R0 on entry
  84.  *                error_buffer - value of R1 on entry
  85.  *
  86.  * Other notes:   Calls SWI 0x42C81.
  87.  */
  88.  
  89. extern os_error *xbasictrans_error (int error_no,
  90.       os_error *error_buffer);
  91. extern void basictrans_error (int error_no,
  92.       os_error *error_buffer);
  93.  
  94. /* ------------------------------------------------------------------------
  95.  * Function:      basictrans_message()
  96.  *
  97.  * Description:   Translate and print miscellaneous message
  98.  *
  99.  * Input:         message_no - value of R0 on entry
  100.  *                arg0 - value of R1 on entry
  101.  *                arg1 - value of R2 on entry
  102.  *                arg2 - value of R3 on entry
  103.  *
  104.  * Other notes:   Calls SWI 0x42C82.
  105.  */
  106.  
  107. extern os_error *xbasictrans_message (int message_no,
  108.       int arg0,
  109.       int arg1,
  110.       int arg2);
  111. extern void basictrans_message (int message_no,
  112.       int arg0,
  113.       int arg1,
  114.       int arg2);
  115.  
  116. #ifdef __cplusplus
  117.    }
  118. #endif
  119.  
  120. #endif
  121.