home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGGGGGGG SSSSSSSSSS RRRRRRRRR tm
- G G S R R
- G S R R
- G S R R
- G SSSSSSSSSS RRRRRRRRR
- G GGG S R R
- G G S R R
- G G S R R
- GGGGGGGGGG SSSSSSSSSS R R
-
-
-
- Global Search Replace
-
- Version 1.51
-
- The Programmers Scalpel! tm
-
-
- Copyright 1990:1991 Phil Barnett. All Rights Reserved
-
-
- GSR and all of its' associated files are Shareware.
- 'The Programmers Scalpel' and 'GSR' are trademarks of Phil Barnett
-
- GSR is Copyrighted. Please feel free to give this program to anyone who uses
- a DOS based computer as long as it is distributed in unmodified and complete
- form. It should work on any close clone. I developed it in DOS 3.3
- It is compiled in Clipper 5.01. with MS-C6.0 subroutines for speed. It
- requires DOS version 3.0 or later.
-
-
- You may use GSR for 2 weeks at no charge.
-
- Then if you wish to continue using GSR, you must
-
- PAY ME FOR IT or STOP USING IT.
-
-
- Registration fee is $20.00. I prefer to trust you, so no protection is
- involved. This is an absolutely complete version. Even if you don't use it,
- please feel free to distribute it in unmodified form.
-
- ****************************************
- * Phil Barnett (407) 884-5192 *
- * 1105 Binion *
- * Apopka, Fl 32703 *
- ****************************************
-
-
- When you register GSR, I will mail you the latest version which will have
- the registration notices removed from the program.
-
- The latest unregistered version is always available at:
-
- ╒════════════════════════════════════════════════════════════════════════════╕
- │ Login to the Orlando Bullet, and register as a user. │
- │ │
- │ Orlando Bullet (407) 277-2007 1200-9600 HST Dual Standard. 24 Hours. │
- │ │
- │ The Orlando Bullet is dedicated to Clipper programmers all over the world │
- │ │
- │ *** Please Note *** │
- │ │
- │ Due to heavy usage, new users are only allowed logon priveliges │
- │ │
- │ from Monday morning to Friday night. Thank You. │
- ╘════════════════════════════════════════════════════════════════════════════╛
-
- ***** An Important Note about Shareware *****
-
- SOAPBOX MODE ON:
-
- The concept of shareware is this: Try the software "Free of Charge" for a trial
- period. Use it "For Free" to find out if it suits your purposes, or saves you
- time, or makes difficult things easier, or saves you money, or just plain does
- something you want to do. After you have determined that a shareware program
- suits your purposes, and you continue to use it beyond its' trial period, you
- must buy it. Not doing so constitutes theft of services.
-
- If you use this program, you should register it. Consider this. I spent many
- hours writing and perfecting this utility. If I spent only 50 hours, (which I
- spent considerably more than) I would be working for you for only 40 cents an
- hour. This doesn't include the marketing expenses and long distance charges
- I spent on distribution services. It is neither easy nor inexpensive to
- develop good quality software. If you continue to use any shareware program,
- you should BUY it.
-
- I have written much shareware software, and found that only 1 in a thousand
- users of a shareware program ever bother to register it. Amazingly enough,
- European, Canadian, and Australian users have taken the trouble, time, and
- expense to register my shareware with me at a much higher rate than my
- U.S. users. This amazes me. In the U.S., we have one of the highest
- standards of living in the World, and yet are apparantly more willing to
- steal shareware than users in less fortunate countries.
-
- The good part of registering is this. If you register your shareware, you will
- have opened the lines of communication for added improvements, and enabled
- other fine shareware to be written. I listen to my registered users, and make
- every attempt to adhere to their criticism and comments for useful changes.
-
- The sad part may be this. Eventually, unrewarded authors will no longer write
- useful programs for you to try before you buy. Shareware will die. You will be
- the loser.
-
- Remember, every time you see the opening screens of an unregistered shareware
- program, you are being reminded that you are part of the 999 in a 1000.
-
- If you already register the shareware you use, I congratulate you. You are one
- of a rare and honest breed. All shareware authors thank you.
-
- Judge yourself. Do you register your often used shareware programs?
-
- And now, on to better things.....
-
- SOAPBOX MODE OFF:
-
-
- INSTALLATION INSTRUCTIONS
-
-
- You may place GSR in any directory, however it is easier to use if you
- place it in a directory which is in the path statement of your autoexec.bat.
-
-
- GSR includes four files.
-
- 1 GSR.EXE The Executable Program
- 2 GSRAVOID.DBF A table of special extensions (explained below)
- 3 GSR.DOC This Document
- 4 GSR.SDA The SDN short form document.
-
-
-
- !!!!!!!!!! IMPORTANT !!!!!!!!!!! READ THIS !!!!!!!!!!
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- Even though every precaution has been taken to insure it's safe use, the
- potential for unrecoverable change exists in any program with this kind of
- power. GSR even keeps the last 99 versions of what you are working on.
-
-
-
- !!!!!!!!!!!!!!!!!!!!!!!!! ALWAYS make a backup first !!!!!!!!!!!!!!!!!!!!!!!!!
-
- Manual for GSR Version 1.51
-
- GSR is a Global Search and Replace program. It allows you to select a group
- of files to operate on. You can then specify what text to look for, and what
- text to replace it with. Your search can be either case sensitive or not,
- and you may either view each occurance, to verify the change, or have GSR
- automatically make all replacements for you.
-
- Version 1.51 now has Virtual file handling capabilities. This means GSR can
- run in less memory, and handle unlimited files sizes.(based on disk space)
-
- GSR will now run in monochrome. Type GSR M at the command line.
-
- Probable uses are:
-
- Rename an existing variable across many programs.
- Change a copyright notice.
- Change a client name when you are recycling code.
- and many more.....
-
- All options are entered into blanks after you run the program.
-
- You may press <Esc> at any time, to stop the process. The file you are
- operating on at the time will remain unchanged. Files you have already
- confirmed changes on will remain changed.
-
- When you see the field labeled "File Spec to Include" you should enter the
- type of file you wish to perform global operations on. Typical response might
- be;
-
- *.C
- *.PRG
- *.BAT
- *.BAS
- *.TXT
- XXX*.XXX
- and etc.
-
- The next field you enter is 'String to Search for'. This is where
- you enter the text you are wishing to replace. If you need to replace text
- that is longer than 76 characters, or you wish to include carriage return
- linefeed combinations, you may use an input file instead. Place the filename
- in <> like this: <lookfor.txt> as the only item in the field.
-
- (you can use any filename here, lookfor.txt is only an example)
-
- The next field you enter is 'String to Replace with'. This is the
- text you wish to replace the above field with. You may also use an input file
- here by placing the replacement text in a file and specifying it's name
- in <> like this: <a:\repwith.txt> as the only item in the field.
-
- (you can use any filename here, a:\repwith.txt is only an example)
-
- Your next option is '(M)anual or (A)utomatic'. If you select automatic mode,
- the search and replace operation will complete without further intervention.
- If you are unsure of the consequences of this action at all, you should use
- manual mode instead. Manual mode will present you with each occurance
- surrounded by its contextual suroundings. You can decide what to do with
- each occurance individually.
-
- Your last option is to make GSR search for your text regardless of the case.
- If you choose 'Case Sensitive' = 'N', capitalization will have no bearing on
- your search.
-
- pHiL will find PHIL
- xxxxxx will find XXXXXX
- PHIL will find phil
- copyright 1990 will find Copyright 1990
- and etc.
-
-
- After you have entered the five primary fields, you will be presented with
- a summary screen of selections. This will allow you to review your choices
- and abort the process if you were mistaken in any way.
-
- When you confirm the selections you have made, the search will begin.
-
- If you selected manual mode, each occurance of the searched for text will be
- displayed in context as it is found. You will be asked:
-
- Replace this occurrance? (Y/N)
-
- If you select Y, it will be replaced, and the search will continue. If you
- select N, the search will continue with no changes to the file.
-
- When you have reached the end of the file, and you have previously selected to
- replace an occurrance, you will receive one final prompt:
-
- Make Changes to FILENAME.EXT Permanent?
-
- CONFIRM ABORT
-
- If you select CONFIRM, your changes will be written. If you select ABORT,
- any changes you have already selected on this file will be ignored.
-
- In any case, if you choose to make the replacements, your original text will
- be renamed with the extension .GSR. Subsequent changes will increment the .GSR
- extension, with up to 99 changes kept on any single file name.
-
- MYTEXT.GSR
- MYTEXT.GS1
- MYTEXT.GS2
- MYTEXT.GS3
- MYTEXT.GS4
- MYTEXT.GS5
- MYTEXT.GS6
- MYTEXT.GS7
- MYTEXT.GS8
- MYTEXT.GS9
- MYTEXT.G10
- MYTEXT.G11
- MYTEXT.G12
- MYTEXT.G13
- MYTEXT.G14
- MYTEXT.G15
-
- up to
-
- MYTEXT.G99
-
- 99 previous versions are kept until you choose to delete them. This is going
- to create a lot of backups, but is necessary due to the tremendous power of
- this program to cross all safety barriers.
-
- This process repeats for every file in the selected group.
-
- During the replacement process you are informed of your location in the group
- of files you are operating on. When you have finished, you are presented with
- statistics informing you how many replacements were made and in how many files.
-
-
- ************************
- * Snow on CGA displays *
- ************************
-
- If you are experiencing snow or flashing dots on the screen, place the
- following line in your AUTOEXEC.BAT
-
- SET CLIPPER=S1
-
- This will stop the snow from appearing on your CGA display.
-
-
-
- GSRAVOID
-
- WHY IT'S HERE:
-
- There are many types of files that any length text can be replaced with any
- other length, and never cause a problem.
-
- There are other files, however, that allowing a change like this would cause
- a disaster. For this reason, I included fifteen file extensions inside GSR
- that cannot be written to unless the search text and the replace text are
- identical in length. (You may override these names)
-
- GSR looks for the file GSRAVOID.DBF in the current directory, and if it finds
- it, GSR reads in the file extensions in GSRAVOID instead of using it's
- internal list.
-
- This means: If you need to override the default values, you need to modify
- GSRAVOID.DBF and put it in the directory where you are working.
-
- This allows you to add to or override my fifteen extensions.
-
- The extensions I avoid internally are as follows.
-
- .COM .EXE .DBF .DBT .NTX .NDX .PAK
- .OVL .LIB .OBJ .MEM .SYS .ZIP .ARC
- .IDX
-
- (you may override any or all of them.)(or add to them)
-
- Changing the length of any of these types of files would spell certain
- disaster. You may add more if you wish by filling in more records in
- GSRAVOID.DBF with any dBASE type program. You do NOT need to put GSRAVOID.DBF
- in a directory for GSR to work. It only exists so you can override my defaults.
-
-
-
- WARNING!
-
- DISCLAIMER:
-
- You are totally responsible for the use of this program. If it causes damage
- of any kind, you are responsible. In no way will I, Phil Barnett, assume any
- expense or provide any compensation for the use or misuse of this program.
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- GSR is a tool, nothing more. It can be used in a damaging way as easily as
- a beneficial way. I hope you find it of benefit to you. I wished for a program
- like this for a long time, and after giving up hope of finding it, I finally
- wrote it myself. I use it constantly, and wish I'd had it years ago.
-
- Good Luck, Good Programming, and God Bless You.
-
- My motto: Easier is Better!
-
- MODIFICATONS HISTORY
-
- Version 1.51 Retains latest filespec when returning to main screen.
-
- Version 1.5 removed .BAT from avoidance list. Added .IDX
- Allowed users to remove snow from older CGA displays.
- Program now returns to main screen when a run is finished.
-
- Version 1.4 update added a virtual file manager, making it possible to use GSR
- on ANY size of file.
-
- 1.4 no longer copies the original file to the backup name.
- The original file is now RENAMED to the backup name.
- (much safer)
-
- added monochrome switch on the command line -> GSR M for
- monochrome...
-
-
- Version 1.3 is the first Shareware version.
-
- added ability to specify 'use files' on disk to fill the search
- and replace parameters.
-
- added case sensitivity.
-
-
- Version 1.2 was the Gamma version
-
- added the c routine that allows rapid context viewing allowing
- the new user interface to emulate the Norton Text Search (TS.EXE)
- look and feel.
-
- added manual refusal on changes.
-
-
- Version 1.1 was the Beta version.
-
- Version 1.0 was my original creation, a diamond in the rough.
-
-
- CREDITS:
-
- Thanks to the generosity of Rusty Justin for making this creation necessary.
- (I mean it. Thanks, Rusty!)
-
- Nortons Text Search (TS.EXE) is a copyrighted and trademarked program by
- Peter Norton Computing.
-
- I must admit, that I always wished and waited for Peter Norton to upgrade his
- TS.EXE program to do what GSR.EXE does. When Peter Norton Computing was
- purchased by another company (Symantec), the 5.0 version was released. TS.EXE
- was no longer offered as a utility in the 5.0 Advanced Version. By this time,
- I knew I would never see Peter Norton Computing create the program I had wished
- for. I proceeded to create it.
-
- This version is written in Clipper 5.01, and undoubtedly, as I learn more about
- the C language, I will convert this utility to the speed, size, and portability
- of C. Until then, this one works excellently, and I do not feel compelled to
- rush into it's re-creation in another language. If anyone out there wants to
- rewrite this utility in C, I would appreciate owning a copy of the final
- product. Clipper is not particularly slow, however, it is rather bulky.