Subversion Repositories Kolibri OS

Rev

Rev 2502 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1665 Nasarus 1
 
2
3
 
4
{
5
unsigned i;
6
7
 
8
	 *((char *)mem+i) = (char) c;
9
10
 
11
}
12
13
 
14
 
15
{
16
17
 
18
19
 
20
	*(char *)(dst+i) = *(char *)(src+i);
21
22
 
23
}
24
25
 
26
 
27
{
28
int i;
29
for (i=0;i
30
	{
31
	if (*(unsigned char*)buf1<*(unsigned char*)buf2)
32
		return -1;
33
	if (*(unsigned char*)buf1>*(unsigned char*)buf2)
34
		return 1;
35
	}
36
return 0;
37
}
38
39
 
40
{
41
42
 
43
44
 
45
while (strDest[i] != '\0')
46
	i++;
47
48
 
49
             ;
50
}
51
52
 
53
 
54
{
55
56
 
57
{
58
if (*string1<*string2)
59
	return -1;
60
if (*string1>*string2)
61
	return 1;
62
63
 
64
	return 0;
65
66
 
67
string2++;
68
}
69
70
 
71
72
 
73
 
74
{
75
unsigned i;
76
77
 
78
while ((strDest[i] = strSource[i]) != '\0')
79
	i++;
80
81
 
82
83
 
84
 
85
{
86
unsigned i;
87
88
 
89
	return strDest;
90
91
 
92
while ((strDest[i] = strSource[i]) != '\0')
93
	if ( (n-1) == i )
94
		break;
95
	else
96
		i++;
97
98
 
99
}
100
101
 
102
 
103
{
104
int i;
105
106
 
107
while (*string++) i++;
108
return i;
109
}
110
111
 
112
 
113
 
114
{
115
	while (*string)
116
	{
117
		if (*string==c)
118
			return (char*)string;
119
		string++;
120
	}
121
	return (char*)0;
122
}
123
124
 
2502 Albom 125
 
126
 
127
{
128
int a, b, c, d;
129
a = (i - i%1000)/1000;
130
b = (i - i%100)/100 - a*10;
131
c = (i - i%10)/10 - a*100 - b*10;
132
d = i%10;
133
s[0] = a + '0';
134
s[1] = b + '0';
135
s[2] = c + '0';
136
s[3] = d + '0';
137
s[4] = 0;
138
}
139
140
 
2735 Albom 141
 
142
 void reverse(char s[])
143
 {
144
     int i, j;
145
     char c;
146
147
 
148
         c = s[i];
149
         s[i] = s[j];
150
         s[j] = c;
151
     }
152
 }
153
154
 
155
 
156
 void itoa(int n, char s[])
157
 {
158
     int i, sign;
159
160
 
161
         n = -n;          /* делаем n положительным числом */
162
     i = 0;
163
     do {       /* генерируем цифры в обратном порядке */
164
         s[i++] = n % 10 + '0';   /* берем следующую цифру */
165
     } while ((n /= 10) > 0);     /* удаляем */
166
     if (sign < 0)
167
         s[i++] = '-';
168
     s[i] = '\0';
169
     reverse(s);
170
 }
171
>
172