Source
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
#!/usr/bin/perl -w
require 5.003;
use ;
# Global settings
# List of supported C types to generate overflow assignment code for
my @ctypes = ( () );
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Create assignment overflow #ifdefs
#
# Programmer: Quincey Koziol
# Creation Date: 2009/04/09
##############################################################################
# Parse a meaningful line (not a comment or blank line) into the appropriate
# data structure
#
sub ($) {
my $line = shift; # Get the line to parse
# Parse get the type name and whether it's signed or unsigned
#print "line=$line\n";
if($line =~ /.*SIGNED\s*;\s*$/ || $line =~ /.*UNSIGNED\s*;\s*$/) {
my $name; # The name of the type
my $signed; # Whether the type is signed or not
# Get the type's name & signed status
($name, $signed) = ($line =~ /^\s*(\w*)\s*,\s*(\w*)\s*;\s*$/);
#print "name = '$name', signed = '$signed'\n";
# Append the type to the list of C types already parsed
push @ctypes, [$name, $signed];
}
# Unknown keyword
else {
die "unknown keyword: $line";