r23792: convert Samba4 to GPLv3
[gd/samba-autobuild/.git] / source4 / include / pstring.h
1 /* 
2    samba -- Unix SMB/CIFS implementation.
3
4    ugly string types from Samba3. Will be removed 
5    with glee when we finally don't use them.
6    
7    Copyright (C) Andrew Tridgell              1992-2000
8    Copyright (C) John H Terpstra              1996-2000
9    Copyright (C) Luke Kenneth Casson Leighton 1996-2000
10    Copyright (C) Paul Ashton                  1998-2000
11    Copyright (C) Martin Pool                  2002
12    
13    This program is free software; you can redistribute it and/or modify
14    it under the terms of the GNU General Public License as published by
15    the Free Software Foundation; either version 3 of the License, or
16    (at your option) any later version.
17    
18    This program is distributed in the hope that it will be useful,
19    but WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21    GNU General Public License for more details.
22    
23    You should have received a copy of the GNU General Public License
24    along with this program.  If not, see <http://www.gnu.org/licenses/>.
25 */
26
27 #ifndef _PSTRING
28 #define _PSTRING
29
30 #define PSTRING_LEN 1024
31 #define FSTRING_LEN 256
32
33 typedef char pstring[PSTRING_LEN];
34 typedef char fstring[FSTRING_LEN];
35
36 #define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1)
37 #define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1)
38 #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
39 #define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
40
41 #endif