selftest: use a separate var for printing out sub parts of lines with \r
[Samba/ekacnet.git] / source4 / param / loadparm.h
blobcd3c0b9595d0fc423695ccbc1ae084321a44a082
1 /*
2 Unix SMB/CIFS implementation.
4 type definitions for loadparm
6 Copyright (C) Karl Auer 1993-1998
8 Largely re-written by Andrew Tridgell, September 1994
10 Copyright (C) Simo Sorce 2001
11 Copyright (C) Alexander Bokovoy 2002
12 Copyright (C) Stefan (metze) Metzmacher 2002
13 Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2003.
14 Copyright (C) James Myers 2003 <myersjj@samba.org>
16 This program is free software; you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation; either version 3 of the License, or
19 (at your option) any later version.
21 This program is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
26 You should have received a copy of the GNU General Public License
27 along with this program. If not, see <http://www.gnu.org/licenses/>.
30 /* the following are used by loadparm for option lists */
31 typedef enum {
32 P_BOOL,P_INTEGER,P_OCTAL,P_BYTES,P_LIST,P_STRING,P_USTRING,P_ENUM
33 } parm_type;
35 typedef enum {
36 P_LOCAL,P_GLOBAL,P_NONE
37 } parm_class;
39 struct enum_list {
40 int value;
41 const char *name;
44 struct loadparm_context;
46 struct parm_struct {
47 const char *label;
48 parm_type type;
49 parm_class class;
50 int offset;
51 bool (*special)(struct loadparm_context *, const char *, char **);
52 const struct enum_list *enum_list;
53 union {
54 int bvalue;
55 int ivalue;
56 char *svalue;
57 char cvalue;
58 const char **lvalue;
59 } def;
65 #define FLAG_DEFAULT 0x0001 /* this option was a default */
66 #define FLAG_CMDLINE 0x0002 /* this option was set from the command line */
68 #ifndef PRINTERS_NAME
69 #define PRINTERS_NAME "printers"
70 #endif
72 #ifndef HOMES_NAME
73 #define HOMES_NAME "homes"
74 #endif