1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-05 04:30:41 +03:00

Move extern function comments to headers.

This has been the policy for some time but due to migration pressure only new functions and refactors have been following this rule. Now it seems sensible to make a clean sweep and move all the comments that have not been moved already (i.e. most of them).

Only obvious typos and gross inaccuracies in the comments have been fixed. For this most part this was a copy and paste operation.

Useless comments, e.g. "New object", were not copied. Even so, there are surely many deficient comments left.

Some rearranging was done where needed and functions were placed in the proper sections, e.g. "Constructors", "Functions", etc.

A few function prototypes were found that not longer had an implementation. These were removed, but there may be more.

The coding document has been updated to reflect this policy, which is not new but has never been documented.
This commit is contained in:
David Steele
2020-04-03 18:01:28 -04:00
parent 3fbde30c6f
commit 1aca2cc902
220 changed files with 1652 additions and 2131 deletions

View File

@@ -358,9 +358,7 @@ pgInterfaceVersion(unsigned int pgVersion)
FUNCTION_TEST_RETURN(result);
}
/***********************************************************************************************************************************
Get the catalog version for a PostgreSQL version
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
uint32_t
pgCatalogVersion(unsigned int pgVersion)
{
@@ -371,9 +369,7 @@ pgCatalogVersion(unsigned int pgVersion)
FUNCTION_TEST_RETURN(pgInterfaceVersion(pgVersion)->catalogVersion());
}
/***********************************************************************************************************************************
Get info from pg_control
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
PgControl
pgControlFromBuffer(const Buffer *controlFile)
{
@@ -426,9 +422,6 @@ pgControlFromBuffer(const Buffer *controlFile)
FUNCTION_LOG_RETURN(PG_CONTROL, result);
}
/***********************************************************************************************************************************
Get info from pg_control
***********************************************************************************************************************************/
PgControl
pgControlFromFile(const Storage *storage)
{
@@ -453,9 +446,7 @@ pgControlFromFile(const Storage *storage)
FUNCTION_LOG_RETURN(PG_CONTROL, result);
}
/***********************************************************************************************************************************
Get the control version for a PostgreSQL version
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
uint32_t
pgControlVersion(unsigned int pgVersion)
{
@@ -478,9 +469,7 @@ typedef struct PgWalCommon
#define PG_WAL_LONG_HEADER 0x0002
/***********************************************************************************************************************************
Get info from WAL header
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
PgWal
pgWalFromBuffer(const Buffer *walBuffer)
{
@@ -523,9 +512,6 @@ pgWalFromBuffer(const Buffer *walBuffer)
FUNCTION_LOG_RETURN(PG_WAL, result);
}
/***********************************************************************************************************************************
Get info from a WAL segment
***********************************************************************************************************************************/
PgWal
pgWalFromFile(const String *walFile)
{
@@ -730,9 +716,7 @@ pgXactPath(unsigned int pgVersion)
FUNCTION_TEST_RETURN(pgVersion >= PG_VERSION_WAL_RENAME ? PG_PATH_PGXACT_STR : PG_PATH_PGCLOG_STR);
}
/***********************************************************************************************************************************
Create pg_control for testing
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
#ifdef DEBUG
Buffer *
@@ -759,9 +743,7 @@ pgControlTestToBuffer(PgControl pgControl)
#endif
/***********************************************************************************************************************************
Create WAL for testing
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
#ifdef DEBUG
void
@@ -782,9 +764,7 @@ pgWalTestToBuffer(PgWal pgWal, Buffer *walBuffer)
#endif
/***********************************************************************************************************************************
Convert version string to version number
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
unsigned int
pgVersionFromStr(const String *version)
{
@@ -823,9 +803,6 @@ pgVersionFromStr(const String *version)
FUNCTION_LOG_RETURN(UINT, result);
}
/***********************************************************************************************************************************
Convert version number to string
***********************************************************************************************************************************/
String *
pgVersionToStr(unsigned int version)
{
@@ -839,9 +816,7 @@ pgVersionToStr(unsigned int version)
FUNCTION_LOG_RETURN(STRING, result);
}
/***********************************************************************************************************************************
Render as string for logging
***********************************************************************************************************************************/
/**********************************************************************************************************************************/
String *
pgControlToLog(const PgControl *pgControl)
{