PERFORCE change 143245 for review

Marko Zec zec at FreeBSD.org
Tue Jun 10 17:56:24 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=143245

Change 143245 by zec at zec_tpx32 on 2008/06/10 17:55:27

	Introduce a script for automated renaming of global variables.
	
	The script searches for references of variable names in .c and
	.h files in the srcdir hierarchy, and prepends them with a "V_"
	prefix.  The script also creates or updates a "vimage.h" file
	in the current directory containing macros which resolve
	V_ instances back to their original counterparts (e.g.
	V_rt_tables -> rt_tables).
	
	Best effort is made not to change any variable declarations nor
	field names in structure declarations and / or C-style comments.
	The script attempts to avoid changing structure names if they
	happen to have the same name as any of the requested variables
	(e.g. ifnet).
	
	So far the only manual intervention that has to be done on
	resulting sources is placement of #include <sys/vimage.h> lines
	in .c files for which the script couldn't figure out
	automatically that they require this #include.  
	
	The resulting diff is ~550K in size, roughly half of the
	current delta between HEAD and projects/vimage in p4.  The
	kernel and modules compile cleanly, as does the buildworld.
	
	Note that the script is _slow_ when operating over the entire
	sys tree.

Affected files ...

.. //depot/projects/vimage/var_rename.tcl#1 add

Differences ...


More information about the p4-projects mailing list