equal
deleted
inserted
replaced
|
1 #include "fmtqfn.h" |
|
2 #include "fmt.h" |
|
3 #include "auto_split.h" |
|
4 |
|
5 unsigned int fmtqfn(s,dirslash,id,flagsplit) |
|
6 char *s; |
|
7 char *dirslash; |
|
8 unsigned long id; |
|
9 int flagsplit; |
|
10 { |
|
11 unsigned int len; |
|
12 unsigned int i; |
|
13 |
|
14 len = 0; |
|
15 i = fmt_str(s,dirslash); len += i; if (s) s += i; |
|
16 if (flagsplit) |
|
17 { |
|
18 i = fmt_ulong(s,id % auto_split); len += i; if (s) s += i; |
|
19 i = fmt_str(s,"/"); len += i; if (s) s += i; |
|
20 } |
|
21 i = fmt_ulong(s,id); len += i; if (s) s += i; |
|
22 if (s) *s++ = 0; ++len; |
|
23 return len; |
|
24 } |