diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-02-14 05:45:46 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-02-14 05:45:46 +0000 |
commit | 594e97b72fe61d95ac8ed2a1f724a4bef7394064 (patch) | |
tree | e1f3a55d3eb0f91b7ab0845ad531ec198855d41d /src/interfaces/odbc/tuple.c | |
parent | 18b04ae131b675a021613a7da4c66ae34fe625d7 (diff) |
Back out all ODBC formatting changes, and back out removal of <6.4
protocol. I have left in Tom's SOCK_get_next_byte() fix, and the new
win32.mak file addition. I have also left in the 'X' connection close
fix.
Diffstat (limited to 'src/interfaces/odbc/tuple.c')
-rw-r--r-- | src/interfaces/odbc/tuple.c | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/src/interfaces/odbc/tuple.c b/src/interfaces/odbc/tuple.c index e12f2fc55e9..303476fef28 100644 --- a/src/interfaces/odbc/tuple.c +++ b/src/interfaces/odbc/tuple.c @@ -1,16 +1,17 @@ -/* 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,43 +19,39 @@ #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); } |