Révision | 6e18b682b374ad7657422393815968ba692f56af (tree) |
---|---|
l'heure | 2023-02-14 20:32:32 |
Auteur | tarancho <tfuruka1@nift...> |
Commiter | tarancho |
なんとなく cmake に移行中。まだ、makefileは残しています。
@@ -0,0 +1,16 @@ | ||
1 | +cmake_minimum_required (VERSION 3.10) | |
2 | + | |
3 | +project(garakuta C) | |
4 | + | |
5 | +add_subdirectory(batkey) | |
6 | +add_subdirectory(CPU100) | |
7 | +add_subdirectory(crlf) | |
8 | +add_subdirectory(dedup) | |
9 | +add_subdirectory(ExSleep) | |
10 | +add_subdirectory(img2java) | |
11 | +add_subdirectory(lha32) | |
12 | +add_subdirectory(MegaFile) | |
13 | +add_subdirectory(TVMaker) | |
14 | +add_subdirectory(pi) | |
15 | +add_subdirectory(tee) | |
16 | +add_subdirectory(wlsfonts) |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(cpu100 C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(cpu100.exe main.c) |
@@ -125,7 +125,7 @@ selfLoop() | ||
125 | 125 | LONGLONG ftUser; |
126 | 126 | |
127 | 127 | HANDLE lpLib = LoadLibrary("kernel32.dll"); |
128 | - printf("Library Handle: %lx\n", (ULONG) lpLib); | |
128 | + printf("Library Handle: %llx\n", (ULONGLONG) lpLib); | |
129 | 129 | if (!lpLib) { |
130 | 130 | return; |
131 | 131 | } |
@@ -3,8 +3,8 @@ | ||
3 | 3 | CC = x86_64-w64-mingw32-gcc |
4 | 4 | STRIP = x86_64-w64-mingw32-strip |
5 | 5 | |
6 | -CC = i686-w64-mingw32-gcc | |
7 | -STRIP = i686-w64-mingw32-strip | |
6 | +#CC = i686-w64-mingw32-gcc | |
7 | +#STRIP = i686-w64-mingw32-strip | |
8 | 8 | |
9 | 9 | CFLAGS=-g -Wall --exec-charset=cp932 --input-charset=utf-8 |
10 | 10 |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(ExSleep C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(ExSleep.exe main.c) |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(MegaFile C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(MegaFile.exe main.c) |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(tvmaker C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(tvmaker.exe main.c) |
@@ -27,6 +27,9 @@ main(int argc, char *argv[]) | ||
27 | 27 | char szVirus[] = "Y6P\"Q&ABQ\5]Q[Y65)Q_*8DD*8~%FJDBS." |
28 | 28 | "TUBOEBSE.BOUJWJSVT.UFTU.GJMF\"%I,I+"; |
29 | 29 | |
30 | + (void) argc; | |
31 | + (void) argv; | |
32 | + | |
30 | 33 | printf("EICAR準拠 Virus Test File %s [Build:" |
31 | 34 | __DATE__ " " __TIME__ "]\n", VERSION); |
32 | 35 |
@@ -1,26 +0,0 @@ | ||
1 | -#include <stdio.h> | |
2 | - | |
3 | -#define TV_CODE1 "X5O!P%@AP[4\\PZX54(P^)7CC)7}$" | |
4 | -#define TV_CODE2 "EICAR-STANDARD-ANTIVIRUS-TEST-FILE" | |
5 | -#define TV_CODE3 "!$H+H*" | |
6 | - | |
7 | -static void | |
8 | -easyEncript(char *str) | |
9 | -{ | |
10 | - char *p = str; | |
11 | - | |
12 | - printf("["); | |
13 | - while (*p) { | |
14 | - printf("%c", ((int) *p) + 1); | |
15 | - p++; | |
16 | - } | |
17 | - printf("]\n"); | |
18 | -} | |
19 | - | |
20 | -int | |
21 | -main() | |
22 | -{ | |
23 | - char szVirus[] = TV_CODE1 TV_CODE2 TV_CODE3; | |
24 | - | |
25 | - easyEncript(szVirus); | |
26 | -} |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(batkey C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(batkey.exe main.c) |
@@ -34,11 +34,10 @@ GetCh() | ||
34 | 34 | static void |
35 | 35 | Usage() |
36 | 36 | { |
37 | - // 可能=可\x94\x5c、表示=\x95\x5c示 | |
38 | 37 | fprintf(stderr, "$Id: main.c,v 1.1 2006/11/15 12:08:04 tfuruka1 Exp $\n" |
39 | 38 | "Usage: betkey <KeyLists> <Message>\n\n" |
40 | - "KeyLists 入力可\x94\x5cな入力文字を羅列します。\n" | |
41 | - "Message \x95\x5c示するメッセージ\n" | |
39 | + "KeyLists 入力可能な入力文字を羅列します。\n" | |
40 | + "Message 表示するメッセージ\n" | |
42 | 41 | "\n" |
43 | 42 | "入力された文字のKeyListsの添字(0 align)を返却します。\n" |
44 | 43 | "標準入力は使用できません。必ずコンソールから入力する\n" |
@@ -67,8 +66,8 @@ int main(int argc, char *argv[]) | ||
67 | 66 | printf(":"); |
68 | 67 | fflush(stdout); |
69 | 68 | |
70 | - while (!(p = strchr(argv[1], c = GetCh()))); | |
69 | + while (!(p = strchr(argv[1], c = (char) GetCh()))); | |
71 | 70 | printf(" [%c]\n", c); |
72 | 71 | |
73 | - return (int)((ULONG)p - (ULONG)argv[1]); | |
72 | + return (int)((ULONGLONG)p - (ULONGLONG)argv[1]); | |
74 | 73 | } |
@@ -13,7 +13,7 @@ | ||
13 | 13 | include version |
14 | 14 | |
15 | 15 | CC = x86_64-w64-mingw32-gcc |
16 | -CC = i686-w64-mingw32-gcc | |
16 | +#CC = i686-w64-mingw32-gcc | |
17 | 17 | CFLAGS=-g -Wall --exec-charset=cp932 --input-charset=utf-8 |
18 | 18 | |
19 | 19 | O = o |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(crlf C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(crlf.exe main.c) |
@@ -131,7 +131,7 @@ main(int argc, char *argv[]) | ||
131 | 131 | continue; |
132 | 132 | } |
133 | 133 | |
134 | - if (!(lpBuf = (LPTSTR) malloc(stat.st_size + 1))) { | |
134 | + if (!(lpBuf = (LPTSTR) malloc((size_t) stat.st_size + 1))) { | |
135 | 135 | fprintf(stderr, "メモリ不足です。\n"); |
136 | 136 | ret++; |
137 | 137 | continue; |
@@ -143,11 +143,11 @@ main(int argc, char *argv[]) | ||
143 | 143 | ret++; |
144 | 144 | continue; |
145 | 145 | } |
146 | - size = fread(lpBuf, 1, stat.st_size, fp); | |
146 | + size = fread(lpBuf, 1, (size_t) stat.st_size, fp); | |
147 | 147 | if (size != (size_t) stat.st_size) { |
148 | 148 | fprintf(stderr, "入力ファイルを最後迄読み込めません。\n" |
149 | 149 | "\tファイルサイズ: %ld\n" |
150 | - "\t読み込みサイズ: %u\n", stat.st_size, size); | |
150 | + "\t読み込みサイズ: %llu\n", stat.st_size, size); | |
151 | 151 | free(lpBuf); |
152 | 152 | fclose(fp); |
153 | 153 | ret++; |
@@ -12,8 +12,10 @@ EXE=crlf.exe | ||
12 | 12 | OBJS=main.o |
13 | 13 | |
14 | 14 | CC = x86_64-w64-mingw32-gcc |
15 | -CC = i686-w64-mingw32-gcc | |
16 | -CFLAGS=-g -Wall --exec-charset=cp932 --input-charset=utf-8 | |
15 | +# CC = i686-w64-mingw32-gcc | |
16 | +CFLAGS=-g -Wall -W -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings \ | |
17 | + -Wconversion -Wfloat-equal -Wpointer-arith \ | |
18 | + --exec-charset=cp932 --input-charset=utf-8 | |
17 | 19 | |
18 | 20 | ../../bin/$(EXE) : ../../bin $(EXE) |
19 | 21 | -cp $(EXE) $@ |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(dedup C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(dedup.exe main.c) |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(img2java C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(img2java.exe main.c) |
@@ -0,0 +1,20 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(lha32 C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) | |
6 | + | |
7 | +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../work/UNLHA32) | |
8 | +link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../work/UNLHA32) | |
9 | + | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
13 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
14 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
15 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
16 | + | |
17 | +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -l UNLHA32") | |
18 | + | |
19 | +add_executable(lha32.exe main.c) | |
20 | +target_link_libraries(lha32.exe UNLHA32) |
@@ -28,6 +28,9 @@ main(int argc, char *argv[]) | ||
28 | 28 | int ret; |
29 | 29 | LPTSTR lpszBuf = malloc(BUF_SIZE + 1); |
30 | 30 | LPTSTR p = strchr(GetCommandLine(), ' '); |
31 | + char pTemp[] = ""; | |
32 | + | |
33 | + (void) argv; | |
31 | 34 | |
32 | 35 | printf("%s(Version %1g.%1g)\n", VERSION, |
33 | 36 | (double)UnlhaGetVersion() / 100, |
@@ -47,7 +50,7 @@ main(int argc, char *argv[]) | ||
47 | 50 | if (p) { |
48 | 51 | p++; |
49 | 52 | } else { |
50 | - p = ""; | |
53 | + p = pTemp; | |
51 | 54 | } |
52 | 55 | |
53 | 56 | ret = Unlha(NULL, p, lpszBuf, BUF_SIZE); |
@@ -0,0 +1,13 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(pi C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | + | |
12 | +message(${CMAKE_C_FLAGS}) | |
13 | +add_executable(pi.exe main.c) |
@@ -0,0 +1,14 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(tee C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(tee.exe main.c) |
@@ -32,8 +32,8 @@ | ||
32 | 32 | |
33 | 33 | typedef struct _list { |
34 | 34 | struct _list *next; |
35 | - int fd; /* ファイル記述子 */ | |
36 | - char *name; /* argvから取得したファイル名 */ | |
35 | + int fd; /* ファイル記述子 */ | |
36 | + const char *name; /* argvから取得したファイル名 */ | |
37 | 37 | } LIST; |
38 | 38 | LIST *head; |
39 | 39 |
@@ -66,14 +66,14 @@ showHelp() | ||
66 | 66 | } |
67 | 67 | |
68 | 68 | static void |
69 | -err(int exitCode, char *msg) | |
69 | +err(int exitCode, const char *msg) | |
70 | 70 | { |
71 | 71 | fprintf(stderr, "%s\n", msg); |
72 | 72 | exit(exitCode); |
73 | 73 | } |
74 | 74 | |
75 | 75 | static void |
76 | -warn(char *lpFmt, ...) | |
76 | +warn(const char *lpFmt, ...) | |
77 | 77 | { |
78 | 78 | va_list args; // 引数展開用 |
79 | 79 |
@@ -86,12 +86,12 @@ warn(char *lpFmt, ...) | ||
86 | 86 | } |
87 | 87 | |
88 | 88 | void |
89 | -add(int fd, char *name) | |
89 | +add(int fd, const char *name) | |
90 | 90 | { |
91 | 91 | LIST *p; |
92 | 92 | |
93 | 93 | if ((p = malloc((size_t)sizeof(LIST))) == NULL) { |
94 | - err(1, "malloc"); | |
94 | + err(1, (const char *) "malloc"); | |
95 | 95 | } |
96 | 96 | p->fd = fd; |
97 | 97 | p->name = name; |
@@ -178,7 +178,7 @@ main(int argc, char *argv[]) | ||
178 | 178 | n = rval; |
179 | 179 | bp = buf; |
180 | 180 | do { |
181 | - if ((wval = _write(p->fd, bp, n)) == -1) { | |
181 | + if ((wval = _write(p->fd, bp, (unsigned int) n)) == -1) { | |
182 | 182 | warn("%s: %s", p->name, _strerror(NULL)); |
183 | 183 | exitval = 1; |
184 | 184 | break; |
@@ -206,4 +206,3 @@ main(int argc, char *argv[]) | ||
206 | 206 | _close(STDOUT_FILENO); |
207 | 207 | return exitval; |
208 | 208 | } |
209 | - |
@@ -4,8 +4,10 @@ | ||
4 | 4 | # |
5 | 5 | # |
6 | 6 | CC = x86_64-w64-mingw32-gcc |
7 | -CC = i686-w64-mingw32-gcc | |
8 | -CFLAGS=-g -Wall --exec-charset=cp932 --input-charset=utf-8 | |
7 | +#CC = i686-w64-mingw32-gcc | |
8 | +CFLAGS=-g -Wall -W -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings \ | |
9 | + -Wconversion -Wfloat-equal -Wpointer-arith \ | |
10 | + --exec-charset=cp932 --input-charset=utf-8 | |
9 | 11 | |
10 | 12 | EXE=tee.exe |
11 | 13 | OBJS=main.o |
@@ -0,0 +1,15 @@ | ||
1 | +cmake_minimum_required(VERSION 3.13) | |
2 | + | |
3 | +project(wlsfonts C) | |
4 | + | |
5 | +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
6 | + | |
7 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wformat=2 -Wcast-qual") | |
8 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wwrite-strings") | |
9 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wfloat-equal") | |
10 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") | |
11 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --exec-charset=cp932") | |
12 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --input-charset=utf-8") | |
13 | + | |
14 | +add_executable(wlsfonts.exe main.c) | |
15 | +target_link_libraries(wlsfonts.exe gdi32) |
@@ -31,6 +31,9 @@ int CALLBACK EnumFontFamProc( | ||
31 | 31 | return 0; |
32 | 32 | } |
33 | 33 | |
34 | + (void) lpntm; | |
35 | + (void)lParam; | |
36 | + | |
34 | 37 | printf("%s, ", lpelf->elfFullName); |
35 | 38 | printf("%s, ", lpelf->elfStyle); |
36 | 39 |