blob: acde626b0d43a93fa9ed2de8cb96e2f2e97eef14 [file] [log] [blame]
Tim Duesterhusc1af0ba2021-09-15 13:58:43 +02001@@
2struct ist i;
3expression p, l;
4@@
5
Tim Duesterhus99f47372022-03-15 13:11:05 +01006(
Tim Duesterhus14abfb62022-03-15 13:11:07 +01007- i.ptr = p;
8- i.len = strlen(i.ptr);
9+ i = ist(p);
Tim Duesterhus99f47372022-03-15 13:11:05 +010010|
Tim Duesterhusc1af0ba2021-09-15 13:58:43 +020011- i.ptr = p;
12- i.len = l;
13+ i = ist2(p, l);
Tim Duesterhus99f47372022-03-15 13:11:05 +010014)
Tim Duesterhusc1af0ba2021-09-15 13:58:43 +020015
16@@
17@@
18
19- ist2(NULL, 0)
20+ IST_NULL
21
22@@
23struct ist i;
24expression e;
25@@
26
27- i.ptr += e;
28- i.len -= e;
29+ i = istadv(i, e);
30
31@@
32struct ist i;
33@@
34
Tim Duesterhusef00c532021-11-04 22:35:43 +010035- i = istadv(i, 1);
36+ i = istnext(i);
37
38@@
39struct ist i;
Tim Duesterhusef00c532021-11-04 22:35:43 +010040@@
41
42- i.ptr++;
43- i.len--;
44+ i = istnext(i);
45
46@@
47struct ist i;
48@@
49
Tim Duesterhus958f5042021-11-06 15:14:43 +010050- (\(i.ptr\|istptr(i)\) + \(i.len\|istlen(i)\))
51+ istend(i)
52
53@@
54struct ist i;
Tim Duesterhus9b80a6c2021-11-08 09:05:00 +010055expression e;
56@@
57
58- if (\(i.len\|istlen(i)\) > e) { i.len = e; }
59+ i = isttrim(i, e);
60
61@@
62struct ist i;
Tim Duesterhus755d2412021-11-08 09:05:02 +010063struct buffer *b;
64@@
65
66- chunk_memcat(b, \(i.ptr\|istptr(i)\) , \(i.len\|istlen(i)\));
67+ chunk_istcat(b, i);
68
69@@
70struct ist i;
Tim Duesterhus958f5042021-11-06 15:14:43 +010071@@
72
Tim Duesterhusc1af0ba2021-09-15 13:58:43 +020073- i.ptr != NULL
74+ isttest(i)
75
76@@
77char *s;
78@@
79
80(
81- ist2(s, strlen(s))
82+ ist(s)
83|
84- ist2(strdup(s), strlen(s))
85+ ist(strdup(s))
86)