FreeTDS API
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vargdefs.h
1 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2  * Copyright (C) 2010 Craig A. Berry craigberry@mac.com
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18 
19 /*
20  * Definitions used by the VMSARG parsing and mapping routines.
21  *
22  * Based on VMSARG Version 2.0 by Tom Wade <t.wade@vms.eurokom.ei>
23  *
24  * Extensively revised for inclusion in FreeTDS by Craig A. Berry.
25  *
26  * From the VMSARG 2.0 documentation:
27  *
28  * The product is aimed at . . . people who are porting a package from
29  * Unix to VMS. This software is made freely available for inclusion in
30  * such products, whether they are freeware, public domain or commercial.
31  * No licensing is required.
32  */
33 
34 #if __CRTL_VER >= 70302000 && !defined(__VAX)
35 #define QUAL_LENGTH (4000+1)
36 #define S_LENGTH (4096+1)
37 #else
38 #define QUAL_LENGTH (255+1)
39 #define S_LENGTH (1024+1)
40 #endif
41 
42 #define MAX_ARGS 255
43 
44 /* bit fields for arg flags.
45 */
46 
47 #define VARG_M_AFFIRM 1
48 #define VARG_M_NEGATIVE 2
49 #define VARG_M_KEYWORDS 4
50 #define VARG_M_SEPARATOR 8
51 #define VARG_M_DATE 16
52 #define VARG_M_APPEND 32
53 #define VARG_M_HELP 64
54 
55 /* bit fields for action flags.
56 */
57 
58 #define VARGACT_M_UPPER 1
59 #define VARGACT_M_LOWER 2
60 #define VARGACT_M_SPECIAL 4
61 #define VARGACT_M_ESCAPE 8
62 #define VARGACT_M_DOUBLE 16
63 #define VARGACT_M_IMAGE 32
64 #define VARGACT_M_SYMBOL 64
65 #define VARGACT_M_COMMAND 128
66 #define VARGACT_M_RETURN 256
67 #define VARGACT_M_PROTECT 512
68 #define VARGACT_M_UNIXARG 1024
69 
70 #define VARGACT_M_PROTMASK 1+2+4+8+16