untitled
viviti

Editor  

What is Editor?

Editor is a handy editor that helps you manage the information contained in a file and correct it in a flash. It edits source file by correction informations. The program reads in correction informations and edits target file(s). The special feature of Editor is the program provides relational location directives. So the the correction sets generates from the old version of programs can be appled to edit the new version of programs directly. This is useful for keeping a personal version of open source programs. In case of new version of open source was released, just download and runs Editor with the correction sets and you get your personal new version of open source programs.


how to use Editor?     goto top

The standard manner used to invoke is:

Editor [options] correction-Info-file edit-file...

Type program name follow by correction-Info-file and edit-file name. In case of parameters missing, the program will print out a error with help informations. The program will edit the file(s) by the correction information reads from the correction-Info-file. After every thing was down edit file will be overrided by the new version. edit file name may use real name or wildcard name Ex. *.h *.c ...


Deck directive specified the following directives are for this file only, and no efect for other files. In case of no Deck directive was provided in correction-info-file, all directives will active for all edit file(s).

options:
-r reverse operations (for reverse edit)
-s process sub-directories also (effect for wildcard file name only)
-l log the changes.
-d list diff output.

Directives     goto top

R from-string to-string     goto top

Replace string once, Program will search the string from-string from current location till the end of the file. In case of string was found, to-string will be replaced.


RA from-string to-string     goto top

Replace string all the file, Program will search the string from-string from the beginning of the file till the end of the file. In case of string was found, to-string will be replaced.


XL from-string to-string     goto top

Replace string once, Program will search the string from-string from current location till the end of the file. In case of string was found, to-string will be deleted and append to-string at the end of the line.


XLA from-string to-string     goto top

Replace string all over  the file, Program will search the string from-string from the beginning of the file till the end of the file. In case of string was found, to-string will be deleted and append to-string at the end of the line.


MO match column string     goto top

Find match string and override as string at column column once, Program will search the string match from current location till the end of the file. In case of string was found, start from column column will be override as string.


MOA match column string     goto top

Find string match and override as string at column column all over the file, Program will search the string match the beginning of the file till the end of the file. In case of string match was found, start from column column will be override as string.


RL     goto top

Replace lines once, Use with BY directive. Program will search the line(s) following by the RL directive from current location till the end of the file. In case of the line(s) was found, The follow by BY directive line(s) will be replaced.

Ex:
RL
line1 will be replaced
line2 will be replaced
BY
line 1 for replace

RLA     goto top

Replace lines all over the file, Use with BY directive. Program will search the line(s) following by the RLA directive from the beginning of the file till the end of the file. In case of the line(s) was found, The follow by BY directive line(s) will be replaced.


L [+|-]Line-No.
LOCATE [+|-]Line-No.
     goto top

Move to locate absolute line no. or current line no +/- Line-No.
L 0 following by a INSERT directive will insert the line(s) at the beginning of the file.


LSP string     goto top

Locate string previos, Program will search the string string from currente till the beginning of the file. In case of string was found, The current location will move to the line has the string.


LSN string     goto top

Locate string next, Program will search the string string from currente till the end of the file. In case of string was found, The current location will move to the line has the string.


LLP string     goto top

Locate line(s) previos.Program will search the line(s) following by the LLP directive from currente till the beginning of the file. In case of the line(s) was found, The current location will move to the line has the line(s).


LLN string     goto top

Locate line(s) next.Program will search the line(s) following by the LLN directive from currente till the end of the file. In case of the line(s) was found, The current location will move to the line has the line(s).


D string (* can not reverse)
DELETE string
     goto top

Delete the line has string once, Program will search the string string from current location till the end of the file. In case of string was found. The line has string will be deleted.


DA string (* can not reverse)     goto top

Delete the lines have string. Program will search the string string from the beginning of the file till the end. In case of string was found. The line(s) have string will be deleted.


DCL [No. of line(s)]     goto top

Delete No. of lines from current location. Default is delete one line.


DL     goto top

Delete lines once. Program will search the line(s) following by the DL directive from current location till the end of the file. In case of the line(s) was found, The line(s) will be deleted.

Ex:
DL
line1 will be deleted by DL directive
line2 will be deleted by DL directive

DLA     goto top

Delete lines all the file. Program will search the line(s) following by the DLA directive from the beginning of the file till the end of the file. In case of the line(s) was found, The line(s) will be deleted.


I
INSERT
     goto top

Insert line(s). Program will insert the line(s) following by the I directive in current location.


BY     goto top

The second command of DL/DLA/RL/RLA. The follow by BY directive line(s) will be use to replace to the line(s) was found.


DECK file-name     goto top

Deck directive specified the following directives are for edit this file only, and no efect for other files. In case of no Deck directive was provided in correction info file, all directives will active for all edit file(s).


Warning: It is impossible to do reverse operation for D/DA/DLA/XL/XLA directives. Replace by NULL string can not reverse also.

P.S. Directive must start at column 1, and ^ chr. may used as leader code for Directive.(Ex. ^Insert)

Comments in the directive file     goto top

All directive lines that the first word is not a directive command will be treated as a comment line.






Web Hosting · Blog · Guestbooks · Message Forums · Mailing Lists
Easiest Website Builder ever! · Build your own toolbar · Free Talking Character · Email Marketing
powered by a free webtools company bravenet.com