2 * Copyright (C) 2013-2014 Intel Corporation.
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.
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.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 * José Bollo <jose.bollo@open.eurogiciel.org>
20 * Stéphane Desneux <stephane.desneux@open.eurogiciel.org>
21 * Jean-Benoit Martin <jean-benoit.martin@open.eurogiciel.org>
24 #ifndef TIZEN_PLATFORM_WRAPPER_SCRATCH_H
25 #define TIZEN_PLATFORM_WRAPPER_SCRATCH_H
28 Return a scratch buffer containing the concatenation of the strings of the
29 array 'strings'. If 'ispath' isn't zero (then is "true") the directory
30 separator is inserted between the strings. The last item of 'strings' must
31 be NULL to indicate the end.
33 The returned value is a scratch buffer (unique for the thread) that is
34 available until the next call.
36 Can return NULL in case of internal error (memory depletion).
40 char *array[] = { "hello", " ", "world", "!", NULL };
42 scratchcat( 0, array) will return "hello world!"
44 scratchcat( 1, array) will return "hello/ /world/!"
46 const char *scratchcat( int ispath, const char **strings);