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

  1.  
  2. //seg_string.idc
  3. //This IDC script will parse the strings in a segment and enter the names as
  4. //repeatable comments. The script will default to the segment that the cursor
  5. // is currently located in.
  6. //code by mammon_ rev 1.27
  7.  
  8. #include <idc.idc>
  9.  
  10. static main(){
  11.     auto ea;
  12. //    ea = AskSeg( SegStart( ScreenEA() ), "Choose a segment" );
  13.     ea = SegStart( ScreenEA() );
  14.     while ( ea < SegEnd(ea)) {
  15.         if ( Byte(ea) > 0x19 && Byte(ea) < 0x7F){
  16.             MakeStr( ea, -1 );
  17.             MakeRptCmt(ea, Name(ea));
  18.             ea = ea + ItemSize( ea );
  19.         }
  20.         else ea = ea + 1;
  21.     }
  22.     Message("Done with string parsing");
  23. }
  24.  
  25.  
  26.