~ubuntu-branches/ubuntu/lucid/tidy/lucid

« back to all changes in this revision

Viewing changes to src/tmbstr.h

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080120214603-poklofici9og61tx
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
/* tmbstr.h - Tidy string utility functions
5
5
 
6
 
  (c) 1998-2004 (W3C) MIT, ERCIM, Keio University
 
6
  (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
7
7
  See tidy.h for the copyright notice.
8
8
 
9
9
  CVS Info :
10
10
 
11
11
    $Author: arnaud02 $ 
12
 
    $Date: 2004/12/06 15:05:29 $ 
13
 
    $Revision: 1.8 $ 
 
12
    $Date: 2006/12/29 16:31:09 $ 
 
13
    $Revision: 1.11 $ 
14
14
 
15
15
*/
16
16
 
21
21
{
22
22
#endif
23
23
 
24
 
/* like strdup but using MemAlloc */
25
 
tmbstr tmbstrdup( ctmbstr str );
 
24
/* like strdup but using an allocator */
 
25
tmbstr TY_(tmbstrdup)( TidyAllocator *allocator, ctmbstr str );
26
26
 
27
 
/* like strndup but using MemAlloc */
28
 
tmbstr tmbstrndup( ctmbstr str, uint len);
 
27
/* like strndup but using an allocator */
 
28
tmbstr TY_(tmbstrndup)( TidyAllocator *allocator, ctmbstr str, uint len);
29
29
 
30
30
/* exactly same as strncpy */
31
 
uint tmbstrncpy( tmbstr s1, ctmbstr s2, uint size );
32
 
 
33
 
uint tmbstrcpy( tmbstr s1, ctmbstr s2 );
34
 
 
35
 
uint tmbstrcat( tmbstr s1, ctmbstr s2 );
 
31
uint TY_(tmbstrncpy)( tmbstr s1, ctmbstr s2, uint size );
 
32
 
 
33
uint TY_(tmbstrcpy)( tmbstr s1, ctmbstr s2 );
 
34
 
 
35
uint TY_(tmbstrcat)( tmbstr s1, ctmbstr s2 );
36
36
 
37
37
/* exactly same as strcmp */
38
 
int tmbstrcmp( ctmbstr s1, ctmbstr s2 );
 
38
int TY_(tmbstrcmp)( ctmbstr s1, ctmbstr s2 );
39
39
 
40
40
/* returns byte count, not char count */
41
 
uint tmbstrlen( ctmbstr str );
 
41
uint TY_(tmbstrlen)( ctmbstr str );
42
42
 
43
43
/*
44
44
  MS C 4.2 doesn't include strcasecmp.
51
51
  we are always comparing to ascii element and
52
52
  attribute names defined by HTML specs.
53
53
*/
54
 
int tmbstrcasecmp( ctmbstr s1, ctmbstr s2 );
55
 
 
56
 
int tmbstrncmp( ctmbstr s1, ctmbstr s2, uint n );
57
 
 
58
 
int tmbstrncasecmp( ctmbstr s1, ctmbstr s2, uint n );
 
54
int TY_(tmbstrcasecmp)( ctmbstr s1, ctmbstr s2 );
 
55
 
 
56
int TY_(tmbstrncmp)( ctmbstr s1, ctmbstr s2, uint n );
 
57
 
 
58
int TY_(tmbstrncasecmp)( ctmbstr s1, ctmbstr s2, uint n );
59
59
 
60
60
/* return offset of cc from beginning of s1,
61
61
** -1 if not found.
62
62
*/
63
 
int tmbstrnchr( ctmbstr s1, uint len1, tmbchar cc );
 
63
/* int TY_(tmbstrnchr)( ctmbstr s1, uint len1, tmbchar cc ); */
64
64
 
65
 
ctmbstr tmbsubstrn( ctmbstr s1, uint len1, ctmbstr s2 );
66
 
ctmbstr tmbsubstrncase( ctmbstr s1, uint len1, ctmbstr s2 );
67
 
ctmbstr tmbsubstr( ctmbstr s1, ctmbstr s2 );
 
65
ctmbstr TY_(tmbsubstrn)( ctmbstr s1, uint len1, ctmbstr s2 );
 
66
/* ctmbstr TY_(tmbsubstrncase)( ctmbstr s1, uint len1, ctmbstr s2 ); */
 
67
ctmbstr TY_(tmbsubstr)( ctmbstr s1, ctmbstr s2 );
68
68
 
69
69
/* transform string to lower case */
70
 
tmbstr tmbstrtolower( tmbstr s );
 
70
tmbstr TY_(tmbstrtolower)( tmbstr s );
71
71
 
72
72
/* Transform ASCII chars in string to upper case */
73
 
tmbstr tmbstrtoupper(tmbstr s);
74
 
 
75
 
Bool tmbsamefile( ctmbstr filename1, ctmbstr filename2 );
76
 
 
77
 
int tmbvsnprintf(tmbstr buffer, size_t count, ctmbstr format, va_list args)
 
73
tmbstr TY_(tmbstrtoupper)( tmbstr s );
 
74
 
 
75
/* Bool TY_(tmbsamefile)( ctmbstr filename1, ctmbstr filename2 ); */
 
76
 
 
77
int TY_(tmbvsnprintf)(tmbstr buffer, size_t count, ctmbstr format, va_list args)
78
78
#ifdef __GNUC__
79
79
__attribute__((format(printf, 3, 0)))
80
80
#endif
81
81
;
82
 
int tmbsnprintf(tmbstr buffer, size_t count, ctmbstr format, ...)
 
82
int TY_(tmbsnprintf)(tmbstr buffer, size_t count, ctmbstr format, ...)
83
83
#ifdef __GNUC__
84
84
__attribute__((format(printf, 3, 4)))
85
85
#endif