home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Mammon_ / extrn_name.idc < prev    next >
Text File  |  2000-05-25  |  652b  |  22 lines

  1.  
  2. // This IDC script will alter the names of imported functions to include the
  3. // repeatable comments for that function, such that the name KERNEL_91 in IDA
  4. // becomes KERNEL_91_INITTASK . Run from the Extern segment.
  5. // extrn_name.idc
  6. // code by mammon_ rev 1.27
  7. #include <idc.idc>
  8.  
  9. static main(){
  10.     auto ea, old_name, old_cmt;
  11.     ea = SegStart( ScreenEA() );
  12.     while ( ea != BADADDR ) {
  13.         old_name = Name( ea );
  14.         old_cmt = RptCmt( ea );
  15.         MakeName( ea, old_name + "_" + substr(old_cmt, 0, (strlen(old_cmt)-1) ) );
  16.         ea = NextAddr(ea);
  17.     }
  18.     Message("Done fixing imported function names.\n");
  19. }
  20.  
  21.  
  22.