File: Strn.h

package info (click to toggle)
ncftp 1%3A3.0beta21-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,004 kB
  • ctags: 2,472
  • sloc: ansic: 30,346; makefile: 638; cpp: 595; sh: 392
file content (49 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download
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
45
46
47
48
49
/* Strn.h */

#ifndef _Strn_h_
#define _Strn_h_ 1

/* You should define this from the Makefile. */
#ifndef STRN_ZERO_PAD
#	define STRN_ZERO_PAD 1
#endif

/* You should define this from the Makefile. */
#ifndef STRNP_ZERO_PAD
#	define STRNP_ZERO_PAD 0
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* Strncat.c */
char *Strncat(char *const, const char *const, const size_t);

/* Strncpy.c */
char *Strncpy(char *const, const char *const, const size_t);

/* Strnpcat.c */
char *Strnpcat(char *const, const char *const, size_t);

/* Strnpcpy.c */
char *Strnpcpy(char *const, const char *const, size_t);

/* Strntok.c */
char *Strtok(char *, const char *);
int Strntok(char *, size_t, char *, const char *);

/* strtokc.c */
char *strtokc(char *, const char *, char **);
int strntokc(char *, size_t, char *, const char *, char **);

#define STRNCPY(d,s) Strncpy((d), (s), (size_t) sizeof(d))
#define STRNCAT(d,s) Strncat((d), (s), (size_t) sizeof(d))

#ifdef __cplusplus
}
#endif

#endif	/* _Strn_h_ */

/* eof Strn.h */