Version
This page covers version 1.0 of the utility.
Synopsis
renid optionsopt input-files
Description
The renid utlility replace identifier instances over properly tokenized input files. Note that renid tokenize source files as preprocessing translation units, and thus totally all identifiers, including preprocessing directive names and keywords are a subject for the replacement, but those are within character constants, string literals and comments are not.
The options allowed are the following:
If neither the -lc nor -lp option is specified, each of the input files will be processed in appropriate mode, depending on its extension. If the -ofile-name option is not specified, resulting files will have the same names as their original files except that their extensions will be replaced with the .ren one.
During the replacement process the renid utility also lexically validates specified input files so some diagnostic messages may appear for both a specified replacement table and input files.
A replacement table is a text file which lists all the identifiers as well as their replacements delimited by a sequence of white-space characters, one pair on a line, as shown below:
source-identifier-1 target-identifier-1
source-identifier-2 target-identifier-2
...
Example
Assuming there is the following two-line replacement table specified in an invocation of the renid untility:
getnextlink get_next_link
getprevlink get_prev_link
then all instances of the identifiers getnextlink and getprevlink will be replaced with the identifiers get_next_link and get_prev_link respectivelty.
Conformance
The implementation conforms to the ANSI/ISO/IEC 9899:1999 International Standard (C99) and ANSI/ISO/IEC 14882:1998 International Standard (C++98). For further information, please see the WG14 and WG21 home pages.
Known Bugs
Angle-bracketed header names appeared within #include preprocessing directives will not be recognized as such, and thus may be a subject of an identifier replacement.
Contacts
Please send your comments, suggestions and bug reports to support@unicals.com.
Copyright
Copyright (C) 2005 Ivan A. Kosarev, Unicals Group
The author of the software gave a permission to use and distribute the software freely as long as all supplied credits are unchanged.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.