aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/tuple.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-02-10 07:01:19 +0000
committerBruce Momjian <bruce@momjian.us>2001-02-10 07:01:19 +0000
commit755a87332adccd3ad8d08bd16ad490e82b009496 (patch)
treef3fb28c376384c5b671020d751f988bd32e14beb /src/interfaces/odbc/tuple.c
parent505a828a661cb4ec8ff9dc3abc69db5fb939bc54 (diff)
downloadpostgresql-755a87332adccd3ad8d08bd16ad490e82b009496.tar.gz
postgresql-755a87332adccd3ad8d08bd16ad490e82b009496.zip
Run pgindent over ODBC source. We couldn't do this years ago because we
weren't the master source. We are now, and it really needs it.
Diffstat (limited to 'src/interfaces/odbc/tuple.c')
-rw-r--r--src/interfaces/odbc/tuple.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/interfaces/odbc/tuple.c b/src/interfaces/odbc/tuple.c
index 968f098a80c..daf0fc67859 100644
--- a/src/interfaces/odbc/tuple.c
+++ b/src/interfaces/odbc/tuple.c
@@ -1,16 +1,16 @@
-/* Module: tuple.c
+/* Module: tuple.c
*
- * Description: This module contains functions for setting the data for individual
- * fields (TupleField structure) of a manual result set.
+ * Description: This module contains functions for setting the data for individual
+ * fields (TupleField structure) of a manual result set.
*
- * Important Note: These functions are ONLY used in building manual result sets for
- * info functions (SQLTables, SQLColumns, etc.)
+ * Important Note: These functions are ONLY used in building manual result sets for
+ * info functions (SQLTables, SQLColumns, etc.)
*
- * Classes: n/a
+ * Classes: n/a
*
- * API functions: none
+ * API functions: none
*
- * Comments: See "notice.txt" for copyright and license information.
+ * Comments: See "notice.txt" for copyright and license information.
*
*/
@@ -18,39 +18,43 @@
#include <string.h>
#include <stdlib.h>
-void set_tuplefield_null(TupleField *tuple_field)
+void
+set_tuplefield_null(TupleField * tuple_field)
{
tuple_field->len = 0;
- tuple_field->value = NULL; /* strdup(""); */
+ tuple_field->value = NULL; /* strdup(""); */
}
-void set_tuplefield_string(TupleField *tuple_field, char *string)
+void
+set_tuplefield_string(TupleField * tuple_field, char *string)
{
tuple_field->len = strlen(string);
- tuple_field->value = malloc(strlen(string)+1);
+ tuple_field->value = malloc(strlen(string) + 1);
strcpy(tuple_field->value, string);
}
-void set_tuplefield_int2(TupleField *tuple_field, Int2 value)
+void
+set_tuplefield_int2(TupleField * tuple_field, Int2 value)
{
-char buffer[10];
+ char buffer[10];
- sprintf(buffer,"%d", value);
+ sprintf(buffer, "%d", value);
- tuple_field->len = strlen(buffer)+1;
+ tuple_field->len = strlen(buffer) + 1;
/* +1 ... is this correct (better be on the save side-...) */
tuple_field->value = strdup(buffer);
}
-void set_tuplefield_int4(TupleField *tuple_field, Int4 value)
+void
+set_tuplefield_int4(TupleField * tuple_field, Int4 value)
{
-char buffer[15];
+ char buffer[15];
- sprintf(buffer,"%ld", value);
+ sprintf(buffer, "%ld", value);
- tuple_field->len = strlen(buffer)+1;
+ tuple_field->len = strlen(buffer) + 1;
/* +1 ... is this correct (better be on the save side-...) */
tuple_field->value = strdup(buffer);
}