Rev 1005 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1005 | barsuk | 1 | |
2 | |||
3 | |||
1764 | clevermous | 4 | void* memset(void *mem, int c, unsigned size) |
1005 | barsuk | 5 | { |
6 | unsigned i; |
||
7 | |||
8 | |||
9 | *((char *)mem+i) = (char) c; |
||
10 | |||
11 | |||
12 | } |
||
13 | |||
14 | |||
15 | |||
16 | { |
||
17 | |||
18 | |||
19 | |||
20 | |||
21 | *((char *)dst+i) = *((char *)src+i); |
||
22 | |||
23 | |||
24 | } |
||
25 | |||
26 | |||
27 | |||
28 | { |
||
29 | |||
30 | |||
31 | |||
32 | |||
33 | while (strDest[i] != '\0') |
||
34 | i++; |
||
35 | |||
36 | |||
37 | ; |
||
38 | } |
||
39 | |||
40 | |||
41 | |||
42 | { |
||
43 | |||
44 | |||
45 | { |
||
46 | if (*string1<*string2) |
||
47 | return -1; |
||
48 | if (*string1>*string2) |
||
49 | return 1; |
||
50 | |||
51 | |||
52 | return 0; |
||
53 | |||
54 | |||
55 | string2++; |
||
56 | } |
||
57 | |||
58 | |||
59 | |||
60 | |||
61 | |||
62 | { |
||
63 | unsigned i; |
||
64 | |||
65 | |||
66 | while ((strDest[i] = strSource[i]) != '\0') |
||
67 | i++; |
||
68 | |||
69 | |||
70 | |||
71 | |||
72 | |||
73 | { |
||
74 | unsigned i; |
||
75 | |||
76 | |||
77 | return strDest; |
||
78 | |||
79 | |||
80 | while ((strDest[i] = strSource[i]) != '\0') |
||
81 | if ( (n-1) == i ) |
||
82 | break; |
||
83 | else |
||
84 | i++; |
||
85 | |||
86 | |||
87 | } |
||
88 | |||
89 | |||
90 | |||
91 | { |
||
92 | int i; |
||
93 | |||
94 | |||
95 | while (*string++) i++; |
||
96 | return i; |
||
97 | } |
||
98 | |||
99 | |||
100 | |||
101 | |||
102 | { |
||
103 | while (*string) |
||
104 | { |
||
105 | if (*string==c) |
||
106 | return (char*)string; |
||
107 | string++; |
||
108 | } |
||
109 | return (char*)0; |
||
110 | } |
||
111 | |||
112 | |||
1764 | clevermous | 113 | >>> |