Skip to content

Commit 351ebfb

Browse files
committed
debug
1 parent a9aa1b1 commit 351ebfb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,6 @@ jobs:
108108
run: |
109109
ctest --output-on-failure --test-dir build
110110
111+
- name: Setup tmate session
112+
if: ${{ failure() }}
113+
uses: mxschmitt/action-tmate@v3

src/modules/spell/comp_spell_dict.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static int compile_dict(int ifd, int ofd) {
3636
uint32_t wcount = 0;
3737
char *p;
3838
char *ifend;
39+
FCITX_INFO() << "fcitx5-spell-compile-dict open fstst...";
3940
if (fstat(ifd, &istat_buf) == -1) {
4041
return 1;
4142
}
@@ -69,6 +70,7 @@ static int compile_dict(int ifd, int ofd) {
6970
if (lseek(ofd, sizeof(uint32_t), SEEK_CUR) == static_cast<off_t>(-1)) {
7071
return 1;
7172
}
73+
FCITX_INFO() << "fcitx5-spell-compile-dict open write...";
7274
while (p < ifend) {
7375
char *start;
7476
long int ceff;
@@ -92,10 +94,12 @@ static int compile_dict(int ifd, int ofd) {
9294
}
9395
wcount = htole32(wcount);
9496
fs::safeWrite(ofd, &wcount, sizeof(uint32_t));
97+
FCITX_INFO() << "fcitx5-spell-compile-dict open write end...";
9598
return 0;
9699
}
97100

98101
int main(int argc, char *argv[]) {
102+
FCITX_INFO() << "fcitx5-spell-compile-dict starting...";
99103
const char *action = argv[1];
100104
if (strcmp(action, "--comp-dict") == 0) {
101105
if (argc != 4) {
@@ -108,6 +112,7 @@ int main(int argc, char *argv[]) {
108112
if (!ifd.isValid() || !ofd.isValid()) {
109113
return 1;
110114
}
115+
FCITX_INFO() << "fcitx5-spell-compile-dict open file...";
111116
return compile_dict(ifd.fd(), ofd.fd());
112117
}
113118
return 1;

0 commit comments

Comments
 (0)