Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
ebe76b73
Commit
ebe76b73
authored
26 years ago
by
Marcel Baur
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added Boyer-Moore text search.
parent
e562453d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
programs/notepad/ChangeLog
+12
-7
12 additions, 7 deletions
programs/notepad/ChangeLog
programs/notepad/Makefile.in
+2
-1
2 additions, 1 deletion
programs/notepad/Makefile.in
programs/notepad/search.c
+56
-0
56 additions, 0 deletions
programs/notepad/search.c
with
70 additions
and
8 deletions
programs/notepad/ChangeLog
+
12
−
7
View file @
ebe76b73
Fri Mar 5 22:14:13 1999 Marcel Baur <mbaur@g26.ethz.ch>
* NEW [search.c]
- Added Boyer-Moore text search
Sat Feb 6 20:25:25 1999 Marcel Baur <mbaur@g26.ethz.ch>
- Added new IDS_NOTSAVED ressource (needs translation in *.rc)
- Improved printing support (not yet complete)
...
...
@@ -6,20 +10,20 @@ Sat Feb 6 20:25:25 1999 Marcel Baur <mbaur@g26.ethz.ch>
Thu Jan 28 18:17:08 1999 Jukka Iivonen <iivonen@iki.fi>
* [Fi.rc] [main.c] [Makefile.in]
Added Finnish language support.
* [Fi.rc] [main.c] [Makefile.in]
-
Added Finnish language support.
Sun Oct 18 14:11:42 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [??.rc], [TODO], [dialog.c], [dialog.h], [language.c],
[language.h], [license.c], [license.h], [main.c], [main.h],
[notepad.rc]:
- Fixed GetOpenFileName and GetSaveFileName dialogs.
- Fixed Print dialog and introduced PrinterSetup dialog.
- Fixed PageSetup dialog: values are now correctly initialized
- Fixed GetOpenFileName and GetSaveFileName dialogs.
- Fixed Print dialog and introduced PrinterSetup dialog.
- Fixed PageSetup dialog: values are now correctly initialized
(had to change all *.rc files)
- Preliminary file drag and drop support.
- Preliminary file drag and drop support.
Fri Jun 12 23:29:44 1998 Marcel Baur <mbaur@g26.ethz.ch>
- Fixed GetDateFormat()->GetTimeFormat() for locale time.
...
...
@@ -73,3 +77,4 @@ Fri Dec 05 20:51:55 1997 Marcel Baur <mbaur@g26.ethz.ch>
[README] [TODO] [ChangeLog]
- Originals by Marcel Baur
This diff is collapsed.
Click to expand it.
programs/notepad/Makefile.in
+
2
−
1
View file @
ebe76b73
...
...
@@ -16,7 +16,8 @@ MOSTSRCS = \
license.c
\
main.c
\
dialog.c
\
language.c
language.c
\
search.c
# Some strings need addresses >= 0x10000
STRINGSRCS
=
\
...
...
This diff is collapsed.
Click to expand it.
programs/notepad/search.c
0 → 100644
+
56
−
0
View file @
ebe76b73
/*
* Notepad (search.c)
* Copyright (C) 1999 by Marcel Baur
* To be distributed under the Wine license
*
* This file features Heuristic Boyer-Moore Text Search
*
* Always: - Buf is the Buffer containing the whole text
* ======= - SP is the Search Pattern, which has to be found in Buf.
*
*/
#include
<win.h>
#define CHARSETSIZE 255
int
delta
[
CHARSETSIZE
];
/* rightmostpos: return rightmost position of ch in szSP (or -1) */
int
rightmostpos
(
char
ch
,
LPSTR
szSP
,
int
nSPLen
)
{
int
i
=
nSPLen
;
while
((
i
>
0
)
&
(
szSP
[
i
]
!=
ch
))
i
--
;
return
(
i
);
}
/* setup_delta: setup delta1 cache */
void
setup_delta
(
LPSTR
szSP
,
int
nSPLen
)
{
int
i
;
for
(
i
=
0
;
i
<
CHARSETSIZE
;
i
++
)
{
delta
[
i
]
=
nSPLen
;
}
for
(
i
=
0
;
i
<
nSPLen
;
i
++
)
{
delta
[
szSP
[
i
]]
=
(
nSPLen
-
rightmostpos
(
szSP
[
i
],
szSP
,
nSPLen
));
}
}
int
bm_search
(
LPSTR
szBuf
,
int
nBufLen
,
LPSTR
szSP
,
int
nSPLen
)
{
int
i
=
nSPLen
;
int
j
=
nSPLen
;
do
{
if
(
szBuf
[
i
]
=
szSP
[
j
])
{
i
--
;
j
--
;
}
else
{
if
((
nSPLen
-
j
+
1
)
>
delta
[
szBuf
[
i
]])
{
i
+=
(
nSPLen
-
j
+
1
);
}
else
{
i
+=
delta
[
szBuf
[
i
]];
}
}
}
while
(
j
>
0
&&
i
<=
nBufLen
);
return
(
i
+
1
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment