Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 5404c6b
  • /
  • util
  • /
  • err-ins.pl
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:31b70df8d0e28e329bbb1b15ae69a6337ee357c3
directory badge Iframe embedding
swh:1:dir:eb83acc5db8716318e6ef6b9b873a581cc1d0395
err-ins.pl
#!/usr/local/bin/perl
#
# tack error codes onto the end of a file
#

open(ERR,$ARGV[0]) || die "unable to open error file '$ARGV[0]':$!\n";
@err=<ERR>;
close(ERR);

open(IN,$ARGV[1]) || die "unable to open header file '$ARGV[1]':$!\n";

@out="";
while (<IN>)
	{
	push(@out,$_);
	last if /BEGIN ERROR CODES/;
	}
close(IN);

open(OUT,">$ARGV[1]") || die "unable to open header file '$ARGV[1]':$1\n";
print OUT @out;
print OUT @err;
print OUT <<"EOF";
 
#ifdef  __cplusplus
}
#endif
#endif

EOF
close(OUT);


ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top