Coverage Report

Created: 2025-10-13 06:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/aspell/lib/document_checker-c.cpp
Line
Count
Source
1
/* Automatically generated file.  Do not edit directly. */
2
3
/* This file is part of The New Aspell
4
 * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
5
 * license version 2.0 or 2.1.  You should have received a copy of the
6
 * LGPL license along with this library if you did not you can find it
7
 * at http://www.gnu.org/.                                              */
8
9
#include "document_checker.hpp"
10
#include "error.hpp"
11
12
namespace acommon {
13
14
class CanHaveError;
15
class DocumentChecker;
16
struct Error;
17
class Filter;
18
class Speller;
19
20
extern "C" void delete_aspell_document_checker(DocumentChecker * ths)
21
1.15k
{
22
1.15k
  delete ths;
23
1.15k
}
24
25
extern "C" unsigned int aspell_document_checker_error_number(const DocumentChecker * ths)
26
0
{
27
0
  return ths->err_ == 0 ? 0 : 1;
28
0
}
29
30
extern "C" const char * aspell_document_checker_error_message(const DocumentChecker * ths)
31
0
{
32
0
  return ths->err_ ? ths->err_->mesg : "";
33
0
}
34
35
extern "C" const Error * aspell_document_checker_error(const DocumentChecker * ths)
36
0
{
37
0
  return ths->err_;
38
0
}
39
40
extern "C" CanHaveError * new_aspell_document_checker(Speller * speller)
41
1.16k
{
42
1.16k
  PosibErr<DocumentChecker *> ret = new_document_checker(speller);
43
1.16k
  if (ret.has_err()) {
44
7
    return new CanHaveError(ret.release_err());
45
1.15k
  } else {
46
1.15k
    return ret;
47
1.15k
  }
48
1.16k
}
49
50
extern "C" DocumentChecker * to_aspell_document_checker(CanHaveError * obj)
51
1.15k
{
52
1.15k
  return static_cast<DocumentChecker *>(obj);
53
1.15k
}
54
55
extern "C" void aspell_document_checker_reset(DocumentChecker * ths)
56
0
{
57
0
  ths->reset();
58
0
}
59
60
extern "C" void aspell_document_checker_process(DocumentChecker * ths, const char * str, int str_size)
61
1.15k
{
62
1.15k
  ths->process(str, str_size);
63
1.15k
}
64
65
extern "C" void aspell_document_checker_process_wide(DocumentChecker * ths, const void * str, int str_size, int str_type_width)
66
0
{
67
0
  ths->process_wide(str, str_size, str_type_width);
68
0
}
69
70
extern "C" Token aspell_document_checker_next_misspelling(DocumentChecker * ths)
71
20.0k
{
72
20.0k
  return ths->next_misspelling();
73
20.0k
}
74
75
extern "C" Token aspell_document_checker_next_misspelling_adj(DocumentChecker * ths, int type_width)
76
0
{
77
0
  Token res = ths->next_misspelling();
78
0
  res.offset /= type_width;
79
0
  res.len /= type_width;
80
0
  return res;
81
0
}
82
83
extern "C" Filter * aspell_document_checker_filter(DocumentChecker * ths)
84
0
{
85
0
  return ths->filter();
86
0
}
87
88
89
90
}
91