mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
pgindent run over code.
This commit is contained in:
@ -1037,9 +1037,9 @@ int endc; /* name ended by endc,']' */
|
||||
== static char othercase(int ch);
|
||||
*/
|
||||
#ifdef MULTIBYTE
|
||||
static unsigned char /* if no counterpart, return ch */
|
||||
static unsigned char /* if no counterpart, return ch */
|
||||
#else
|
||||
static char /* if no counterpart, return ch */
|
||||
static char /* if no counterpart, return ch */
|
||||
#endif
|
||||
othercase(ch)
|
||||
int ch;
|
||||
@ -1047,20 +1047,20 @@ int ch;
|
||||
assert(pg_isalpha(ch));
|
||||
if (pg_isupper(ch))
|
||||
#ifdef MULTIBYTE
|
||||
return (unsigned char)tolower(ch);
|
||||
return (unsigned char) tolower(ch);
|
||||
#else
|
||||
return tolower(ch);
|
||||
#endif
|
||||
else if (pg_islower(ch))
|
||||
#ifdef MULTIBYTE
|
||||
return (unsigned char)toupper(ch);
|
||||
return (unsigned char) toupper(ch);
|
||||
#else
|
||||
return toupper(ch);
|
||||
#endif
|
||||
else
|
||||
/* peculiar, but could happen */
|
||||
#ifdef MULTIBYTE
|
||||
return (unsigned char)ch;
|
||||
return (unsigned char) ch;
|
||||
#else
|
||||
return ch;
|
||||
#endif
|
||||
|
@ -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,...)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user