~ubuntu-branches/debian/wheezy/eperl/wheezy

« back to all changes in this revision

Viewing changes to etc/bin2c

  • Committer: Bazaar Package Importer
  • Author(s): Denis Barbier
  • Date: 2001-12-18 20:40:24 UTC
  • Revision ID: james.westby@ubuntu.com-20011218204024-k0oaqq2eaw733v30
Tags: 2.2.14-4
* Remove emacs crap from debian/changelog
* Fix misspelling in debian/copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/sw/bin/perl
 
1
:
 
2
eval 'exec perl -S $0 ${1+"$@"}'
 
3
    if $running_under_some_shell;
2
4
##
3
5
##  bin2c -- convert an binary file into a statically initialised
4
6
##           C array of characters
25
27
print OUTC "/* $filein.c -- automatically generated by bin2c */\n";
26
28
print OUTC "\n";
27
29
print OUTC "int  ${name}_size   = " . $size . ";\n";
28
 
print OUTC "char ${name}_data[] = {\n";
 
30
print OUTC "unsigned char ${name}_data[] = {\n";
29
31
 
30
32
$i = 1;
31
33
while (read(IN, $c, 1)) {
46
48
#print OUTH "#ifndef __$filename\n";
47
49
#print OUTH "#define __$filename\n";
48
50
#print OUTH "\n";
49
 
#print OUTH "extern char *$name;\n";
 
51
#print OUTH "extern unsigned char *$name;\n";
50
52
#print OUTH "\n";
51
53
#print OUTH "#endif /* __$filename */\n";
52
54