00001 /* 00002 * string.h 00003 * 00004 * Copyright (C) 2003 Bastian Blank <waldi@debian.org> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * $Id: string.h 29603 2005-07-31 16:10:46Z cjwatson $ 00021 */ 00022 00023 #ifndef DEBIAN_INSTALLER__STRING_H 00024 #define DEBIAN_INSTALLER__STRING_H 00025 00026 #include <debian-installer/types.h> 00027 00028 #include <stdio.h> 00029 00030 typedef struct di_rstring di_rstring; 00031 00040 struct di_rstring 00041 { 00042 char *string; 00043 di_ksize_t size; 00044 }; 00045 00054 int di_snprintfcat (char *str, size_t size, const char *format, ...) 00055 #ifdef __GNUC__ 00056 __attribute__ ((format (printf, 3, 4))) 00057 #endif 00058 ; 00059 00067 char *di_stradup (const char *s, size_t n); 00068 00070 #endif