forked from deltaphc/raylib-rs
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathfind_unimplemented.py
More file actions
86 lines (77 loc) · 2.01 KB
/
find_unimplemented.py
File metadata and controls
86 lines (77 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import os
# Functions we won't implement.
wont_impl = [
# We have this implemented in a C file so it's not caught.
"SetTraceLogCallback",
# UTF-8 functions
"GetCodepointNext",
"GetCodepointPrevious",
"CodepointToUTF8",
"LoadUTF8",
"UnloadUTF8",
# Text functions
"TextCopy",
"TextIsEqual",
"TextLength",
"TextFormat",
"TextSubtext",
"TextReplace",
"TextInsert",
"TextJoin",
"TextSplit",
"TextAppend",
"TextFindIndex",
"TextToUpper",
"TextToLower",
"TextToPascal",
"TextToSnake",
"TextToCamel",
"TextToInteger",
"TextToFloat",
# file functions
"LoadFileData",
"UnloadFileData",
"SaveFileData",
"LoadFileText",
"UnloadFileText",
"SaveFileText",
"FileExists",
"DirectoryExists",
"GetFileExtension",
"GetFileName",
"GetFileNameWithoutExt",
"GetDirectoryPath",
"GetPrevDirectoryPath",
"GetWorkingDirectory",
"MakeDirectory",
"ChangeDirectory",
"IsFileNameValid",
"GetFileModTime",
"ComputeCRC32",
"ComputeMD5",
"ComputeSHA1",
# Misc functions that aren't needed.
"MemRealloc",
]
def file_find(lib, src, dest, opener):
print("=====",lib,"=====")
files = os.scandir(dest)
src_files = []
for file in files:
if file.is_file(follow_symlinks=True):
f = open(file.path)
src_files.append("\n".join(f.readlines()))
d = open(src)
lines = list(filter(lambda f: f.startswith(opener),d.readlines()))
for line in lines:
func_name = list(filter(lambda f: "(" in f, line.split(" ")))[0].split("(")[0].replace("*","")
in_a_file = False
for file in src_files:
if func_name in wont_impl or "ffi::"+func_name in file:
in_a_file = True
break
if not in_a_file:
print("- [ ] "+func_name)
print("")
file_find("Raylib","./raylib-sys/raylib/src/raylib.h", "./raylib/src/core/", "RLAPI")
file_find("Raygui","./raylib-sys/binding/raygui.h","./raylib/src/rgui", " RAYGUIAPI")