3 # Props to Daniel Stone for starting this script for me. I hate perl.
14 # print the previous line we buffered, but with /*-
15 if ($lastline !~ /\/\*-/) {
16 $lastline =~ s/\/\*/\/\*-/;
19 # now, print the current line.
22 # print the previous line and continue on
25 } elsif ($foundopening && !$foundclosing && /\*\//) {
26 # print the $FreeBSD$ bits after the end of the license block
30 print "#include <sys/cdefs.h>\n";
31 print "__FBSDID(\"\$FreeBSD\$\");\n";
32 } elsif ($foundopening) {
33 # Replace headers with the system's paths. the headers we're
34 # concerned with are drm*.h, *_drm.h and *_drv.h
36 s/#include "(.*)_drv.h/#include "dev\/drm\/\1_drv.h/;
37 s/#include "(.*)_drm.h/#include "dev\/drm\/\1_drm.h/;
38 s/#include "mga_ucode.h/#include "dev\/drm\/mga_ucode.h/;
39 s/#include "r300_reg.h/#include "dev\/drm\/r300_reg.h/;
40 s/#include "radeon_microcode.h/#include "dev\/drm\/radeon_microcode.h/;
41 s/#include "sis_ds.h/#include "dev\/drm\/sis_ds.h/;
42 s/#include "drm/#include "dev\/drm\/drm/;
48 # if we never found the copyright header, then we're still a line behind.