repo.or.cz
/
kugel-rb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added note about 2.5 being Archos only
[kugel-rb.git]
/
apps
/
tagdb
/
unique.c
blob
471f59e67f89772655e7e22a685ce12da0dad0cd
1
#include
"unique.h"
2
3
#include <string.h>
4
#include <stdio.h>
5
6
char
*
create_unique_name
(
char
*
buffer
,
const char
*
prefix
,
const char
*
suffix
,
int
digits
) {
7
static unsigned long
i
=
0
;
8
9
strcpy
(
buffer
,
prefix
);
10
sprintf
(
buffer
+
strlen
(
prefix
),
"%05lu"
,
i
);
11
strcat
(
buffer
,
suffix
);
12
13
i
++;
14
15
return
buffer
;
16
}