Changeset 4006
- Timestamp:
- May 20, 2005, 12:53:49 PM (21 years ago)
- Location:
- trunk/glueforge
- Files:
-
- 4 edited
-
glueforge.in (modified) (7 diffs)
-
templates/psdb/code.tt (modified) (1 diff)
-
templates/psdb/tests_makefile_am.tt (modified) (1 diff)
-
templates/psdb/testsuite_at.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/glueforge/glueforge.in
r4005 r4006 3 3 # Copyright (C) 2005 Joshua Hoblitt 4 4 # 5 # $Id: glueforge.in,v 1.1 3 2005-05-20 03:32:11jhoblitt Exp $5 # $Id: glueforge.in,v 1.14 2005-05-20 22:53:49 jhoblitt Exp $ 6 6 7 7 use strict; … … 70 70 ctype => $mdtypes->{ctype}, 71 71 mtype => $mdtypes->{mtype}, 72 test => $mdtypes->{test}, 72 73 comment => $elem->{comment}, 73 74 value => $elem->{value}, … … 76 77 77 78 $data{columns} = \@items; 79 78 80 79 81 $output = $data{pkg_name} unless defined $output; … … 91 93 'dbsetup_c.tt' => "$output/tests/dbsetup.c", 92 94 'dbcleanup_c.tt' => "$output/tests/dbcleanup.c", 95 'alloc_c.tt' => "$output/tests/alloc.c", 93 96 'init_c.tt' => "$output/tests/init.c", 94 ' init_c.tt'=> "$output/tests/cleanup.c",97 'cleanup_c.tt' => "$output/tests/cleanup.c", 95 98 'createtable_c.tt' => "$output/tests/createtable.c", 96 99 'droptable_c.tt' => "$output/tests/droptable.c", … … 131 134 my %ctypes = map { $_ => "ps$_" } keys %primitives; 132 135 136 my %ttypes = ( 137 S8 => -8, 138 S16 => -16, 139 S32 => -32, 140 S64 => -64, 141 U8 => 8, 142 U16 => 16, 143 U32 => 32, 144 U64 => 64, 145 F32 => 32.32, 146 F64 => 64.64, 147 ); 148 133 149 if ( $primitives{$type} ) { 134 150 return { 135 151 ctype => $ctypes{$type}, 136 152 mtype => $mtypes{$type}, 153 test => $ttypes{$type}, 137 154 }; 138 155 } elsif ( $type =~ /STR|STRING/ ) { … … 140 157 ctype => "char*", 141 158 mtype => 'PS_META_STR', 159 test => '"a string"', 142 160 }; 143 161 } elsif ( $type =~ /BOOL/ ) { … … 145 163 ctype => "bool", 146 164 mtype => 'PS_META_STR', 165 test => 'true', 147 166 }; 148 167 } else { -
trunk/glueforge/templates/psdb/code.tt
r4005 r4006 2 2 3 3 #define [% namespace FILTER upper %]_TABLE_NAME "[% table_name %]" 4 5 [% INCLUDE alloc.tt %] 4 6 5 7 [% INCLUDE init.tt %] -
trunk/glueforge/templates/psdb/tests_makefile_am.tt
r4005 r4006 51 51 52 52 TESTS = \ 53 alloc \ 53 54 init \ 54 55 cleanup \ -
trunk/glueforge/templates/psdb/testsuite_at.tt
r4005 r4006 2 2 3 3 AT_INIT 4 5 [% INCLUDE alloc_at.tt %] 4 6 5 7 #m4_include([init.at])
Note:
See TracChangeset
for help on using the changeset viewer.
