git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7039 a1c6a512-1295-4272-9138-f99709370657
17 lines
303 B
C
17 lines
303 B
C
#include "unique.h"
|
|
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
char *create_unique_name(char *buffer, const char *prefix, const char *suffix, int digits) {
|
|
static unsigned long i=0;
|
|
|
|
strcpy(buffer, prefix);
|
|
sprintf(buffer+strlen(prefix), "%05lu", i);
|
|
strcat(buffer, suffix);
|
|
|
|
i++;
|
|
|
|
return buffer;
|
|
}
|