home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
HATCH
/
WWIVNEWS.ZIP
/
9209_2.NWS
< prev
next >
Wrap
Text File
|
1992-09-29
|
21KB
|
420 lines
───────────────┬─────────────────────────────────────────────┬───────────────
│ Tackling DGROUP with │
│ External String Management │
│ by Elrond (8@4) │
└─────────────────────────────────────────────┘
DGROUP:
The word alone is enough to send shivers down the spines of even the most
experienced WWIV modders. To them, DGROUP conjures up living nightmares of
installing complex modifications, only to wind up having to pull out their
favorite (and largest) mods because they took up too much DGROUP space. For
others, the less initiated, it brings up a several questions: For instance,
what the heck is it, and how come everyone is always so caught up in it?
And above all, how can I get rid of the problems it causes?
Let's start from the beginning. Assuming that the vast majority of people
out there really do not have even the slightest knowledge of Pascal, C, or
Assembly, I will try and keep things simple. A program has several different
segments of memory that are assigned to it. One of these segments is called
the DGROUP, which is a group encompassing several memory segments that can be
referred to as a single group. DGROUP is short for the (D)ATA GROUP, and it
is where certain parts of the current (EXEC'ing) program are stored. I will
not get into the sub-segments within the DGROUP, because it is enough to say
that it holds parts of the program, which of course for us is WWIV.
One of the major parts of any program's data is text. When a program is
compiled, it is translated into the binary language (machine language) that
your CPU can understand. Most of what goes into a program is actually ignored
or simplified when a program is compiled, for the CPU has no use for this extra
information. We only include it in our programs in order to increase the
readability of the code. Addition, subtraction, variables, and the other common
parts of your program are translated into their simple equivalent instructions
that your CPU can understand. However, the text, or strings in your program
cannot be translated to some simpler equivalent. If they were, then you
obviously would not be able to read them. So, when a program is compiled, any
text that gets sent to any device (be it the CRT, COM port, LPT port, whatever)
is kept in its original state.
If you have lots of text in your program (and BBS systems have a lot just by
their very nature) then the DGROUP segment starts to get filled up rather
quickly. Each character in a string takes up at least one byte of memory, so
one thousand characters will take up about a kilobyte. Wayne was smart(?)
enough to compile his program in a memory model that only allocates 64
kilobytes for the DGROUP segment. So, when you fill that up, your finished.
No more modding. You get a compiler error, and so you are up against a brick
wall. Right?
To many sysops, this is exactly what they thought. If they did understand
DGROUP, at least slightly, they would go rip out a big mod, like a time bank
or a fancy file listing system. Then they could compile again, but they would
be stuck without being able to install any more of the neat mods that come out
every day. I can remember myself running around all the different support
boards at the beginning of last summer looking for *SOMETHING* that would
save me from that infernal compile message. I installed lots of little, very
inefficient fixes - the DGROUP error went away for a mod or two, but then it
was back to plague me again.
Then one day Tolkien released ESM, and thus changed the way that people thought
about DGROUP altogether.
ESM, or External Strings Manager, is a program to help you cut down on the
amount of DGROUP that WWIV takes up. The logic behind this is that if you can
get the strings out of the program, and into an external file, then they will
not have to be loaded every time the program is run. Whoever first came up with
this idea (it was not an original) is someone we owe a lot to. With the strings
out of the main program and in an external file, we virtually eliminate as much
DGROUP space as we choose to - it all depends on how many strings we remove.
ESM is very efficient (and FAST!!) at retrieving strings from the external
file. Even on an 8 mhz. 286, there is hardly a noticeable delay while the call
to get a string from the external file is executed. Plus, the ESM editor (for
editing strings in your external strings file) makes it easy to change what a
string says, and you don't even have to re-compile your BBS when you do it.
There is only one major drawback with ESM, and that is it takes a long time to
manually remove the strings from your source code and paste them into a strings
file. This can take literally hours, if not DAYS, and it is a very slow and
painstaking process. You cannot afford to screw up a string, or you'll wind up
printing out the wrong one. That can look very funny, but is still a bit
embarrassing. With the recent upgrades to ESM, however, this task can be done
automatically with a special utility program (available only to registered ESM
users). Using this utility, you can generate a strings file by letting the
program go through and pull out the strings for you. Therefore, it is a very
fast and effortless process.
If you do not plan on registering ESM, there is an alternative. I have written
a program which I call ASR, or Automatic Strings Remover, which does virtually
the same thing. Best of all, it is free, like all the software that I write
(and it looks neater, too, but that's just an opinion).
A note on the side: There was a mod released some months ago onto the modnet
which will allow WWIV to compile in a much larger memory model, and thus allow
1024 k of DGROUP. This will obviously be much more than you will probably ever
use. But if you want my advice, I wouldn't install it. Here's why: It is way
too unstandard. Installing this mod not only stops you from using the wonderful
MAKE interface, but it also forces you to rewrite most of the routines in some
of the major C files. Sure, the replacements are included, but they are very
confusing, probably (no guarantees) not very well coded, and that much more
difficult to deal with than the ESM/ASR combination. There also is the chance
that other mods will conflict or not work at all with this one installed. All
told, I suggest that you steer clear of it. If Wayne himself ever takes it upon
himself to rewrite WWIV to support this memory model, then you we can all stop
worrying about DGROUP, but that's just it - he hasn't.
With ESM and its support programs, or with ESM and ASR, you can very easily
eliminate those horrible DGROUP errors and get back to the business at hand,
which is adding more mods, of course. Regardless of how good a modder you may
be, sooner or later you will reach the limit of the DGROUP segment. Go grab ESM
and ASR, install them, and then basically forget them. Then, go treat yourself
by installing the biggest, most DGROUP consuming mod that you can find on the
Modnet which you couldn't dare install before. Good luck with your modding!
──────────────────────────────────────────────────────────────────────────────
Where to obtain ESM and ASR:
ESM, External Strings Manager
Current version : 1.04 (shareware), 2.00 (registered)
Author : Tolkien
BBS name : The Fellowship
WWIVnet : @3456
Phone number : (314) 664-5777
Auto Validation : YES
WWIV support board : YES
High speed modem : v32, v32bis, HST (14,400 and lower)
ASR, Automatic Strings Remover
Current version : 1.50 (freeware)
Author : Ellrond
BBS name : Silicon Valley
WWIVnet : @9987
Phone number : (919) 765-8640
WWIV support board : NO
Auto Validation : YES
High speed modem : v32, v32bis, HST (14,400 and lower)
───────────────┬─────────────────────────────────────────────┬───────────────
│ Filo's Mod of the Month │
│ by Filo (1@5252) │
└─────────────────────────────────────────────┘
The Mod-of-The-Month Selection represents my choice of what appears to be a
useful, practical mod to WWIV. It does not mean it is the best mod posted or
even that it works as I may not have tested it. Given the limitations of this
media, uuencoded mods are NOT eligible for selection as mod-of-the-month.
This month's offerings contained three mods that really appealed to me. All
three involved features that are already in NET32 but which are definitely
needed in NET31 and v4.21 usage: a NETNAME in the name of the Sub, a NETNAME
in E-mail response to user, and a force specific network callouts. The latter
is the one that I have chosen to put here.
This is another of Darrel Mobley's fine mods:
┌──────────────────────────────────────────────────────────────────────┐
│ Mod Name: : DDM-0002.MOD Author : The Primerican #1 │
│ Difficulty : Moderate Network: WWIVnet @9402 │
│ WWIV Version : 4.21a Files : NETSUP.C │
│ │
│ Description : This mod allows you to force a callout to other │
│ network node numbers than your main network. 4.21a │
│ (9/12/92) does not check to see if you use the same node # │
│ CALLOUT4.21B in more than one network during Forced Callout "/". │
└──────────────────────────────────────────────────────────────────────┘
What this does:
I noticed from my WFC screen in the net pending list that if I had two nodes
sharing the same number but were in different networks, the "/" Force Callout
command would always force the callout to the node in the primary network.
This is the second version of the mod. This will ONLY prompt you IF there are
two nodes sharing the same node number within multiple networks on your system.
The first mod asked the network to force from on each callout attempt, this one
only asks for the network if it finds more than one network sharing the same
node number.
On with the mod.
Disclaimer: Why bother? You KNOW to back up your source! Grin.
Replace the entire void "force_callout(void)" with this void:
void force_callout(void)
{
int i,i1,i2,i3,index,ok,sn,nn;
int nv,onxi,odci,abort;
float fl,fl1,fl2,ffl;
long l,l1;
char ch,s[81],s1[81];
char *ss,onx[20],*mmk;
struct time ti;
net_system_list_rec *csne;
time(&l);
nl();
prt(2,"Which system? ");
input(s,5);
sn=atoi(s);
abort=0;
if (sn && (net_num_max>1)) {
odc[0]=0;
odci=0;
onx[0]='Q';
onx[1]=0;
onxi=1;
nv=0;
ss=malloc(net_num_max);
for (nn=0; nn<net_num_max; nn++) {
set_net_num(nn);
if (next_system(sn))
ss[nv++]=nn;
}
if (nv==1) {
set_net_num(ss[0]);
} else {
nl();
for (i=0; i<nv; i++) {
set_net_num(ss[i]);
csne=next_system(sn);
if (csne) {
if (i<9) {
onx[onxi++]=i+'1';
onx[onxi]=0;
} else {
odci=(i+1)/10;
odc[odci-1]=odci+'0';
odc[odci]=0;
}
npr("%d. %s (%s)\r\n",i+1,net_name,csne->name);
}
}
pl("Q. Quit");
nl();
prt(2,"Which network (number)? ");
if (nv<9) {
ch=onek(onx);
if (ch=='Q')
i=-1;
else
i=ch-'1';
} else {
mmk=mmkey(2);
if (*mmk=='Q')
i=-1;
else
i=atoi(mmk)-1;
}
if ((i>=0) && (i<nv)) {
set_net_num(ss[i]);
} else {
nl();
pl("Aborted.");
nl();
abort=1;
}
}
}
if (!abort) {
if (!net_networks[net_num].con)
read_call_out_list();
i=-1;
for (i1=0; i1<net_networks[net_num].num_con; i1++) {
if (net_networks[net_num].con[i1].sysnum == sn) {
i=i1;
break;
}
}
if (i!=-1) {
if (!net_networks[net_num].ncn)
read_contacts();
ok=ok_to_call(i);
i2=-1;
for (i1=0; i1<net_networks[net_num].num_ncn; i1++) {
if (net_networks[net_num].ncn[i1].systemnumber==sn) {
i2=i1;
break;
}
}
if (i2==-1)
ok=0;
else
if (!ok) {
nl();
prt(5,"Are you sure? ");
if (yn())
ok=1;
}
if (ok) {
if (net_networks[net_num].ncn[i2].bytes_waiting==0L)
if (!(net_networks[net_num].con[i].options & options_sendback))
ok=0;
if (ok) {
nl();
do_callout(sn);
}
}
}
}
}
Recompile and enjoy!
───────────────┬─────────────────────────────────────────────┬───────────────
│ Dateline: @#$*()#! │
│ Editor's Notes by Omega Man (1@5282) │
└─────────────────────────────────────────────┘
Editor's nOTE: The past four months worth of weekends have been spent by yours
truly on the monumental task of first upgrading @5282 to WWIV 4.21, and then
scrapping everything when Wayne released 4.21a and starting over. This task
included the monumental effort of evaluating over 750 WWIV mods with widely
varying levels of "assured compatibilty."
As one could expect, it damned near caused this issue of WWIVnews to be
replaced with a "Best Of" special issue I've got stashed away for such
emergencies...
As of this writing I'm almost finished with the upgrading. Despite several
setbacks and several trips to my favorite place to kick back and think (which
also happens to be my favorite topless bar, incedentally), the following
commentary keeps burning in my thoughts every time I fire up MAKE.EXE.
Sympathize, identify, or villify. In any case, keep the above facts in your
mind as you read some of what's been running through mine...
─────────────────────────────────────────────────────────────────────────────
Evolution and Change.
These are integral parts of the whole that we refer to as the "Computer
Revolution." In the history of Mankind no previous form of socio-technological
advancement has possessed such a propensity for consistent alteration and
improvement and seen it utilized to an equal degree. Unlike any other type of
industrial or technological base, that which is produced and deemed "state of
the art" when first designed is usually well on its way to becoming outdated by
the time it hits the open market. The degree of Evolution and Change in this
area is indeed that great.
As a result, survivability within the computer industry now requires that each
new advancement be able to adapt readily to consistently evolving standards,
and those who design said advancements must in turn be able to not only meet
and even exceed these demands, but in essence predict future demands in well in
advance of their actual implementation.
To accomplish this, designers must not only be users of the products themselves
but they must also be trailblazers as well. No longer is it simply enough to
blaze the trail and hope the users will follow; designers must be willing to
travel those trails already taken and determine the next best path to take
without choosing one that will force users to halt in their tracks.
WWIV and all its various facets are no exception to these forces of Evolution
and Change. Witness the fact that the Turbo C version of WWIV has been upgraded
14 times in the near 5 years since Wayne's decision to abandon Turbo Pascal,
and that the WWIVnet executables themselves have been upgraded more than twice
that number as well. This number of upgrades, while arguably far above current
industry averages, reflect not only improved software flexibility and
functionality (not to mention bug fixes), but to accommodate the evolution of
Turbo C as well.
With WWIV and WWIVnet evolving and changing at these rates, those who design
and test the literally thousands of modifications to the basic WWIV source code
are pressed harder than ever to not only accommodate users by debugging their
mods thoroughly and providing instructions for seamless, efficient
installation, but to provide improvements and additions to stock WWIV features
that may provide a permanent increase in versatility and user-friendliness.
This, in essence, is what truly motivates the WWIV modder in today's continuing
Computer Revolution. The desire to produce something that not only improves
existing features of WWIV, but offers a new approach to a particular WWIV facet
that isn't so radical that it scares people away from implementing it. This
also, in essence, is the "catch" that any modder has to face. How modders
should handle this catch is the focus of this editorial.
Innovation and creativity is fine and dandy, but make damn sure that you've
made it clear exactly what you're trying to accomplish. Without a proper
approach to design and implementation, a mod that might be the best thing to
hit WWIV since Wayne added color to the TP3 version could very well be ignored
due to improper design, presentation, and implementation
In other words, modders, document your mods *properly*. Explain not only what
they do, but *why* they are in fact an improvement over stock code. If your mod
is a radically different approach, go into details as to *what* is so different
about your mod, and *why* your way of doing things is that much better. If
there are any "catches" to installing your mod, then make doubly certain that
you explain them in detail, and what should be done to prevent getting stung by
them.
Carry on, modders! Blaze those trails to the future and blaze them well! We're
right behind you, so make sure you don't set ablaze the collective rear ends of
those who follow your path.
Including, of course, your own.
┌───────────────────────────────────────────────────────────────────────────┐
│ Closing Credits │
├───────────────────────────────────────────────────────────────────────────┤
│ WWIVnews is an independent newsletter published monthly as a service to │
│ the WWIV community of sysops and users. The opinions and reviews expressed│
│ herein are the expressed views of the respective writers, and do not │
│ necessarily reflect those of the WWIVnews staff. Reproduction in whole or │
│ in part is allowed provided proper credit is given. All rights reserved. │
├───────────────────────────────────────────────────────────────────────────┤
│ The distribution sites for WWIVnews are the Klingon Empire BBS (512-459- │
│ 1088), WWIVnet node @5282, and the WWIVnews Editorial Desk networked │
│ subboard, subtype 15282 host 5282. Information regarding article and │
│ editorial submissions, back issue requests, and the WWIVnews Writer's │
│ Guide, can be requested in e-mail from the WWIVnews editor, 1@5282. │
├───────────────────────────────────────────────────────────────────────────┤
│ WWIV and WWIVnet, copyright 1986,1990 by Wayne Bell │
│ Any product or company mentioned or reviewed herein are copyrighted of │
│ their respective owners, creators, and other corporate pseudoentities. │
└───────────────────────────────────────────────────────────────────────────┘