2 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * This file is part of the Manage Applications
5 * Written by Eunmi Son <eunmi.son@samsung.com>
7 * PROPRIETARY/CONFIDENTIAL
9 * This software is the confidential and proprietary information of
10 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
11 * disclose such Confidential Information and shall use it only in
12 * accordance with the terms of the license agreement you entered
13 * into with SAMSUNG ELECTRONICS.
15 * SAMSUNG make no representations or warranties about the suitability
16 * of the software, either express or implied, including but not limited
17 * to the implied warranties of merchantability, fitness for a particular
18 * purpose, or non-infringement. SAMSUNG shall not be liable for any
19 * damages suffered by licensee as a result of using, modifying or
20 * distributing this software or its derivatives.
25 #include "mgr-app-common-util.h"
26 #include "mgr-app-common-debug.h"
29 char *_strncpy(char *dest, const char *src, int len, char *file, int line)
31 if (dest == NULL || src == NULL || len <= 0) {
32 MGR_APP_DEBUG_ERR("STRNCPY ERROR at %s(%d)", file, line);
36 strncpy(dest, src, len);
42 char *_strncat(char *dest, const char *src, int dest_size, char *file, int line)
44 if (dest == NULL || src == NULL || dest_size <= 0) {
45 MGR_APP_DEBUG_ERR("STRNCAT ERROR at %s(%d)", file, line);
49 return strncat(dest, src, dest_size);
52 int _strncmp(const char *src1, const char *src2, int len, char *file, int line)
54 if (src1 == NULL || src2 == NULL || len <= 0) {
55 MGR_APP_DEBUG_ERR("STRNCMP ERROR at %s(%d)", file, line);
59 return strncmp(src1, src2, len);