home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
CEL202R.ZIP
/
CEL202-4.ZIP
/
LANG_101.ZIP
/
EDITLANG.DOC
< prev
next >
Wrap
Text File
|
1993-12-10
|
30KB
|
828 lines
This here is a Celerity v2.0 Language File Editor.
Written By Sicko of The BoG
Version 1.0
┌───────────────────────────────────────┐
│ License, Warranty and Disclaimer │
└───────────────────────────────────────┘
I'll keep this part short and sweet, and dispense with the legal-ese:
License: You are allowed to use LFE for 30 days, after which you
must either register LFE or stop using it completely. LFE
registration is a license for your use of LFE; I retain
ownership of the software. A single registration applies to a single
SYSOP, regardless of the number of computers used in the
system. If you run two or more distinct BBS systems on the same
computer(s) (with different SYSOP names), you ARE required to have
two or more LFE registrations.
Warranty: There isn't one. The only thing I'll guarantee is that
LFE will take up disk space, and will disappear when deleted.
Disclaimer: I'm not responsible for anything bad that happens. LFE
works here, but I cannot be held responsible for it not working on
your computer or doing any damage to hardware or software.
If these aren't agreeable with you, then the best thing to do is delete LFE
right now. I'll do my best to help any user (registered or not) that wants to
use LFE, and I'll act on bug reports quickly, but I simply cannot and will
not be responsible for anything bad, like lost data, disk crashes, or whatever
else you can think of.
Please review the register.frm file.
Information:
If editlang.dat is not in the current directory when you
run editlang.exe you need to pass the path to editlang.dat in the
command line.
eg:
DOS:
F> f:\celerity\utils\editlang.exe f:\celerity\utils\
Celerity's F5 external menu
Language Editor,f:\celerity\utils\langedit,f:\celerity\utils\
EDITLANG.DAT needs to be in the language dir. EDITLANG.DAT is of the format:
f:\node1\
f:\celerity\menu\langstuf\
f:\celerity\menu\langstuf\
thedraw
Y
2
f:\celerity\menu\langstuf\
------------------------- End of Lines Read --------------------------------
Line #1 Path to setup.dat
Line #2 Directory to use for extract and report files.
Line #3 Path to TEXTCODE.NFO
Line #4 Path and name of extern editor.
Line #5 Write detailed report when adding entries via TEXTCODE.NFO?
Line #6 Which ansi screen to use, either 1 or 2.
Line #7 Default path to use for importing entries.
It will first try and load the language file that you pick from the
"choose language scroll-box". If it can't load that language file it will
try to load the menu file. If it can't load that it will exit.
If it can't load the language file it will map the colors back to
color_1 = 1
color_2 = 2
..
color_8 = 8
so you don't have every entry in black.
Any entries past 5000 in both the language and menu files will be truncated.
Remember: Since the language and menu files are seperate, each file actually
starts at ZERO.
Limits:
-------
A maximum of 100 language files can be read in.
Key Assignments:
----------------
Here are the docs for the various function keys:
F1 = Help.
Enter = Use internal editor to edit current entry. (Language Entry help
is avaliable here, described below).
F2 = Edit current entry using an external editor. The external editor is
defined in EDITLANG.DAT. You MUST save the edited entry back to the
disk before exiting if you want the changes to be imported to the
language file.
F3 = Enter a NEW entry. It will ask for the entry number you wish to add.
If that entry alread exists, it will be edited.
Alt-F3 = This will import ALL entires found in TEXTCODE.NFO into the current
language file. It will write over every entry in the current
language file with what it finds in TEXTCODE.NFO.
Currently this only works for the language files and not the
menu files
Ctr-F3 = This will import all entries found in TEXTCODE.NFO that do not
have an entry in the current language file. This makes finding
those entries that Byter adds easier.
This will scan TEXTCODE.NFO, then look-up the entry number found
in TEXTCODE.NFO in the current language file. If that entry has
a size of ZERO or doesn't exist, it will import the entry from
TEXTCODE.NFO.
A report file will be written in the extract directory called:
EDITLANG.MOD. It will contain the data, time and entries added.
If you have the detailed report flag set it will also include
the actual entry added. You can delete this file whenever you
feel like it.
F4 = Type the current entry to the screen. Usefull for testing ansis and
such.
F5 = Switch betweent the Language and menu sets.
F6 = Jump to entry #.
Alt-F6 = Search for string. Enter the string to search for. When you find the
entry you want to edit, press ENTER and it will stop there. If you
want to stop searching press ESC and it will return you to the
entry you were orginally looking at. Press the down arrow, or most
any other key to find the next match.
Pipe commands are not search, they are ignored. Example:
If you search for The BoG
and a language entry is |1T|2he |1B|2oG
then the search will FIND A MATCH.
F7 = Import into current entry. This will pull-up a TTT list box of files
you can choose from to import into the language file. Be careful,
since I do not ask you if you want to import the selected file, I
just do it. Press Enter on the file you want to import or ESC to
exit.
Alt-F7 = Export current entry to a text-file. It will be named:
first 4 letters of the language file's dos name + the entry
number with an extension of .out. EG: SICK3882.OUT
F8 = Make a language help file from the text-file TEXTCODE.NFO (supplied
with Celerity).
This will be used when in the internal editor. When in the
internal editor press F1 and the "default" or "help" entry
will be displayed on the bottom. This is useful if you do
not know what parameters are being passed to this language
entry or where the entry is used.
When I parse TEXTCODE.NFO, I am scanning for "t_", "m_, "=", and ";".
This will generate two files: LANGDATA.SIC and LANGINDX.SIC.
I import all entries in TEXTCODE.NFO, even the menu entries.
The help files are actually Celerity language files. You can
use them as Celerity language file if you wish, just rename
them.
The help files are initalized each time you do this to save space.
Alt-F8 = Make a TEXTCODE.NFO out of the current language file. Usefull
for taking a compiled language file and making a text-file out
of it for easier editing. The created file will have the same
filename as the current language file, but with an .OUT extension.
EG: LANGUAGE.OUT or SICKO.OUT.
F9 = Load a different language/menu set.
Alt-K = Copy the current entry to another entry.
Here is the key help file for the Editor. I will integrate it later.
EMleft <Left>, <CtrlS>
Cursor left one character.
EMright <Right>, <CtrlD>
Cursor right one character.
EMwordLeft <CtrlLeft>, <CtrlA>
Cursor left one word. If the cursor is at the beginning of a line,
it is moved to the end of the previous line.
EMwordRight <CtrlRight>, <CtrlF>
Cursor right one word. If the cursor is at the end of a line, it is
moved to the beginning of the following line.
EMhome <Home>, <CtrlQ><S>
Cursor to beginning of line.
EMend <End>, <CtrlQ><D>
Cursor to end of line.
EMup <Up>, <CtrlE>
Cursor up one line.
EMdown <Down>, <CtrlX>
Cursor down one line.
EMscrollUp <CtrlW>
Scroll display up one line.
EMscrollDown <CtrlZ>
Scroll display down one line.
EMpageUp <PgUp>, <CtrlR>
Scroll display up one page.
EMpageDown <PgDn>, <CtrlC>
Scroll display down one page.
EMscreenTop <CtrlHome>, <CtrlQ><E>
Move cursor to top of edit window.
EMscreenBot <CtrlEnd>, <CtrlQ><X>
Move cursor to bottom of edit window.
EMtopOfFile <CtrlPgUp>, <CtrlQ><R>
Move cursor to beginning of file.
EMendOfFile <CtrlPgDn>, <CtrlQ><C>
Move cursor to end of file.
EMdel <Del>, <CtrlG>
Delete character at cursor.
EMback <Bksp>, <CtrlH>, <CtrlBksp>
Delete character to left of cursor. If the cursor is at the
beginning of a line, the line will be joined with the previous
line.
EMdelLine <CtrlY>
Delete current line.
EMdelEol <CtrlQ><Y>
Delete from cursor to end of line.
EMdelWord <CtrlT>
Delete word to right of cursor. If the cursor is at end of a line,
the following line is joined with the current line.
EMenter <Enter>, <CtrlM>
Start a new line.
EMtab <Tab>, <CtrlI>
Move the cursor to the next tab stop. If insert mode is on, any
text to the right of the cursor is moved to the right of the tab
stop.
EMctrlChar <CtrlP>
Insert control character. For example, to insert a ^G, you would
enter <CtrlP><CtrlG>. This command is available only if the video
attribute for control characters is different than that for normal
characters. Control characters are displayed as uppercase
alphabetics (^G is displayed as 'G', for example) in the specified
attribute.
EMins <Ins>, <CtrlV>
Toggle insert mode on and off. A fat cursor indicates insert mode;
a thin cursor indicates overtype mode.
EMindent <CtrlO><I>
Toggle auto-indent mode on or off. In auto-indent mode, pressing
<Enter> while in insert mode will cause the new line inserted to
have the same indentation level as the previous line. Auto-indent
mode also affects the way that text is formatted when word wrap
occurs--the new line will have the same indentation level as the
previous line--and hence the behavior of the reformatting commands
(<CtrlB> and <AltR>).
EMwordWrap <CtrlO><W>
Toggle word wrap on and off. When word wrap is on, any attempt to
insert or append text beyond the right margin will cause a new line
to be inserted following the current line and all words that are at
least partially beyond the right margin to be moved to the new
line.
EMreformatP <CtrlB>
Reformat the current paragraph.
EMreformatG <AltR>
Reformat the entire file. Use this command with caution.
EMrestore <CtrlQ><L>
Restore original contents of the current line.
EMquit <Esc>
Quit editing.
Save <F2>
Display Default Entry (HELP) <F1>
-------------------------------- History ------------------------------------
4/25/93
first beta release.
You need to put the exe in the directory with your Lang Files. I will
add the ability to search your language.dat file for all the languages
on your system later.
It will ask for the name of the Language file, it defaults to language and
will add the extension automatically.
You can now use the arrow keys to move from entry to entry.
It will display 5 lines of each entry on the screen, with color, etc...
Press ENTER on the entry you wish to edit and it will put you in the editor.
Spaces are converted to the character ~, I will make this configurable or
nicer later. The reason I make a space into a ~, is that there could be
spaces at the end of an entry and my editor does not handle spaces at the
end of a line, it truncates them.
When in the editor press F2 to save and exit, or ^KS. Press ESC to exit w/o
saving.
To enter new entries press F3 and it will ask for the starting entry to
add/edit. It will either display the entry in that position or display a
blank file to edit. Press F2 to save (just like before). If you press F2,
it will then go to the next entry for editing. This way you can enter alot
of sequential entries fast. Press ESC while in the editor to stop.
Press F4 From the main screen to have the current entry TYPED to your screen,
helpful for those ansis.
Future additions:
Function key to use your favorite editor to edit entries, e.g the draw, etc
4/30/93
Last day of work at my current employer.
ok. Alot has been added.
I have added the ability to display the default language entry descriptions
from Byter's Language.nfo file. What you need to do is edit the language.nfo
and cut-out the part the gives the entry numbers and descriptions and put
this into a file called language.def in the same directory as editlang and
your language files.
From the main screen press F8 and it will compile the language.def file into
a usable language file. The files will be called langindx.sic and
langdata.sic. You can rename these files to language.lni and language.lng
and use these as a normal celerity language file if you want.
After you have made the default language files, edit an entry, and while in
the editor press F1 and it will display the default description.
When making new default language files, its best to delete both the
langindx.sic and langdata.sic for they will get fairly large if you press
F8 alot.
The other functions are pretty straight forward.
There is not alot of error checking in this one yet, so if it bombs that
usually means it can't find a file its looking for.
5/4/93
BP 7.0 blew the big spit. Sorry guys. This should fix the problems
5/5/93
Added the ability to import files into a entry. I used the TTTDIR stuff
that Byter uses to make it easier for sysops to use.
5/14/93
Instead of doing a brute force removal of trimming of trailing blanks
from within the TPU units I use, I have removed the specific instances
where it checks for the trailing spaces. What this means is that I no
longer need to convert all spaces to ~ and the trailing spaces are
left in when you edit the entries. Press END to go to the end of a line
to see if there are any trailing spaces. BUT if you want to add more
trailing spaces you have to use the ~ character to indicate spaces.
Tell me how it works out, cause it may screw-up the auto-repagination
and other "editing" features.
5/16/93
Finished-up with the reading/editing of the langfile.dat file.
From the first list box that is presented press
ENTER to use that language file
CTRL-ENTER to edit that language file's data
INS to add a new language file entry.
Press ESC to get out of the editing screen.
Cleaned-up alot of the problems with open/missing files and such.
5/17/93
Added F9 (load language).
Cleaned-up various bugs.
This should be the last version before I leave.
When playing with Celerity, I noticed it takes language record #0 as
either being the default language file or not using it at all?.? When
I added 3-4 language files to langfile.dat and went to K)onfigure
and press L it listed langfiles 1-3, when actually there are language files
0-3. What this means, I have no idea. Byter can tell you more. Cause
as of 5/16/93 you can not choose which language file you want to use
from the Konfigure menu, it always users language file 0.
I will include the lastest version of language.def (taken from language.nfo)
and the default language files from now on. I will not include langfile.dat
(for obvious reasons)
5/23/93
Updated the msgindexrec with the 5/23/93 structure. Since Byter moved
the language entry information from language.nfo to textinfo.nfo use
textinfo.nfo for the default entry file (language.def). And delete the
first bunch of lines it must start with an entry ie.
t_ .........
I put an example copy in the zip.
Editing the language file colors will have to wait till I get back.
6/23/93
It seems that the "quick" patch I made to the language editor before I
left did not work for Language files that have color added into the
first 8 Bytes of the language file. This is a patch to make them work.
Some of the data files are old because I didn't have time to make new
ones. Just delete them and make new ones yourself.
6/24/93
Modified the internal editor to have Word wrap, and auto indent turned off
initially. Also increase the word wrap length to 127. The maximum length
of a line is currently 127. I will see if I can up it to 255.
Added an option to use an external editor, eg Thedraw, QEDIT, etc...
This required a datafile (just like my other utils). It is named:
EDITLANG.DAT and needs to be in the same dir as EDITLANG.EXE, which
happens to also be where you LANGUAGE.DAT file is (your menu dir)
Someone finally had a suggestion, why not make the viewing window bigger.
I was just waiting for someone to point that out. So its now bigger.
Press F1 for HELP.
6/27/93
Added Alt-F8, make a text-file of the current language file.
6/28/93
The colors defined in the language file are now used when displaying the
language entries. I interprit |1 as being the first color in the language
file.
Updated the docs/internal help.
6/29/93
Added help to the select language list box.
Fixed a problem with Iemsi toggle toggeling the avatar toggle.
Added support for Menu files. Press F5 to flip between the languag file
and the menu file. (I haven't tested this fully, so get back to me with
any problems).
7/3/93
Fixed Help exiting for no reason.
7/5/93
Alter Ego reported that when he got to the end of the menu file and press
either the down arrow or page down, it seemed like it would loop through
the entries for awhile and finally return to the last entry. What is
happening is that there ALOT like 200 or so blank entries after the last
entry with anything in it. So when you hit down it has to scan through
all these blank entries looking for a valid entry, when it doesn't find
one it goes back to the one you were looking at (the last valid one).
I'll see if I can incorporate some smarts into it.
Fixed the help file generation routine to also capture menu help. And
changed the internal editor to handle menu help and menu editing.
Tho I don't handle the menu help too well since there are multiple
entries in the menu file for just 1 help entry. Ie all the different
emulations all just have 1 help entry.
7/6/93
Added searching for a string. Press ALT-F6. When you find the entry you
want to edit press ENTER and it will stop there, then press ENTER again
to edit it, or whatever else ya want to do.
7/8/93
Ok. People said that it would crash or seem like it was looping when you
pressed down arrow or pagedown when at the end of the lang/menu file, as
I said before its not looping, its just looking for the next entry that
has anything in it. What I've done now is it will truncate the file at
the last valid entry.
Fixed problem of adding new entries into the menu file, I added 5000 to
your entered value, oopps. No one caught it tho. fools.
7/23/93
Redid the help screen.
Changed the creation of the help file to read TEXTCODE.NFO in its
unaltered format. You do NOT need to remove the heading information
anymore and you DO NOT have to rename it. When creating help files, I
delete the old help files and start new.
Functionality added:
1. Add all entries in TEXTCODE.NFO to current language file. This will
write over any entries it finds.
{Alt-F3}
2. Add any entries found in TEXTCODE.NFO that have a 0 size or do not
exist in the current language file. This will make adding new language
entries SIMPLE! No more complaining that you can't track-down those
entries that Byter just loves to add at random and not document.
{Ctrl-F3}
3. Home : goto first entry.
4. End : goto last entry and truncate any entry > 5000.
Still gotta test menus and such.
Anything over entry 5000 is deleted now, both in the language and menu
files. That means anything past the 5000 record number is deleted.
Remember the menu files start at record 0, just like the language files.
7/24/93
Added error checking when flipping between language and menu files. If it
can't access either file it will tell you then switch batch to the one
you were editing. If it can't regain access to the one it was editing it
will tell you and exit.
Changed the color of the list box of language entries.
7/25/93
You can now pass the path and name of setup.dat to the language editor
so you DON'T have to keep editlang.exe in the language dir anymore.
When you select a language, it will first try to read the language file.
If it can't it will try the menu file. If that fails it exists.
(Happy Byter?)
7/26/93
Forgot to update the help screens.
7/27/93
O.K. This was a pain today.
I finalized how I will handle command lines on my utilities.
Utility_name path_to_utility_setup_file
eg: f:\celerity\utils\editlang f:\celerity\utils
I changed the EDITLANG.DAT file. Example follows:
f:\node1\
f:\celerity\menu\langstuf\
f:\celerity\menu\langstuf\
thedraw
Y
------------------------- End of Lines Read --------------------------------
Line #1 Path to setup.dat
Line #2 Directory to use for extract and report files.
Line #3 Path to TEXTCODE.NFO
Line #4 Path and name of extern editor.
Line #5 Write detailed report when adding entries via TEXTCODE.NFO?
When you add entries via CTRL-F3 (add entries in TEXTCODE.NFO that are
not in the current file) It will write to a file called EDITLANG.MOD
in the extract directory (line #2)
It will write the date and time of the additions and the entry number
added. If you have detailed reporting turned on it will also write the
actual entry added.
Hmm, no one noticed searching wasn't working, except Lenon. Fix-it.
Added more status displays.
For those having problems importing LARGE files. There is a 64k limit
set by TP for writing blocks to disk. I'll have to write a loop to
get around this. This is why some have been blowing-up trying to import
LARGE files.
I haven't implmented the extract directory in all parts of the editor
yet.
7/31/93
Fixed the problem of importing/saving files greater than 64K. This
took sometime as I had problems with EOF and some other garabage and
I had to rewrite a bunch of the common calls.
Added copy from 1 language entry to another.
8/2/93
Replaced more of the reset verbs with netreset. Made it exit if it
could not gain access to certain files.
8/10/93
It would crash after adding the first newly found entry in textcode.nfo
to the current language file. This is fixed. Also it was not writing
out the detailed information, ie: what the actual entry was. No one
caught this.
I'm still using the 7/15/93 setup record for Celerity since there is
a new celsetup.exe out yet
8/11/93
I fixed some of the runtime 103 errors, forgot to put the old {$I-}
compiler directive in some spots.
People are saying their language files are getting trashed. What I've
done is remove the part that deletes trailing blank entries in both
the language and menu files to see if this is the problem. Those of
you who complained that it would just sit and loop when you tried to
go past the end of the lang/menu file, well it'll start happening
again to you, since it will read all entries trying to find a valid
entry till it gets to the end of the file. Since you won't be
patient enough, you'll hit the pgdown key somemore times and the
process will repeat it self.
8/16/93
Must haeve been programming in my sleep again, I was reading the colors
for the language file in wrong. As the radio announce said in "Warriors"
"Sorry 'bout that boys".
I forgot to fix the read past end of file bug before I started working on
multiple ANSI screens, so....
There is a new line to EDITLANG.DAT, line #6 determines which ansi screen
to use within the editor, 1 = my original boring one, 2 = Alter Ego's
enhanced screen.
I have to make the colors more appropriate for Alter Ego's screen but I
need to get this out.
8/18/93
I've added debug display lines to tell you whats going on when ya run
this thing.
9/10/93
Someone reported that it was cutting off the last character of the entry
when you used the external editor or when you copied it. Fixed.
Added a default import directory to the editlang.dat, Line #7. This will
be the default directory that is displayed when you import files. So
you don't have to keep switching directories if your importing a bunch of
files. - If ya notice, I added this cause I was getting tired of
switching dirs.
It was not clearing the screen properly during start-up, so an extra ansi
line or two was left. fixed.
Added ctrl-F7, this will import all xxxx. files in the default import
directory to their corresponding language/menu entry. In other words
it will look for files numbers 1 to 9999, eg: 1. , 2050. , etc and import
them into that corresponding entry number. This makes creating and
importing menu sets real easy. Just create you menu, save it under its
corresponding entry # and then use this feature to import them all.
9/12/93
Working on making all my utilities more protable and managable.
Changed the pick language/menu screen to reflect a different background.
9/13/93
Spent more time tonight making my life a little easier and who ever
inherit's this code life miserable. Integrating the usereditor totally
into the filebase editor. And thus making changes to either side
virutally interchangable.
9/17/93
Changed the format of the help file. It now includes all information
that the textcode.nfo contains. eg: entry description, entry number,
detail of entry. At first, the help function was also used to import
textcode.nfo into a language file that could actually be used, this as
been replaced by the more controlable importing features.
There seems to be a bug when you import just extra entries, it sometimes
skips the last one. It happens randomly, one time it does, I repeat it
w/o exiting the program and it works. strange.
Added a line of '---------------' to the editlang.mod file to break
up entries.
Added Alt-E, this will pull up a ttt directory box that you can pick
files to edit from. Basically a quick way of viewing/editing TEXTCODE.NFO
or any other text file that you need access too.
10/5/93
GO SOX!
When you insert languages now, it will insert the entry where the
lightbar is at.
You can now delete entries in langfile.dat. Highlight the language you
want to delete and press DEL. It does NOT delete the actual language
files.
10/6/93
I gotta update help screens sometime.
Here is a quick release to help those creating language files.
This version is only good to about 11/15/93 or so. Also if you are
one of the sysops who sent in bug reports for me or one that has
made their language files public then it will run for you. If not, well,
it just drops back to dos.
10/10/93
Searching was screwy. I think I fixed it. Remember I only search the
first 8092 characters for a match. And you must be able to type what
you are looking for. It probably WONT find stuff in ANSI/RIP/NAPLAS
entries for there are control codes mixed in with text.
Hope ya like the new dork protection screen. (If ya see it that is)
10/14/93
It now checks for the existance of the setup directories.
I took the protection code out.
Made an Exe file.
10/17/93
Started a real quick mod to convert spaces to ~ which turned into a
nightmare. Whelps, if you press CTRL-ENTER instead of ENTER it should
convert all spaces to ~ and when you save it, it should reverse it.
(I hope)
10/18/93
Got the source back, (hopefullu).
Missed a compiler directive and left in some of the registration
protection. As you can see it wasn't much of anything.
I also forgot to update the editlang.dat for a LONG time, which just
showed up since we started checking for the existance of configured
directories.
Moved the questions and messages to line #24.
11/20/93
This will be the first release of the language editor. Protection is
IN.
Searching now ignores pipe commands.
12/8/93
I have taken out the protection. I feel this is one of the only
utilities that is necessary to a sysop's use of Celerity. I am
releasing ir into the public domain in a hope that those that use
it will release their language/menu files to the public domain.