Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
48f587a8
Commit
48f587a8
authored
Jan 27, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove warnings
parent
73e6cc4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
myisam/ft_stopwords.c
myisam/ft_stopwords.c
+8
-11
No files found.
myisam/ft_stopwords.c
View file @
48f587a8
...
...
@@ -37,7 +37,7 @@ static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action,
void
*
arg
__attribute__
((
unused
)))
{
if
(
action
==
free_free
)
my_free
(
w
->
pos
,
MYF
(
0
));
my_free
(
(
gptr
)
w
->
pos
,
MYF
(
0
));
}
static
int
ft_add_stopword
(
const
char
*
w
)
...
...
@@ -63,23 +63,20 @@ int ft_init_stopwords()
if
(
ft_stopword_file
)
{
File
fd
;
my_off_
t
len
;
uin
t
len
;
byte
*
buffer
,
*
start
,
*
end
;
FT_WORD
w
;
int
err
=-
1
;
int
err
or
=-
1
;
if
(
!*
ft_stopword_file
)
return
0
;
if
((
fd
=
my_open
(
ft_stopword_file
,
O_RDONLY
,
MYF
(
MY_WME
)))
==
-
1
)
return
-
1
;
len
=
my_seek
(
fd
,
0L
,
MY_SEEK_END
,
MYF
(
0
));
len
=
(
uint
)
my_seek
(
fd
,
0L
,
MY_SEEK_END
,
MYF
(
0
));
my_seek
(
fd
,
0L
,
MY_SEEK_SET
,
MYF
(
0
));
if
(
!
(
start
=
buffer
=
my_malloc
(
len
+
1
,
MYF
(
MY_WME
))))
{
my_close
(
fd
,
MYF
(
MY_WME
));
return
-
1
;
}
goto
err0
;
len
=
my_read
(
fd
,
buffer
,
len
,
MYF
(
MY_WME
));
end
=
start
+
len
;
while
(
ft_simple_get_word
(
&
start
,
end
,
&
w
))
...
...
@@ -87,17 +84,17 @@ int ft_init_stopwords()
if
(
ft_add_stopword
(
my_strdup_with_length
(
w
.
pos
,
w
.
len
,
MYF
(
0
))))
goto
err1
;
}
err
=
0
;
err
or
=
0
;
err1:
my_free
(
buffer
,
MYF
(
0
));
err0:
my_close
(
fd
,
MYF
(
MY_WME
));
return
err
;
return
err
or
;
}
else
{
/* compatibility mode: to be removed */
char
**
sws
=
ft_precompiled_stopwords
;
char
**
sws
=
(
char
**
)
ft_precompiled_stopwords
;
for
(;
*
sws
;
sws
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment