File: ding.h

package info (click to toggle)
mcl 1%3A14-137-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 10,704 kB
  • ctags: 5,125
  • sloc: ansic: 53,217; sh: 4,448; perl: 3,967; makefile: 422
file content (104 lines) | stat: -rw-r--r-- 1,864 bytes parent folder | download | duplicates (5)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*   (C) Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Stijn van Dongen
 *   (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011  Stijn van Dongen
 *
 * This file is part of tingea.  You can redistribute and/or modify tingea
 * under the terms of the GNU General Public License; either version 3 of the
 * License or (at your option) any later version.  You should have received a
 * copy of the GPL along with tingea, in the file COPYING.
*/

#ifndef tingea_ding
#define tingea_ding

#include <string.h>
#include "types.h"
#include "ting.h"


char* mcxStrDup
(  const char* str
)  ;

char* mcxStrNDup
(  const char* str
,  dim n
)  ;

mcxstatus mcxStrTol
(  const char* s
,  long*    value
,  char**   end
)  ;

mcxstatus mcxStrToul
(  const char* s
,  ulong*   value
,  char**   end
)  ;


/*
 * if len < 0, strlen(p) is used.
*/

dim mcxStrCountChar
(  const char*    p
,  char           c
,  ofs            len         /* -1 for don't know */
)  ;

char* mcxStrChrIs
(  const char*    src
,  int          (*fbool)(int c)
,  ofs            len         /* -1 for don't know */
)  ;

char* mcxStrChrAint
(  const char*    src
,  int          (*fbool)(int c)
,  ofs            len         /* -1 for don't know */
)  ;

char* mcxStrRChrIs
(  const char*    src
,  int          (*fbool)(int c)
,  ofs            offset         /* -1 for don't know */
)  ;

char* mcxStrRChrAint
(  const char*    src
,  int          (*fbool)(int c)
,  ofs            offset         /* -1 for don't know */
)  ;


#define MCX_MEMPRINT_REVERSE  1
#define MCX_MEMPRINT_NOSPACE  2


/* Strides in char units, treats/truncates each unit
 * as/to an 8-bit entity.
*/

mcxTing* mcxMemPrint
(  mcxTing* ting
,  void*    p
,  dim      n_bytes
,  mcxbits  flags
)  ;


int mcxEditDistance
(  const char* s1
,  const char* s2
,  int* lcs
)  ;


int mcxSetenv
(  const char* kv
)  ;

#endif