Line data Source code
1 : #include <stdio.h> 2 : #include <stdlib.h> 3 : 4 : #include "pgtypes_interval.h" 5 : 6 : EXEC SQL BEGIN DECLARE SECTION; 7 : char dirty_str[100] = "aaaaaaaaa_bbbbbbbb_ccccccccc_ddddddddd_"; 8 : interval *interval_ptr; 9 : EXEC SQL END DECLARE SECTION; 10 : 11 4 : int main() 12 : { 13 4 : interval_ptr = (interval *) malloc(sizeof(interval)); 14 4 : interval_ptr->time = 100000000; 15 4 : interval_ptr->month = 240; 16 : 17 4 : printf("dirty_str contents before intoasc: %s\n", dirty_str); 18 4 : intoasc(interval_ptr, dirty_str); 19 4 : printf("dirty_str contents after intoasc: %s\n", dirty_str); 20 4 : return 0; 21 : }