summaryrefslogtreecommitdiff
path: root/tuple.c
diff options
context:
space:
mode:
authorBruce Momjian2001-02-10 07:01:19 +0000
committerBruce Momjian2001-02-10 07:01:19 +0000
commit579282b8baf5a31690ad4d4bbeac8fabc418ce2c (patch)
treee5c68498713a7dfce84e4184a1197468b9aede3e /tuple.c
parent79daa0cc680c1e2c89032ed46ce902d436f6a227 (diff)
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 'tuple.c')
-rw-r--r--tuple.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/tuple.c b/tuple.c
index 968f098..daf0fc6 100644
--- a/tuple.c
+++ b/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);
}