2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #define PRIVATE static
13 #define MACRO_BEGIN do {
14 #define MACRO_END } while (0)
17 typedef enum { FALSE, TRUE } boolean_t;
19 /* no. tests per file */
20 #define TESTS_PER_FILE 50
22 /* no: of elems in dir array */
25 /* no: of elems in typ array */
28 /* max strlength among the lems fo the dir array */
31 /* max string length among th lems of the typ array */
32 #define MAX_TYP_STR 16
34 /* arrays size to be generated in the idl and itl files */
35 #define IDL_STR_MAX 1000
36 #define IDL_FIX_ARRAY_SIZE 15
38 /* length of vary/conf attrib , eg" length */
43 char direction[MAX_DIR_STR];
44 char type[MAX_TYP_STR];
46 char attrib[ATTRIB_NO][ATTRIB_LEN];
52 unsigned int instringlen;
53 char *inValue[IDL_FIX_ARRAY_SIZE]; /* value passed via RPC */
54 char *inValue2[IDL_FIX_ARRAY_SIZE];
55 char *outValue[IDL_FIX_ARRAY_SIZE]; /* value returned via RPC */
56 char *outValue2[IDL_FIX_ARRAY_SIZE];
57 int vc_low, vc_high, vc_max; /* array bounds ([in] value) */
58 int ovc_low, ovc_high; /* array bounds ([out] value) */
66 #define MEM_CHK(x, y) if(!x) {fprintf(stderr, y); exit(1);}
68 #define FATAL( y ) {fprintf(stderr, y); exit(1);}
70 /* for vary/conf array for testing pusrposes we will assume a
71 high index of at least 5, so IDL_FIX_ARRAY_SIZE should never be
72 smaller than MIN_HIGH */
75 /* max length of server name string -- file names <= 8 Chars, append Mgr,
76 and so limit server name to 5 chars */
77 #define MAX_SERV_NAME 5
79 #define PrintShortUsage \
82 "Usage: generator [-h] [-l] [-f] <inputFileName> [-s] <serverName> \
83 -o <output dir> [-p] <platform> \n"); \
86 #define PrintLongUsage \
90 "\nCommand line options(case insensitive):\
91 \n\t-h = help message \
92 \n\t-l = use lwps as the thread model instead of pthreads \
93 \n\t-f = set the input table file \
94 \n\t-s = set the server name (truncates to 5 chars) \
95 \n\t-o = set output directory \
96 \n\t-p = set target platform (NT or UNIX - defaults to NT) \
100 /* max no: of args 999 */
101 #define MAX_DIGITS_IN_ARGS 3
103 #define MAX_RAND_LENGTH 50
105 #define MAX_INDEX_DIGITS 10
107 /* size of rpc signature buffer */
108 #define SIGN_SIZE 10000
110 #define SkipWhiteSpaces(p) \
112 while (isspace(*(p))) \
116 /* limits for random generation */
119 #define MIN_FLT 0.00000000
120 #define MAX_FLT 1.00000000
121 #define MIN_DBL 0.0000000000000000
122 #define MAX_DBL 1.0000000000000000