home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CPI-C.ZIP / JQCPIC.H < prev    next >
Text File  |  1992-06-24  |  5KB  |  112 lines

  1. /*
  2.  *  PROGRAM:   JQCPIC -- John Q's Portable CPI-C Abuser
  3.  *
  4.  *  MODULE:    JQCPIC.H -- common variables, typedefs, constants, and
  5.  *                         function prototypes
  6.  *  COPYRIGHTS:
  7.  *             This module contains code made available by IBM
  8.  *             Corporation on an AS IS basis.  Any one receiving the
  9.  *             module is considered to be licensed under IBM copyrights
  10.  *             to use the IBM-provided source code in any way he or she
  11.  *             deems fit, including copying it, compiling it, modifying
  12.  *             it, and redistributing it, with or without
  13.  *             modifications.  No license under any IBM patents or
  14.  *             patent applications is to be implied from this copyright
  15.  *             license.
  16.  *
  17.  *             A user of the module should understand that IBM cannot
  18.  *             provide technical support for the module and will not be
  19.  *             responsible for any consequences of use of the program.
  20.  *
  21.  *             Any notices, including this one, are not to be removed
  22.  *             from the module without the prior written consent of
  23.  *             IBM.
  24.  *
  25.  *  AUTHOR:    Dr. John Q. Walker II
  26.  *             IBM VNET: JOHNQ at RALVM6          IBM tie line: 444-4414
  27.  *             Internet: johnq@vnet.ibm.com        phone: (919) 254-4414
  28.  *
  29.  *  RELATED FILES:
  30.  *             See file JQCPIC.DOC for detailed information.
  31.  *
  32.  *  CHANGE HISTORY:
  33.  *  Date       Description
  34.  *  05/12/92   Added prologue.
  35.  *  06/20/92   Added check_receive() & check_rts()
  36.  *             Added const
  37.  */
  38.  
  39. #include <cmc.h>
  40.  
  41. #include "cpicdefs.h"
  42. #include "port.h"
  43.  
  44. /*=============================================================================
  45.  * Typedefs and Enums
  46.  *===========================================================================*/
  47.  
  48. typedef unsigned char UCHAR;
  49. typedef unsigned int  UINT;
  50. typedef   signed int  INTEGER;
  51. typedef unsigned long ULONG;
  52.  
  53. typedef enum { FALSE, TRUE } BOOL;
  54.  
  55. /*=============================================================================
  56.  * Definitions
  57.  *===========================================================================*/
  58.  
  59. #define CONVERSATION_ID_LENGTH  (8)
  60. #define SYM_DEST_NAME_LENGTH    (8)
  61. #define NUM_CPIC_STATES         (9)
  62. #define NUM_CPIC_CALLS          (37)
  63. #define NUM_CPIC_RETURN_CODES   (35)
  64. #define LOG_EXTENSION           ".LOG"
  65. #define VALID_PARM_PERCENTAGE   (95)    /* only 1 in 20 is bad */
  66.  
  67. /* character constants */
  68. #define BLANK           ((char)' ')
  69. #define NULL_CHARACTER  ((char)'\0')
  70. #define BACKSLASH       ((char)'\\')
  71. #define SLASH           ((char)'/')
  72. #define QUESTION_MARK   ((char)'?')
  73. #define CRLF            ((char)'\n')
  74. #define TAB             ((char)'\t')
  75.  
  76. /*=============================================================================
  77.  * External definitions
  78.  *===========================================================================*/
  79.  
  80. /* character constants */
  81. extern unsigned char sym_dest_name[];
  82. extern char *program_version;
  83. extern char *program_name;
  84.  
  85. extern CPIC_VERB_INDEX cpic_state_map[];
  86.  
  87. /*=============================================================================
  88.  * Function prototypes
  89.  *===========================================================================*/
  90.  
  91. BOOL                  check_receive           (const CPIC_CONV_ATTRIB *);
  92. BOOL                  check_rts               (const CPIC_CONV_ATTRIB *);
  93. BOOL                  generate_valid_parm     (void);
  94. char*                 get_program_name        (char *);
  95. CM_CONVERSATION_STATE get_new_conversation_state (CPIC_CONV_ATTRIB *);
  96. CM_CONVERSATION_STATE issue_cpic_call         (CPIC_CONV_ATTRIB *);
  97. CM_CONVERSATION_STATE unexpected_rc           (CPIC_CONV_ATTRIB *);
  98. CM_INT32              get_random_CM_INT32     (void);
  99. void                  all_done                (const int);
  100. void                  command_line            (int, char **);
  101. void                  fetch_conversation_state(CPIC_CONV_ATTRIB *);
  102. void                  fill_field              (char *, size_t);
  103. void                  show_error              (char *, ...);
  104. void                  show_conv_state         (const CM_CONVERSATION_STATE);
  105. void                  show_cpic_call          (CPIC_CONV_ATTRIB *,
  106.                                                const CPIC_VERB_INDEX);
  107. void                  show_cpic_call_long     (const CPIC_VERB_INDEX);
  108. void                  show_cpic_call_short    (const CPIC_VERB_INDEX);
  109. void                  show_end_of_line        (void);
  110. void                  show_return_code        (CPIC_CONV_ATTRIB *);
  111. void                  usage                   (void);
  112.