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 2 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, write to the Free Software 25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 */ 27 28 #ifndef _PSTRING 29 #define _PSTRING 30 31 #define PSTRING_LEN 1024 32 #define FSTRING_LEN 256 33 34 typedef char pstring[PSTRING_LEN]; 35 typedef char fstring[FSTRING_LEN]; 36 37 #define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1) 38 #define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1) 39 #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1) 40 #define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1) 41 42 #endif 43