Subversion Repositories IRC-Archiver

Rev

Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 11
Line 1... Line 1...
1
/* $Id: util.c 3 2024-08-29 18:49:46Z nishi $ */
1
/* $Id: util.c 11 2024-08-30 05:20:32Z nishi $ */
2
 
2
 
3
#include "ia_util.h"
3
#include "ia_util.h"
4
 
4
 
5
#include <stdlib.h>
5
#include <stdlib.h>
6
#include <string.h>
6
#include <string.h>
Line 11... Line 11...
11
	memcpy(str + strlen(a), b, strlen(b));
11
	memcpy(str + strlen(a), b, strlen(b));
12
	str[strlen(a) + strlen(b)] = 0;
12
	str[strlen(a) + strlen(b)] = 0;
13
	return str;
13
	return str;
14
}
14
}
15
 
15
 
-
 
16
char* ia_strcat3(const char* a, const char* b, const char* c) {
-
 
17
	char* tmp = ia_strcat(a, b);
-
 
18
	char* str = ia_strcat(tmp, c);
-
 
19
	free(tmp);
-
 
20
	return str;
-
 
21
}
-
 
22
 
-
 
23
char* ia_strcat4(const char* a, const char* b, const char* c, const char* d) {
-
 
24
	char* tmp = ia_strcat3(a, b, c);
-
 
25
	char* str = ia_strcat(tmp, d);
-
 
26
	free(tmp);
-
 
27
	return str;
-
 
28
}
-
 
29
 
16
char* ia_strdup(const char* str) { return ia_strcat(str, ""); }
30
char* ia_strdup(const char* str) { return ia_strcat(str, ""); }