annotate src/dmstring.c @ 1884:47fe47f01fea

Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which returns length of the generated string in int pointer *len.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 25 Jun 2018 13:24:27 +0300
parents e06abfde6c39
children 750a7e125546
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #include "dmlib.h"
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #include <stdarg.h>
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
813
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
4
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
5 /* Returns the filename and path without the last filename extension,
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
6 * E.g. everything before the last '.', if any.
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
7 */
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
8 char *dm_basefilename(const char *filename)
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
9 {
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
10 char *tmp, *fext;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
11
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
12 if (filename == NULL ||
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
13 (tmp = dm_strdup(filename)) == NULL)
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
14 return NULL;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
15
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
16 if ((fext = strrchr(tmp, '.')) != NULL)
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
17 {
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
18 char *fpath = strrchr(tmp, DM_DIR_SEPARATOR);
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
19 if (fpath == NULL || (fpath != NULL && fext > fpath))
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
20 *fext = 0;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
21 }
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
22
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
23 return tmp;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
24 }
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
25
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
26
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
27 /* Replace filename extension based on format pattern.
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
28 * Usage: res = dm_strdup_fext(orig_filename, "foo_%s.cmp");
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
29 */
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
30 char *dm_strdup_fext(const char *filename, const char *fmt)
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
31 {
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
32 char *result, *tmp;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
33
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
34 if ((tmp = dm_basefilename(filename)) == NULL)
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
35 return NULL;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
36
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
37 result = dm_strdup_printf(fmt, tmp);
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
38
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
39 dmFree(tmp);
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
40
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
41 return result;
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
42 }
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
43
b0cd28b6c9f3 Add new utility functions.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
44
817
e574764ae065 Add comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 816
diff changeset
45 /* Check if end of the given string str matches needle
e574764ae065 Add comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 816
diff changeset
46 * case-insensitively, return pointer to start of the match,
e574764ae065 Add comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 816
diff changeset
47 * if found, NULL otherwise.
e574764ae065 Add comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 816
diff changeset
48 */
816
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
49 char *dm_strrcasecmp(char *str, const char *needle)
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
50 {
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
51 if (str == NULL || needle == NULL)
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
52 return NULL;
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
53
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
54 const size_t
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
55 slen = strlen(str),
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
56 nlen = strlen(needle);
1102
e06abfde6c39 Cosmetics pass: Remove excess whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 836
diff changeset
57
816
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
58 if (slen < nlen)
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
59 return NULL;
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
60
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
61 if (strcasecmp(str - nlen - 1, needle) == 0)
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
62 return str - nlen - 1;
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
63 else
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
64 return NULL;
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
65 }
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
66
091461e0213f Add new utility function.
Matti Hamalainen <ccr@tnsp.org>
parents: 813
diff changeset
67
744
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
68 /* Implementation of strdup() with a NULL check
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 */
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 char *dm_strdup(const char *s)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 char *res;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 if (s == NULL)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 return NULL;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 if ((res = dmMalloc(strlen(s) + 1)) == NULL)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 return NULL;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 strcpy(res, s);
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 return res;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 }
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83
744
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
84 /* Implementation of strndup() with NULL check
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
85 */
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
86 char *dm_strndup(const char *s, const size_t n)
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
87 {
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
88 char *res;
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
89 if (s == NULL)
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
90 return NULL;
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
91
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
92 size_t len = strlen(s);
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
93 if (len > n)
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
94 len = n;
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
95
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
96 if ((res = dmMalloc(len + 1)) == NULL)
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
97 return NULL;
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
98
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
99 memcpy(res, s, len);
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
100 res[len] = 0;
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
101
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
102 return res;
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
103 }
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
104
2726d91e3409 Add implementation of dm_strndup().
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
105
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 /* Simulate a sprintf() that allocates memory
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 */
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
108 char *dm_strdup_vprintf_len(const char *fmt, va_list args, int *len)
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 int size = 64;
836
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
111 char *buf, *tmp;
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 if ((buf = dmMalloc(size)) == NULL)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 return NULL;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 while (1)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 va_list ap;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 va_copy(ap, args);
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
120 *len = vsnprintf(buf, size, fmt, ap);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 va_end(ap);
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
123 if (*len > -1 && *len < size)
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 return buf;
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
125 if (*len > -1)
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
126 size = *len + 1;
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 else
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 size *= 2;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129
836
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
130 if ((tmp = dmRealloc(buf, size)) == NULL)
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
131 {
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
132 dmFree(buf);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133 return NULL;
836
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
134 }
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
135 else
85442780089f Fix reallocation.
Matti Hamalainen <ccr@tnsp.org>
parents: 817
diff changeset
136 buf = tmp;
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137 }
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 }
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
141 char *dm_strdup_vprintf(const char *fmt, va_list args)
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
142 {
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
143 int len;
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
144 return dm_strdup_vprintf_len(fmt, args, &len);
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
145 }
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
146
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
147
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
148 char *dm_strdup_printf(const char *fmt, ...)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 {
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
150 int len;
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151 char *res;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152 va_list ap;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 va_start(ap, fmt);
1884
47fe47f01fea Implement dm_strdup_vprintf_len(const char *fmt, va_list args, int *len), which
Matti Hamalainen <ccr@tnsp.org>
parents: 1102
diff changeset
155 res = dm_strdup_vprintf_len(fmt, ap, &len);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 va_end(ap);
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 return res;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159 }