File: string_util.h

package info (click to toggle)
qpopper 4.0.5-4sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,732 kB
  • ctags: 1,940
  • sloc: ansic: 21,790; makefile: 459; sh: 272; perl: 52
file content (44 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (c) 2003 QUALCOMM Incorporated.  All rights reserved.
 * The file License.txt specifies the terms for use, modification,
 * and redistribution.
 *
 * Revisions:
 *
 *     06/28/00  [rcg]
 *              - File added.
 *
 */
 
 
 /************************************************************
  *                string handling utilities                 *
  ************************************************************/



/*
 * strlcpy and strlcat based on interface described in the paper
 * "strlcpy and strlcat -- consistent, safe, string copy and
 * concatenation" by Todd C. Miller and Theo de Raadt, University
 * of Colorado, Boulder, and OpenBSD project, 1998.
 */

#ifndef _STRING_UTIL_H
#  define _STRING_UTIL_H


#include <sys/types.h>
#include <string.h>

#include "utils.h"



size_t strlcpy(char *strdest, const char *strsource, size_t bufsize);
size_t strlcat(char *strdest, const char *strsource, size_t bufsize);
BOOL   equal_strings(char *str1, long len1, char *str2, long len2);
char  *string_copy (const char *str, size_t len);


#endif /* STRING_UTIL_H */