aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/retest.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-05-25 16:15:34 +0000
committerBruce Momjian <bruce@momjian.us>1999-05-25 16:15:34 +0000
commit07842084fe3e11041f83563c851236395f481470 (patch)
treeab9960e67325bec5a97b8b4dd4b2075ce60cc420 /src/backend/regex/retest.c
parent4b04b01aaa460f1e52980f24173dc7a4535efd2d (diff)
downloadpostgresql-07842084fe3e11041f83563c851236395f481470.tar.gz
postgresql-07842084fe3e11041f83563c851236395f481470.zip
pgindent run over code.
Diffstat (limited to 'src/backend/regex/retest.c')
-rw-r--r--src/backend/regex/retest.c58
1 files changed, 31 insertions, 27 deletions
diff --git a/src/backend/regex/retest.c b/src/backend/regex/retest.c
index 13dd0761f02..4eb9b2282fb 100644
--- a/src/backend/regex/retest.c
+++ b/src/backend/regex/retest.c
@@ -1,7 +1,7 @@
/*
* 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 $
+ *
+ * $Header: /cvsroot/pgsql/src/backend/regex/Attic/retest.c,v 1.2 1999/05/25 16:10:45 momjian Exp $
*/
#include <stdio.h>
@@ -9,34 +9,38 @@
#include "postgres.h"
#include <regex/regex.h>
-int main()
+int
+main()
{
- int sts;
- regex_t re;
- char buf[1024];
- char *p;
+ 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';
+ 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_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);
- }
+ sts = pg95_regexec(&re, buf, 0, 0, 0);
+ printf("regexec: returns %d\n", sts);
+ }
}
-void elog(int lev, const char *fmt,...)
-{}
+void
+elog(int lev, const char *fmt,...)
+{
+}