aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_null.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-03-22 04:01:46 +0000
committerBruce Momjian <bruce@momjian.us>2001-03-22 04:01:46 +0000
commit9e1552607a9dc6bc23e43d46770a9063ade4f3f0 (patch)
tree6a230d81917ebc004e40cd46c48f2aa27eec153e /src/bin/pg_dump/pg_backup_null.c
parent6cf8707b828b14b5c2336076ce358b18b67829d6 (diff)
downloadpostgresql-9e1552607a9dc6bc23e43d46770a9063ade4f3f0.tar.gz
postgresql-9e1552607a9dc6bc23e43d46770a9063ade4f3f0.zip
pgindent run. Make it all clean.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_null.c')
-rw-r--r--src/bin/pg_dump/pg_backup_null.c98
1 files changed, 52 insertions, 46 deletions
diff --git a/src/bin/pg_dump/pg_backup_null.c b/src/bin/pg_dump/pg_backup_null.c
index 96232f5734c..1c3a09784e4 100644
--- a/src/bin/pg_dump/pg_backup_null.c
+++ b/src/bin/pg_dump/pg_backup_null.c
@@ -2,30 +2,30 @@
*
* pg_backup_null.c
*
- * Implementation of an archive that is never saved; it is used by
+ * Implementation of an archive that is never saved; it is used by
* pg_dump to output output a plain text SQL script instead of save
* a real archive.
*
* See the headers to pg_restore for more details.
*
* Copyright (c) 2000, Philip Warner
- * Rights are granted to use this software in any way so long
- * as this notice is not removed.
+ * Rights are granted to use this software in any way so long
+ * as this notice is not removed.
*
* The author is not responsible for loss or damages that may
* result from it's use.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.4 2001/03/19 02:35:28 pjw Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.5 2001/03/22 04:00:13 momjian Exp $
*
* Modifications - 09-Jul-2000 - pjw@rhyme.com.au
*
- * Initial version.
+ * Initial version.
*
* Modifications - 04-Jan-2001 - pjw@rhyme.com.au
*
- * - Check results of IO routines more carefully.
+ * - Check results of IO routines more carefully.
*
*
*-------------------------------------------------------------------------
@@ -36,33 +36,34 @@
#include <stdlib.h>
#include <string.h>
-#include <unistd.h> /* for dup */
+#include <unistd.h> /* for dup */
-static int _WriteData(ArchiveHandle* AH, const void* data, int dLen);
-static void _EndData(ArchiveHandle* AH, TocEntry* te);
-static int _WriteByte(ArchiveHandle* AH, const int i);
-static int _WriteBuf(ArchiveHandle* AH, const void* buf, int len);
-static void _CloseArchive(ArchiveHandle* AH);
-static void _PrintTocData(ArchiveHandle* AH, TocEntry* te, RestoreOptions *ropt);
+static int _WriteData(ArchiveHandle *AH, const void *data, int dLen);
+static void _EndData(ArchiveHandle *AH, TocEntry *te);
+static int _WriteByte(ArchiveHandle *AH, const int i);
+static int _WriteBuf(ArchiveHandle *AH, const void *buf, int len);
+static void _CloseArchive(ArchiveHandle *AH);
+static void _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt);
/*
- * Initializer
+ * Initializer
*/
-void InitArchiveFmt_Null(ArchiveHandle* AH)
+void
+InitArchiveFmt_Null(ArchiveHandle *AH)
{
- /* Assuming static functions, this can be copied for each format. */
- AH->WriteDataPtr = _WriteData;
- AH->EndDataPtr = _EndData;
- AH->WriteBytePtr = _WriteByte;
- AH->WriteBufPtr = _WriteBuf;
- AH->ClosePtr = _CloseArchive;
- AH->PrintTocDataPtr = _PrintTocData;
+ /* Assuming static functions, this can be copied for each format. */
+ AH->WriteDataPtr = _WriteData;
+ AH->EndDataPtr = _EndData;
+ AH->WriteBytePtr = _WriteByte;
+ AH->WriteBufPtr = _WriteBuf;
+ AH->ClosePtr = _CloseArchive;
+ AH->PrintTocDataPtr = _PrintTocData;
- /*
- * Now prevent reading...
- */
- if (AH->mode == archModeRead)
- die_horribly(AH, "%s: This format can not be read\n");
+ /*
+ * Now prevent reading...
+ */
+ if (AH->mode == archModeRead)
+ die_horribly(AH, "%s: This format can not be read\n");
}
@@ -71,20 +72,22 @@ void InitArchiveFmt_Null(ArchiveHandle* AH)
*/
/*------
- * Called by dumper via archiver from within a data dump routine
+ * Called by dumper via archiver from within a data dump routine
* As at V1.3, this is only called for COPY FROM dfata, and BLOB data
*------
*/
-static int _WriteData(ArchiveHandle* AH, const void* data, int dLen)
+static int
+_WriteData(ArchiveHandle *AH, const void *data, int dLen)
{
- /* Just send it to output */
- ahwrite(data, 1, dLen, AH);
- return dLen;
+ /* Just send it to output */
+ ahwrite(data, 1, dLen, AH);
+ return dLen;
}
-static void _EndData(ArchiveHandle* AH, TocEntry* te)
+static void
+_EndData(ArchiveHandle *AH, TocEntry *te)
{
- ahprintf(AH, "\n\n");
+ ahprintf(AH, "\n\n");
}
/*------
@@ -92,30 +95,33 @@ static void _EndData(ArchiveHandle* AH, TocEntry* te)
* just sends the data for a given TOC entry to the output.
*------
*/
-static void _PrintTocData(ArchiveHandle* AH, TocEntry* te, RestoreOptions *ropt)
+static void
+_PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
{
- if (*te->dataDumper)
+ if (*te->dataDumper)
{
AH->currToc = te;
- (*te->dataDumper)((Archive*)AH, te->oid, te->dataDumperArg);
+ (*te->dataDumper) ((Archive *) AH, te->oid, te->dataDumperArg);
AH->currToc = NULL;
}
}
-static int _WriteByte(ArchiveHandle* AH, const int i)
+static int
+_WriteByte(ArchiveHandle *AH, const int i)
{
- /* Don't do anything */
- return 0;
+ /* Don't do anything */
+ return 0;
}
-static int _WriteBuf(ArchiveHandle* AH, const void* buf, int len)
+static int
+_WriteBuf(ArchiveHandle *AH, const void *buf, int len)
{
- /* Don't do anything */
- return len;
+ /* Don't do anything */
+ return len;
}
-static void _CloseArchive(ArchiveHandle* AH)
+static void
+_CloseArchive(ArchiveHandle *AH)
{
- /* Nothing to do */
+ /* Nothing to do */
}
-