mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
pgindent run for 8.3.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tsearch/ts_utils.c,v 1.5 2007/11/09 22:37:35 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tsearch/ts_utils.c,v 1.6 2007/11/15 21:14:38 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
/*
|
||||
* Given the base name and extension of a tsearch config file, return
|
||||
* its full path name. The base name is assumed to be user-supplied,
|
||||
* and is checked to prevent pathname attacks. The extension is assumed
|
||||
* its full path name. The base name is assumed to be user-supplied,
|
||||
* and is checked to prevent pathname attacks. The extension is assumed
|
||||
* to be safe.
|
||||
*
|
||||
* The result is a palloc'd string.
|
||||
@@ -40,14 +40,13 @@ get_tsearch_config_filename(const char *basename,
|
||||
char *result;
|
||||
|
||||
/*
|
||||
* We limit the basename to contain a-z, 0-9, and underscores. This may
|
||||
* We limit the basename to contain a-z, 0-9, and underscores. This may
|
||||
* be overly restrictive, but we don't want to allow access to anything
|
||||
* outside the tsearch_data directory, so for instance '/' *must* be
|
||||
* rejected, and on some platforms '\' and ':' are risky as well.
|
||||
* Allowing uppercase might result in incompatible behavior between
|
||||
* case-sensitive and case-insensitive filesystems, and non-ASCII
|
||||
* characters create other interesting risks, so on the whole a tight
|
||||
* policy seems best.
|
||||
* rejected, and on some platforms '\' and ':' are risky as well. Allowing
|
||||
* uppercase might result in incompatible behavior between case-sensitive
|
||||
* and case-insensitive filesystems, and non-ASCII characters create other
|
||||
* interesting risks, so on the whole a tight policy seems best.
|
||||
*/
|
||||
if (strspn(basename, "abcdefghijklmnopqrstuvwxyz0123456789_") != strlen(basename))
|
||||
ereport(ERROR,
|
||||
@@ -71,11 +70,11 @@ comparestr(const void *a, const void *b)
|
||||
|
||||
/*
|
||||
* Reads a stopword file. Each word is run through 'wordop'
|
||||
* function, if given. wordop may either modify the input in-place,
|
||||
* function, if given. wordop may either modify the input in-place,
|
||||
* or palloc a new version.
|
||||
*/
|
||||
void
|
||||
readstoplist(const char *fname, StopList *s, char *(*wordop) (const char *))
|
||||
readstoplist(const char *fname, StopList * s, char *(*wordop) (const char *))
|
||||
{
|
||||
char **stop = NULL;
|
||||
|
||||
@@ -95,7 +94,7 @@ readstoplist(const char *fname, StopList *s, char *(*wordop) (const char *))
|
||||
|
||||
while ((line = t_readline(hin)) != NULL)
|
||||
{
|
||||
char *pbuf = line;
|
||||
char *pbuf = line;
|
||||
|
||||
/* Trim trailing space */
|
||||
while (*pbuf && !t_isspace(pbuf))
|
||||
|
Reference in New Issue
Block a user