Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
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
Abuhujair Javed
Postgres FD Implementation
Commits
317ea8bf
Commit
317ea8bf
authored
Feb 28, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove win32 port directory. Forgot to do it earlier.
parent
7a14979f
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
0 additions
and
8961 deletions
+0
-8961
src/backend/port/win32/nt.c
src/backend/port/win32/nt.c
+0
-625
src/backend/port/win32/nt.h
src/backend/port/win32/nt.h
+0
-47
src/backend/port/win32/pglite.mak
src/backend/port/win32/pglite.mak
+0
-3323
src/backend/port/win32/port-protos.h
src/backend/port/win32/port-protos.h
+0
-1
src/backend/port/win32/pwd.h
src/backend/port/win32/pwd.h
+0
-1
src/backend/port/win32/regex/COPYRIGHT
src/backend/port/win32/regex/COPYRIGHT
+0
-56
src/backend/port/win32/regex/WHATSNEW
src/backend/port/win32/regex/WHATSNEW
+0
-94
src/backend/port/win32/regex/cclass.h
src/backend/port/win32/regex/cclass.h
+0
-70
src/backend/port/win32/regex/cname.h
src/backend/port/win32/regex/cname.h
+0
-141
src/backend/port/win32/regex/engine.c
src/backend/port/win32/regex/engine.c
+0
-1091
src/backend/port/win32/regex/re_format.7
src/backend/port/win32/regex/re_format.7
+0
-269
src/backend/port/win32/regex/regcomp.c
src/backend/port/win32/regex/regcomp.c
+0
-1698
src/backend/port/win32/regex/regerror.c
src/backend/port/win32/regex/regerror.c
+0
-180
src/backend/port/win32/regex/regex.3
src/backend/port/win32/regex/regex.3
+0
-538
src/backend/port/win32/regex/regex.h
src/backend/port/win32/regex/regex.h
+0
-106
src/backend/port/win32/regex/regex2.h
src/backend/port/win32/regex/regex2.h
+0
-175
src/backend/port/win32/regex/regexec.c
src/backend/port/win32/regex/regexec.c
+0
-181
src/backend/port/win32/regex/regexp.h
src/backend/port/win32/regex/regexp.h
+0
-69
src/backend/port/win32/regex/regfree.c
src/backend/port/win32/regex/regfree.c
+0
-80
src/backend/port/win32/regex/utils.h
src/backend/port/win32/regex/utils.h
+0
-57
src/backend/port/win32/rusagestub.h
src/backend/port/win32/rusagestub.h
+0
-29
src/backend/port/win32/sys/cdefs.h
src/backend/port/win32/sys/cdefs.h
+0
-124
src/backend/port/win32/sys/file.h
src/backend/port/win32/sys/file.h
+0
-1
src/backend/port/win32/sys/ipc.h
src/backend/port/win32/sys/ipc.h
+0
-1
src/backend/port/win32/sys/param.h
src/backend/port/win32/sys/param.h
+0
-1
src/backend/port/win32/sys/sem.h
src/backend/port/win32/sys/sem.h
+0
-1
src/backend/port/win32/sys/shm.h
src/backend/port/win32/sys/shm.h
+0
-1
src/backend/port/win32/sys/time.h
src/backend/port/win32/sys/time.h
+0
-1
No files found.
src/backend/port/win32/nt.c
deleted
100644 → 0
View file @
7a14979f
#include <windows.h>
#include <time.h>
#include "postgres.h"
#include "storage/ipc.h"
/* The name of the Postgres 95 ipc file mapping object */
#define IPC_NAME "PG95_IPC"
/* The name of the Postgres 95 ipc file mapping object semaphore */
#define IPC_SEM_NAME "PG95_IPC_SEM"
/* The maximum length of a shared memory object name */
#define IPC_MAX_SHMEM_NAME 32
/* The maximum number of emulated Unix shared memory segments */
#define IPC_NMAXSHM 10
/* The Maximum number of elements in a semaphore set. Note that this
** is just a guess.
*/
#define IPC_NMAXSEMGRP 7
/* The various states of a semaphore */
#define SIGNALED 1
#define UNSIGNALED 0
#define UNUSED -1
/* The security attribute structure necessary for handles to be inhereted */
SECURITY_ATTRIBUTES
sec_attrib
=
{
sizeof
(
LPSECURITY_ATTRIBUTES
),
NULL
,
TRUE
};
/*
Postgres95 uses semaphores and shared memory. Both are provided by
Unix and NT, although NT uses a different method for referencing
them. Rather than changing the function calls used by Postgres95
to use NT system services, we've written code to emulate the Unix
system calls. We deliberately don't do a complete emulation of the
Unix calls, partly because it doesn't appear possible, but also
because only a few options of the Unix calls are actually used by
Postgres95.
The most noticable difference between the way Unix and NT use semaphores
is that the central entity on Unix is a semaphore set consisting of
potientially many actual semaphores whereas on NT a semaphore handle
represents just one actual semaphore. Furthermore, a Unix semaphore set
is identified by one semaphore id no matter how many elements there
are in the set. Given a Unix semaphore id, the Unix API provides a way
to index into the set to reference a specific semaphore.
You might think that since both a semaphore id and a semaphore handle
is just an integer there won't be any changes necessary to the Postgres95
code to deal with NT semaphores. If it weren't for the existence of
multi-semaphore semaphore sets this would be true.
To handle semaphore sets a fixed-size table, whose size is partially
based on the sum of the maximum number of semaphores times the maximum
number of semaphores per semaphore set, is created and kept in shared
memory that is visable to every backend started by the Postmaster.
Each semaphore set entry consists of an arbitrary key value, which serves
to identify the semaphore set, and IPC_NMAXSEMGRP array elements to
store the NT semaphore handles representing the NT semaphore used for
the semaphore set. Semaphore IDs are just indices into this table.
In order to distinguish occupied entries in this table -1 is always
considered an invalid semaphore ID.
This table is also used to store information about shared memory
segments. Fortunately, there is a one-to-one mapping between Unix
shared memory IDs and NT shared memory handles so the code to emulate
Unix shared memory is simple.
*/
/* We need one of these for each emulated semaphore set */
struct
Pg_sem
{
key_t
Pg_sem_key
;
HANDLE
Pg_sem_handle
[
IPC_NMAXSEMGRP
];
int
Pg_sem_nsems
;
};
/* We need one of these for each emulated shared memory segment */
struct
Pg_shm
{
key_t
Pg_shm_key
;
HANDLE
Pg_shm_handle
;
};
/* This structure is what's stored in shared memory. Note that
** since both the shared memory and semaphore data is in the same
** table, and the table is protected by a single NT semaphore, there's
** a chance that semaphore manipulation could be slowed down by
** shared memory manipulation, and vice versa. But, since both are
** allocated primarily when the Postmaster starts up, which isn't time
** critical, I don't think this will prove to be a problem.
*/
static
struct
Pg_shared
{
int
Pg_next_sem
;
int
Pg_next_shm
;
struct
Pg_sem
Pg_sem
[
IPC_NMAXSEM
];
struct
Pg_shm
Pg_shm
[
IPC_NMAXSHM
];
}
*
Pg_shared_ptr
;
/* The semaphore that protects the shared memory table */
HANDLE
Pg_shared_hnd
;
/*
** Perform a semaphore operation. We're passed a semaphore set id,
** a pointer to an array of sembuf structures, and the number
** of elements in the array. Each element in the sembuf structure
** describes a specific semaphore within the semaphore set and the
** operation to perform on it.
*/
int
semop
(
int
semid
,
struct
sembuf
*
sops
,
u_int
nsops
)
{
u_int
i
;
int
result
;
HANDLE
hndl
;
/* Go through all the sops structures */
for
(
i
=
0
;
i
<
nsops
;
i
++
)
{
struct
sembuf
*
sptr
;
int
semval
;
int
av_sem_op
;
sptr
=
&
sops
[
i
];
/*
printf("performing %d in sem # %d\n", sptr->sem_op, sptr->sem_num);
*/
/*
** Postgres95 uses -255 to represent a lock request
** and 255 to show a lock release. Changing these values
** to -1 and 1 make it easier to keep track of the state
** of the semaphore.
*/
if
(
sptr
->
sem_op
==
-
255
)
sptr
->
sem_op
=
-
1
;
else
if
(
sptr
->
sem_op
==
255
)
sptr
->
sem_op
=
1
;
else
printf
(
"invalid sem_op %d
\n
"
,
sptr
->
sem_op
);
_get_ipc_sem
();
hndl
=
Pg_shared_ptr
->
Pg_sem
[
semid
].
Pg_sem_handle
[
sptr
->
sem_num
];
_rel_ipc_sem
();
semval
=
_get_sem_val
(
hndl
);
if
(
sptr
->
sem_op
==
0
)
{
if
(
semval
==
UNSIGNALED
)
return
(
semval
);
else
{
if
(
sptr
->
sem_flg
&
IPC_NOWAIT
)
return
(
SIGNALED
);
else
result
=
WaitForSingleObject
(
hndl
,
5000
);
}
}
av_sem_op
=
abs
(
sptr
->
sem_op
);
/* If a lock is being attempted */
if
(
sptr
->
sem_op
<
0
)
{
if
(
semval
>=
av_sem_op
)
{
semval
-=
av_sem_op
;
if
(
semval
<=
UNSIGNALED
)
result
=
WaitForSingleObject
(
hndl
,
5000
);
}
else
{
if
(
sptr
->
sem_flg
&
IPC_NOWAIT
)
return
(
SIGNALED
);
else
result
=
WaitForSingleObject
(
hndl
,
5000
);
}
}
/* If a lock is being released */
if
(
sptr
->
sem_op
>
0
)
{
semval
+=
av_sem_op
;
if
(
semval
>
0
)
ReleaseSemaphore
(
hndl
,
1
,
NULL
);
}
}
}
int
semget
(
key_t
key
,
int
nsems
,
int
semflg
)
{
int
id
,
new_sem
,
ret_val
;
/* If nmsems is 0 then assume that we're just checking whether
** the semaphore identified by key exists. Assume that
** if key is IPC_PRIVATE that this should always fail.
*/
if
(
nsems
==
0
)
{
if
(
key
==
IPC_PRIVATE
)
ret_val
=
-
1
;
else
{
_get_ipc_sem
();
id
=
_get_sem_id
(
key
);
_rel_ipc_sem
();
ret_val
=
id
;
}
return
(
ret_val
);
}
/* See if there's already a semaphore with the key.
** If not, record the key, allocate enough space for the
** handles of the semaphores, and then create the semaphores.
*/
_get_ipc_sem
();
id
=
_get_sem_id
(
key
);
if
(
id
==
UNUSED
)
{
register
int
i
;
struct
Pg_sem
*
pg_ptr
;
new_sem
=
Pg_shared_ptr
->
Pg_next_sem
++
;
pg_ptr
=
&
(
Pg_shared_ptr
->
Pg_sem
[
new_sem
]);
pg_ptr
->
Pg_sem_key
=
key
;
pg_ptr
->
Pg_sem_nsems
=
nsems
;
for
(
i
=
0
;
i
<
nsems
;
i
++
)
pg_ptr
->
Pg_sem_handle
[
i
]
=
CreateSemaphore
(
&
sec_attrib
,
1
,
255
,
NULL
);
ret_val
=
new_sem
;
}
else
ret_val
=
id
;
_rel_ipc_sem
();
return
(
ret_val
);
}
/* These next two functions could be written as one function, although
** doing so would require some additional logic.
*/
/* Given a semaphore key, return the corresponding id.
** This function assumes that the shared memory table is being
** protected by the shared memory table semaphore.
*/
_get_sem_id
(
key_t
key
)
{
register
int
i
;
/* Go through the shared memory table looking for a semaphore
** whose key matches what we're looking for
*/
for
(
i
=
0
;
i
<
Pg_shared_ptr
->
Pg_next_sem
;
i
++
)
if
(
Pg_shared_ptr
->
Pg_sem
[
i
].
Pg_sem_key
==
key
)
return
(
i
);
/* Return UNUSED if we didn't find a match */
return
(
UNUSED
);
}
/* Given a shared memory key, return the corresponding id
** This function assumes that the shared memory table is being
** protected by the shared memory table semaphore.
*/
_get_shm_id
(
key_t
key
)
{
register
int
i
;
/* Go through the shared memory table looking for a semaphore
** whose key matches what we're looking for
*/
for
(
i
=
0
;
i
<
Pg_shared_ptr
->
Pg_next_shm
;
i
++
)
if
(
Pg_shared_ptr
->
Pg_shm
[
i
].
Pg_shm_key
==
key
)
return
(
i
);
/* Return UNUSED if we didn't find a match */
return
(
UNUSED
);
}
int
semctl
(
int
semid
,
int
semnum
,
int
cmd
,
void
*
y
)
{
int
old_val
;
HANDLE
hndl
;
switch
(
cmd
)
{
case
SETALL
:
case
SETVAL
:
/* We can't change the value of a semaphore under
** NT except by releasing it or waiting for it.
*/
return
(
0
);
case
GETVAL
:
_get_ipc_sem
();
hndl
=
Pg_shared_ptr
->
Pg_sem
[
semid
].
Pg_sem_handle
[
semnum
];
_rel_ipc_sem
();
old_val
=
_get_sem_val
(
hndl
);
return
(
old_val
);
}
}
/* Get the current value of the semaphore whose handle is passed in hnd
** This function does NOT assume that the shared memory table is being
** protected by the shared memory table semaphore.
*/
int
_get_sem_val
(
HANDLE
hnd
)
{
DWORD
waitresult
;
/* Try to get the semaphore */
waitresult
=
WaitForSingleObject
(
hnd
,
0L
);
/* Check what the value of the semaphore was */
switch
(
waitresult
)
{
/* The semaphore was signaled so we just got it.
** Since we don't really want to keep it, since we just
** wanted to test its value, go ahead and release it.
*/
case
WAIT_OBJECT_0
:
ReleaseSemaphore
(
hnd
,
1
,
NULL
);
return
(
SIGNALED
);
/* The semaphore was non-signaled meaning someone else had it. */
case
WAIT_TIMEOUT
:
return
(
UNSIGNALED
);
}
}
int
shmget
(
key_t
key
,
uint32
size
,
int
flags
)
{
HANDLE
hnd
;
char
name
[
IPC_MAX_SHMEM_NAME
];
int
id
;
/* Get the handle for the key, if any. */
_get_ipc_sem
();
id
=
_get_shm_id
(
key
);
_rel_ipc_sem
();
/* If we're really going to create a new mapping */
if
(
flags
!=
0
)
{
/* if the key is already being used return an error */
if
(
id
!=
UNUSED
)
return
(
-
1
);
/* convert the key to a character string */
sprintf
(
name
,
"%d"
,
key
);
hnd
=
CreateFileMapping
((
HANDLE
)
0xffffffff
,
&
sec_attrib
,
PAGE_READWRITE
,
0
,
size
,
name
);
if
(
hnd
==
NULL
)
return
(
-
1
);
else
{
int
new_ipc
;
struct
Pg_shm
*
pg_ptr
;
_get_ipc_sem
();
new_ipc
=
Pg_shared_ptr
->
Pg_next_shm
++
;
pg_ptr
=
&
(
Pg_shared_ptr
->
Pg_shm
[
new_ipc
]);
pg_ptr
->
Pg_shm_key
=
key
;
pg_ptr
->
Pg_shm_handle
=
hnd
;
_rel_ipc_sem
();
return
(
new_ipc
);
}
}
/* flags is 0 so we just want the id for the existing mapping */
else
return
(
id
);
}
shmdt
(
char
*
shmaddr
)
{
UnmapViewOfFile
(
shmaddr
);
}
int
shmctl
(
IpcMemoryId
shmid
,
int
cmd
,
struct
shmid_ds
*
buf
)
{
int
x
=
0
;
if
(
cmd
==
IPC_RMID
)
{
_get_ipc_sem
();
CloseHandle
(
Pg_shared_ptr
->
Pg_shm
[
shmid
].
Pg_shm_handle
);
_rel_ipc_sem
();
return
(
0
);
}
x
=
x
/
x
;
}
/* Attach to the already created shared memory segment */
LPVOID
*
shmat
(
int
shmid
,
void
*
shmaddr
,
int
shmflg
)
{
LPVOID
*
ret_addr
;
_get_ipc_sem
();
ret_addr
=
MapViewOfFile
(
Pg_shared_ptr
->
Pg_shm
[
shmid
].
Pg_shm_handle
,
FILE_MAP_ALL_ACCESS
,
0
,
0
,
0
);
_rel_ipc_sem
();
if
(
ret_addr
==
NULL
)
{
int
jon
;
jon
=
GetLastError
();
}
return
(
ret_addr
);
}
/* This is the function that is called when the postmaster starts up.
** It is here that the shared memory table is created. Also, create
** the semaphore that will be used to protect the shared memory table.
** TODO - do something with the return value.
*/
_nt_init
()
{
HANDLE
hnd
;
int
size
=
sizeof
(
struct
Pg_shared
);
/* Create the file mapping for the shared memory to be
** used to store the ipc table.
*/
hnd
=
CreateFileMapping
((
HANDLE
)
0xffffffff
,
&
sec_attrib
,
PAGE_READWRITE
,
0
,
size
,
IPC_NAME
);
if
(
hnd
==
NULL
)
{
size
=
GetLastError
();
return
(
-
1
);
}
Pg_shared_hnd
=
CreateSemaphore
(
&
sec_attrib
,
1
,
255
,
IPC_SEM_NAME
);
if
(
Pg_shared_hnd
==
NULL
)
{
size
=
GetLastError
();
return
(
-
1
);
}
}
/* This function gets called by every backend at startup time. Its
** main duty is to put the address of the shared memory table pointed
** to by Pg_shared_ptr. There's no need to get the IPC_SEM_NAME semaphore
** because this function is called before we start manipulating the
** shared memory table.
*/
void
_nt_attach
()
{
HANDLE
hnd
;
/* Get a handle to the shared memory table */
hnd
=
OpenFileMapping
(
FILE_MAP_ALL_ACCESS
,
FALSE
,
IPC_NAME
);
/* Map the ipc shared memory table into the address space
** of this process at an address returned by MapViewOfFile
*/
Pg_shared_ptr
=
(
struct
Pg_shared
*
)
MapViewOfFile
(
hnd
,
FILE_MAP_ALL_ACCESS
,
0
,
0
,
0
);
if
(
Pg_shared_ptr
==
NULL
)
{
hnd
=
GetLastError
();
return
(
-
1
);
}
}
_get_ipc_sem
()
{
WaitForSingleObject
(
Pg_shared_hnd
,
5000
);
}
_rel_ipc_sem
()
{
ReleaseSemaphore
(
Pg_shared_hnd
,
1
,
NULL
);
}
pg_dlerror
(
void
)
{
int
x
=
0
;
x
=
x
/
x
;
}
pg_dlclose
(
void
*
handle
)
{
FreeLibrary
(
handle
);
}
void
*
pg_dlopen
(
char
*
filename
)
{
HINSTANCE
hinstlib
;
hinstlib
=
LoadLibrary
(
filename
);
return
(
hinstlib
);
}
void
*
pg_dlsym
(
void
*
handle
,
char
*
funcname
)
{
void
*
proc
;
proc
=
GetProcAddress
(
handle
,
funcname
);
return
(
proc
);
}
void
ftruncate
(
int
fd
,
int
offset
)
{
HANDLE
hnd
;
_lseek
(
fd
,
offset
,
SEEK_SET
);
hnd
=
_get_osfhandle
(
fd
);
SetEndOfFile
(
hnd
);
}
/* The rest are just stubs that are intended to serve as place holders
** in case we want to set breakpoints to see what's happening when
** these routines are called. They'll eventually have to be filled
** in but they're not necessary to get Postgres95 going.
*/
setuid
(
int
i
)
{
int
x
=
1
;
x
=
x
/
x
;
}
setsid
()
{
int
x
=
1
;
x
=
x
/
x
;
}
vfork
(
void
)
{
int
x
=
0
;
x
=
x
/
x
;
}
ttyname
(
int
y
)
{
int
x
=
0
;
x
=
x
/
x
;
}
step
(
char
*
string
,
char
*
expbuf
)
{
int
x
=
0
;
x
=
x
/
x
;
}
siglongjmp
(
int
env
,
int
value
)
{
int
x
=
0
;
x
=
x
/
x
;
}
pause
(
void
)
{
int
x
=
0
;
x
=
x
/
x
;
}
kill
(
int
process
,
int
signal
)
{
int
x
=
1
;
x
=
x
/
x
;
}
getuid
(
void
)
{
int
x
=
1
;
x
=
x
/
x
;
}
geteuid
(
void
)
{
int
x
=
1
;
x
=
x
/
x
;
}
int
fsync
(
int
filedes
)
{
}
fork
(
void
)
{
int
x
=
0
;
x
=
x
/
x
;
}
char
*
compile
(
char
*
instring
,
char
*
expbuf
,
char
*
endbuf
,
int
eof
)
{
int
x
=
0
;
x
=
x
/
x
;
}
beginRecipe
(
char
*
s
)
{
int
x
=
0
;
x
=
x
/
x
;
}
src/backend/port/win32/nt.h
deleted
100644 → 0
View file @
7a14979f
typedef
char
*
caddr_t
;
typedef
unsigned
long
u_long
;
typedef
unsigned
int
u_int
;
typedef
unsigned
short
u_short
;
typedef
unsigned
char
u_char
;
typedef
unsigned
int
mode_t
;
typedef
u_int
uid_t
;
typedef
u_int
gid_t
;
typedef
int
key_t
;
#define IPC_PRIVATE ((key_t)0)
/* Common IPC operation flag definitions. We'll use
** the Unix values unless we find a reason not to.
*/
#define IPC_CREAT 0001000
/* create entry if key doesn't exist */
#define IPC_EXCL 0002000
/* fail if key exists */
#define IPC_NOWAIT 0004000
/* error if request must wait */
struct
sembuf
{
u_short
sem_num
;
short
sem_op
;
short
sem_flg
;
};
#define USE_POSIX_TIME
#undef HAVE_RINT
#define MAXHOSTNAMELEN 12
/* where is the official definition of this? */
#define MAXPATHLEN _MAX_PATH
/* in winsock.h */
/* NT has stricmp not strcasecmp. Which is ANSI? */
#define strcasecmp(a,b) _stricmp(a,b)
#define isascii(a) __isascii(a)
#define random() rand()
/* These are bogus values used so that we can compile ipc.c */
#define SETALL 2
#define SETVAL 3
#define IPC_RMID 4
#define GETNCNT 5
#define GETVAL 6
src/backend/port/win32/pglite.mak
deleted
100644 → 0
View file @
7a14979f
# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
!IF
"$(CFG)"
==
""
CFG
=
Win32 Debug
!MESSAGE
No
configuration
specified.
Defaulting
to
Win32
Debug.
!ENDIF
!IF
"$(CFG)"
!=
"Win32 Release"
&&
"$(CFG)"
!=
"Win32 Debug"
!MESSAGE
Invalid
configuration
"$(CFG)"
specified.
!MESSAGE
You
can
specify
a
configuration
when
running
NMAKE
on
this
makefile
!MESSAGE by defining the macro CFG on the command line. For example
:
!MESSAGE
!MESSAGE
NMAKE
/f
"pglite.mak"
CFG
=
"Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are
:
!MESSAGE
!MESSAGE
"Win32 Release"
(based
on
"Win32 (x86) Console Application"
)
!MESSAGE
"Win32 Debug"
(based
on
"Win32 (x86) Console Application"
)
!MESSAGE
!ERROR
An
invalid
configuration
is
specified.
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "Win32 Debug"
CPP
=
cl.exe
RSC
=
rc.exe
!IF
"$(CFG)"
==
"Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "WinRel"
# PROP BASE Intermediate_Dir "WinRel"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "g:\users\forrest\pglite"
# PROP Intermediate_Dir "g:\users\forrest\pglite"
OUTDIR
=
g:
\u
sers
\f
orrest
\p
glite
INTDIR
=
g:
\u
sers
\f
orrest
\p
glite
ALL
:
$(OUTDIR)/pglite.exe $(OUTDIR)/pglite.bsc
$(OUTDIR)
:
if
not
exist
$(OUTDIR)/nul
mkdir
$(OUTDIR)
# ADD BASE CPP /nologo /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c
# ADD CPP /nologo /W3 /GX /YX /Od /I "g:\pglite\src\backend\include" /I "g:\pglite\src\backend" /I "g:\pglite\src\backend\port\win32" /I "g:\pglite\src\backend\obj" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "__STDC__" /D "_POSIX_" /c
# SUBTRACT CPP /Fr
CPP_PROJ
=
/nologo /W3 /GX /YX /Od /I
"g:
\p
glite
\s
rc
\b
ackend
\i
nclude"
/I
\
"g:
\p
glite
\s
rc
\b
ackend"
/I
"g:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32"
/I
\
"g:
\p
glite
\s
rc
\b
ackend
\o
bj"
/D
"NDEBUG"
/D
"WIN32"
/D
"_CONSOLE"
/D
"__STDC__"
\
/Fp
$(OUTDIR)
/
"pglite.pch"
/Fo
$(INTDIR)
/ /D
"_POSIX_"
/c
CPP_OBJS
=
g:
\u
sers
\f
orrest
\p
glite/
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32
=
bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS
=
/nologo /o
$(OUTDIR)
/
"pglite.bsc"
BSC32_SBRS
=
\
$(OUTDIR)/pglite.bsc
:
$(OUTDIR) $(BSC32_SBRS)
LINK32
=
link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386
LINK32_FLAGS
=
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
\
odbccp32.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no
\
/PDB:
$(OUTDIR)
/
"pglite.pdb"
/MACHINE:I386 /OUT:
$(OUTDIR)
/
"pglite.exe"
DEF_FILE
=
LINK32_OBJS
=
\
$(INTDIR)
/scankey.obj
\
$(INTDIR)
/printtup.obj
\
$(INTDIR)
/indexvalid.obj
\
$(INTDIR)
/heaptuple.obj
\
$(INTDIR)
/tupdesc.obj
\
$(INTDIR)
/indextuple.obj
\
$(INTDIR)
/heapvalid.obj
\
$(INTDIR)
/hashinsert.obj
\
$(INTDIR)
/hashstrat.obj
\
$(INTDIR)
/hashutil.obj
\
$(INTDIR)
/hashpage.obj
\
$(INTDIR)
/hashsearch.obj
\
$(INTDIR)
/hashscan.obj
\
$(INTDIR)
/hashfunc.obj
\
$(INTDIR)
/hash.obj
\
$(INTDIR)
/hashovfl.obj
\
$(INTDIR)
/bootstrap.obj
\
$(INTDIR)
/genam.obj
\
$(INTDIR)
/creatinh.obj
\
$(INTDIR)
/nodeSeqscan.obj
\
$(INTDIR)
/nodeUnique.obj
\
$(INTDIR)
/rename.obj
\
$(INTDIR)
/transsup.obj
\
$(INTDIR)
/transam.obj
\
$(INTDIR)
/define.obj
\
$(INTDIR)
/execMain.obj
\
$(INTDIR)
/xid.obj
\
$(INTDIR)
/nodeAgg.obj
\
$(INTDIR)
/nbtpage.obj
\
$(INTDIR)
/execScan.obj
\
$(INTDIR)
/nbtree.obj
\
$(INTDIR)
/rtscan.obj
\
$(INTDIR)
/indexam.obj
\
$(INTDIR)
/execQual.obj
\
$(INTDIR)
/nodeHash.obj
\
$(INTDIR)
/nbtscan.obj
\
$(INTDIR)
/hio.obj
\
$(INTDIR)
/pg_proc.obj
\
$(INTDIR)
/stats.obj
\
$(INTDIR)
/nodeMaterial.obj
\
$(INTDIR)
/varsup.obj
\
$(INTDIR)
/copy.obj
\
$(INTDIR)
/rtproc.obj
\
$(INTDIR)
/functions.obj
\
$(INTDIR)
/nodeHashjoin.obj
\
$(INTDIR)
/catalog.obj
\
$(INTDIR)
/nbtinsert.obj
\
$(INTDIR)
/rtree.obj
\
$(INTDIR)
/version.obj
\
$(INTDIR)
/async.obj
\
$(INTDIR)
/nbtutils.obj
\
$(INTDIR)
/vacuum.obj
\
$(INTDIR)
/rtstrat.obj
\
$(INTDIR)
/execFlatten.obj
\
$(INTDIR)
/nodeTee.obj
\
$(INTDIR)
/nodeIndexscan.obj
\
$(INTDIR)
/remove.obj
\
$(INTDIR)
/indexing.obj
\
$(INTDIR)
/command.obj
\
$(INTDIR)
/nbtsearch.obj
\
$(INTDIR)
/heapam.obj
\
$(INTDIR)
/nodeSort.obj
\
$(INTDIR)
/execProcnode.obj
\
$(INTDIR)
/nodeResult.obj
\
$(INTDIR)
/index.obj
\
$(INTDIR)
/xact.obj
\
$(INTDIR)
/nodeMergejoin.obj
\
$(INTDIR)
/pg_operator.obj
\
$(INTDIR)
/execJunk.obj
\
$(INTDIR)
/pg_aggregate.obj
\
$(INTDIR)
/istrat.obj
\
$(INTDIR)
/execUtils.obj
\
$(INTDIR)
/purge.obj
\
$(INTDIR)
/heap.obj
\
$(INTDIR)
/nbtstrat.obj
\
$(INTDIR)
/execAmi.obj
\
$(INTDIR)
/execTuples.obj
\
$(INTDIR)
/pg_type.obj
\
$(INTDIR)
/view.obj
\
$(INTDIR)
/nodeAppend.obj
\
$(INTDIR)
/defind.obj
\
$(INTDIR)
/nodeNestloop.obj
\
$(INTDIR)
/nbtcompare.obj
\
$(INTDIR)
/rtget.obj
\
$(INTDIR)
/catalog_utils.obj
\
$(INTDIR)
/setrefs.obj
\
$(INTDIR)
/mergeutils.obj
\
$(INTDIR)
/oset.obj
\
$(INTDIR)
/arrayutils.obj
\
$(INTDIR)
/nodeFuncs.obj
\
$(INTDIR)
/rewriteSupport.obj
\
$(INTDIR)
/bufpage.obj
\
$(INTDIR)
/fd.obj
\
$(INTDIR)
/clauseinfo.obj
\
$(INTDIR)
/nabstime.obj
\
$(INTDIR)
/mcxt.obj
\
$(INTDIR)
/ipci.obj
\
$(INTDIR)
/qsort.obj
\
$(INTDIR)
/outfuncs.obj
\
$(INTDIR)
/tqual.obj
\
$(INTDIR)
/keys.obj
\
$(INTDIR)
/clauses.obj
\
$(INTDIR)
/print.obj
\
$(INTDIR)
/postinit.obj
\
$(INTDIR)
/oidchar16.obj
\
$(INTDIR)
/name.obj
\
$(INTDIR)
/tid.obj
\
$(INTDIR)
/
"be-fsstubs.obj"
\
$(INTDIR)
/elog.obj
\
$(INTDIR)
/bufmgr.obj
\
$(INTDIR)
/portalbuf.obj
\
$(INTDIR)
/psort.obj
\
$(INTDIR)
/syscache.obj
\
$(INTDIR)
/exc.obj
\
$(INTDIR)
/selfuncs.obj
\
$(INTDIR)
/var.obj
\
$(INTDIR)
/oid.obj
\
$(INTDIR)
/
"be-pqexec.obj"
\
$(INTDIR)
/ordering.obj
\
$(INTDIR)
/inv_api.obj
\
$(INTDIR)
/buf_table.obj
\
$(INTDIR)
/acl.obj
\
$(INTDIR)
/costsize.obj
\
$(INTDIR)
/catcache.obj
\
$(INTDIR)
/rewriteRemove.obj
\
$(INTDIR)
/parse_query.obj
\
$(INTDIR)
/excabort.obj
\
$(INTDIR)
/lmgr.obj
\
$(INTDIR)
/excid.obj
\
$(INTDIR)
/int.obj
\
$(INTDIR)
/auth.obj
\
$(INTDIR)
/regexp.obj
\
$(INTDIR)
/proc.obj
\
$(INTDIR)
/dbcommands.obj
\
$(INTDIR)
/dynahash.obj
\
$(INTDIR)
/shmem.obj
\
$(INTDIR)
/relnode.obj
\
$(INTDIR)
/fstack.obj
\
$(INTDIR)
/smgr.obj
\
$(INTDIR)
/magic.obj
\
$(INTDIR)
/relcache.obj
\
$(INTDIR)
/varlena.obj
\
$(INTDIR)
/allpaths.obj
\
$(INTDIR)
/portalmem.obj
\
$(INTDIR)
/bit.obj
\
$(INTDIR)
/readfuncs.obj
\
$(INTDIR)
/nodes.obj
\
$(INTDIR)
/chunk.obj
\
$(INTDIR)
/datum.obj
\
$(INTDIR)
/analyze.obj
\
$(INTDIR)
/oidint4.obj
\
$(INTDIR)
/hasht.obj
\
$(INTDIR)
/numutils.obj
\
$(INTDIR)
/pqcomm.obj
\
$(INTDIR)
/indxpath.obj
\
$(INTDIR)
/lispsort.obj
\
$(INTDIR)
/arrayfuncs.obj
\
$(INTDIR)
/copyfuncs.obj
\
$(INTDIR)
/planmain.obj
\
$(INTDIR)
/makefuncs.obj
\
$(INTDIR)
/lsyscache.obj
\
$(INTDIR)
/multi.obj
\
$(INTDIR)
/freelist.obj
\
$(INTDIR)
/aclchk.obj
\
$(INTDIR)
/initsplan.obj
\
$(INTDIR)
/prune.obj
\
$(INTDIR)
/sinvaladt.obj
\
$(INTDIR)
/orindxpath.obj
\
$(INTDIR)
/joinrels.obj
\
$(INTDIR)
/rewriteManip.obj
\
$(INTDIR)
/itemptr.obj
\
$(INTDIR)
/s_lock.obj
\
$(INTDIR)
/miscinit.obj
\
$(INTDIR)
/postgres.obj
\
$(INTDIR)
/parser.obj
\
$(INTDIR)
/tlist.obj
\
$(INTDIR)
/dt.obj
\
$(INTDIR)
/sinval.obj
\
$(INTDIR)
/pqpacket.obj
\
$(INTDIR)
/assert.obj
\
$(INTDIR)
/utility.obj
\
$(INTDIR)
/bool.obj
\
$(INTDIR)
/md.obj
\
$(INTDIR)
/pqsignal.obj
\
$(INTDIR)
/globals.obj
\
$(INTDIR)
/postmaster.obj
\
$(INTDIR)
/joinpath.obj
\
$(INTDIR)
/fastpath.obj
\
$(INTDIR)
/archive.obj
\
$(INTDIR)
/fcache.obj
\
$(INTDIR)
/mm.obj
\
$(INTDIR)
/createplan.obj
\
$(INTDIR)
/read.obj
\
$(INTDIR)
/stringinfo.obj
\
$(INTDIR)
/hashfn.obj
\
$(INTDIR)
/regproc.obj
\
$(INTDIR)
/main.obj
\
$(INTDIR)
/enbl.obj
\
$(INTDIR)
/prepunion.obj
\
$(INTDIR)
/prepqual.obj
\
$(INTDIR)
/planner.obj
\
$(INTDIR)
/clausesel.obj
\
$(INTDIR)
/portal.obj
\
$(INTDIR)
/spin.obj
\
$(INTDIR)
/lock.obj
\
$(INTDIR)
/single.obj
\
$(INTDIR)
/io.obj
\
$(INTDIR)
/
"geo-ops.obj"
\
$(INTDIR)
/dest.obj
\
$(INTDIR)
/rewriteDefine.obj
\
$(INTDIR)
/keywords.obj
\
$(INTDIR)
/hashutils.obj
\
$(INTDIR)
/format.obj
\
$(INTDIR)
/scanner.obj
\
$(INTDIR)
/aset.obj
\
$(INTDIR)
/
"geo-selfuncs.obj"
\
$(INTDIR)
/float.obj
\
$(INTDIR)
/pquery.obj
\
$(INTDIR)
/
"be-dumpdata.obj"
\
$(INTDIR)
/filename.obj
\
$(INTDIR)
/misc.obj
\
$(INTDIR)
/pathnode.obj
\
$(INTDIR)
/inval.obj
\
$(INTDIR)
/smgrtype.obj
\
$(INTDIR)
/joininfo.obj
\
$(INTDIR)
/lselect.obj
\
$(INTDIR)
/rel.obj
\
$(INTDIR)
/internal.obj
\
$(INTDIR)
/preptlist.obj
\
$(INTDIR)
/joinutils.obj
\
$(INTDIR)
/shmqueue.obj
\
$(INTDIR)
/date.obj
\
$(INTDIR)
/locks.obj
\
$(INTDIR)
/not_in.obj
\
$(INTDIR)
/char.obj
\
$(INTDIR)
/rewriteHandler.obj
\
$(INTDIR)
/sets.obj
\
$(INTDIR)
/palloc.obj
\
$(INTDIR)
/indexnode.obj
\
$(INTDIR)
/equalfuncs.obj
\
$(INTDIR)
/oidint2.obj
\
$(INTDIR)
/list.obj
\
$(INTDIR)
/plancat.obj
\
$(INTDIR)
/fmgr.obj
\
$(INTDIR)
/fmgrtab.obj
\
$(INTDIR)
/dllist.obj
\
$(INTDIR)
/nodeGroup.obj
\
$(INTDIR)
/localbuf.obj
\
$(INTDIR)
/cluster.obj
\
$(INTDIR)
/ipc.obj
\
$(INTDIR)
/nt.obj
\
$(INTDIR)
/getopt.obj
\
$(INTDIR)
/bootscanner.obj
\
$(INTDIR)
/scan.obj
\
$(INTDIR)
/bootparse.obj
\
$(INTDIR)
/gram.obj
\
$(INTDIR)
/findbe.obj
\
$(INTDIR)
/regerror.obj
\
$(INTDIR)
/regfree.obj
\
$(INTDIR)
/regcomp.obj
\
$(INTDIR)
/regexec.obj
\
$(INTDIR)
/nbtsort.obj
\
$(INTDIR)
/buf_init.obj
\
$(INTDIR)
/dfmgr.obj
$(OUTDIR)/pglite.exe
:
$(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
$(LINK32)
@<<
$(LINK32_FLAGS)
$(LINK32_OBJS)
<<
!ELSEIF
"$(CFG)"
==
"Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "WinDebug"
# PROP BASE Intermediate_Dir "WinDebug"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "d:\local\forrest\pglite"
# PROP Intermediate_Dir "d:\local\forrest\pglite"
OUTDIR
=
d:
\l
ocal
\f
orrest
\p
glite
INTDIR
=
d:
\l
ocal
\f
orrest
\p
glite
ALL
:
$(OUTDIR)/pglite.exe $(OUTDIR)/pglite.bsc
$(OUTDIR)
:
if
not
exist
$(OUTDIR)/nul
mkdir
$(OUTDIR)
# ADD BASE CPP /nologo /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c
# ADD CPP /nologo /G5 /W3 /GX /Zi /YX /Od /I "g:\pglite\src\backend" /I "g:\pglite\src\backend\port\win32" /I "g:\pglite\src\backend\obj" /I "g:\pglite\src\backend\include" /I "g:\pglite\src\backend\port/win32/regex" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "__STDC__" /D "_POSIX_" /D "_NTSDK" /D "NO_SECURITY" /D "NEED_RUSAGE" /FR /c
CPP_PROJ
=
/nologo /G5 /W3 /GX /Zi /YX /Od /I
"g:
\p
glite
\s
rc
\b
ackend"
/I
\
"g:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32"
/I
"g:
\p
glite
\s
rc
\b
ackend
\o
bj"
/I
\
"g:
\p
glite
\s
rc
\b
ackend
\i
nclude"
/I
"g:
\p
glite
\s
rc
\b
ackend
\p
ort/win32/regex"
/D
\
"_DEBUG"
/D
"WIN32"
/D
"_CONSOLE"
/D
"__STDC__"
/D
"_POSIX_"
/D
"_NTSDK"
/D
\
"NO_SECURITY"
/D
"NEED_RUSAGE"
/FR
$(INTDIR)
/ /Fp
$(OUTDIR)
/
"pglite.pch"
\
/Fo
$(INTDIR)
/ /Fd
$(OUTDIR)
/
"pglite.pdb"
/c
CPP_OBJS
=
d:
\l
ocal
\f
orrest
\p
glite/
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32
=
bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS
=
/nologo /o
$(OUTDIR)
/
"pglite.bsc"
BSC32_SBRS
=
\
$(INTDIR)
/scankey.sbr
\
$(INTDIR)
/printtup.sbr
\
$(INTDIR)
/indexvalid.sbr
\
$(INTDIR)
/heaptuple.sbr
\
$(INTDIR)
/tupdesc.sbr
\
$(INTDIR)
/indextuple.sbr
\
$(INTDIR)
/heapvalid.sbr
\
$(INTDIR)
/hashinsert.sbr
\
$(INTDIR)
/hashstrat.sbr
\
$(INTDIR)
/hashutil.sbr
\
$(INTDIR)
/hashpage.sbr
\
$(INTDIR)
/hashsearch.sbr
\
$(INTDIR)
/hashscan.sbr
\
$(INTDIR)
/hashfunc.sbr
\
$(INTDIR)
/hash.sbr
\
$(INTDIR)
/hashovfl.sbr
\
$(INTDIR)
/bootstrap.sbr
\
$(INTDIR)
/genam.sbr
\
$(INTDIR)
/creatinh.sbr
\
$(INTDIR)
/nodeSeqscan.sbr
\
$(INTDIR)
/nodeUnique.sbr
\
$(INTDIR)
/rename.sbr
\
$(INTDIR)
/transsup.sbr
\
$(INTDIR)
/transam.sbr
\
$(INTDIR)
/define.sbr
\
$(INTDIR)
/execMain.sbr
\
$(INTDIR)
/xid.sbr
\
$(INTDIR)
/nodeAgg.sbr
\
$(INTDIR)
/nbtpage.sbr
\
$(INTDIR)
/execScan.sbr
\
$(INTDIR)
/nbtree.sbr
\
$(INTDIR)
/rtscan.sbr
\
$(INTDIR)
/indexam.sbr
\
$(INTDIR)
/execQual.sbr
\
$(INTDIR)
/nodeHash.sbr
\
$(INTDIR)
/nbtscan.sbr
\
$(INTDIR)
/hio.sbr
\
$(INTDIR)
/pg_proc.sbr
\
$(INTDIR)
/stats.sbr
\
$(INTDIR)
/nodeMaterial.sbr
\
$(INTDIR)
/varsup.sbr
\
$(INTDIR)
/copy.sbr
\
$(INTDIR)
/rtproc.sbr
\
$(INTDIR)
/functions.sbr
\
$(INTDIR)
/nodeHashjoin.sbr
\
$(INTDIR)
/catalog.sbr
\
$(INTDIR)
/nbtinsert.sbr
\
$(INTDIR)
/rtree.sbr
\
$(INTDIR)
/version.sbr
\
$(INTDIR)
/async.sbr
\
$(INTDIR)
/nbtutils.sbr
\
$(INTDIR)
/vacuum.sbr
\
$(INTDIR)
/rtstrat.sbr
\
$(INTDIR)
/execFlatten.sbr
\
$(INTDIR)
/nodeTee.sbr
\
$(INTDIR)
/nodeIndexscan.sbr
\
$(INTDIR)
/remove.sbr
\
$(INTDIR)
/indexing.sbr
\
$(INTDIR)
/command.sbr
\
$(INTDIR)
/nbtsearch.sbr
\
$(INTDIR)
/heapam.sbr
\
$(INTDIR)
/nodeSort.sbr
\
$(INTDIR)
/execProcnode.sbr
\
$(INTDIR)
/nodeResult.sbr
\
$(INTDIR)
/index.sbr
\
$(INTDIR)
/xact.sbr
\
$(INTDIR)
/nodeMergejoin.sbr
\
$(INTDIR)
/pg_operator.sbr
\
$(INTDIR)
/execJunk.sbr
\
$(INTDIR)
/pg_aggregate.sbr
\
$(INTDIR)
/istrat.sbr
\
$(INTDIR)
/execUtils.sbr
\
$(INTDIR)
/purge.sbr
\
$(INTDIR)
/heap.sbr
\
$(INTDIR)
/nbtstrat.sbr
\
$(INTDIR)
/execAmi.sbr
\
$(INTDIR)
/execTuples.sbr
\
$(INTDIR)
/pg_type.sbr
\
$(INTDIR)
/view.sbr
\
$(INTDIR)
/nodeAppend.sbr
\
$(INTDIR)
/defind.sbr
\
$(INTDIR)
/nodeNestloop.sbr
\
$(INTDIR)
/nbtcompare.sbr
\
$(INTDIR)
/rtget.sbr
\
$(INTDIR)
/catalog_utils.sbr
\
$(INTDIR)
/setrefs.sbr
\
$(INTDIR)
/mergeutils.sbr
\
$(INTDIR)
/oset.sbr
\
$(INTDIR)
/arrayutils.sbr
\
$(INTDIR)
/nodeFuncs.sbr
\
$(INTDIR)
/rewriteSupport.sbr
\
$(INTDIR)
/bufpage.sbr
\
$(INTDIR)
/fd.sbr
\
$(INTDIR)
/clauseinfo.sbr
\
$(INTDIR)
/nabstime.sbr
\
$(INTDIR)
/mcxt.sbr
\
$(INTDIR)
/ipci.sbr
\
$(INTDIR)
/qsort.sbr
\
$(INTDIR)
/outfuncs.sbr
\
$(INTDIR)
/tqual.sbr
\
$(INTDIR)
/keys.sbr
\
$(INTDIR)
/clauses.sbr
\
$(INTDIR)
/print.sbr
\
$(INTDIR)
/postinit.sbr
\
$(INTDIR)
/oidchar16.sbr
\
$(INTDIR)
/name.sbr
\
$(INTDIR)
/tid.sbr
\
$(INTDIR)
/
"be-fsstubs.sbr"
\
$(INTDIR)
/elog.sbr
\
$(INTDIR)
/bufmgr.sbr
\
$(INTDIR)
/portalbuf.sbr
\
$(INTDIR)
/psort.sbr
\
$(INTDIR)
/syscache.sbr
\
$(INTDIR)
/exc.sbr
\
$(INTDIR)
/selfuncs.sbr
\
$(INTDIR)
/var.sbr
\
$(INTDIR)
/oid.sbr
\
$(INTDIR)
/
"be-pqexec.sbr"
\
$(INTDIR)
/ordering.sbr
\
$(INTDIR)
/inv_api.sbr
\
$(INTDIR)
/buf_table.sbr
\
$(INTDIR)
/acl.sbr
\
$(INTDIR)
/costsize.sbr
\
$(INTDIR)
/catcache.sbr
\
$(INTDIR)
/rewriteRemove.sbr
\
$(INTDIR)
/parse_query.sbr
\
$(INTDIR)
/excabort.sbr
\
$(INTDIR)
/lmgr.sbr
\
$(INTDIR)
/excid.sbr
\
$(INTDIR)
/int.sbr
\
$(INTDIR)
/auth.sbr
\
$(INTDIR)
/regexp.sbr
\
$(INTDIR)
/proc.sbr
\
$(INTDIR)
/dbcommands.sbr
\
$(INTDIR)
/dynahash.sbr
\
$(INTDIR)
/shmem.sbr
\
$(INTDIR)
/relnode.sbr
\
$(INTDIR)
/fstack.sbr
\
$(INTDIR)
/smgr.sbr
\
$(INTDIR)
/magic.sbr
\
$(INTDIR)
/relcache.sbr
\
$(INTDIR)
/varlena.sbr
\
$(INTDIR)
/allpaths.sbr
\
$(INTDIR)
/portalmem.sbr
\
$(INTDIR)
/bit.sbr
\
$(INTDIR)
/readfuncs.sbr
\
$(INTDIR)
/nodes.sbr
\
$(INTDIR)
/chunk.sbr
\
$(INTDIR)
/datum.sbr
\
$(INTDIR)
/analyze.sbr
\
$(INTDIR)
/oidint4.sbr
\
$(INTDIR)
/hasht.sbr
\
$(INTDIR)
/numutils.sbr
\
$(INTDIR)
/pqcomm.sbr
\
$(INTDIR)
/indxpath.sbr
\
$(INTDIR)
/lispsort.sbr
\
$(INTDIR)
/arrayfuncs.sbr
\
$(INTDIR)
/copyfuncs.sbr
\
$(INTDIR)
/planmain.sbr
\
$(INTDIR)
/makefuncs.sbr
\
$(INTDIR)
/lsyscache.sbr
\
$(INTDIR)
/multi.sbr
\
$(INTDIR)
/freelist.sbr
\
$(INTDIR)
/aclchk.sbr
\
$(INTDIR)
/initsplan.sbr
\
$(INTDIR)
/prune.sbr
\
$(INTDIR)
/sinvaladt.sbr
\
$(INTDIR)
/orindxpath.sbr
\
$(INTDIR)
/joinrels.sbr
\
$(INTDIR)
/rewriteManip.sbr
\
$(INTDIR)
/itemptr.sbr
\
$(INTDIR)
/s_lock.sbr
\
$(INTDIR)
/miscinit.sbr
\
$(INTDIR)
/postgres.sbr
\
$(INTDIR)
/parser.sbr
\
$(INTDIR)
/tlist.sbr
\
$(INTDIR)
/dt.sbr
\
$(INTDIR)
/sinval.sbr
\
$(INTDIR)
/pqpacket.sbr
\
$(INTDIR)
/assert.sbr
\
$(INTDIR)
/utility.sbr
\
$(INTDIR)
/bool.sbr
\
$(INTDIR)
/md.sbr
\
$(INTDIR)
/pqsignal.sbr
\
$(INTDIR)
/globals.sbr
\
$(INTDIR)
/postmaster.sbr
\
$(INTDIR)
/joinpath.sbr
\
$(INTDIR)
/fastpath.sbr
\
$(INTDIR)
/archive.sbr
\
$(INTDIR)
/fcache.sbr
\
$(INTDIR)
/mm.sbr
\
$(INTDIR)
/createplan.sbr
\
$(INTDIR)
/read.sbr
\
$(INTDIR)
/stringinfo.sbr
\
$(INTDIR)
/hashfn.sbr
\
$(INTDIR)
/regproc.sbr
\
$(INTDIR)
/main.sbr
\
$(INTDIR)
/enbl.sbr
\
$(INTDIR)
/prepunion.sbr
\
$(INTDIR)
/prepqual.sbr
\
$(INTDIR)
/planner.sbr
\
$(INTDIR)
/clausesel.sbr
\
$(INTDIR)
/portal.sbr
\
$(INTDIR)
/spin.sbr
\
$(INTDIR)
/lock.sbr
\
$(INTDIR)
/single.sbr
\
$(INTDIR)
/io.sbr
\
$(INTDIR)
/
"geo-ops.sbr"
\
$(INTDIR)
/dest.sbr
\
$(INTDIR)
/rewriteDefine.sbr
\
$(INTDIR)
/keywords.sbr
\
$(INTDIR)
/hashutils.sbr
\
$(INTDIR)
/format.sbr
\
$(INTDIR)
/scanner.sbr
\
$(INTDIR)
/aset.sbr
\
$(INTDIR)
/
"geo-selfuncs.sbr"
\
$(INTDIR)
/float.sbr
\
$(INTDIR)
/pquery.sbr
\
$(INTDIR)
/
"be-dumpdata.sbr"
\
$(INTDIR)
/filename.sbr
\
$(INTDIR)
/misc.sbr
\
$(INTDIR)
/pathnode.sbr
\
$(INTDIR)
/inval.sbr
\
$(INTDIR)
/smgrtype.sbr
\
$(INTDIR)
/joininfo.sbr
\
$(INTDIR)
/lselect.sbr
\
$(INTDIR)
/rel.sbr
\
$(INTDIR)
/internal.sbr
\
$(INTDIR)
/preptlist.sbr
\
$(INTDIR)
/joinutils.sbr
\
$(INTDIR)
/shmqueue.sbr
\
$(INTDIR)
/date.sbr
\
$(INTDIR)
/locks.sbr
\
$(INTDIR)
/not_in.sbr
\
$(INTDIR)
/char.sbr
\
$(INTDIR)
/rewriteHandler.sbr
\
$(INTDIR)
/sets.sbr
\
$(INTDIR)
/palloc.sbr
\
$(INTDIR)
/indexnode.sbr
\
$(INTDIR)
/equalfuncs.sbr
\
$(INTDIR)
/oidint2.sbr
\
$(INTDIR)
/list.sbr
\
$(INTDIR)
/plancat.sbr
\
$(INTDIR)
/fmgr.sbr
\
$(INTDIR)
/fmgrtab.sbr
\
$(INTDIR)
/dllist.sbr
\
$(INTDIR)
/nodeGroup.sbr
\
$(INTDIR)
/localbuf.sbr
\
$(INTDIR)
/cluster.sbr
\
$(INTDIR)
/ipc.sbr
\
$(INTDIR)
/nt.sbr
\
$(INTDIR)
/getopt.sbr
\
$(INTDIR)
/bootscanner.sbr
\
$(INTDIR)
/scan.sbr
\
$(INTDIR)
/bootparse.sbr
\
$(INTDIR)
/gram.sbr
\
$(INTDIR)
/findbe.sbr
\
$(INTDIR)
/regerror.sbr
\
$(INTDIR)
/regfree.sbr
\
$(INTDIR)
/regcomp.sbr
\
$(INTDIR)
/regexec.sbr
\
$(INTDIR)
/nbtsort.sbr
\
$(INTDIR)
/buf_init.sbr
\
$(INTDIR)
/dfmgr.sbr
$(OUTDIR)/pglite.bsc
:
$(OUTDIR) $(BSC32_SBRS)
$(BSC32)
@<<
$(BSC32_FLAGS)
$(BSC32_SBRS)
<<
LINK32
=
link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386
# SUBTRACT LINK32 /PDB:none
LINK32_FLAGS
=
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
\
odbccp32.lib wsock32.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes
\
/PDB:
$(OUTDIR)
/
"pglite.pdb"
/DEBUG /MACHINE:I386 /OUT:
$(OUTDIR)
/
"pglite.exe"
DEF_FILE
=
LINK32_OBJS
=
\
$(INTDIR)
/scankey.obj
\
$(INTDIR)
/printtup.obj
\
$(INTDIR)
/indexvalid.obj
\
$(INTDIR)
/heaptuple.obj
\
$(INTDIR)
/tupdesc.obj
\
$(INTDIR)
/indextuple.obj
\
$(INTDIR)
/heapvalid.obj
\
$(INTDIR)
/hashinsert.obj
\
$(INTDIR)
/hashstrat.obj
\
$(INTDIR)
/hashutil.obj
\
$(INTDIR)
/hashpage.obj
\
$(INTDIR)
/hashsearch.obj
\
$(INTDIR)
/hashscan.obj
\
$(INTDIR)
/hashfunc.obj
\
$(INTDIR)
/hash.obj
\
$(INTDIR)
/hashovfl.obj
\
$(INTDIR)
/bootstrap.obj
\
$(INTDIR)
/genam.obj
\
$(INTDIR)
/creatinh.obj
\
$(INTDIR)
/nodeSeqscan.obj
\
$(INTDIR)
/nodeUnique.obj
\
$(INTDIR)
/rename.obj
\
$(INTDIR)
/transsup.obj
\
$(INTDIR)
/transam.obj
\
$(INTDIR)
/define.obj
\
$(INTDIR)
/execMain.obj
\
$(INTDIR)
/xid.obj
\
$(INTDIR)
/nodeAgg.obj
\
$(INTDIR)
/nbtpage.obj
\
$(INTDIR)
/execScan.obj
\
$(INTDIR)
/nbtree.obj
\
$(INTDIR)
/rtscan.obj
\
$(INTDIR)
/indexam.obj
\
$(INTDIR)
/execQual.obj
\
$(INTDIR)
/nodeHash.obj
\
$(INTDIR)
/nbtscan.obj
\
$(INTDIR)
/hio.obj
\
$(INTDIR)
/pg_proc.obj
\
$(INTDIR)
/stats.obj
\
$(INTDIR)
/nodeMaterial.obj
\
$(INTDIR)
/varsup.obj
\
$(INTDIR)
/copy.obj
\
$(INTDIR)
/rtproc.obj
\
$(INTDIR)
/functions.obj
\
$(INTDIR)
/nodeHashjoin.obj
\
$(INTDIR)
/catalog.obj
\
$(INTDIR)
/nbtinsert.obj
\
$(INTDIR)
/rtree.obj
\
$(INTDIR)
/version.obj
\
$(INTDIR)
/async.obj
\
$(INTDIR)
/nbtutils.obj
\
$(INTDIR)
/vacuum.obj
\
$(INTDIR)
/rtstrat.obj
\
$(INTDIR)
/execFlatten.obj
\
$(INTDIR)
/nodeTee.obj
\
$(INTDIR)
/nodeIndexscan.obj
\
$(INTDIR)
/remove.obj
\
$(INTDIR)
/indexing.obj
\
$(INTDIR)
/command.obj
\
$(INTDIR)
/nbtsearch.obj
\
$(INTDIR)
/heapam.obj
\
$(INTDIR)
/nodeSort.obj
\
$(INTDIR)
/execProcnode.obj
\
$(INTDIR)
/nodeResult.obj
\
$(INTDIR)
/index.obj
\
$(INTDIR)
/xact.obj
\
$(INTDIR)
/nodeMergejoin.obj
\
$(INTDIR)
/pg_operator.obj
\
$(INTDIR)
/execJunk.obj
\
$(INTDIR)
/pg_aggregate.obj
\
$(INTDIR)
/istrat.obj
\
$(INTDIR)
/execUtils.obj
\
$(INTDIR)
/purge.obj
\
$(INTDIR)
/heap.obj
\
$(INTDIR)
/nbtstrat.obj
\
$(INTDIR)
/execAmi.obj
\
$(INTDIR)
/execTuples.obj
\
$(INTDIR)
/pg_type.obj
\
$(INTDIR)
/view.obj
\
$(INTDIR)
/nodeAppend.obj
\
$(INTDIR)
/defind.obj
\
$(INTDIR)
/nodeNestloop.obj
\
$(INTDIR)
/nbtcompare.obj
\
$(INTDIR)
/rtget.obj
\
$(INTDIR)
/catalog_utils.obj
\
$(INTDIR)
/setrefs.obj
\
$(INTDIR)
/mergeutils.obj
\
$(INTDIR)
/oset.obj
\
$(INTDIR)
/arrayutils.obj
\
$(INTDIR)
/nodeFuncs.obj
\
$(INTDIR)
/rewriteSupport.obj
\
$(INTDIR)
/bufpage.obj
\
$(INTDIR)
/fd.obj
\
$(INTDIR)
/clauseinfo.obj
\
$(INTDIR)
/nabstime.obj
\
$(INTDIR)
/mcxt.obj
\
$(INTDIR)
/ipci.obj
\
$(INTDIR)
/qsort.obj
\
$(INTDIR)
/outfuncs.obj
\
$(INTDIR)
/tqual.obj
\
$(INTDIR)
/keys.obj
\
$(INTDIR)
/clauses.obj
\
$(INTDIR)
/print.obj
\
$(INTDIR)
/postinit.obj
\
$(INTDIR)
/oidchar16.obj
\
$(INTDIR)
/name.obj
\
$(INTDIR)
/tid.obj
\
$(INTDIR)
/
"be-fsstubs.obj"
\
$(INTDIR)
/elog.obj
\
$(INTDIR)
/bufmgr.obj
\
$(INTDIR)
/portalbuf.obj
\
$(INTDIR)
/psort.obj
\
$(INTDIR)
/syscache.obj
\
$(INTDIR)
/exc.obj
\
$(INTDIR)
/selfuncs.obj
\
$(INTDIR)
/var.obj
\
$(INTDIR)
/oid.obj
\
$(INTDIR)
/
"be-pqexec.obj"
\
$(INTDIR)
/ordering.obj
\
$(INTDIR)
/inv_api.obj
\
$(INTDIR)
/buf_table.obj
\
$(INTDIR)
/acl.obj
\
$(INTDIR)
/costsize.obj
\
$(INTDIR)
/catcache.obj
\
$(INTDIR)
/rewriteRemove.obj
\
$(INTDIR)
/parse_query.obj
\
$(INTDIR)
/excabort.obj
\
$(INTDIR)
/lmgr.obj
\
$(INTDIR)
/excid.obj
\
$(INTDIR)
/int.obj
\
$(INTDIR)
/auth.obj
\
$(INTDIR)
/regexp.obj
\
$(INTDIR)
/proc.obj
\
$(INTDIR)
/dbcommands.obj
\
$(INTDIR)
/dynahash.obj
\
$(INTDIR)
/shmem.obj
\
$(INTDIR)
/relnode.obj
\
$(INTDIR)
/fstack.obj
\
$(INTDIR)
/smgr.obj
\
$(INTDIR)
/magic.obj
\
$(INTDIR)
/relcache.obj
\
$(INTDIR)
/varlena.obj
\
$(INTDIR)
/allpaths.obj
\
$(INTDIR)
/portalmem.obj
\
$(INTDIR)
/bit.obj
\
$(INTDIR)
/readfuncs.obj
\
$(INTDIR)
/nodes.obj
\
$(INTDIR)
/chunk.obj
\
$(INTDIR)
/datum.obj
\
$(INTDIR)
/analyze.obj
\
$(INTDIR)
/oidint4.obj
\
$(INTDIR)
/hasht.obj
\
$(INTDIR)
/numutils.obj
\
$(INTDIR)
/pqcomm.obj
\
$(INTDIR)
/indxpath.obj
\
$(INTDIR)
/lispsort.obj
\
$(INTDIR)
/arrayfuncs.obj
\
$(INTDIR)
/copyfuncs.obj
\
$(INTDIR)
/planmain.obj
\
$(INTDIR)
/makefuncs.obj
\
$(INTDIR)
/lsyscache.obj
\
$(INTDIR)
/multi.obj
\
$(INTDIR)
/freelist.obj
\
$(INTDIR)
/aclchk.obj
\
$(INTDIR)
/initsplan.obj
\
$(INTDIR)
/prune.obj
\
$(INTDIR)
/sinvaladt.obj
\
$(INTDIR)
/orindxpath.obj
\
$(INTDIR)
/joinrels.obj
\
$(INTDIR)
/rewriteManip.obj
\
$(INTDIR)
/itemptr.obj
\
$(INTDIR)
/s_lock.obj
\
$(INTDIR)
/miscinit.obj
\
$(INTDIR)
/postgres.obj
\
$(INTDIR)
/parser.obj
\
$(INTDIR)
/tlist.obj
\
$(INTDIR)
/dt.obj
\
$(INTDIR)
/sinval.obj
\
$(INTDIR)
/pqpacket.obj
\
$(INTDIR)
/assert.obj
\
$(INTDIR)
/utility.obj
\
$(INTDIR)
/bool.obj
\
$(INTDIR)
/md.obj
\
$(INTDIR)
/pqsignal.obj
\
$(INTDIR)
/globals.obj
\
$(INTDIR)
/postmaster.obj
\
$(INTDIR)
/joinpath.obj
\
$(INTDIR)
/fastpath.obj
\
$(INTDIR)
/archive.obj
\
$(INTDIR)
/fcache.obj
\
$(INTDIR)
/mm.obj
\
$(INTDIR)
/createplan.obj
\
$(INTDIR)
/read.obj
\
$(INTDIR)
/stringinfo.obj
\
$(INTDIR)
/hashfn.obj
\
$(INTDIR)
/regproc.obj
\
$(INTDIR)
/main.obj
\
$(INTDIR)
/enbl.obj
\
$(INTDIR)
/prepunion.obj
\
$(INTDIR)
/prepqual.obj
\
$(INTDIR)
/planner.obj
\
$(INTDIR)
/clausesel.obj
\
$(INTDIR)
/portal.obj
\
$(INTDIR)
/spin.obj
\
$(INTDIR)
/lock.obj
\
$(INTDIR)
/single.obj
\
$(INTDIR)
/io.obj
\
$(INTDIR)
/
"geo-ops.obj"
\
$(INTDIR)
/dest.obj
\
$(INTDIR)
/rewriteDefine.obj
\
$(INTDIR)
/keywords.obj
\
$(INTDIR)
/hashutils.obj
\
$(INTDIR)
/format.obj
\
$(INTDIR)
/scanner.obj
\
$(INTDIR)
/aset.obj
\
$(INTDIR)
/
"geo-selfuncs.obj"
\
$(INTDIR)
/float.obj
\
$(INTDIR)
/pquery.obj
\
$(INTDIR)
/
"be-dumpdata.obj"
\
$(INTDIR)
/filename.obj
\
$(INTDIR)
/misc.obj
\
$(INTDIR)
/pathnode.obj
\
$(INTDIR)
/inval.obj
\
$(INTDIR)
/smgrtype.obj
\
$(INTDIR)
/joininfo.obj
\
$(INTDIR)
/lselect.obj
\
$(INTDIR)
/rel.obj
\
$(INTDIR)
/internal.obj
\
$(INTDIR)
/preptlist.obj
\
$(INTDIR)
/joinutils.obj
\
$(INTDIR)
/shmqueue.obj
\
$(INTDIR)
/date.obj
\
$(INTDIR)
/locks.obj
\
$(INTDIR)
/not_in.obj
\
$(INTDIR)
/char.obj
\
$(INTDIR)
/rewriteHandler.obj
\
$(INTDIR)
/sets.obj
\
$(INTDIR)
/palloc.obj
\
$(INTDIR)
/indexnode.obj
\
$(INTDIR)
/equalfuncs.obj
\
$(INTDIR)
/oidint2.obj
\
$(INTDIR)
/list.obj
\
$(INTDIR)
/plancat.obj
\
$(INTDIR)
/fmgr.obj
\
$(INTDIR)
/fmgrtab.obj
\
$(INTDIR)
/dllist.obj
\
$(INTDIR)
/nodeGroup.obj
\
$(INTDIR)
/localbuf.obj
\
$(INTDIR)
/cluster.obj
\
$(INTDIR)
/ipc.obj
\
$(INTDIR)
/nt.obj
\
$(INTDIR)
/getopt.obj
\
$(INTDIR)
/bootscanner.obj
\
$(INTDIR)
/scan.obj
\
$(INTDIR)
/bootparse.obj
\
$(INTDIR)
/gram.obj
\
$(INTDIR)
/findbe.obj
\
$(INTDIR)
/regerror.obj
\
$(INTDIR)
/regfree.obj
\
$(INTDIR)
/regcomp.obj
\
$(INTDIR)
/regexec.obj
\
$(INTDIR)
/nbtsort.obj
\
$(INTDIR)
/buf_init.obj
\
$(INTDIR)
/dfmgr.obj
$(OUTDIR)/pglite.exe
:
$(OUTDIR) $(DEF_FILE) $(LINK32_OBJS)
$(LINK32)
@<<
$(LINK32_FLAGS)
$(LINK32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj
:
$(CPP)
$(CPP_PROJ)
$<
.cpp{$(CPP_OBJS)}.obj
:
$(CPP)
$(CPP_PROJ)
$<
.cxx{$(CPP_OBJS)}.obj
:
$(CPP)
$(CPP_PROJ)
$<
################################################################################
# Begin Group "Source Files"
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\s
cankey.c
$(INTDIR)/scankey.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\p
rinttup.c
$(INTDIR)/printtup.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\i
ndexvalid.c
$(INTDIR)/indexvalid.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\h
eaptuple.c
$(INTDIR)/heaptuple.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\t
updesc.c
$(INTDIR)/tupdesc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\i
ndextuple.c
$(INTDIR)/indextuple.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\c
ommon
\h
eapvalid.c
$(INTDIR)/heapvalid.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashinsert.c
$(INTDIR)/hashinsert.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashstrat.c
$(INTDIR)/hashstrat.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashutil.c
$(INTDIR)/hashutil.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashpage.c
$(INTDIR)/hashpage.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashsearch.c
$(INTDIR)/hashsearch.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashscan.c
$(INTDIR)/hashscan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashfunc.c
$(INTDIR)/hashfunc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ash.c
$(INTDIR)/hash.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
ash
\h
ashovfl.c
$(INTDIR)/hashovfl.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\b
ootstrap
\b
ootstrap.c
$(INTDIR)/bootstrap.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\i
ndex
\g
enam.c
$(INTDIR)/genam.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\c
reatinh.c
$(INTDIR)/creatinh.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeSeqscan.c
$(INTDIR)/nodeSeqscan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeUnique.c
$(INTDIR)/nodeUnique.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\r
ename.c
$(INTDIR)/rename.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\t
ransam
\t
ranssup.c
$(INTDIR)/transsup.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\t
ransam
\t
ransam.c
$(INTDIR)/transam.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\d
efine.c
$(INTDIR)/define.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecMain.c
$(INTDIR)/execMain.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\t
ransam
\x
id.c
$(INTDIR)/xid.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeAgg.c
$(INTDIR)/nodeAgg.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btpage.c
$(INTDIR)/nbtpage.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecScan.c
$(INTDIR)/execScan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btree.c
$(INTDIR)/nbtree.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\r
tree
\r
tscan.c
$(INTDIR)/rtscan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\i
ndex
\i
ndexam.c
$(INTDIR)/indexam.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecQual.c
$(INTDIR)/execQual.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeHash.c
$(INTDIR)/nodeHash.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btscan.c
$(INTDIR)/nbtscan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
eap
\h
io.c
$(INTDIR)/hio.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\p
g_proc.c
$(INTDIR)/pg_proc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
eap
\s
tats.c
$(INTDIR)/stats.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeMaterial.c
$(INTDIR)/nodeMaterial.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\t
ransam
\v
arsup.c
$(INTDIR)/varsup.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\c
opy.c
$(INTDIR)/copy.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\r
tree
\r
tproc.c
$(INTDIR)/rtproc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\f
unctions.c
$(INTDIR)/functions.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeHashjoin.c
$(INTDIR)/nodeHashjoin.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\c
atalog.c
$(INTDIR)/catalog.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btinsert.c
$(INTDIR)/nbtinsert.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\r
tree
\r
tree.c
$(INTDIR)/rtree.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\v
ersion.c
$(INTDIR)/version.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\a
sync.c
$(INTDIR)/async.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btutils.c
$(INTDIR)/nbtutils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\v
acuum.c
$(INTDIR)/vacuum.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\r
tree
\r
tstrat.c
$(INTDIR)/rtstrat.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecFlatten.c
$(INTDIR)/execFlatten.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeTee.c
$(INTDIR)/nodeTee.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeIndexscan.c
$(INTDIR)/nodeIndexscan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\r
emove.c
$(INTDIR)/remove.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\i
ndexing.c
$(INTDIR)/indexing.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\c
ommand.c
$(INTDIR)/command.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btsearch.c
$(INTDIR)/nbtsearch.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\h
eap
\h
eapam.c
$(INTDIR)/heapam.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeSort.c
$(INTDIR)/nodeSort.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecProcnode.c
$(INTDIR)/execProcnode.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeResult.c
$(INTDIR)/nodeResult.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\i
ndex.c
$(INTDIR)/index.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\t
ransam
\x
act.c
$(INTDIR)/xact.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeMergejoin.c
$(INTDIR)/nodeMergejoin.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\p
g_operator.c
$(INTDIR)/pg_operator.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecJunk.c
$(INTDIR)/execJunk.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\p
g_aggregate.c
$(INTDIR)/pg_aggregate.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\i
ndex
\i
strat.c
$(INTDIR)/istrat.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecUtils.c
$(INTDIR)/execUtils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\p
urge.c
$(INTDIR)/purge.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\h
eap.c
$(INTDIR)/heap.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btstrat.c
$(INTDIR)/nbtstrat.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecAmi.c
$(INTDIR)/execAmi.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\e
xecTuples.c
$(INTDIR)/execTuples.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
atalog
\p
g_type.c
$(INTDIR)/pg_type.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\v
iew.c
$(INTDIR)/view.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeAppend.c
$(INTDIR)/nodeAppend.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\d
efind.c
$(INTDIR)/defind.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeNestloop.c
$(INTDIR)/nodeNestloop.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btcompare.c
$(INTDIR)/nbtcompare.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\r
tree
\r
tget.c
$(INTDIR)/rtget.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\c
atalog_utils.c
$(INTDIR)/catalog_utils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
lan
\s
etrefs.c
$(INTDIR)/setrefs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\m
ergeutils.c
$(INTDIR)/mergeutils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\m
mgr
\o
set.c
$(INTDIR)/oset.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\a
rrayutils.c
$(INTDIR)/arrayutils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\n
odeFuncs.c
$(INTDIR)/nodeFuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\r
ewrite
\r
ewriteSupport.c
$(INTDIR)/rewriteSupport.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\p
age
\b
ufpage.c
$(INTDIR)/bufpage.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\f
ile
\f
d.c
$(INTDIR)/fd.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\c
lauseinfo.c
$(INTDIR)/clauseinfo.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\n
abstime.c
$(INTDIR)/nabstime.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\m
mgr
\m
cxt.c
$(INTDIR)/mcxt.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\i
pci.c
$(INTDIR)/ipci.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\q
sort.c
$(INTDIR)/qsort.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\o
utfuncs.c
$(INTDIR)/outfuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\t
ime
\t
qual.c
$(INTDIR)/tqual.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\k
eys.c
$(INTDIR)/keys.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\c
lauses.c
$(INTDIR)/clauses.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\p
rint.c
$(INTDIR)/print.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\i
nit
\p
ostinit.c
$(INTDIR)/postinit.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\o
idchar16.c
$(INTDIR)/oidchar16.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\n
ame.c
$(INTDIR)/name.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\t
id.c
$(INTDIR)/tid.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
"G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\b
e-fsstubs.c"
$(INTDIR)/"be-fsstubs.obj"
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\e
rror
\e
log.c
$(INTDIR)/elog.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\b
uffer
\b
ufmgr.c
$(INTDIR)/bufmgr.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\p
ortalbuf.c
$(INTDIR)/portalbuf.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\s
ort
\p
sort.c
$(INTDIR)/psort.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\s
yscache.c
$(INTDIR)/syscache.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\e
rror
\e
xc.c
$(INTDIR)/exc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\s
elfuncs.c
$(INTDIR)/selfuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\v
ar.c
$(INTDIR)/var.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\o
id.c
$(INTDIR)/oid.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
"G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\b
e-pqexec.c"
$(INTDIR)/"be-pqexec.obj"
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\o
rdering.c
$(INTDIR)/ordering.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\l
arge_object
\i
nv_api.c
$(INTDIR)/inv_api.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\b
uffer
\b
uf_table.c
$(INTDIR)/buf_table.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\a
cl.c
$(INTDIR)/acl.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\c
ostsize.c
$(INTDIR)/costsize.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\c
atcache.c
$(INTDIR)/catcache.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\r
ewrite
\r
ewriteRemove.c
$(INTDIR)/rewriteRemove.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\p
arse_query.c
$(INTDIR)/parse_query.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\e
rror
\e
xcabort.c
$(INTDIR)/excabort.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\l
mgr
\l
mgr.c
$(INTDIR)/lmgr.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\e
rror
\e
xcid.c
$(INTDIR)/excid.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\i
nt.c
$(INTDIR)/int.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\a
uth.c
$(INTDIR)/auth.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\r
egexp.c
$(INTDIR)/regexp.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\l
mgr
\p
roc.c
$(INTDIR)/proc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\d
bcommands.c
$(INTDIR)/dbcommands.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\h
ash
\d
ynahash.c
$(INTDIR)/dynahash.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\s
hmem.c
$(INTDIR)/shmem.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\r
elnode.c
$(INTDIR)/relnode.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\f
stack.c
$(INTDIR)/fstack.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\s
mgr
\s
mgr.c
$(INTDIR)/smgr.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\i
nit
\m
agic.c
$(INTDIR)/magic.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\r
elcache.c
$(INTDIR)/relcache.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\v
arlena.c
$(INTDIR)/varlena.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\a
llpaths.c
$(INTDIR)/allpaths.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\m
mgr
\p
ortalmem.c
$(INTDIR)/portalmem.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\b
it.c
$(INTDIR)/bit.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\r
eadfuncs.c
$(INTDIR)/readfuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\n
odes.c
$(INTDIR)/nodes.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\c
hunk.c
$(INTDIR)/chunk.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\d
atum.c
$(INTDIR)/datum.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\a
nalyze.c
$(INTDIR)/analyze.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\o
idint4.c
$(INTDIR)/oidint4.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\h
asht.c
$(INTDIR)/hasht.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\n
umutils.c
$(INTDIR)/numutils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\p
qcomm.c
$(INTDIR)/pqcomm.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\i
ndxpath.c
$(INTDIR)/indxpath.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\l
ispsort.c
$(INTDIR)/lispsort.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\a
rrayfuncs.c
$(INTDIR)/arrayfuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\c
opyfuncs.c
$(INTDIR)/copyfuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
lan
\p
lanmain.c
$(INTDIR)/planmain.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\m
akefuncs.c
$(INTDIR)/makefuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\l
syscache.c
$(INTDIR)/lsyscache.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\l
mgr
\m
ulti.c
$(INTDIR)/multi.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\b
uffer
\f
reelist.c
$(INTDIR)/freelist.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\t
cop
\a
clchk.c
$(INTDIR)/aclchk.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
lan
\i
nitsplan.c
$(INTDIR)/initsplan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\p
rune.c
$(INTDIR)/prune.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\s
invaladt.c
$(INTDIR)/sinvaladt.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\o
rindxpath.c
$(INTDIR)/orindxpath.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\j
oinrels.c
$(INTDIR)/joinrels.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\r
ewrite
\r
ewriteManip.c
$(INTDIR)/rewriteManip.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\p
age
\i
temptr.c
$(INTDIR)/itemptr.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\s
_lock.c
$(INTDIR)/s_lock.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\i
nit
\m
iscinit.c
$(INTDIR)/miscinit.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\t
cop
\p
ostgres.c
$(INTDIR)/postgres.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\p
arser.c
$(INTDIR)/parser.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\t
list.c
$(INTDIR)/tlist.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\d
t.c
$(INTDIR)/dt.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\s
inval.c
$(INTDIR)/sinval.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\p
qpacket.c
$(INTDIR)/pqpacket.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\e
rror
\a
ssert.c
$(INTDIR)/assert.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\t
cop
\u
tility.c
$(INTDIR)/utility.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\b
ool.c
$(INTDIR)/bool.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\s
mgr
\m
d.c
$(INTDIR)/md.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\p
qsignal.c
$(INTDIR)/pqsignal.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\i
nit
\g
lobals.c
$(INTDIR)/globals.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ostmaster
\p
ostmaster.c
$(INTDIR)/postmaster.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\j
oinpath.c
$(INTDIR)/joinpath.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\t
cop
\f
astpath.c
$(INTDIR)/fastpath.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
rep
\a
rchive.c
$(INTDIR)/archive.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\f
cache.c
$(INTDIR)/fcache.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\s
mgr
\m
m.c
$(INTDIR)/mm.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
lan
\c
reateplan.c
$(INTDIR)/createplan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\r
ead.c
$(INTDIR)/read.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\s
tringinfo.c
$(INTDIR)/stringinfo.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\h
ash
\h
ashfn.c
$(INTDIR)/hashfn.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\r
egproc.c
$(INTDIR)/regproc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\m
ain
\m
ain.c
$(INTDIR)/main.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\i
nit
\e
nbl.c
$(INTDIR)/enbl.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
rep
\p
repunion.c
$(INTDIR)/prepunion.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
rep
\p
repqual.c
$(INTDIR)/prepqual.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
lan
\p
lanner.c
$(INTDIR)/planner.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\c
lausesel.c
$(INTDIR)/clausesel.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\p
ortal.c
$(INTDIR)/portal.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\s
pin.c
$(INTDIR)/spin.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\l
mgr
\l
ock.c
$(INTDIR)/lock.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\l
mgr
\s
ingle.c
$(INTDIR)/single.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\i
o.c
$(INTDIR)/io.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
"G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\g
eo-ops.c"
$(INTDIR)/"geo-ops.obj"
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\t
cop
\d
est.c
$(INTDIR)/dest.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\r
ewrite
\r
ewriteDefine.c
$(INTDIR)/rewriteDefine.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\k
eywords.c
$(INTDIR)/keywords.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\h
ashutils.c
$(INTDIR)/hashutils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\e
rror
\f
ormat.c
$(INTDIR)/format.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
arser
\s
canner.c
$(INTDIR)/scanner.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\m
mgr
\a
set.c
$(INTDIR)/aset.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
"G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\g
eo-selfuncs.c"
$(INTDIR)/"geo-selfuncs.obj"
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\f
loat.c
$(INTDIR)/float.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\t
cop
\p
query.c
$(INTDIR)/pquery.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
"G:
\p
glite
\s
rc
\b
ackend
\l
ibpq
\b
e-dumpdata.c"
$(INTDIR)/"be-dumpdata.obj"
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\f
ilename.c
$(INTDIR)/filename.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\m
isc.c
$(INTDIR)/misc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\p
athnode.c
$(INTDIR)/pathnode.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\i
nval.c
$(INTDIR)/inval.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\s
mgr
\s
mgrtype.c
$(INTDIR)/smgrtype.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\j
oininfo.c
$(INTDIR)/joininfo.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\s
ort
\l
select
.c
$(INTDIR)/lselect.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\c
ache
\r
el.c
$(INTDIR)/rel.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\i
nternal.c
$(INTDIR)/internal.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
rep
\p
reptlist.c
$(INTDIR)/preptlist.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\p
ath
\j
oinutils.c
$(INTDIR)/joinutils.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\s
hmqueue.c
$(INTDIR)/shmqueue.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\d
ate.c
$(INTDIR)/date.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\r
ewrite
\l
ocks.c
$(INTDIR)/locks.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\n
ot_in.c
$(INTDIR)/not_in.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\c
har.c
$(INTDIR)/char.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\r
ewrite
\r
ewriteHandler.c
$(INTDIR)/rewriteHandler.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\s
ets.c
$(INTDIR)/sets.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\m
mgr
\p
alloc.c
$(INTDIR)/palloc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\i
ndexnode.c
$(INTDIR)/indexnode.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\e
qualfuncs.c
$(INTDIR)/equalfuncs.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\a
dt
\o
idint2.c
$(INTDIR)/oidint2.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\n
odes
\l
ist.c
$(INTDIR)/list.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
ptimizer
\u
til
\p
lancat.c
$(INTDIR)/plancat.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\f
mgr
\f
mgr.c
$(INTDIR)/fmgr.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
bj
\f
mgrtab.c
$(INTDIR)/fmgrtab.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\l
ib
\d
llist.c
$(INTDIR)/dllist.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\e
xecutor
\n
odeGroup.c
$(INTDIR)/nodeGroup.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\b
uffer
\l
ocalbuf.c
$(INTDIR)/localbuf.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\c
ommands
\c
luster.c
$(INTDIR)/cluster.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\i
pc
\i
pc.c
$(INTDIR)/ipc.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32
\n
t.c
$(INTDIR)/nt.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32
\g
etopt.c
$(INTDIR)/getopt.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
bj
\b
ootscanner.c
$(INTDIR)/bootscanner.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
bj
\s
can.c
$(INTDIR)/scan.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
bj
\b
ootparse.c
$(INTDIR)/bootparse.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\o
bj
\g
ram.c
$(INTDIR)/gram.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\i
nit
\f
indbe.c
$(INTDIR)/findbe.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32
\r
egex
\r
egerror.c
$(INTDIR)/regerror.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32
\r
egex
\r
egfree.c
$(INTDIR)/regfree.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32
\r
egex
\r
egcomp.c
$(INTDIR)/regcomp.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\p
ort
\w
in32
\r
egex
\r
egexec.c
$(INTDIR)/regexec.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\a
ccess
\n
btree
\n
btsort.c
$(INTDIR)/nbtsort.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\s
torage
\b
uffer
\b
uf_init.c
$(INTDIR)/buf_init.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE
=
G:
\p
glite
\s
rc
\b
ackend
\u
tils
\f
mgr
\d
fmgr.c
$(INTDIR)/dfmgr.obj
:
$(SOURCE) $(INTDIR)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
# End Source File
# End Group
# End Project
################################################################################
src/backend/port/win32/port-protos.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/pwd.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/regex/COPYRIGHT
deleted
100644 → 0
View file @
7a14979f
Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
This software is not subject to any license of the American Telephone
and Telegraph Company or of the Regents of the University of California.
Permission is granted to anyone to use this software for any purpose on
any computer system, and to alter it and redistribute it, subject
to the following restrictions:
1. The author is not responsible for the consequences of use of this
software, no matter how awful, even if they arise from flaws in it.
2. The origin of this software must not be misrepresented, either by
explicit claim or by omission. Since few users ever read sources,
credits must appear in the documentation.
3. Altered versions must be plainly marked as such, and must not be
misrepresented as being the original software. Since few users
ever read sources, credits must appear in the documentation.
4. This notice may not be removed or altered.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
/*-
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94
*/
src/backend/port/win32/regex/WHATSNEW
deleted
100644 → 0
View file @
7a14979f
# @(#)WHATSNEW 8.3 (Berkeley) 3/18/94
New in alpha3.4: The complex bug alluded to below has been fixed (in a
slightly kludgey temporary way that may hurt efficiency a bit; this is
another "get it out the door for 4.4" release). The tests at the end of
the tests file have accordingly been uncommented. The primary sign of
the bug was that something like a?b matching ab matched b rather than ab.
(The bug was essentially specific to this exact situation, else it would
have shown up earlier.)
New in alpha3.3: The definition of word boundaries has been altered
slightly, to more closely match the usual programming notion that "_"
is an alphabetic. Stuff used for pre-ANSI systems is now in a subdir,
and the makefile no longer alludes to it in mysterious ways. The
makefile has generally been cleaned up some. Fixes have been made
(again!) so that the regression test will run without -DREDEBUG, at
the cost of weaker checking. A workaround for a bug in some folks'
<assert.h> has been added. And some more things have been added to
tests, including a couple right at the end which are commented out
because the code currently flunks them (complex bug; fix coming).
Plus the usual minor cleanup.
New in alpha3.2: Assorted bits of cleanup and portability improvement
(the development base is now a BSDI system using GCC instead of an ancient
Sun system, and the newer compiler exposed some glitches). Fix for a
serious bug that affected REs using many [] (including REG_ICASE REs
because of the way they are implemented), *sometimes*, depending on
memory-allocation patterns. The header-file prototypes no longer name
the parameters, avoiding possible name conflicts. The possibility that
some clot has defined CHAR_MIN as (say) `-128' instead of `(-128)' is
now handled gracefully. "uchar" is no longer used as an internal type
name (too many people have the same idea). Still the same old lousy
performance, alas.
New in alpha3.1: Basically nothing, this release is just a bookkeeping
convenience. Stay tuned.
New in alpha3.0: Performance is no better, alas, but some fixes have been
made and some functionality has been added. (This is basically the "get
it out the door in time for 4.4" release.) One bug fix: regfree() didn't
free the main internal structure (how embarrassing). It is now possible
to put NULs in either the RE or the target string, using (resp.) a new
REG_PEND flag and the old REG_STARTEND flag. The REG_NOSPEC flag to
regcomp() makes all characters ordinary, so you can match a literal
string easily (this will become more useful when performance improves!).
There are now primitives to match beginnings and ends of words, although
the syntax is disgusting and so is the implementation. The REG_ATOI
debugging interface has changed a bit. And there has been considerable
internal cleanup of various kinds.
New in alpha2.3: Split change list out of README, and moved flags notes
into Makefile. Macro-ized the name of regex(7) in regex(3), since it has
to change for 4.4BSD. Cleanup work in engine.c, and some new regression
tests to catch tricky cases thereof.
New in alpha2.2: Out-of-date manpages updated. Regerror() acquires two
small extensions -- REG_ITOA and REG_ATOI -- which avoid debugging kludges
in my own test program and might be useful to others for similar purposes.
The regression test will now compile (and run) without REDEBUG. The
BRE \$ bug is fixed. Most uses of "uchar" are gone; it's all chars now.
Char/uchar parameters are now written int/unsigned, to avoid possible
portability problems with unpromoted parameters. Some unsigned casts have
been introduced to minimize portability problems with shifting into sign
bits.
New in alpha2.1: Lots of little stuff, cleanup and fixes. The one big
thing is that regex.h is now generated, using mkh, rather than being
supplied in the distribution; due to circularities in dependencies,
you have to build regex.h explicitly by "make h". The two known bugs
have been fixed (and the regression test now checks for them), as has a
problem with assertions not being suppressed in the absence of REDEBUG.
No performance work yet.
New in alpha2: Backslash-anything is an ordinary character, not an
error (except, of course, for the handful of backslashed metacharacters
in BREs), which should reduce script breakage. The regression test
checks *where* null strings are supposed to match, and has generally
been tightened up somewhat. Small bug fixes in parameter passing (not
harmful, but technically errors) and some other areas. Debugging
invoked by defining REDEBUG rather than not defining NDEBUG.
New in alpha+3: full prototyping for internal routines, using a little
helper program, mkh, which extracts prototypes given in stylized comments.
More minor cleanup. Buglet fix: it's CHAR_BIT, not CHAR_BITS. Simple
pre-screening of input when a literal string is known to be part of the
RE; this does wonders for performance.
New in alpha+2: minor bits of cleanup. Notably, the number "32" for the
word width isn't hardwired into regexec.c any more, the public header
file prototypes the functions if __STDC__ is defined, and some small typos
in the manpages have been fixed.
New in alpha+1: improvements to the manual pages, and an important
extension, the REG_STARTEND option to regexec().
src/backend/port/win32/regex/cclass.h
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)cclass.h 8.3 (Berkeley) 3/20/94
*/
/* character-class table */
static
struct
cclass
{
char
*
name
;
char
*
chars
;
char
*
multis
;
}
cclasses
[]
=
{
"alnum"
,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789"
,
""
,
"alpha"
,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
,
""
,
"blank"
,
"
\t
"
,
""
,
"cntrl"
,
"
\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24
\
\25\26\27\30\31\32\33\34\35\36\37\177
"
,
""
,
"digit"
,
"0123456789"
,
""
,
"graph"
,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!
\"
#$%&'()*+,-./:;<=>?@[
\\
]^_`{|}~"
,
""
,
"lower"
,
"abcdefghijklmnopqrstuvwxyz"
,
""
,
"print"
,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!
\"
#$%&'()*+,-./:;<=>?@[
\\
]^_`{|}~ "
,
""
,
"punct"
,
"!
\"
#$%&'()*+,-./:;<=>?@[
\\
]^_`{|}~"
,
""
,
"space"
,
"
\t\n\v\f\r
"
,
""
,
"upper"
,
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
,
""
,
"xdigit"
,
"0123456789ABCDEFabcdef"
,
""
,
NULL
,
0
,
""
};
src/backend/port/win32/regex/cname.h
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)cname.h 8.3 (Berkeley) 3/20/94
*/
/* character-name table */
static
struct
cname
{
char
*
name
;
char
code
;
}
cnames
[]
=
{
"NUL"
,
'\0'
,
"SOH"
,
'\001'
,
"STX"
,
'\002'
,
"ETX"
,
'\003'
,
"EOT"
,
'\004'
,
"ENQ"
,
'\005'
,
"ACK"
,
'\006'
,
"BEL"
,
'\007'
,
"alert"
,
'\007'
,
"BS"
,
'\010'
,
"backspace"
,
'\b'
,
"HT"
,
'\011'
,
"tab"
,
'\t'
,
"LF"
,
'\012'
,
"newline"
,
'\n'
,
"VT"
,
'\013'
,
"vertical-tab"
,
'\v'
,
"FF"
,
'\014'
,
"form-feed"
,
'\f'
,
"CR"
,
'\015'
,
"carriage-return"
,
'\r'
,
"SO"
,
'\016'
,
"SI"
,
'\017'
,
"DLE"
,
'\020'
,
"DC1"
,
'\021'
,
"DC2"
,
'\022'
,
"DC3"
,
'\023'
,
"DC4"
,
'\024'
,
"NAK"
,
'\025'
,
"SYN"
,
'\026'
,
"ETB"
,
'\027'
,
"CAN"
,
'\030'
,
"EM"
,
'\031'
,
"SUB"
,
'\032'
,
"ESC"
,
'\033'
,
"IS4"
,
'\034'
,
"FS"
,
'\034'
,
"IS3"
,
'\035'
,
"GS"
,
'\035'
,
"IS2"
,
'\036'
,
"RS"
,
'\036'
,
"IS1"
,
'\037'
,
"US"
,
'\037'
,
"space"
,
' '
,
"exclamation-mark"
,
'!'
,
"quotation-mark"
,
'"'
,
"number-sign"
,
'#'
,
"dollar-sign"
,
'$'
,
"percent-sign"
,
'%'
,
"ampersand"
,
'&'
,
"apostrophe"
,
'\''
,
"left-parenthesis"
,
'('
,
"right-parenthesis"
,
')'
,
"asterisk"
,
'*'
,
"plus-sign"
,
'+'
,
"comma"
,
','
,
"hyphen"
,
'-'
,
"hyphen-minus"
,
'-'
,
"period"
,
'.'
,
"full-stop"
,
'.'
,
"slash"
,
'/'
,
"solidus"
,
'/'
,
"zero"
,
'0'
,
"one"
,
'1'
,
"two"
,
'2'
,
"three"
,
'3'
,
"four"
,
'4'
,
"five"
,
'5'
,
"six"
,
'6'
,
"seven"
,
'7'
,
"eight"
,
'8'
,
"nine"
,
'9'
,
"colon"
,
':'
,
"semicolon"
,
';'
,
"less-than-sign"
,
'<'
,
"equals-sign"
,
'='
,
"greater-than-sign"
,
'>'
,
"question-mark"
,
'?'
,
"commercial-at"
,
'@'
,
"left-square-bracket"
,
'['
,
"backslash"
,
'\\'
,
"reverse-solidus"
,
'\\'
,
"right-square-bracket"
,
']'
,
"circumflex"
,
'^'
,
"circumflex-accent"
,
'^'
,
"underscore"
,
'_'
,
"low-line"
,
'_'
,
"grave-accent"
,
'`'
,
"left-brace"
,
'{'
,
"left-curly-bracket"
,
'{'
,
"vertical-line"
,
'|'
,
"right-brace"
,
'}'
,
"right-curly-bracket"
,
'}'
,
"tilde"
,
'~'
,
"DEL"
,
'\177'
,
NULL
,
0
,
};
src/backend/port/win32/regex/engine.c
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)engine.c 8.5 (Berkeley) 3/20/94
*/
/*
* The matching engine and friends. This file is #included by regexec.c
* after suitable #defines of a variety of macros used herein, so that
* different state representations can be used without duplicating masses
* of code.
*/
#ifdef SNAMES
#define matcher smatcher
#define fast sfast
#define slow sslow
#define dissect sdissect
#define backref sbackref
#define step sstep
#define print sprint
#define at sat
#define match smat
#endif
#ifdef LNAMES
#define matcher lmatcher
#define fast lfast
#define slow lslow
#define dissect ldissect
#define backref lbackref
#define step lstep
#define print lprint
#define at lat
#define match lmat
#endif
/* another structure passed up and down to avoid zillions of parameters */
struct
match
{
struct
re_guts
*
g
;
int
eflags
;
regmatch_t
*
pmatch
;
/* [nsub+1] (0 element unused) */
char
*
offp
;
/* offsets work from here */
char
*
beginp
;
/* start of string -- virtual NUL precedes */
char
*
endp
;
/* end of string -- virtual NUL here */
char
*
coldp
;
/* can be no match starting before here */
char
**
lastpos
;
/* [nplus+1] */
STATEVARS
;
states
st
;
/* current states */
states
fresh
;
/* states for a fresh start */
states
tmp
;
/* temporary */
states
empty
;
/* empty set of states */
};
/* ========= begin header generated by ./mkh ========= */
#ifdef __cplusplus
extern
"C"
{
#endif
/* === engine.c === */
static
int
matcher
__P
((
struct
re_guts
*
g
,
char
*
string
,
size_t
nmatch
,
regmatch_t
pmatch
[],
int
eflags
));
static
char
*
dissect
__P
((
struct
match
*
m
,
char
*
start
,
char
*
stop
,
sopno
startst
,
sopno
stopst
));
static
char
*
backref
__P
((
struct
match
*
m
,
char
*
start
,
char
*
stop
,
sopno
startst
,
sopno
stopst
,
sopno
lev
));
static
char
*
fast
__P
((
struct
match
*
m
,
char
*
start
,
char
*
stop
,
sopno
startst
,
sopno
stopst
));
static
char
*
slow
__P
((
struct
match
*
m
,
char
*
start
,
char
*
stop
,
sopno
startst
,
sopno
stopst
));
static
states
step
__P
((
struct
re_guts
*
g
,
sopno
start
,
sopno
stop
,
states
bef
,
int
ch
,
states
aft
));
#define BOL (OUT+1)
#define EOL (BOL+1)
#define BOLEOL (BOL+2)
#define NOTHING (BOL+3)
#define BOW (BOL+4)
#define EOW (BOL+5)
#define CODEMAX (BOL+5)
/* highest code used */
#define NONCHAR(c) ((c) > CHAR_MAX)
#define NNONCHAR (CODEMAX-CHAR_MAX)
#ifdef REDEBUG
static
void
print
__P
((
struct
match
*
m
,
char
*
caption
,
states
st
,
int
ch
,
FILE
*
d
));
#endif
#ifdef REDEBUG
static
void
at
__P
((
struct
match
*
m
,
char
*
title
,
char
*
start
,
char
*
stop
,
sopno
startst
,
sopno
stopst
));
#endif
#ifdef REDEBUG
static
char
*
pchar
__P
((
int
ch
));
#endif
#ifdef __cplusplus
}
#endif
/* ========= end header generated by ./mkh ========= */
#ifdef REDEBUG
#define SP(t, s, c) print(m, t, s, c, stdout)
#define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2)
#define NOTE(str) { if (m->eflags®_TRACE) printf("=%s\n", (str)); }
#else
#define SP(t, s, c)
/* nothing */
#define AT(t, p1, p2, s1, s2)
/* nothing */
#define NOTE(s)
/* nothing */
#endif
/*
- matcher - the actual matching engine
== static int matcher(register struct re_guts *g, char *string, \
== size_t nmatch, regmatch_t pmatch[], int eflags);
*/
static
int
/* 0 success, REG_NOMATCH failure */
matcher
(
g
,
string
,
nmatch
,
pmatch
,
eflags
)
register
struct
re_guts
*
g
;
char
*
string
;
size_t
nmatch
;
regmatch_t
pmatch
[];
int
eflags
;
{
register
char
*
endp
;
register
int
i
;
struct
match
mv
;
register
struct
match
*
m
=
&
mv
;
register
char
*
dp
;
const
register
sopno
gf
=
g
->
firststate
+
1
;
/* +1 for OEND */
const
register
sopno
gl
=
g
->
laststate
;
char
*
start
;
char
*
stop
;
/* simplify the situation where possible */
if
(
g
->
cflags
&
REG_NOSUB
)
nmatch
=
0
;
if
(
eflags
&
REG_STARTEND
)
{
start
=
string
+
pmatch
[
0
].
rm_so
;
stop
=
string
+
pmatch
[
0
].
rm_eo
;
}
else
{
start
=
string
;
stop
=
start
+
strlen
(
start
);
}
if
(
stop
<
start
)
return
(
REG_INVARG
);
/* prescreening; this does wonders for this rather slow code */
if
(
g
->
must
!=
NULL
)
{
for
(
dp
=
start
;
dp
<
stop
;
dp
++
)
if
(
*
dp
==
g
->
must
[
0
]
&&
stop
-
dp
>=
g
->
mlen
&&
memcmp
(
dp
,
g
->
must
,
(
size_t
)
g
->
mlen
)
==
0
)
break
;
if
(
dp
==
stop
)
/* we didn't find g->must */
return
(
REG_NOMATCH
);
}
/* match struct setup */
m
->
g
=
g
;
m
->
eflags
=
eflags
;
m
->
pmatch
=
NULL
;
m
->
lastpos
=
NULL
;
m
->
offp
=
string
;
m
->
beginp
=
start
;
m
->
endp
=
stop
;
STATESETUP
(
m
,
4
);
SETUP
(
m
->
st
);
SETUP
(
m
->
fresh
);
SETUP
(
m
->
tmp
);
SETUP
(
m
->
empty
);
CLEAR
(
m
->
empty
);
/* this loop does only one repetition except for backrefs */
for
(;;)
{
endp
=
fast
(
m
,
start
,
stop
,
gf
,
gl
);
if
(
endp
==
NULL
)
{
/* a miss */
STATETEARDOWN
(
m
);
return
(
REG_NOMATCH
);
}
if
(
nmatch
==
0
&&
!
g
->
backrefs
)
break
;
/* no further info needed */
/* where? */
assert
(
m
->
coldp
!=
NULL
);
for
(;;)
{
NOTE
(
"finding start"
);
endp
=
slow
(
m
,
m
->
coldp
,
stop
,
gf
,
gl
);
if
(
endp
!=
NULL
)
break
;
assert
(
m
->
coldp
<
m
->
endp
);
m
->
coldp
++
;
}
if
(
nmatch
==
1
&&
!
g
->
backrefs
)
break
;
/* no further info needed */
/* oh my, he wants the subexpressions... */
if
(
m
->
pmatch
==
NULL
)
m
->
pmatch
=
(
regmatch_t
*
)
malloc
((
m
->
g
->
nsub
+
1
)
*
sizeof
(
regmatch_t
));
if
(
m
->
pmatch
==
NULL
)
{
STATETEARDOWN
(
m
);
return
(
REG_ESPACE
);
}
for
(
i
=
1
;
i
<=
m
->
g
->
nsub
;
i
++
)
m
->
pmatch
[
i
].
rm_so
=
m
->
pmatch
[
i
].
rm_eo
=
-
1
;
if
(
!
g
->
backrefs
&&
!
(
m
->
eflags
&
REG_BACKR
))
{
NOTE
(
"dissecting"
);
dp
=
dissect
(
m
,
m
->
coldp
,
endp
,
gf
,
gl
);
}
else
{
if
(
g
->
nplus
>
0
&&
m
->
lastpos
==
NULL
)
m
->
lastpos
=
(
char
**
)
malloc
((
g
->
nplus
+
1
)
*
sizeof
(
char
*
));
if
(
g
->
nplus
>
0
&&
m
->
lastpos
==
NULL
)
{
free
(
m
->
pmatch
);
STATETEARDOWN
(
m
);
return
(
REG_ESPACE
);
}
NOTE
(
"backref dissect"
);
dp
=
backref
(
m
,
m
->
coldp
,
endp
,
gf
,
gl
,
(
sopno
)
0
);
}
if
(
dp
!=
NULL
)
break
;
/* uh-oh... we couldn't find a subexpression-level match */
assert
(
g
->
backrefs
);
/* must be back references doing it */
assert
(
g
->
nplus
==
0
||
m
->
lastpos
!=
NULL
);
for
(;;)
{
if
(
dp
!=
NULL
||
endp
<=
m
->
coldp
)
break
;
/* defeat */
NOTE
(
"backoff"
);
endp
=
slow
(
m
,
m
->
coldp
,
endp
-
1
,
gf
,
gl
);
if
(
endp
==
NULL
)
break
;
/* defeat */
/* try it on a shorter possibility */
#ifndef NDEBUG
for
(
i
=
1
;
i
<=
m
->
g
->
nsub
;
i
++
)
{
assert
(
m
->
pmatch
[
i
].
rm_so
==
-
1
);
assert
(
m
->
pmatch
[
i
].
rm_eo
==
-
1
);
}
#endif
NOTE
(
"backoff dissect"
);
dp
=
backref
(
m
,
m
->
coldp
,
endp
,
gf
,
gl
,
(
sopno
)
0
);
}
assert
(
dp
==
NULL
||
dp
==
endp
);
if
(
dp
!=
NULL
)
/* found a shorter one */
break
;
/* despite initial appearances, there is no match here */
NOTE
(
"false alarm"
);
start
=
m
->
coldp
+
1
;
/* recycle starting later */
assert
(
start
<=
stop
);
}
/* fill in the details if requested */
if
(
nmatch
>
0
)
{
pmatch
[
0
].
rm_so
=
m
->
coldp
-
m
->
offp
;
pmatch
[
0
].
rm_eo
=
endp
-
m
->
offp
;
}
if
(
nmatch
>
1
)
{
assert
(
m
->
pmatch
!=
NULL
);
for
(
i
=
1
;
i
<
nmatch
;
i
++
)
if
(
i
<=
m
->
g
->
nsub
)
pmatch
[
i
]
=
m
->
pmatch
[
i
];
else
{
pmatch
[
i
].
rm_so
=
-
1
;
pmatch
[
i
].
rm_eo
=
-
1
;
}
}
if
(
m
->
pmatch
!=
NULL
)
free
((
char
*
)
m
->
pmatch
);
if
(
m
->
lastpos
!=
NULL
)
free
((
char
*
)
m
->
lastpos
);
STATETEARDOWN
(
m
);
return
(
0
);
}
/*
- dissect - figure out what matched what, no back references
== static char *dissect(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
static
char
*
/* == stop (success) always */
dissect
(
m
,
start
,
stop
,
startst
,
stopst
)
register
struct
match
*
m
;
char
*
start
;
char
*
stop
;
sopno
startst
;
sopno
stopst
;
{
register
int
i
;
register
sopno
ss
;
/* start sop of current subRE */
register
sopno
es
;
/* end sop of current subRE */
register
char
*
sp
;
/* start of string matched by it */
register
char
*
stp
;
/* string matched by it cannot pass here */
register
char
*
rest
;
/* start of rest of string */
register
char
*
tail
;
/* string unmatched by rest of RE */
register
sopno
ssub
;
/* start sop of subsubRE */
register
sopno
esub
;
/* end sop of subsubRE */
register
char
*
ssp
;
/* start of string matched by subsubRE */
register
char
*
sep
;
/* end of string matched by subsubRE */
register
char
*
oldssp
;
/* previous ssp */
register
char
*
dp
;
AT
(
"diss"
,
start
,
stop
,
startst
,
stopst
);
sp
=
start
;
for
(
ss
=
startst
;
ss
<
stopst
;
ss
=
es
)
{
/* identify end of subRE */
es
=
ss
;
switch
(
OP
(
m
->
g
->
strip
[
es
]))
{
case
OPLUS_
:
case
OQUEST_
:
es
+=
OPND
(
m
->
g
->
strip
[
es
]);
break
;
case
OCH_
:
while
(
OP
(
m
->
g
->
strip
[
es
])
!=
O_CH
)
es
+=
OPND
(
m
->
g
->
strip
[
es
]);
break
;
}
es
++
;
/* figure out what it matched */
switch
(
OP
(
m
->
g
->
strip
[
ss
]))
{
case
OEND
:
assert
(
nope
);
break
;
case
OCHAR
:
sp
++
;
break
;
case
OBOL
:
case
OEOL
:
case
OBOW
:
case
OEOW
:
break
;
case
OANY
:
case
OANYOF
:
sp
++
;
break
;
case
OBACK_
:
case
O_BACK
:
assert
(
nope
);
break
;
/* cases where length of match is hard to find */
case
OQUEST_
:
stp
=
stop
;
for
(;;)
{
/* how long could this one be? */
rest
=
slow
(
m
,
sp
,
stp
,
ss
,
es
);
assert
(
rest
!=
NULL
);
/* it did match */
/* could the rest match the rest? */
tail
=
slow
(
m
,
rest
,
stop
,
es
,
stopst
);
if
(
tail
==
stop
)
break
;
/* yes! */
/* no -- try a shorter match for this one */
stp
=
rest
-
1
;
assert
(
stp
>=
sp
);
/* it did work */
}
ssub
=
ss
+
1
;
esub
=
es
-
1
;
/* did innards match? */
if
(
slow
(
m
,
sp
,
rest
,
ssub
,
esub
)
!=
NULL
)
{
dp
=
dissect
(
m
,
sp
,
rest
,
ssub
,
esub
);
assert
(
dp
==
rest
);
}
else
/* no */
assert
(
sp
==
rest
);
sp
=
rest
;
break
;
case
OPLUS_
:
stp
=
stop
;
for
(;;)
{
/* how long could this one be? */
rest
=
slow
(
m
,
sp
,
stp
,
ss
,
es
);
assert
(
rest
!=
NULL
);
/* it did match */
/* could the rest match the rest? */
tail
=
slow
(
m
,
rest
,
stop
,
es
,
stopst
);
if
(
tail
==
stop
)
break
;
/* yes! */
/* no -- try a shorter match for this one */
stp
=
rest
-
1
;
assert
(
stp
>=
sp
);
/* it did work */
}
ssub
=
ss
+
1
;
esub
=
es
-
1
;
ssp
=
sp
;
oldssp
=
ssp
;
for
(;;)
{
/* find last match of innards */
sep
=
slow
(
m
,
ssp
,
rest
,
ssub
,
esub
);
if
(
sep
==
NULL
||
sep
==
ssp
)
break
;
/* failed or matched null */
oldssp
=
ssp
;
/* on to next try */
ssp
=
sep
;
}
if
(
sep
==
NULL
)
{
/* last successful match */
sep
=
ssp
;
ssp
=
oldssp
;
}
assert
(
sep
==
rest
);
/* must exhaust substring */
assert
(
slow
(
m
,
ssp
,
sep
,
ssub
,
esub
)
==
rest
);
dp
=
dissect
(
m
,
ssp
,
sep
,
ssub
,
esub
);
assert
(
dp
==
sep
);
sp
=
rest
;
break
;
case
OCH_
:
stp
=
stop
;
for
(;;)
{
/* how long could this one be? */
rest
=
slow
(
m
,
sp
,
stp
,
ss
,
es
);
assert
(
rest
!=
NULL
);
/* it did match */
/* could the rest match the rest? */
tail
=
slow
(
m
,
rest
,
stop
,
es
,
stopst
);
if
(
tail
==
stop
)
break
;
/* yes! */
/* no -- try a shorter match for this one */
stp
=
rest
-
1
;
assert
(
stp
>=
sp
);
/* it did work */
}
ssub
=
ss
+
1
;
esub
=
ss
+
OPND
(
m
->
g
->
strip
[
ss
])
-
1
;
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR1
);
for
(;;)
{
/* find first matching branch */
if
(
slow
(
m
,
sp
,
rest
,
ssub
,
esub
)
==
rest
)
break
;
/* it matched all of it */
/* that one missed, try next one */
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR1
);
esub
++
;
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR2
);
ssub
=
esub
+
1
;
esub
+=
OPND
(
m
->
g
->
strip
[
esub
]);
if
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR2
)
esub
--
;
else
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
O_CH
);
}
dp
=
dissect
(
m
,
sp
,
rest
,
ssub
,
esub
);
assert
(
dp
==
rest
);
sp
=
rest
;
break
;
case
O_PLUS
:
case
O_QUEST
:
case
OOR1
:
case
OOR2
:
case
O_CH
:
assert
(
nope
);
break
;
case
OLPAREN
:
i
=
OPND
(
m
->
g
->
strip
[
ss
]);
assert
(
0
<
i
&&
i
<=
m
->
g
->
nsub
);
m
->
pmatch
[
i
].
rm_so
=
sp
-
m
->
offp
;
break
;
case
ORPAREN
:
i
=
OPND
(
m
->
g
->
strip
[
ss
]);
assert
(
0
<
i
&&
i
<=
m
->
g
->
nsub
);
m
->
pmatch
[
i
].
rm_eo
=
sp
-
m
->
offp
;
break
;
default:
/* uh oh */
assert
(
nope
);
break
;
}
}
assert
(
sp
==
stop
);
return
(
sp
);
}
/*
- backref - figure out what matched what, figuring in back references
== static char *backref(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst, sopno lev);
*/
static
char
*
/* == stop (success) or NULL (failure) */
backref
(
m
,
start
,
stop
,
startst
,
stopst
,
lev
)
register
struct
match
*
m
;
char
*
start
;
char
*
stop
;
sopno
startst
;
sopno
stopst
;
sopno
lev
;
/* PLUS nesting level */
{
register
int
i
;
register
sopno
ss
;
/* start sop of current subRE */
register
char
*
sp
;
/* start of string matched by it */
register
sopno
ssub
;
/* start sop of subsubRE */
register
sopno
esub
;
/* end sop of subsubRE */
register
char
*
ssp
;
/* start of string matched by subsubRE */
register
char
*
dp
;
register
size_t
len
;
register
int
hard
;
register
sop
s
;
register
regoff_t
offsave
;
register
cset
*
cs
;
AT
(
"back"
,
start
,
stop
,
startst
,
stopst
);
sp
=
start
;
/* get as far as we can with easy stuff */
hard
=
0
;
for
(
ss
=
startst
;
!
hard
&&
ss
<
stopst
;
ss
++
)
switch
(
OP
(
s
=
m
->
g
->
strip
[
ss
]))
{
case
OCHAR
:
if
(
sp
==
stop
||
*
sp
++
!=
(
char
)
OPND
(
s
))
return
(
NULL
);
break
;
case
OANY
:
if
(
sp
==
stop
)
return
(
NULL
);
sp
++
;
break
;
case
OANYOF
:
cs
=
&
m
->
g
->
sets
[
OPND
(
s
)];
if
(
sp
==
stop
||
!
CHIN
(
cs
,
*
sp
++
))
return
(
NULL
);
break
;
case
OBOL
:
if
(
(
sp
==
m
->
beginp
&&
!
(
m
->
eflags
&
REG_NOTBOL
))
||
(
sp
<
m
->
endp
&&
*
(
sp
-
1
)
==
'\n'
&&
(
m
->
g
->
cflags
&
REG_NEWLINE
))
)
{
/* yes */
}
else
return
(
NULL
);
break
;
case
OEOL
:
if
(
(
sp
==
m
->
endp
&&
!
(
m
->
eflags
&
REG_NOTEOL
))
||
(
sp
<
m
->
endp
&&
*
sp
==
'\n'
&&
(
m
->
g
->
cflags
&
REG_NEWLINE
))
)
{
/* yes */
}
else
return
(
NULL
);
break
;
case
OBOW
:
if
((
(
sp
==
m
->
beginp
&&
!
(
m
->
eflags
&
REG_NOTBOL
))
||
(
sp
<
m
->
endp
&&
*
(
sp
-
1
)
==
'\n'
&&
(
m
->
g
->
cflags
&
REG_NEWLINE
))
||
(
sp
>
m
->
beginp
&&
!
ISWORD
(
*
(
sp
-
1
)))
)
&&
(
sp
<
m
->
endp
&&
ISWORD
(
*
sp
))
)
{
/* yes */
}
else
return
(
NULL
);
break
;
case
OEOW
:
if
((
(
sp
==
m
->
endp
&&
!
(
m
->
eflags
&
REG_NOTEOL
))
||
(
sp
<
m
->
endp
&&
*
sp
==
'\n'
&&
(
m
->
g
->
cflags
&
REG_NEWLINE
))
||
(
sp
<
m
->
endp
&&
!
ISWORD
(
*
sp
))
)
&&
(
sp
>
m
->
beginp
&&
ISWORD
(
*
(
sp
-
1
)))
)
{
/* yes */
}
else
return
(
NULL
);
break
;
case
O_QUEST
:
break
;
case
OOR1
:
/* matches null but needs to skip */
ss
++
;
s
=
m
->
g
->
strip
[
ss
];
do
{
assert
(
OP
(
s
)
==
OOR2
);
ss
+=
OPND
(
s
);
}
while
(
OP
(
s
=
m
->
g
->
strip
[
ss
])
!=
O_CH
);
/* note that the ss++ gets us past the O_CH */
break
;
default:
/* have to make a choice */
hard
=
1
;
break
;
}
if
(
!
hard
)
{
/* that was it! */
if
(
sp
!=
stop
)
return
(
NULL
);
return
(
sp
);
}
ss
--
;
/* adjust for the for's final increment */
/* the hard stuff */
AT
(
"hard"
,
sp
,
stop
,
ss
,
stopst
);
s
=
m
->
g
->
strip
[
ss
];
switch
(
OP
(
s
))
{
case
OBACK_
:
/* the vilest depths */
i
=
OPND
(
s
);
assert
(
0
<
i
&&
i
<=
m
->
g
->
nsub
);
if
(
m
->
pmatch
[
i
].
rm_eo
==
-
1
)
return
(
NULL
);
assert
(
m
->
pmatch
[
i
].
rm_so
!=
-
1
);
len
=
m
->
pmatch
[
i
].
rm_eo
-
m
->
pmatch
[
i
].
rm_so
;
assert
(
stop
-
m
->
beginp
>=
len
);
if
(
sp
>
stop
-
len
)
return
(
NULL
);
/* not enough left to match */
ssp
=
m
->
offp
+
m
->
pmatch
[
i
].
rm_so
;
if
(
memcmp
(
sp
,
ssp
,
len
)
!=
0
)
return
(
NULL
);
while
(
m
->
g
->
strip
[
ss
]
!=
SOP
(
O_BACK
,
i
))
ss
++
;
return
(
backref
(
m
,
sp
+
len
,
stop
,
ss
+
1
,
stopst
,
lev
));
break
;
case
OQUEST_
:
/* to null or not */
dp
=
backref
(
m
,
sp
,
stop
,
ss
+
1
,
stopst
,
lev
);
if
(
dp
!=
NULL
)
return
(
dp
);
/* not */
return
(
backref
(
m
,
sp
,
stop
,
ss
+
OPND
(
s
)
+
1
,
stopst
,
lev
));
break
;
case
OPLUS_
:
assert
(
m
->
lastpos
!=
NULL
);
assert
(
lev
+
1
<=
m
->
g
->
nplus
);
m
->
lastpos
[
lev
+
1
]
=
sp
;
return
(
backref
(
m
,
sp
,
stop
,
ss
+
1
,
stopst
,
lev
+
1
));
break
;
case
O_PLUS
:
if
(
sp
==
m
->
lastpos
[
lev
])
/* last pass matched null */
return
(
backref
(
m
,
sp
,
stop
,
ss
+
1
,
stopst
,
lev
-
1
));
/* try another pass */
m
->
lastpos
[
lev
]
=
sp
;
dp
=
backref
(
m
,
sp
,
stop
,
ss
-
OPND
(
s
)
+
1
,
stopst
,
lev
);
if
(
dp
==
NULL
)
return
(
backref
(
m
,
sp
,
stop
,
ss
+
1
,
stopst
,
lev
-
1
));
else
return
(
dp
);
break
;
case
OCH_
:
/* find the right one, if any */
ssub
=
ss
+
1
;
esub
=
ss
+
OPND
(
s
)
-
1
;
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR1
);
for
(;;)
{
/* find first matching branch */
dp
=
backref
(
m
,
sp
,
stop
,
ssub
,
esub
,
lev
);
if
(
dp
!=
NULL
)
return
(
dp
);
/* that one missed, try next one */
if
(
OP
(
m
->
g
->
strip
[
esub
])
==
O_CH
)
return
(
NULL
);
/* there is none */
esub
++
;
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR2
);
ssub
=
esub
+
1
;
esub
+=
OPND
(
m
->
g
->
strip
[
esub
]);
if
(
OP
(
m
->
g
->
strip
[
esub
])
==
OOR2
)
esub
--
;
else
assert
(
OP
(
m
->
g
->
strip
[
esub
])
==
O_CH
);
}
break
;
case
OLPAREN
:
/* must undo assignment if rest fails */
i
=
OPND
(
s
);
assert
(
0
<
i
&&
i
<=
m
->
g
->
nsub
);
offsave
=
m
->
pmatch
[
i
].
rm_so
;
m
->
pmatch
[
i
].
rm_so
=
sp
-
m
->
offp
;
dp
=
backref
(
m
,
sp
,
stop
,
ss
+
1
,
stopst
,
lev
);
if
(
dp
!=
NULL
)
return
(
dp
);
m
->
pmatch
[
i
].
rm_so
=
offsave
;
return
(
NULL
);
break
;
case
ORPAREN
:
/* must undo assignment if rest fails */
i
=
OPND
(
s
);
assert
(
0
<
i
&&
i
<=
m
->
g
->
nsub
);
offsave
=
m
->
pmatch
[
i
].
rm_eo
;
m
->
pmatch
[
i
].
rm_eo
=
sp
-
m
->
offp
;
dp
=
backref
(
m
,
sp
,
stop
,
ss
+
1
,
stopst
,
lev
);
if
(
dp
!=
NULL
)
return
(
dp
);
m
->
pmatch
[
i
].
rm_eo
=
offsave
;
return
(
NULL
);
break
;
default:
/* uh oh */
assert
(
nope
);
break
;
}
/* "can't happen" */
assert
(
nope
);
/* NOTREACHED */
}
/*
- fast - step through the string at top speed
== static char *fast(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
static
char
*
/* where tentative match ended, or NULL */
fast
(
m
,
start
,
stop
,
startst
,
stopst
)
register
struct
match
*
m
;
char
*
start
;
char
*
stop
;
sopno
startst
;
sopno
stopst
;
{
register
states
st
=
m
->
st
;
register
states
fresh
=
m
->
fresh
;
register
states
tmp
=
m
->
tmp
;
register
char
*
p
=
start
;
register
int
c
=
(
start
==
m
->
beginp
)
?
OUT
:
*
(
start
-
1
);
register
int
lastc
;
/* previous c */
register
int
flagch
;
register
int
i
;
register
char
*
coldp
;
/* last p after which no match was underway */
CLEAR
(
st
);
SET1
(
st
,
startst
);
st
=
step
(
m
->
g
,
startst
,
stopst
,
st
,
NOTHING
,
st
);
ASSIGN
(
fresh
,
st
);
SP
(
"start"
,
st
,
*
p
);
coldp
=
NULL
;
for
(;;)
{
/* next character */
lastc
=
c
;
c
=
(
p
==
m
->
endp
)
?
OUT
:
*
p
;
if
(
EQ
(
st
,
fresh
))
coldp
=
p
;
/* is there an EOL and/or BOL between lastc and c? */
flagch
=
'\0'
;
i
=
0
;
if
(
(
lastc
==
'\n'
&&
m
->
g
->
cflags
&
REG_NEWLINE
)
||
(
lastc
==
OUT
&&
!
(
m
->
eflags
&
REG_NOTBOL
))
)
{
flagch
=
BOL
;
i
=
m
->
g
->
nbol
;
}
if
(
(
c
==
'\n'
&&
m
->
g
->
cflags
&
REG_NEWLINE
)
||
(
c
==
OUT
&&
!
(
m
->
eflags
&
REG_NOTEOL
))
)
{
flagch
=
(
flagch
==
BOL
)
?
BOLEOL
:
EOL
;
i
+=
m
->
g
->
neol
;
}
if
(
i
!=
0
)
{
for
(;
i
>
0
;
i
--
)
st
=
step
(
m
->
g
,
startst
,
stopst
,
st
,
flagch
,
st
);
SP
(
"boleol"
,
st
,
c
);
}
/* how about a word boundary? */
if
(
(
flagch
==
BOL
||
(
lastc
!=
OUT
&&
!
ISWORD
(
lastc
)))
&&
(
c
!=
OUT
&&
ISWORD
(
c
))
)
{
flagch
=
BOW
;
}
if
(
(
lastc
!=
OUT
&&
ISWORD
(
lastc
))
&&
(
flagch
==
EOL
||
(
c
!=
OUT
&&
!
ISWORD
(
c
)))
)
{
flagch
=
EOW
;
}
if
(
flagch
==
BOW
||
flagch
==
EOW
)
{
st
=
step
(
m
->
g
,
startst
,
stopst
,
st
,
flagch
,
st
);
SP
(
"boweow"
,
st
,
c
);
}
/* are we done? */
if
(
ISSET
(
st
,
stopst
)
||
p
==
stop
)
break
;
/* NOTE BREAK OUT */
/* no, we must deal with this character */
ASSIGN
(
tmp
,
st
);
ASSIGN
(
st
,
fresh
);
assert
(
c
!=
OUT
);
st
=
step
(
m
->
g
,
startst
,
stopst
,
tmp
,
c
,
st
);
SP
(
"aft"
,
st
,
c
);
assert
(
EQ
(
step
(
m
->
g
,
startst
,
stopst
,
st
,
NOTHING
,
st
),
st
));
p
++
;
}
assert
(
coldp
!=
NULL
);
m
->
coldp
=
coldp
;
if
(
ISSET
(
st
,
stopst
))
return
(
p
+
1
);
else
return
(
NULL
);
}
/*
- slow - step through the string more deliberately
== static char *slow(register struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
static
char
*
/* where it ended */
slow
(
m
,
start
,
stop
,
startst
,
stopst
)
register
struct
match
*
m
;
char
*
start
;
char
*
stop
;
sopno
startst
;
sopno
stopst
;
{
register
states
st
=
m
->
st
;
register
states
empty
=
m
->
empty
;
register
states
tmp
=
m
->
tmp
;
register
char
*
p
=
start
;
register
int
c
=
(
start
==
m
->
beginp
)
?
OUT
:
*
(
start
-
1
);
register
int
lastc
;
/* previous c */
register
int
flagch
;
register
int
i
;
register
char
*
matchp
;
/* last p at which a match ended */
AT
(
"slow"
,
start
,
stop
,
startst
,
stopst
);
CLEAR
(
st
);
SET1
(
st
,
startst
);
SP
(
"sstart"
,
st
,
*
p
);
st
=
step
(
m
->
g
,
startst
,
stopst
,
st
,
NOTHING
,
st
);
matchp
=
NULL
;
for
(;;)
{
/* next character */
lastc
=
c
;
c
=
(
p
==
m
->
endp
)
?
OUT
:
*
p
;
/* is there an EOL and/or BOL between lastc and c? */
flagch
=
'\0'
;
i
=
0
;
if
(
(
lastc
==
'\n'
&&
m
->
g
->
cflags
&
REG_NEWLINE
)
||
(
lastc
==
OUT
&&
!
(
m
->
eflags
&
REG_NOTBOL
))
)
{
flagch
=
BOL
;
i
=
m
->
g
->
nbol
;
}
if
(
(
c
==
'\n'
&&
m
->
g
->
cflags
&
REG_NEWLINE
)
||
(
c
==
OUT
&&
!
(
m
->
eflags
&
REG_NOTEOL
))
)
{
flagch
=
(
flagch
==
BOL
)
?
BOLEOL
:
EOL
;
i
+=
m
->
g
->
neol
;
}
if
(
i
!=
0
)
{
for
(;
i
>
0
;
i
--
)
st
=
step
(
m
->
g
,
startst
,
stopst
,
st
,
flagch
,
st
);
SP
(
"sboleol"
,
st
,
c
);
}
/* how about a word boundary? */
if
(
(
flagch
==
BOL
||
(
lastc
!=
OUT
&&
!
ISWORD
(
lastc
)))
&&
(
c
!=
OUT
&&
ISWORD
(
c
))
)
{
flagch
=
BOW
;
}
if
(
(
lastc
!=
OUT
&&
ISWORD
(
lastc
))
&&
(
flagch
==
EOL
||
(
c
!=
OUT
&&
!
ISWORD
(
c
)))
)
{
flagch
=
EOW
;
}
if
(
flagch
==
BOW
||
flagch
==
EOW
)
{
st
=
step
(
m
->
g
,
startst
,
stopst
,
st
,
flagch
,
st
);
SP
(
"sboweow"
,
st
,
c
);
}
/* are we done? */
if
(
ISSET
(
st
,
stopst
))
matchp
=
p
;
if
(
EQ
(
st
,
empty
)
||
p
==
stop
)
break
;
/* NOTE BREAK OUT */
/* no, we must deal with this character */
ASSIGN
(
tmp
,
st
);
ASSIGN
(
st
,
empty
);
assert
(
c
!=
OUT
);
st
=
step
(
m
->
g
,
startst
,
stopst
,
tmp
,
c
,
st
);
SP
(
"saft"
,
st
,
c
);
assert
(
EQ
(
step
(
m
->
g
,
startst
,
stopst
,
st
,
NOTHING
,
st
),
st
));
p
++
;
}
return
(
matchp
);
}
/*
- step - map set of states reachable before char to set reachable after
== static states step(register struct re_guts *g, sopno start, sopno stop, \
== register states bef, int ch, register states aft);
== #define BOL (OUT+1)
== #define EOL (BOL+1)
== #define BOLEOL (BOL+2)
== #define NOTHING (BOL+3)
== #define BOW (BOL+4)
== #define EOW (BOL+5)
== #define CODEMAX (BOL+5) // highest code used
== #define NONCHAR(c) ((c) > CHAR_MAX)
== #define NNONCHAR (CODEMAX-CHAR_MAX)
*/
static
states
step
(
g
,
start
,
stop
,
bef
,
ch
,
aft
)
register
struct
re_guts
*
g
;
sopno
start
;
/* start state within strip */
sopno
stop
;
/* state after stop state within strip */
register
states
bef
;
/* states reachable before */
int
ch
;
/* character or NONCHAR code */
register
states
aft
;
/* states already known reachable after */
{
register
cset
*
cs
;
register
sop
s
;
register
sopno
pc
;
register
onestate
here
;
/* note, macros know this name */
register
sopno
look
;
register
int
i
;
for
(
pc
=
start
,
INIT
(
here
,
pc
);
pc
!=
stop
;
pc
++
,
INC
(
here
))
{
s
=
g
->
strip
[
pc
];
switch
(
OP
(
s
))
{
case
OEND
:
assert
(
pc
==
stop
-
1
);
break
;
case
OCHAR
:
/* only characters can match */
assert
(
!
NONCHAR
(
ch
)
||
ch
!=
(
char
)
OPND
(
s
));
if
(
ch
==
(
char
)
OPND
(
s
))
FWD
(
aft
,
bef
,
1
);
break
;
case
OBOL
:
if
(
ch
==
BOL
||
ch
==
BOLEOL
)
FWD
(
aft
,
bef
,
1
);
break
;
case
OEOL
:
if
(
ch
==
EOL
||
ch
==
BOLEOL
)
FWD
(
aft
,
bef
,
1
);
break
;
case
OBOW
:
if
(
ch
==
BOW
)
FWD
(
aft
,
bef
,
1
);
break
;
case
OEOW
:
if
(
ch
==
EOW
)
FWD
(
aft
,
bef
,
1
);
break
;
case
OANY
:
if
(
!
NONCHAR
(
ch
))
FWD
(
aft
,
bef
,
1
);
break
;
case
OANYOF
:
cs
=
&
g
->
sets
[
OPND
(
s
)];
if
(
!
NONCHAR
(
ch
)
&&
CHIN
(
cs
,
ch
))
FWD
(
aft
,
bef
,
1
);
break
;
case
OBACK_
:
/* ignored here */
case
O_BACK
:
FWD
(
aft
,
aft
,
1
);
break
;
case
OPLUS_
:
/* forward, this is just an empty */
FWD
(
aft
,
aft
,
1
);
break
;
case
O_PLUS
:
/* both forward and back */
FWD
(
aft
,
aft
,
1
);
i
=
ISSETBACK
(
aft
,
OPND
(
s
));
BACK
(
aft
,
aft
,
OPND
(
s
));
if
(
!
i
&&
ISSETBACK
(
aft
,
OPND
(
s
)))
{
/* oho, must reconsider loop body */
pc
-=
OPND
(
s
)
+
1
;
INIT
(
here
,
pc
);
}
break
;
case
OQUEST_
:
/* two branches, both forward */
FWD
(
aft
,
aft
,
1
);
FWD
(
aft
,
aft
,
OPND
(
s
));
break
;
case
O_QUEST
:
/* just an empty */
FWD
(
aft
,
aft
,
1
);
break
;
case
OLPAREN
:
/* not significant here */
case
ORPAREN
:
FWD
(
aft
,
aft
,
1
);
break
;
case
OCH_
:
/* mark the first two branches */
FWD
(
aft
,
aft
,
1
);
assert
(
OP
(
g
->
strip
[
pc
+
OPND
(
s
)])
==
OOR2
);
FWD
(
aft
,
aft
,
OPND
(
s
));
break
;
case
OOR1
:
/* done a branch, find the O_CH */
if
(
ISSTATEIN
(
aft
,
here
))
{
for
(
look
=
1
;
OP
(
s
=
g
->
strip
[
pc
+
look
])
!=
O_CH
;
look
+=
OPND
(
s
))
assert
(
OP
(
s
)
==
OOR2
);
FWD
(
aft
,
aft
,
look
);
}
break
;
case
OOR2
:
/* propagate OCH_'s marking */
FWD
(
aft
,
aft
,
1
);
if
(
OP
(
g
->
strip
[
pc
+
OPND
(
s
)])
!=
O_CH
)
{
assert
(
OP
(
g
->
strip
[
pc
+
OPND
(
s
)])
==
OOR2
);
FWD
(
aft
,
aft
,
OPND
(
s
));
}
break
;
case
O_CH
:
/* just empty */
FWD
(
aft
,
aft
,
1
);
break
;
default:
/* ooooops... */
assert
(
nope
);
break
;
}
}
return
(
aft
);
}
#ifdef REDEBUG
/*
- print - print a set of states
== #ifdef REDEBUG
== static void print(struct match *m, char *caption, states st, \
== int ch, FILE *d);
== #endif
*/
static
void
print
(
m
,
caption
,
st
,
ch
,
d
)
struct
match
*
m
;
char
*
caption
;
states
st
;
int
ch
;
FILE
*
d
;
{
register
struct
re_guts
*
g
=
m
->
g
;
register
int
i
;
register
int
first
=
1
;
if
(
!
(
m
->
eflags
&
REG_TRACE
))
return
;
fprintf
(
d
,
"%s"
,
caption
);
if
(
ch
!=
'\0'
)
fprintf
(
d
,
" %s"
,
pchar
(
ch
));
for
(
i
=
0
;
i
<
g
->
nstates
;
i
++
)
if
(
ISSET
(
st
,
i
))
{
fprintf
(
d
,
"%s%d"
,
(
first
)
?
"
\t
"
:
", "
,
i
);
first
=
0
;
}
fprintf
(
d
,
"
\n
"
);
}
/*
- at - print current situation
== #ifdef REDEBUG
== static void at(struct match *m, char *title, char *start, char *stop, \
== sopno startst, sopno stopst);
== #endif
*/
static
void
at
(
m
,
title
,
start
,
stop
,
startst
,
stopst
)
struct
match
*
m
;
char
*
title
;
char
*
start
;
char
*
stop
;
sopno
startst
;
sopno
stopst
;
{
if
(
!
(
m
->
eflags
&
REG_TRACE
))
return
;
printf
(
"%s %s-"
,
title
,
pchar
(
*
start
));
printf
(
"%s "
,
pchar
(
*
stop
));
printf
(
"%ld-%ld
\n
"
,
(
long
)
startst
,
(
long
)
stopst
);
}
#ifndef PCHARDONE
#define PCHARDONE
/* never again */
/*
- pchar - make a character printable
== #ifdef REDEBUG
== static char *pchar(int ch);
== #endif
*
* Is this identical to regchar() over in debug.c? Well, yes. But a
* duplicate here avoids having a debugging-capable regexec.o tied to
* a matching debug.o, and this is convenient. It all disappears in
* the non-debug compilation anyway, so it doesn't matter much.
*/
static
char
*
/* -> representation */
pchar
(
ch
)
int
ch
;
{
static
char
pbuf
[
10
];
if
(
isprint
(
ch
)
||
ch
==
' '
)
sprintf
(
pbuf
,
"%c"
,
ch
);
else
sprintf
(
pbuf
,
"
\\
%o"
,
ch
);
return
(
pbuf
);
}
#endif
#endif
#undef matcher
#undef fast
#undef slow
#undef dissect
#undef backref
#undef step
#undef print
#undef at
#undef match
src/backend/port/win32/regex/re_format.7
deleted
100644 → 0
View file @
7a14979f
.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
.\" Copyright (c) 1992, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Henry Spencer.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)re_format.7 8.3 (Berkeley) 3/20/94
.\"
.TH RE_FORMAT 7 "March 20, 1994"
.SH NAME
re_format \- POSIX 1003.2 regular expressions
.SH DESCRIPTION
Regular expressions (``RE''s),
as defined in POSIX 1003.2, come in two forms:
modern REs (roughly those of
.IR egrep ;
1003.2 calls these ``extended'' REs)
and obsolete REs (roughly those of
.IR ed ;
1003.2 ``basic'' REs).
Obsolete REs mostly exist for backward compatibility in some old programs;
they will be discussed at the end.
1003.2 leaves some aspects of RE syntax and semantics open;
`\(dg' marks decisions on these aspects that
may not be fully portable to other 1003.2 implementations.
.PP
A (modern) RE is one\(dg or more non-empty\(dg \fIbranches\fR,
separated by `|'.
It matches anything that matches one of the branches.
.PP
A branch is one\(dg or more \fIpieces\fR, concatenated.
It matches a match for the first, followed by a match for the second, etc.
.PP
A piece is an \fIatom\fR possibly followed
by a single\(dg `*', `+', `?', or \fIbound\fR.
An atom followed by `*' matches a sequence of 0 or more matches of the atom.
An atom followed by `+' matches a sequence of 1 or more matches of the atom.
An atom followed by `?' matches a sequence of 0 or 1 matches of the atom.
.PP
A \fIbound\fR is `{' followed by an unsigned decimal integer,
possibly followed by `,'
possibly followed by another unsigned decimal integer,
always followed by `}'.
The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive,
and if there are two of them, the first may not exceed the second.
An atom followed by a bound containing one integer \fIi\fR
and no comma matches
a sequence of exactly \fIi\fR matches of the atom.
An atom followed by a bound
containing one integer \fIi\fR and a comma matches
a sequence of \fIi\fR or more matches of the atom.
An atom followed by a bound
containing two integers \fIi\fR and \fIj\fR matches
a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom.
.PP
An atom is a regular expression enclosed in `()' (matching a match for the
regular expression),
an empty set of `()' (matching the null string)\(dg,
a \fIbracket expression\fR (see below), `.'
(matching any single character), `^' (matching the null string at the
beginning of a line), `$' (matching the null string at the
end of a line), a `\e' followed by one of the characters
`^.[$()|*+?{\e'
(matching that character taken as an ordinary character),
a `\e' followed by any other character\(dg
(matching that character taken as an ordinary character,
as if the `\e' had not been present\(dg),
or a single character with no other significance (matching that character).
A `{' followed by a character other than a digit is an ordinary
character, not the beginning of a bound\(dg.
It is illegal to end an RE with `\e'.
.PP
A \fIbracket expression\fR is a list of characters enclosed in `[]'.
It normally matches any single character from the list (but see below).
If the list begins with `^',
it matches any single character
(but see below) \fInot\fR from the rest of the list.
If two characters in the list are separated by `\-', this is shorthand
for the full \fIrange\fR of characters between those two (inclusive) in the
collating sequence,
e.g. `[0-9]' in ASCII matches any decimal digit.
It is illegal\(dg for two ranges to share an
endpoint, e.g. `a-c-e'.
Ranges are very collating-sequence-dependent,
and portable programs should avoid relying on them.
.PP
To include a literal `]' in the list, make it the first character
(following a possible `^').
To include a literal `\-', make it the first or last character,
or the second endpoint of a range.
To use a literal `\-' as the first endpoint of a range,
enclose it in `[.' and `.]' to make it a collating element (see below).
With the exception of these and some combinations using `[' (see next
paragraphs), all other special characters, including `\e', lose their
special significance within a bracket expression.
.PP
Within a bracket expression, a collating element (a character,
a multi-character sequence that collates as if it were a single character,
or a collating-sequence name for either)
enclosed in `[.' and `.]' stands for the
sequence of characters of that collating element.
The sequence is a single element of the bracket expression's list.
A bracket expression containing a multi-character collating element
can thus match more than one character,
e.g. if the collating sequence includes a `ch' collating element,
then the RE `[[.ch.]]*c' matches the first five characters
of `chchcc'.
.PP
Within a bracket expression, a collating element enclosed in `[=' and
`=]' is an equivalence class, standing for the sequences of characters
of all collating elements equivalent to that one, including itself.
(If there are no other equivalent collating elements,
the treatment is as if the enclosing delimiters were `[.' and `.]'.)
For example, if o and \o'o^' are the members of an equivalence class,
then `[[=o=]]', `[[=\o'o^'=]]', and `[o\o'o^']' are all synonymous.
An equivalence class may not\(dg be an endpoint
of a range.
.PP
Within a bracket expression, the name of a \fIcharacter class\fR enclosed
in `[:' and `:]' stands for the list of all characters belonging to that
class.
Standard character class names are:
.PP
.RS
.nf
.ta 3c 6c 9c
alnum digit punct
alpha graph space
blank lower upper
cntrl print xdigit
.fi
.RE
.PP
These stand for the character classes defined in
.IR ctype (3).
A locale may provide others.
A character class may not be used as an endpoint of a range.
.PP
There are two special cases\(dg of bracket expressions:
the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at
the beginning and end of a word respectively.
A word is defined as a sequence of
word characters
which is neither preceded nor followed by
word characters.
A word character is an
.I alnum
character (as defined by
.IR ctype (3))
or an underscore.
This is an extension,
compatible with but not specified by POSIX 1003.2,
and should be used with
caution in software intended to be portable to other systems.
.PP
In the event that an RE could match more than one substring of a given
string,
the RE matches the one starting earliest in the string.
If the RE could match more than one substring starting at that point,
it matches the longest.
Subexpressions also match the longest possible substrings, subject to
the constraint that the whole match be as long as possible,
with subexpressions starting earlier in the RE taking priority over
ones starting later.
Note that higher-level subexpressions thus take priority over
their lower-level component subexpressions.
.PP
Match lengths are measured in characters, not collating elements.
A null string is considered longer than no match at all.
For example,
`bb*' matches the three middle characters of `abbbc',
`(wee|week)(knights|nights)' matches all ten characters of `weeknights',
when `(.*).*' is matched against `abc' the parenthesized subexpression
matches all three characters, and
when `(a*)*' is matched against `bc' both the whole RE and the parenthesized
subexpression match the null string.
.PP
If case-independent matching is specified,
the effect is much as if all case distinctions had vanished from the
alphabet.
When an alphabetic that exists in multiple cases appears as an
ordinary character outside a bracket expression, it is effectively
transformed into a bracket expression containing both cases,
e.g. `x' becomes `[xX]'.
When it appears inside a bracket expression, all case counterparts
of it are added to the bracket expression, so that (e.g.) `[x]'
becomes `[xX]' and `[^x]' becomes `[^xX]'.
.PP
No particular limit is imposed on the length of REs\(dg.
Programs intended to be portable should not employ REs longer
than 256 bytes,
as an implementation can refuse to accept such REs and remain
POSIX-compliant.
.PP
Obsolete (``basic'') regular expressions differ in several respects.
`|', `+', and `?' are ordinary characters and there is no equivalent
for their functionality.
The delimiters for bounds are `\e{' and `\e}',
with `{' and `}' by themselves ordinary characters.
The parentheses for nested subexpressions are `\e(' and `\e)',
with `(' and `)' by themselves ordinary characters.
`^' is an ordinary character except at the beginning of the
RE or\(dg the beginning of a parenthesized subexpression,
`$' is an ordinary character except at the end of the
RE or\(dg the end of a parenthesized subexpression,
and `*' is an ordinary character if it appears at the beginning of the
RE or the beginning of a parenthesized subexpression
(after a possible leading `^').
Finally, there is one new type of atom, a \fIback reference\fR:
`\e' followed by a non-zero decimal digit \fId\fR
matches the same sequence of characters
matched by the \fId\fRth parenthesized subexpression
(numbering subexpressions by the positions of their opening parentheses,
left to right),
so that (e.g.) `\e([bc]\e)\e1' matches `bb' or `cc' but not `bc'.
.SH SEE ALSO
regex(3)
.PP
POSIX 1003.2, section 2.8 (Regular Expression Notation).
.SH BUGS
Having two kinds of REs is a botch.
.PP
The current 1003.2 spec says that `)' is an ordinary character in
the absence of an unmatched `(';
this was an unintentional result of a wording error,
and change is likely.
Avoid relying on it.
.PP
Back references are a dreadful botch,
posing major problems for efficient implementations.
They are also somewhat vaguely defined
(does
`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?).
Avoid using them.
.PP
1003.2's specification of case-independent matching is vague.
The ``one case implies all cases'' definition given above
is current consensus among implementors as to the right interpretation.
.PP
The syntax for word boundaries is incredibly ugly.
src/backend/port/win32/regex/regcomp.c
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regcomp.c 8.5 (Berkeley) 3/20/94
*/
#if defined(LIBC_SCCS) && !defined(lint)
static
char
sccsid
[]
=
"@(#)regcomp.c 8.5 (Berkeley) 3/20/94"
;
#endif
/* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
#include <regex.h>
#include "utils.h"
#include "regex2.h"
#include "cclass.h"
#include "cname.h"
/*
* parse structure, passed up and down to avoid global variables and
* other clumsinesses
*/
struct
parse
{
char
*
next
;
/* next character in RE */
char
*
end
;
/* end of string (-> NUL normally) */
int
error
;
/* has an error been seen? */
sop
*
strip
;
/* malloced strip */
sopno
ssize
;
/* malloced strip size (allocated) */
sopno
slen
;
/* malloced strip length (used) */
int
ncsalloc
;
/* number of csets allocated */
struct
re_guts
*
g
;
# define NPAREN 10
/* we need to remember () 1-9 for back refs */
sopno
pbegin
[
NPAREN
];
/* -> ( ([0] unused) */
sopno
pend
[
NPAREN
];
/* -> ) ([0] unused) */
};
/* ========= begin header generated by ./mkh ========= */
#ifdef __cplusplus
extern
"C"
{
#endif
/* === regcomp.c === */
static
void
p_ere
__P
((
struct
parse
*
p
,
int
stop
));
static
void
p_ere_exp
__P
((
struct
parse
*
p
));
static
void
p_str
__P
((
struct
parse
*
p
));
static
void
p_bre
__P
((
struct
parse
*
p
,
int
end1
,
int
end2
));
static
int
p_simp_re
__P
((
struct
parse
*
p
,
int
starordinary
));
static
int
p_count
__P
((
struct
parse
*
p
));
static
void
p_bracket
__P
((
struct
parse
*
p
));
static
void
p_b_term
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
void
p_b_cclass
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
void
p_b_eclass
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
char
p_b_symbol
__P
((
struct
parse
*
p
));
static
char
p_b_coll_elem
__P
((
struct
parse
*
p
,
int
endc
));
static
char
othercase
__P
((
int
ch
));
static
void
bothcases
__P
((
struct
parse
*
p
,
int
ch
));
static
void
ordinary
__P
((
struct
parse
*
p
,
int
ch
));
static
void
nonnewline
__P
((
struct
parse
*
p
));
static
void
repeat
__P
((
struct
parse
*
p
,
sopno
start
,
int
from
,
int
to
));
static
int
seterr
__P
((
struct
parse
*
p
,
int
e
));
static
cset
*
allocset
__P
((
struct
parse
*
p
));
static
void
freeset
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
int
freezeset
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
int
firstch
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
int
nch
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
void
mcadd
__P
((
struct
parse
*
p
,
cset
*
cs
,
char
*
cp
));
static
void
mcsub
__P
((
cset
*
cs
,
char
*
cp
));
static
int
mcin
__P
((
cset
*
cs
,
char
*
cp
));
static
char
*
mcfind
__P
((
cset
*
cs
,
char
*
cp
));
static
void
mcinvert
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
void
mccase
__P
((
struct
parse
*
p
,
cset
*
cs
));
static
int
isinsets
__P
((
struct
re_guts
*
g
,
int
c
));
static
int
samesets
__P
((
struct
re_guts
*
g
,
int
c1
,
int
c2
));
static
void
categorize
__P
((
struct
parse
*
p
,
struct
re_guts
*
g
));
static
sopno
dupl
__P
((
struct
parse
*
p
,
sopno
start
,
sopno
finish
));
static
void
doemit
__P
((
struct
parse
*
p
,
sop
op
,
size_t
opnd
));
static
void
doinsert
__P
((
struct
parse
*
p
,
sop
op
,
size_t
opnd
,
sopno
pos
));
static
void
dofwd
__P
((
struct
parse
*
p
,
sopno
pos
,
sop
value
));
static
void
enlarge
__P
((
struct
parse
*
p
,
sopno
size
));
static
void
stripsnug
__P
((
struct
parse
*
p
,
struct
re_guts
*
g
));
static
void
findmust
__P
((
struct
parse
*
p
,
struct
re_guts
*
g
));
static
sopno
pluscount
__P
((
struct
parse
*
p
,
struct
re_guts
*
g
));
#ifdef __cplusplus
}
#endif
/* ========= end header generated by ./mkh ========= */
static
char
nuls
[
10
];
/* place to point scanner in event of error */
/*
* macros for use with parse structure
* BEWARE: these know that the parse structure is named `p' !!!
*/
#define PEEK() (*p->next)
#define PEEK2() (*(p->next+1))
#define MORE() (p->next < p->end)
#define MORE2() (p->next+1 < p->end)
#define SEE(c) (MORE() && PEEK() == (c))
#define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
#define NEXT() (p->next++)
#define NEXT2() (p->next += 2)
#define NEXTn(n) (p->next += (n))
#define GETNEXT() (*p->next++)
#define SETERROR(e) seterr(p, (e))
#define REQUIRE(co, e) ((co) || SETERROR(e))
#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
#define EMIT(op, sopnd) doemit(p, (sop)(op), (size_t)(sopnd))
#define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
#define AHEAD(pos) dofwd(p, pos, HERE()-(pos))
#define ASTERN(sop, pos) EMIT(sop, HERE()-pos)
#define HERE() (p->slen)
#define THERE() (p->slen - 1)
#define THERETHERE() (p->slen - 2)
#define DROP(n) (p->slen -= (n))
#ifndef NDEBUG
static
int
never
=
0
;
/* for use in asserts; shuts lint up */
#else
#define never 0
/* some <assert.h>s have bugs too */
#endif
/*
- regcomp - interface for parser and compilation
= extern int regcomp(regex_t *, const char *, int);
= #define REG_BASIC 0000
= #define REG_EXTENDED 0001
= #define REG_ICASE 0002
= #define REG_NOSUB 0004
= #define REG_NEWLINE 0010
= #define REG_NOSPEC 0020
= #define REG_PEND 0040
= #define REG_DUMP 0200
*/
int
/* 0 success, otherwise REG_something */
regcomp
(
preg
,
pattern
,
cflags
)
regex_t
*
preg
;
const
char
*
pattern
;
int
cflags
;
{
struct
parse
pa
;
register
struct
re_guts
*
g
;
register
struct
parse
*
p
=
&
pa
;
register
int
i
;
register
size_t
len
;
#ifdef REDEBUG
# define GOODFLAGS(f) (f)
#else
# define GOODFLAGS(f) ((f)&~REG_DUMP)
#endif
cflags
=
GOODFLAGS
(
cflags
);
if
((
cflags
&
REG_EXTENDED
)
&&
(
cflags
&
REG_NOSPEC
))
return
(
REG_INVARG
);
if
(
cflags
&
REG_PEND
)
{
if
(
preg
->
re_endp
<
pattern
)
return
(
REG_INVARG
);
len
=
preg
->
re_endp
-
pattern
;
}
else
len
=
strlen
((
char
*
)
pattern
);
/* do the mallocs early so failure handling is easy */
g
=
(
struct
re_guts
*
)
malloc
(
sizeof
(
struct
re_guts
)
+
(
NC
-
1
)
*
sizeof
(
cat_t
));
if
(
g
==
NULL
)
return
(
REG_ESPACE
);
p
->
ssize
=
len
/
(
size_t
)
2
*
(
size_t
)
3
+
(
size_t
)
1
;
/* ugh */
p
->
strip
=
(
sop
*
)
malloc
(
p
->
ssize
*
sizeof
(
sop
));
p
->
slen
=
0
;
if
(
p
->
strip
==
NULL
)
{
free
((
char
*
)
g
);
return
(
REG_ESPACE
);
}
/* set things up */
p
->
g
=
g
;
p
->
next
=
(
char
*
)
pattern
;
/* convenience; we do not modify it */
p
->
end
=
p
->
next
+
len
;
p
->
error
=
0
;
p
->
ncsalloc
=
0
;
for
(
i
=
0
;
i
<
NPAREN
;
i
++
)
{
p
->
pbegin
[
i
]
=
0
;
p
->
pend
[
i
]
=
0
;
}
g
->
csetsize
=
NC
;
g
->
sets
=
NULL
;
g
->
setbits
=
NULL
;
g
->
ncsets
=
0
;
g
->
cflags
=
cflags
;
g
->
iflags
=
0
;
g
->
nbol
=
0
;
g
->
neol
=
0
;
g
->
must
=
NULL
;
g
->
mlen
=
0
;
g
->
nsub
=
0
;
g
->
ncategories
=
1
;
/* category 0 is "everything else" */
g
->
categories
=
&
g
->
catspace
[
-
(
CHAR_MIN
)];
(
void
)
memset
((
char
*
)
g
->
catspace
,
0
,
NC
*
sizeof
(
cat_t
));
g
->
backrefs
=
0
;
/* do it */
EMIT
(
OEND
,
0
);
g
->
firststate
=
THERE
();
if
(
cflags
&
REG_EXTENDED
)
p_ere
(
p
,
OUT
);
else
if
(
cflags
&
REG_NOSPEC
)
p_str
(
p
);
else
p_bre
(
p
,
OUT
,
OUT
);
EMIT
(
OEND
,
0
);
g
->
laststate
=
THERE
();
/* tidy up loose ends and fill things in */
categorize
(
p
,
g
);
stripsnug
(
p
,
g
);
findmust
(
p
,
g
);
g
->
nplus
=
pluscount
(
p
,
g
);
g
->
magic
=
MAGIC2
;
preg
->
re_nsub
=
g
->
nsub
;
preg
->
re_g
=
g
;
preg
->
re_magic
=
MAGIC1
;
#ifndef REDEBUG
/* not debugging, so can't rely on the assert() in regexec() */
if
(
g
->
iflags
&
BAD
)
SETERROR
(
REG_ASSERT
);
#endif
/* win or lose, we're done */
if
(
p
->
error
!=
0
)
/* lose */
regfree
(
preg
);
return
(
p
->
error
);
}
/*
- p_ere - ERE parser top level, concatenation and alternation
== static void p_ere(register struct parse *p, int stop);
*/
static
void
p_ere
(
p
,
stop
)
register
struct
parse
*
p
;
int
stop
;
/* character this ERE should end at */
{
register
char
c
;
register
sopno
prevback
;
register
sopno
prevfwd
;
register
sopno
conc
;
register
int
first
=
1
;
/* is this the first alternative? */
for
(;;)
{
/* do a bunch of concatenated expressions */
conc
=
HERE
();
while
(
MORE
()
&&
(
c
=
PEEK
())
!=
'|'
&&
c
!=
stop
)
p_ere_exp
(
p
);
REQUIRE
(
HERE
()
!=
conc
,
REG_EMPTY
);
/* require nonempty */
if
(
!
EAT
(
'|'
))
break
;
/* NOTE BREAK OUT */
if
(
first
)
{
INSERT
(
OCH_
,
conc
);
/* offset is wrong */
prevfwd
=
conc
;
prevback
=
conc
;
first
=
0
;
}
ASTERN
(
OOR1
,
prevback
);
prevback
=
THERE
();
AHEAD
(
prevfwd
);
/* fix previous offset */
prevfwd
=
HERE
();
EMIT
(
OOR2
,
0
);
/* offset is very wrong */
}
if
(
!
first
)
{
/* tail-end fixups */
AHEAD
(
prevfwd
);
ASTERN
(
O_CH
,
prevback
);
}
assert
(
!
MORE
()
||
SEE
(
stop
));
}
/*
- p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
== static void p_ere_exp(register struct parse *p);
*/
static
void
p_ere_exp
(
p
)
register
struct
parse
*
p
;
{
register
char
c
;
register
sopno
pos
;
register
int
count
;
register
int
count2
;
register
sopno
subno
;
int
wascaret
=
0
;
assert
(
MORE
());
/* caller should have ensured this */
c
=
GETNEXT
();
pos
=
HERE
();
switch
(
c
)
{
case
'('
:
REQUIRE
(
MORE
(),
REG_EPAREN
);
p
->
g
->
nsub
++
;
subno
=
p
->
g
->
nsub
;
if
(
subno
<
NPAREN
)
p
->
pbegin
[
subno
]
=
HERE
();
EMIT
(
OLPAREN
,
subno
);
if
(
!
SEE
(
')'
))
p_ere
(
p
,
')'
);
if
(
subno
<
NPAREN
)
{
p
->
pend
[
subno
]
=
HERE
();
assert
(
p
->
pend
[
subno
]
!=
0
);
}
EMIT
(
ORPAREN
,
subno
);
MUSTEAT
(
')'
,
REG_EPAREN
);
break
;
#ifndef POSIX_MISTAKE
case
')'
:
/* happens only if no current unmatched ( */
/*
* You may ask, why the ifndef? Because I didn't notice
* this until slightly too late for 1003.2, and none of the
* other 1003.2 regular-expression reviewers noticed it at
* all. So an unmatched ) is legal POSIX, at least until
* we can get it fixed.
*/
SETERROR
(
REG_EPAREN
);
break
;
#endif
case
'^'
:
EMIT
(
OBOL
,
0
);
p
->
g
->
iflags
|=
USEBOL
;
p
->
g
->
nbol
++
;
wascaret
=
1
;
break
;
case
'$'
:
EMIT
(
OEOL
,
0
);
p
->
g
->
iflags
|=
USEEOL
;
p
->
g
->
neol
++
;
break
;
case
'|'
:
SETERROR
(
REG_EMPTY
);
break
;
case
'*'
:
case
'+'
:
case
'?'
:
SETERROR
(
REG_BADRPT
);
break
;
case
'.'
:
if
(
p
->
g
->
cflags
&
REG_NEWLINE
)
nonnewline
(
p
);
else
EMIT
(
OANY
,
0
);
break
;
case
'['
:
p_bracket
(
p
);
break
;
case
'\\'
:
REQUIRE
(
MORE
(),
REG_EESCAPE
);
c
=
GETNEXT
();
ordinary
(
p
,
c
);
break
;
case
'{'
:
/* okay as ordinary except if digit follows */
REQUIRE
(
!
MORE
()
||
!
isdigit
(
PEEK
()),
REG_BADRPT
);
/* FALLTHROUGH */
default:
ordinary
(
p
,
c
);
break
;
}
if
(
!
MORE
())
return
;
c
=
PEEK
();
/* we call { a repetition if followed by a digit */
if
(
!
(
c
==
'*'
||
c
==
'+'
||
c
==
'?'
||
(
c
==
'{'
&&
MORE2
()
&&
isdigit
(
PEEK2
()))
))
return
;
/* no repetition, we're done */
NEXT
();
REQUIRE
(
!
wascaret
,
REG_BADRPT
);
switch
(
c
)
{
case
'*'
:
/* implemented as +? */
/* this case does not require the (y|) trick, noKLUDGE */
INSERT
(
OPLUS_
,
pos
);
ASTERN
(
O_PLUS
,
pos
);
INSERT
(
OQUEST_
,
pos
);
ASTERN
(
O_QUEST
,
pos
);
break
;
case
'+'
:
INSERT
(
OPLUS_
,
pos
);
ASTERN
(
O_PLUS
,
pos
);
break
;
case
'?'
:
/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
INSERT
(
OCH_
,
pos
);
/* offset slightly wrong */
ASTERN
(
OOR1
,
pos
);
/* this one's right */
AHEAD
(
pos
);
/* fix the OCH_ */
EMIT
(
OOR2
,
0
);
/* offset very wrong... */
AHEAD
(
THERE
());
/* ...so fix it */
ASTERN
(
O_CH
,
THERETHERE
());
break
;
case
'{'
:
count
=
p_count
(
p
);
if
(
EAT
(
','
))
{
if
(
isdigit
(
PEEK
()))
{
count2
=
p_count
(
p
);
REQUIRE
(
count
<=
count2
,
REG_BADBR
);
}
else
/* single number with comma */
count2
=
INFINITY
;
}
else
/* just a single number */
count2
=
count
;
repeat
(
p
,
pos
,
count
,
count2
);
if
(
!
EAT
(
'}'
))
{
/* error heuristics */
while
(
MORE
()
&&
PEEK
()
!=
'}'
)
NEXT
();
REQUIRE
(
MORE
(),
REG_EBRACE
);
SETERROR
(
REG_BADBR
);
}
break
;
}
if
(
!
MORE
())
return
;
c
=
PEEK
();
if
(
!
(
c
==
'*'
||
c
==
'+'
||
c
==
'?'
||
(
c
==
'{'
&&
MORE2
()
&&
isdigit
(
PEEK2
()))
)
)
return
;
SETERROR
(
REG_BADRPT
);
}
/*
- p_str - string (no metacharacters) "parser"
== static void p_str(register struct parse *p);
*/
static
void
p_str
(
p
)
register
struct
parse
*
p
;
{
REQUIRE
(
MORE
(),
REG_EMPTY
);
while
(
MORE
())
ordinary
(
p
,
GETNEXT
());
}
/*
- p_bre - BRE parser top level, anchoring and concatenation
== static void p_bre(register struct parse *p, register int end1, \
== register int end2);
* Giving end1 as OUT essentially eliminates the end1/end2 check.
*
* This implementation is a bit of a kludge, in that a trailing $ is first
* taken as an ordinary character and then revised to be an anchor. The
* only undesirable side effect is that '$' gets included as a character
* category in such cases. This is fairly harmless; not worth fixing.
* The amount of lookahead needed to avoid this kludge is excessive.
*/
static
void
p_bre
(
p
,
end1
,
end2
)
register
struct
parse
*
p
;
register
int
end1
;
/* first terminating character */
register
int
end2
;
/* second terminating character */
{
register
sopno
start
=
HERE
();
register
int
first
=
1
;
/* first subexpression? */
register
int
wasdollar
=
0
;
if
(
EAT
(
'^'
))
{
EMIT
(
OBOL
,
0
);
p
->
g
->
iflags
|=
USEBOL
;
p
->
g
->
nbol
++
;
}
while
(
MORE
()
&&
!
SEETWO
(
end1
,
end2
))
{
wasdollar
=
p_simp_re
(
p
,
first
);
first
=
0
;
}
if
(
wasdollar
)
{
/* oops, that was a trailing anchor */
DROP
(
1
);
EMIT
(
OEOL
,
0
);
p
->
g
->
iflags
|=
USEEOL
;
p
->
g
->
neol
++
;
}
REQUIRE
(
HERE
()
!=
start
,
REG_EMPTY
);
/* require nonempty */
}
/*
- p_simp_re - parse a simple RE, an atom possibly followed by a repetition
== static int p_simp_re(register struct parse *p, int starordinary);
*/
static
int
/* was the simple RE an unbackslashed $? */
p_simp_re
(
p
,
starordinary
)
register
struct
parse
*
p
;
int
starordinary
;
/* is a leading * an ordinary character? */
{
register
int
c
;
register
int
count
;
register
int
count2
;
register
sopno
pos
;
register
int
i
;
register
sopno
subno
;
# define BACKSL (1<<CHAR_BIT)
pos
=
HERE
();
/* repetion op, if any, covers from here */
assert
(
MORE
());
/* caller should have ensured this */
c
=
GETNEXT
();
if
(
c
==
'\\'
)
{
REQUIRE
(
MORE
(),
REG_EESCAPE
);
c
=
BACKSL
|
(
unsigned
char
)
GETNEXT
();
}
switch
(
c
)
{
case
'.'
:
if
(
p
->
g
->
cflags
&
REG_NEWLINE
)
nonnewline
(
p
);
else
EMIT
(
OANY
,
0
);
break
;
case
'['
:
p_bracket
(
p
);
break
;
case
BACKSL
|
'{'
:
SETERROR
(
REG_BADRPT
);
break
;
case
BACKSL
|
'('
:
p
->
g
->
nsub
++
;
subno
=
p
->
g
->
nsub
;
if
(
subno
<
NPAREN
)
p
->
pbegin
[
subno
]
=
HERE
();
EMIT
(
OLPAREN
,
subno
);
/* the MORE here is an error heuristic */
if
(
MORE
()
&&
!
SEETWO
(
'\\'
,
')'
))
p_bre
(
p
,
'\\'
,
')'
);
if
(
subno
<
NPAREN
)
{
p
->
pend
[
subno
]
=
HERE
();
assert
(
p
->
pend
[
subno
]
!=
0
);
}
EMIT
(
ORPAREN
,
subno
);
REQUIRE
(
EATTWO
(
'\\'
,
')'
),
REG_EPAREN
);
break
;
case
BACKSL
|
')'
:
/* should not get here -- must be user */
case
BACKSL
|
'}'
:
SETERROR
(
REG_EPAREN
);
break
;
case
BACKSL
|
'1'
:
case
BACKSL
|
'2'
:
case
BACKSL
|
'3'
:
case
BACKSL
|
'4'
:
case
BACKSL
|
'5'
:
case
BACKSL
|
'6'
:
case
BACKSL
|
'7'
:
case
BACKSL
|
'8'
:
case
BACKSL
|
'9'
:
i
=
(
c
&~
BACKSL
)
-
'0'
;
assert
(
i
<
NPAREN
);
if
(
p
->
pend
[
i
]
!=
0
)
{
assert
(
i
<=
p
->
g
->
nsub
);
EMIT
(
OBACK_
,
i
);
assert
(
p
->
pbegin
[
i
]
!=
0
);
assert
(
OP
(
p
->
strip
[
p
->
pbegin
[
i
]])
==
OLPAREN
);
assert
(
OP
(
p
->
strip
[
p
->
pend
[
i
]])
==
ORPAREN
);
(
void
)
dupl
(
p
,
p
->
pbegin
[
i
]
+
1
,
p
->
pend
[
i
]);
EMIT
(
O_BACK
,
i
);
}
else
SETERROR
(
REG_ESUBREG
);
p
->
g
->
backrefs
=
1
;
break
;
case
'*'
:
REQUIRE
(
starordinary
,
REG_BADRPT
);
/* FALLTHROUGH */
default:
ordinary
(
p
,
c
&~
BACKSL
);
break
;
}
if
(
EAT
(
'*'
))
{
/* implemented as +? */
/* this case does not require the (y|) trick, noKLUDGE */
INSERT
(
OPLUS_
,
pos
);
ASTERN
(
O_PLUS
,
pos
);
INSERT
(
OQUEST_
,
pos
);
ASTERN
(
O_QUEST
,
pos
);
}
else
if
(
EATTWO
(
'\\'
,
'{'
))
{
count
=
p_count
(
p
);
if
(
EAT
(
','
))
{
if
(
MORE
()
&&
isdigit
(
PEEK
()))
{
count2
=
p_count
(
p
);
REQUIRE
(
count
<=
count2
,
REG_BADBR
);
}
else
/* single number with comma */
count2
=
INFINITY
;
}
else
/* just a single number */
count2
=
count
;
repeat
(
p
,
pos
,
count
,
count2
);
if
(
!
EATTWO
(
'\\'
,
'}'
))
{
/* error heuristics */
while
(
MORE
()
&&
!
SEETWO
(
'\\'
,
'}'
))
NEXT
();
REQUIRE
(
MORE
(),
REG_EBRACE
);
SETERROR
(
REG_BADBR
);
}
}
else
if
(
c
==
(
unsigned
char
)
'$'
)
/* $ (but not \$) ends it */
return
(
1
);
return
(
0
);
}
/*
- p_count - parse a repetition count
== static int p_count(register struct parse *p);
*/
static
int
/* the value */
p_count
(
p
)
register
struct
parse
*
p
;
{
register
int
count
=
0
;
register
int
ndigits
=
0
;
while
(
MORE
()
&&
isdigit
(
PEEK
())
&&
count
<=
DUPMAX
)
{
count
=
count
*
10
+
(
GETNEXT
()
-
'0'
);
ndigits
++
;
}
REQUIRE
(
ndigits
>
0
&&
count
<=
DUPMAX
,
REG_BADBR
);
return
(
count
);
}
/*
- p_bracket - parse a bracketed character list
== static void p_bracket(register struct parse *p);
*
* Note a significant property of this code: if the allocset() did SETERROR,
* no set operations are done.
*/
static
void
p_bracket
(
p
)
register
struct
parse
*
p
;
{
register
char
c
;
register
cset
*
cs
=
allocset
(
p
);
register
int
invert
=
0
;
/* Dept of Truly Sickening Special-Case Kludges */
if
(
p
->
next
+
5
<
p
->
end
&&
strncmp
(
p
->
next
,
"[:<:]]"
,
6
)
==
0
)
{
EMIT
(
OBOW
,
0
);
NEXTn
(
6
);
return
;
}
if
(
p
->
next
+
5
<
p
->
end
&&
strncmp
(
p
->
next
,
"[:>:]]"
,
6
)
==
0
)
{
EMIT
(
OEOW
,
0
);
NEXTn
(
6
);
return
;
}
if
(
EAT
(
'^'
))
invert
++
;
/* make note to invert set at end */
if
(
EAT
(
']'
))
CHadd
(
cs
,
']'
);
else
if
(
EAT
(
'-'
))
CHadd
(
cs
,
'-'
);
while
(
MORE
()
&&
PEEK
()
!=
']'
&&
!
SEETWO
(
'-'
,
']'
))
p_b_term
(
p
,
cs
);
if
(
EAT
(
'-'
))
CHadd
(
cs
,
'-'
);
MUSTEAT
(
']'
,
REG_EBRACK
);
if
(
p
->
error
!=
0
)
/* don't mess things up further */
return
;
if
(
p
->
g
->
cflags
&
REG_ICASE
)
{
register
int
i
;
register
int
ci
;
for
(
i
=
p
->
g
->
csetsize
-
1
;
i
>=
0
;
i
--
)
if
(
CHIN
(
cs
,
i
)
&&
isalpha
(
i
))
{
ci
=
othercase
(
i
);
if
(
ci
!=
i
)
CHadd
(
cs
,
ci
);
}
if
(
cs
->
multis
!=
NULL
)
mccase
(
p
,
cs
);
}
if
(
invert
)
{
register
int
i
;
for
(
i
=
p
->
g
->
csetsize
-
1
;
i
>=
0
;
i
--
)
if
(
CHIN
(
cs
,
i
))
CHsub
(
cs
,
i
);
else
CHadd
(
cs
,
i
);
if
(
p
->
g
->
cflags
&
REG_NEWLINE
)
CHsub
(
cs
,
'\n'
);
if
(
cs
->
multis
!=
NULL
)
mcinvert
(
p
,
cs
);
}
assert
(
cs
->
multis
==
NULL
);
/* xxx */
if
(
nch
(
p
,
cs
)
==
1
)
{
/* optimize singleton sets */
ordinary
(
p
,
firstch
(
p
,
cs
));
freeset
(
p
,
cs
);
}
else
EMIT
(
OANYOF
,
freezeset
(
p
,
cs
));
}
/*
- p_b_term - parse one term of a bracketed character list
== static void p_b_term(register struct parse *p, register cset *cs);
*/
static
void
p_b_term
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
char
c
;
register
char
start
,
finish
;
register
int
i
;
/* classify what we've got */
switch
((
MORE
())
?
PEEK
()
:
'\0'
)
{
case
'['
:
c
=
(
MORE2
())
?
PEEK2
()
:
'\0'
;
break
;
case
'-'
:
SETERROR
(
REG_ERANGE
);
return
;
/* NOTE RETURN */
break
;
default:
c
=
'\0'
;
break
;
}
switch
(
c
)
{
case
':'
:
/* character class */
NEXT2
();
REQUIRE
(
MORE
(),
REG_EBRACK
);
c
=
PEEK
();
REQUIRE
(
c
!=
'-'
&&
c
!=
']'
,
REG_ECTYPE
);
p_b_cclass
(
p
,
cs
);
REQUIRE
(
MORE
(),
REG_EBRACK
);
REQUIRE
(
EATTWO
(
':'
,
']'
),
REG_ECTYPE
);
break
;
case
'='
:
/* equivalence class */
NEXT2
();
REQUIRE
(
MORE
(),
REG_EBRACK
);
c
=
PEEK
();
REQUIRE
(
c
!=
'-'
&&
c
!=
']'
,
REG_ECOLLATE
);
p_b_eclass
(
p
,
cs
);
REQUIRE
(
MORE
(),
REG_EBRACK
);
REQUIRE
(
EATTWO
(
'='
,
']'
),
REG_ECOLLATE
);
break
;
default:
/* symbol, ordinary character, or range */
/* xxx revision needed for multichar stuff */
start
=
p_b_symbol
(
p
);
if
(
SEE
(
'-'
)
&&
MORE2
()
&&
PEEK2
()
!=
']'
)
{
/* range */
NEXT
();
if
(
EAT
(
'-'
))
finish
=
'-'
;
else
finish
=
p_b_symbol
(
p
);
}
else
finish
=
start
;
/* xxx what about signed chars here... */
REQUIRE
(
start
<=
finish
,
REG_ERANGE
);
for
(
i
=
start
;
i
<=
finish
;
i
++
)
CHadd
(
cs
,
i
);
break
;
}
}
/*
- p_b_cclass - parse a character-class name and deal with it
== static void p_b_cclass(register struct parse *p, register cset *cs);
*/
static
void
p_b_cclass
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
char
*
sp
=
p
->
next
;
register
struct
cclass
*
cp
;
register
size_t
len
;
register
char
*
u
;
register
char
c
;
while
(
MORE
()
&&
isalpha
(
PEEK
()))
NEXT
();
len
=
p
->
next
-
sp
;
for
(
cp
=
cclasses
;
cp
->
name
!=
NULL
;
cp
++
)
if
(
strncmp
(
cp
->
name
,
sp
,
len
)
==
0
&&
cp
->
name
[
len
]
==
'\0'
)
break
;
if
(
cp
->
name
==
NULL
)
{
/* oops, didn't find it */
SETERROR
(
REG_ECTYPE
);
return
;
}
u
=
cp
->
chars
;
while
((
c
=
*
u
++
)
!=
'\0'
)
CHadd
(
cs
,
c
);
for
(
u
=
cp
->
multis
;
*
u
!=
'\0'
;
u
+=
strlen
(
u
)
+
1
)
MCadd
(
p
,
cs
,
u
);
}
/*
- p_b_eclass - parse an equivalence-class name and deal with it
== static void p_b_eclass(register struct parse *p, register cset *cs);
*
* This implementation is incomplete. xxx
*/
static
void
p_b_eclass
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
char
c
;
c
=
p_b_coll_elem
(
p
,
'='
);
CHadd
(
cs
,
c
);
}
/*
- p_b_symbol - parse a character or [..]ed multicharacter collating symbol
== static char p_b_symbol(register struct parse *p);
*/
static
char
/* value of symbol */
p_b_symbol
(
p
)
register
struct
parse
*
p
;
{
register
char
value
;
REQUIRE
(
MORE
(),
REG_EBRACK
);
if
(
!
EATTWO
(
'['
,
'.'
))
return
(
GETNEXT
());
/* collating symbol */
value
=
p_b_coll_elem
(
p
,
'.'
);
REQUIRE
(
EATTWO
(
'.'
,
']'
),
REG_ECOLLATE
);
return
(
value
);
}
/*
- p_b_coll_elem - parse a collating-element name and look it up
== static char p_b_coll_elem(register struct parse *p, int endc);
*/
static
char
/* value of collating element */
p_b_coll_elem
(
p
,
endc
)
register
struct
parse
*
p
;
int
endc
;
/* name ended by endc,']' */
{
register
char
*
sp
=
p
->
next
;
register
struct
cname
*
cp
;
register
int
len
;
register
char
c
;
while
(
MORE
()
&&
!
SEETWO
(
endc
,
']'
))
NEXT
();
if
(
!
MORE
())
{
SETERROR
(
REG_EBRACK
);
return
(
0
);
}
len
=
p
->
next
-
sp
;
for
(
cp
=
cnames
;
cp
->
name
!=
NULL
;
cp
++
)
if
(
strncmp
(
cp
->
name
,
sp
,
len
)
==
0
&&
cp
->
name
[
len
]
==
'\0'
)
return
(
cp
->
code
);
/* known name */
if
(
len
==
1
)
return
(
*
sp
);
/* single character */
SETERROR
(
REG_ECOLLATE
);
/* neither */
return
(
0
);
}
/*
- othercase - return the case counterpart of an alphabetic
== static char othercase(int ch);
*/
static
char
/* if no counterpart, return ch */
othercase
(
ch
)
int
ch
;
{
assert
(
isalpha
(
ch
));
if
(
isupper
(
ch
))
return
(
tolower
(
ch
));
else
if
(
islower
(
ch
))
return
(
toupper
(
ch
));
else
/* peculiar, but could happen */
return
(
ch
);
}
/*
- bothcases - emit a dualcase version of a two-case character
== static void bothcases(register struct parse *p, int ch);
*
* Boy, is this implementation ever a kludge...
*/
static
void
bothcases
(
p
,
ch
)
register
struct
parse
*
p
;
int
ch
;
{
register
char
*
oldnext
=
p
->
next
;
register
char
*
oldend
=
p
->
end
;
char
bracket
[
3
];
assert
(
othercase
(
ch
)
!=
ch
);
/* p_bracket() would recurse */
p
->
next
=
bracket
;
p
->
end
=
bracket
+
2
;
bracket
[
0
]
=
ch
;
bracket
[
1
]
=
']'
;
bracket
[
2
]
=
'\0'
;
p_bracket
(
p
);
assert
(
p
->
next
==
bracket
+
2
);
p
->
next
=
oldnext
;
p
->
end
=
oldend
;
}
/*
- ordinary - emit an ordinary character
== static void ordinary(register struct parse *p, register int ch);
*/
static
void
ordinary
(
p
,
ch
)
register
struct
parse
*
p
;
register
int
ch
;
{
register
cat_t
*
cap
=
p
->
g
->
categories
;
if
((
p
->
g
->
cflags
&
REG_ICASE
)
&&
isalpha
(
ch
)
&&
othercase
(
ch
)
!=
ch
)
bothcases
(
p
,
ch
);
else
{
EMIT
(
OCHAR
,
(
unsigned
char
)
ch
);
if
(
cap
[
ch
]
==
0
)
cap
[
ch
]
=
p
->
g
->
ncategories
++
;
}
}
/*
- nonnewline - emit REG_NEWLINE version of OANY
== static void nonnewline(register struct parse *p);
*
* Boy, is this implementation ever a kludge...
*/
static
void
nonnewline
(
p
)
register
struct
parse
*
p
;
{
register
char
*
oldnext
=
p
->
next
;
register
char
*
oldend
=
p
->
end
;
char
bracket
[
4
];
p
->
next
=
bracket
;
p
->
end
=
bracket
+
3
;
bracket
[
0
]
=
'^'
;
bracket
[
1
]
=
'\n'
;
bracket
[
2
]
=
']'
;
bracket
[
3
]
=
'\0'
;
p_bracket
(
p
);
assert
(
p
->
next
==
bracket
+
3
);
p
->
next
=
oldnext
;
p
->
end
=
oldend
;
}
/*
- repeat - generate code for a bounded repetition, recursively if needed
== static void repeat(register struct parse *p, sopno start, int from, int to);
*/
static
void
repeat
(
p
,
start
,
from
,
to
)
register
struct
parse
*
p
;
sopno
start
;
/* operand from here to end of strip */
int
from
;
/* repeated from this number */
int
to
;
/* to this number of times (maybe INFINITY) */
{
register
sopno
finish
=
HERE
();
# define N 2
# define INF 3
# define REP(f, t) ((f)*8 + (t))
# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
register
sopno
copy
;
if
(
p
->
error
!=
0
)
/* head off possible runaway recursion */
return
;
assert
(
from
<=
to
);
switch
(
REP
(
MAP
(
from
),
MAP
(
to
)))
{
case
REP
(
0
,
0
):
/* must be user doing this */
DROP
(
finish
-
start
);
/* drop the operand */
break
;
case
REP
(
0
,
1
):
/* as x{1,1}? */
case
REP
(
0
,
N
):
/* as x{1,n}? */
case
REP
(
0
,
INF
):
/* as x{1,}? */
/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
INSERT
(
OCH_
,
start
);
/* offset is wrong... */
repeat
(
p
,
start
+
1
,
1
,
to
);
ASTERN
(
OOR1
,
start
);
AHEAD
(
start
);
/* ... fix it */
EMIT
(
OOR2
,
0
);
AHEAD
(
THERE
());
ASTERN
(
O_CH
,
THERETHERE
());
break
;
case
REP
(
1
,
1
):
/* trivial case */
/* done */
break
;
case
REP
(
1
,
N
):
/* as x?x{1,n-1} */
/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
INSERT
(
OCH_
,
start
);
ASTERN
(
OOR1
,
start
);
AHEAD
(
start
);
EMIT
(
OOR2
,
0
);
/* offset very wrong... */
AHEAD
(
THERE
());
/* ...so fix it */
ASTERN
(
O_CH
,
THERETHERE
());
copy
=
dupl
(
p
,
start
+
1
,
finish
+
1
);
assert
(
copy
==
finish
+
4
);
repeat
(
p
,
copy
,
1
,
to
-
1
);
break
;
case
REP
(
1
,
INF
):
/* as x+ */
INSERT
(
OPLUS_
,
start
);
ASTERN
(
O_PLUS
,
start
);
break
;
case
REP
(
N
,
N
):
/* as xx{m-1,n-1} */
copy
=
dupl
(
p
,
start
,
finish
);
repeat
(
p
,
copy
,
from
-
1
,
to
-
1
);
break
;
case
REP
(
N
,
INF
):
/* as xx{n-1,INF} */
copy
=
dupl
(
p
,
start
,
finish
);
repeat
(
p
,
copy
,
from
-
1
,
to
);
break
;
default:
/* "can't happen" */
SETERROR
(
REG_ASSERT
);
/* just in case */
break
;
}
}
/*
- seterr - set an error condition
== static int seterr(register struct parse *p, int e);
*/
static
int
/* useless but makes type checking happy */
seterr
(
p
,
e
)
register
struct
parse
*
p
;
int
e
;
{
if
(
p
->
error
==
0
)
/* keep earliest error condition */
p
->
error
=
e
;
p
->
next
=
nuls
;
/* try to bring things to a halt */
p
->
end
=
nuls
;
return
(
0
);
/* make the return value well-defined */
}
/*
- allocset - allocate a set of characters for []
== static cset *allocset(register struct parse *p);
*/
static
cset
*
allocset
(
p
)
register
struct
parse
*
p
;
{
register
int
no
=
p
->
g
->
ncsets
++
;
register
size_t
nc
;
register
size_t
nbytes
;
register
cset
*
cs
;
register
size_t
css
=
(
size_t
)
p
->
g
->
csetsize
;
register
int
i
;
if
(
no
>=
p
->
ncsalloc
)
{
/* need another column of space */
p
->
ncsalloc
+=
CHAR_BIT
;
nc
=
p
->
ncsalloc
;
assert
(
nc
%
CHAR_BIT
==
0
);
nbytes
=
nc
/
CHAR_BIT
*
css
;
if
(
p
->
g
->
sets
==
NULL
)
p
->
g
->
sets
=
(
cset
*
)
malloc
(
nc
*
sizeof
(
cset
));
else
p
->
g
->
sets
=
(
cset
*
)
realloc
((
char
*
)
p
->
g
->
sets
,
nc
*
sizeof
(
cset
));
if
(
p
->
g
->
setbits
==
NULL
)
p
->
g
->
setbits
=
(
uch
*
)
malloc
(
nbytes
);
else
{
p
->
g
->
setbits
=
(
uch
*
)
realloc
((
char
*
)
p
->
g
->
setbits
,
nbytes
);
/* xxx this isn't right if setbits is now NULL */
for
(
i
=
0
;
i
<
no
;
i
++
)
p
->
g
->
sets
[
i
].
ptr
=
p
->
g
->
setbits
+
css
*
(
i
/
CHAR_BIT
);
}
if
(
p
->
g
->
sets
!=
NULL
&&
p
->
g
->
setbits
!=
NULL
)
(
void
)
memset
((
char
*
)
p
->
g
->
setbits
+
(
nbytes
-
css
),
0
,
css
);
else
{
no
=
0
;
SETERROR
(
REG_ESPACE
);
/* caller's responsibility not to do set ops */
}
}
assert
(
p
->
g
->
sets
!=
NULL
);
/* xxx */
cs
=
&
p
->
g
->
sets
[
no
];
cs
->
ptr
=
p
->
g
->
setbits
+
css
*
((
no
)
/
CHAR_BIT
);
cs
->
mask
=
1
<<
((
no
)
%
CHAR_BIT
);
cs
->
hash
=
0
;
cs
->
smultis
=
0
;
cs
->
multis
=
NULL
;
return
(
cs
);
}
/*
- freeset - free a now-unused set
== static void freeset(register struct parse *p, register cset *cs);
*/
static
void
freeset
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
int
i
;
register
cset
*
top
=
&
p
->
g
->
sets
[
p
->
g
->
ncsets
];
register
size_t
css
=
(
size_t
)
p
->
g
->
csetsize
;
for
(
i
=
0
;
i
<
css
;
i
++
)
CHsub
(
cs
,
i
);
if
(
cs
==
top
-
1
)
/* recover only the easy case */
p
->
g
->
ncsets
--
;
}
/*
- freezeset - final processing on a set of characters
== static int freezeset(register struct parse *p, register cset *cs);
*
* The main task here is merging identical sets. This is usually a waste
* of time (although the hash code minimizes the overhead), but can win
* big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash
* is done using addition rather than xor -- all ASCII [aA] sets xor to
* the same value!
*/
static
int
/* set number */
freezeset
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
uch
h
=
cs
->
hash
;
register
int
i
;
register
cset
*
top
=
&
p
->
g
->
sets
[
p
->
g
->
ncsets
];
register
cset
*
cs2
;
register
size_t
css
=
(
size_t
)
p
->
g
->
csetsize
;
/* look for an earlier one which is the same */
for
(
cs2
=
&
p
->
g
->
sets
[
0
];
cs2
<
top
;
cs2
++
)
if
(
cs2
->
hash
==
h
&&
cs2
!=
cs
)
{
/* maybe */
for
(
i
=
0
;
i
<
css
;
i
++
)
if
(
!!
CHIN
(
cs2
,
i
)
!=
!!
CHIN
(
cs
,
i
))
break
;
/* no */
if
(
i
==
css
)
break
;
/* yes */
}
if
(
cs2
<
top
)
{
/* found one */
freeset
(
p
,
cs
);
cs
=
cs2
;
}
return
((
int
)(
cs
-
p
->
g
->
sets
));
}
/*
- firstch - return first character in a set (which must have at least one)
== static int firstch(register struct parse *p, register cset *cs);
*/
static
int
/* character; there is no "none" value */
firstch
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
int
i
;
register
size_t
css
=
(
size_t
)
p
->
g
->
csetsize
;
for
(
i
=
0
;
i
<
css
;
i
++
)
if
(
CHIN
(
cs
,
i
))
return
((
char
)
i
);
assert
(
never
);
return
(
0
);
/* arbitrary */
}
/*
- nch - number of characters in a set
== static int nch(register struct parse *p, register cset *cs);
*/
static
int
nch
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
register
int
i
;
register
size_t
css
=
(
size_t
)
p
->
g
->
csetsize
;
register
int
n
=
0
;
for
(
i
=
0
;
i
<
css
;
i
++
)
if
(
CHIN
(
cs
,
i
))
n
++
;
return
(
n
);
}
/*
- mcadd - add a collating element to a cset
== static void mcadd(register struct parse *p, register cset *cs, \
== register char *cp);
*/
static
void
mcadd
(
p
,
cs
,
cp
)
register
struct
parse
*
p
;
register
cset
*
cs
;
register
char
*
cp
;
{
register
size_t
oldend
=
cs
->
smultis
;
cs
->
smultis
+=
strlen
(
cp
)
+
1
;
if
(
cs
->
multis
==
NULL
)
cs
->
multis
=
malloc
(
cs
->
smultis
);
else
cs
->
multis
=
realloc
(
cs
->
multis
,
cs
->
smultis
);
if
(
cs
->
multis
==
NULL
)
{
SETERROR
(
REG_ESPACE
);
return
;
}
(
void
)
strcpy
(
cs
->
multis
+
oldend
-
1
,
cp
);
cs
->
multis
[
cs
->
smultis
-
1
]
=
'\0'
;
}
/*
- mcsub - subtract a collating element from a cset
== static void mcsub(register cset *cs, register char *cp);
*/
static
void
mcsub
(
cs
,
cp
)
register
cset
*
cs
;
register
char
*
cp
;
{
register
char
*
fp
=
mcfind
(
cs
,
cp
);
register
size_t
len
=
strlen
(
fp
);
assert
(
fp
!=
NULL
);
(
void
)
memmove
(
fp
,
fp
+
len
+
1
,
cs
->
smultis
-
(
fp
+
len
+
1
-
cs
->
multis
));
cs
->
smultis
-=
len
;
if
(
cs
->
smultis
==
0
)
{
free
(
cs
->
multis
);
cs
->
multis
=
NULL
;
return
;
}
cs
->
multis
=
realloc
(
cs
->
multis
,
cs
->
smultis
);
assert
(
cs
->
multis
!=
NULL
);
}
/*
- mcin - is a collating element in a cset?
== static int mcin(register cset *cs, register char *cp);
*/
static
int
mcin
(
cs
,
cp
)
register
cset
*
cs
;
register
char
*
cp
;
{
return
(
mcfind
(
cs
,
cp
)
!=
NULL
);
}
/*
- mcfind - find a collating element in a cset
== static char *mcfind(register cset *cs, register char *cp);
*/
static
char
*
mcfind
(
cs
,
cp
)
register
cset
*
cs
;
register
char
*
cp
;
{
register
char
*
p
;
if
(
cs
->
multis
==
NULL
)
return
(
NULL
);
for
(
p
=
cs
->
multis
;
*
p
!=
'\0'
;
p
+=
strlen
(
p
)
+
1
)
if
(
strcmp
(
cp
,
p
)
==
0
)
return
(
p
);
return
(
NULL
);
}
/*
- mcinvert - invert the list of collating elements in a cset
== static void mcinvert(register struct parse *p, register cset *cs);
*
* This would have to know the set of possibilities. Implementation
* is deferred.
*/
static
void
mcinvert
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
assert
(
cs
->
multis
==
NULL
);
/* xxx */
}
/*
- mccase - add case counterparts of the list of collating elements in a cset
== static void mccase(register struct parse *p, register cset *cs);
*
* This would have to know the set of possibilities. Implementation
* is deferred.
*/
static
void
mccase
(
p
,
cs
)
register
struct
parse
*
p
;
register
cset
*
cs
;
{
assert
(
cs
->
multis
==
NULL
);
/* xxx */
}
/*
- isinsets - is this character in any sets?
== static int isinsets(register struct re_guts *g, int c);
*/
static
int
/* predicate */
isinsets
(
g
,
c
)
register
struct
re_guts
*
g
;
int
c
;
{
register
uch
*
col
;
register
int
i
;
register
int
ncols
=
(
g
->
ncsets
+
(
CHAR_BIT
-
1
))
/
CHAR_BIT
;
register
unsigned
uc
=
(
unsigned
char
)
c
;
for
(
i
=
0
,
col
=
g
->
setbits
;
i
<
ncols
;
i
++
,
col
+=
g
->
csetsize
)
if
(
col
[
uc
]
!=
0
)
return
(
1
);
return
(
0
);
}
/*
- samesets - are these two characters in exactly the same sets?
== static int samesets(register struct re_guts *g, int c1, int c2);
*/
static
int
/* predicate */
samesets
(
g
,
c1
,
c2
)
register
struct
re_guts
*
g
;
int
c1
;
int
c2
;
{
register
uch
*
col
;
register
int
i
;
register
int
ncols
=
(
g
->
ncsets
+
(
CHAR_BIT
-
1
))
/
CHAR_BIT
;
register
unsigned
uc1
=
(
unsigned
char
)
c1
;
register
unsigned
uc2
=
(
unsigned
char
)
c2
;
for
(
i
=
0
,
col
=
g
->
setbits
;
i
<
ncols
;
i
++
,
col
+=
g
->
csetsize
)
if
(
col
[
uc1
]
!=
col
[
uc2
])
return
(
0
);
return
(
1
);
}
/*
- categorize - sort out character categories
== static void categorize(struct parse *p, register struct re_guts *g);
*/
static
void
categorize
(
p
,
g
)
struct
parse
*
p
;
register
struct
re_guts
*
g
;
{
register
cat_t
*
cats
=
g
->
categories
;
register
int
c
;
register
int
c2
;
register
cat_t
cat
;
/* avoid making error situations worse */
if
(
p
->
error
!=
0
)
return
;
for
(
c
=
CHAR_MIN
;
c
<=
CHAR_MAX
;
c
++
)
if
(
cats
[
c
]
==
0
&&
isinsets
(
g
,
c
))
{
cat
=
g
->
ncategories
++
;
cats
[
c
]
=
cat
;
for
(
c2
=
c
+
1
;
c2
<=
CHAR_MAX
;
c2
++
)
if
(
cats
[
c2
]
==
0
&&
samesets
(
g
,
c
,
c2
))
cats
[
c2
]
=
cat
;
}
}
/*
- dupl - emit a duplicate of a bunch of sops
== static sopno dupl(register struct parse *p, sopno start, sopno finish);
*/
static
sopno
/* start of duplicate */
dupl
(
p
,
start
,
finish
)
register
struct
parse
*
p
;
sopno
start
;
/* from here */
sopno
finish
;
/* to this less one */
{
register
sopno
ret
=
HERE
();
register
sopno
len
=
finish
-
start
;
assert
(
finish
>=
start
);
if
(
len
==
0
)
return
(
ret
);
enlarge
(
p
,
p
->
ssize
+
len
);
/* this many unexpected additions */
assert
(
p
->
ssize
>=
p
->
slen
+
len
);
(
void
)
memcpy
((
char
*
)(
p
->
strip
+
p
->
slen
),
(
char
*
)(
p
->
strip
+
start
),
(
size_t
)
len
*
sizeof
(
sop
));
p
->
slen
+=
len
;
return
(
ret
);
}
/*
- doemit - emit a strip operator
== static void doemit(register struct parse *p, sop op, size_t opnd);
*
* It might seem better to implement this as a macro with a function as
* hard-case backup, but it's just too big and messy unless there are
* some changes to the data structures. Maybe later.
*/
static
void
doemit
(
p
,
op
,
opnd
)
register
struct
parse
*
p
;
sop
op
;
size_t
opnd
;
{
/* avoid making error situations worse */
if
(
p
->
error
!=
0
)
return
;
/* deal with oversize operands ("can't happen", more or less) */
assert
(
opnd
<
1
<<
OPSHIFT
);
/* deal with undersized strip */
if
(
p
->
slen
>=
p
->
ssize
)
enlarge
(
p
,
(
p
->
ssize
+
1
)
/
2
*
3
);
/* +50% */
assert
(
p
->
slen
<
p
->
ssize
);
/* finally, it's all reduced to the easy case */
p
->
strip
[
p
->
slen
++
]
=
SOP
(
op
,
opnd
);
}
/*
- doinsert - insert a sop into the strip
== static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos);
*/
static
void
doinsert
(
p
,
op
,
opnd
,
pos
)
register
struct
parse
*
p
;
sop
op
;
size_t
opnd
;
sopno
pos
;
{
register
sopno
sn
;
register
sop
s
;
register
int
i
;
/* avoid making error situations worse */
if
(
p
->
error
!=
0
)
return
;
sn
=
HERE
();
EMIT
(
op
,
opnd
);
/* do checks, ensure space */
assert
(
HERE
()
==
sn
+
1
);
s
=
p
->
strip
[
sn
];
/* adjust paren pointers */
assert
(
pos
>
0
);
for
(
i
=
1
;
i
<
NPAREN
;
i
++
)
{
if
(
p
->
pbegin
[
i
]
>=
pos
)
{
p
->
pbegin
[
i
]
++
;
}
if
(
p
->
pend
[
i
]
>=
pos
)
{
p
->
pend
[
i
]
++
;
}
}
memmove
((
char
*
)
&
p
->
strip
[
pos
+
1
],
(
char
*
)
&
p
->
strip
[
pos
],
(
HERE
()
-
pos
-
1
)
*
sizeof
(
sop
));
p
->
strip
[
pos
]
=
s
;
}
/*
- dofwd - complete a forward reference
== static void dofwd(register struct parse *p, sopno pos, sop value);
*/
static
void
dofwd
(
p
,
pos
,
value
)
register
struct
parse
*
p
;
register
sopno
pos
;
sop
value
;
{
/* avoid making error situations worse */
if
(
p
->
error
!=
0
)
return
;
assert
(
value
<
1
<<
OPSHIFT
);
p
->
strip
[
pos
]
=
OP
(
p
->
strip
[
pos
])
|
value
;
}
/*
- enlarge - enlarge the strip
== static void enlarge(register struct parse *p, sopno size);
*/
static
void
enlarge
(
p
,
size
)
register
struct
parse
*
p
;
register
sopno
size
;
{
register
sop
*
sp
;
if
(
p
->
ssize
>=
size
)
return
;
sp
=
(
sop
*
)
realloc
(
p
->
strip
,
size
*
sizeof
(
sop
));
if
(
sp
==
NULL
)
{
SETERROR
(
REG_ESPACE
);
return
;
}
p
->
strip
=
sp
;
p
->
ssize
=
size
;
}
/*
- stripsnug - compact the strip
== static void stripsnug(register struct parse *p, register struct re_guts *g);
*/
static
void
stripsnug
(
p
,
g
)
register
struct
parse
*
p
;
register
struct
re_guts
*
g
;
{
g
->
nstates
=
p
->
slen
;
g
->
strip
=
(
sop
*
)
realloc
((
char
*
)
p
->
strip
,
p
->
slen
*
sizeof
(
sop
));
if
(
g
->
strip
==
NULL
)
{
SETERROR
(
REG_ESPACE
);
g
->
strip
=
p
->
strip
;
}
}
/*
- findmust - fill in must and mlen with longest mandatory literal string
== static void findmust(register struct parse *p, register struct re_guts *g);
*
* This algorithm could do fancy things like analyzing the operands of |
* for common subsequences. Someday. This code is simple and finds most
* of the interesting cases.
*
* Note that must and mlen got initialized during setup.
*/
static
void
findmust
(
p
,
g
)
struct
parse
*
p
;
register
struct
re_guts
*
g
;
{
register
sop
*
scan
;
sop
*
start
;
register
sop
*
newstart
;
register
sopno
newlen
;
register
sop
s
;
register
char
*
cp
;
register
sopno
i
;
/* avoid making error situations worse */
if
(
p
->
error
!=
0
)
return
;
/* find the longest OCHAR sequence in strip */
newlen
=
0
;
scan
=
g
->
strip
+
1
;
do
{
s
=
*
scan
++
;
switch
(
OP
(
s
))
{
case
OCHAR
:
/* sequence member */
if
(
newlen
==
0
)
/* new sequence */
newstart
=
scan
-
1
;
newlen
++
;
break
;
case
OPLUS_
:
/* things that don't break one */
case
OLPAREN
:
case
ORPAREN
:
break
;
case
OQUEST_
:
/* things that must be skipped */
case
OCH_
:
scan
--
;
do
{
scan
+=
OPND
(
s
);
s
=
*
scan
;
/* assert() interferes w debug printouts */
if
(
OP
(
s
)
!=
O_QUEST
&&
OP
(
s
)
!=
O_CH
&&
OP
(
s
)
!=
OOR2
)
{
g
->
iflags
|=
BAD
;
return
;
}
}
while
(
OP
(
s
)
!=
O_QUEST
&&
OP
(
s
)
!=
O_CH
);
/* fallthrough */
default:
/* things that break a sequence */
if
(
newlen
>
g
->
mlen
)
{
/* ends one */
start
=
newstart
;
g
->
mlen
=
newlen
;
}
newlen
=
0
;
break
;
}
}
while
(
OP
(
s
)
!=
OEND
);
if
(
g
->
mlen
==
0
)
/* there isn't one */
return
;
/* turn it into a character string */
g
->
must
=
malloc
((
size_t
)
g
->
mlen
+
1
);
if
(
g
->
must
==
NULL
)
{
/* argh; just forget it */
g
->
mlen
=
0
;
return
;
}
cp
=
g
->
must
;
scan
=
start
;
for
(
i
=
g
->
mlen
;
i
>
0
;
i
--
)
{
while
(
OP
(
s
=
*
scan
++
)
!=
OCHAR
)
continue
;
assert
(
cp
<
g
->
must
+
g
->
mlen
);
*
cp
++
=
(
char
)
OPND
(
s
);
}
assert
(
cp
==
g
->
must
+
g
->
mlen
);
*
cp
++
=
'\0'
;
/* just on general principles */
}
/*
- pluscount - count + nesting
== static sopno pluscount(register struct parse *p, register struct re_guts *g);
*/
static
sopno
/* nesting depth */
pluscount
(
p
,
g
)
struct
parse
*
p
;
register
struct
re_guts
*
g
;
{
register
sop
*
scan
;
register
sop
s
;
register
sopno
plusnest
=
0
;
register
sopno
maxnest
=
0
;
if
(
p
->
error
!=
0
)
return
(
0
);
/* there may not be an OEND */
scan
=
g
->
strip
+
1
;
do
{
s
=
*
scan
++
;
switch
(
OP
(
s
))
{
case
OPLUS_
:
plusnest
++
;
break
;
case
O_PLUS
:
if
(
plusnest
>
maxnest
)
maxnest
=
plusnest
;
plusnest
--
;
break
;
}
}
while
(
OP
(
s
)
!=
OEND
);
if
(
plusnest
!=
0
)
g
->
iflags
|=
BAD
;
return
(
maxnest
);
}
src/backend/port/win32/regex/regerror.c
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regerror.c 8.4 (Berkeley) 3/20/94
*/
#if defined(LIBC_SCCS) && !defined(lint)
static
char
sccsid
[]
=
"@(#)regerror.c 8.4 (Berkeley) 3/20/94"
;
#endif
/* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
#include <regex.h>
#include "utils.h"
/* ========= begin header generated by ./mkh ========= */
#ifdef __cplusplus
extern
"C"
{
#endif
/* === regerror.c === */
static
char
*
regatoi
__P
((
const
regex_t
*
preg
,
char
*
localbuf
));
#ifdef __cplusplus
}
#endif
/* ========= end header generated by ./mkh ========= */
/*
= #define REG_NOMATCH 1
= #define REG_BADPAT 2
= #define REG_ECOLLATE 3
= #define REG_ECTYPE 4
= #define REG_EESCAPE 5
= #define REG_ESUBREG 6
= #define REG_EBRACK 7
= #define REG_EPAREN 8
= #define REG_EBRACE 9
= #define REG_BADBR 10
= #define REG_ERANGE 11
= #define REG_ESPACE 12
= #define REG_BADRPT 13
= #define REG_EMPTY 14
= #define REG_ASSERT 15
= #define REG_INVARG 16
= #define REG_ATOI 255 // convert name to number (!)
= #define REG_ITOA 0400 // convert number to name (!)
*/
static
struct
rerr
{
int
code
;
char
*
name
;
char
*
explain
;
}
rerrs
[]
=
{
REG_NOMATCH
,
"REG_NOMATCH"
,
"regexec() failed to match"
,
REG_BADPAT
,
"REG_BADPAT"
,
"invalid regular expression"
,
REG_ECOLLATE
,
"REG_ECOLLATE"
,
"invalid collating element"
,
REG_ECTYPE
,
"REG_ECTYPE"
,
"invalid character class"
,
REG_EESCAPE
,
"REG_EESCAPE"
,
"trailing backslash (
\\
)"
,
REG_ESUBREG
,
"REG_ESUBREG"
,
"invalid backreference number"
,
REG_EBRACK
,
"REG_EBRACK"
,
"brackets ([ ]) not balanced"
,
REG_EPAREN
,
"REG_EPAREN"
,
"parentheses not balanced"
,
REG_EBRACE
,
"REG_EBRACE"
,
"braces not balanced"
,
REG_BADBR
,
"REG_BADBR"
,
"invalid repetition count(s)"
,
REG_ERANGE
,
"REG_ERANGE"
,
"invalid character range"
,
REG_ESPACE
,
"REG_ESPACE"
,
"out of memory"
,
REG_BADRPT
,
"REG_BADRPT"
,
"repetition-operator operand invalid"
,
REG_EMPTY
,
"REG_EMPTY"
,
"empty (sub)expression"
,
REG_ASSERT
,
"REG_ASSERT"
,
"
\"
can't happen
\"
-- you found a bug"
,
REG_INVARG
,
"REG_INVARG"
,
"invalid argument to regex routine"
,
0
,
""
,
"*** unknown regexp error code ***"
,
};
/*
- regerror - the interface to error numbers
= extern size_t regerror(int, const regex_t *, char *, size_t);
*/
/* ARGSUSED */
size_t
regerror
(
errcode
,
preg
,
errbuf
,
errbuf_size
)
int
errcode
;
const
regex_t
*
preg
;
char
*
errbuf
;
size_t
errbuf_size
;
{
register
struct
rerr
*
r
;
register
size_t
len
;
register
int
target
=
errcode
&~
REG_ITOA
;
register
char
*
s
;
char
convbuf
[
50
];
if
(
errcode
==
REG_ATOI
)
s
=
regatoi
(
preg
,
convbuf
);
else
{
for
(
r
=
rerrs
;
r
->
code
!=
0
;
r
++
)
if
(
r
->
code
==
target
)
break
;
if
(
errcode
&
REG_ITOA
)
{
if
(
r
->
code
!=
0
)
(
void
)
strcpy
(
convbuf
,
r
->
name
);
else
sprintf
(
convbuf
,
"REG_0x%x"
,
target
);
assert
(
strlen
(
convbuf
)
<
sizeof
(
convbuf
));
s
=
convbuf
;
}
else
s
=
r
->
explain
;
}
len
=
strlen
(
s
)
+
1
;
if
(
errbuf_size
>
0
)
{
if
(
errbuf_size
>
len
)
(
void
)
strcpy
(
errbuf
,
s
);
else
{
(
void
)
strncpy
(
errbuf
,
s
,
errbuf_size
-
1
);
errbuf
[
errbuf_size
-
1
]
=
'\0'
;
}
}
return
(
len
);
}
/*
- regatoi - internal routine to implement REG_ATOI
== static char *regatoi(const regex_t *preg, char *localbuf);
*/
static
char
*
regatoi
(
preg
,
localbuf
)
const
regex_t
*
preg
;
char
*
localbuf
;
{
register
struct
rerr
*
r
;
register
size_t
siz
;
register
char
*
p
;
for
(
r
=
rerrs
;
r
->
code
!=
0
;
r
++
)
if
(
strcmp
(
r
->
name
,
preg
->
re_endp
)
==
0
)
break
;
if
(
r
->
code
==
0
)
return
(
"0"
);
sprintf
(
localbuf
,
"%d"
,
r
->
code
);
return
(
localbuf
);
}
src/backend/port/win32/regex/regex.3
deleted
100644 → 0
View file @
7a14979f
.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
.\" Copyright (c) 1992, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Henry Spencer.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)regex.3 8.4 (Berkeley) 3/20/94
.\"
.TH REGEX 3 "March 20, 1994"
.de ZR
.\" one other place knows this name: the SEE ALSO section
.IR re_format (7) \\$1
..
.SH NAME
regcomp, regexec, regerror, regfree \- regular-expression library
.SH SYNOPSIS
.ft B
.\".na
#include <sys/types.h>
.br
#include <regex.h>
.HP 10
int regcomp(regex_t\ *preg, const\ char\ *pattern, int\ cflags);
.HP
int\ regexec(const\ regex_t\ *preg, const\ char\ *string,
size_t\ nmatch, regmatch_t\ pmatch[], int\ eflags);
.HP
size_t\ regerror(int\ errcode, const\ regex_t\ *preg,
char\ *errbuf, size_t\ errbuf_size);
.HP
void\ regfree(regex_t\ *preg);
.\".ad
.ft
.SH DESCRIPTION
These routines implement POSIX 1003.2 regular expressions (``RE''s);
see
.ZR .
.I Regcomp
compiles an RE written as a string into an internal form,
.I regexec
matches that internal form against a string and reports results,
.I regerror
transforms error codes from either into human-readable messages,
and
.I regfree
frees any dynamically-allocated storage used by the internal form
of an RE.
.PP
The header
.I <regex.h>
declares two structure types,
.I regex_t
and
.IR regmatch_t ,
the former for compiled internal forms and the latter for match reporting.
It also declares the four functions,
a type
.IR regoff_t ,
and a number of constants with names starting with ``REG_''.
.PP
.I Regcomp
compiles the regular expression contained in the
.I pattern
string,
subject to the flags in
.IR cflags ,
and places the results in the
.I regex_t
structure pointed to by
.IR preg .
.I Cflags
is the bitwise OR of zero or more of the following flags:
.IP REG_EXTENDED \w'REG_EXTENDED'u+2n
Compile modern (``extended'') REs,
rather than the obsolete (``basic'') REs that
are the default.
.IP REG_BASIC
This is a synonym for 0,
provided as a counterpart to REG_EXTENDED to improve readability.
.IP REG_NOSPEC
Compile with recognition of all special characters turned off.
All characters are thus considered ordinary,
so the ``RE'' is a literal string.
This is an extension,
compatible with but not specified by POSIX 1003.2,
and should be used with
caution in software intended to be portable to other systems.
REG_EXTENDED and REG_NOSPEC may not be used
in the same call to
.IR regcomp .
.IP REG_ICASE
Compile for matching that ignores upper/lower case distinctions.
See
.ZR .
.IP REG_NOSUB
Compile for matching that need only report success or failure,
not what was matched.
.IP REG_NEWLINE
Compile for newline-sensitive matching.
By default, newline is a completely ordinary character with no special
meaning in either REs or strings.
With this flag,
`[^' bracket expressions and `.' never match newline,
a `^' anchor matches the null string after any newline in the string
in addition to its normal function,
and the `$' anchor matches the null string before any newline in the
string in addition to its normal function.
.IP REG_PEND
The regular expression ends,
not at the first NUL,
but just before the character pointed to by the
.I re_endp
member of the structure pointed to by
.IR preg .
The
.I re_endp
member is of type
.IR const\ char\ * .
This flag permits inclusion of NULs in the RE;
they are considered ordinary characters.
This is an extension,
compatible with but not specified by POSIX 1003.2,
and should be used with
caution in software intended to be portable to other systems.
.PP
When successful,
.I regcomp
returns 0 and fills in the structure pointed to by
.IR preg .
One member of that structure
(other than
.IR re_endp )
is publicized:
.IR re_nsub ,
of type
.IR size_t ,
contains the number of parenthesized subexpressions within the RE
(except that the value of this member is undefined if the
REG_NOSUB flag was used).
If
.I regcomp
fails, it returns a non-zero error code;
see DIAGNOSTICS.
.PP
.I Regexec
matches the compiled RE pointed to by
.I preg
against the
.IR string ,
subject to the flags in
.IR eflags ,
and reports results using
.IR nmatch ,
.IR pmatch ,
and the returned value.
The RE must have been compiled by a previous invocation of
.IR regcomp .
The compiled form is not altered during execution of
.IR regexec ,
so a single compiled RE can be used simultaneously by multiple threads.
.PP
By default,
the NUL-terminated string pointed to by
.I string
is considered to be the text of an entire line, minus any terminating
newline.
The
.I eflags
argument is the bitwise OR of zero or more of the following flags:
.IP REG_NOTBOL \w'REG_STARTEND'u+2n
The first character of
the string
is not the beginning of a line, so the `^' anchor should not match before it.
This does not affect the behavior of newlines under REG_NEWLINE.
.IP REG_NOTEOL
The NUL terminating
the string
does not end a line, so the `$' anchor should not match before it.
This does not affect the behavior of newlines under REG_NEWLINE.
.IP REG_STARTEND
The string is considered to start at
\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_so\fR
and to have a terminating NUL located at
\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_eo\fR
(there need not actually be a NUL at that location),
regardless of the value of
.IR nmatch .
See below for the definition of
.IR pmatch
and
.IR nmatch .
This is an extension,
compatible with but not specified by POSIX 1003.2,
and should be used with
caution in software intended to be portable to other systems.
Note that a non-zero \fIrm_so\fR does not imply REG_NOTBOL;
REG_STARTEND affects only the location of the string,
not how it is matched.
.PP
See
.ZR
for a discussion of what is matched in situations where an RE or a
portion thereof could match any of several substrings of
.IR string .
.PP
Normally,
.I regexec
returns 0 for success and the non-zero code REG_NOMATCH for failure.
Other non-zero error codes may be returned in exceptional situations;
see DIAGNOSTICS.
.PP
If REG_NOSUB was specified in the compilation of the RE,
or if
.I nmatch
is 0,
.I regexec
ignores the
.I pmatch
argument (but see below for the case where REG_STARTEND is specified).
Otherwise,
.I pmatch
points to an array of
.I nmatch
structures of type
.IR regmatch_t .
Such a structure has at least the members
.I rm_so
and
.IR rm_eo ,
both of type
.I regoff_t
(a signed arithmetic type at least as large as an
.I off_t
and a
.IR ssize_t ),
containing respectively the offset of the first character of a substring
and the offset of the first character after the end of the substring.
Offsets are measured from the beginning of the
.I string
argument given to
.IR regexec .
An empty substring is denoted by equal offsets,
both indicating the character following the empty substring.
.PP
The 0th member of the
.I pmatch
array is filled in to indicate what substring of
.I string
was matched by the entire RE.
Remaining members report what substring was matched by parenthesized
subexpressions within the RE;
member
.I i
reports subexpression
.IR i ,
with subexpressions counted (starting at 1) by the order of their opening
parentheses in the RE, left to right.
Unused entries in the array\(emcorresponding either to subexpressions that
did not participate in the match at all, or to subexpressions that do not
exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fIre_nsub\fR)\(emhave both
.I rm_so
and
.I rm_eo
set to \-1.
If a subexpression participated in the match several times,
the reported substring is the last one it matched.
(Note, as an example in particular, that when the RE `(b*)+' matches `bbb',
the parenthesized subexpression matches each of the three `b's and then
an infinite number of empty strings following the last `b',
so the reported substring is one of the empties.)
.PP
If REG_STARTEND is specified,
.I pmatch
must point to at least one
.I regmatch_t
(even if
.I nmatch
is 0 or REG_NOSUB was specified),
to hold the input offsets for REG_STARTEND.
Use for output is still entirely controlled by
.IR nmatch ;
if
.I nmatch
is 0 or REG_NOSUB was specified,
the value of
.IR pmatch [0]
will not be changed by a successful
.IR regexec .
.PP
.I Regerror
maps a non-zero
.I errcode
from either
.I regcomp
or
.I regexec
to a human-readable, printable message.
If
.I preg
is non-NULL,
the error code should have arisen from use of
the
.I regex_t
pointed to by
.IR preg ,
and if the error code came from
.IR regcomp ,
it should have been the result from the most recent
.I regcomp
using that
.IR regex_t .
.RI ( Regerror
may be able to supply a more detailed message using information
from the
.IR regex_t .)
.I Regerror
places the NUL-terminated message into the buffer pointed to by
.IR errbuf ,
limiting the length (including the NUL) to at most
.I errbuf_size
bytes.
If the whole message won't fit,
as much of it as will fit before the terminating NUL is supplied.
In any case,
the returned value is the size of buffer needed to hold the whole
message (including terminating NUL).
If
.I errbuf_size
is 0,
.I errbuf
is ignored but the return value is still correct.
.PP
If the
.I errcode
given to
.I regerror
is first ORed with REG_ITOA,
the ``message'' that results is the printable name of the error code,
e.g. ``REG_NOMATCH'',
rather than an explanation thereof.
If
.I errcode
is REG_ATOI,
then
.I preg
shall be non-NULL and the
.I re_endp
member of the structure it points to
must point to the printable name of an error code;
in this case, the result in
.I errbuf
is the decimal digits of
the numeric value of the error code
(0 if the name is not recognized).
REG_ITOA and REG_ATOI are intended primarily as debugging facilities;
they are extensions,
compatible with but not specified by POSIX 1003.2,
and should be used with
caution in software intended to be portable to other systems.
Be warned also that they are considered experimental and changes are possible.
.PP
.I Regfree
frees any dynamically-allocated storage associated with the compiled RE
pointed to by
.IR preg .
The remaining
.I regex_t
is no longer a valid compiled RE
and the effect of supplying it to
.I regexec
or
.I regerror
is undefined.
.PP
None of these functions references global variables except for tables
of constants;
all are safe for use from multiple threads if the arguments are safe.
.SH IMPLEMENTATION CHOICES
There are a number of decisions that 1003.2 leaves up to the implementor,
either by explicitly saying ``undefined'' or by virtue of them being
forbidden by the RE grammar.
This implementation treats them as follows.
.PP
See
.ZR
for a discussion of the definition of case-independent matching.
.PP
There is no particular limit on the length of REs,
except insofar as memory is limited.
Memory usage is approximately linear in RE size, and largely insensitive
to RE complexity, except for bounded repetitions.
See BUGS for one short RE using them
that will run almost any system out of memory.
.PP
A backslashed character other than one specifically given a magic meaning
by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs)
is taken as an ordinary character.
.PP
Any unmatched [ is a REG_EBRACK error.
.PP
Equivalence classes cannot begin or end bracket-expression ranges.
The endpoint of one range cannot begin another.
.PP
RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255.
.PP
A repetition operator (?, *, +, or bounds) cannot follow another
repetition operator.
A repetition operator cannot begin an expression or subexpression
or follow `^' or `|'.
.PP
`|' cannot appear first or last in a (sub)expression or after another `|',
i.e. an operand of `|' cannot be an empty subexpression.
An empty parenthesized subexpression, `()', is legal and matches an
empty (sub)string.
An empty string is not a legal RE.
.PP
A `{' followed by a digit is considered the beginning of bounds for a
bounded repetition, which must then follow the syntax for bounds.
A `{' \fInot\fR followed by a digit is considered an ordinary character.
.PP
`^' and `$' beginning and ending subexpressions in obsolete (``basic'')
REs are anchors, not ordinary characters.
.SH SEE ALSO
grep(1), re_format(7)
.PP
POSIX 1003.2, sections 2.8 (Regular Expression Notation)
and
B.5 (C Binding for Regular Expression Matching).
.SH DIAGNOSTICS
Non-zero error codes from
.I regcomp
and
.I regexec
include the following:
.PP
.nf
.ta \w'REG_ECOLLATE'u+3n
REG_NOMATCH regexec() failed to match
REG_BADPAT invalid regular expression
REG_ECOLLATE invalid collating element
REG_ECTYPE invalid character class
REG_EESCAPE \e applied to unescapable character
REG_ESUBREG invalid backreference number
REG_EBRACK brackets [ ] not balanced
REG_EPAREN parentheses ( ) not balanced
REG_EBRACE braces { } not balanced
REG_BADBR invalid repetition count(s) in { }
REG_ERANGE invalid character range in [ ]
REG_ESPACE ran out of memory
REG_BADRPT ?, *, or + operand invalid
REG_EMPTY empty (sub)expression
REG_ASSERT ``can't happen''\(emyou found a bug
REG_INVARG invalid argument, e.g. negative-length string
.fi
.SH HISTORY
Originally written by Henry Spencer.
Altered for inclusion in the 4.4BSD distribution.
.SH BUGS
This is an alpha release with known defects.
Please report problems.
.PP
There is one known functionality bug.
The implementation of internationalization is incomplete:
the locale is always assumed to be the default one of 1003.2,
and only the collating elements etc. of that locale are available.
.PP
The back-reference code is subtle and doubts linger about its correctness
in complex cases.
.PP
.I Regexec
performance is poor.
This will improve with later releases.
.I Nmatch
exceeding 0 is expensive;
.I nmatch
exceeding 1 is worse.
.I Regexec
is largely insensitive to RE complexity \fIexcept\fR that back
references are massively expensive.
RE length does matter; in particular, there is a strong speed bonus
for keeping RE length under about 30 characters,
with most special characters counting roughly double.
.PP
.I Regcomp
implements bounded repetitions by macro expansion,
which is costly in time and space if counts are large
or bounded repetitions are nested.
An RE like, say,
`((((a{1,100}){1,100}){1,100}){1,100}){1,100}'
will (eventually) run almost any existing machine out of swap space.
.PP
There are suspected problems with response to obscure error conditions.
Notably,
certain kinds of internal overflow,
produced only by truly enormous REs or by multiply nested bounded repetitions,
are probably not handled well.
.PP
Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is
a special character only in the presence of a previous unmatched `('.
This can't be fixed until the spec is fixed.
.PP
The standard's definition of back references is vague.
For example, does
`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?
Until the standard is clarified,
behavior in such cases should not be relied on.
.PP
The implementation of word-boundary matching is a bit of a kludge,
and bugs may lurk in combinations of word-boundary matching and anchoring.
src/backend/port/win32/regex/regex.h
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992 Henry Spencer.
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer of the University of Toronto.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regex.h 8.2 (Berkeley) 1/3/94
*/
#ifndef _REGEX_H_
#define _REGEX_H_
#include <sys/cdefs.h>
/* types */
typedef
off_t
regoff_t
;
typedef
struct
{
int
re_magic
;
size_t
re_nsub
;
/* number of parenthesized subexpressions */
__const
char
*
re_endp
;
/* end pointer for REG_PEND */
struct
re_guts
*
re_g
;
/* none of your business :-) */
}
regex_t
;
typedef
struct
{
regoff_t
rm_so
;
/* start of match */
regoff_t
rm_eo
;
/* end of match */
}
regmatch_t
;
/* regcomp() flags */
#define REG_BASIC 0000
#define REG_EXTENDED 0001
#define REG_ICASE 0002
#define REG_NOSUB 0004
#define REG_NEWLINE 0010
#define REG_NOSPEC 0020
#define REG_PEND 0040
#define REG_DUMP 0200
/* regerror() flags */
#define REG_NOMATCH 1
#define REG_BADPAT 2
#define REG_ECOLLATE 3
#define REG_ECTYPE 4
#define REG_EESCAPE 5
#define REG_ESUBREG 6
#define REG_EBRACK 7
#define REG_EPAREN 8
#define REG_EBRACE 9
#define REG_BADBR 10
#define REG_ERANGE 11
#define REG_ESPACE 12
#define REG_BADRPT 13
#define REG_EMPTY 14
#define REG_ASSERT 15
#define REG_INVARG 16
#define REG_ATOI 255
/* convert name to number (!) */
#define REG_ITOA 0400
/* convert number to name (!) */
/* regexec() flags */
#define REG_NOTBOL 00001
#define REG_NOTEOL 00002
#define REG_STARTEND 00004
#define REG_TRACE 00400
/* tracing of execution */
#define REG_LARGE 01000
/* force large representation */
#define REG_BACKR 02000
/* force use of backref code */
__BEGIN_DECLS
int
regcomp
__P
((
regex_t
*
,
const
char
*
,
int
));
size_t
regerror
__P
((
int
,
const
regex_t
*
,
char
*
,
size_t
));
int
regexec
__P
((
const
regex_t
*
,
const
char
*
,
size_t
,
regmatch_t
[],
int
));
void
regfree
__P
((
regex_t
*
));
__END_DECLS
#endif
/* !_REGEX_H_ */
src/backend/port/win32/regex/regex2.h
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regex2.h 8.4 (Berkeley) 3/20/94
*/
/*
* First, the stuff that ends up in the outside-world include file
*/
/*
typedef off_t regoff_t;
typedef struct {
int re_magic;
size_t re_nsub; // number of parenthesized subexpressions
const char *re_endp; // end pointer for REG_PEND
struct re_guts *re_g; // none of your business :-)
} regex_t;
typedef struct {
regoff_t rm_so; // start of match
regoff_t rm_eo; // end of match
} regmatch_t;
*/
/*
* internals of regex_t
*/
#define MAGIC1 ((('r'^0200)<<8) | 'e')
/*
* The internal representation is a *strip*, a sequence of
* operators ending with an endmarker. (Some terminology etc. is a
* historical relic of earlier versions which used multiple strips.)
* Certain oddities in the representation are there to permit running
* the machinery backwards; in particular, any deviation from sequential
* flow must be marked at both its source and its destination. Some
* fine points:
*
* - OPLUS_ and O_PLUS are *inside* the loop they create.
* - OQUEST_ and O_QUEST are *outside* the bypass they create.
* - OCH_ and O_CH are *outside* the multi-way branch they create, while
* OOR1 and OOR2 are respectively the end and the beginning of one of
* the branches. Note that there is an implicit OOR2 following OCH_
* and an implicit OOR1 preceding O_CH.
*
* In state representations, an operator's bit is on to signify a state
* immediately *preceding* "execution" of that operator.
*/
typedef
unsigned
long
sop
;
/* strip operator */
typedef
long
sopno
;
#define OPRMASK 0xf8000000
#define OPDMASK 0x07ffffff
#define OPSHIFT ((unsigned)27)
#define OP(n) ((n)&OPRMASK)
#define OPND(n) ((n)&OPDMASK)
#define SOP(op, opnd) ((op)|(opnd))
/* operators meaning operand */
/* (back, fwd are offsets) */
#define OEND (1<<OPSHIFT)
/* endmarker - */
#define OCHAR (2<<OPSHIFT)
/* character unsigned char */
#define OBOL (3<<OPSHIFT)
/* left anchor - */
#define OEOL (4<<OPSHIFT)
/* right anchor - */
#define OANY (5<<OPSHIFT)
/* . - */
#define OANYOF (6<<OPSHIFT)
/* [...] set number */
#define OBACK_ (7<<OPSHIFT)
/* begin \d paren number */
#define O_BACK (8<<OPSHIFT)
/* end \d paren number */
#define OPLUS_ (9<<OPSHIFT)
/* + prefix fwd to suffix */
#define O_PLUS (10<<OPSHIFT)
/* + suffix back to prefix */
#define OQUEST_ (11<<OPSHIFT)
/* ? prefix fwd to suffix */
#define O_QUEST (12<<OPSHIFT)
/* ? suffix back to prefix */
#define OLPAREN (13<<OPSHIFT)
/* ( fwd to ) */
#define ORPAREN (14<<OPSHIFT)
/* ) back to ( */
#define OCH_ (15<<OPSHIFT)
/* begin choice fwd to OOR2 */
#define OOR1 (16<<OPSHIFT)
/* | pt. 1 back to OOR1 or OCH_ */
#define OOR2 (17<<OPSHIFT)
/* | pt. 2 fwd to OOR2 or O_CH */
#define O_CH (18<<OPSHIFT)
/* end choice back to OOR1 */
#define OBOW (19<<OPSHIFT)
/* begin word - */
#define OEOW (20<<OPSHIFT)
/* end word - */
/*
* Structure for [] character-set representation. Character sets are
* done as bit vectors, grouped 8 to a byte vector for compactness.
* The individual set therefore has both a pointer to the byte vector
* and a mask to pick out the relevant bit of each byte. A hash code
* simplifies testing whether two sets could be identical.
*
* This will get trickier for multicharacter collating elements. As
* preliminary hooks for dealing with such things, we also carry along
* a string of multi-character elements, and decide the size of the
* vectors at run time.
*/
typedef
struct
{
uch
*
ptr
;
/* -> uch [csetsize] */
uch
mask
;
/* bit within array */
uch
hash
;
/* hash code */
size_t
smultis
;
char
*
multis
;
/* -> char[smulti] ab\0cd\0ef\0\0 */
}
cset
;
/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
#define MCadd(p, cs, cp) mcadd(p, cs, cp)
/* regcomp() internal fns */
#define MCsub(p, cs, cp) mcsub(p, cs, cp)
#define MCin(p, cs, cp) mcin(p, cs, cp)
/* stuff for character categories */
typedef
unsigned
char
cat_t
;
/*
* main compiled-expression structure
*/
struct
re_guts
{
int
magic
;
# define MAGIC2 ((('R'^0200)<<8)|'E')
sop
*
strip
;
/* malloced area for strip */
int
csetsize
;
/* number of bits in a cset vector */
int
ncsets
;
/* number of csets in use */
cset
*
sets
;
/* -> cset [ncsets] */
uch
*
setbits
;
/* -> uch[csetsize][ncsets/CHAR_BIT] */
int
cflags
;
/* copy of regcomp() cflags argument */
sopno
nstates
;
/* = number of sops */
sopno
firststate
;
/* the initial OEND (normally 0) */
sopno
laststate
;
/* the final OEND */
int
iflags
;
/* internal flags */
# define USEBOL 01
/* used ^ */
# define USEEOL 02
/* used $ */
# define BAD 04
/* something wrong */
int
nbol
;
/* number of ^ used */
int
neol
;
/* number of $ used */
int
ncategories
;
/* how many character categories */
cat_t
*
categories
;
/* ->catspace[-CHAR_MIN] */
char
*
must
;
/* match must contain this string */
int
mlen
;
/* length of must */
size_t
nsub
;
/* copy of re_nsub */
int
backrefs
;
/* does it use back references? */
sopno
nplus
;
/* how deep does it nest +s? */
/* catspace must be last */
cat_t
catspace
[
1
];
/* actually [NC] */
};
/* misc utilities */
#define OUT (CHAR_MAX+1)
/* a non-character value */
#define ISWORD(c) (isalnum(c) || (c) == '_')
src/backend/port/win32/regex/regexec.c
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regexec.c 8.3 (Berkeley) 3/20/94
*/
#if defined(LIBC_SCCS) && !defined(lint)
static
char
sccsid
[]
=
"@(#)regexec.c 8.3 (Berkeley) 3/20/94"
;
#endif
/* LIBC_SCCS and not lint */
/*
* the outer shell of regexec()
*
* This file includes engine.c *twice*, after muchos fiddling with the
* macros that code uses. This lets the same code operate on two different
* representations for state sets.
*/
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include <regex.h>
#include "utils.h"
#include "regex2.h"
static
int
nope
=
0
;
/* for use in asserts; shuts lint up */
/* macros for manipulating states, small version */
#define states long
#define states1 states
/* for later use in regexec() decision */
#define CLEAR(v) ((v) = 0)
#define SET0(v, n) ((v) &= ~(1 << (n)))
#define SET1(v, n) ((v) |= 1 << (n))
#define ISSET(v, n) ((v) & (1 << (n)))
#define ASSIGN(d, s) ((d) = (s))
#define EQ(a, b) ((a) == (b))
#define STATEVARS int dummy
/* dummy version */
#define STATESETUP(m, n)
/* nothing */
#define STATETEARDOWN(m)
/* nothing */
#define SETUP(v) ((v) = 0)
#define onestate int
#define INIT(o, n) ((o) = (unsigned)1 << (n))
#define INC(o) ((o) <<= 1)
#define ISSTATEIN(v, o) ((v) & (o))
/* some abbreviations; note that some of these know variable names! */
/* do "if I'm here, I can also be there" etc without branches */
#define FWD(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) << (n))
#define BACK(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) >> (n))
#define ISSETBACK(v, n) ((v) & ((unsigned)here >> (n)))
/* function names */
#define SNAMES
/* engine.c looks after details */
#include "engine.c"
/* now undo things */
#undef states
#undef CLEAR
#undef SET0
#undef SET1
#undef ISSET
#undef ASSIGN
#undef EQ
#undef STATEVARS
#undef STATESETUP
#undef STATETEARDOWN
#undef SETUP
#undef onestate
#undef INIT
#undef INC
#undef ISSTATEIN
#undef FWD
#undef BACK
#undef ISSETBACK
#undef SNAMES
/* macros for manipulating states, large version */
#define states char *
#define CLEAR(v) memset(v, 0, m->g->nstates)
#define SET0(v, n) ((v)[n] = 0)
#define SET1(v, n) ((v)[n] = 1)
#define ISSET(v, n) ((v)[n])
#define ASSIGN(d, s) memcpy(d, s, m->g->nstates)
#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0)
#define STATEVARS int vn; char *space
#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
if ((m)->space == NULL) return(REG_ESPACE); \
(m)->vn = 0; }
#define STATETEARDOWN(m) { free((m)->space); }
#define SETUP(v) ((v) = &m->space[m->vn++ * m->g->nstates])
#define onestate int
#define INIT(o, n) ((o) = (n))
#define INC(o) ((o)++)
#define ISSTATEIN(v, o) ((v)[o])
/* some abbreviations; note that some of these know variable names! */
/* do "if I'm here, I can also be there" etc without branches */
#define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here])
#define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here])
#define ISSETBACK(v, n) ((v)[here - (n)])
/* function names */
#define LNAMES
/* flag */
#include "engine.c"
/*
- regexec - interface for matching
= extern int regexec(const regex_t *, const char *, size_t, \
= regmatch_t [], int);
= #define REG_NOTBOL 00001
= #define REG_NOTEOL 00002
= #define REG_STARTEND 00004
= #define REG_TRACE 00400 // tracing of execution
= #define REG_LARGE 01000 // force large representation
= #define REG_BACKR 02000 // force use of backref code
*
* We put this here so we can exploit knowledge of the state representation
* when choosing which matcher to call. Also, by this point the matchers
* have been prototyped.
*/
int
/* 0 success, REG_NOMATCH failure */
regexec
(
preg
,
string
,
nmatch
,
pmatch
,
eflags
)
const
regex_t
*
preg
;
const
char
*
string
;
size_t
nmatch
;
regmatch_t
pmatch
[];
int
eflags
;
{
register
struct
re_guts
*
g
=
preg
->
re_g
;
#ifdef REDEBUG
# define GOODFLAGS(f) (f)
#else
# define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
#endif
if
(
preg
->
re_magic
!=
MAGIC1
||
g
->
magic
!=
MAGIC2
)
return
(
REG_BADPAT
);
assert
(
!
(
g
->
iflags
&
BAD
));
if
(
g
->
iflags
&
BAD
)
/* backstop for no-debug case */
return
(
REG_BADPAT
);
eflags
=
GOODFLAGS
(
eflags
);
if
(
g
->
nstates
<=
CHAR_BIT
*
sizeof
(
states1
)
&&
!
(
eflags
&
REG_LARGE
))
return
(
smatcher
(
g
,
(
char
*
)
string
,
nmatch
,
pmatch
,
eflags
));
else
return
(
lmatcher
(
g
,
(
char
*
)
string
,
nmatch
,
pmatch
,
eflags
));
}
src/backend/port/win32/regex/regexp.h
deleted
100644 → 0
View file @
7a14979f
/*
* Copyright (c) 1986 by University of Toronto.
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley
* by Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regexp.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _REGEXP_H_
#define _REGEXP_H_
/*
* Definitions etc. for regexp(3) routines.
*
* Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
* not the System V one.
*/
#define NSUBEXP 10
typedef
struct
regexp
{
char
*
startp
[
NSUBEXP
];
char
*
endp
[
NSUBEXP
];
char
regstart
;
/* Internal use only. */
char
reganch
;
/* Internal use only. */
char
*
regmust
;
/* Internal use only. */
int
regmlen
;
/* Internal use only. */
char
program
[
1
];
/* Unwarranted chumminess with compiler. */
}
regexp
;
#include <sys/cdefs.h>
__BEGIN_DECLS
regexp
*
regcomp
__P
((
const
char
*
));
int
regexec
__P
((
const
regexp
*
,
const
char
*
));
void
regsub
__P
((
const
regexp
*
,
const
char
*
,
char
*
));
void
regerror
__P
((
const
char
*
));
__END_DECLS
#endif
/* !_REGEXP_H_ */
src/backend/port/win32/regex/regfree.c
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)regfree.c 8.3 (Berkeley) 3/20/94
*/
#if defined(LIBC_SCCS) && !defined(lint)
static
char
sccsid
[]
=
"@(#)regfree.c 8.3 (Berkeley) 3/20/94"
;
#endif
/* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#include "utils.h"
#include "regex2.h"
/*
- regfree - free everything
= extern void regfree(regex_t *);
*/
void
regfree
(
preg
)
regex_t
*
preg
;
{
register
struct
re_guts
*
g
;
if
(
preg
->
re_magic
!=
MAGIC1
)
/* oops */
return
;
/* nice to complain, but hard */
g
=
preg
->
re_g
;
if
(
g
==
NULL
||
g
->
magic
!=
MAGIC2
)
/* oops again */
return
;
preg
->
re_magic
=
0
;
/* mark it invalid */
g
->
magic
=
0
;
/* mark it invalid */
if
(
g
->
strip
!=
NULL
)
free
((
char
*
)
g
->
strip
);
if
(
g
->
sets
!=
NULL
)
free
((
char
*
)
g
->
sets
);
if
(
g
->
setbits
!=
NULL
)
free
((
char
*
)
g
->
setbits
);
if
(
g
->
must
!=
NULL
)
free
(
g
->
must
);
free
((
char
*
)
g
);
}
src/backend/port/win32/regex/utils.h
deleted
100644 → 0
View file @
7a14979f
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)utils.h 8.3 (Berkeley) 3/20/94
*/
/* utility definitions */
#define DUPMAX 100000000
/* xxx is this right? */
#define INFINITY (DUPMAX + 1)
#define NC (CHAR_MAX - CHAR_MIN + 1)
typedef
unsigned
char
uch
;
/* switch off assertions (if not already off) if no REDEBUG */
#ifndef REDEBUG
#ifndef NDEBUG
#define NDEBUG
/* no assertions please */
#endif
#endif
#include <assert.h>
/* for old systems with bcopy() but no memmove() */
#ifdef USEBCOPY
#define memmove(d, s, c) bcopy(s, d, c)
#endif
src/backend/port/win32/rusagestub.h
deleted
100644 → 0
View file @
7a14979f
/*-------------------------------------------------------------------------
*
* rusagestub.h--
* Stubs for getrusage(3).
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: rusagestub.h,v 1.1.1.1 1996/07/09 06:21:46 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RUSAGESTUB_H
#define RUSAGESTUB_H
#include <sys/time.h>
/* for struct timeval */
#include <limits.h>
/* for CLK_TCK */
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
struct
rusage
{
struct
timeval
ru_utime
;
/* user time used */
struct
timeval
ru_stime
;
/* system time used */
};
extern
int
getrusage
(
int
who
,
struct
rusage
*
rusage
);
#endif
/* RUSAGESTUB_H */
src/backend/port/win32/sys/cdefs.h
deleted
100644 → 0
View file @
7a14979f
/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Berkeley Software Design, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)cdefs.h 8.7 (Berkeley) 1/21/94
*/
#ifndef _CDEFS_H_
#define _CDEFS_H_
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS };
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
* The __CONCAT macro is a bit tricky -- make sure you don't put spaces
* in between its arguments. __CONCAT can also concatenate double-quoted
* strings produced by the __STRING macro, but this only works with ANSI C.
*/
#if defined(__STDC__) || defined(__cplusplus)
#define __P(protos) protos
/* full-blown ANSI C */
#define __CONCAT(x,y) x ## y
#define __STRING(x) #x
#define __const const
/* define reserved names to standard */
#define __signed signed
#define __volatile volatile
#if defined(__cplusplus)
#define __inline inline
/* convert to C++ keyword */
#else
#ifndef __GNUC__
#define __inline
/* delete GCC keyword */
#endif
/* !__GNUC__ */
#endif
/* !__cplusplus */
#else
/* !(__STDC__ || __cplusplus) */
#define __P(protos) ()
/* traditional C preprocessor */
#define __CONCAT(x,y) x
/**/
y
#define __STRING(x) "x"
#ifndef __GNUC__
#define __const
/* delete pseudo-ANSI C keywords */
#define __inline
#define __signed
#define __volatile
/*
* In non-ANSI C environments, new programs will want ANSI-only C keywords
* deleted from the program and old programs will want them left alone.
* When using a compiler other than gcc, programs using the ANSI C keywords
* const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
* When using "gcc -traditional", we assume that this is the intent; if
* __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
*/
#ifndef NO_ANSI_KEYWORDS
#define const
/* delete ANSI C keywords */
#define inline
#define signed
#define volatile
#endif
#endif
/* !__GNUC__ */
#endif
/* !(__STDC__ || __cplusplus) */
/*
* GCC1 and some versions of GCC2 declare dead (non-returning) and
* pure (no side effects) functions using "volatile" and "const";
* unfortunately, these then cause warnings under "-ansi -pedantic".
* GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
#define __attribute__(x)
/* delete __attribute__ if non-gcc or gcc1 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __dead __volatile
#define __pure __const
#endif
#endif
/* Delete pseudo-keywords wherever they are not available or needed. */
#ifndef __dead
#define __dead
#define __pure
#endif
typedef
long
off_t
;
#endif
/* !_CDEFS_H_ */
src/backend/port/win32/sys/file.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/sys/ipc.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/sys/param.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/sys/sem.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/sys/shm.h
deleted
100644 → 0
View file @
7a14979f
src/backend/port/win32/sys/time.h
deleted
100644 → 0
View file @
7a14979f
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