CEDIT (V00478)
o For information on specific functions see the Main_Functions or the
Line_Functions sub-topics.
o Note to first time users: You should read the maximum_line_length
sub-topic so you understand this important startup parameter.
o Special characters are displayed as @ characters on screen.
o The Up, Down, Left, and Right arrow keys can be used for scrolling.
o Use Ctrl Z (shown as ^Z) to exit Cedit or cancel any function.
o Use Ctrl W or Ctrl R to redisplay the screen.
2 About_Cedit
Cedit is a text editor that can perform column editing functions that
most editors only perform on a line by line basis.
Cedit also has many line editing functions that can be accessed by
selecting the (what else) LINE function.
Cedit also has a simple built in screen editor (Edit function) and can
even invoke another editor (Line function Xedit).
Cedit is designed to be user friendly, however it is suggested that
you take a little time to read about each function so you can take
full advantage of Cedit's flexibility and power.
Take note of the Hints help topic for ideas that may make a time
consuming edit session quick and easy.
Perhaps the most important reading is the maximum_line_length sub-topic.
3 How_it_works
This is programmer talk, so non-programmers need not read any further.
Cedit works by loading the to be edited file into a doubly linked list.
A second link list points to every 100th line in the first link list for
fast line access when cedit functions need to access lines in big files.
All operations are then simple (well sort of) sub-string operations
on the lines in the linked list. Interactive input routines then grab
keyboard input. Standard VT100 escape codes control the output.
Toss in lots of idiot input checks and presto, you have an editor!
Simple stuff. Now I expect to see all of you writing your own editors
real soon.
3 Author_Program_Info
Cedit was conceived, designed and created by
Steven Lendt at the University of Nebraska at Omaha
on a VAX 8650 running VMS and is written in PL/I
Version 3.0 of Cedit was completed on March 25, 1990
The interactive IO routines were written by Stan Wileman
You can Email questions, comments, bug reports, etc to
Internet: NETWORK@ZEUS.UNOMAHA.EDU
Bitnet: NETWORK@UNOMA1
Please give step by step details of what you tried with bug reports.
Cedit can be obtained via anonymous FTP from ZEUS.UNOMAHA.EDU
You need to binary get files: CEDIT.OBJ and TT_LIBRARY.OLB
You need to ascii get files: CEDIT_HELP.TXT and CEDIT_INST.COM
The first two are the object and I/O library files, the other two
are the ASCII help file (what your reading now) and an easy does
it install com file. Send Email to Author for information on
obtaining a tape with these files and/or the PL/I source code.
2 Keywords
Many of the functions in Cedit require that you specify starting and/
or ending line numbers and column numbers. Most of the time you can
specify a keyword instead of an actual line number or an offset
number (see Offsets Cedit sub-topic for details).
Keywords:
ALL -----> When entered at a Starting Line prompt, specifies
entire file. No other positions are requested!
BOTTOM --> Last line in file
END -----> Last line in file
LEFT ----> Left most column (i.e. column 1)
RIGHT ---> Right most column (i.e. maximum_line_length)
START ---> Top line (i.e. line 1) or column 1
TOP -----> Top of file (i.e. line 1)
Note: You can use a keyword followed by an offset (see Offsets)
2 Offsets
When asked for a line or column number you have options for your
response. You can enter a specific number. You can enter a key
word (see Keywords Cedit sub-topic for details). You can just
press return to accept the displayed default number or you can
use an Offset (i.e. + or - before a number) from the displayed
default value or a keyword offset combination.
Examples: Starting Line[92]:
Enter +8 to reference line 100, or -2 to reference line 90.
Starting Column[10]:
LEFT+10 specifies column 11 (keyword left = 1 plus 10)
Ending Line[1]:
END-20 specifies line that's 20 lines above last line in file.
2 maximum_line_length
The maximum line length is just that. The longest line (how many
characters wide) that you can have in your file. So why not just
use a big number all of the time? Because that takes more system
memory for each line, takes longer to load and slows things down.
Files with a lot of lines may cause you to exceed your available
system memory if you specify a large maximum_line_length. To small
of a number and you may loose characters on the end of lines when
editing if a line exceeds this limit (Cedit will tell you if this
happens).
Guide line: the default of 132 works well for most text files.
largest line + 80 tends to be a good choice.
o The longest line you can load in to Cedit is 10,000 characters wide.
o Use DIR/FULL on a file and look at the Record format: line to see
a files maximum byte length (longest line in the file).
o If you enter 10000 for all programs you intend to Cedit your a fool.
2 PRIMARY_FUNCTIONS
The following functions can be activated once the program is started.
Press the letter that corresponds to the intended function to activate
that function. Note that Line brings up the line functions status bar
with a whole group of line oriented functions.
o Ctrl Z will cancel any function that is asking for information.
3 COPY
Copy is a two step function that copies a specified section of text
from one section to another.
After specifying the area for the source text, you must then specify
a starting line and starting column for the text to be copied to.
Note you are not requested for a ending line or ending column for
the destination since that is determined by the dimensions of the
area of source text being copied.
Copy first copies the source text to a temporary storage area, then
copies the text from that storage area to the destination area.
Text to the right of the inserted (copied) text is shifted to the
right. Shifted text exceeding the maximum_line_length is lost,
but you are warned that text was lost.
Copy does not pad with blanks lines that are shorter then the
destination (copy to) starting column (use the Line_function Pad).
3 DELETE
Deletes a section of text. Nothing fancy about it.
Any text to the right of the deleted section shifts left.
* Delete does NOT delete lines even if you specify a range that
includes all of the text in a line. You just get empty lines.
To delete a line, select the Line option then the Delete
function for deleting lines.
3 EDIT
EDIT invokes a simple screen editor, however this editor has the
distinct advantage of auto scrolling not only up and down but
column wise as well, so you can easily edit files wider than 80
columns on an 80 column terminal/screen and still see what you
are doing.
o Use Ctrl Z to exit Edit. Ctrl W or Ctrl R can be used to refresh
the screen if you get a message or garbage that changes the screen.
Pressing Ctrl S freeze screen output until Ctrl Q is pressed.
o Edit also has six control key combinations that perform special
functions when using Edit. These function are described below:
4 INSERT_ON_OFF
Using Ctrl A will toggle Insert mode ON or OFF without leaving
the screen Editor.
o insert turned ON causes characters to the right of your cursor
position to shift right when you type.
o insert turned OFF (replace mode) causes characters under the
cursor to be replaced by characters you type.
If ON is capitalized on the bottom left of the screen, then
insert mode is turned on (the default). If OFF is capitalized
then insert mode is turned off (replace mode).
4 CUT
Using Ctrl K allows you to Cut (Kut) out a character string
starting at the current cursor position up to (but not
including) the character string or column number you specify.
You can then use Ctrl P to Paste this string any place you
want by positioning the cursor and pressing Ctrl P (see Paste).
o Kut only works within a single line, not multiple lines.
o Kut remembers the last string you cut to and prompts you
with this string during your next cut. Watch for blanks!
o To delete to a numeric character string instead of a
specific column, include a character (even a blank)
before or after the numeric character string.
o Kut is great for deleting characters or an entire line.
4 LOCATION
Ctrl L will show your current cursor location within the file
you are editing. Remember this is the location in the file,
not the cursor location on the screen.
Pressing any key will take you back in to the screen editor.
4 PASTE
Ctrl P will Paste the last character string that you cut
(see Cut) starting at the current cursor position.
o Paste always inserts characters even if you have toggled
insert mode Off with the line function EOL.
o You can Paste a character string as many times as you want,
just keep pressing Ctrl P.
o Paste will warn you before it does anything if what you are
about to paste will cause the current line to exceed the
maximum_line_length, which would cause the loss of characters
on the end of the current line.
4 SCROLL
Ctrl X allows you to scroll the cursor left or right 60 columns,
and/or up and down 16 lines. Movement can be done using the
arrow keys or the U,D,L,R keys (Up, Down, Left and Right).
o Pressing any key but an arrow or U,D,L or R key will exit
you from Scroll mode.
o Ctrl S does NOT scroll, it freezes the screen. If this happens,
use Ctrl Q to continue scroll mode.
o You can not scroll the cursor right past the end of a line,
or left of column 1 or past the top or bottom of the file.
Scroll does not wrap around. An end is an end.
4 VERIFY
Ctrl V gives the ASCII decimal code of the character that is
under the cursor, assuming the cursor is on a character.
You then have the option of inserting a character by entering
the ASCII decimal code (other than zero) for a character.
o Verify is useful since Cedit displays special characters such
as Tabs, Form Feeds, etc as a @.
o Inserting a character does not replace the character that
is under the cursor position.
o See the Cedit sub-topic ASCII_chart for a chart of the ASCII
decimal codes for characters.
4 CTRL_Z
Ctrl Z will take you out of the screen editor and back to
the Line_function status bar. Changes are saved (there is not
a quit in Edit) within Cedit, but you still have to save the
file (Ctrl Z again if done with Cedit).
4 Warnings
Edit trys to warn you if you exceed or are about to exceed the
maximum_line_length and loose characters.
o Terminal bell sounds when typing in text if you exceed or
are about to exceed the maximum_line_length. Characters
exceeding this length are lost from the end of the line.
o Using Delete while in column 1 causes the current line to
be appended to the line above. Edit will warn you if this
action would cause the new line to exceed the
maximum_line_length, and then gives you the option of
canceling the delete.
o If you have these problems, save what you have, then restart
Cedit on the file again using a larger maximum_line_length.
3 FIND
Find performs a downward search on a specified section of text
for the occurrence of a character string that you supply.
If found, the location of the string is shown on the screen and
the numerical position within the file is shown on the bottom of
the screen. Find then asks if you want to continue searching.
o Enter %VERIFY to search for characters that DO NOT match a
string of characters you specify. So you can verify that
only certain characters are in the search area.
Example: %verify then enter the string 0123456789 to cause
find to search for non-numeric data.
Example: %verify then enter .0-+ and find will look for any
character other then the four characters .0-+
o Use the down arrow key after a string find to stop searching the
current line and continue search with next line down.
o Find is not case sensitive. Searching for the word DOG would
find a match with dog or Dog, etc.
3 HELP
Brings up this help utility as you obviously know since your are
using it now. Works just like the standard VMS help utility
since it uses the same. In case you did not know, Ctrl Z will
get you out of help.
3 INSERT
Inserts a character string of text (that you specify) into the
lines (that you specify) of the file.
You specify the starting line, ending line and a starting column.
o Enter %NUMBER to insert a range of numbers that you specify.
Example: Enter %number then 12 for a starting number and -2
for and increment and each line will have a different
number inserted starting with 12, the next line would
get 10, next would get 8, etc. Negatives are supported.
o %number is padded with leading (up to 9) blanks.
o All insert strings are limited to 60 characters at a time.
o Any characters on or to the left of the insert column are
right shifted. Characters past the maximum_line_length are
removed without any warning.
3 LINE
Brings up another set of Cedit functions, most of which are Line
oriented functions.
See the Line_Functions Cedit sub-topic for details.
3 MOVE
Move works much like the Copy function in that it copies a source
area of text to a temporary location then copies it from the
temporary location to the starting line and column you specify.
However, Move deletes the text from the source location.
Note you are not requested for a ending line or ending column for
the destination since that is determined by the dimensions of the
area of source text being moved.
o Move may in isolated cases give unexpected results if you move
a section of text containing varying length lines to a
destination that is partly in the source area of text.
3 REPLACE
Searches for a specified text string within the section of the
file that you specify and replaces every occurrence with a
specified replacement string that you also specify.
o Replacement is on a string by string basis, not character by
character.
o The search string and replacement string do not need to be the
same length.
o If you answer Yes to the case sensitive replace prompt then
only text that exactly matches the search string is replaced,
otherwise replacements are made regardless of the characters
being upper or lower case.
3 SCROLL
Allows the user to select the line and column within the file
that they want to view in the 20 line by 80 column edit window.
This is much faster than using the arrow keys when moving very
far in a large file.
3 Question_Mark
Displays the following information:
o Places temporary line number bars on the left and right side
of the current edit window.
o Shows the largest known line in the file and what you have
set the maximum_line_length value to at startup time.
o Shows the number of lines in the file.
3 CTRL_Z
Control Z gives you the options of Saving the file, Quitting,
or Including a file in the current file being Cedited.
Save - saves changes your have made to the file. You can save
only part of the file if you say No to the save entire
file prompt. After saving you are given the option of
exiting Cedit or continuing to work with the current file.
Quit - Exits Cedit. No changes are saved.
Include - Lets you insert a file in to the current file being
Cedited. The file is inserted above the line you
specify. It is NOT inserted column wise in with
existing lines of text.
2 LINE_FUNCTIONS
Line functions are accessed by first selecting the Line(*) function
from the list of main (primary) functions menu bar.
Line functions are non-column oriented, so the name Line functions.
Ctrl Z cancels most functions including access to the line
functions which returns you to the primary function line.
Entering L will also exit you out of the Line function mode.
3 BLANKTAB
BlankTab changes the Tabs in lines to the proper number of blanks.
This is useful since Cedit displays tabs and other special
characters as a @. Tabs can cause problems with other programs
as well, so this function is helpful in those cases.
Once tabs have been changed to blanks they can not be changed
back to tabs unless you do so by hand editing each tab back
in to the file.
3 DELETE_LINES
Does just that. It Deletes lines, text and all, not just the
text in the lines.
Note that besides Edit, Delete lines is the only way to remove
lines from the file being Cedit'ed.
3 EOL
Toggles End Of Line markers on or off. Once toggled on then all
text on the screen will have a small square at the end of the
line. Useful for seeing the end of lines with trailing blanks.
Ends of lines that are to the left of the current display column
are indicated with a |- type of symbol.
3 HELP
Brings up this help utility as you obviously know since your are
using it now. Works just like the standard VMS help utility
since it uses the same. In case you did not know, Ctrl Z will
get you out of help.
3 INSERT_LINES
Yes, this inserts new empty lines into the file. Lines are
inserted above the starting line you specify. So you would
specify line 1 if you wanted to put empty lines above the
first line in the file.
3 JUMP
Jump pops you out of Cedit to a DCL Shell (aka logs you in to
the system a second time). It does not quit you out of Cedit.
Perform any tasks that you would normally do when you log in to
your system. When your done, just log out as normal and Zap, your
back in the Cedit editor just where you left off editing your file.
o Jump may be a very slow process unless your system is not busy.
o Jump may fail if the system manager has set your account up so
it can not activate a sub-process, but this is rare.
3 PAD
Pads lines with a character you specify out to a column you
also specify. It does not shift any existing text.
o It is recommended you Pad all lines with blanks before you use
the primary function Copy or Move.
o In most cases you would use a blank as the Pad character.
3 SCROLL
Allows the user to select the line and column within the file
that they want to view in the 20 line by 80 column edit window.
This is much faster than using the arrow keys when moving very
far in a large file.
3 TRIM
Trims a character you specify from the specified lines in the
file. The character is trimmed back from right to left to the
specified column.
o Specify the keyword ALL at the starting line prompt to trim
all trailing blanks from all lines in the file.
o In most cases you would use a blank as the Trim character.
3 XEDIT
Invokes another editor of your choice (default is EDT) on a
specified section of text. You can use that editors functions
on the text. When you save and exit the editor, the edited text
is pulled back in to the file you are Cedit-ing.
o You can quit out of the external editor to abort any changes.
o Invoking an external editor is a slow process, however it works.
o Some editors will have problems with long character strings.
o Deleting lines in the external editor does not change the
number of lines in the Cedit file. You just get blank lines.
3 Question_Mark
Displays the following information:
o Places temporary line number bars on the left and right side
of the current edit window.
o Shows the largest known line in the file and what you have
set the maximum_line_length to at startup time.
o Shows the number of lines in the file.
3 CTRL_Z
Exits Line function and returns to primary functions.
Control Z while in the Line function mode will not exit you
out of Cedit.
2 Common_uses
So what good is this editor? Glad you queried.
o The manipulation of columns of data files is a primary candidate.
o Special column formatting and clean up of any text file is great.
o Manipulation of any text based, column oriented file is good.
o It's use as a straight text editor while in Edit mode on files
with long lines is good too, but other types of editors may be
better for files with 80 columns or less of text.
o Using Cedit or any other editor for a word processor is a joke.
2 ASCII_chart
ASCII Decimal Code Chart
NUL 0 | DLE 16 | SP 32 | 0 48 | @ 64 | P 80 | ` 96 | p 112
SOH 1 | DC1 17 | ! 33 | 1 49 | A 65 | Q 81 | a 97 | q 113
STX 2 | DC2 18 | " 34 | 2 50 | B 66 | R 82 | b 98 | r 114
EXT 3 | DC3 19 | # 35 | 3 51 | C 67 | S 83 | c 99 | s 115
EOT 4 | DC4 20 | $ 36 | 4 52 | D 68 | T 84 | d 100| t 116
ENQ 5 | NAK 21 | % 37 | 5 53 | E 69 | U 85 | e 101| u 117
ACK 6 | SYN 22 | & 38 | 6 54 | F 70 | V 86 | f 102| v 118
BEL 7 | ETB 23 | ' 39 | 7 55 | G 71 | W 87 | g 103| w 119
BS 8 | CAN 24 | ( 40 | 8 56 | H 72 | X 88 | h 104| x 120
HT 9 | EM 25 | ) 41 | 9 57 | I 73 | Y 89 | i 105| y 121
LF 10 | SUB 26 | * 42 | : 58 | J 74 | Z 90 | j 106| z 122
VT 11 | ESC 27 | + 43 | ; 59 | K 75 | [ 91 | k 107| { 123
FF 12 | FS 28 | , 44 | < 60 | L 76 | \ 92 | l 108| | 124
CR 13 | GS 29 | - 45 | = 61 | M 77 | ] 93 | m 109| } 125
SO 14 | RS 30 | . 46 | > 62 | N 78 | ^ 94 | n 110| ~ 126
SI 15 | US 31 | / 47 | ? 63 | O 79 | _ 95 | o 111| DEL 127
Note: Control A is ASCII code 01, control B is 02, control C is 03, etc.
2 Hints
o Use Keywords (see Keywords) and Offsets (see Offsets) to let Cedit
figure locations instead of straining your brain. Keywords like
ALL can make it so you don't have to type in as many parameters.
o When prompted for a character string, you can use a % with an ASCII
decimal code number to insert a single special character.
Example: %27 would specify an Escape character.
o Use the Pad line function first when editing data files to avoid
unexpected results with column editing functions when working with
varying length lines.
o Use the Scroll function instead of the arrow keys when moving the
current display window more than a few lines or columns.
o Remember the functions Delete and Insert are not the same as the
secondary Line functions Delete and Insert.
2 Known_problems
Line adding (Return) or deleting (Del when in col 1) when using the
Edit function on big files is slow. This is because Cedit keeps
track of lines by number, so it has to do a quick line renumber.
It's a fast line renumber procedure, but on real big files, well...
Attempts to save a file to a directory without a disk quota established
will cause an 'Unable to save file' message to appear. This is true
with other editors and is your problem, not a Cedit bug.
Received garbage characters like the glop you get over phone lines
may make your terminal so it does not correctly interpret/send some
of the escape codes Cedit uses for screen manipulation. This is not
really a bug with Cedit. To correct this problem, turn your machine
off then back on to reset it. Nasty, but it works.
2 Disclaimer
Cedit is free. That means if you like it, great, use it. However if
you have any problem with it, your on your own. The author takes
no responsibility stated or otherwise for the results of this program.
If it causes loss, corruption, gobbly-gook or anything else to happen
with file(s) systems(s), network(s) or components it is your problem,
not mine.
I am truly interested in any bugs/problems you may encounter, but I
make no promise that I will fix anything you may consider to be a
bug or problem. I have not written any code designed to cause any
sort of harm, virus, etc. and I am not aware of any such problems, but
I don't guaranty this or any other software to be free of such things.
See the About_Cedit topic for information on sending questions or
comments to the Author.
Click on FTP to download from the FTP archives.
![[FTP]](http://www2.encompassus.org/hidedecus/graphics/i_ftp.gif)