Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Jakob Huber
postgres-lambda-diff
Commits
08bcc77a
Commit
08bcc77a
authored
25 years ago
by
Tatsuo Ishii
Browse files
Options
Downloads
Patches
Plain Diff
add retest, a regex testing program
parent
56b9a549
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/regex/Makefile
+9
-2
9 additions, 2 deletions
src/backend/regex/Makefile
src/backend/regex/retest.c
+42
-0
42 additions, 0 deletions
src/backend/regex/retest.c
with
51 additions
and
2 deletions
src/backend/regex/Makefile
+
9
−
2
View file @
08bcc77a
...
...
@@ -4,7 +4,7 @@
# Makefile for regex
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.
8
199
8
/0
7
/2
6
0
4:30:34 scrappy
Exp $
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.
9
199
9
/0
5
/2
1
0
6:27:54 ishii
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -14,9 +14,13 @@ include ../../Makefile.global
CFLAGS
+=
-I
..
CFLAGS
+=
-DPOSIX_MISTAKE
DEBUGOBJ
=
OBJS
=
regcomp.o regerror.o regexec.o regfree.o
ifdef
MULTIBYTE
CFLAGS
+=
$(
MBFLAGS
)
DEBUGOBJ
+=
../utils/mb/SUBSYS.o
endif
all
:
SUBSYS.o
...
...
@@ -24,11 +28,14 @@ all: SUBSYS.o
SUBSYS.o
:
$(OBJS)
$(
LD
)
-r
-o
SUBSYS.o
$(
OBJS
)
retest
:
retest.o SUBSYS.o $(DEBUGOBJ)
$(
CC
)
-o
retest retest.o SUBSYS.o
$(
DEBUGOBJ
)
depend dep
:
$(
CC
)
-MM
$(
CFLAGS
)
*
.c
>
depend
clean
:
rm
-f
SUBSYS.o
$(
OBJS
)
rm
-f
SUBSYS.o
$(
OBJS
)
retest retest.o
ifeq
(depend,$(wildcard depend))
include
depend
...
...
This diff is collapsed.
Click to expand it.
src/backend/regex/retest.c
0 → 100644
+
42
−
0
View file @
08bcc77a
/*
* a simple regexp debug program
*
* $Header: /cvsroot/pgsql/src/backend/regex/Attic/retest.c,v 1.1 1999/05/21 06:27:54 ishii Exp $
*/
#include
<stdio.h>
#include
<string.h>
#include
"postgres.h"
#include
<regex/regex.h>
int
main
()
{
int
sts
;
regex_t
re
;
char
buf
[
1024
];
char
*
p
;
printf
(
"type in regexp string: "
);
if
(
!
fgets
(
buf
,
sizeof
(
buf
),
stdin
))
{
exit
(
0
);
}
p
=
strchr
(
buf
,
'\n'
);
if
(
p
)
*
p
=
'\0'
;
sts
=
pg95_regcomp
(
&
re
,
buf
,
1
);
printf
(
"regcomp: parses
\"
%s
\"
and returns %d
\n
"
,
buf
,
sts
);
for
(;;)
{
printf
(
"type in target string: "
);
if
(
!
fgets
(
buf
,
sizeof
(
buf
),
stdin
))
{
exit
(
0
);
}
p
=
strchr
(
buf
,
'\n'
);
if
(
p
)
*
p
=
'\0'
;
sts
=
pg95_regexec
(
&
re
,
buf
,
0
,
0
,
0
);
printf
(
"regexec: returns %d
\n
"
,
sts
);
}
}
void
elog
(
int
lev
,
const
char
*
fmt
,...)
{}
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