blob: a2bae3f9cd318213086e326d5bbc769f857c42d4 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/*
2 * common.h
3 *
4 * Include routins to implemate common function.
5 * head file.
6 *
7 * Copyright (C) knightray@gmail.com
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11#ifndef _COMMON_H
12#define _COMMON_H
13
14#include "comdef.h"
15#include "pubstruct.h"
16
17uint32
18clus2sec(
19 IN tffs_t * ptffs,
20 IN uint32 clus
21);
22
23uint32
24tokenize(
25 IN byte * string,
26 IN byte sep,
27 OUT byte * tokens[]
28);
29
30uint32
31copy_from_unicode(
32 IN uint16 * psrc,
33 IN uint32 len,
34 OUT byte * pdst
35);
36
37uint32
38copy_to_unicode(
39 IN ubyte * psrc,
40 IN uint32 len,
41 OUT uint16 * pdst
42);
43
44byte *
45dup_string(
46 IN byte * pstr
47);
48
49void
50trip_blanks(
51 IN byte * pstr
52);
53
54BOOL
55divide_path(
56 IN byte * file_path,
57 OUT byte * pfname
58);
59
60
61#endif