1 /*static char *SCCSID = "@(#)comsub.h 8.2 87/02/13";*/
2 /******************** START OF SPECIFICATIONS ************************/
4 /* SOURCE FILE NAME: COMSUB.H */
6 /* DESCRIPTIVE NAME: COMMON SUBROUTINE INCLUDE FILE */
13 /* ENTRY POINTS: NONE */
15 /* EXTERNAL REFERENCE: NONE */
19 /* VERSION DATE REASON */
21 /* 1.00 03/10/1986 initial version */
22 /* 1.01 03/11/1986 define external pointer to invalid */
23 /* argument string (CORA's request) */
24 /* 1.02 03/18/1986 external declaration of "computmsg" */
25 /* parm 1 : char far * -> char far ** */
26 /* 1.03 03/24/1986 delete "comverflnm" related decralation */
27 /* change "int" to "unsigned" */
28 /* 1.04 03/25/1986 - add function external declaration of */
29 /* "comcheckdosver" */
30 /* - delete "far" declaration. */
31 /* 2.00 04/15/1986 the first intigration version */
32 /* 2.01 05/21/1986 - add "extern rctomid()" */
33 /* 2.02 05/22/1986 - add DBCS common routines */
34 /* 2.03 06/17/1986 - add "com_toupper" and "com_tolower" */
35 /* 2.04 06/18/1986 - comment out SCCSID tag */
36 /* 2.05 06/25/1986 - add filehandle enabling switch */
37 /* 2.06 08/07/1986 - add new routine "realopen" */
38 /* 2.07 02/13/1987 - add "cm_trace_cmd_flg". */
39 /*********************************************************************/
41 /*************************************
43 * external function declaration *
45 *************************************/
47 extern unsigned comgetarg (
48 unsigned *, /* number of arguments */
49 char **, /* pointer array of original arguments */
50 char **, /* pointer of argument unit character */
52 unsigned, /* depth of new argument pointer array */
53 char *, /* broken down argument character buffer */
54 unsigned, /* size of argument character buffer */
55 char *, /* current defualt drive name */
56 char *); /* switching character */
58 * print a message and get a response
60 extern unsigned computmsg (
61 char **, /* table of variables to insert */
62 unsigned, /* number of variables to insert */
63 unsigned, /* message id */
64 char *, /* message file name */
65 unsigned, /* output device type */
66 unsigned, /* response type */
67 char *, /* response data area */
68 unsigned); /* size of response data area */
70 * verify correct DOS version
72 extern unsigned comcheckdosver();
75 * return code conversion to message id
77 extern unsigned rctomid(
78 unsigned); /* return code to converted to msg id */
81 * open drive in real mode
83 extern unsigned far pascal REALOPEN(
84 char far *, /* pointer to drive name */
85 unsigned far *, /* pointer to drive handle */
86 unsigned); /* open mode */
88 /*****************************************/
90 /* DBCS common subroutine */
92 /*****************************************/
94 * search the first substring occurrence in a string
98 unsigned char *, /* source string */
99 unsigned char *); /* target string */
102 * search the last charater occurrence in a string
106 unsigned char *, /* source string */
107 unsigned char ); /* target string */
110 * compare two strings with regard to case
114 unsigned char *, /* source string */
115 unsigned char *); /* string to be compared */
118 * convert a string to uppercase
122 unsigned char *); /* string to be converted */
125 * convert a string to lowercase
129 unsigned char *); /* string to be converted */
132 * search the first occurrence of a character in a string
134 extern char *com_strchr(
135 unsigned char *, /* a source string */
136 unsigned char ); /* a character to be searched */
139 * convert character to uppercase
141 extern int com_toupper(
142 unsigned char ); /* character to be converted to uppercase */
145 * convert character to lowercase
147 extern int com_tolower(
148 unsigned char ); /* character to be converted to lowercase */
150 /*************************************
152 * external variable declaration *
154 *************************************/
155 extern unsigned cm_invalid_parm_pointer; /* points to first detected */
156 /* invalid argument string */
158 extern char cm_flhandle_enable_sw; /* enable filehandle input for */
159 /* computmsg routine */
161 /* if this switch is on (non-zero), */
162 /* filehandle can be set in devicetype.*/
164 extern char cm_trace_cmd_flg; /* ignore drive validity check. */
165 /* if it set to 1, COMGETARG does */
166 /* not check drive validity. */