blob: 7a8001f8af0367b29ed4a7d6f1ee0ce244085058 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
char make_local_label(char *global, int global_len, char *local, int local_len) {
char *name;
char *p;
if (!global_len) {
global = last_global;
global_len = strlen(last_global);
}
name = malloc(local_len+global_len+3);
p = name;
*p++ = ' ';
if (global_len) {
memcpy(p, global, global_len);
p += global_len;
}
*p++ = ' ';
memcpy(p, local, local_len);
p[local_len] = '\0';
return name;
}
|