/* First off, my real question is a short, easy to answer by someone who
knows, question...but I will outline my whole problem first, so I increase
my chances of getting an answer I understand and can use*/

Here is my situation, which is the root of my problem.

I am coding on a Win2000 machine, and I have already made some fairly
extensive additions and changes to the code base.

I fixed the "Version control on a windows system" problem with a product
called "ClearCase". (As an aside, one of the best project management pieces
of software out there...another aside is it is what companies such as
Northrup Grumman use...which is how I heard of it)

My problem, is that when wanting to put color, or mob progs (I DON'T want an
olc) or other such significant code snippets in, is that they are almost all
in unix type patch file format, and each one sais "Do this on a CLEAN,
VANILLA, Rom24 version".


So, what *I* have to do to put these patches in, is go into the patch files,
go to the line specified for the addition(or change) in a Vanilla copy that
I have, Find the same point in my own code (which will have a different line
number 99.999% of the time) and basically put in the changes line by line.

The boredom and long work needed for that process I have absolutely NO
problem with.

I had little problem putting in the Color code, because the patch files are
in a format like this....


@@ -100,37 +100,37 @@
     send_to_char("   channel     status\n\r",ch);
     send_to_char("---------------------\n\r",ch);

-    send_to_char("gossip         ",ch);
+    send_to_char("{dgossip{x         ",ch);
     if (!IS_SET(ch->comm,COMM_NOGOSSIP))
       send_to_char("ON\n\r",ch);
     else
       send_to_char("OFF\n\r",ch);

-    send_to_char("auction        ",ch);
+    send_to_char("{aauction{x        ",ch);
     if (!IS_SET(ch->comm,COMM_NOAUCTION))
       send_to_char("ON\n\r",ch);
     else
       send_to_char("OFF\n\r",ch);


In this format, it is extremely easy to find the exact right place in the
code in which to put things(not to mention, there were only two patch files,
and it only took me a couple hours to do the patch, so if I got it wrong, It
was no biggie to go back)

But, now that I am trying to put in Mobprogs(and item progs, room
progs)...the patch files are in a different, harder for the uninitiated to
understand....

750a751,762
>
>     if ( !IS_NPC(ch) )
>     {
>  CHAR_DATA *mob, *mob_next;
>  for ( mob = ch->in_room->people; mob != NULL; mob = mob_next )
>  {
>      mob_next = mob->next_in_room;
>      if ( IS_NPC(mob) && HAS_TRIGGER( mob, TRIG_SPEECH )
>      &&   mob->position == mob->pIndexData->default_pos )
>   mp_act_trigger( argument, mob, ch, NULL, NULL, TRIG_SPEECH );
>  }
>     }
890a903,905
>     if ( !IS_NPC(ch) && IS_NPC(victim) &&
HAS_TRIGGER(victim,TRIG_SPEECH) )
>  mp_act_trigger( argument, victim, ch, NULL, NULL, TRIG_SPEECH );
>
1015a1031
>     MOBtrigger = FALSE;
1017a1034
>     MOBtrigger = TRUE;


Now, here is what I THINK the numbers stand for... (the first number, I am
not sure at all how that is used)
the second number, is the line number that 'the first line of the addition'
becomes, and the last number, is the line number that 'the last line of the
addition' becomes.

If I am right, this leads to this question....after the first addition to
the code...all of the other code's lines  change....

is the "903,905" the line numbers AFTER the 11 line block of code is put in
higher up in the file? or is it line 903,905 of the Vanilla copy?

That one question can have PROFOUND effects on where a particular line goes
into the code....and with something like 10 patch files to go through line
by line, I would hate to go through the hours of plugging, only to find out
that I did it the wrong way.

Reply via email to